(* Title: ZF/Zorn.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1994 University of Cambridge
*)
section\<open>Zorn's Lemma\<close>
theory Zorn imports OrderArith AC Inductivebegin
text\<open>Based upon the unpublished article ``Towards the Mechanization of the
Proofs of Some Classical Theorems of Set Theory,''by Abrial and Laffitte.\<close>
definition
Subset_rel :: "i\i" where "Subset_rel(A) \ {z \ A*A . \x y. z=\x,y\ \ x<=y \ x\y}"
text\<open>Lemma for the inductive definition below\<close> lemma Union_in_Pow: "Y \ Pow(Pow(A)) \ \(Y) \ Pow(A)" by blast
text\<open>We could make the inductive definition conditional on \<^term>\<open>next \<in> increasing(S)\<close>
but instead we make this a side-condition of an introduction rule. Thus
the induction rule lets us assume that condition! Many inductive proofs
are therefore unconditional.\<close> consts "TFin" :: "[i,i]\i"
text\<open>Lemma 1 of section 3.1\<close> lemma TFin_linear_lemma1: "\n \ TFin(S,next); m \ TFin(S,next); \<forall>x \<in> TFin(S,next) . x<=m \<longrightarrow> x=m | next`x<=m\<rbrakk> \<Longrightarrow> n<=m | next`m<=n" apply (erule TFin_induct) apply (erule_tac [2] Union_lemma0) (*or just Blast_tac*) (*downgrade subsetI from intro! to intro*) apply (blast dest: increasing_trans) done
text\<open>Lemma 2 of section 3.2. Interesting in its own right!
Requires \<^term>\<open>next \<in> increasing(S)\<close> in the second induction step.\<close> lemma TFin_linear_lemma2: "\m \ TFin(S,next); next \ increasing(S)\ \<Longrightarrow> \<forall>n \<in> TFin(S,next). n<=m \<longrightarrow> n=m | next`n \<subseteq> m" apply (erule TFin_induct) apply (rule impI [THEN ballI]) txt\<open>case split using \<open>TFin_linear_lemma1\<close>\<close> apply (rule_tac n1 = n and m1 = x in TFin_linear_lemma1 [THEN disjE],
assumption+) apply (blast del: subsetI
intro: increasing_trans subsetI, blast) txt\<open>second induction step\<close> apply (rule impI [THEN ballI]) apply (rule Union_lemma0 [THEN disjE]) apply (erule_tac [3] disjI2) prefer 2 apply blast apply (rule ballI) apply (drule bspec, assumption) apply (drule subsetD, assumption) apply (rule_tac n1 = n and m1 = x in TFin_linear_lemma1 [THEN disjE],
assumption+, blast) apply (erule increasingD2 [THEN subset_trans, THEN disjI1]) apply (blast dest: TFin_is_subset)+ done
text\<open>a more convenient form for Lemma 2\<close> lemma TFin_subsetD: "\n<=m; m \ TFin(S,next); n \ TFin(S,next); next \ increasing(S)\ \<Longrightarrow> n=m | next`n \<subseteq> m" by (blast dest: TFin_linear_lemma2 [rule_format])
text\<open>Consequences from section 3.3 -- Property 3.2, the ordering is total\<close> lemma TFin_subset_linear: "\m \ TFin(S,next); n \ TFin(S,next); next \ increasing(S)\ \<Longrightarrow> n \<subseteq> m | m<=n" apply (rule disjE) apply (rule TFin_linear_lemma1 [OF _ _TFin_linear_lemma2]) apply (assumption+, erule disjI2) apply (blast del: subsetI
intro: subsetI increasingD2 [THEN subset_trans] TFin_is_subset) done
text\<open>Lemma 3 of section 3.3\<close> lemma equal_next_upper: "\n \ TFin(S,next); m \ TFin(S,next); m = next`m\ \ n \ m" apply (erule TFin_induct) apply (drule TFin_subsetD) apply (assumption+, force, blast) done
subsection\<open>Zorn's Lemma: If All Chains in S Have Upper Bounds In S, then S contains a Maximal Element\<close>
text\<open>Used in the proof of Zorn's Lemma\<close> lemma chain_extend: "\c \ chain(A); z \ A; \x \ c. x<=z\ \ cons(z,c) \ chain(A)" by (unfold chain_def, blast)
subsection \<open>Zorn's Lemma for Partial Orders\<close>
text\<open>Reimported from HOL by Clemens Ballarin.\<close>
definition Chain :: "i \ i" where "Chain(r) = {A \ Pow(field(r)). \a\A. \b\A. \a, b\ \ r | \b, a\ \ r}"
lemma mono_Chain: "r \ s \ Chain(r) \ Chain(s)" unfolding Chain_def by blast
theorem Zorn_po: assumes po: "Partial_order(r)" and u: "\C\Chain(r). \u\field(r). \a\C. \a, u\ \ r" shows"\m\field(r). \a\field(r). \m, a\ \ r \ a = m" proof - have"Preorder(r)"using po by (simp add: partial_order_on_def) \<comment> \<open>Mirror r in the set of subsets below (wrt r) elements of A (?).\<close> let ?B = "\x\field(r). r -`` {x}" let ?S = "?B `` field(r)" have"\C\chain(?S). \U\?S. \A\C. A \ U" proof (clarsimp simp: chain_def Subset_rel_def bex_image_simp) fix C assume 1: "C \ ?S" and 2: "\A\C. \B\C. A \ B | B \ A" let ?A = "{x \ field(r). \M\C. M = ?B`x}" have"C = ?B `` ?A"using 1 apply (auto simp: image_def) apply rule apply rule apply (drule subsetD) apply assumption apply (erule CollectE) apply rule apply assumption apply (erule bexE) apply rule prefer 2 apply assumption apply rule apply (erule lamE) apply simp apply assumption
apply (thin_tac "C \ X" for X) apply (fast elim: lamE) done have"?A \ Chain(r)" proof (simp add: Chain_def subsetI, intro conjI ballI impI) fix a b assume"a \ field(r)" "r -`` {a} \ C" "b \ field(r)" "r -`` {b} \ C" hence"r -`` {a} \ r -`` {b} | r -`` {b} \ r -`` {a}" using 2 by auto thenshow"\a, b\ \ r | \b, a\ \ r" using\<open>Preorder(r)\<close> \<open>a \<in> field(r)\<close> \<open>b \<in> field(r)\<close> by (simp add: subset_vimage1_vimage1_iff) qed thenobtain u where uA: "u \ field(r)" "\a\?A. \a, u\ \ r" using u apply auto apply (drule bspec) apply assumption apply auto done have"\A\C. A \ r -`` {u}" proof (auto intro!: vimageI) fix a B assume aB: "B \ C" "a \ B" with 1 obtain x where"x \ field(r)" "B = r -`` {x}" apply - apply (drule subsetD) apply assumption apply (erule imageE) apply (erule lamE) apply simp done thenshow"\a, u\ \ r" using uA aB \Preorder(r)\ by (auto simp: preorder_on_def refl_def) (blast dest: trans_onD)+ qed thenshow"\U\field(r). \A\C. A \ r -`` {U}" using\<open>u \<in> field(r)\<close> .. qed from Zorn2 [OF this] obtain m B where"m \ field(r)" "B = r -`` {m}" "\x\field(r). B \ r -`` {x} \ B = r -`` {x}" by (auto elim!: lamE simp: ball_image_simp) thenhave"\a\field(r). \m, a\ \ r \ a = m" using po \<open>Preorder(r)\<close> \<open>m \<in> field(r)\<close> by (auto simp: subset_vimage1_vimage1_iff Partial_order_eq_vimage1_vimage1_iff) thenshow ?thesis using\<open>m \<in> field(r)\<close> by blast qed
end
¤ Dauer der Verarbeitung: 0.12 Sekunden
(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.