Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Variable Capture in Ltac

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Variable Capture in Ltac


chronological Thread 
  • From: Lionel Elie Mamane <lionel AT mamane.lu>
  • To: Coq Club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Variable Capture in Ltac
  • Date: Thu, 22 Dec 2005 13:50:22 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

On Thu, Dec 22, 2005 at 12:20:36PM +0100, Lionel Elie Mamane wrote:

> Ltac seems to protect me from variable capture. Is there any way to
> achieve variable capture when one wants it?

> E.g. if my current goal is "f x"

I managed to avoid variable capture by doing:

pattern x.
match goal with |- ?foo ?x =>
  apply K_dec with (P:=foo).
end.

That's the idea. But it doesn't work and I don't understand
why. Because this works:

pattern x.
match goal with |- ?foo ?x =>
  pose (O:=foo)
end.
apply K_dec with (P:=O); unfold O;
clear O.

And this doesn't:

pattern x.
match goal with |- ?foo ?x =>
  pose (foo:=foo)
end.

Does someone understand what's happening? The error message I get is:

User error: No matching clauses for match goal
            (use "Debug On" for more info)

-- 
Lionel




Archive powered by MhonArc 2.6.16.

Top of Page