Recently, I have learned the inductive predicate of Isabelle, like even and the reflexive transitive clousre. It seems that we can easily derive the cases that the predicate hold, but when we need to prove some case that inductive predicate not hold, it can not work easily.
And I have done a case like below, a LTS system is used to accept list which can finally arrived. The notJoinLTSlemma lemma is hard for me to prove. Any help would be appreciated.
type_synonym ('q,'a) LTS = "('q * 'a set * 'q) set"
inductive LTS_is_reachable :: "(('q, 'a) LTS * ('q * 'q) set) ⇒ 'q ⇒ 'a list ⇒ 'q ⇒ bool" where
LTS_Empty[intro!]:"LTS_is_reachable Δ q [] q"|
LTS_Step1[intro!]:"(∃q''. (q, q'') ∈ snd Δ ∧ LTS_is_reachable Δ q'' l q') ⟹ LTS_is_reachable Δ q l q'" |
LTS_Step2[intro!]:"(∃q'' σ. a ∈ σ ∧ (q, σ, q'') ∈ fst Δ ∧ LTS_is_reachable Δ q'' w q') ⟹ LTS_is_reachable Δ q (a # w) q'"
lemma joinLTSlemma:"LTS_is_reachable l q x p ⟹ LTS_is_reachable l p y q''⟹ LTS_is_reachable l q (x@y) q''"
proof (induction rule: LTS_is_reachable.induct)
case (LTS_Empty Δ q)
then show ?case by auto
next
case (LTS_Step1 q Δ l q')
then show ?case by auto
next
case (LTS_Step2 a q Δ w q')
then show ?case by auto
qed
lemma notJoinLTSlemma:"LTS_is_reachable l q x p ⟹ ¬ LTS_is_reachable l p y q''⟹ ¬ LTS_is_reachable l q (x@y) q''"
nitpick