Slawomir already answers the main question of how to refer to assumptions in Isar proofs. (Usually, one does not use the proof method assumption
for this.)
I'll try to answer the connected side-question by Gergely how to apply the proof method assumption
:
What is an assumption in Isar that can be solved by apply assumption
?
The proof method assumption
basically says that one of the things in the left-hand-side of the proof state for the particular line matches the current right-hand-side of the goal. This might not be a verbatim match and can require some instantiations or unifications.
Consequently, we must massage the from/using-part of an Isar proof to match the target if we want to perform a step by assumption
. This could look like this:
lemma
assumes ‹A› shows ‹A ∧ A›
proof -
from conjI[OF ‹A› ‹A›] show ‹A ∧ A› by assumption
qed
The [OF ...]
modifier discharges premises in a rule with facts. (The order matters. It's like function application if you see premises as inputs.) Thus, conjI[OF ‹A› ‹A›]
is (verbatim) A ∧ A
, matching the goal. Therefore, by assumption
can finish the proof step.
So, by assumption
is about the most trivial proof step one can think of. In Isar however, it is common to use the special notation .
for trivial / immediate proof steps. Therefore, the following would be more idiomatic Isar:
lemma
assumes ‹A› shows ‹A ∧ A›
using conjI[OF ‹A› ‹A›] .
Actually, the immediate proof method .
is even more powerful than the method assumption
as it can use higher-order modus ponens, taking the first fact of the line as a rule. This means, we can do without the OF
:
lemma
assumes ‹A› shows ‹A ∧ A›
using conjI ‹A› ‹A› .
The same would not be possible with the assumption
method. (.
is equivalent to by this
in apply-style.)
Generally, I would suggest to forget about the methods assumption
and this
in Isar proofs, and just use .
to discharge trivial steps. You do not need the two, and their naming is indeed confusing because it clashes with Isar's reserved names for specific facts, namely assms
for the assumes
-part of a lemma and this
for the last fact established.