Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Globally-nameless tactics: Getting rid of the verbose Ltac [match goal with] construct

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Globally-nameless tactics: Getting rid of the verbose Ltac [match goal with] construct


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Globally-nameless tactics: Getting rid of the verbose Ltac [match goal with] construct
  • Date: Mon, 26 Jan 2015 11:31:17 -0500


On 01/26/2015 11:25 AM, Jonathan Leivent wrote:
...
Goal True.
assert (True \/ False \/ True) as P1 by tauto.
assert (True \/ True \/ False) as P2 by tauto.
assert (False \/ False \/ True) as P3 by tauto.
assert (True \/ False \/ False) as P4 by tauto.
Fail shape (xsh x y, x \/ x \/ y)
ltac:(fun H X => hypntype H; idtac X; let Y:=nthxsh 1 X in idtac Y); fail.
repeat shape (xsh x y, x \/ x \/ y)
ltac:(fun H X => hypntype H; clear H; let Y:=nthxsh 0 X in idtac Y).

-- Jonathan


Oops - sorry. That "hypntype" tactic is just:

Ltac hypntype H := let t:=type of H in idtac H ":" t.




Archive powered by MHonArc 2.6.18.

Top of Page