Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How to make Coq ``see'' emptyness of inductively defined Props?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How to make Coq ``see'' emptyness of inductively defined Props?


Chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: Wolfram Kahl <kahl AT cas.mcmaster.ca>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] How to make Coq ``see'' emptyness of inductively defined Props?
  • Date: Mon, 23 Jul 2012 11:56:59 -0400

On 07/23/2012 11:43 AM, Wolfram Kahl wrote:
``gallais'' wrote:

> Lemma IsSome_extract : forall A (x : option A), IsSome x -> { r | x =
Some r }.
> Proof.
> intros A x Hx ; destruct x.
> exists a ; reflexivity.
> apply False_rect.
> inversion Hx.
> Qed.

(That additional equation is indeed essential, and I also had produced
it for the other definition in the meantime.)
I found it surprising that ``inversion Hx'' works here,
while in my attempt (without the False_rect of gallais),
it produces a sort error.

The key is that he first applied [False_rect] to move into [Prop]. (This is exactly the Curry-Howard analogue of my advice.)

P.S.: I really advise _not_ using tactics to build dependently typed definitions with computational content.



Archive powered by MHonArc 2.6.18.

Top of Page