I am just starting my first steps with Isabelle but, being new to theorem provers and proof assistants, I am a bit lost. I am mainly interested in applications to Functional Analysis or Algebra I looked at the documentation, and I am trying to get my own example using locales to work, but I ran into some very basic problems. My code is
theory MyTheory
imports Main
begin
locale semigroup_mult =
fixes f :: "'a ⇒ 'a ⇒ 'a" (infixl "x" 70)
and e :: 'a ("e")
assumes assocm : "a x b x c = a x (b x c)"
and right_neutralm : "(a x e) = a"
and left_neutralm : "(e x a) = a"
begin
lemma assoc_general: "b x (a x c) = (b x a) x c"
apply (rule assocm)
done
end
end
This is just a one step proof, but I cannot make Isabelle to work... If I remove the apply line, it says it cannot complete the proof, and the apply command gives the error
Illegal application of proof command in "prove" mode
What am I doing wrong? Any help would be appreciated. For instance the difference between using the "show ... by" syntax and the "apply" syntax, "proof ... qed" and "done".
A secondary question is if it is possible for Isabelle to output proofs similar to what one might find in a undergraduate Math textbook.