coq-club AT inria.fr
Subject: The Coq mailing list
List archive
RE: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?
Chronological Thread
- From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: RE: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?
- Date: Thu, 18 Aug 2016 09:31:25 +0000
- Accept-language: de-DE, en-US
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=michael.soegtrop AT intel.com; spf=Pass smtp.mailfrom=michael.soegtrop AT intel.com; spf=None smtp.helo=postmaster AT mga04.intel.com
- Ironport-phdr: 9a23:llrd/R87kvuBfv9uRHKM819IXTAuvvDOBiVQ1KB92uscTK2v8tzYMVDF4r011RmSDNydsakP0rCK++C4ACpbsM7H6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpqsSVOV4D3WDhKfMqdVPt/F2X7pFXyaJZaY8JgiPTpXVJf+kEjUhJHnm02yjG28Gr4ZR4+D5Rsf9yv+RJUKH9YrhqBecAVGduYCgJ45ihvh7aCACL+3E0U2MMkxMODRKPpEXxWY60uS/nvMJ83jObNIv4V+Zndy6l6vIhcxjlhzsdMCZ9uETWgcx5gaYR6Eakphd/yoPQJpqSOfViZKTFVdIcWWdFGM1WUnoSUcuHc4ITAr9Zbq5jpI7nqg5WoA==
Dear Amin,
my question was about the “have” in “has decidable equality”. What does make the decidable equality of a type available, so that Coq “has” it? There are lemmas like list_eq_dec in the standard library, but just having a lemma is not enough for Coq using it somehow automatically.
I would expect that this is done via class type instances, e.g. for nat and list, but I couldn’t find a class type for decidable equality in the standard library, and even less instances for such a class type.
Best regards,
Michael
From: coq-club-request AT inria.fr [mailto:coq-club-request AT inria.fr]
On Behalf Of Amin Timany
Hi Micheal,
Decidable equality for A means that you can prove forall (x y : A), {x = y} + {~ x = y}. We can prove in general that if we have decidable equality for a type A for any two terms x y : A and H1 H2 : x = y, we have H1 = H2. This is proven in the library of Coq (https://coq.inria.fr/library/Coq.Logic.Eqdep_dec.html). I also once (just as an exercise) proved these theorems from scratch which you can find at https://gist.github.com/amintimany/798a096e2f2ff0582b36. What you are getting here in these proofs is (more or less) the same kind of proof for specific A x and y. In other words, when A is an inductive type with decidable equality and x and y are constructors Coq can figure (as hugo explained) the proof out.
Regards, Amin
Intel Deutschland GmbH |
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, (continued)
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jason Gross, 08/17/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jean-Marie Madiot, 08/17/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Hugo Herbelin, 08/17/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jason Gross, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jonathan Leivent, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jason Gross, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jean-Marie Madiot, 08/17/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Maxime Dénès, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Hugo Herbelin, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jason Gross, 08/17/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Amin Timany, 08/18/2016
- RE: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Soegtrop, Michael, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Guillaume Melquiond, 08/18/2016
- RE: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Soegtrop, Michael, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jonathan Leivent, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Pierre Courtieu, 08/18/2016
- RE: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Soegtrop, Michael, 08/18/2016
- Re: [Coq-Club] Proof irrelevance for equalities - is there a trick without axioms?, Jason Gross, 08/18/2016
Archive powered by MHonArc 2.6.18.