The Method of Coalgebra: Exercises in Coinduction

Total Page:16

File Type:pdf, Size:1020Kb

The Method of Coalgebra: Exercises in Coinduction The Method of Coalgebra: exercises in coinduction Jan Rutten CWI & RU [email protected] Draft d.d. 8 July 2018 (comments are welcome) 2 Draft d.d. 8 July 2018 Contents 1 Introduction 7 1.1 The method of coalgebra . .7 1.2 History, roughly and briefly . .7 1.3 Exercises in coinduction . .8 1.4 Enhanced coinduction: algebra and coalgebra combined . .8 1.5 Universal coalgebra . .8 1.6 How to read this book . .8 1.7 Acknowledgements . .9 2 Categories { where coalgebra comes from 11 2.1 The basic definitions . 11 2.2 Category theory in slogans . 12 2.3 Discussion . 16 3 Algebras and coalgebras 19 3.1 Algebras . 19 3.2 Coalgebras . 21 3.3 Discussion . 23 4 Induction and coinduction 25 4.1 Inductive and coinductive definitions . 25 4.2 Proofs by induction and coinduction . 28 4.3 Discussion . 32 5 The method of coalgebra 33 5.1 Basic types of coalgebras . 34 5.2 Coalgebras, systems, automata ::: ....................... 34 6 Dynamical systems 37 6.1 Homomorphisms of dynamical systems . 38 6.2 On the behaviour of dynamical systems . 41 6.3 Discussion . 44 3 4 Draft d.d. 8 July 2018 7 Stream systems 45 7.1 Homomorphisms and bisimulations of stream systems . 46 7.2 The final system of streams . 52 7.3 Defining streams by coinduction . 54 7.4 Coinduction: the bisimulation proof method . 59 7.5 Moessner's Theorem . 66 7.6 The heart of the matter: circularity . 72 7.7 Discussion . 76 8 Deterministic automata 77 8.1 Basic definitions . 78 8.2 Homomorphisms and bisimulations of automata . 80 8.3 The final automaton of languages . 87 8.4 Regular languages . 91 8.5 Proving language equality by coinduction . 93 8.6 Minimal automata . 98 8.7 Discussion . 105 9 Partial automata 107 9.1 Partiality . 108 9.2 Partial systems with outputs . 111 9.3 Partial automata . 113 9.4 Discussion . 116 10 Non-deterministic automata 117 10.1 The powerset construction . 119 10.2 Language equivalence of non-deterministic automata . 120 10.3 Discussion . 124 11 Stream differential equations 127 11.1 Examples of stream differential equations . 129 11.2 Introducing the syntactic solution method . 132 11.3 GSOS: a general format for stream differential equations . 138 11.4 Behavioural differential equations . 145 11.5 Discussion . 146 12 A calculus of streams 149 12.1 Basic stream operations . 149 12.2 Convolution inverse . 156 12.3 Stream composition . 160 12.4 Shuffle product . 162 12.5 Laplace transform . 166 12.6 Solving analytic differential equations . 169 Contents 5 12.7 Newton transform . 173 12.8 Rational streams and linear systems of SDEs . 179 12.9 Discussion . 186 13 Mealy automata 187 13.1 Causal stream functions . 188 13.2 Constructing minimal Mealy automata . 190 13.3 Moore automata . 192 13.4 A calculus of bitstreams . 193 13.5 Mealy machines for bitstream functions . 197 13.6 Discussion . 201 14 Weighted stream automata 203 14.1 Representing streams by weighted automata . 203 14.2 Splitting stream derivatives . 205 14.3 Weighted automata and linear stream systems . 208 14.4 Rational streams and linear stream systems . 214 14.5 Minimisation of linear stream systems . 218 14.6 Weighted automata with inputs . 222 14.7 Discussion . 223 15 Universal coalgebra 225 15.1 Lambek's Lemma . 225 15.2 Homomorphisms . 227 15.3 Coproducts of coalgebras . 227 15.4 Bisimulation and finality . 229 15.5 Enhanced coinduction . 232 15.6 Discussion . 233 16 Notation and preliminaries 235 16.1 Numbers . 235 16.2 Functions . 235 16.3 Products and sums . 236 16.4 Subsets . 237 16.5 Relations . 237 16.6 Words and languages . 238 16.7 Monoids, semi-rings, rings, integral domains, fields . 239 16.8 Pre-orders and partial orders . 240 16.9 Vector spaces and linear maps . 241 16.10 Functors on sets . 241 16.11 On-line Encyclopedia of Integer Sequences . 242 6 Draft d.d. 8 July 2018 Chapter 1 Introduction So you heard about coalgebra, and maybe you want to know more. Or you know about coalgebra, and maybe you want to hear more still, or you just want to see how things are done here. This is what we will do. 1.1 The method of coalgebra In Chapters 2 { 5, we will briefly sketch our view on the coalgebraic method. The notion of coalgebra arises as the dual, in the theory of categories, of the notion of algebra. So this is what we explain first, in Chapters 2 and 3. Then coalgebras come to life and become relevant, only after one dualises also the notions of congruence relation and induction, two of the essential ingredients of the theory of algebras. This yields the notions of bisimulation and coinduction, explained in Chapter 4. With this in place, we summarise, in Chapter 5, the method of coalgebra as a general formalism for the study of the behaviour { typically infinite, stemming from some form of circularity { of state-based, dynamical systems. 1.2 History, roughly and briefly In the late 1970s, coalgebras occur as the dual of algebras in the work of Arbib and Manes, in their category theoretic approach to dynamical systems and automata [AM75, AM82]. Their textbook [MA86] already presents automata as coalgebras and contains an early proof that the set of formal languages is a final coalgebra (Theorem 152 in Chapter 8 of the present book). Still nothing much happens with coalgebra until (i) Park and Milner invent bisimulation as a notion of behavioural equivalence for concurrent processes [Mil80, Par81, Mil89]; and (ii) Aczel needs a notion of strong extensionality for his theory of non-well-founded sets [Acz88]. To this end, Aczel and Mendler generalise Park and Milner's notion of bisimulation to the level of arbitrary coalgebras [AM89]. With this new notion of coalgebraic bisimulation, it becomes obvious how to formulate a general notion of coinduction for arbitrary coalgebras. And as a consequence, coalgebra becomes a lively field of research from the early 1990s onwards. 7 8 Draft d.d. 8 July 2018 It follows from the above that the foundations of coalgebra consist of a mix of ingredi- ents from mathematics (dynamical systems, category theory), computer science (automata theory, concurrency theory), and logic (axiomatic set theory). The above suggests further that coinduction is the reason why coalgebra might be interesting. 1.3 Exercises in coinduction Each of Chapters 6 - 14 deals with a concrete type of coalgebra. These coalgebras include many familiar mathematical structures, such as dynamical systems, streams (infinite se- quences), and automata. These mathematical structures themselves are the main subject of these chapters, but methodologically, each chapter offers a playground for exercises in coinduction: the coalgebraic method for definitions and proofs. 1.4 Enhanced coinduction: algebra and coalgebra com- bined In the algebraic approach to the analysis of computational behaviour, one uses algebraic operators to represent the structure at hand as a composition of substructures. In this manner, behavioural complexity is reduced to the composition of the smaller complexities of the substructures, a phenomenon sometimes referred to as divide and conquer. In the coalgebraic approach, complexity is typically reduced by exploiting circularity, by observing that after a number of transition steps, essentially the same situation occurs again. As we shall see, the combination of algebra and coalgebra leads to powerful computational proof methods, typically referred to as enhanced coinduction or coinduction up-to, where one constructs bisimulation relations up-to the closure under a given set of algebraic operators. We will present various concrete instances of bisimulation and coinduction up-to. For more general accounts, see the references in Section 15.5. 1.5 Universal coalgebra The classical field of universal algebra deals with general properties of algebras. In universal coalgebra, one studies general properties of coalgebras, and Chapter 15 gives the reader a quick impression of this subject. The present book is about exercises in coinduction with concrete coalgebras. Generality is not our aim here, and so we refer the reader to the literature for systematic treatments of universal coalgebra. 1.6 How to read this book For most of this book, very little background in mathematics is required. The brief sketch of the coalgebraic method in Chapters 2 { 5 may be too technical for some readers but Chapter 1. Introduction 9 then again,.
Recommended publications
  • Formal Power Series - Wikipedia, the Free Encyclopedia
    Formal power series - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Formal_power_series Formal power series From Wikipedia, the free encyclopedia In mathematics, formal power series are a generalization of polynomials as formal objects, where the number of terms is allowed to be infinite; this implies giving up the possibility to substitute arbitrary values for indeterminates. This perspective contrasts with that of power series, whose variables designate numerical values, and which series therefore only have a definite value if convergence can be established. Formal power series are often used merely to represent the whole collection of their coefficients. In combinatorics, they provide representations of numerical sequences and of multisets, and for instance allow giving concise expressions for recursively defined sequences regardless of whether the recursion can be explicitly solved; this is known as the method of generating functions. Contents 1 Introduction 2 The ring of formal power series 2.1 Definition of the formal power series ring 2.1.1 Ring structure 2.1.2 Topological structure 2.1.3 Alternative topologies 2.2 Universal property 3 Operations on formal power series 3.1 Multiplying series 3.2 Power series raised to powers 3.3 Inverting series 3.4 Dividing series 3.5 Extracting coefficients 3.6 Composition of series 3.6.1 Example 3.7 Composition inverse 3.8 Formal differentiation of series 4 Properties 4.1 Algebraic properties of the formal power series ring 4.2 Topological properties of the formal power series
    [Show full text]
  • NICOLAS WU Department of Computer Science, University of Bristol (E-Mail: [email protected], [email protected])
    Hinze, R., & Wu, N. (2016). Unifying Structured Recursion Schemes. Journal of Functional Programming, 26, [e1]. https://doi.org/10.1017/S0956796815000258 Peer reviewed version Link to published version (if available): 10.1017/S0956796815000258 Link to publication record in Explore Bristol Research PDF-document University of Bristol - Explore Bristol Research General rights This document is made available in accordance with publisher policies. Please cite only the published version using the reference above. Full terms of use are available: http://www.bristol.ac.uk/red/research-policy/pure/user-guides/ebr-terms/ ZU064-05-FPR URS 15 September 2015 9:20 Under consideration for publication in J. Functional Programming 1 Unifying Structured Recursion Schemes An Extended Study RALF HINZE Department of Computer Science, University of Oxford NICOLAS WU Department of Computer Science, University of Bristol (e-mail: [email protected], [email protected]) Abstract Folds and unfolds have been understood as fundamental building blocks for total programming, and have been extended to form an entire zoo of specialised structured recursion schemes. A great number of these schemes were unified by the introduction of adjoint folds, but more exotic beasts such as recursion schemes from comonads proved to be elusive. In this paper, we show how the two canonical derivations of adjunctions from (co)monads yield recursion schemes of significant computational importance: monadic catamorphisms come from the Kleisli construction, and more astonishingly, the elusive recursion schemes from comonads come from the Eilenberg-Moore construction. Thus we demonstrate that adjoint folds are more unifying than previously believed. 1 Introduction Functional programmers have long realised that the full expressive power of recursion is untamable, and so intensive research has been carried out into the identification of an entire zoo of structured recursion schemes that are well-behaved and more amenable to program comprehension and analysis (Meijer et al., 1991).
    [Show full text]
  • Arxiv:1906.03655V2 [Math.AT] 1 Jul 2020
    RATIONAL HOMOTOPY EQUIVALENCES AND SINGULAR CHAINS MANUEL RIVERA, FELIX WIERSTRA, MAHMOUD ZEINALIAN Abstract. Bousfield and Kan’s Q-completion and fiberwise Q-completion of spaces lead to two different approaches to the rational homotopy theory of non-simply connected spaces. In the first approach, a map is a weak equivalence if it induces an isomorphism on rational homology. In the second, a map of path-connected pointed spaces is a weak equivalence if it induces an isomorphism between fun- damental groups and higher rationalized homotopy groups; we call these maps π1-rational homotopy equivalences. In this paper, we compare these two notions and show that π1-rational homotopy equivalences correspond to maps that induce Ω-quasi-isomorphisms on the rational singular chains, i.e. maps that induce a quasi-isomorphism after applying the cobar functor to the dg coassociative coalge- bra of rational singular chains. This implies that both notions of rational homotopy equivalence can be deduced from the rational singular chains by using different alge- braic notions of weak equivalences: quasi-isomorphism and Ω-quasi-isomorphisms. We further show that, in the second approach, there are no dg coalgebra models of the chains that are both strictly cocommutative and coassociative. 1. Introduction One of the questions that gave birth to rational homotopy theory is the commuta- tive cochains problem which, given a commutative ring k, asks whether there exists a commutative differential graded (dg) associative k-algebra functorially associated to any topological space that is weakly equivalent to the dg associative algebra of singu- lar k-cochains on the space with the cup product [S77], [Q69].
    [Show full text]
  • 5. Polynomial Rings Let R Be a Commutative Ring. a Polynomial of Degree N in an Indeterminate (Or Variable) X with Coefficients
    5. polynomial rings Let R be a commutative ring. A polynomial of degree n in an indeterminate (or variable) x with coefficients in R is an expression of the form f = f(x)=a + a x + + a xn, 0 1 ··· n where a0, ,an R and an =0.Wesaythata0, ,an are the coefficients of f and n ··· ∈ ̸ ··· that anx is the highest degree term of f. A polynomial is determined by its coeffiecients. m i n i Two polynomials f = i=0 aix and g = i=1 bix are equal if m = n and ai = bi for i =0, 1, ,n. ! ! Degree··· of a polynomial is a non-negative integer. The polynomials of degree zero are just the elements of R, these are called constant polynomials, or simply constants. Let R[x] denote the set of all polynomials in the variable x with coefficients in R. The addition and 2 multiplication of polynomials are defined in the usual manner: If f(x)=a0 + a1x + a2x + a x3 + and g(x)=b + b x + b x2 + b x3 + are two elements of R[x], then their sum is 3 ··· 0 1 2 3 ··· f(x)+g(x)=(a + b )+(a + b )x +(a + b )x2 +(a + b )x3 + 0 0 1 1 2 2 3 3 ··· and their product is defined by f(x) g(x)=a b +(a b + a b )x +(a b + a b + a b )x2 +(a b + a b + a b + a b )x3 + · 0 0 0 1 1 0 0 2 1 1 2 0 0 3 1 2 2 1 3 0 ··· Let 1 denote the constant polynomial 1 and 0 denote the constant polynomial zero.
    [Show full text]
  • Practical Coinduction
    Math. Struct. in Comp. Science: page 1 of 21. c Cambridge University Press 2016 doi:10.1017/S0960129515000493 Practical coinduction DEXTER KOZEN† and ALEXANDRA SILVA‡ †Computer Science, Cornell University, Ithaca, New York 14853-7501, U.S.A. Email: [email protected] ‡Intelligent Systems, Radboud University Nijmegen, Postbus 9010, 6500 GL Nijmegen, the Netherlands Email: [email protected] Received 6 March 2013; revised 17 October 2014 Induction is a well-established proof principle that is taught in most undergraduate programs in mathematics and computer science. In computer science, it is used primarily to reason about inductively defined datatypes such as finite lists, finite trees and the natural numbers. Coinduction is the dual principle that can be used to reason about coinductive datatypes such as infinite streams or trees, but it is not as widespread or as well understood. In this paper, we illustrate through several examples the use of coinduction in informal mathematical arguments. Our aim is to promote the principle as a useful tool for the working mathematician and to bring it to a level of familiarity on par with induction. We show that coinduction is not only about bisimilarity and equality of behaviors, but also applicable to a variety of functions and relations defined on coinductive datatypes. 1. Introduction Perhaps the single most important general proof principle in computer science, and argu- ably in all of mathematics, is induction. There is a valid induction principle corresponding to any well-founded relation, but in computer science, it is most often seen in the form known as structural induction, in which the domain of discourse is an inductively-defined datatype such as finite lists, finite trees, or the natural numbers.
    [Show full text]
  • Formal Power Series Rings, Inverse Limits, and I-Adic Completions of Rings
    Formal power series rings, inverse limits, and I-adic completions of rings Formal semigroup rings and formal power series rings We next want to explore the notion of a (formal) power series ring in finitely many variables over a ring R, and show that it is Noetherian when R is. But we begin with a definition in much greater generality. Let S be a commutative semigroup (which will have identity 1S = 1) written multi- plicatively. The semigroup ring of S with coefficients in R may be thought of as the free R-module with basis S, with multiplication defined by the rule h k X X 0 0 X X 0 ( risi)( rjsj) = ( rirj)s: i=1 j=1 s2S 0 sisj =s We next want to construct a much larger ring in which infinite sums of multiples of elements of S are allowed. In order to insure that multiplication is well-defined, from now on we assume that S has the following additional property: (#) For all s 2 S, f(s1; s2) 2 S × S : s1s2 = sg is finite. Thus, each element of S has only finitely many factorizations as a product of two k1 kn elements. For example, we may take S to be the set of all monomials fx1 ··· xn : n (k1; : : : ; kn) 2 N g in n variables. For this chocie of S, the usual semigroup ring R[S] may be identified with the polynomial ring R[x1; : : : ; xn] in n indeterminates over R. We next construct a formal semigroup ring denoted R[[S]]: we may think of this ring formally as consisting of all functions from S to R, but we shall indicate elements of the P ring notationally as (possibly infinite) formal sums s2S rss, where the function corre- sponding to this formal sum maps s to rs for all s 2 S.
    [Show full text]
  • The Continuum As a Final Coalgebra
    Theoretical Computer Science 280 (2002) 105–122 www.elsevier.com/locate/tcs The continuum as a ÿnal coalgebra D. PavloviÃca, V. Prattb; ∗ aKestrel Institute, Palo Alto, CA, USA bDepartment of Computer Science, Stanford University, Stanford, CA 94305-9045, USA Abstract We deÿne the continuum up to order isomorphism, and hence up to homeomorphism via the order topology, in terms of the ÿnal coalgebra of either the functor N ×X , product with the set of natural numbers, or the functor 1+N ×X . This makes an attractive analogy with the deÿnition of N itself as the initial algebra of the functor 1 + X , disjoint union with a singleton. We similarly specify Baire space and Cantor space in terms of these ÿnal coalgebras. We identify two variants of this approach, a coinductive deÿnition based on ÿnal coalgebraic structure in the category of sets, and a direct deÿnition as a ÿnal coalgebra in the category of posets. We conclude with some paradoxical discrepancies between continuity and constructiveness in this setting. c 2002 Elsevier Science B.V. All rights reserved. 1. Introduction The algebra (N; 0;s) of non-negative integers under successor s with constant 0, the basic number system of mathematics, occupies a distinguished position in the category of algebras having a unary operation and a constant, namely as its initial object. In this paper we show that the continuum, the basic environment of physics, occu- pies an equally distinguished position in the category of coalgebras having one “dual operation” of arity N, namely as its ÿnal object. Here a dual operation is understood as a function X → X + X + ··· dual to an operation as a function X × X ×···X , with arity being the number of copies of X in each case.
    [Show full text]
  • Arxiv:1907.08255V2 [Math.RA] 26 Aug 2020 Olers Eso Htte R Pitn of Splitting Are They That Show We Coalgebras
    COHOMOLOGY AND DEFORMATIONS OF DENDRIFORM COALGEBRAS APURBA DAS Abstract. Dendriform coalgebras are the dual notion of dendriform algebras and are splitting of as- sociative coalgebras. In this paper, we define a cohomology theory for dendriform coalgebras based on some combinatorial maps. We show that the cohomology with self coefficients governs the formal defor- mation of the structure. We also relate this cohomology with the cohomology of dendriform algebras, coHochschild (Cartier) cohomology of associative coalgebras and cohomology of Rota-Baxter coalgebras which we introduce in this paper. Finally, using those combinatorial maps, we introduce homotopy analogue of dendriform coalgebras and study some of their properties. 1. Introduction Dendriform algebras were first introduced by Jean-Louis Loday in his study on periodicity phe- nomenons in algebraic K-theory [13]. These algebras are Koszul dual to diassociative algebras (also called associative dialgebras). More precisely, a dendriform algebra is a vector space equipped with two binary operations satisfying three new identities. The sum of the two operations turns out to be associa- tive. Thus, a dendriform algebra can be thought of like a splitting of associative algebras. Dendriform algebras are closely related to Rota-Baxter algebras [1,8]. Recently, the present author defines a coho- mology and deformation theory for dendriform algebras [3]. See [6–8,17] and references therein for more literature about dendriform algebras. The dual picture of dendriform algebras is given by dendriform coalgebras. It is given by two coproducts on a vector space satisfying three identities (dual to dendriform algebra identities), and the sum of the two coproducts makes the underlying vector space into an associative coalgebra.
    [Show full text]
  • NEW TRENDS in SYZYGIES: 18W5133
    NEW TRENDS IN SYZYGIES: 18w5133 Giulio Caviglia (Purdue University, Jason McCullough (Iowa State University) June 24, 2018 – June 29, 2018 1 Overview of the Field Since the pioneering work of David Hilbert in the 1890s, syzygies have been a central area of research in commutative algebra. The idea is to approximate arbitrary modules by free modules. Let R be a Noetherian, commutative ring and let M be a finitely generated R-module. A free resolution is an exact sequence of free ∼ R-modules ···! Fi+1 ! Fi !··· F0 such that H0(F•) = M. Elements of Fi are called ith syzygies of M. When R is local or graded, we can choose a minimal free resolution of M, meaning that a basis for Fi is mapped onto a minimal set of generators of Ker(Fi−1 ! Fi−2). In this case, we get uniqueness of minimal free resolutions up to isomorphism of complexes. Therefore, invariants defined by minimal free resolutions yield invariants of the module being resolved. In most cases, minimal resolutions are infinite, but over regular rings, like polynomial and power series rings, all finitely generated modules have finite minimal free resolutions. Beyond the study of invariants of modules, syzygies have connections to algebraic geometry, algebraic topology, and combinatorics. Statements like the Total Rank Conjecture connect algebraic topology with free resolutions. Bounds on Castelnuovo-Mumford regularity and projective dimension, as with the Eisenbud- Goto Conjecture and Stillman’s Conjecture, have implications for the computational complexity of Grobner¨ bases and computational algebra systems. Green’s Conjecture provides a link between graded free resolutions and the geometry of canonical curves.
    [Show full text]
  • Coalgebras from Formulas
    Coalgebras from Formulas Serban Raianu California State University Dominguez Hills Department of Mathematics 1000 E Victoria St Carson, CA 90747 e-mail:[email protected] Abstract Nichols and Sweedler showed in [5] that generic formulas for sums may be used for producing examples of coalgebras. We adopt a slightly different point of view, and show that the reason why all these constructions work is the presence of certain representative functions on some (semi)group. In particular, the indeterminate in a polynomial ring is a primitive element because the identity function is representative. Introduction The title of this note is borrowed from the title of the second section of [5]. There it is explained how each generic addition formula naturally gives a formula for the action of the comultiplication in a coalgebra. Among the examples chosen in [5], this situation is probably best illus- trated by the following two: Let C be a k-space with basis {s, c}. We define ∆ : C −→ C ⊗ C and ε : C −→ k by ∆(s) = s ⊗ c + c ⊗ s ∆(c) = c ⊗ c − s ⊗ s ε(s) = 0 ε(c) = 1. 1 Then (C, ∆, ε) is a coalgebra called the trigonometric coalgebra. Now let H be a k-vector space with basis {cm | m ∈ N}. Then H is a coalgebra with comultiplication ∆ and counit ε defined by X ∆(cm) = ci ⊗ cm−i, ε(cm) = δ0,m. i=0,m This coalgebra is called the divided power coalgebra. Identifying the “formulas” in the above examples is not hard: the for- mulas for sin and cos applied to a sum in the first example, and the binomial formula in the second one.
    [Show full text]
  • Friends with Benefits: Implementing Corecursion in Foundational
    Friends with Benefits Implementing Corecursion in Foundational Proof Assistants Jasmin Christian Blanchette1;2, Aymeric Bouzy3, Andreas Lochbihler4, Andrei Popescu5;6, and Dmitriy Traytel4 1 Vrije Universiteit Amsterdam, the Netherlands 2 Inria Nancy – Grand Est, Nancy, France 3 Laboratoire d’informatique, École polytechnique, Palaiseau, France 4 Institute of Information Security, Department of Computer Science, ETH Zürich, Switzerland 5 Department of Computer Science, Middlesex University London, UK 6 Institute of Mathematics Simion Stoilow of the Romanian Academy, Bucharest, Romania Abstract. We introduce AmiCo, a tool that extends a proof assistant, Isabelle/ HOL, with flexible function definitions well beyond primitive corecursion. All definitions are certified by the assistant’s inference kernel to guard against in- consistencies. A central notion is that of friends: functions that preserve the pro- ductivity of their arguments and that are allowed in corecursive call contexts. As new friends are registered, corecursion benefits by becoming more expressive. We describe this process and its implementation, from the user’s specification to the synthesis of a higher-order definition to the registration of a friend. We show some substantial case studies where our approach makes a difference. 1 Introduction Codatatypes and corecursion are emerging as a major methodology for programming with infinite objects. Unlike in traditional lazy functional programming, codatatypes support total (co)programming [1, 8, 30, 68], where the defined functions have a simple set-theoretic semantics and productivity is guaranteed. The proof assistants Agda [19], Coq [12], and Matita [7] have been supporting this methodology for years. By contrast, proof assistants based on higher-order logic (HOL), such as HOL4 [64], HOL Light [32], and Isabelle/HOL [56], have traditionally provided only datatypes.
    [Show full text]
  • Math 476 - Abstract Algebra 1 Day 33 Group Assignment Name
    Math 476 - Abstract Algebra 1 Day 33 Group Assignment Name: Polynomial Rings n n−1 Definition 11.2 Let R be a commutative ring. A polynomial in x over R is an expression of the form: anx +an−1x + 2 1 0 ··· + a2x + a1x + a0x , where n is a non-negative integer, and an,an−1, ··· ,a2,a1,a0 are elements of R. The set of all polynomials over the ring R will be denoted by R[x]. We will generally assume that an =6 0. • The symbol x is called an indeterminate. It is to be regarded as a formal symbol and not as an element of the ring 0 1 2 n R. In effect, the symbols x ,x ,x , ··· ,x serve as placeholders alongside the ring elements a0,a1, ··· ,an. k • The expressions akx are called the terms of the polynomial. The elements a0,a1, ··· ,an in the ring R are called k the coefficients of the polynomial p(x). We call ak the coefficient of x in the representation of p(x). • When working with a polynomial, instead of writing x1, we simply write x. In addition, we usually do not write x0 and 0 we will write a0x simply as a0 (does this make sense when R does not have an element 1R?). Using these conventions, n n−1 2 we can write p(x) in the form p(x) = anx + an−1x + ··· + a2x + a1x + a0, where n is a non-negative integer, an,an−1, ··· ,a2,a1,a0 are elements of R, and an =6 0.
    [Show full text]