25 research outputs found
Heterogeneous substitution systems revisited
Matthes and Uustalu (TCS 327(1-2):155-174, 2004) presented a categorical
description of substitution systems capable of capturing syntax involving
binding which is independent of whether the syntax is made up from least or
greatest fixed points. We extend this work in two directions: we continue the
analysis by creating more categorical structure, in particular by organizing
substitution systems into a category and studying its properties, and we
develop the proofs of the results of the cited paper and our new ones in
UniMath, a recent library of univalent mathematics formalized in the Coq
theorem prover.Comment: 24 page
Foundational nonuniform (co)datatypes for higher-order logic
Nonuniform (or ânestedâ or âheterogeneousâ) datatypes are recursively defined types in which the type arguments vary recursively. They arise in the implementation of finger trees and other efficient functional data structures. We show how to reduce a large class of nonuniform datatypes and codatatypes to uniform types in higher-order logic. We programmed this reduction in the Isabelle/HOL proof assistant, thereby enriching its specification language. Moreover, we derive (co)recusion and (co)induction principles based on a weak variant of parametricity
Foundational nonuniform (co)datatypes for higher-order logic
Nonuniform (or ânestedâ or âheterogeneousâ) datatypes are recursively defined types in which the type arguments vary recursively. They arise in the implementation of finger trees and other efficient functional data structures. We show how to reduce a large class of nonuniform datatypes and codatatypes to uniform types in higher-order logic. We programmed this reduction in the Isabelle/HOL proof assistant, thereby enriching its specification language. Moreover, we derive (co)recusion and (co)induction principles based on a weak variant of parametricity
Types and Semantics for Extensible Data Types (Extended Version)
Developing and maintaining software commonly requires (1) adding new data
type constructors to existing applications, but also (2) adding new functions
that work on existing data. Most programming languages have native support for
defining data types and functions in a way that supports either (1) or (2), but
not both. This lack of native support makes it difficult to use and extend
libraries. A theoretically well-studied solution is to define data types and
functions using initial algebra semantics. While it is possible to encode this
solution in existing programming languages, such encodings add syntactic and
interpretive overhead, and commonly fail to take advantage of the map and fold
fusion laws of initial algebras which compilers could exploit to generate more
efficient code. A solution to these is to provide native support for initial
algebra semantics. In this paper, we develop such a solution and present a type
discipline and core calculus for a language with native support for initial
algebra semantics.Comment: Extended version (28 pages) of the eponymous paper to appear in the
conference proceedings of APLAS 202
Foundational, compositional (co)datatypes for higher-order logic: category theory applied to theorem proving
Interactive theorem provers based on higher-order logic (HOL) traditionally follow the definitional approach, reducing high-level specifications to logical primitives. This also applies to the support for datatype definitions. However, the internal datatype construction used in HOL4, HOL Light, and Isabelle/HOL is fundamentally noncompositional, limiting its efficiency and flexibility, and it does not cater for codatatypes. We present a fully modular framework for constructing (co)datatypes in HOL, with support for mixed mutual and nested (co)recursion. Mixed (co)recursion enables type definitions involving both datatypes and codatatypes, such as the type of finitely branching trees of possibly infinite depth. Our framework draws heavily from category theory. The key notion is that of a bounded natural functorâan enriched type constructor satisfying specific properties preserved by interesting categorical operations. Our ideas are implemented as a definitional package in Isabelle, addressing a frequent request from users
A principled approach to programming with nested types in Haskell
Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the buildcombinator, and immediately consumed using the foldcombinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines buildcombinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell
Foundational, compositional (co)datatypes for higher-order logic: category theory applied to theorem proving
Interactive theorem provers based on higher-order logic (HOL) traditionally follow the definitional approach, reducing high-level specifications to logical primitives. This also applies to the support for datatype definitions. However, the internal datatype construction used in HOL4, HOL Light, and Isabelle/HOL is fundamentally noncompositional, limiting its efficiency and flexibility, and it does not cater for codatatypes. We present a fully modular framework for constructing (co)datatypes in HOL, with support for mixed mutual and nested (co)recursion. Mixed (co)recursion enables type definitions involving both datatypes and codatatypes, such as the type of finitely branching trees of possibly infinite depth. Our framework draws heavily from category theory. The key notion is that of a bounded natural functorâan enriched type constructor satisfying specific properties preserved by interesting categorical operations. Our ideas are implemented as a definitional package in Isabelle, addressing a frequent request from users
04381 Abstracts Collection -- Dependently Typed Programming
From 12.09.04 to 17.09.04, the Dagstuhl Seminar 04381
``Dependently Typed Programming\u27\u27 was held
in the International Conference and Research Center (IBFI),
Schloss Dagstuhl.
During the seminar, several participants presented their current
research, and ongoing work and open problems were discussed. Abstracts of
the presentations given during the seminar as well as abstracts of
seminar results and ideas are put together in this paper. The first section
describes the seminar topics and goals in general.
Links to extended abstracts or full papers are provided, if available
On Extensions of AF2 with Monotone and Clausular (Co)inductive Definitions
This thesis discusses some extensions of second-order logic AF2 with primitive constructors representing least and greatest fixed points of monotone operators, which allow to define predicates by induction and
coinduction. Though the expressive power of second-order logic has been well-known for a long time and suffices to define (co)inductive predicates by means of its (co)induction principles, it is more user-friendly to have a direct way of defining predicates inductively. Moreover recent applications in computer science oblige to consider also coinductive definitions useful for handling infinite objects, the most prominent example being the data type of streams or infinite lists. Main features of our approach are the use clauses in the (co)inductive definition mechanism, concept which simplifies the syntactic shape of the predicates, as well as the inclusion of not only (co)iteration but also primitive (co)recursion principles and in the case of coinductive definitions an inversion principle.
For sake of generality we consider full monotone, and not only positive definitions, after all positivity is only used to ensure monotonicity.
Working towards practical use of our systems we give them realizability interpretations where the systems of realizers are strongly normalizing extensions of the second-order polymorphic lambda calculus, system F in
Curry-style, with (co)inductive types corresponding directly to the logical systems via the Curry-Howard correspondence. Such realizability interpretations are therefore not reductive: the definition of realizability for a (co)inductive definition is again a (co)inductive definition. As main application of realizability we extend the so-called programming-with-proofs paradigm of Krivine and Parigot to our logics, by means of which a correct program of the lambda calculus can be extracted from a proof in the logic