Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Writing tactics with dependent destruction

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Writing tactics with dependent destruction


chronological Thread 
  • From: Gyesik Lee <gslee AT ropas.snu.ac.kr>
  • To: Matthieu Sozeau <mattam AT mattam.org>
  • Cc: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Writing tactics with dependent destruction
  • Date: Sun, 20 Jun 2010 02:29:36 +0900
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Nqg+MgBLoyuLUxFQUZMQxmXsb8CaW9YWyW6CeuZrn/EKdnrhGJJQcB7EbW7qXKr7p1 70tVzUzfFtZBfb86y7llg2yl2zsjqxR3ZWfiFluqMVcrAzmWGeOqqAluIHKXwm8o/Hp+ wGcxnGvsYacNTaBaBMHI/2yFNF5rOsienaxU8=

Hi Matthieu,

many thanks for the quick answer.

> If you redefine the notation like this it works:
>
> Tactic Notation "dependent" "destruction" hyp(H) :=
>  do_depelim' ltac:(fun hyp => do_case hyp) H.

Is "do_depelim'" included in the Coq 8.3?
(In Coq 8.2pl1, it doesn't seem to be.)

> In any case, you can use the underlying tactical directly which has no such 
> problems.

Sorry, understanding tacticals is still a hard work for me.

>
>>
>> 2) Is there a way to use "dependent destruction" with "as" like
>> "inversion H as ..." or "destruct H as ... "?
>
> By customizing the tactical I suppose yes. Have a look at the end of 
> Program.Equality for ideas (e.g. the [using] variants).
>

Thanks for hints.


>> 3) (not relevant to dependent destruction)
>>
>> Suppose, during a proof, you have assumptions as follows
>>
>> H : forall (x : A), Q x -> P x x
>> a : A
>> H0 : Q a
>>
>> How would you write a tactic which generates a new assumption (H1 : P a a)?
>
> assert(H1:=H _ H0)? Or you mean how to match on the goal?
>

I meant "matching on the goal".




Archive powered by MhonArc 2.6.16.

Top of Page