374,879 research outputs found
Foundations for structured programming with GADTs
GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools — analogous to the well-known and widely-used ones for algebraic and nested data types — for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higher-order functor so that GADTs can be seen as carriers of initial algebras of higher-order functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simpler-but-equivalent ones for which initial algebra semantics can be derive
Recommended from our members
Cubical Models of Homotopy Type Theory - An Internal Approach
This thesis presents an account of the cubical sets model of homotopy type theory using an internal type theory for elementary topoi.
Homotopy type theory is a variant of Martin-Lof type theory where we think of types as spaces, with terms as points in the space and elements of the identity type as paths. We actualise this intuition by extending type theory with Voevodsky's univalence axiom which identifies equalities between types with homotopy equivalences between spaces.
Voevodsky showed the univalence axiom to be consistent by giving a model of homotopy type theory in the category of Kan simplicial sets in a paper with Kapulkin and Lumsdaine. However, this construction makes fundamental use of classical logic in order to show certain results. Therefore this model cannot be used to explain the computational content of the univalence axiom, such as how to compute terms involving univalence.
This problem was resolved by Cohen, Coquand, Huber and Mortberg, who presented a new model of type theory in Kan cubical sets which validated the univalence axiom using a constructive metatheory. This meant that the model provided an understanding of the computational content of univalence. In fact, the authors present a new type theory, cubical type theory, where univalence is provable using a new "glueing" type former. This type former comes with appropriate definitional equalities which explain how the univalence axiom should compute. In particular, Huber proved that any term of natural number type constructed in this new type theory must reduce to a numeral.
This thesis explores models of type theory based on the cubical sets model of Cohen et al. It gives an account of this model using the internal language of toposes, where we present a series of axioms which are sufficient to construct a model of cubical type theory, and hence a model of homotopy type theory. This approach therefore generalises the original model and gives a new and useful method for analysing models of type theory.
We also discuss an alternative derivation of the univalence axiom and show how this leads to a potentially simpler proof of univalence in any model satisfying the axioms mentioned above, such as cubical sets.
Finally, we discuss some shortcomings of the internal language approach with respect to constructing univalent universes. We overcome these difficulties by extending the internal language with an appropriate modality in order to manipulate global elements of an object.UK EPSRC PhD studentship, funded by grants EP/L504920/1, EP/M506485/1
Foundations For Structured Programming With GADTs
GADTs are at the cutting edge of functional programming and be-come more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools —analogous to the well-known and widely-used ones for algebraic and nested data types — for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quanti?cation. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a met theoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higher-order functor so that GADTs can be seen as carriers of initial algebras of higher-order functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simpler-but-equivalent ones for which initial algebra semantics can be derived
Perspectives for proof unwinding by programming languages techniques
In this chapter, we propose some future directions of work, potentially
beneficial to Mathematics and its foundations, based on the recent import of
methodology from the theory of programming languages into proof theory. This
scientific essay, written for the audience of proof theorists as well as the
working mathematician, is not a survey of the field, but rather a personal view
of the author who hopes that it may inspire future and fellow researchers
On Constructive Axiomatic Method
In this last version of the paper one may find a critical overview of some
recent philosophical literature on Axiomatic Method and Genetic Method.Comment: 25 pages, no figure
Computability and analysis: the legacy of Alan Turing
We discuss the legacy of Alan Turing and his impact on computability and
analysis.Comment: 49 page
Constructive Mathematics in Theory and Programming Practice
The first part of the paper introduces the varieties of modern constructive mathematics, concentrating on Bishop’s constructive mathematics(BISH). It gives a sketch of both Myhill’s axiomatic system for BISH and a constructive axiomatic development of the real line R. The second part of the paper focuses on the relation between constructive mathematics and programming, with emphasis on Martin-Lof’s theory of types as a formal system for BISH
Two kinds of procedural semantics for privative modification
In this paper we present two kinds of procedural semantics for privative modification. We do this for three reasons. The first reason is to launch a tough test case to gauge the degree of substantial agreement between a constructivist and a realist interpretation of procedural semantics; the second is to extend Martin-L ̈f’s Constructive Type Theory to privative modification, which is characteristic of natural language; the third reason is to sketch a positive characterization of privation
Towards a constructive simplicial model of Univalent Foundations
We provide a partial solution to the problem of defining a constructive
version of Voevodsky's simplicial model of univalent foundations. For this, we
prove constructive counterparts of the necessary results of simplicial homotopy
theory, building on the constructive version of the Kan-Quillen model structure
established by the second-named author. In particular, we show that dependent
products along fibrations with cofibrant domains preserve fibrations, establish
the weak equivalence extension property for weak equivalences between
fibrations with cofibrant domain and define a univalent classifying fibration
for small fibrations between bifibrant objects. These results allow us to
define a comprehension category supporting identity types, -types,
-types and a univalent universe, leaving only a coherence question to be
addressed.Comment: v3: changed the definition of the type Weq(U) of weak equivalences to
fix a problem with constructivity. Other Minor changes. 31 page
- …