Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] proving UIP on decidable domains

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] proving UIP on decidable domains


Chronological Thread 
  • From: e+coq-club AT x80.org (Emilio Jesús Gallego Arias)
  • To: Jonathan Leivent <jonikelee AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] proving UIP on decidable domains
  • Date: Thu, 15 Dec 2016 21:43:48 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=e+coq-club AT x80.org; spf=Neutral smtp.mailfrom=e+coq-club AT x80.org; spf=None smtp.helo=postmaster AT cc-tupan-roaming-a.ensmp.fr
  • Ironport-phdr: 9a23:OgfWbhJc7Z4CqA+pxdmcpTZWNBhigK39O0sv0rFitYgUKvjxwZ3uMQTl6Ol3ixeRBMOAuqkC1bud7/uoGTRZp83e4DZaKN0EfiRGoPtVtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blItdaymUrLV2uaw0emu+5TVKyFFhSSwZ686eBexqwTSu80bjKNtL68wzl3CpX4eKMpMwmY9KBGYmA+57cOt9rZzo3wWvOguv45tVKT+fqNwb7FDni9uHGkx4MDkslHqVwqG/TpPAS0tjhNUDl2dv1nBVZDrv36iuw==
  • Organization: X80 Heavy Industries

Jonathan Leivent
<jonikelee AT gmail.com>
writes:

> That's great! Inference of pattern matching annotations is nice,
> although I'm confused about when to anticipate them. Also, too bad I
> can't get similar support via destruct f, g - which is what I end up
> doing most of the time anyway.

Well, destruct will work if you actually state the more general lemma:

From Coq Require Import Eqdep Eqdep_dec.

Inductive Foo : unit -> Set := foo : Foo tt.

Lemma unit_dec (x y : unit) : {x = y} + {x <> y}.
Proof. decide equality. Qed.

Lemma foo_eqd w1 w2 (f : Foo w1) (g : Foo w2) : eq_dep _ _ w1 f w2 g.
Proof. now destruct f, g. Qed.

Lemma foo_eq (f g : Foo tt) : f = g.
Proof. now apply (eq_dep_eq_dec unit_dec), foo_eqd. Qed.

which IMO is a good idea to do, even if a bit cumbersome.

E.



Archive powered by MHonArc 2.6.18.

Top of Page