From: Manfred Kerber <M.Kerber@cs.bham.ac.uk>
Dear All,
Being new to Isabelle I have a question about drule_tac:
I have the following proof state:
proof (prove): step 9
goal (1 subgoal):
and want apply drule_tac as follows:
apply(drule_tac sigma = "% y. if y = 1 then 2 else (if y = 2 then 1 else y)"
in allE)
in order to instantiate the universally quantified variable sigma with the
lambda expression %y ...., but get the error:
*** No such variable in theorem: ?sigma
*** At command "apply".
However when I do a similar thing with the toy example
theory ToyList
imports Datatype
begin
lemma example:
"(ALL x. P x) & (P a --> Q b) --> Q b"
apply(rule impI)
apply(erule conjE)
apply(drule_tac x = "a" in allE)
by auto
end
everything works as I except. What do I do wrong? Where can I find
more info on tactics such as drule_tac?
Many thanks
Manfred
+---------------------------------------------------------------+
| Manfred Kerber URL: www.cs.bham.ac.uk/~mmk |
| School of Computer Science e-mail: M.Kerber@cs.bham.ac.uk |
| The University of Birmingham Tel.: (+44)-121-414-4787 |
| Birmingham, B15 2TT, England Fax.: (+44)-121-414-4281 |
+---------------------------------------------------------------+
From: Alexander Krauss <krauss@in.tum.de>
The name "sigma" in (drule_tac sigma = ... in allE) refers to the
variable name in the theorem to be instantiated, that is, allE. So it
must be "x" instead of "sigma".
Hope this helps
Alex
From: Tobias Nipkow <nipkow@in.tum.de>
Hi Manfred,
The "in allE" really means that you instantiate variables in "allE", not
in the proof state. The variable in allE is called "x" (more precisely
"?x", but no need to write the "?").
Best
Tobias
Manfred Kerber schrieb:
Last updated: Nov 21 2024 at 12:39 UTC