Results 1 
5 of
5
Modularising inductive families
 In Jaakko Järvi and ShinCheng Mu, editors, Workshop on Generic Programming, WGP’11
, 2011
"... Dependently typed programmers are encouraged to use inductive families to integrate constraints with data construction. Different constraints are used in different contexts, leading to different versions of datatypes for the same data structure. For example, sequences might be constrained by length ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
Dependently typed programmers are encouraged to use inductive families to integrate constraints with data construction. Different constraints are used in different contexts, leading to different versions of datatypes for the same data structure. For example, sequences might be constrained by length or by an ordering on elements, giving rise to different datatypes “vectors ” and “sorted lists ” for the same underlying data structure of sequences. Modular implementation of common operations for these structurally similar datatypes has been a longstanding problem. We propose a datatypegeneric solution, in which we axiomatise a family of isomorphisms between datatypes and their more refined versions as datatype refinements, and show that McBride’s ornaments can be translated into such refinements. With the ornamentinduced refinements, relevant properties of the operations can be separately proven for each constraint, and after the programmer selects several constraints to impose on a basic datatype and synthesises a new datatype incorporating those constraints, the operations can be routinely upgraded to work with the synthesised datatype. 1
A Categorical Semantics for InductiveInductive Definitions
"... Abstract. Inductioninduction is a principle for defining data types in MartinLöf Type Theory. An inductiveinductive definition consists of a set A, together with an Aindexed family B: A Ñ Set, where both A and B are inductively defined in such a way that the constructors for A can refer to B and ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. Inductioninduction is a principle for defining data types in MartinLöf Type Theory. An inductiveinductive definition consists of a set A, together with an Aindexed family B: A Ñ Set, where both A and B are inductively defined in such a way that the constructors for A can refer to B and vice versa. In addition, the constructors for B can refer to the constructors for A. We extend the usual initial algebra semantics for ordinary inductive data types to the inductiveinductive setting by considering dialgebras instead of ordinary algebras. This gives a new and compact formalisation of inductiveinductive definitions, which we prove is equivalent to the usual formulation with elimination rules. 1
Datatype ornamentation and the Dutch National Flag problem
, 2011
"... In his seminal book A Discipline of Programming [3], one of the concluding remarks made by Dijkstra was: [...] that it does not suffice to design a mechanism of which we hope that it will meet its requirements, but that we must design it in such a form that we can convince ourselves — and anyone els ..."
Abstract
 Add to MetaCart
In his seminal book A Discipline of Programming [3], one of the concluding remarks made by Dijkstra was: [...] that it does not suffice to design a mechanism of which we hope that it will meet its requirements, but that we must design it in such a form that we can convince ourselves — and anyone else for that matter — that it will, indeed, meet its requirements. And, therefore, instead of first designing the program and then trying to prove its correctness, we develop correctness proof and program hand in hand. (In actual fact, the correctness proof is developed slightly ahead of the program: after having chosen the form of the correctness proof we make the program so that it satisfies the proof’s requirements.) Dijkstra used the guarded command language for programming and predicate logic for reasoning, relating them by the weakest precondition semantics. The separation of programming language and reasoning language forced him to make the distinction between programs and proofs, and talk indirectly about a program
Viewing λterms through Maps
"... In this paper we introduce the notion of map, which is a notation for the set of occurrences of a symbol in a syntactic expression such as a formula or a λterm. We use binary trees over 0 and 1 as maps, but some wellformedness conditions are required. We develop a representation of lambda terms usi ..."
Abstract
 Add to MetaCart
In this paper we introduce the notion of map, which is a notation for the set of occurrences of a symbol in a syntactic expression such as a formula or a λterm. We use binary trees over 0 and 1 as maps, but some wellformedness conditions are required. We develop a representation of lambda terms using maps. The representation is concrete (inductively definable in HOL or Constructive Type Theory) and canonical (one representative per λterm). We define substitution for our map representation, and prove the representation is in substitution preserving isomorphism with both nominal logic λterms and de Bruijn nameless terms. These proofs are mechanically checked in Isabelle/HOL and Minlog respectively. The map representation has good properties. Substitution does not require adjustment of binding information: neither αconversion of the body being substituted into, nor de Bruijn lifting of the term being implanted. We have a natural proof of the substitution lemma of λ calculus that requires no fresh names, or index manipulation.