I was trying to prove:
lemma
shows "¬ ev (Suc 0)"
I did:
lemma
shows "¬ ev (Suc 0)"
proof (rule notI)
assume "ev (Suc 0)"
then show False
proof
and it gave me really pretty goals:
proof (state)
goal (2 subgoals):
1. Suc 0 = 0 ⟹ False
2. ⋀n. ⟦Suc 0 = Suc (Suc n); ev n⟧ ⟹ False
that could probably make my proof readable.
It seems it applied some sort of cases in the background. But when I wrote cases the proof finished immediately instead of showing the above rule inversion cases explicitly. See:
lemma
shows "¬ ev (Suc 0)"
proof (rule notI)
assume "ev (Suc 0)"
then show False
proof (cases)
which shows:
proof (state)
goal:
No subgoals!
which means I can just place a qed
.
How can I figure out exactly what (introduction?) rules Isar is doing automatically in Isabelle?