## Interactive programs and weakly final coalgebras (extended version

Venue: | Dependently typed programming, number 04381 in Dagstuhl Seminar Proceedings, 2004. Available via http://drops.dagstuhl.de/opus |

Citations: | 3 - 2 self |

### BibTeX

@INPROCEEDINGS{Setzer_interactiveprograms,

author = {Anton Setzer and Peter Hancock},

title = {Interactive programs and weakly final coalgebras (extended version},

booktitle = {Dependently typed programming, number 04381 in Dagstuhl Seminar Proceedings, 2004. Available via http://drops.dagstuhl.de/opus},

year = {}

}

### OpenURL

### Abstract

GR/S30450/01. 2 A. Setzer, P. Hancock 1 Introduction According to Martin-L"of [19]: "... I do not think that the search for logically ever more satisfac-tory high level programming languages can stop short of anything but

### Citations

3392 | Communication and concurrency - Milner - 1989 |

1347 | Imperative functional programming - Jones, Wadler - 1993 |

762 | Notions of computation and monads - Moggi |

508 |
Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions
- Bertot, Castéran
- 2004
(Show Context)
Citation Context ...o corecursion in the context of the simply typed λ-calculus and in the context of system F. He showed that the resulting systems are strongly normalising. E. Gimenéz ([7]; see as well the book on Coq =-=[2]-=-, chapter 13, for an exposition of the coalgebraic data types in Coq, which are based on the work by Gimenéz) has studied guarded recursion for weakly final coalgebras and a corresponding general recu... |

455 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ...ied interactive programs. In this article we explore one approach to the representation of interactive programs in dependent type theory. This approach takes as its basis the concept of “monadic IO” (=-=[21]-=-) used in functional programming. We shall see that in dependent type theory, besides non-dependent interactive programs in which the interface between the user and the real world is fixed as in ordin... |

279 |
P.: Constructive mathematics and computer programming
- Martin-Löf
- 1982
(Show Context)
Citation Context ...nal coalgebras, coiteration, corecursion, monad ⋆ Supported by Nuffield Foundation, grant ref. NAL/00303/G and EPSRC grant GR/S30450/01.s2 A. Setzer, P. Hancock 1 Introduction According to Martin-Löf =-=[19]-=-: “ . . . I do not think that the search for logically ever more satisfactory high level programming languages can stop short of anything but a language in which (constructive) mathematics can be adeq... |

271 | Programming in Martin-Löf’s Type Theory. An Introduction - NORDSTRÖM, PETERSSON, et al. - 1990 |

123 | Categorical Logic and Type Theory - Jacobs - 1999 |

108 |
Functional Programming and Input/Output
- Gordon
- 1994
(Show Context)
Citation Context ...ote that we suppress here the dependence of IO on the interface. (The same will apply to other operations like elim.) Then we need a function 1 For an overview over I/O in functional programming, see =-=[8]-=-. 4sc : IO → C determining the command to issue and a function next : (p : IO, R(c(p))) → IO that determines the next program from the response. We can combine both ingredients into one function Defin... |

102 | How to Declare an Imperative - Wadler - 1995 |

86 | Infinite objects in type theory
- Coquand
(Show Context)
Citation Context ...ucible expression. (The example just given reads elim(g(x)) = 〈c, λr.g(∗)〉, which is unproblematic). The principle for defining g(x) = do(c(x), λr.g(next(x, r))) is a simple case of guarded induction =-=[3]-=- (see as well the work [7] by Gimenéz; its relationship to the current work was discussed in the introduction). The idea of guarded induction is that one can define elements of such a codata set recur... |

75 |
Codifying guarded definitions with recursion schemes
- Giménez
- 1994
(Show Context)
Citation Context ... coinductive type corresponding to corecursion in the context of the simply typed λ-calculus and in the context of system F. He showed that the resulting systems are strongly normalising. E. Gimenéz (=-=[7]-=-; see as well the book on Coq [2], chapter 13, for an exposition of the coalgebraic data types in Coq, which are based on the work by Gimenéz) has studied guarded recursion for weakly final coalgebras... |

52 | Inductive and coinductive types with iteration and recursion
- Geuvers
- 1992
(Show Context)
Citation Context ...re impossible. For this reason, if we are not content merely to model terminating interactive programs, we need to consider coalgebras rather than algebras. Related work. H. Geuvers has introduced in =-=[6]-=- rules for inductive and coinductive type corresponding to corecursion in the context of the simply typed λ-calculus and in the context of system F. He showed that the resulting systems are strongly n... |

42 | The ins and outs of Clean I/O - Achten, Plasmeijer - 1995 |

36 | Interactive programs in dependent type theory
- Hancock, Setzer
- 2000
(Show Context)
Citation Context ...received. Then, using this structure, the next interaction is calculated and performed in the real world. Once a response is obtained the loop is repeated. This was the approach taken in our articles =-=[12, 13, 14]-=-, and we repeat the key ideas in the following, following mainly [13]. In [13], an atomic interaction starts with the interactive program issuing a command in the real world (e.g. to write a character... |

29 | Induction-recursion and initial algebras
- Dybjer, Setzer
- 2003
(Show Context)
Citation Context ...tor. A complete set of rules for deriving polynomial functor would require the introduction of a data type of such functors analogous to the data type of inductive-recursive definitions introduced in =-=[5]-=-. However, such a theory would lie outside the scope of the present article. For the moment it suffices to restrict the theory to functors of the form F = λX, s.(c : C(s)) × ((r : R(s, c)) → X(n(s, c,... |

22 |
A set constructor for inductive sets in Martin-Löf’s type theory
- Petersson, Synek
- 1989
(Show Context)
Citation Context ...ogramming, there is a natural notion of state-dependent interactive programs, in which the interface changes over time. The representation is based on a structure identified by Petersson and Synek in =-=[16]-=-. We shall see that the concept of an interactive program is closely connected with the representation of weakly final coalgebras for certain specific functors. This notion will then be generalised to... |

22 | Intuitionistic type theory, volume 1 - Martin-Löf - 1984 |

15 | Representing inductively defined sets by wellorderings in Martin-Löf’s type theory
- Dybjer
- 1997
(Show Context)
Citation Context ...nomial functors to a set of strictly positive ones. The definition of the set of polynomial functors (which is a dependent form of the usual definition of polynomial functors and extends for instance =-=[4]-=-) is as follows: First we define inductively the set of polynomial functors F : (S → Set) → Set: • (Projection.) For s : S, λX.X(s) is a polynomial functor. • (The constant functor.) If A : Set, then ... |

14 |
Type fixpoints: Iteration vs. recursion
- Splawski, Urzyczyn
- 1999
(Show Context)
Citation Context ...essor function which uses iteration rather than recursion cannot be evaluated in constant time, though as far as the authors know, this has never been proved. (For some results in this direction, see =-=[26]-=-.) Recursion. The standard efficient definition of pred is obtained by using the principle of recursion. Recursion means that we can use the value of n when computing f(S(n)). It can be expressed by t... |

12 | Representations of first order function types as terminal coalgebras - Altenkirch - 2001 |

10 | An intensional characterization of the largest bisimulation - Hallnas - 1987 |

9 |
A construction of non-well-founded sets within martin-lof's type theory
- Lindstrom
- 1989
(Show Context)
Citation Context ...corresponding to our elim-function discussed below. The problem of representing final coalgebras in type theory was addressed in the special case of 2sof Aczel’s non-well-founded sets by Lindström in =-=[17]-=-, who gave a representation using an inverselimit construction that requires an extensional form of type theory. Markus Michelbrink is working on an encoding of weakly final coalgebras in standard int... |

8 | Inductive data types: Well-ordering types revisited - Goguen, Luo |

6 |
The IO monad in dependent type theory
- Hancock, Setzer
- 1999
(Show Context)
Citation Context ...received. Then, using this structure, the next interaction is calculated and performed in the real world. Once a response is obtained the loop is repeated. This was the approach taken in our articles =-=[12, 13, 14]-=-, and we repeat the key ideas in the following, following mainly [13]. In [13], an atomic interaction starts with the interactive program issuing a command in the real world (e.g. to write a character... |

5 | Ordinals and Interactive Programs - Hancock - 2000 |

5 | Specifying interactions with dependent types
- Hancock, Setzer
- 2000
(Show Context)
Citation Context ...received. Then, using this structure, the next interaction is calculated and performed in the real world. Once a response is obtained the loop is repeated. This was the approach taken in our articles =-=[12, 13, 14]-=-, and we repeat the key ideas in the following, following mainly [13]. In [13], an atomic interaction starts with the interactive program issuing a command in the real world (e.g. to write a character... |

4 | State dependent IO-monads in type theory
- Michelbrink, Setzer
- 2005
(Show Context)
Citation Context ... to extend type theory by new rules for weakly final coalgebras. Of course one needs to show that such an extension is consistent, and we will do so in a future article by developing a PER module (In =-=[19]-=- a set theoretic model for final coalgebras was developed). All rules will depend on a polynomial function F : S → Set, which we suppress. In fact, it requires a derivation to show that F is a polynom... |

4 |
Specifying interactions with dependent types. In Workshop on subtyping and dependent types in programming
- Hancock, Setzer
- 2000
(Show Context)
Citation Context ...lculated and performed in the real world. Once a response is obtained the loop is repeated, with a further interaction appended to the history of interactions This idea was the basis for our articles =-=[14, 13, 15]-=-, and we repeat the key ideas in the following, following mainly [13]. In this paper, for simplicity we don’t say much about the specifically monadic nature of IO (which pivots around “result types”).... |

2 | P.: Programming as applied basic topology - Hancock, Hyvernat - 2004 |