coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] is this lemma provable?
- Date: Sat, 16 Mar 2013 20:53:18 -0400
Yes, it's provable. For an explanation of what's going on in this proof, and also of the problems you probably ran into originally, I recommend Chapter 10 of CPDT <http://adam.chlipala.net/cpdt/>.
Require Import Eqdep_dec.
Lemma T_dec : forall x y : T, {x = y} + {x <> y}.
decide equality.
Qed.
Lemma unprovable' :
forall x (q : H x) Heq, q = match Heq in _ = T return H T with eq_refl => b end.
Proof.
destruct q.
intros.
rewrite (UIP_dec T_dec Heq eq_refl).
reflexivity.
Qed.
Lemma unprovable :
forall q : H a, q = b.
Proof.
intros; rewrite (unprovable' a q eq_refl); reflexivity.
Qed.
On 03/16/2013 08:31 PM, Leonardo Rodriguez wrote:
Consider the following types:
Inductive T : Type :=
a : T.
Inductive H : T -> Type :=
b : H a.
I have proved this trivial lemma:
Lemma provable :
forall x : T, x = a.
Proof.
intro x.
destruct x.
auto.
Qed.
But I couldn't prove this one:
Lemma unprovable :
forall q : H a, q = b.
Proof.
intro q.
Abort.
Could anyone explain me why? Has to do with proof irrelevance?
Thank you in advance.
- [Coq-Club] is this lemma provable?, Leonardo Rodriguez, 03/17/2013
- Re: [Coq-Club] is this lemma provable?, Adam Chlipala, 03/17/2013
- Re: [Coq-Club] is this lemma provable?, Thierry Martinez, 03/17/2013
- Re: [Coq-Club] is this lemma provable?, Adam Chlipala, 03/18/2013
- [Coq-Club] Second Call for Papers, PxTP 2013, Laurent Théry, 03/18/2013
- Re: [Coq-Club] is this lemma provable?, Adam Chlipala, 03/18/2013
- Re: [Coq-Club] is this lemma provable?, Thierry Martinez, 03/17/2013
- Re: [Coq-Club] is this lemma provable?, Daniel Schepler, 03/17/2013
- Re: [Coq-Club] is this lemma provable?, Adam Chlipala, 03/17/2013
Archive powered by MHonArc 2.6.18.