Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?


Chronological Thread 
  • From: Anton Trunov <anton.a.trunov AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Computation and proofs over proof objects | How to prove that two proofs objects are equal?
  • Date: Wed, 24 Apr 2019 18:35:31 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=anton.a.trunov AT gmail.com; spf=Pass smtp.mailfrom=anton.a.trunov AT gmail.com; spf=None smtp.helo=postmaster AT mail-lf1-f47.google.com
  • Ironport-phdr: 9a23:244Zyx+p3VIq9P9uRHKM819IXTAuvvDOBiVQ1KB41u4cTK2v8tzYMVDF4r011RmVBNydtqsP0bSempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffhhEiCC9bL9vIxm6swTcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh8G/YlsN+g61GrhyvqRxx3YzbboKSOvdlYqPdZNYaSXZBXspNVSFMBJ63YYsVD+oGOOZVt5Xwp10SrRu5AwmnGf3hyiVVhn/w2q06zfkqHAbc0wwmA9IOt3LUoM/vO6sITeC11rTIzTPEb/NIwjr9543IfQogofGIR75/bc3RyUw2Gg7Dk16eqpTlMiuL2ugRt2WX9eltWOK1h2I6qgx8oCKjy8guh4XRm44YyVPJ+T9nzIs6O9G0UlB3bN66HJdKtyyXMZZ9TNk4TGFyoik6z6ULuZ6lcygOz5Qq3xvfZOaGc4iM+x7jUOiRLSphiHJrd7+yhQy+8Uenyu37Wcm01EhFojBZndnLs3ABzx3T6s6ZRfth5kqtxyqD2gTJ5uxHIU04j7fXJp8jz7IqmZces1zPHirsl0X3iK+WeF8k+u+t6+n/eLrmoIOcN4hyig3kKKsigNC/Af4lMggIWGib5/+x1LLm/ULjQbVKiuc6nbXesJDfPcgbvLK2AxdJ0oY/7BayFyup0NMBnXUeMF1FfA+HgJPyNlHVIPH4CO+/jE62nDdqwfDGJLzhDY/XInjNireyNYp6vkVb0U84yc1Vz5NSELAIZvzpCWHrs9mNJxklNAr8//z6DtJjntcXX36IBOmQdr/IrFmP+MogJuCNYMkevzOreKtt3OLnkXJswQxVRqKux5ZCMCnlTMQjGF2QZD/XuvlEEWoOuVBjHunjiVnHVTAKInjuAOQz4TY0DI/gBoDGFNj03O6xmRyjF5gTXVhoT0iWGC6xJYqBUvYILimVJ505y21WZf2aU4YkkCqWmkr/wrtjIPDT/3RB553m3dlxoebUkENr+A==

Indeed Eqdep_dec.eq_proofs_unicity is axiom-free.

You can import it from the standard library with
From Coq Require Import Eqdep_dec.

I think the idiomatic way to do it in mathcomp is using eq_irrelevance lemma
from eqtype:

Lemma foo p proof_of another_proof_of :
MC p (proof_of p) = MC p (another_proof_of p).
Proof. by congr MC; apply: eq_irrelevance. Qed.

-Anton


> On 24 Apr 2019, at 18:15, Siddharth Bhat
> <siddu.druid AT gmail.com>
> wrote:
>
> Does that not assume UIP? Is that standard in Coq?
>
> Thanks
> Siddharth
>
> sent from my phone, please excuse any typos!
>
> On Wed, 24 Apr, 2019, 20:37 Gaëtan Gilbert,
> <gaetan.gilbert AT skyskimmer.net>
> wrote:
>
> > proof_of p = another_proof_of p
>
> You should be able to prove that by applying Eqdep_dec.eq_proofs_unicity
>
>
> Gaëtan Gilbert
>
> On 24/04/2019 16:27, Benoît Viguier wrote:
> > Dear all,
> >
> > I have a type defined in the following kind:
> >
> > Definition oncurve (p : point K) := ( match p with |
> > EC_Inf => true | EC_In x y => M#b * y^+2 == x^+3 + M#a * x^+2 + x
> > end). Inductive mc : Type := MC p of oncurve p. Coercion
> > point_of_mc p := let: MC p _ := p in p.
> >
> > and at some point I am trying to prove that :
> >
> > MC p (proof_of p) = MC p (another_proof_of p).
> >
> > Reflexivity do not work in this case because : (proof_of_p p) and
> > (another_proof_of p) while being the same in some senses are not the
> > same object.
> >
> > However by doing f_equal, the goal becomes:
> >
> > proof_of p = another_proof_of p
> >
> > I can unfold both of them and the subsequent definitions, applying a
> > compute leads me to the following state:
> >
> > match match introTF (c:=true) idP (equivPif idP (fun
> > _view_subject_ : true = true => _view_subject_) (fun
> > _view_subject_ : true = true => _view_subject_)) in (_ = y) return
> > (y = true) with | Logic.eq_refl => Logic.eq_refl end in (_ = y)
> > return (y = true) with | Logic.eq_refl => match introTF
> > (c:=true) idP (equivPif idP (fun _view_subject_ : true = true =>
> > _view_subject_) (fun _view_subject_ : true = true =>
> > _view_subject_)) in (_ = y) return (y = true) with |
> > Logic.eq_refl => Logic.eq_refl end end = is_true_true
> >
> > Thus my question would be is there anyway to un-opaque those last part ?
> > It says that introTF is defined as Opaque, thus Transparent does not go
> > through either. How can I proceed forward?
> >
> > From which I cannot work further as introTF etc are opaque. Is there
> > any other way I can prove my equality?
> >
> > Thanks a lot for any help or insight you can provide me with.
> >
> > Kind Regards,
> >
> > Benoit Viguier.
> >




Archive powered by MHonArc 2.6.18.

Top of Page