src/HOL/Basic_BNFs.thy
changeset 55811 aa1acc25126b
parent 55707 50cf04dd2584
child 55931 62156e694f3d
equal deleted inserted replaced
55810:63d63d854fae 55811:aa1acc25126b
   156 next
   156 next
   157   show "cinfinite natLeq" by (rule natLeq_cinfinite)
   157   show "cinfinite natLeq" by (rule natLeq_cinfinite)
   158 next
   158 next
   159   fix x
   159   fix x
   160   show "|{fst x}| \<le>o natLeq"
   160   show "|{fst x}| \<le>o natLeq"
   161     by (metis ordLess_imp_ordLeq finite_iff_ordLess_natLeq finite.emptyI finite_insert)
   161     by (rule ordLess_imp_ordLeq) (simp add: finite_iff_ordLess_natLeq[symmetric])
   162 next
   162 next
   163   fix x
   163   fix x
   164   show "|{snd x}| \<le>o natLeq"
   164   show "|{snd x}| \<le>o natLeq"
   165     by (metis ordLess_imp_ordLeq finite_iff_ordLess_natLeq finite.emptyI finite_insert)
   165     by (rule ordLess_imp_ordLeq) (simp add: finite_iff_ordLess_natLeq[symmetric])
   166 next
   166 next
   167   fix R1 R2 S1 S2
   167   fix R1 R2 S1 S2
   168   show "prod_rel R1 R2 OO prod_rel S1 S2 \<le> prod_rel (R1 OO S1) (R2 OO S2)" by auto
   168   show "prod_rel R1 R2 OO prod_rel S1 S2 \<le> prod_rel (R1 OO S1) (R2 OO S2)" by auto
   169 next
   169 next
   170   fix R S
   170   fix R S
   213 next
   213 next
   214   fix R
   214   fix R
   215   show "fun_rel op = R =
   215   show "fun_rel op = R =
   216         (Grp {x. range x \<subseteq> Collect (split R)} (op \<circ> fst))\<inverse>\<inverse> OO
   216         (Grp {x. range x \<subseteq> Collect (split R)} (op \<circ> fst))\<inverse>\<inverse> OO
   217          Grp {x. range x \<subseteq> Collect (split R)} (op \<circ> snd)"
   217          Grp {x. range x \<subseteq> Collect (split R)} (op \<circ> snd)"
   218   unfolding fun_rel_def Grp_def fun_eq_iff relcompp.simps conversep.simps  subset_iff image_iff
   218   unfolding fun_rel_def Grp_def fun_eq_iff relcompp.simps conversep.simps subset_iff image_iff
   219   by auto (force, metis (no_types) pair_collapse)
   219     comp_apply mem_Collect_eq split_beta bex_UNIV
       
   220   proof (safe, unfold fun_eq_iff[symmetric])
       
   221     fix x xa a b c xb y aa ba
       
   222     assume *: "x = a" "xa = c" "a = ba" "b = aa" "c = (\<lambda>x. snd (b x))" "ba = (\<lambda>x. fst (aa x))" and
       
   223        **: "\<forall>t. (\<exists>x. t = aa x) \<longrightarrow> R (fst t) (snd t)"
       
   224     show "R (x y) (xa y)" unfolding * by (rule mp[OF spec[OF **]]) blast
       
   225   qed force
   220 qed
   226 qed
   221 
   227 
   222 end
   228 end