9 research outputs found

    An inverse of the evaluation functional for typed Lambda-calculus

    Get PDF
    In any model of typed λ-calculus conianing some basic arithmetic, a functional p - * (procedure—* expression) will be defined which inverts the evaluation functional for typed X-terms, Combined with the evaluation functional, p-e yields an efficient normalization algorithm. The method is extended to X-calculi with constants and is used to normalize (the X-representations of) natural deduction proofs of (higher order) arithmetic. A consequence of theoretical interest is a strong completeness theorem for βη-reduction, generalizing results of Friedman [1] and Statman [31: If two Xterms have the same value in some model containing representations of the primitive recursive functions (of level 1) then they are provably equal in the βη- calculus

    When Is A Type Refinement An Inductive Type?

    Get PDF
    Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the N-indexed type of vectors refines lists by their lengths. Other data types may be refined in similar ways, but programmers must produce purpose-specific refinements on an ad hoc basis, developers must anticipate which refinements to include in libraries, and implementations often store redundant information about data and their refinements. This paper shows how to generically derive inductive characterizations of refinements of inductive types, and argues that these characterizations can alleviate some of the aforementioned difficulties associated with ad hoc refinements. These characterizations also ensure that standard techniques for programming with and reasoning about inductive types are applicable to refinements, and that refinements can themselves be further refined

    An inverse of the evaluation functional for typed Lambda-calculus

    Get PDF
    In any model of typed λ-calculus conianing some basic arithmetic, a functional p - * (procedure—* expression) will be defined which inverts the evaluation functional for typed X-terms, Combined with the evaluation functional, p-e yields an efficient normalization algorithm. The method is extended to X-calculi with constants and is used to normalize (the X-representations of) natural deduction proofs of (higher order) arithmetic. A consequence of theoretical interest is a strong completeness theorem for βη-reduction, generalizing results of Friedman [1] and Statman [31: If two Xterms have the same value in some model containing representations of the primitive recursive functions (of level 1) then they are provably equal in the βη- calculus

    Generic Fibrational Induction

    Full text link
    This paper provides an induction rule that can be used to prove properties of data structures whose types are inductive, i.e., are carriers of initial algebras of functors. Our results are semantic in nature and are inspired by Hermida and Jacobs' elegant algebraic formulation of induction for polynomial data types. Our contribution is to derive, under slightly different assumptions, a sound induction rule that is generic over all inductive types, polynomial or not. Our induction rule is generic over the kinds of properties to be proved as well: like Hermida and Jacobs, we work in a general fibrational setting and so can accommodate very general notions of properties on inductive types rather than just those of a particular syntactic form. We establish the soundness of our generic induction rule by reducing induction to iteration. We then show how our generic induction rule can be instantiated to give induction rules for the data types of rose trees, finite hereditary sets, and hyperfunctions. The first of these lies outside the scope of Hermida and Jacobs' work because it is not polynomial, and as far as we are aware, no induction rules have been known to exist for the second and third in a general fibrational framework. Our instantiation for hyperfunctions underscores the value of working in the general fibrational setting since this data type cannot be interpreted as a set.Comment: For Special Issue from CSL 201

    Generic Fibrational Induction

    Get PDF
    This paper provides an induction rule that can be used to prove properties of data structures whose types are inductive, i.e., are carriers of initial algebras of functors. Our results are semantic in nature and are inspired by Hermida and Jacobs’ elegant algebraic formulation of induction for polynomial data types. Our contribution is to derive, under slightly different assumptions, a sound induction rule that is generic over all inductive types, polynomial or not. Our induction rule is generic over the kinds of properties to be proved as well: like Hermida and Jacobs, we work in a general fibrational setting and so can accommodate very general notions of properties on inductive types rather than just those of a particular syntactic form. We establish the soundness of our generic induction rule by reducing induction to iteration. We then show how our generic induction rule can be instantiated to give induction rules for the data types of rose trees, definite hereditary sets, and hyperfunctions. The first of these lies outside the scope of Hermida and Jacobs’ work because it is not polynomial, and as far as we are aware, no induction rules have been known to exist for the second and third in a general fibrational framework. Our instantiation for hyperfunctions underscores the value of working in the general fibrational setting since this data type cannot be interpreted as a set

    Induction–recursion and initial algebras

    Get PDF
    1 Introduction Induction-recursion is a powerful definition method in intuitionistic type theory in the sense of Scott ("Constructive Validity") [31] and Martin-L"of [17, 18, 19]. The first occurrence of formal induction-recursion is Martin-L"of's definition of a universe `a la Tarski [19], which consists of a set

    Axiomatizations of Compositional Inductive-Recursive Definitions

    Get PDF
    \emph{Induction-recursion} is a definitional principle in Martin-L{\"o}f Type Theory defining families (\U , \T: \U\to D) : \Fam{D} where D: \Setone is an arbitrary fixed (large) set (which in motivating examples is chosen to be D=\Set), and \U : \Set is defined by induction while \T is simultaneously defined by recursion on \U; the qualifier ``simultaneously'' means here that \U may depend on values of the function \T : \U \to D. Two equivalent\footnote{These axiomatizations are equivalent if the underlying logical framework is chosen appropriately.} axiomatizations of this situation were proposed by Dybjer-Setzer in \cite{dybjer99}\cite{dybjer03}. In both cases a (large) set of \emph{codes} \DS\; D\; D (respectively \DS') for inductive-recursive definitions is defined such that each code c : \DS\; D\; D decodes to an endofunctor \sem{c} : \Fam{D}\to \Fam{D} between categories of families whose initial algebra is the family defined by this code cc. The authors proved the consistency of their axiomatizations be giving a set-theoretic model. These axiomatizations \DS and \DS' are however not the only reasonable axiomatizations of induction-recursion. There are at least two ways to come to this conclusion: the more practical one is motivated by the observation that while in the reference theory of inductive definitions it is always possible to compose (in a semantically sound way) two inductive definitions to a single new one, this seems hardly to be the case for the preexisting axiomatizations of Induction-Recursion. The second-, more conceptual observation about the existing axiomatizations of induction-recursion is that it does not contain constructors for dependent products (or powers\footnote{There is a close relationship between dependent products-, and powers of codes.}) of codes but only for dependent sums of codes. Indeed, we show that these two observations are related by characterizing compositionality of Dybjer-Setzer induction-recursion in terms of the existence of powers of codes by sets. Departing from this characterization, we define- and explore two new axiomatizations of induction-recursion satisfying the mentioned characterization and for which we prove compositionality. In the first one, this is achieved by restricting to a subsystem\footnote{By ``subsystem'' we mean here that there is a semantics-preserving translation from \UF to \DS.} \UF of \DS of \emph{uniform codes} for which powers of codes exist. Consistency of this system is established by a semantics-preserving embedding into the system \DS. The second axiomatization \IR of \emph{polynomial codes} (so called since they are based on the idea of iterating polynomials\footnote{Polynomials are also called \emph{containers} and are a formalization for inductive definitions.}) defines a system into which \DS can be embedded and which contains a constructor for dependent products- (and in particular powers) of codes. While for \UF the existence of a model can be obtained by embedding it into \DS for which Dybjer-Setzer themselves devised a (set-theoretic) model, we cannot argue in this way for a model of \IR and instead we provide a new model for the latter having almost the same set-theoretical assumptions concerning large cardinals: while Dybjer-Setzer induction-recursion can be modeled in ZFC supplemented by a Mahlo cardinal and a 00-inaccessible, we need ZFC plus a Mahlo cardinal and a 11-inaccessible. Since the system \IR does not simply arise by adding a constructor for dependent products of codes to \DS caeteris paribus, but additionally requires redefining all other constructors, the question about constructors generating the image of the inclusion \DS\hookrightarrow \IR imposes itself; we approach this question by defining an intermediary system lying between \DS and \IR and give a translation of this intermediary system into \DS. This intermediary system does not only arise by removal of the constructor for dependent products of codes since this did not yet enable us to define a desired translation to \DS, but by introduction of an additional uniformity constraint realized by an annotation of codes by binary trees. A common feature of both new systems \UF and \IR is that they admit a more flexible relation between codes and their subcodes than this is the case for \DS: sub-\DS-codes of a given \DS-code do all have the same type while sub-\UF-, and sub-\IR-codes are not constrained in this way. This latter feature reveals a more abstract way of arriving at the conclusion that Dybjer-Setzer induction-recursion is not the most general formulation of induction-recursion: like inductive definitions can be characterized by a set of operations on sets\footnote{Theses operations are called ``stictly positive operations'' (see \cite{dybjer1996Wtypes}).}, inductive-recursive definitions are also determined by a set of operations on families (namely those represented by the set of functors defined by codes) and Dybjer-Setzer's systems did not take into account operations that change the (large) set DD indexing families while the new systems \UF and \IR do so. In line with the idea of considering induction-recursion as contributing to the pursue of the project of formalizing the meta theory of type theory in type theory itself \cite[p.1]{Dybjer96internaltype}, we return to Dybjer-Setzer's original formalization \DS and provide a \emph{relationally-parametric} model for it that we articulate as a categories-with-families model in the category of reflexive graphs; categories-with-families were proposed in loc.cit. as a formalization of type theory inside type theory that is additionally well adapted to category theoretic reasoning. Relational parametricity is an established and important proof technique to establish meta-theoretic properties of type theories
    corecore