## Mechanizing Coinduction and Corecursion in Higher-order Logic (1997)

### Cached

### Download Links

- [ftp.cl.cam.ac.uk]
- [www.cl.cam.ac.uk]
- [www.cl.cam.ac.uk]
- [www.cl.cam.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | Journal of Logic and Computation |

Citations: | 42 - 5 self |

### BibTeX

@ARTICLE{Paulson97mechanizingcoinduction,

author = {Lawrence C. Paulson},

title = {Mechanizing Coinduction and Corecursion in Higher-order Logic},

journal = {Journal of Logic and Computation},

year = {1997},

volume = {7}

}

### Years of Citing Articles

### OpenURL

### Abstract

A theory of recursive and corecursive definitions has been developed in higher-order logic (HOL) and mechanized using Isabelle. Least fixedpoints express inductive data types such as strict lists; greatest fixedpoints express coinductive data types, such as lazy lists. Wellfounded recursion expresses recursive functions over inductive data types; corecursion expresses functions that yield elements of coinductive data types. The theory rests on a traditional formalization of infinite trees. The theory is intended for use in specification and verification. It supports reasoning about a wide range of computable functions, but it does not formalize their operational semantics and can express noncomputable functions also. The theory is illustrated using finite and infinite lists. Corecursion expresses functions over infinite lists; coinduction reasons about such functions. Key words. Isabelle, higher-order logic, coinduction, corecursion Copyright c fl 1996 by Lawrence C. Paulson Content...

### Citations

3275 |
Communication and Concurrency
- Milner
- 1989
(Show Context)
Citation Context ...eams, can be expressed coinductively. The dual of recursion, called corecursion, can express functions involving coinductive types. Coinduction is well established for reasoning in concurrency theory =-=[20]-=-. Abramsky 's Lazy Lambda Calculus [1] has made coinduction equally important in the theory of functional programming. Milner and Tofte motivate coinduction through a simple proof about types in a fun... |

1332 | Introduction to Functional Programming
- Bird, Wadler
- 1988
(Show Context)
Citation Context ... a gfp, we must impose a finiteness restriction on f . The take-lemma, which says that two lazy lists are equal if all their corresponding 4 INFINITE TREES IN HOL 11 finite initial segments are equal =-=[5]-=-, is a standard reasoning method in lazy functional programming. The take-lemma is valid because a lazy list is nothing more than the set of its finite parts. We may similarly prove that two infinite ... |

864 |
A formulation of the simple theory of types
- Church
- 1940
(Show Context)
Citation Context ... upon the typed -calculus. It uses -abstraction to formalize the object-logic's binding operators, such as 8x OE, Q x2A B, fflx:OE and S x2A B, in the same manner as Church did for higher-order logic =-=[6]-=-. The approach is fully general; each binding operator may involve any fixed pattern of arguments and bound variables, and may denote a formula, term, set, type, etc. In a recent paper [24], I discuss... |

544 |
A lattice-theoretical fixpoint theorem and its applications
- Tarski
- 1955
(Show Context)
Citation Context ...ixedpoints The Knaster-Tarski Theorem asserts that each monotone function over a complete lattice possesses a fixedpoint. 2 Tarski later proved that the fixedpoints themselves form a complete lattice =-=[31]-=-; we shall be concerned only with the least and greatest fixedpoints. Least fixedpoints yield inductive definitions while greatest fixedpoints yield coinductive definitions. Our theory of inductive de... |

511 |
Introduction to HOL: A Theorem Proving En- vironment for Higher Order Logic
- Gordon, Melham
- 1993
(Show Context)
Citation Context ...n. HOL admits non-computable functions, which is sometimes advantageous and sometimes not. Higher-order logic is extremely successful in verification, mainly hardware verification [7]. The HOL system =-=[14]-=- is particularly popular. Melham has formalized and mechanized a theory of inductive definitions for the HOL system [18]; my work uses different principles to lay the foundation for mechanizing a broa... |

427 | A Generic Theorem Prover
- PAULSON
- 1994
(Show Context)
Citation Context ...or natural deduction proofs in HOL can be used to justify the soundness of Isabelle's representation of the object-logic. I have done a detailed proof for the case of intuitionistic first-order logic =-=[23]-=-; the argument applies, with obvious modifications, to any formalization of a similar syntactic form. 2.2 Higher-order logic as an object-logic Isabelle/HOL, Isabelle's formalization of higher-order l... |

239 | The lazy lambda calculus
- Abramsky
- 1990
(Show Context)
Citation Context ...he dual of recursion, called corecursion, can express functions involving coinductive types. Coinduction is well established for reasoning in concurrency theory [20]. Abramsky 's Lazy Lambda Calculus =-=[1]-=- has made coinduction equally important in the theory of functional programming. Milner and Tofte motivate coinduction through a simple proof about types in a functional language [21]. Tofte has prove... |

176 |
An Introduction to Inductive Definitions
- Aczel
- 1977
(Show Context)
Citation Context ...ns 29 1 INTRODUCTION 1 1 Introduction Recursive data structures, and recursive functions over them, are of central interest in Computer Science. The underlying theory is that of inductive definitions =-=[2]-=-. Much recent work has focused on formalizing induction principles in type theories. The type theory of Coq takes inductive definitions as primitive [8]. The second-order -calculus (known variously as... |

169 |
Logic and Computation: Interactive proof with Cambridge LCF
- Paulson
- 1987
(Show Context)
Citation Context ...d the foundations of domain theory, has finally been published [30]. Edinburgh LCF [15], a highly influential system, implemented Scott's logic. Still in print is my account of a successor LCF system =-=[22]-=-. Isabelle provides two versions of LCF: one built upon first-order logic, the other built upon Isabelle/HOL. 9 CONCLUSIONS 29 element ?, which is the denotation of a divergent computation. Objects ca... |

132 |
Edinburgh LCF: A Mechanised Logic of Computation
- Gordon, Milner, et al.
- 1979
(Show Context)
Citation Context ...ions. Strict and lazy recursive data types can be defined. Domains contain the bottom 5 Scott's 1969 paper, which laid the foundations of domain theory, has finally been published [30]. Edinburgh LCF =-=[15]-=-, a highly influential system, implemented Scott's logic. Still in print is my account of a successor LCF system [22]. Isabelle provides two versions of LCF: one built upon first-order logic, the othe... |

115 |
Type Inference for Polymorphic References
- Tofte
- 1990
(Show Context)
Citation Context .... Milner and Tofte motivate coinduction through a simple proof about types in a functional language [21]. Tofte has proved the soundness of a type discipline for polymorphic references by coinduction =-=[32]-=-. Pitts has derived a coinduction rule for proving facts of the form x v y in domain theory [28]. There are many ways of formalizing coinduction and corecursion. Mendler [19] has proposed extending 2 ... |

112 |
Inductively defined types
- Coquand, Paulin-Mohring
- 1990
(Show Context)
Citation Context ...erlying theory is that of inductive definitions [2]. Much recent work has focused on formalizing induction principles in type theories. The type theory of Coq takes inductive definitions as primitive =-=[8]-=-. The second-order -calculus (known variously as System F and 2) can express certain inductive definitions as second-order abstractions [13]. Of growing importance is the dual notion: coinductive defi... |

98 |
Inductive types and type constraints in the second-order lambda-calculus
- Mendler
- 1991
(Show Context)
Citation Context ...references by coinduction [32]. Pitts has derived a coinduction rule for proving facts of the form x v y in domain theory [28]. There are many ways of formalizing coinduction and corecursion. Mendler =-=[19]-=- has proposed extending 2 with inductive and coinductive types, equipped with recursion and corecursion operators. More recently, Geuvers [12] has shown that coinductive types can be constructed from ... |

81 | imps: an Interactive Mathematical Proof System
- Farmer, Guttman, et al.
- 1991
(Show Context)
Citation Context ...ckage can be used with logics having the appropriate properties. For this paper, we may regard Isabelle simply as an implementation of higher-order logic. There are many others, such as TPS [4], IMPS =-=[10]-=- and the HOL system [14]. I shall describe the theory of recursion in formal detail, to facilitate its mechanization in any suitable system. 2.1 Higher-order logic as an meta-logic Isabelle exploits t... |

78 |
Co-induction in relational semantics
- Milner, Tofte
- 1990
(Show Context)
Citation Context ...y Lambda Calculus [1] has made coinduction equally important in the theory of functional programming. Milner and Tofte motivate coinduction through a simple proof about types in a functional language =-=[21]-=-. Tofte has proved the soundness of a type discipline for polymorphic references by coinduction [32]. Pitts has derived a coinduction rule for proving facts of the form x v y in domain theory [28]. Th... |

75 | Automating recursive type definitions in higher order logic
- Melham
(Show Context)
Citation Context ...ly successful in verification, mainly hardware verification [7]. The HOL system [14] is particularly popular. Melham has formalized and mechanized a theory of inductive definitions for the HOL system =-=[18]-=-; my work uses different principles to lay the foundation for mechanizing a broader class of definitions. Some of the extensions (mutual recursion, extending the language of type constructors) are als... |

70 | TPS: A Theorem Proving System for Classical Type Theory
- Andrews, Bishop, et al.
- 1995
(Show Context)
Citation Context ...asoning package can be used with logics having the appropriate properties. For this paper, we may regard Isabelle simply as an implementation of higher-order logic. There are many others, such as TPS =-=[4]-=-, IMPS [10] and the HOL system [14]. I shall describe the theory of recursion in formal detail, to facilitate its mechanization in any suitable system. 2.1 Higher-order logic as an meta-logic Isabelle... |

52 | Inductive and coinductive types with iteration and recursion
- Geuvers
- 1992
(Show Context)
Citation Context ... ways of formalizing coinduction and corecursion. Mendler [19] has proposed extending 2 with inductive and coinductive types, equipped with recursion and corecursion operators. More recently, Geuvers =-=[12]-=- has shown that coinductive types can be constructed from inductive types, and vice versa. Leclerc and PaulinMohring [17] investigate various formalizations of streams in the Coq system. Rutten and Tu... |

48 |
A Type Theoretical Alternative to ISWIM
- Scott
- 1969
(Show Context)
Citation Context ...ote continuous functions. Strict and lazy recursive data types can be defined. Domains contain the bottom 5 Scott's 1969 paper, which laid the foundations of domain theory, has finally been published =-=[30]-=-. Edinburgh LCF [15], a highly influential system, implemented Scott's logic. Still in print is my account of a successor LCF system [22]. Isabelle provides two versions of LCF: one built upon first-o... |

47 | On the Foundations of Final Semantics: Non-Standard Sets
- Rutten, Turi
- 1992
(Show Context)
Citation Context ... can be constructed from inductive types, and vice versa. Leclerc and PaulinMohring [17] investigate various formalizations of streams in the Coq system. Rutten and Turi survey three other approaches =-=[29]-=-. Church's higher-order logic (HOL) is perfectly adequate for formalizing both inductive and coinductive definitions. The constructions are not especially difficult. A key tool is the Knaster-Tarski t... |

46 | Set theory for verification: I. From foundations to functions
- Paulson
- 1993
(Show Context)
Citation Context ...order logic [6]. The approach is fully general; each binding operator may involve any fixed pattern of arguments and bound variables, and may denote a formula, term, set, type, etc. In a recent paper =-=[24]-=-, I discuss variable binding with examples. Quantification in the meta-logic expresses axiom and theorem schemes. Binding operators typically involve higher-order definitions. The normalization theore... |

43 | Set theory for verification: II. Induction and recursion
- Paulson
- 1995
(Show Context)
Citation Context ...nt principles to lay the foundation for mechanizing a broader class of definitions. Some of the extensions (mutual recursion, extending the language of type constructors) are also valid in set theory =-=[26]-=-. One unexplored possibility is that trees may have infinite branching. A well-founded (WF) relation OE admits no infinite descents \Delta \Delta \Delta OE xn OE \Delta \Delta \Delta x 1 OE x 0 . A da... |

40 | A co-inducion principle for recursively defined domains
- Pitts
- 1994
(Show Context)
Citation Context ...age [21]. Tofte has proved the soundness of a type discipline for polymorphic references by coinduction [32]. Pitts has derived a coinduction rule for proving facts of the form x v y in domain theory =-=[28]-=-. There are many ways of formalizing coinduction and corecursion. Mendler [19] has proposed extending 2 with inductive and coinductive types, equipped with recursion and corecursion operators. More re... |

24 |
Introduction to Lattices and Orders. Cambridge university press
- Davey, Priestley
- 1990
(Show Context)
Citation Context ... common to all fixedpoints of f . The Isabelle theory proves that lfp is indeed the least fixedpoint of f : f A ` A lfp f ` A mono f lfp f = f(lfp f) 2 See Davey and Priestley for a modern discussion =-=[9]-=-. 3 LEAST AND GREATEST FIXEDPOINTS 7 The fixedpoint property justifies both introduction and elimination rules for lfp f , assuming we already know how to construct and take apart sets of the form f A... |

16 | A broader class of trees for recursive type definitions for HOL
- Gunter
- 1994
(Show Context)
Citation Context ... may define the set Fin A of all finite subsets of A as a least fixedpoint: Fin A j lfp i Z:ffgg [ i[ y2Z [ x2A ffxg [ yg jj Most importantly, the theory justifies non-WF data structures. Elsa Gunter =-=[16]-=- has independently developed a theory of trees, using ideas similar to those of x4. Her aim is to extend Melham's package with infinite branching, rather than coinduction. What about set theory? The o... |

16 | A Concrete Final Coalgebra Theorem for ZF Set Theory
- Paulson
- 1994
(Show Context)
Citation Context ...e the variant ordered pair (a; b) to be f(0; x)g x2a [ f(1; y)g y2b . This is equivalent to the disjoint sum a + b as usually defined, but note also its similarity to M \Delta N (see x4.4). Elsewhere =-=[27]-=- I have developed this approach; it handles recursive data structures in full generality, but not the models of concurrency that motivated Aczel. The proof of the main theorem is inspired by that of L... |

14 |
Programming with streams in Coq — a case study: the sieve of Eratosthenes
- Leclerc, Paulin-Mohring
- 1993
(Show Context)
Citation Context ...pes, equipped with recursion and corecursion operators. More recently, Geuvers [12] has shown that coinductive types can be constructed from inductive types, and vice versa. Leclerc and PaulinMohring =-=[17]-=- investigate various formalizations of streams in the Coq system. Rutten and Turi survey three other approaches [29]. Church's higher-order logic (HOL) is perfectly adequate for formalizing both induc... |

9 |
Principia Mathematica. Cambridge University Press, 3 vols
- Whitehead, Russell
- 1910
(Show Context)
Citation Context ...using the most readable syntax available in Isabelle, occasionally going beyond this. 2.4 Sets in Isabelle/HOL Set theory in higher-order logic dates back to Principia Mathematica's theory of classes =-=[33]-=-. Although sets are essentially predicates, Isabelle/HOL defines the type ff set for sets over type ff. Type ff set possesses values of the form fx j OExg for OE :: ff ) bool. The eliminator is member... |

7 | A case study of co-induction in Isabelle
- Frost
- 1995
(Show Context)
Citation Context ...he stream member at position i, where i is a natural number. Generalizing this approach to other infinite data structures requires generalizing the notion of position, perhaps as in x4.2. Jacob Frost =-=[11]-=- has performed Milner and Tofte's coinduction example [21] using Isabelle/HOL and Isabelle/ZF. The most difficult task is not proving the theorem but formalizing the paper's non-WF definitions. As of ... |

4 |
Proofs and Types Cambridge Univ
- Girard, Lafont, et al.
- 1989
(Show Context)
Citation Context ... type theory of Coq takes inductive definitions as primitive [8]. The second-order -calculus (known variously as System F and 2) can express certain inductive definitions as second-order abstractions =-=[13]-=-. Of growing importance is the dual notion: coinductive definitions. Infinite data structures, such as streams, can be expressed coinductively. The dual of recursion, called corecursion, can express f... |