Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Coinductive types and type preservation.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Coinductive types and type preservation.


chronological Thread 
  • From: "Arnaud Spiwack" <Arnaud.Spiwack AT lix.polytechnique.fr>
  • To: "Coq Club" <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Coinductive types and type preservation.
  • Date: Fri, 6 Jun 2008 20:29:24 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=BMHcA0+xuAiS5f8Xd3bltB7HKxqlLGR06etW9k9pxeaneJBrLntuPxBUN3hQoi3LaW cWrvaqeMNKhRqSBeuuOAsxxPan9YbD0HqvhD/zu8cPrmyaAQ8pWIgs5efhQ5oO0Ld0nL W1h2rK/bwWotOaPGXrQiK8oQDSEDe83ZyNYxA=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>



(out (cons xs)) should not compute to (cons xs)
except en passant, in an outer case analysis
demanding to strip the cons.

This is very troubling actually, because no cofixpoint is even involved here.

By the way, another way of decomposing the problem is (using Nicolas's definitions) :

(********************************************)
Definition pi (xs : Stream) : Stream :=
  match xs with
  | cons ys => ys
  end
.

Eval compute in fun xs => pi (cons xs).
 (* = fun xs : Stream => xs *)

Definition out' xs := cons (pi xs).

Eval compute in fun xs => out' (cons xs).
  (* = fun xs : Stream => cons xs *)

(********************************************)


It seems very natural that "pi (cons xs)"  reduces to "xs", as it is supposed to be its very definition. Then I guess it means that "A convertible to B" should not imply "cons A convertible to cons B".

It might make sense in the purely negative view of cons, like if it was a lambda under which no conversion would be allowed. However, proof assistant have made a history of reducing partial terms (same as reducing under lambdas). So, what would make "cons" essentially *more negative* (whatever this means) than lambdas ?

Additionally, I've tried analyzing the problem under the point of view of co-algebra as Anton Setzer advertised at the DTP'08 workshop, and only managed to reproduce the same issue in another tone of speech. From which I conclude that I'm lost.



Arnaud Spiwack



Archive powered by MhonArc 2.6.16.

Top of Page