src/HOL/Datatype_Examples/Derivation_Trees/Gram_Lang.thy
changeset 63170 eae6549dbea2
parent 63167 0909deb8059b
child 66453 cc19f7ca2ed6
equal deleted inserted replaced
63169:d36c7dc40000 63170:eae6549dbea2
   478 
   478 
   479 lemma wf_deftr: "wf (deftr n)"
   479 lemma wf_deftr: "wf (deftr n)"
   480 proof-
   480 proof-
   481   {fix tr assume "\<exists> n. tr = deftr n" hence "wf tr"
   481   {fix tr assume "\<exists> n. tr = deftr n" hence "wf tr"
   482    apply(induct rule: wf_raw_coind) apply safe
   482    apply(induct rule: wf_raw_coind) apply safe
   483    unfolding deftr_simps image_comp map_sum.comp id_comp
   483    apply (simp only: deftr_simps image_comp map_sum.comp id_comp
   484    root_o_deftr map_sum.id image_id id_apply apply(rule S_P)
   484    root_o_deftr map_sum.id image_id id_apply) apply(rule S_P)
   485    unfolding inj_on_def by auto
   485    unfolding inj_on_def by auto
   486   }
   486   }
   487   thus ?thesis by auto
   487   thus ?thesis by auto
   488 qed
   488 qed
   489 
   489