# HG changeset patch # User hoelzl # Date 1362494600 -3600 # Node ID 166170c5f8a2895a2bbc06ae030248d0bf399dd6 # Parent 011c97ba3b3df381093282a7d9f8a06e269e2db5 generalized compact_Times to topological_space diff -r 011c97ba3b3d -r 166170c5f8a2 src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Tue Mar 05 15:43:19 2013 +0100 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Tue Mar 05 15:43:20 2013 +0100 @@ -5031,11 +5031,43 @@ apply (simp add: o_def) done -text {* Generalize to @{class topological_space} *} lemma compact_Times: - fixes s :: "'a::metric_space set" and t :: "'b::metric_space set" - shows "compact s \ compact t \ compact (s \ t)" - unfolding compact_eq_seq_compact_metric by (rule seq_compact_Times) + assumes "compact s" "compact t" + shows "compact (s \ t)" +proof (rule compactI) + fix C assume C: "\t\C. open t" "s \ t \ \C" + have "\x\s. \a. open a \ x \ a \ (\d\C. finite d \ a \ t \ \d)" + proof + fix x assume "x \ s" + have "\y\t. \a b c. c \ C \ open a \ open b \ x \ a \ y \ b \ a \ b \ c" (is "\y\t. ?P y") + proof + fix y assume "y \ t" + with `x \ s` C obtain c where "c \ C" "(x, y) \ c" "open c" by auto + then show "?P y" by (auto elim!: open_prod_elim) + qed + then obtain a b c where b: "\y. y \ t \ open (b y)" + and c: "\y. y \ t \ c y \ C \ open (a y) \ open (b y) \ x \ a y \ y \ b y \ a y \ b y \ c y" + by metis + then have "\y\t. open (b y)" "t \ (\y\t. b y)" by auto + from compactE_image[OF `compact t` this] obtain D where "D \ t" "finite D" "t \ (\y\D. b y)" + by auto + moreover with c have "(\y\D. a y) \ t \ (\y\D. c y)" + by (fastforce simp: subset_eq) + ultimately show "\a. open a \ x \ a \ (\d\C. finite d \ a \ t \ \d)" + using c by (intro exI[of _ "c`D"] exI[of _ "\a`D"] conjI) (auto intro!: open_INT) + qed + then obtain a d where a: "\x\s. open (a x)" "s \ (\x\s. a x)" + and d: "\x. x \ s \ d x \ C \ finite (d x) \ a x \ t \ \d x" + unfolding subset_eq UN_iff by metis + moreover from compactE_image[OF `compact s` a] obtain e where e: "e \ s" "finite e" + and s: "s \ (\x\e. a x)" by auto + moreover + { from s have "s \ t \ (\x\e. a x \ t)" by auto + also have "\ \ (\x\e. \d x)" using d `e \ s` by (intro UN_mono) auto + finally have "s \ t \ (\x\e. \d x)" . } + ultimately show "\C'\C. finite C' \ s \ t \ \C'" + by (intro exI[of _ "(\x\e. d x)"]) (auto simp add: subset_eq) +qed text{* Hence some useful properties follow quite easily. *}