Moessner's Theorem: An Exercise in Coinductive Reasoning in Coq

Moessner's Theorem describes a construction of the sequence of powers $$1^n, 2^n, 3^n, \ldots $$1n,2n,3n,', by repeatedly dropping and summing elements from the sequence of positive natural numbers. The theorem was presented by Moessner in 1951 without a proof and later proved and generalized in several directions. More recently, a coinductive proof of the original theorem was given by Niqui and Rutten. We present a formalization of their proof in the Coq proof assistant. This formalization serves as a non-trivial illustration of the use of coinduction in Coq. During the formalization, we discovered that Long and Salie's generalizations could also be proved using almost the same bisimulation.

[1]  Yves Bertot,et al.  Interactive Theorem Proving and Program Development: Coq'Art The Calculus of Inductive Constructions , 2010 .

[2]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[3]  Matthieu Sozeau,et al.  First-Class Type Classes , 2008, TPHOLs.

[4]  Milad Niqui,et al.  A proof of Moessner’s theorem by coinduction , 2011, High. Order Symb. Comput..

[5]  Alexandra Silva,et al.  On Moessner's Theorem , 2013, Am. Math. Mon..

[6]  Hugo Herbelin,et al.  The Coq proof assistant : reference manual, version 6.1 , 1997 .

[7]  C. T. Long On the Moessner Theorem on Integral Powers , 1966 .

[8]  Jan J. M. M. Rutten,et al.  Universal coalgebra: a theory of systems , 2000, Theor. Comput. Sci..

[9]  Jan J. M. M. Rutten,et al.  A coinductive calculus of streams , 2005, Mathematical Structures in Computer Science.

[10]  Ralf Hinze Scans and Convolutions - A Calculational Proof of Moessner's Theorem , 2008, IFL.

[11]  Sitzungsberichte der Bayerischen Akademie der Wissenschaften. 1919. , 2006, Naturwissenschaften.

[12]  Olivier Danvy,et al.  A characterization of Moessner's sieve , 2014, Theor. Comput. Sci..

[13]  Matthieu Sozeau A New Look at Generalized Rewriting in Type Theory , 2009, J. Formaliz. Reason..

[14]  John H. Conway,et al.  What Comes Next , 1996 .

[15]  Eduardo Giménez,et al.  Un calcul de constructions infinies et son application a la verification de systemes communicants , 1996 .

[16]  Ross Honsberger More Mathematical Morsels , 1978 .

[17]  Pierre Castéran,et al.  Interactive Theorem Proving and Program Development , 2004, Texts in Theoretical Computer Science An EATCS Series.

[18]  Olivier Danvy,et al.  Formal Study of Moessner's Sieve , 2017 .

[19]  Mark Bickford,et al.  Formalizing Moessner's theorem and generalizations in Nuprl , 2022, J. Log. Algebraic Methods Program..

[20]  Calvin T. Long Strike It out: Add It up , 1982 .