# HG changeset patch # User paulson # Date 1537117139 -3600 # Node ID f108b3b67adac0d8930d5447f91edccf737692b6 # Parent 2af022252782f5b2605e25d395d70b4257084024# Parent 7cb3ddd60fd6c29286a40e59555dbf54e7894b43 merged diff -r 2af022252782 -r f108b3b67ada src/HOL/Analysis/Ordered_Euclidean_Space.thy --- a/src/HOL/Analysis/Ordered_Euclidean_Space.thy Sun Sep 16 16:31:56 2018 +0200 +++ b/src/HOL/Analysis/Ordered_Euclidean_Space.thy Sun Sep 16 17:58:59 2018 +0100 @@ -231,6 +231,16 @@ and is_interval_cc: "is_interval {b..a}" by (force simp: is_interval_def eucl_le[where 'a='a])+ +lemma connected_interval [simp]: + fixes a b::"'a::ordered_euclidean_space" + shows "connected {a..b}" + using is_interval_cc is_interval_connected by blast + +lemma path_connected_interval [simp]: + fixes a b::"'a::ordered_euclidean_space" + shows "path_connected {a..b}" + using is_interval_cc is_interval_path_connected by blast + lemma%unimportant is_interval_real_ereal_oo: "is_interval (real_of_ereal ` {N<.." "\ \ {}" "\X. X \ \ \ openin T X" shows "openin T (\\)" by (metis (full_types) assms openin_INT2 image_ident) +lemma openin_Int_Inter: + assumes "finite \" "openin T U" "\X. X \ \ \ openin T X" shows "openin T (U \ \\)" + using openin_Inter [of "insert U \"] assms by auto + subsubsection \Closed sets\ @@ -824,6 +828,26 @@ unfolding openin_subtopology by auto (metis IntD1 in_mono openin_subset) +lemma subtopology_subtopology: + "subtopology (subtopology X S) T = subtopology X (S \ T)" +proof - + have eq: "\T'. (\S'. T' = S' \ T \ (\T. openin X T \ S' = T \ S)) = (\Sa. T' = Sa \ (S \ T) \ openin X Sa)" + by (metis inf_assoc) + have "subtopology (subtopology X S) T = topology (\Ta. \Sa. Ta = Sa \ T \ openin (subtopology X S) Sa)" + by (simp add: subtopology_def) + also have "\ = subtopology X (S \ T)" + by (simp add: openin_subtopology eq) (simp add: subtopology_def) + finally show ?thesis . +qed + +lemma openin_subtopology_alt: + "openin (subtopology X U) S \ S \ (\T. U \ T) ` Collect (openin X)" + by (simp add: image_iff inf_commute openin_subtopology) + +lemma closedin_subtopology_alt: + "closedin (subtopology X U) S \ S \ (\T. U \ T) ` Collect (closedin X)" + by (simp add: image_iff inf_commute closedin_subtopology) + lemma subtopology_superset: assumes UV: "topspace U \ V" shows "subtopology U V = U" @@ -869,6 +893,9 @@ "closedin (subtopology U X) X \ X \ topspace U" by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology) +lemma closedin_topspace_empty: "topspace T = {} \ (closedin T S \ S = {})" + by (simp add: closedin_def) + lemma openin_imp_subset: "openin (subtopology U S) T \ T \ S" by (metis Int_iff openin_subtopology subsetI) @@ -877,6 +904,14 @@ "closedin (subtopology U S) T \ T \ S" by (simp add: closedin_def topspace_subtopology) +lemma openin_open_subtopology: + "openin X S \ openin (subtopology X S) T \ openin X T \ T \ S" + by (metis inf.orderE openin_Int openin_imp_subset openin_subtopology) + +lemma closedin_closed_subtopology: + "closedin X S \ (closedin (subtopology X S) T \ closedin X T \ T \ S)" + by (metis closedin_Int closedin_imp_subset closedin_subtopology inf.orderE) + lemma openin_subtopology_Un: "\openin (subtopology X T) S; openin (subtopology X U) S\ \ openin (subtopology X (T \ U)) S" diff -r 2af022252782 -r f108b3b67ada src/HOL/Library/FuncSet.thy --- a/src/HOL/Library/FuncSet.thy Sun Sep 16 16:31:56 2018 +0200 +++ b/src/HOL/Library/FuncSet.thy Sun Sep 16 17:58:59 2018 +0100 @@ -499,6 +499,41 @@ shows "f(x := a) \ insert x S \\<^sub>E T" using assms unfolding extensional_funcset_def extensional_def by auto +lemma subset_PiE: + "PiE I S \ PiE I T \ PiE I S = {} \ (\i \ I. S i \ T i)" (is "?lhs \ _ \ ?rhs") +proof (cases "PiE I S = {}") + case False + moreover have "?lhs = ?rhs" + proof + assume L: ?lhs + have "\i. i\I \ S i \ {}" + using False PiE_eq_empty_iff by blast + with L show ?rhs + by (simp add: PiE_Int PiE_eq_iff inf.absorb_iff2) + qed auto + ultimately show ?thesis + by simp +qed simp + +lemma PiE_eq: + "PiE I S = PiE I T \ PiE I S = {} \ PiE I T = {} \ (\i \ I. S i = T i)" + by (auto simp: PiE_eq_iff PiE_eq_empty_iff) + +lemma PiE_UNIV [simp]: "PiE UNIV (\i. UNIV) = UNIV" + by blast + +lemma image_projection_PiE: + "(\f. f i) ` (PiE I S) = (if PiE I S = {} then {} else if i \ I then S i else {undefined})" +proof - + have "(\f. f i) ` Pi\<^sub>E I S = S i" if "i \ I" "f \ PiE I S" for f + using that apply auto + by (rule_tac x="(\k. if k=i then x else f k)" in image_eqI) auto + moreover have "(\f. f i) ` Pi\<^sub>E I S = {undefined}" if "f \ PiE I S" "i \ I" for f + using that by (blast intro: PiE_arb [OF that, symmetric]) + ultimately show ?thesis + by auto +qed + subsubsection \Injective Extensional Function Spaces\ diff -r 2af022252782 -r f108b3b67ada src/HOL/Zorn.thy --- a/src/HOL/Zorn.thy Sun Sep 16 16:31:56 2018 +0200 +++ b/src/HOL/Zorn.thy Sun Sep 16 17:58:59 2018 +0100 @@ -386,7 +386,7 @@ subsubsection \Zorn's lemma\ text \If every chain has an upper bound, then there is a maximal set.\ -lemma subset_Zorn: +theorem subset_Zorn: assumes "\C. subset.chain A C \ \U\A. \X\C. X \ U" shows "\M\A. \X\A. M \ X \ X = M" proof - @@ -487,7 +487,7 @@ lemma Zorn_Lemma2: "\C\chains A. \U\A. \X\C. X \ U \ \M\A. \X\A. M \ X \ X = M" using subset_Zorn [of A] by (auto simp: chains_alt_def) -text \Various other lemmas\ +subsection \Other variants of Zorn's Lemma\ lemma chainsD: "c \ chains S \ x \ c \ y \ c \ x \ y \ y \ x" unfolding chains_def chain_subset_def by blast @@ -562,6 +562,67 @@ by (auto simp: relation_of_def) qed +lemma Union_in_chain: "\finite \; \ \ {}; subset.chain \ \\ \ \\ \ \" +proof (induction \ rule: finite_induct) + case (insert B \) + show ?case + proof (cases "\ = {}") + case False + then show ?thesis + using insert sup.absorb2 by (auto simp: subset_chain_insert dest!: bspec [where x="\\"]) + qed auto +qed simp + +lemma Inter_in_chain: "\finite \; \ \ {}; subset.chain \ \\ \ \\ \ \" +proof (induction \ rule: finite_induct) + case (insert B \) + show ?case + proof (cases "\ = {}") + case False + then show ?thesis + using insert inf.absorb2 by (auto simp: subset_chain_insert dest!: bspec [where x="\\"]) + qed auto +qed simp + +lemma finite_subset_Union_chain: + assumes "finite A" "A \ \\" "\ \ {}" and sub: "subset.chain \ \" + obtains B where "B \ \" "A \ B" +proof - + obtain \ where \: "finite \" "\ \ \" "A \ \\" + using assms by (auto intro: finite_subset_Union) + show thesis + proof (cases "\ = {}") + case True + then show ?thesis + using \A \ \\\ \\ \ {}\ that by fastforce + next + case False + show ?thesis + proof + show "\\ \ \" + using sub \\ \ \\ \finite \\ + by (simp add: Union_in_chain False subset.chain_def subset_iff) + show "A \ \\" + using \A \ \\\ by blast + qed + qed +qed + +lemma subset_Zorn_nonempty: + assumes "\ \ {}" and ch: "\\. \\\{}; subset.chain \ \\ \ \\ \ \" + shows "\M\\. \X\\. M \ X \ X = M" +proof (rule subset_Zorn) + show "\U\\. \X\\. X \ U" if "subset.chain \ \" for \ + proof (cases "\ = {}") + case True + then show ?thesis + using \\ \ {}\ by blast + next + case False + show ?thesis + by (blast intro!: ch False that Union_upper) + qed +qed subsection \The Well Ordering Theorem\