src/HOL/Codatatype/Examples/Infinite_Derivation_Trees/Tree.thy
changeset 49222 cbe8c859817c
parent 49220 a6260b4fb410
child 49463 83ac281bcdc2
equal deleted inserted replaced
49221:6d8d5fe9f3a2 49222:cbe8c859817c
   175 unfolding TTree_coit_def by simp
   175 unfolding TTree_coit_def by simp
   176 
   176 
   177 theorem TTree_coit:
   177 theorem TTree_coit:
   178 "root (TTree_coit rt ct b) = rt b"
   178 "root (TTree_coit rt ct b) = rt b"
   179 "ccont (TTree_coit rt ct b) = map_fset (id \<oplus> TTree_coit rt ct) (ct b)"
   179 "ccont (TTree_coit rt ct b) = map_fset (id \<oplus> TTree_coit rt ct) (ct b)"
   180 using Tree.unf_coiter[of "<rt,ct>" b] unfolding Tree_coit_coit fst_convol snd_convol
   180 using Tree.unf_coiters[of "<rt,ct>" b] unfolding Tree_coit_coit fst_convol snd_convol
   181 unfolding pre_Tree_map' fst_convol' snd_convol'
   181 unfolding pre_Tree_map' fst_convol' snd_convol'
   182 unfolding Tree_unf_root_ccont by simp_all
   182 unfolding Tree_unf_root_ccont by simp_all
   183 
   183 
   184 (* Corecursion, stronger than coiteration *)
   184 (* Corecursion, stronger than coiteration *)
   185 definition TTree_corec ::
   185 definition TTree_corec ::
   192 unfolding TTree_corec_def by simp
   192 unfolding TTree_corec_def by simp
   193 
   193 
   194 theorem TTree_corec:
   194 theorem TTree_corec:
   195 "root (TTree_corec rt ct b) = rt b"
   195 "root (TTree_corec rt ct b) = rt b"
   196 "ccont (TTree_corec rt ct b) = map_fset (id \<oplus> ([[id, TTree_corec rt ct]]) ) (ct b)"
   196 "ccont (TTree_corec rt ct b) = map_fset (id \<oplus> ([[id, TTree_corec rt ct]]) ) (ct b)"
   197 using Tree.unf_corec[of "<rt,ct>" b] unfolding Tree_unf_corec_corec fst_convol snd_convol
   197 using Tree.unf_corecs[of "<rt,ct>" b] unfolding Tree_unf_corec_corec fst_convol snd_convol
   198 unfolding pre_Tree_map' fst_convol' snd_convol'
   198 unfolding pre_Tree_map' fst_convol' snd_convol'
   199 unfolding Tree_unf_root_ccont by simp_all
   199 unfolding Tree_unf_root_ccont by simp_all
   200 
   200 
   201 
   201 
   202 subsection{* The characteristic theorems transported from fset to set *}
   202 subsection{* The characteristic theorems transported from fset to set *}