coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Co-inductive Streams vs. Functions
- Date: Mon, 7 Dec 2015 11:06:51 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f174.google.com
- Ironport-phdr: 9a23:xGwLGhcYtQg3oO5nv2UWZQ5IlGMj4u6mDksu8pMizoh2WeGdxc69Zh7h7PlgxGXEQZ/co6odzbGG7ea5ACdZuMrJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvipduKOk4R3Wb1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu3SNp41Rr1ADTkgL3t9pIiy7UGCHkOz4S43VXxeuR5VCUCR5xbjG5z1ryHSt+xn2SDcM9egHp4uXjH3wL1mRxjymW8iPjo0+2Hewph/iatfrRmhrjRwxofVZMeeM/8oLfCVRs8TWWcUBpUZbCdGGI7pKtJXV+c=
Thanks, Pierre-Marie --
At the moment I just prove that this are [Proper], which isn't really too big of a problem since you can define combinators that handle the properness proofs for the most part. I guess I'm wondering more from a model point of view, are there any corner cases that one definition covers that the other does not?
If the co-inductive lists could also be finite, i.e. with this definition
CoInductive ftrace (st : Type) : Type :=
| Cons : st -> ftrace st -> ftrace st
| Done.
Then with functions you need to add some notion of "equal up to the occurrence of 'Done'" which is a bit cumbersome to express. But it seems that for truly infinite, non-dependent structures you might always be able to play this trick of "functions from paths to values". Is that the case, or is there a reason to prefer the CoInductive definition?
On Mon, Dec 7, 2015 at 10:48 AM, Pierre-Marie Pédrot <pierre-marie.pedrot AT inria.fr> wrote:
On 07/12/2015 19:11, Gregory Malecha wrote:
> To reason about the first I use co-induction and I do not need
> functional extensionality.
You'll actually need some form of extensionality to use it with ease.
Indeed, you cannot disprove the following in Coq, and it's pretty useful
in practical use:
CoInductive trace (state : Type) : Type :=
| Cons : state -> trace state -> trace state.
CoInductive bisimilar {state} : trace state -> trace state -> Prop :=
| Bisimilar : forall s t1 t2, bisimilar t1 t2 -> bisimilar (Cons _ s t1)
(Cons _ s t2).
Axiom trace_extensionality : forall state (t1 t2 : trace state),
bisimilar t1 t2 -> t1 = t2.
If you don't assume it, you'll have to show that all of your predicates
are Proper (and they meta-are), just like for the functional case.
PMP
gregory malecha
- [Coq-Club] Co-inductive Streams vs. Functions, Gregory Malecha, 12/07/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Pierre-Marie Pédrot, 12/07/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Gregory Malecha, 12/07/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Arnaud Spiwack, 12/08/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Eddy Westbrook, 12/10/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Thorsten Altenkirch, 12/10/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Daniel Schepler, 12/10/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Eddy Westbrook, 12/11/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Benedikt Ahrens, 12/12/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Gregory Malecha, 12/11/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Thorsten Altenkirch, 12/10/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Gregory Malecha, 12/07/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Emilio Jesús Gallego Arias, 12/11/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Gregory Malecha, 12/11/2015
- <Possible follow-up(s)>
- Re: [Coq-Club] Co-inductive Streams vs. Functions, CJ Bell, 12/10/2015
- Re: [Coq-Club] Co-inductive Streams vs. Functions, Pierre-Marie Pédrot, 12/07/2015
Archive powered by MHonArc 2.6.18.