Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] ltac problem

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] ltac problem


chronological Thread 
  • From: Arthur Chargu�raud <arthur AT chargueraud.org>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] ltac problem
  • Date: Fri, 16 Mar 2012 17:28:18 +0100



Ltac so H := solve [H].

Lemma wtf:
  false = true -> False.
Proof.
  intro. so congruence.  (*fails here*)

I do not understand why the above fails. Help please :)

Hi, I think it's a kind of scoping problem. I usually use "tactic notation" 
to avoid this issue:
-------
Tactic Notation "so" tactic(H) := solve [H].

Lemma wtf:
  false = true -> False.
Proof.
  intro. so congruence.
-------

Alternatively, you can you "ltac:()" to locally change the scope:
-------
Ltac so H := solve [H].

Lemma wtf:
  false = true -> False.
Proof.
  intro. so ltac:(congruence).
-------

Best,
Arthur



Archive powered by MhonArc 2.6.16.

Top of Page