## Inductive Datatypes with Laws and Subtyping – A Relational Model

Venue: | Faculty of Mathematics and Computing |

Citations: | 4 - 0 self |

### BibTeX

@INPROCEEDINGS{Voermans_inductivedatatypes,

author = {Theodorus Sebastiaan Voermans},

title = {Inductive Datatypes with Laws and Subtyping – A Relational Model },

booktitle = {Faculty of Mathematics and Computing},

year = {},

publisher = {}

}

### OpenURL

### Abstract

### Citations

1332 | Introduction to Functional Programming
- Bird, Wadler
- 1988
(Show Context)
Citation Context ...the Boom-hierarchy The Boom-hierarchy is a hierarchy of types with laws that was first described by Hendrik Boom and later became prominent by its use as the basis types of the BirdMeertens formalism =-=[11, 12, 34, 35]-=-. The types in the Boom-hierarchy are parameterised (we use A for the parameter and B for the carrier) and have three constructors: ffl [] : B !\Gamma \Gamma a ??, constructing an "empty" element. ffl... |

1099 |
Introduction to lattices and order
- Davey, Priestley
- 2002
(Show Context)
Citation Context ... notions about orderings, like partial orders, posets, complete lattices and Galois connections together with some elementary but often used theorems. For more background see e.g. Davey and Priestley =-=[16]-=- or Birkhoff [13]. We start by giving the definition of a poset: Definition 2.7: (Poset) For set A and binary relation _ on A, (A; _) is a poset (partially ordered set) iff for all x; y; z 2 A:s2.2. P... |

408 |
Category Theory for Computing Science
- Barr, Wells
- 1995
(Show Context)
Citation Context ... The definitions that are given here have been copied from Pierce [50] (with some small adaptations in notation) and the reader is referred to this book or other introductions to category theory like =-=[7, 39]-=- for a more extensive introduction to category theory. Only those parts of category theory that are essential for the understanding of the remainder of this thesis are presented here. Category theory ... |

373 |
Types, abstraction, and parametric polymorphism
- Reynolds
- 1983
(Show Context)
Citation Context ...elators and do not "look into" the arguments of these relators. This can be seen more formally in the strong link that exists between naturality properties and polymorphism of functions. See Reynolds =-=[51]-=-, Wadler [58] or De Bruin [14] for more information about this subject. One of the uses of natural transformations is in the construction of relators from other relators: Lemma 6.27:(Subrelators) For ... |

325 |
A Compendium of Continuous Lattices
- Gierz, Hofmann, et al.
- 1980
(Show Context)
Citation Context ...ed as a lower adjoint of the (identity) embedding of transitive specs in the standard spec-lattice. Closure operators that are defined as an upper adjoint of an embedding are sometimes called kernels =-=[28]-=-. The type with equations construction can now be expressed using the F -inductive closure:s152 CHAPTER 9. EQUATIONAL SPECIFICATION OF DATATYPES Lemma 9.11: For per P , P / _F , and F -inductive type ... |

280 |
Regular Algebra and Finite Machines
- Conway
- 1971
(Show Context)
Citation Context ... (re)discoveries of them in the literature. The oldest reference that we know about is by Dilworth [18] where they are called residuals. We use as name for the adjoints the factors as given by Conway =-=[15]-=- and use as notation the division notation from Hoare and He [33], but interchanging the left and right factor notation to make applicability of the cancellation laws easier to spot. The definition be... |

275 |
An initial algebra approach to the specification, correctness, and implementation of abstract data types
- Goguen, Thatcher, et al.
- 1978
(Show Context)
Citation Context ...ular in computing science as a method for describing and defining datatypes and operations on these datatypes. Some examples of the use of category theory for this purpose can be found in for example =-=[23, 24, 31, 42, 49, 55]-=-. This chapter gives a short introduction to some basic notions from category theory, followed by the construction of an interesting category called Difun based on a SPEC-calculus. Then we show how to... |

226 |
Fundamentals of Algebraic Specification 1
- Ehrig, Mahr
- 1985
(Show Context)
Citation Context ...ular in computing science as a method for describing and defining datatypes and operations on these datatypes. Some examples of the use of category theory for this purpose can be found in for example =-=[23, 24, 31, 42, 49, 55]-=-. This chapter gives a short introduction to some basic notions from category theory, followed by the construction of an interesting category called Difun based on a SPEC-calculus. Then we show how to... |

222 |
Categories for the working mathematician, volume 5 of Graduate Texts in Mathematics
- Lane
- 1998
(Show Context)
Citation Context ... The definitions that are given here have been copied from Pierce [50] (with some small adaptations in notation) and the reader is referred to this book or other introductions to category theory like =-=[7, 39]-=- for a more extensive introduction to category theory. Only those parts of category theory that are essential for the understanding of the remainder of this thesis are presented here. Category theory ... |

218 | An introduction to the theory of lists
- Bird
- 1987
(Show Context)
Citation Context ...the Boom-hierarchy The Boom-hierarchy is a hierarchy of types with laws that was first described by Hendrik Boom and later became prominent by its use as the basis types of the BirdMeertens formalism =-=[11, 12, 34, 35]-=-. The types in the Boom-hierarchy are parameterised (we use A for the parameter and B for the carrier) and have three constructors: ffl [] : B !\Gamma \Gamma a ??, constructing an "empty" element. ffl... |

216 |
On the calculus of relations
- Tarski
- 1941
(Show Context)
Citation Context ...tion of the relational calculus is an old subject in mathematics, it having been studied in the 19th century by, most prominently, De Morgan and Schr"oder. More important for us is the work of Tarski =-=[56]-=-. An overview of the history of the relational calculus can be found in Maddux [40]. More recent work is the generalisation of a relational calculus to an allegory (Freyd and ^S^cedrov [26]). Our axio... |

178 |
Basic Category Theory for Computer Scientists
- Pierce
- 1991
(Show Context)
Citation Context ...stigated. 6.1 Short introduction to category theory This section gives a short introduction to some basic concepts of category theory. The definitions that are given here have been copied from Pierce =-=[50]-=- (with some small adaptations in notation) and the reader is referred to this book or other introductions to category theory like [7, 39] for a more extensive introduction to category theory. Only tho... |

97 |
and Order in Algorithmics
- Law
- 1992
(Show Context)
Citation Context ... are many common datatypes that are not free. For example, joinlists have associativity laws on the join operation, and height-balanced trees can not be constructed using arbitrary subtrees. Fokkinga =-=[24]-=- extended Malcolm's theory to datatypes with laws, but was not able to handle restrictions on the construction of elements (subtyping). Other, set-theoretical, theories [43] about inductive datatypes ... |

95 |
Algorithmics –towards programming as a mathematical activity
- Meertens
- 1986
(Show Context)
Citation Context ...onnection properties. The use of Galois connections has also simplified many proofs. ffl Fusion properties. Fusion properties arise from the combination of fixpoints and Galois connections. Elsewhere =-=[9, 41, 44]-=- they have proved to be indispensable in program transformation. Here they have been invaluable in condensing proofs and suggesting proof strategies. ffl Not using complements. This is to some extent ... |

87 |
Algebraic Approaches to Program Semantics
- Manes, Arbib
- 1986
(Show Context)
Citation Context ...ategorical approach to the definition of inductive datatypes, based on the approach sketched in the previous section. A standard method for the construction of an inductive type using category theory =-=[32, 42, 43]-=- is defining it via the category of F -algebras (in fact defining it to be the initial object). This is a categorical statement of the initial algebra approach that can be found, for example, in the w... |

84 |
Algebraic data types and program transformation
- Malcolm
- 1990
(Show Context)
Citation Context ...s, or cons-lists, where the tail of a conslist is another cons-list. A standard mathematical method for reasoning about such datatypes and programs operating with these types was developed by Malcolm =-=[42]-=-. He constructed an elegant generic theory of free inductive datatypes using category theory based on the concepts of functors and initial algebras. By generic we mean parameterised by the shape of th... |

57 |
R.P.: Residuated Lattices
- Ward, Dilworth
- 1939
(Show Context)
Citation Context ...he importance of the adjoints of the sectioned compositions can be seen in the multitude of names and (re)discoveries of them in the literature. The oldest reference that we know about is by Dilworth =-=[18]-=- where they are called residuals. We use as name for the adjoints the factors as given by Conway [15] and use as notation the division notation from Hoare and He [33], but interchanging the left and r... |

56 |
The weakest prespecification
- Hoare, He
- 1986
(Show Context)
Citation Context ...that we know about is by Dilworth [18] where they are called residuals. We use as name for the adjoints the factors as given by Conway [15] and use as notation the division notation from Hoare and He =-=[33]-=-, but interchanging the left and right factor notation to make applicability of the cancellation laws easier to spot. The definition becomes: Definition 3.12:(Factors) For all specs X, Y and Z, the op... |

48 | A typed lambda calculus with categorical type constructors
- Hagino
- 1987
(Show Context)
Citation Context ...ategorical approach to the definition of inductive datatypes, based on the approach sketched in the previous section. A standard method for the construction of an inductive type using category theory =-=[32, 42, 43]-=- is defining it via the category of F -algebras (in fact defining it to be the initial object). This is a categorical statement of the initial algebra approach that can be found, for example, in the w... |

46 |
Relations and Graphs
- Schmidt, Ströhlein
- 1993
(Show Context)
Citation Context ...LATTICES AND GALOIS CONNECTIONS 33 subset S of the universe as relation R. We call this class of specs the left-conditions, predicate lc. This name was suggested by Wim Feijen. Schmidt and Str"ohlein =-=[54]-=- use the name vectors for this class of specs. From the lhs-distribution versions of the above mentioned properties we obtain the class of specs R satisfying R = ?? ffi R, also a method for representi... |

45 |
A type-inference approach to reduction properties and semantics of polymorphic expressions
- Mitchell
- 1986
(Show Context)
Citation Context ...in the SPEC-calculus. Using pers to represent types is a method that is also used in other formalisms like the lambda calculus where pers over the natural numbers are used as a model (see for example =-=[48]-=-). Examples of using pers as types that are more closely related to the use in this thesis can be found in the work of Mili et al [47] and in the work of the Ruby group [38]. An important difference w... |

40 | The origin of relation algebras in the development and axiomatization of the calculus of relations
- Maddux
- 1991
(Show Context)
Citation Context ...udied in the 19th century by, most prominently, De Morgan and Schr"oder. More important for us is the work of Tarski [56]. An overview of the history of the relational calculus can be found in Maddux =-=[40]-=-. More recent work is the generalisation of a relational calculus to an allegory (Freyd and ^S^cedrov [26]). Our axiom set is weaker than the classical axiomatisations because we do not assume the exi... |

38 |
Algebraic implementation of abstract data types
- Ehrig, Kreowski, et al.
- 1982
(Show Context)
Citation Context ...method is an elegant way of introducing laws in a categorical theory of algebra because of its simplicity, avoiding the complications of the more traditional methods using signatures (see for example =-=[22, 57]-=-). A weakness of the transformer method is that there does not seem to be a simple way of generalising the construction method to subtypes like height-balanced trees. There is still an important open ... |

35 |
Homomorphisms and promotability
- Malcolm
- 1989
(Show Context)
Citation Context ...onnection properties. The use of Galois connections has also simplified many proofs. ffl Fusion properties. Fusion properties arise from the combination of fixpoints and Galois connections. Elsewhere =-=[9, 41, 44]-=- they have proved to be indispensable in program transformation. Here they have been invaluable in condensing proofs and suggesting proof strategies. ffl Not using complements. This is to some extent ... |

31 |
O.: Categories, relations and dynamic programming
- Moor
- 1992
(Show Context)
Citation Context ...ular in computing science as a method for describing and defining datatypes and operations on these datatypes. Some examples of the use of category theory for this purpose can be found in for example =-=[23, 24, 31, 42, 49, 55]-=-. This chapter gives a short introduction to some basic notions from category theory, followed by the construction of an interesting category called Difun based on a SPEC-calculus. Then we show how to... |

29 |
der Woude. Relational catamorphisms
- Backhouse, Bruin, et al.
- 1991
(Show Context)
Citation Context ... (Xu)]:?? = (Xt)[:??. 2 A SPEC-calculus satisfying (3.18) is called a complemented SPEC-calculus. Earlier work to which the author contributed assumed a complemented SPEC-calculus (see for example [2]=-=[4]-=-), but this was abandoned because all important results could be achieved without resorting to complements. The discipline of not using complements in proofs often resulted in simpler and easier to un... |

27 | der Woude. Polynomial relators - Backhouse, Bruin, et al. - 1992 |

25 |
der Woude. A relational theory of datatypes. Available via World-Wide Web at http://www.cs.nott.ac.uk/~rcb/MPC/papers
- Backhouse, Voermans, et al.
- 1992
(Show Context)
Citation Context ...s universally over so it has a lower adjoint and we denote that adjoint with a postfix +. Lower adjoints of embedding functions are called closures. An extensive treatment of closures can be found in =-=[1]-=-. The lower adjoint used here defines the transitive closure operation: Definition 4.14:(Transitive closure) The function + (called transitive closure) mapping specs to transitive specs is defined by ... |

23 |
der Woude. A relational theory of datatypes
- Aarts, Backhouse, et al.
- 1992
(Show Context)
Citation Context ...lass of specs is also used in the lhs-distribution version of (4.8b). This class of specs has been given different names in the literature, for example simple by Freyd and ^S^cedrov. Backhouse et al. =-=[3, 4, 2]-=- use the name imp (from implementation) and call the dual concept (see next paragraph) a co-imp . This suggests that one of them is more fundamental than the other one and to avoid this suggestion we ... |

18 |
Reductivity arguments and program construction
- Doornbos
- 1996
(Show Context)
Citation Context ... (8.37) has as advantage over the original specification that solutions always exist, in particular the least solution [[R; o/ []]. The notion of F -reductivity was invented by Doornbos and Backhouse =-=[19, 20, 21]-=- for the investigation of conditions under which (8.37) has at most one solution. Doornbos also describes a notion called F -inductivity in his thesis [19], but this is not the same as our notion. The... |

16 | Induction and recursion on datatypes
- Doornbos, Backhouse
- 1995
(Show Context)
Citation Context ...lution of (8.37): Theorem 8.39:(F -reductivity) For F -reductive spec S we have the following unique extension property: X = R ffi F:X ffi S j X = [[R; S]] 2 The proof of this theorem can be found in =-=[5]-=-. Working with F -reductivity has as advantage that one is no longer restricted to algebras with their functionality for determining whether there exists a unique solution for the equation we are inte... |

14 |
Lattice theory, volume 25 of American Mathematical Society Colloquium Publications
- Birkhoff
- 1979
(Show Context)
Citation Context ...derings, like partial orders, posets, complete lattices and Galois connections together with some elementary but often used theorems. For more background see e.g. Davey and Priestley [16] or Birkhoff =-=[13]-=-. We start by giving the definition of a poset: Definition 2.7: (Poset) For set A and binary relation _ on A, (A; _) is a poset (partially ordered set) iff for all x; y; z 2 A:s2.2. POSETS AND COMPLET... |

11 |
Initial algebra semantics
- Goguen, Thatcher
- 1974
(Show Context)
Citation Context ...the category of F -algebras (in fact defining it to be the initial object). This is a categorical statement of the initial algebra approach that can be found, for example, in the work of Goguen et al =-=[29, 30]-=-. Given a category C with an endofunctor F we define the category of F -algebras over C by : Definition 8.1: (F -algebra) The category of F -algebras over C is defined by: ffl Objects: arrows o/ 2 cod... |

10 |
Een methode van programmeren
- Dijkstra, Feijen
- 1984
(Show Context)
Citation Context ... with elementary predicate calculus and set theory. 2.1 Proof format and notation 2.1.1 Proof format The proof format we adopt for this thesis is called "linear proofs" and was designed by Wim Feijen =-=[17]-=-. It consists of formulas connected by transitive relations, with hints why the relation is valid. A typical proof looks like: P \Thetasf Hint why P \ThetasQ g Q \Thetasf Hint why Q \ThetasR g R Here ... |

9 | Relational) Programming laws in the Boom hierarchy of types
- Hoogendijk
- 1992
(Show Context)
Citation Context ...the Boom-hierarchy The Boom-hierarchy is a hierarchy of types with laws that was first described by Hendrik Boom and later became prominent by its use as the basis types of the BirdMeertens formalism =-=[11, 12, 34, 35]-=-. The types in the Boom-hierarchy are parameterised (we use A for the parameter and B for the carrier) and have three constructors: ffl [] : B !\Gamma \Gamma a ??, constructing an "empty" element. ffl... |

8 |
R.C.: Relational programming laws in the tree, list, bag, set hierarchy
- Hoogendijk, Backhouse
- 1994
(Show Context)
Citation Context |

5 |
Naturalness of polymorphism
- Bruin
- 1989
(Show Context)
Citation Context ... the arguments of these relators. This can be seen more formally in the strong link that exists between naturality properties and polymorphism of functions. See Reynolds [51], Wadler [58] or De Bruin =-=[14]-=- for more information about this subject. One of the uses of natural transformations is in the construction of relators from other relators: Lemma 6.27:(Subrelators) For a difunctional spec fl : F !:,... |

5 |
Abstract data-types as initial algebras and correctness of data representations
- Goguen, Thatcher, et al.
- 1975
(Show Context)
Citation Context ...the category of F -algebras (in fact defining it to be the initial object). This is a categorical statement of the initial algebra approach that can be found, for example, in the work of Goguen et al =-=[29, 30]-=-. Given a category C with an endofunctor F we define the category of F -algebras over C by : Definition 8.1: (F -algebra) The category of F -algebras over C is defined by: ffl Objects: arrows o/ 2 cod... |

4 |
Regular Relations and Bicartesian Squares
- Banach
- 1994
(Show Context)
Citation Context ...e all examples of specs that satisfy the condition above. The class as a whole is known under several different names in the literature: for example pseudoinvertible relations [37], regular relations =-=[6]-=- and difunctional relations [36, 54]. We call this class the difunctional specs or for short the difunctionals: Definition 5.59:(Difunctionality) A spec R is difunctional iff R w R ffi R[ ffi R. 2 Not... |

4 |
Paramorphisms. Formal Aspects of Computing
- Meertens
- 1992
(Show Context)
Citation Context ... for all specs. Several special cases of (8.33) have been studied in the literature. The factorial function cans8.4. OTHER RECURSIVE PROGRAMS 139 be written as an instance of a so-called paramorphism =-=[45]-=-, which is defined as the solution of the equations: X ffi A = X ^ X ffi o/ = R ffi F:(I\Theta X) ffi F:(A4I) This shape of specification corresponds to primitive recursion if o/ is the algebra of the... |

4 |
A note on extensionality
- Rietman
- 1991
(Show Context)
Citation Context ...s minimal. Proofs without extensionality are usually more elegant and only very few interesting properties really rely on extensionality. More about extensionality can be found in the work of Rietman =-=[52]-=- and in the next chapter of this thesis. 3.5 A geometric model The SPEC-calculus is, as already mentioned, not a complete axiomatisation of the set-theoretic relations. Section 3.4.3 already exhibited... |

3 |
and Oege de Moor. Solving optimisation problems with catamorphism
- Bird
- 1992
(Show Context)
Citation Context ...rty) X = ([R]) j X = R ffi F:X ffi _F 2s126 CHAPTER 8. INDUCTIVE TYPES 8.2 F -inductive algebras Working with initial F -algebras gives quite a powerful theory of inductive datatypes, see for example =-=[9]-=- for a demonstration of the development of algorithms using relational catamorphisms, but many real-life inductive datatypes don't fit this framework. The problem is that all constructors constructed ... |

3 |
Fatma Mili. Computer Program Construction
- Mili, Desharnais
- 1994
(Show Context)
Citation Context ...ers over the natural numbers are used as a model (see for example [48]). Examples of using pers as types that are more closely related to the use in this thesis can be found in the work of Mili et al =-=[47]-=- and in the work of the Ruby group [38]. An important difference with these uses of pers is our emphasis on orderings and lattice structures on pers allowing us to define pers (= types) as extreme sol... |

2 |
Mili: Pseudo-invertibility, a Measure of Regularity of Relations. Theoretical Computer Science 19(2
- Jaoua, Durieux, et al.
- 1991
(Show Context)
Citation Context ...ons, pers and squares are all examples of specs that satisfy the condition above. The class as a whole is known under several different names in the literature: for example pseudoinvertible relations =-=[37]-=-, regular relations [6] and difunctional relations [36, 54]. We call this class the difunctional specs or for short the difunctionals: Definition 5.59:(Difunctionality) A spec R is difunctional iff R ... |

1 |
Algorithms from Relational Specifications, chapter 9
- Berghammer, Karger
- 1997
(Show Context)
Citation Context ...ductive datatypes. The relevance of this to practical program development is not discussed here but is evident in many publications. See for example Bird and De Moor [10] or Berghammer and von Karger =-=[8]-=-. Another topic for further research is infinite datatypes, types containing elements that can not be constructed with a finite number of applications of constructors. A typical example of such a data... |

1 | 27] A.J.M. van Gasteren. On the Shape of Mathematical Arguments - Categories - 1990 |

1 |
Difunctional relations: A formal tool for program design. Technical report, Universit'e de Sherbrooke, Facult'e des Sciences, D'epartement de math'ematiques et d'informatique
- Jaoua, Beaudry
- 1989
(Show Context)
Citation Context ...tisfy the condition above. The class as a whole is known under several different names in the literature: for example pseudoinvertible relations [37], regular relations [6] and difunctional relations =-=[36, 54]-=-. We call this class the difunctional specs or for short the difunctionals: Definition 5.59:(Difunctionality) A spec R is difunctional iff R w R ffi R[ ffi R. 2 Note that since we have R ffi R[ ffi R ... |

1 |
Astract Data Conversion
- Verwer
- 1993
(Show Context)
Citation Context ...method is an elegant way of introducing laws in a categorical theory of algebra because of its simplicity, avoiding the complications of the more traditional methods using signatures (see for example =-=[22, 57]-=-). A weakness of the transformer method is that there does not seem to be a simple way of generalising the construction method to subtypes like height-balanced trees. There is still an important open ... |