Questions tagged [coinduction]

21 questions
79
votes
2 answers

What is coinduction?

I've heard of (structural) induction. It allows you to build up finite structures from smaller ones and gives you proof principles for reasoning about such structures. The idea is clear enough. But what about coinduction? How does it work? How can…
Dave Clarke
  • 20,345
  • 4
  • 70
  • 114
12
votes
0 answers

Is extensionality for coinductive datatypes consistent with Coq's logic?

Given a coinductive datatype, one can usually (always?) define a bisimulation as the largest equivalence relation over it. I would like to add an axiom stating that if two members of the type are related by the bisimulation, they are equal in the…
Jannis Limperg
  • 241
  • 1
  • 5
9
votes
3 answers

Can a total programming language be Turing-complete?

I've seen two answers to this: Wikipedia says no: These restrictions mean that total functional programming is not Turing-complete. And the Wikipedia article cites D.A. Turner as the coiner of "total functional programming," and Turner says on…
Max Heiber
  • 378
  • 2
  • 12
5
votes
0 answers

Is the set finite words over an alphabet a final coalgebra*?

I am studying what coinduction is. In particular, I am reading that coinductive datatypes can be defined as elements of a final coalgebra for a given polynomial endofunctor on $\tt Set$. I've seen that $A^w$, infinite streams over an alphabet $A$,…
Damaru
  • 51
  • 1
5
votes
1 answer

How to write a coterminating, effectful program?

[Using Idris for code examples and terminology, but the question is not about Idris per se] In a post titled A Neighborhood of Infinity, @sigfpe argues that "the kind of open-ended loop we see in operating systems and interactive applications" is to…
5
votes
1 answer

Proving with co-induction principles

I'm going through Adam Chlipala's "Certified Programming with Dependent Types" (available here for convenience), and I'm a bit stuck at internalizing the introduction of co-induction principle for the stream_eq predicate in Chapter 5. Firstly, I'm…
0xd34df00d
  • 175
  • 4
3
votes
1 answer

When can the coinduction hypothesis be used?

We can use the induction hypothesis when we are proving a property for a structure that is well-ordered. I am aware that there is a proof for this. When it comes to coinduction, I'm confused. One of the answers to another question "What is…
Russell
  • 153
  • 3
3
votes
1 answer

Coinduction in mathematical analysis?

Coinduction is a logical principle that is somehow dual to induction. I'm struggling to understand it. Are there any interesting examples of coinduction in analysis? A few examples seem like they could be promising: the $p$-adic numbers can be…
wlad
  • 499
  • 2
  • 11
3
votes
1 answer

Definition of M-type in type theory

According to nLab, M-types are the dual of W-types. What are the introduction and elimination rules for M-types? Edit: For example, the formation/introduction/elimination rules for W-types are: $$\frac{A:Type\quad x:A⊦B:Type}{(W…
Andrew Cann
  • 371
  • 1
  • 9
2
votes
1 answer

Does co-inductive and co-recursive types also have their recursors?

I'm new to type theory, and recently read introductory materials where dependent type are discussed. One of my friend asked me, "Those dependent types are having recursors & 'inductors'(dependent eliminators), but how about those types that is…
Bell Fox
  • 53
  • 6
2
votes
1 answer

Definition of semantics of coinductive type

It is relatively easy to construct an object in set/class theory which has properties of any of the following: dependent sum, dependent product, W-types. E.g. Dependent sum of a family F is just the composition $(E^{-1}\ $o$\ F)$. (it depends…
g_d
  • 121
  • 4
2
votes
0 answers

How to prove by coinduction?

Previously, I've asked a question about coinduction. That gave me a lot of useful high-level insights on what coinduction provides, and what are the usefulness of coinductive proofs. This question is about walking through an example in more detail.…
Russell
  • 153
  • 3
2
votes
0 answers

"Practical coinduction" over $\mathbb N_\infty$?

I've just finished reading the paper Practical Coinduction by Kozen and Silva. What is the difference between induction over $\mathbb N$ and coinduction over $\mathbb N_\infty$? From the paper, it seems that coinduction is almost the same as…
wlad
  • 499
  • 2
  • 11
2
votes
0 answers

Understanding Isabelle's implementation of coinduction

I'm studying how coinduction was encoded in Isabelle. At page 7 of the attached document, the author describes how some datatypes can be encoded as initial algebras. Here is one example: Finite lists The unary type constructor list, which sends…
user1868607
  • 2,224
  • 14
  • 23
2
votes
0 answers

How can one flip a stream using corecursion

Following is the definition of codata stream: codata Stream where hd : Stream −> A tl : Stream −> Stream For simplicity I assume I have just a binary stream. Now I would like to define a function flip : Stream -> Stream , that reverses…
1
2