## Universes for Generic Programs and Proofs in Dependent Type Theory (2003)

### Cached

### Download Links

- [www.cs.chalmers.se]
- [www.cs.chalmers.se]
- DBLP

### Other Repositories/Bibliography

Venue: | Nordic Journal of Computing |

Citations: | 43 - 2 self |

### BibTeX

@ARTICLE{Benke03universesfor,

author = {Marcin Benke and Peter Dybjer and Patrik Jansson},

title = {Universes for Generic Programs and Proofs in Dependent Type Theory},

journal = {Nordic Journal of Computing},

year = {2003},

volume = {10},

pages = {2003}

}

### Years of Citing Articles

### OpenURL

### Abstract

We show how to write generic programs and proofs in MartinL of type theory. To this end we consider several extensions of MartinL of's logical framework for dependent types. Each extension has a universes of codes (signatures) for inductively defined sets with generic formation, introduction, elimination, and equality rules. These extensions are modeled on Dybjer and Setzer's finitely axiomatized theories of inductive-recursive definitions, which also have a universe of codes for sets, and generic formation, introduction, elimination, and equality rules.

### Citations

348 |
Intuitionistic type theory
- Martin-Löf
- 1984
(Show Context)
Citation Context ...ir constructors (introduction rules). Furthermore, for each set A : Set, there is the type El A of its elements. We follow the usual convention and just write A for El A (as in universes à la Russell=-= [ML84]-=-). Set is also closed under dependent functions, dependent products, units, and sums. El commutes with all these constructions and we will therefore use the same notation for them on the set level as ... |

281 |
An initial algebra approach to the specification, correctness, and implementation of abstract data types
- Goguen, Thatcher, et al.
- 1978
(Show Context)
Citation Context ...equality rules for Nat and Sig. 2.1 Generic formation, introduction, elimination, and equality rules These rules are best understood by recalling the initial algebra semantics of the term algebras TΣ=-= [GTW78]. Cate-=-gorically, if F is an endofunctor (sometimes called the “pattern functor”) on a category then an F -algebra with carrier X is an arrow F X f ✲ X Initial algebra semantics of term algebras over a... |

221 | Cayenne — a language with dependent types
- Augustsson
- 1998
(Show Context)
Citation Context ...at the techniques of generic programming can profitably be expressed in dependently typed languages such as Martin-Löf type theory, the Calculus of Constructions, and the programming language Cayenne=-= [Aug98]. Co-=-mbining dependent types with the idea of generic programming we can capture a class of datatypes as a universe — a set of codes and an interpretation function — and generic functions become functi... |

176 | PolyP — a polytypic programming language extension
- Jansson, Jeuring
- 1997
(Show Context)
Citation Context ... T : Sig → (Set → Set) The universe of parameterized term algebras is the introduced by Pfeifer & Rueß [PR99], and if we also add iterated induction we obtain the case considered in Jansson & Jeu=-=ring [JJ97]-=-. Parameterized term algebras are term algebras which depend on one or several parameter types. We consider here the case of one parameter for simplicity. Examples of parameterized term algebras are t... |

107 |
Universal Algebra
- Grätzer
- 1979
(Show Context)
Citation Context ...onsider a notion of one-sorted algebras which allows infinitary operations, by changing the notion of a signature from a list of natural numbers to a list of sets. (Grätzer’s book “Universal Alge=-=bra” [Grä79]-=- is in fact about universal algebras with infinitary operations, although working in classical set theory, his arities are possibly infinite ordinal numbers.) So we let 1 Sig = [Set] : Type and modify... |

93 | Polytypic programming - Jeuring, Jansson - 1996 |

67 | Generic Haskell: Practice and theory
- Hinze, Jeuring
(Show Context)
Citation Context ...+ 91] (Squiggol), by Bird et al. [BdMH96] (generic functional programming), by Jay [Jay95,Jay01] (shape polymorphism), by Jansson & Jeuring [JJ97,Jan00] (polytypic programming) and by Hinze & Jeuring =-=[HJ]-=- (Generic Haskell). A basic example of a dependent types is the type of vectors (lists) Vect n, which depends on the length n of the vector. With dependent types we can alsoscapture more complex invar... |

62 | A semantics of shape - Jay - 1995 |

55 | Generic programming within dependently typed programming
- Altenkirch, McBride
(Show Context)
Citation Context ...e more directly expressed using dependent types. Combining dependent types and generic programming. The research on this topic goes in two different directions. On the one hand Altenkirch and McBride =-=[AM02]-=- and Norell [Nor02] show how to encode Generic Haskell-style programming using dependent types. Here the setting is that of general recursive functional programming where the class of recursive dataty... |

46 |
Automatic synthesis of typed Λprograms on term algebras. Theoretical Computer Science 39:135–154
- Böhm, Berarducci
- 1985
(Show Context)
Citation Context ...y as changing a parameter), and they are therefore well suited for building libraries of programs, theorems and proofs. This research area has been explored under different names by Böhm & Berarducci=-= [BB85]-=- (universal algebra) by Backhouse et al. [B + 91] (Squiggol), by Bird et al. [BdMH96] (generic functional programming), by Jay [Jay95,Jay01] (shape polymorphism), by Jansson & Jeuring [JJ97,Jan00] (po... |

44 | Indexed induction-recursion
- Dybjer, Setzer
(Show Context)
Citation Context ... which can swallow all of the previous theories. For this purpose we could use the the theory of indexed inductive-recursive definitions IIR ext (with extensional equality) given by Dybjer and Setzer =-=[DS01a]-=-. In this theory all of our universes can be defined but to actually work out these embeddings in detail is a task outside the scope of this paper. In fact, since induction-recursion does not play a r... |

44 |
Automatic synthesis of typed #-programs on term algebras
- ohm, Berarducci
- 1985
(Show Context)
Citation Context ...y as changing a parameter), and they are therefore well suited for building libraries of programs, theorems and proofs. This research area has been explored under dierent names by Bohm & Berarducci [B=-=B85]-=- (universal algebra), by Backhouse et al. [B + 91] (Squiggol), by Bird et al. [BdMH96] (generic functional programming), by Jay [Jay95,Jay01] (shape polymorphism), by Jansson & Jeuring [JJ97,Jan00] (p... |

43 | A finite axiomatization of inductive-recursive definitions - Dybjer, Setzer - 1998 |

29 | Induction-recursion and initial algebras - Dybjer, Setzer - 2003 |

22 | A set constructor for inductive sets in Martin-Löf’s type theory - Petersson, Synek - 1989 |

21 |
Inductively defined types, preliminary version
- Coquand, Paulin-Mohring
(Show Context)
Citation Context ...limination rule, which captures proof by induction and definition by primitive (or structural) recursion. To do this we use the following instance of the initial algebra diagram (see Coquand & Paulin =-=[CP90], Dybjer & Setzer [DS99,DS00]): F�-=-�〈id, recΣ C d〉 where FΣTΣ ❄ FΣ((x : TΣ) × C x) f IntroΣ ✲ ✲ TΣ ✲ ∼= (y : FΣ TΣ) × F IH Σ C y ✲ e e(y, z) = (IntroΣ y, d y z) fy = (y, F map Σ C (recΣ C d) y) 〈id, rec... |

15 |
Generic functional programming with types and relations
- Bird, Moor, et al.
- 1996
(Show Context)
Citation Context ...es of programs, theorems and proofs. This research area has been explored under different names by Böhm & Berarducci [BB85] (universal algebra) by Backhouse et al. [B + 91] (Squiggol), by Bird et al.=-= [BdMH96]-=- (generic functional programming), by Jay [Jay95,Jay01] (shape polymorphism), by Jansson & Jeuring [JJ97,Jan00] (polytypic programming) and by Hinze & Jeuring [HJ] (Generic Haskell). A basic example o... |

14 | Abstraction and Computation - Capretta - 2002 |

13 |
PolyLib — a polytypic function library
- Jansson, Jeuring
- 1998
(Show Context)
Citation Context ...dy mentioned, parameterized term algebras, are almost as powerful as the universe used in PolyP [JJ97]. In fact, it is sufficiently close to PolyP that the majority of the polytypic library functions =-=[JJ98]-=- carry over immediately. When we consider a universe with parameterized types, many natural generic definitions share a common pattern: they lift a function from the parameter level to the parameteriz... |

12 |
An initial algebra approach to the speci correctness and implementation of abstract data types
- Goguen, Thatcher, et al.
- 1978
(Show Context)
Citation Context ...ation, and equality rules for Nat and Sig. Generic formation, introduction, elimination, and equality rules. These rules are best understood by recalling initial algebra semantics of term algebras T [=-=GTW78]. Ca-=-tegorically, if F is an endofunctor (sometimes called the \pattern functor") on a category then an F -algebra with carrier X is an arrow F X f - X 5 Let F be the pattern functor associated with a... |

11 | Polytypic proof construction
- Pfeifer, Ruess
- 1999
(Show Context)
Citation Context ... functions over this universe (functions indexed by these codes). In this paper we continue the programme of writing generic programs and proofs in dependent type theory initiated by Pfeifer and Rueß=-= [PR99]-=-. Like them we work in a total dependent type theory and use the Curry-Howard identification of propositions and types for representing logical notions. (Although they work in the impredicative Calcul... |

8 | Universal algebra in type theory
- Capretta
- 1999
(Show Context)
Citation Context ...With Σ A B (A, B) (λx y.Just (x, y)) 13s6 Many-sorted term algebras We shall now consider many-sorted term algebras, giving rise to a simple class of mutually inductive definitions, see also Caprett=-=a [Cap99]-=-. This is the main class of term algebras considered in algebraic specification theory, following the work by the ADJ-group [GTW78]. For simplicity we consider many-sorted algebras with finitely many ... |

8 | Distinguishing data structures and functions: the constructor calculus and functorial types - Jay - 2001 |

7 | Functional generic programming and type theory, 2002. MSc thesis
- Norell
(Show Context)
Citation Context ...pressed using dependent types. Combining dependent types and generic programming. The research on this topic goes in two different directions. On the one hand Altenkirch and McBride [AM02] and Norell =-=[Nor02]-=- show how to encode Generic Haskell-style programming using dependent types. Here the setting is that of general recursive functional programming where the class of recursive datatypes includes for ex... |

7 |
Inductively de types (preliminary version
- Coquand, Paulin
- 1990
(Show Context)
Citation Context ...by induction and denition by primitive (or structural) recursion. To do this we consider the following instance of the initial algebra diagram. Similar constructions can be found in Coquand & Paulin [CP90] and Dybjer & Setzer [DS99,DS03b]. We believe they are essential in practice for doing generic proofs. FT Intro - T F ((x : T ) C x) F hid; rec C di ? = - (y : F T ) F IH T C y e ... |

5 | A.: Induction-recursion and initial algebras. Annales of Pure and Applied Logic 124 - Dybjer, Setzer - 2003 |

4 |
Towards generic programming in type theory”, Presentation at Annual ESPRIT BRA TYPES Meeting, Berg en Dal, [submitted for publication, 2002]. Available via http://www.cs.chalmers.se/ ~marcin/Papers/Notes/nijmegen.ps.gz
- BENKE
(Show Context)
Citation Context ...by only allowing restricted forms of recursion. In this setting we can both write generic programs and write generic proofs of properties of those programs. In fact, experiments of one of the authors =-=[Ben02]-=- show that generic proofs of equality properties, such as equivalence, decidability and substitutivity can be actually simpler than the corresponding non-generic proofs. The present paper continues th... |

3 | A axiomatization of inductive-recursive de - Dybjer, Setzer - 1999 |

3 |
Studies in Mechanical Veri of Mathematical Proofs
- Ruys
- 1999
(Show Context)
Citation Context ...equality can be dened over that universe.) This is the reason why we introduce several smaller subuniverses of inductive types. 24 Universal algebra in dependent type theory. Bayley [Bay98] and Ruys [=-=Ruy99]-=- formalized one-sorted term algebras in dependent type theory. Capretta [Cap99] proposed several ways to formalizing many-sorted term algebras, including using Petersson-Synek trees [PS89] and extendi... |

2 | et al. Relational catamorphisms - Backhouse - 1991 |

2 | Indexed induction-recursion”, long version - DYBJER, SETZER |

1 |
The Machine-Checked Literate Formalisation of Algebra in Type Theory
- Bayley
- 1998
(Show Context)
Citation Context ...g the universe of inductive-recursive definitions is too large. This is the reason why we introduce several smaller subuniverses of inductive types. Universal algebra in dependent type theory. Bayley =-=[Bay98]-=- and Ruys [Ruy99] formalized one-sorted term algebras in dependent type theory. Capretta [Cap99] proposed several ways to formalizing many-sorted term algebras, including using Petersson-Synek trees [... |

1 | Some tools for computer-assisted theorem proving in MartinL of type theory
- Benke
- 2001
(Show Context)
Citation Context ...tting is that of general recursive functional programming where the class of recursive datatypes includes for example nested datatypes. On the other hand the work of Pfeifer and Rueß [PR99] and Benke=-= [Ben01] are-=- about extending the technique of generic programming to “total” type theories such as the Calculus of Construction and the Alfa proof assistant respectively. The idea here is to stay within a log... |

1 | Studies in Mechanical Verification of Mathematical Proofs
- Ruys
- 1999
(Show Context)
Citation Context ... inductive-recursive definitions is too large. This is the reason why we introduce several smaller subuniverses of inductive types. Universal algebra in dependent type theory. Bayley [Bay98] and Ruys =-=[Ruy99]-=- formalized one-sorted term algebras in dependent type theory. Capretta [Cap99] proposed several ways to formalizing many-sorted term algebras, including using Petersson-Synek trees [PS89] and extendi... |