Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Hints and the crush tactic

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Hints and the crush tactic


chronological Thread 
  • From: Adam Koprowski <adam.koprowski AT gmail.com>
  • To: Michael Day <mikeday AT yeslogic.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Hints and the crush tactic
  • Date: Mon, 29 Mar 2010 13:38:40 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=TJ/1pjXgRINxrgHXtQQEnAq9qRd25aktHkAAvxoTQiLLiy+MQhifuY4OQ+e3666asM TdI+PYn3Wdv/565h0QesSjTTOLazjWpiTgiNeQSQH55SZFq2lCSWQuBJuuDiI/05fLQr jqERzB4FMo6fIDwUNAjShnVYpICWtKPM/GWQ8=


   Dear Michael,
 
In my proofs there are often introduced hypotheses like this:

   H : tl1 ++ tl2 = nil

To make progress it is necessary to perform the following steps:

   apply app_eq_nil in H ; destruct H ; subst.

This introduces equalities tl1=nil and tl2=nil and substitutes this into the goal and any other assumptions.

Is it possible to use a hint to encourage the crush tactic to perform such substitutions automatically?

 How about:

  Hint Extern 3 =>
    match goal with
    | H : ?X ++ ?Y = nil |- _ => 
      apply app_eq_nil in H; destruct H; subst
    end : cpdt.

  in general this variant of Hint Extern allows you to register an arbitrary tactic to be executed (after matching the goal).

  Best,
  Adam

--
Adam Koprowski   [http://www.cs.ru.nl/~Adam.Koprowski]
R&D @ MLstate    [http://mlstate.com, 15 rue Berlier, 75013 Paris, France]



Archive powered by MhonArc 2.6.16.

Top of Page