coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Daniel Schepler <dschepler AT gmail.com>
- To: Leonardo Rodriguez <leonardomatiasrodriguez AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] is this lemma provable?
- Date: Sun, 17 Mar 2013 07:49:16 -0700
On Sat, Mar 16, 2013 at 5:31 PM, Leonardo Rodriguez
<leonardomatiasrodriguez AT gmail.com>
wrote:
> Hello,
>
> 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.
Here's another proof that's a bit closer to the wire than Adam's proof:
Lemma unprovable :
forall q : H a, q = b.
Proof.
assert (forall (a':T) (q':H a'),
match a' as a'' return (H a'' -> Prop) with
| a => fun q'' => q'' = b
end q').
destruct q'.
reflexivity.
exact (H0 a).
Qed.
And if you unfold the resulting proof term a bit, you get:
Definition unprovable' : forall q : H a, q = b :=
fun q:H a =>
match q as q' in (H a') return
(match a' as a'' return (H a'' -> Prop) with
| a => fun q'' => q'' = b
end q') with
| b => eq_refl
end.
(Shameless plug: This wasn't too hard to come up with by following the
principles of the EqualityFreeInversion page on the wiki.)
--
Daniel Schepler
- [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.