src/HOL/BNF_Wellorder_Constructions.thy
changeset 67091 1393c2340eec
parent 63561 fba08009ff3e
child 67613 ce654b0e6d69
equal deleted inserted replaced
67090:0ec94bb9cec4 67091:1393c2340eec
   366 proof-
   366 proof-
   367   obtain f and f'
   367   obtain f and f'
   368   where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
   368   where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
   369         "embed r r' f" and "embed r' r'' f'"
   369         "embed r r' f" and "embed r' r'' f'"
   370   using * ** unfolding ordLeq_def by blast
   370   using * ** unfolding ordLeq_def by blast
   371   hence "embed r r'' (f' o f)"
   371   hence "embed r r'' (f' \<circ> f)"
   372   using comp_embed[of r r' f r'' f'] by auto
   372   using comp_embed[of r r' f r'' f'] by auto
   373   thus "r \<le>o r''" unfolding ordLeq_def using 1 by auto
   373   thus "r \<le>o r''" unfolding ordLeq_def using 1 by auto
   374 qed
   374 qed
   375 
   375 
   376 lemma ordLeq_total:
   376 lemma ordLeq_total:
   387 proof-
   387 proof-
   388   obtain f and f'
   388   obtain f and f'
   389   where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
   389   where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
   390         "iso r r' f" and 3: "iso r' r'' f'"
   390         "iso r r' f" and 3: "iso r' r'' f'"
   391   using * ** unfolding ordIso_def by auto
   391   using * ** unfolding ordIso_def by auto
   392   hence "iso r r'' (f' o f)"
   392   hence "iso r r'' (f' \<circ> f)"
   393   using comp_iso[of r r' f r'' f'] by auto
   393   using comp_iso[of r r' f r'' f'] by auto
   394   thus "r =o r''" unfolding ordIso_def using 1 by auto
   394   thus "r =o r''" unfolding ordIso_def using 1 by auto
   395 qed
   395 qed
   396 
   396 
   397 lemma ordIso_symmetric:
   397 lemma ordIso_symmetric:
   689   moreover have "inj_on f23 ?A2"
   689   moreover have "inj_on f23 ?A2"
   690   using EMB23 0 by (simp add: wo_rel_def embed_inj_on)
   690   using EMB23 0 by (simp add: wo_rel_def embed_inj_on)
   691   ultimately
   691   ultimately
   692   have "f23 ` (f12 ` ?A1) < f23 ` ?A2" by (simp add: inj_on_strict_subset)
   692   have "f23 ` (f12 ` ?A1) < f23 ` ?A2" by (simp add: inj_on_strict_subset)
   693   moreover
   693   moreover
   694   {have "embed r1 r3 (f23 o f12)"
   694   {have "embed r1 r3 (f23 \<circ> f12)"
   695    using 1 EMB23 0 by (auto simp add: comp_embed)
   695    using 1 EMB23 0 by (auto simp add: comp_embed)
   696    hence "\<forall>a \<in> ?A1. f23(f12 a) = f13 a"
   696    hence "\<forall>a \<in> ?A1. f23(f12 a) = f13 a"
   697    using EMB13 0 embed_unique[of r1 r3 "f23 o f12" f13] by auto
   697    using EMB13 0 embed_unique[of r1 r3 "f23 \<circ> f12" f13] by auto
   698    hence "f23 ` (f12 ` ?A1) = f13 ` ?A1" by force
   698    hence "f23 ` (f12 ` ?A1) = f13 ` ?A1" by force
   699   }
   699   }
   700   ultimately
   700   ultimately
   701   have "f13 ` ?A1 < f23 ` ?A2" by simp
   701   have "f13 ` ?A1 < f23 ` ?A2" by simp
   702   (*  *)
   702   (*  *)