Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern
  • Date: Wed, 7 Sep 2016 12:39:06 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f182.google.com
  • Ironport-phdr: 9a23:lHROPh1iVuBCInJRsmDT+DRfVm0co7zxezQtwd8ZsesRLvad9pjvdHbS+e9qxAeQG96KsrQa0qGH7uigATVGusnR9ihaMdRlbFwst4Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbre9JomHhMOukuu25pf7YgNShTP7b6khAg+xqFDzsc8fnYtrLO4VxxrXr31UM7BUwmVpJl+XkhvU6cK5/Zol+CNV7aFyv/VcWLn3KvxrBYdTCy4rZjg4



On 09/07/2016 12:28 PM, Gaetan Gilbert wrote:

>For instance, one can prove forall (x:True), x = I, but not:
>
>Inductive Foo : unit -> Prop := foo : Foo tt.
>
>Goal forall (f : Foo tt), f = foo.

You can actually.


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

Definition foo_transport : forall (x : unit) (y : unit), Foo x -> Foo y.
Proof.
intros [] [];trivial.
Defined.

Goal forall (f : Foo tt), f = foo.
Proof.
assert (H : forall x y (a : Foo x) (b : Foo y), foo_transport _ _ a = b).
intros x y [] [].
reflexivity.
intros.
etransitivity.
- symmetry. apply H.
- apply H.
Unshelve.
+ exact tt.
+ exact f.
Defined.

Gaëtan Gilbert

OK - should have seen that coming. That's a lot like proving UIP for unit.

What I should have said is that you can't prove:

Variable A : Set.
Variable a : A.
Inductive Foo : A -> Prop := foo : Foo a.
Goal forall (f : Foo a), f = foo.

even though there really is only the one foo : Foo a.

-- Jonathan





Archive powered by MHonArc 2.6.18.

Top of Page