type_synonym ('q,'a) LTS = "('q * 'a set * 'q) set"
fun LTS_is_reachable :: "('q, 'a) LTS \<Rightarrow> 'q \<Rightarrow> 'a list \<Rightarrow> 'q \<Rightarrow> bool" where
"LTS_is_reachable \<Delta> q [] q' = (q = q')"|
"LTS_is_reachable \<Delta> q (a # w) q' =
(\<exists>q''. (if (q,{},q'') \<in> \<Delta> then LTS_is_reachable \<Delta> q'' (a # w) q' else (\<exists> \<sigma>. (a \<in> \<sigma> \<and> (q, \<sigma>, q'') \<in> \<Delta> \<and> LTS_is_reachable \<Delta> q'' w q'))))"
Here, I just want to define a transition labeled system which take a triple set, a initial state, a list and a final state. The funtion LTS_is_reachable is to check whether there exists a path start from initial state to final state. The element in triple set can be (q,{a,b},p) which means that if we can get a or b, the state a will be transformed into state b. Also (q,{},p) means that we don't need any to do that, the state a will be transformed into state b automatically. My problem lies on how to define the later transformation. That sounds hard for me.
The difinition above in Isabelle warns that Could not find lexicographic termination order. Any help will be appreciated.