Hi I am a novice trying to learn how to use coinduction in isabelle. I have been looking at HOL/Datatype_Examples/Process.thy (Andrei Popescu) 2012. As 2019 Isabelle is much improved (and not because of any personal skill) I have simplified the proof but still can not understand why they decided to make the first step.
The working simplified proof is
lemma solution_PROC[simp]: "solution sys (PROC p) = p"
proof-
{fix q assume "q = solution sys (PROC p)" (* How did they know to do this! *)
hence "p = q"
proof (coinduct rule: process.coinduct)
case (Eq_process process process')
then show ?case
by simp
qed
}
thus ?thesis by metis
qed
My failed naive approach was:
lemma solution_PROCFail: " p = solution sys (PROC p)"
proof (coinduct rule: process.coinduct) (* look up process.coinduct and
you can see the extra goal forced by the misalignment*)
case Eq_process
then show ?thesis (* cannot solve*)
qed
Two questions:
- is the syntax {fix q assume "q = solution sys (PROC p)" .....} old syntax for a local lemma?
And more importantly 2. How will I know when to try this technique?
many thanks david