4,335 research outputs found
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
Resumptions, Weak Bisimilarity and Big-Step Semantics for While with Interactive I/O: An Exercise in Mixed Induction-Coinduction
We look at the operational semantics of languages with interactive I/O
through the glasses of constructive type theory. Following on from our earlier
work on coinductive trace-based semantics for While, we define several big-step
semantics for While with interactive I/O, based on resumptions and
termination-sensitive weak bisimilarity. These require nesting inductive
definitions in coinductive definitions, which is interesting both
mathematically and from the point-of-view of implementation in a proof
assistant.
After first defining a basic semantics of statements in terms of resumptions
with explicit internal actions (delays), we introduce a semantics in terms of
delay-free resumptions that essentially removes finite sequences of delays on
the fly from those resumptions that are responsive. Finally, we also look at a
semantics in terms of delay-free resumptions supplemented with a silent
divergence option. This semantics hinges on decisions between convergence and
divergence and is only equivalent to the basic one classically.
We have fully formalized our development in Coq.Comment: In Proceedings SOS 2010, arXiv:1008.190
Type classes for efficient exact real arithmetic in Coq
Floating point operations are fast, but require continuous effort on the part
of the user in order to ensure that the results are correct. This burden can be
shifted away from the user by providing a library of exact analysis in which
the computer handles the error estimates. Previously, we [Krebbers/Spitters
2011] provided a fast implementation of the exact real numbers in the Coq proof
assistant. Our implementation improved on an earlier implementation by O'Connor
by using type classes to describe an abstract specification of the underlying
dense set from which the real numbers are built. In particular, we used dyadic
rationals built from Coq's machine integers to obtain a 100 times speed up of
the basic operations already. This article is a substantially expanded version
of [Krebbers/Spitters 2011] in which the implementation is extended in the
various ways. First, we implement and verify the sine and cosine function.
Secondly, we create an additional implementation of the dense set based on
Coq's fast rational numbers. Thirdly, we extend the hierarchy to capture order
on undecidable structures, while it was limited to decidable structures before.
This hierarchy, based on type classes, allows us to share theory on the
naturals, integers, rationals, dyadics, and reals in a convenient way. Finally,
we obtain another dramatic speed-up by avoiding evaluation of termination
proofs at runtime.Comment: arXiv admin note: text overlap with arXiv:1105.275
The Rooster and the Syntactic Bracket
We propose an extension of pure type systems with an algebraic presentation
of inductive and co-inductive type families with proper indices. This type
theory supports coercions toward from smaller sorts to bigger sorts via
explicit type construction, as well as impredicative sorts. Type families in
impredicative sorts are constructed with a bracketing operation. The necessary
restrictions of pattern-matching from impredicative sorts to types are confined
to the bracketing construct. This type theory gives an alternative presentation
to the calculus of inductive constructions on which the Coq proof assistant is
an implementation.Comment: To appear in the proceedings of the 19th International Conference on
Types for Proofs and Program
CoLoR: a Coq library on well-founded rewrite relations and its application to the automated verification of termination certificates
Termination is an important property of programs; notably required for
programs formulated in proof assistants. It is a very active subject of
research in the Turing-complete formalism of term rewriting systems, where many
methods and tools have been developed over the years to address this problem.
Ensuring reliability of those tools is therefore an important issue. In this
paper we present a library formalizing important results of the theory of
well-founded (rewrite) relations in the proof assistant Coq. We also present
its application to the automated verification of termination certificates, as
produced by termination tools
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
- …