Results 1  10
of
15
Continuous functions on final coalgebras
, 2007
"... In a previous paper we have given a representation of continuous functions on streams, both discretevalued functions, and functions between streams. the topology on streams is the ‘Baire ’ topology induced by taking as a basic neighbourhood the set of streams that share a given finite prefix. We ga ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
In a previous paper we have given a representation of continuous functions on streams, both discretevalued functions, and functions between streams. the topology on streams is the ‘Baire ’ topology induced by taking as a basic neighbourhood the set of streams that share a given finite prefix. We gave also a combinator on the representations of stream processing functions that reflects composition. Streams are the simplest example of a nontrivial final coalgebras, playing in the coalgebraic realm the same role as do the natural numbers in the algebraic realm. Here we extend our previous results to cover the case of final coalgebras for a broad class of functors generalising (×A). The functors we deal with are those that arise from countable signatures of finiteplace untyped operators. These have many applications. The topology we put on the final coalgebra for such a functor is that induced by taking for basic neighbourhoods the set of infinite objects which share a common prefix, according to the usual definition of the final coalgebra as the limit of a certain inverse chain starting at �. 1
Termination checking in the presence of nested inductive and coinductive types. Note supporting presentation given at the Workshop on Partiality and Recursion in Interactive Theorem Provers
 In Preliminary Proceedings of the Ninth Workshop on Language Descriptions Tools and Applications, LDTA 2009
, 2009
"... In the dependently typed functional programming language Agda one can easily mix induction and coinduction. The implementation of the termination/productivity checker is based on a simple extension of a termination checker for a language with inductive types. However, this simplicity comes at a pric ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
In the dependently typed functional programming language Agda one can easily mix induction and coinduction. The implementation of the termination/productivity checker is based on a simple extension of a termination checker for a language with inductive types. However, this simplicity comes at a price: only types of the form νX.µY.F X Y can be handled directly, not types of the form µY.νX.F X Y. We explain the implementation of the termination checker and the ensuing problem. 1
Beating the Productivity Checker Using Embedded Languages
"... Abstract. 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 th ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
Abstract. 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 problemspecific language as a data type, writing the program in the problemspecific language, and writing a guarded interpreter for this language. 1
Total Parser Combinators
, 2009
"... A monadic parser combinator library which guarantees termination of parsing, while still allowing many forms of left recursion, is described. The library’s interface is similar to that of many other parser combinator libraries, with two important differences: one is that the interface clearly specif ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
A monadic parser combinator library which guarantees termination of parsing, while still allowing many forms of left recursion, is described. The library’s interface is similar to that of many other parser combinator libraries, with two important differences: one is that the interface clearly specifies which parts of the constructed parsers may be infinite, and which parts have to be finite, using a combination of induction and coinduction; and the other is that the parser type is unusually informative. The library comes with a formal semantics, using which it is proved that the parser combinators are as expressive as possible. The implementation
ΠΣ: Dependent Types without the Sugar
"... Abstract. The recent success of languages like Agda and Coq demonstrates the potential of using dependent types for programming. These systems rely on many highlevel features like datatype definitions, pattern matching and implicit arguments to facilitate the use of the languages. However, these fe ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Abstract. The recent success of languages like Agda and Coq demonstrates the potential of using dependent types for programming. These systems rely on many highlevel features like datatype definitions, pattern matching and implicit arguments to facilitate the use of the languages. However, these features complicate the metatheoretical study and are a potential source of bugs. To address these issues we introduce ΠΣ, a dependently typed core language. It is small enough for metatheoretical study and the type checker is small enough to be formally verified. In this language there is only one mechanism for recursion—used for types, functions and infinite objects— and an explicit mechanism to control unfolding, based on lifted types. Furthermore structural equality is used consistently for values and types; this is achieved by a new notion of αequality for recursive definitions. We show, by translating several highlevel constructions, that ΠΣ is suitable as a core language for dependently typed programming. 1
A proof pearl with the fan theorem and bar induction—Walking through infinite trees with mixed induction and coinduction
 In APLAS ’11
, 2011
"... Abstract. We study temporal properties over infinite binary redblue trees in the setting of constructive type theory. We consider several familiar pathbased properties, typical to lineartime and branchingtime temporal logics like LTL and CTL ∗ , and the corresponding treebased properties, in th ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Abstract. We study temporal properties over infinite binary redblue trees in the setting of constructive type theory. We consider several familiar pathbased properties, typical to lineartime and branchingtime temporal logics like LTL and CTL ∗ , and the corresponding treebased properties, in the spirit of the modal μcalculus. We conduct a systematic study of the relationships of the pathbased and treebased versions of “eventually always blueness ” and mixed inductivecoinductive “almost always blueness ” and arrive at a diagram relating these properties to each other in terms of implications that hold either unconditionally or under specific assumptions (Weak Continuity for Numbers, the Fan Theorem, Lesser Principle of Omniscience, Bar Induction). We have fully formalized our development with the Coq proof assistant. 1
Functional Pearl: Every Bit Counts
"... We show how the binary encoding and decoding of typed data and typed programs can be understood, programmed, and verified with the help of questionanswer games. The encoding of a value is determined by the yes/no answers to a sequence of questions about that value; conversely, decoding is the inter ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
We show how the binary encoding and decoding of typed data and typed programs can be understood, programmed, and verified with the help of questionanswer games. The encoding of a value is determined by the yes/no answers to a sequence of questions about that value; conversely, decoding is the interpretation of binary data as answers to the same question scheme. We introduce a general framework for writing and verifying gamebased codecs. We present games for structured, recursive, polymorphic, and indexed types, building up to a representation of welltyped terms in the simplytyped λcalculus. The framework makes novel use of isomorphisms between types in the definition of games. The definition of isomorphisms together with additional simple properties make it easy to prove that codecs derived from games never encode two distinct values using the same code, never decode two codes to the same value, and interpret any bit sequence as a valid code for a value or as a prefix of a valid code.
Mixing Induction and Coinduction
, 2009
"... Purely inductive definitions give rise to treeshaped values where all branches have finite depth, and purely coinductive definitions give rise to values where all branches are potentially infinite. If this is too restrictive, then an alternative is to use mixed induction and coinduction. This techn ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Purely inductive definitions give rise to treeshaped values where all branches have finite depth, and purely coinductive definitions give rise to values where all branches are potentially infinite. If this is too restrictive, then an alternative is to use mixed induction and coinduction. This technique appears to be fairly unknown. The aim of this paper is to make the technique more widely known, and to present several new applications of it, including a parser combinator library which guarantees termination of parsing, and a method for combining coinductively defined inference systems with rules like transitivity. The developments presented in the paper have been formalised and checked in Agda, a dependently typed programming language and proof assistant.
Subtyping, Declaratively An Exercise in Mixed Induction and Coinduction
"... Abstract. It is natural to present subtyping for recursive types coinductively. However, Gapeyev, Levin and Pierce have noted that there is a problem with coinductive definitions of nontrivial transitive inference systems: they cannot be “declarative”—as opposed to “algorithmic ” or syntaxdirected ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Abstract. It is natural to present subtyping for recursive types coinductively. However, Gapeyev, Levin and Pierce have noted that there is a problem with coinductive definitions of nontrivial transitive inference systems: they cannot be “declarative”—as opposed to “algorithmic ” or syntaxdirected—because coinductive inference systems with an explicit rule of transitivity are trivial. We propose a solution to this problem. By using mixed induction and coinduction we define an inference system for subtyping which combines the advantages of coinduction with the convenience of an explicit rule of transitivity. The definition uses coinduction for the structural rules, and induction for the rule of transitivity. We also discuss under what conditions this technique can be used when defining other inference systems. The developments presented in the paper have been mechanised using Agda, a dependently typed programming language and proof assistant. 1
Termination Checking Nested Inductive and Coinductive Types
"... In the dependently typed functional programming language Agda one can easily mix induction and coinduction. The implementation of the termination/productivity checker is based on a simple extension of a termination checker for a language with inductive types. However, this simplicity comes at a pric ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
In the dependently typed functional programming language Agda one can easily mix induction and coinduction. The implementation of the termination/productivity checker is based on a simple extension of a termination checker for a language with inductive types. However, this simplicity comes at a price: only types of the form νX.µY.F X Y can be handled directly, not types of the form µY.νX.F X Y. We explain the implementation of the termination checker and the ensuing problem. 1