coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Stéphane Glondu <steph AT glondu.net>
- To: Michael <michaelschausten AT googlemail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Match goal with
- Date: Sun, 15 Aug 2010 18:26:28 +0200
- Openpgp: id=49881AD3
Le 15/08/2010 18:15, Michael a écrit :
> I tried to automatize it with Ltac like this:
> Ltac myTac:=
> match goal with
> |- func ?x (?y) =>
> replace (func x y) with (func x y - 1 + 1)
> end.
This will match only goals with "func" as head symbol. If you want to
match "func" in any context, you should use:
Ltac myTac:=
match goal with
|- context [ func ?x (?y) ] =>
replace (func x y) with (func x y - 1 + 1)
end.
It will then match "x * func a (b+c) <= y * z", for example.
Cheers,
--
Stéphane
- [Coq-Club] Match goal with, Michael
- Re: [Coq-Club] Match goal with, Stéphane Glondu
- Re: [Coq-Club] Match goal with, Adam Chlipala
Archive powered by MhonArc 2.6.16.