## Containers Constructing Strictly Positive Types

### BibTeX

@MISC{A_containersconstructing,

author = {Michael Abbott A and Thorsten Altenkirch B and Neil Ghani C},

title = {Containers Constructing Strictly Positive Types},

year = {}

}

### OpenURL

### Abstract

with disjoint coproducts and initial algebras of container functors (the categorical analogue of W-types) — and then establish that nested strictly positive inductive and coinductive types, which we call strictly positive types, exist in any Martin-Löf category. Central to our development are the notions of containers and container functors, introduced in Abbott, Altenkirch, and Ghani (2003a). These provide a new conceptual analysis of data structures and polymorphic functions by exploiting dependent type theory as a convenient way to define constructions in Martin-Löf categories. We also show that morphisms between containers can be full and faithfully interpreted as polymorphic functions (i.e. natural transformations) and that, in the presence of W-types, all strictly positive types (including nested inductive and coinductive types) give rise to containers.

### Citations

354 |
Intuitionistic Type Theory
- Martin-Löf
- 1984
(Show Context)
Citation Context ... develop an important idiom in functional programming to support generic editing operations on datatypes (Abbott et al., 2003b, 2004c). We use here the language of extensional Martin-Löf Type Theory (=-=Martin-Löf, 1984-=-) with W-types and a constant inhabiting true �= false (MLW ext , see Aczel, 1999) as the internal language of locally cartesian closed categories with disjoint coproducts and initial algebras of unar... |

202 |
Topos Theory
- JOHNSTONE
- 1977
(Show Context)
Citation Context .... This occurs because the structure of the functor X ↦→ P+∑Q ε ∗ X respects the structure of the initial algebra sup, thereby forcing Posµ to be unique. An example of this occurs in Wraith’s theorem (=-=Johnstone, 1977-=-, theorem 6.19) which treats the special case WSQ = N. The corresponding proof for ν is more intricate because we now have to exploit the initiality of the family MSQ ⊢ PosP,supν . Proposition 5.4 Giv... |

172 |
An intuitionistic theory of types: predicative part, logic colloquium '73 , Rose and Shepherdson (eds
- Martin-Lof
- 1973
(Show Context)
Citation Context ...e work with an extensional type theory where equality in the type theory coincides with equality of morphisms in C. We believe that our development could also be implemented in an intensional system (=-=Martin-Löf, 1974-=-; Nordström et al., 1990) by using setoids (Hofmann, 1997a). We will write Γ,a : A,b : Ba ⊢ C(a,b) or just Γ,A,B ⊢ C as a shorthand for Γ,(a,b) : ∑A B ⊢ C(a,b). For non-dependent Σ-types we write A × ... |

164 | The view from the left - McBride, McKinna |

83 | Categories for Types - Crole - 1993 |

83 | Foncteurs analytiques et especes de structures. Combinatoire Enumerative - Joyal - 1986 |

81 | Monadic presentations of lambda-terms using generalized inductive types
- Altenkirch, Reus
- 1999
(Show Context)
Citation Context ...tly not checked and is a likely cause of unsoundness. Using our construction 4 we can translate the schematic definitions into a fixed core theory whose terms can be easily checked. Nested datatypes (=-=Altenkirch and Reus, 1999-=-; Bird and Paterson, 1999) provide another challenge: to treat them we would need to represent higher order functors. However, it is likely that Martin-Löf categories are still sufficient as a framewo... |

61 | Locally cartesian closed categories and type theory - Seely - 1984 |

51 |
Epigram: Practical programming with dependent types
- McBride
- 2005
(Show Context)
Citation Context ...s, i.e. Martin-Löf categories, are still sufficient to interpret strictly positive families. This has important consequences for the implementation of systems like Epigram (McBride and McKinna, 2004; =-=McBride, 2004-=-) which use schematic inductive definitions. The correctness of the schemes is currently not checked and is a likely cause of unsoundness. Using our construction 4 we can translate the schematic defin... |

47 | Elementary Strong Functional Programming
- Turner
- 1995
(Show Context)
Citation Context ...us forms of trees. When reasoning about functional programs we commonly restrict our view to total functions and view types as sets. David Turner called this elementary strong functional programming (=-=Turner, 1996-=-), though total might have been a better word. Not all recursive types make sense in this view, e.g. we can hardly understand D ∼ = D → D as a set. Moreover, even if we restrict ourselves to well beha... |

42 | Categories of containers
- Abbott, Altenkirch, et al.
- 2003
(Show Context)
Citation Context .... C(inli a) ∼ = ∑a : ∑i∈I Ai. Ca (DC2) ✷ We will need to make some explicit use of the machinery of fibrations, so recall (Bénabou, 1975, 1985; Paré and Schumacher, 1978; Borceux, 1994; Jacobs, 1999; =-=Abbott, 2003-=-) that a (split) fibration 3 E over a category C is given by assigning 3 of Abbott (2003), and is related to the observations in footnotes 1 and 3. 3 More generally a (cloven) fibration is defined by ... |

42 | On the interpretation of type theory in locally cartesian closed categories
- Hofmann
- 1994
(Show Context)
Citation Context ...ed) we may write B instead of Ba, and similarly B( f u) can be written as f ∗ B when u is elided — thus linking the type theoretic notation directly back to the 1 Note that an important technicality (=-=Hofmann, 1994-=-) means that a type A ⊢ B cannot strictly be identified with its display map πB ∈ C/A, instead a single display map may arise from many isomorphic types. However, to avoid excessive pedantry, in the p... |

42 | Syntax and semantics of dependent types
- Hofmann
- 1997
(Show Context)
Citation Context ... type theory coincides with equality of morphisms in C. We believe that our development could also be implemented in an intensional system (Martin-Löf, 1974; Nordström et al., 1990) by using setoids (=-=Hofmann, 1997-=-a). We will write Γ,a : A,b : Ba ⊢ C(a,b) or just Γ,A,B ⊢ C as a shorthand for Γ,(a,b) : ∑A B ⊢ C(a,b). For non-dependent Σ-types we write A × B ≡ ∑A π∗ AB. Local cartesian closed structure on C allow... |

40 | Fibered categories and the foundations of naive category theory - Bénabou - 1985 |

36 | Generalised folds for nested datatypes
- Bird, Paterson
- 1999
(Show Context)
Citation Context ...kely cause of unsoundness. Using our construction 4 we can translate the schematic definitions into a fixed core theory whose terms can be easily checked. Nested datatypes (Altenkirch and Reus, 1999; =-=Bird and Paterson, 1999-=-) provide another challenge: to treat them we would need to represent higher order functors. However, it is likely that Martin-Löf categories are still sufficient as a framework. Another interesting l... |

35 |
Categorical Logic and Type Theory. Number 141
- Jacobs
- 1999
(Show Context)
Citation Context ... ∑ i∈I ∑a : Ai. C(inli a) ∼ = ∑a : ∑i∈I Ai. Ca (DC2) ✷ We will need to make some explicit use of the machinery of fibrations, so recall (Bénabou, 1975, 1985; Paré and Schumacher, 1978; Borceux, 1994; =-=Jacobs, 1999-=-; Abbott, 2003) that a (split) fibration 3 E over a category C is given by assigning 3 of Abbott (2003), and is related to the observations in footnotes 1 and 3. 3 More generally a (cloven) fibration ... |

33 | Constructions, Inductive Types and Strong Normalization - Altenkirch - 1993 |

33 |
Abstract families and the adjoint functor theorem
- Paré, Schumacher
- 1978
(Show Context)
Citation Context ...) i∈I �� � ◦ (inli a) ∼ = Bia (DC1) i∈I Bi ∑ i∈I ∑a : Ai. C(inli a) ∼ = ∑a : ∑i∈I Ai. Ca (DC2) ✷ We will need to make some explicit use of the machinery of fibrations, so recall (Bénabou, 1975, 1985; =-=Paré and Schumacher, 1978-=-; Borceux, 1994; Jacobs, 1999; Abbott, 2003) that a (split) fibration 3 E over a category C is given by assigning 3 of Abbott (2003), and is related to the observations in footnotes 1 and 3. 3 More ge... |

31 |
Handbook of categorical algebra. 2, volume 51 of Encyclopedia of Mathematics and its Applications
- Borceux
- 1994
(Show Context)
Citation Context ...ia (DC1) i∈I Bi ∑ i∈I ∑a : Ai. C(inli a) ∼ = ∑a : ∑i∈I Ai. Ca (DC2) ✷ We will need to make some explicit use of the machinery of fibrations, so recall (Bénabou, 1975, 1985; Paré and Schumacher, 1978; =-=Borceux, 1994-=-; Jacobs, 1999; Abbott, 2003) that a (split) fibration 3 E over a category C is given by assigning 3 of Abbott (2003), and is related to the observations in footnotes 1 and 3. 3 More generally a (clov... |

28 | Wellfounded trees and dependent polynomial functors. available from °±fl±nuQ´fl´µ£µflµu¶·n¸fl¸d¶Qº'» ¸T¶»rºd¶?r´¿flÀrÁnÂflÂ - Gambino, Hyland - 2004 |

24 | Extensional equality in intensional type theory - Altenkirch - 1999 |

23 | On relating type theories and set theories - Aczel - 2000 |

16 | Two applications of analytic functors - Hasegawa |

15 | Representing inductively defined sets by wellorderings in Martin-Löf’s type theory
- Dybjer
- 1997
(Show Context)
Citation Context ...ypes from a constant type K → −. As we will show, non-inductive strictly positive types can be interpreted in any locally cartesian closed category with disjoint coproducts (this already follows from =-=Dybjer, 1997-=-) and (general) strictly positive types can be interpreted in any MartinLöf category. 10s3 Basic Properties of Containers Throughout this section we will take as given a locally cartesian closed categ... |

14 | Constructing polymorphic programs with quotient types - Abbott, Altenkirch, et al. - 2004 |

14 |
Extensional Constructs in Intensional Type Theory. Distinguished Dissertations
- Hofmann
- 1997
(Show Context)
Citation Context ... type theory coincides with equality of morphisms in C. We believe that our development could also be implemented in an intensional system (Martin-Löf, 1974; Nordström et al., 1990) by using setoids (=-=Hofmann, 1997-=-a). We will write Γ,a : A,b : Ba ⊢ C(a,b) or just Γ,A,B ⊢ C as a shorthand for Γ,(a,b) : ∑A B ⊢ C(a,b). For non-dependent Σ-types we write A × B ≡ ∑A π∗ AB. Local cartesian closed structure on C allow... |

13 | Container types categorically - Hoogendijk, Moor - 2000 |

11 | Exponentiable morphisms, partial products and pullback complements - Dyckhoff, Tholen - 1987 |

10 |
The Coq Proof Assistant - A tutorial, Version 8.0
- Huet, Kahn, et al.
- 2004
(Show Context)
Citation Context ... in extensional Type Theory, hence there is no difference between definitional and propositional equality. We believe that our development could also be implemented in an intensional system like COQ (=-=Huet et al., 2004-=-) by using setoids (Hofmann, 1997). For coproducts in the internal language to behave properly, in particular for containers to be closed under products, we require that C have disjoint coproducts: th... |

8 | Derivatives of containers - Abbott, Altenkirch, et al. - 2003 |

8 | A predicative strong normalisation proof for a λ -calculus with interleaving inductive types
- Abel, Altenkirch
- 2000
(Show Context)
Citation Context ...dest and hence would correspond to an object in PER. 2.3 Strictly positive types Strictly positive types can be inductively defined as follows. Definition 2.8 A strictly positive type in n variables (=-=Abel and Altenkirch, 2000-=-) is a type expression (with type variables X1,...,Xn) built up inductively according to the following rules: • if K is a constant type (i.e. one with no type variables) then K is a strictly positive ... |

7 | Representing nested inductive types using W-types - Abbott, Altenkirch, et al. - 2004 |

6 | Wellfounded trees in categories. Annals of Pure and Applied Logic - Moerdijk, Palmgren - 2000 |

5 |
Fibrations petites et localement petites
- Bénabou
- 1975
(Show Context)
Citation Context ...∼ � � = ∑ Bi → C (Cu2) i∈I �� � ◦ (inli a) ∼ = Bia (DC1) i∈I Bi ∑ i∈I ∑a : Ai. C(inli a) ∼ = ∑a : ∑i∈I Ai. Ca (DC2) ✷ We will need to make some explicit use of the machinery of fibrations, so recall (=-=Bénabou, 1975-=-, 1985; Paré and Schumacher, 1978; Borceux, 1994; Jacobs, 1999; Abbott, 2003) that a (split) fibration 3 E over a category C is given by assigning 3 of Abbott (2003), and is related to the observation... |

1 | for data. submitted for publication - Abbott, Altenkirch, et al. - 2004 |

1 | Partial topological products. Transactions of the Moscow - Pasynkov - 1965 |