218 research outputs found
Cyclic Proofs and Coinductive Principles
It is possible to provide a proof for a coinductive type using a corecursive function coupled with aguardedness condition. The guardedness condition, however, is quiterestrictive and many programs which are in fact productive and do not compromise soundness will be rejected. We present a system of cyclic proof for an extension of System F extended with sums, products and (co)inductive types. Using program transformation techniques we are able to take some programs whose productivity is suspected and transform them, using a suitable theory of equivalence, into programs for which guardedness is syntactically apparent. The equivalence of the proof prior and subsequent to transformation is given by a bisimulation relation.
Proof Relevant Corecursive Resolution
Resolution lies at the foundation of both logic programming and type class
context reduction in functional languages. Terminating derivations by
resolution have well-defined inductive meaning, whereas some non-terminating
derivations can be understood coinductively. Cycle detection is a popular
method to capture a small subset of such derivations. We show that in fact
cycle detection is a restricted form of coinductive proof, in which the atomic
formula forming the cycle plays the role of coinductive hypothesis.
This paper introduces a heuristic method for obtaining richer coinductive
hypotheses in the form of Horn formulas. Our approach subsumes cycle detection
and gives coinductive meaning to a larger class of derivations. For this
purpose we extend resolution with Horn formula resolvents and corecursive
evidence generation. We illustrate our method on non-terminating type class
resolution problems.Comment: 23 pages, with appendices in FLOPS 201
Beating the Productivity Checker Using Embedded Languages
Some total languages, like Agda and Coq, allow the use of guarded corecursion
to construct infinite values and proofs. Guarded corecursion is a form of
recursion in which arbitrary recursive calls are allowed, as long as they are
guarded by a coinductive constructor. Guardedness ensures that programs are
productive, i.e. that every finite prefix of an infinite value can be computed
in finite time. However, many productive programs are not guarded, and it can
be nontrivial to put them in guarded form.
This paper gives a method for turning a productive program into a guarded
program. The method amounts to defining a problem-specific language as a data
type, writing the program in the problem-specific language, and writing a
guarded interpreter for this language.Comment: In Proceedings PAR 2010, arXiv:1012.455
Types and verification for infinite state systems
Server-like or non-terminating programs are central to modern computing. It is a common requirement for these programs that they always be available to produce a behaviour. One method of showing such availability is by endowing a type-theory with constraints that demonstrate that a program will always produce some behaviour or halt. Such a constraint is often called productivity. We introduce a type theory which can be used to type-check a polymorphic functional programming language similar to a fragment of the Haskell programming language. This allows placing constraints on program terms such that they will not type-check unless they are productive. We show that using program transformation techniques, one can restructure some programs which are not provably productive in our type theory into programs which are manifestly productive. This allows greater programmer flexibility in the specification of such programs. We have demonstrated a mechanisation of some of these important results in the proof-assistant Coq. We have also written a program transformation system for this term-language in the programming language Haskell
Coinduction in Flow: The Later Modality in Fibrations
This paper provides a construction on fibrations that gives access to the so-called later modality, which allows for a controlled form of recursion in coinductive proofs and programs. The construction is essentially a generalisation of the topos of trees from the codomain fibration over sets to arbitrary fibrations. As a result, we obtain a framework that allows the addition of a recursion principle for coinduction to rather arbitrary logics and programming languages. The main interest of using recursion is that it allows one to write proofs and programs in a goal-oriented fashion. This enables easily understandable coinductive proofs and programs, and fosters automatic proof search.
Part of the framework are also various results that enable a wide range of applications: transportation of (co)limits, exponentials, fibred adjunctions and first-order connectives from the initial fibration to the one constructed through the framework. This means that the framework extends any first-order logic with the later modality. Moreover, we obtain soundness and completeness results, and can use up-to techniques as proof rules. Since the construction works for a wide variety of fibrations, we will be able to use the recursion offered by the later modality in various context. For instance, we will show how recursive proofs can be obtained for arbitrary (syntactic) first-order logics, for coinductive set-predicates, and for the probabilistic modal mu-calculus. Finally, we use the same construction to obtain a novel language for probabilistic productive coinductive programming. These examples demonstrate the flexibility of the framework and its accompanying results
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
The New Normal: We Cannot Eliminate Cuts in Coinductive Calculi, But We Can Explore Them
In sequent calculi, cut elimination is a property that guarantees that any
provable formula can be proven analytically. For example, Gentzen's classical
and intuitionistic calculi LK and LJ enjoy cut elimination. The property is
less studied in coinductive extensions of sequent calculi. In this paper, we
use coinductive Horn clause theories to show that cut is not eliminable in a
coinductive extension of LJ, a system we call CLJ. We derive two further
practical results from this study. We show that CoLP by Gupta et al. gives rise
to cut-free proofs in CLJ with fixpoint terms, and we formulate and implement a
novel method of coinductive theory exploration that provides several heuristics
for discovery of cut formulae in CLJ.Comment: Paper presented at the 36th International Conference on Logic
Programming (ICLP 2019), University Of Calabria, Rende (CS), Italy, September
2020, 16 page
- …