coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Frédéric Blanqui <frederic.blanqui AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Equality
- Date: Wed, 10 Dec 2014 08:34:40 +0100
Hello.
Le 10/12/2014 01:53, Saulo Araujo a écrit :
Hi,I guess you want x y : PATH instead...
I need to compare values of the type PATH defined below
Definition ID := string.
Inductive STEP : Type :=
| LastStep : ID -> STEP | Step : ID -> PATH -> STEP | Init : ID -> STEP
with PATH : Type := Path : list STEP -> PATH.
Is there a way to compare those values in Gallina like we compare them in SML?
I tried the suggestion in http://stackoverflow.com/questions/6636131/searching-through-a-list-recursively-in-coq
Definition PATH_dec : forall x y : ID, {x = y} + {x <> y}.
Proof. decide equality. Defined.To prove this, you need to proceed by induction on PATH. Unfortunately, the induction principle automatically generated by Coq is not correct because Coq does not recognize the argument of Path as recursive. But you can redefine it yourself by using "fix". See for instance the file Term/Varyadic/VTerm.html in http://color.inria.fr (http://color.inria.fr/doc/CoLoR.Term.Varyadic.VTerm.html does not contain proofs). You also need list_eq_dec and string_dec in the List and String modules.
Best regards,
Frédéric.
but Coq says Error: Attempt to save an incomplete proofCompilation output:
Thanks in advance,
Saulo
- [Coq-Club] Equality, Saulo Araujo, 12/10/2014
- Re: [Coq-Club] Equality, Nuno Gaspar, 12/10/2014
- Re: [Coq-Club] Equality, Saulo Araujo, 12/10/2014
- Re: [Coq-Club] Equality, Saulo Araujo, 12/10/2014
- Re: [Coq-Club] Equality, Saulo Araujo, 12/10/2014
- Re: [Coq-Club] Equality, Frédéric Blanqui, 12/10/2014
- Re: [Coq-Club] Equality, Kyle Stemen, 12/10/2014
- Re: [Coq-Club] Equality, Saulo Araujo, 12/11/2014
- Re: [Coq-Club] Equality, Kyle Stemen, 12/10/2014
- Re: [Coq-Club] Equality, Strub, Pierre-Yves, 12/10/2014
- Re: [Coq-Club] Equality, Cedric Auger, 12/10/2014
- Re: [Coq-Club] Equality, Saulo Araujo, 12/10/2014
- Re: [Coq-Club] Equality, Cedric Auger, 12/11/2014
- Re: [Coq-Club] Equality, Kyle Stemen, 12/10/2014
- Re: [Coq-Club] Equality, Nuno Gaspar, 12/10/2014
Archive powered by MHonArc 2.6.18.