lemma single_cone: "|{x}| =o cone" proof - let ?f = "\x. ()" have"bij_betw ?f {x} {()}"unfolding bij_betw_def by auto thus ?thesis unfolding cone_def using card_of_ordIso by blast qed
lemma cone_Cnotzero: "Cnotzero cone" by (simp add: cone_not_czero Card_order_cone)
lemma cone_ordLeq_ctwo: "cone \o ctwo" unfolding cone_def ctwo_def card_of_ordLeq[symmetric] by auto
lemma csum_czero1: "Card_order r \ r +c czero =o r" unfolding czero_def csum_def Field_card_of by (rule ordIso_transitive[OF ordIso_symmetric[OF card_of_Plus_empty1] card_of_Field_ordIso])
lemma csum_czero2: "Card_order r \ czero +c r =o r" unfolding czero_def csum_def Field_card_of by (rule ordIso_transitive[OF ordIso_symmetric[OF card_of_Plus_empty2] card_of_Field_ordIso])
lemma card_of_Times_singleton: fixes A :: "'a set" shows"|A \ {x}| =o |A|" proof -
define f :: "'a \ 'b \ 'a" where "f = (\(a, b). a)" have"A \ f ` (A \ {x})" unfolding f_def by (auto simp: image_iff) hence"bij_betw f (A \ {x}) A" unfolding bij_betw_def inj_on_def f_def by fastforce thus ?thesis using card_of_ordIso by blast qed
lemma cprod_assoc: "(r *c s) *c t =o r *c s *c t" unfolding cprod_def Field_card_of by (rule card_of_Times_assoc)
lemma card_of_Sigma_ordLeq_Cinfinite: "\Cinfinite r; |I| \o r; \i \ I. |A i| \o r\ \ |SIGMA i : I. A i| \o r" unfolding cinfinite_def by (blast intro: card_of_Sigma_ordLeq_infinite_Field)
lemma Cinfinite_ordLess_cexp: assumes r: "Cinfinite r" shows"r proof - have"r using r by (simp only: ordLess_ctwo_cexp) alsohave"ctwo ^c r \o r ^c r" by (rule cexp_mono1[OF ctwo_ordLeq_Cinfinite]) (auto simp: r ctwo_not_czero Card_order_ctwo) finallyshow ?thesis . qed
lemma infinite_ordLeq_cexp: assumes"Cinfinite r" shows"r \o r ^c r" by (rule ordLess_imp_ordLeq[OF Cinfinite_ordLess_cexp[OF assms]])
lemma czero_cexp: "Cnotzero r \ czero ^c r =o czero" by (metis Cnotzero_imp_not_empty cexp_def czero_def card_of_empty_ordIso Field_card_of Func_is_emp)
lemma Func_singleton: fixes x :: 'b and A :: "'a set" shows"|Func A {x}| =o |{x}|" proof (rule ordIso_symmetric)
define f where [abs_def]: "f y a = (if y = x \ a \ A then x else undefined)" for y a have"Func A {x} \ f ` {x}" unfolding f_def Func_def by (force simp: fun_eq_iff) hence"bij_betw f {x} (Func A {x})" unfolding bij_betw_def inj_on_def f_def Func_def by (auto split: if_split_asm) thus"|{x}| =o |Func A {x}|"using card_of_ordIso by blast qed
lemma cone_cexp: "cone ^c r =o cone" unfolding cexp_def cone_def Field_card_of by (rule Func_singleton)
lemma card_of_Func_squared: fixes A :: "'a set" shows"|Func (UNIV :: bool set) A| =o |A \ A|" proof (rule ordIso_symmetric)
define f where"f = (\(x::'a,y) b. if A = {} then undefined else if b then x else y)" have"Func (UNIV :: bool set) A \ f ` (A \ A)" unfolding f_def Func_def by (auto simp: image_iff fun_eq_iff split: option.splits if_split_asm) blast hence"bij_betw f (A \ A) (Func (UNIV :: bool set) A)" unfolding bij_betw_def inj_on_def f_def Func_def by (auto simp: fun_eq_iff) thus"|A \ A| =o |Func (UNIV :: bool set) A|" using card_of_ordIso by blast qed
lemma cexp_ctwo: "r ^c ctwo =o r *c r" unfolding cexp_def ctwo_def cprod_def Field_card_of by (rule card_of_Func_squared)
lemma card_of_Func_Plus: fixes A :: "'a set"and B :: "'b set"and C :: "'c set" shows"|Func (A <+> B) C| =o |Func A C \ Func B C|" proof (rule ordIso_symmetric)
define f where"f = (\(g :: 'a => 'c, h::'b \ 'c) ab. case ab of Inl a \ g a | Inr b \ h b)"
define f' where "f' = (\<lambda>(f :: ('a + 'b) \<Rightarrow> 'c). (\<lambda>a. f (Inl a), \<lambda>b. f (Inr b)))" have"f ` (Func A C \ Func B C) \ Func (A <+> B) C" unfolding Func_def f_def by (force split: sum.splits) moreoverhave"f' ` Func (A <+> B) C \ Func A C \ Func B C" unfolding Func_def f'_def by force moreoverhave"\a \ Func A C \ Func B C. f' (f a) = a" unfolding f'_def f_def Func_def by auto moreoverhave"\a' \ Func (A <+> B) C. f (f' a') = a'" unfolding f'_def f_def Func_def by (auto split: sum.splits) ultimatelyhave"bij_betw f (Func A C \ Func B C) (Func (A <+> B) C)" by (intro bij_betw_byWitness[of _ f' f]) thus"|Func A C \ Func B C| =o |Func (A <+> B) C|" using card_of_ordIso by blast qed
lemma cexp_csum: "r ^c (s +c t) =o r ^c s *c r ^c t" unfolding cexp_def cprod_def csum_def Field_card_of by (rule card_of_Func_Plus)
subsection \<open>Powerset\<close>
definition cpow where"cpow r = |Pow (Field r)|"
lemma card_order_cpow: "card_order r \ card_order (cpow r)" by (simp only: cpow_def Field_card_order Pow_UNIV card_of_card_order_on)
lemma cpow_greater_eq: "Card_order r \ r \o cpow r" by (rule ordLess_imp_ordLeq) (simp only: cpow_def Card_order_Pow)
lemma Cinfinite_cpow: "Cinfinite r \ Cinfinite (cpow r)" unfolding cpow_def cinfinite_def by simp
lemma Card_order_cpow: "Card_order (cpow r)" unfolding cpow_def by (rule card_of_Card_order)
lemma cardSuc_ordLeq_cpow: "Card_order r \ cardSuc r \o cpow r" unfolding cpow_def by (metis Card_order_Pow cardSuc_ordLess_ordLeq card_of_Card_order)
lemma cpow_cexp_ctwo: "cpow r =o ctwo ^c r" unfolding cpow_def ctwo_def cexp_def Field_card_of by (rule card_of_Pow_Func)
subsection \<open>Inverse image\<close>
lemma vimage_ordLeq: assumes"|A| \o k" and "\ a \ A. |vimage f {a}| \o k" and "Cinfinite k" shows"|vimage f A| \o k"
proof- have"vimage f A = (\a \ A. vimage f {a})" by auto alsohave"|\a \ A. vimage f {a}| \o k" using UNION_Cinfinite_bound[OF assms] . finallyshow ?thesis . qed
subsection \<open>Maximum\<close>
definition cmax where "cmax r s =
(if cinfinite r \<or> cinfinite s then czero +c r +c s
else natLeq_on (max (card (Field r)) (card (Field s))) +c czero)"
lemma cmax_com: "cmax r s =o cmax s r" unfolding cmax_def by (auto simp: max.commute intro: csum_cong2[OF csum_com] csum_cong2[OF czero_ordIso])
lemma cmax2: assumes"Card_order r""Card_order s""r \o s" shows"cmax r s =o s" by (metis assms cmax1 cmax_com ordIso_transitive)
context fixes r s assumes r: "Cinfinite r" and s: "Cinfinite s" begin
lemma cmax_csum: "cmax r s =o r +c s" by (simp add: Card_order_csum cmax_def csum_czero2 r)
lemma cmax_cprod: "cmax r s =o r *c s" proof (cases "r \o s") case True hence"cmax r s =o s"by (metis cmax2 r s) alsohave"s =o r *c s"by (metis Cinfinite_Cnotzero True cprod_infinite2' ordIso_symmetric r s) finallyshow ?thesis . next case False hence"s \o r" by (metis ordLeq_total r s card_order_on_def) hence"cmax r s =o r"by (metis cmax1 r s) alsohave"r =o r *c s"by (metis Cinfinite_Cnotzero \<open>s \<le>o r\<close> cprod_infinite1' ordIso_symmetric r s) finallyshow ?thesis . qed
end
lemma Card_order_cmax: assumes r: "Card_order r"and s: "Card_order s" shows"Card_order (cmax r s)" unfolding cmax_def by (auto simp: Card_order_csum)
lemma ordLeq_cmax: assumes r: "Card_order r"and s: "Card_order s" shows"r \o cmax r s \ s \o cmax r s" by (meson card_order_on_def cmax1 cmax2 ordIso_iff_ordLeq ordLeq_total ordLeq_transitive r s)
lemmas ordLeq_cmax1 = ordLeq_cmax[THEN conjunct1] and
ordLeq_cmax2 = ordLeq_cmax[THEN conjunct2]
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.15Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.