src/HOL/Library/Graphs.thy
changeset 23755 1c4672d130b1
parent 23416 b73a6b72f706
child 23854 688a8a7bcd4e
equal deleted inserted replaced
23754:75873e94357c 23755:1c4672d130b1
   319 
   319 
   320 subsection {* Finite Paths *}
   320 subsection {* Finite Paths *}
   321 
   321 
   322 types ('n, 'e) fpath = "('n \<times> ('e \<times> 'n) list)"
   322 types ('n, 'e) fpath = "('n \<times> ('e \<times> 'n) list)"
   323 
   323 
   324 inductive2  has_fpath :: "('n, 'e) graph \<Rightarrow> ('n, 'e) fpath \<Rightarrow> bool" 
   324 inductive  has_fpath :: "('n, 'e) graph \<Rightarrow> ('n, 'e) fpath \<Rightarrow> bool" 
   325   for G :: "('n, 'e) graph"
   325   for G :: "('n, 'e) graph"
   326 where
   326 where
   327   has_fpath_empty: "has_fpath G (n, [])"
   327   has_fpath_empty: "has_fpath G (n, [])"
   328 | has_fpath_join: "\<lbrakk>G \<turnstile> n \<leadsto>\<^bsup>e\<^esup> n'; has_fpath G (n', es)\<rbrakk> \<Longrightarrow> has_fpath G (n, (e, n')#es)"
   328 | has_fpath_join: "\<lbrakk>G \<turnstile> n \<leadsto>\<^bsup>e\<^esup> n'; has_fpath G (n', es)\<rbrakk> \<Longrightarrow> has_fpath G (n, (e, n')#es)"
   329 
   329