Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] injectivity of constructors

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] injectivity of constructors


Chronological Thread 
  • From: Jasper Hugunin <jasperh AT cs.washington.edu>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] injectivity of constructors
  • Date: Thu, 13 Dec 2018 19:58:24 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasperh AT cs.washington.edu; spf=None smtp.mailfrom=jasperh AT cs.washington.edu; spf=None smtp.helo=postmaster AT mail-ot1-f41.google.com
  • Ironport-phdr: 9a23:lKevOx3r6HvEOy9SsmDT+DRfVm0co7zxezQtwd8Zse0TIvad9pjvdHbS+e9qxAeQG9mDu7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLnhykHODw5/m/ZicJ+kbxVrw66qhNl34LZepuYOOZicq7fe94RWGpPXtxWVyxEGo6ya5EAD/EZPelGtYn2ulkArQaxBQmxAuPvyzlIjWLx0K04yeshChnG0xI6H9IOq3nbsM71OL0cUO+v16nIzTTDb/VZ2Tfh74jIdAotru+RUrJtaMfcz1QkGQ3CjlWVs4PlPjWV2/wMs2id9epgVPigh3QpqwFrpDWk28QiipHRi44L1lzJ8T91zYU1KNGiVkJ3fMKoHIFfui2HMYZ9X9ksTHtyuCkgz70LoZ67czYOyJQg3xPfbuaIc4mM4h76U+aRPSp0iGtreL+wmhq+60egyur7Vsm71FZFsDBJncXLtnAIzxDT686HReVh/kq5xzqDywTe5vtHLE00j6bXNYMtzqIqmpccrEjPBir2l1/3jK+SeEUk4O+o6+H/b7XkvJCcLJd0hR/kMqQugcGwHf84PhIAXmeB4uS81Lzj/Uv2QLVWif02lLPVv47HKsQGvqK5GRNa0p4/6xajCDeryMgXnX4eLF5cZB2Hi5XpNErVLfDjDfa/hkysny1xy/DHOL3hGJTNIWLZnLfvZ7Yuo3JbnQE01JVU449eIrAHOvP6HEHr5/LCCRpsEQWv2+v9QPVg2Z4YWGTHVq2QK7vfq1+g7flpPOCXZI4Ttyr6Lb4o6+O43ixxokMUYaT8hchfU3u/BPkzexzIM0qpuc8IFCIxhiR7SeXrjFOYVjsKNiS5ROQj7yo7CYSpEYDFAI2hne7ZhXvpLthtfmlDT2u0PzLwbYzdCqUHc2SNK9RhkzoLSb+nDYItyEP27VKo+/9cNuPRvxYgm9fj2dxyvbCBkBgz8XlzE53Y3T3UCW5zmWwMSnk926Ut+UE=

Ah, except you are trying to go in the reverse direction as I initially read the question. Sorry for my misunderstanding.
As others have said, this works for any function, not just constructors.

- Jasper Hugunin

On Thu, Dec 13, 2018 at 7:55 PM Jasper Hugunin <jasperh AT cs.washington.edu> wrote:
To use injection in the way you want to, you need to specify a term. Please do check the docs. Here is a minimal working example:
```
Goal forall a b c d : nat, pair a b = pair c d -> (a = c) * (b = d).
intros a b c d H.
injection H.
intros e2 e1.
exact (pair e1 e2).
Qed.
```

- Jasper Hugunin

On Thu, Dec 13, 2018 at 7:15 PM Jeremy Dawson <Jeremy.Dawson AT anu.edu.au> wrote:
Thanks all for the various replies, but injection doesn't work,
giving error
Ltac call to "injection" failed.
Error: Not a negated primitive equality.

Jeremy

On 12/14/2018 02:07 PM, Jasper Hugunin wrote:
> `injection` seems to fit your description, see
> https://coq.inria.fr/refman/proof-engine/tactics.html#coq:tacn.injection.
>
> - Jasper Hugunin
>
> On Thu, Dec 13, 2018 at 4:54 PM Lily Chung <ikdc AT mit.edu
> <mailto:ikdc AT mit.edu>> wrote:
>
>     That follows from general properties of equality, and has nothing to
>     do with constructors.  Try f_equal.
>



Archive powered by MHonArc 2.6.18.

Top of Page