218 research outputs found
Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types
Type systems certify program properties in a compositional way. From a bigger
program one can abstract out a part and certify the properties of the resulting
abstract program by just using the type of the part that was abstracted away.
Termination and productivity are non-trivial yet desired program properties,
and several type systems have been put forward that guarantee termination,
compositionally. These type systems are intimately connected to the definition
of least and greatest fixed-points by ordinal iteration. While most type
systems use conventional iteration, we consider inflationary iteration in this
article. We demonstrate how this leads to a more principled type system, with
recursion based on well-founded induction. The type system has a prototypical
implementation, MiniAgda, and we show in particular how it certifies
productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317
Normalization by Evaluation in the Delay Monad: A Case Study for Coinduction via Copatterns and Sized Types
In this paper, we present an Agda formalization of a normalizer for
simply-typed lambda terms. The normalizer consists of two coinductively defined
functions in the delay monad: One is a standard evaluator of lambda terms to
closures, the other a type-directed reifier from values to eta-long beta-normal
forms. Their composition, normalization-by-evaluation, is shown to be a total
function a posteriori, using a standard logical-relations argument.
The successful formalization serves as a proof-of-concept for coinductive
programming and reasoning using sized types and copatterns, a new and presently
experimental feature of Agda.Comment: In Proceedings MSFP 2014, arXiv:1406.153
General Recursion via Coinductive Types
A fertile field of research in theoretical computer science investigates the
representation of general recursive functions in intensional type theories.
Among the most successful approaches are: the use of wellfounded relations,
implementation of operational semantics, formalization of domain theory, and
inductive definition of domain predicates. Here, a different solution is
proposed: exploiting coinductive types to model infinite computations. To every
type A we associate a type of partial elements Partial(A), coinductively
generated by two constructors: the first, return(a) just returns an element
a:A; the second, step(x), adds a computation step to a recursive element
x:Partial(A). We show how this simple device is sufficient to formalize all
recursive functions between two given types. It allows the definition of fixed
points of finitary, that is, continuous, operators. We will compare this
approach to different ones from the literature. Finally, we mention that the
formalization, with appropriate structural maps, defines a strong monad.Comment: 28 page
Proof-irrelevant model of CC with predicative induction and judgmental equality
We present a set-theoretic, proof-irrelevant model for Calculus of
Constructions (CC) with predicative induction and judgmental equality in
Zermelo-Fraenkel set theory with an axiom for countably many inaccessible
cardinals. We use Aczel's trace encoding which is universally defined for any
function type, regardless of being impredicative. Direct and concrete
interpretations of simultaneous induction and mutually recursive functions are
also provided by extending Dybjer's interpretations on the basis of Aczel's
rule sets. Our model can be regarded as a higher-order generalization of the
truth-table methods. We provide a relatively simple consistency proof of type
theory, which can be used as the basis for a theorem prover
Coinductive Formal Reasoning in Exact Real Arithmetic
In this article we present a method for formally proving the correctness of
the lazy algorithms for computing homographic and quadratic transformations --
of which field operations are special cases-- on a representation of real
numbers by coinductive streams. The algorithms work on coinductive stream of
M\"{o}bius maps and form the basis of the Edalat--Potts exact real arithmetic.
We use the machinery of the Coq proof assistant for the coinductive types to
present the formalisation. The formalised algorithms are only partially
productive, i.e., they do not output provably infinite streams for all possible
inputs. We show how to deal with this partiality in the presence of syntactic
restrictions posed by the constructive type theory of Coq. Furthermore we show
that the type theoretic techniques that we develop are compatible with the
semantics of the algorithms as continuous maps on real numbers. The resulting
Coq formalisation is available for public download.Comment: 40 page
Type-based termination of recursive definitions
This paper introduces "lambda-hat", a simply typed lambda calculus
supporting inductive types and recursive function definitions with
termination ensured by types. The system is shown to enjoy subject
reduction, strong normalisation of typable terms and to be stronger than
a related system "lambda-G" in which termination is ensured by a syntactic guard condition. The system can, at will, be extended to also support coinductive types and corecursive function definitions.Information Society Technologies (IST) - Fifth Framework Programm (FP5) - TYPES.Fundação para a Ciência e a Tecnologia (FCT) – PRAXIS XXI/C/EEI/14172/98.INRIA-ICCTI.Estonian Science Foundation (ETF) - grant no. 4155
Formalizing Program Equivalences in Dependent Type Theory
This brief note summarizes our formalization in a dependently typed setting of the meta-theory of several notions of program equivalences in higher-order programming languages
Affine functions and series with co-inductive real numbers
We extend the work of A. Ciaffaglione and P. Di Gianantonio on mechanical
verification of algorithms for exact computation on real numbers, using
infinite streams of digits implemented as co-inductive types. Four aspects are
studied: the first aspect concerns the proof that digit streams can be related
to the axiomatized real numbers that are already axiomatized in the proof
system (axiomatized, but with no fixed representation). The second aspect
re-visits the definition of an addition function, looking at techniques to let
the proof search mechanism perform the effective construction of an algorithm
that is correct by construction. The third aspect concerns the definition of a
function to compute affine formulas with positive rational coefficients. This
should be understood as a testbed to describe a technique to combine
co-recursion and recursion to obtain a model for an algorithm that appears at
first sight to be outside the expressive power allowed by the proof system. The
fourth aspect concerns the definition of a function to compute series, with an
application on the series that is used to compute Euler's number e. All these
experiments should be reproducible in any proof system that supports
co-inductive types, co-recursion and general forms of terminating recursion,
but we performed with the Coq system [12, 3, 14]
- …