theory RulesOfTheGameInClass
imports Main
begin
theorem "(p \ q) \ (p \ q)"
apply (rule impI)
apply (erule conjE)
apply (rule disjI1)
apply assumption
done
theorem "(p \ q) \ (p \ q)"
proof (rule impI)
assume 1: "p \ q"
from 1 have 2: "p" by (rule conjunct1)
from 2 show "p \ q" by (rule disjI1)
qed
theorem "(p \ q) \ (p \ r) \ (q \ r) \ r"
apply (rule impI)
apply (erule conjE)+
apply (erule disjE)
apply (erule mp)
apply assumption
apply (erule_tac P=q and Q=r in mp)
apply assumption
done
theorem
assumes 1: "\ x. man(x) \ human(x)"
and 2: "\ x. human(x) \ hastwolegs(x)"
shows "\ x. man(x) \ hastwolegs(x)"
proof (rule allI)
fix y
show "man y \ hastwolegs y"
apply (rule impI) (* in tactics mode *)
proof - (* back into Isar mode *)
assume 3: "man y"
from 1 have "man y \ human y" by (rule spec)
from this 3 have 4: "human y" by (rule mp)
from 2 4 show "hastwolegs y" by blast
qed
qed
end