# HG changeset patch # User paulson # Date 1742757983 0 # Node ID b022c013b04be2edd232176a5ed67fd2ea1b3ff8 # Parent 3529946fca19c7409cfb26781da7eaf10b8c1e70 Function space instead of image closure diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Abstract_Euclidean_Space.thy --- a/src/HOL/Analysis/Abstract_Euclidean_Space.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Abstract_Euclidean_Space.thy Sun Mar 23 19:26:23 2025 +0000 @@ -81,13 +81,13 @@ "\continuous_map X (Euclidean_space n) f; continuous_map X (Euclidean_space n) g\ \ continuous_map X (Euclidean_space n) (\x i. f x i + g x i)" unfolding Euclidean_space_def continuous_map_in_subtopology - by (fastforce simp add: continuous_map_componentwise_UNIV continuous_map_add) + by (auto simp: continuous_map_componentwise_UNIV Pi_iff continuous_map_add) lemma continuous_map_Euclidean_space_diff [continuous_intros]: "\continuous_map X (Euclidean_space n) f; continuous_map X (Euclidean_space n) g\ \ continuous_map X (Euclidean_space n) (\x i. f x i - g x i)" - unfolding Euclidean_space_def continuous_map_in_subtopology - by (fastforce simp add: continuous_map_componentwise_UNIV continuous_map_diff) + unfolding Euclidean_space_def continuous_map_in_subtopology + by (auto simp: continuous_map_componentwise_UNIV Pi_iff continuous_map_diff) lemma continuous_map_Euclidean_space_iff: "continuous_map (Euclidean_space m) euclidean g @@ -101,7 +101,7 @@ next assume "continuous_on (topspace (Euclidean_space m)) g" then have "continuous_map (top_of_set {f. \n\m. f n = 0}) euclidean g" - by (metis (lifting) continuous_map_into_fulltopology continuous_map_subtopology_eu order_refl topspace_Euclidean_space) + by (simp add: topspace_Euclidean_space) then show "continuous_map (Euclidean_space m) euclidean g" by (simp add: Euclidean_space_def euclidean_product_topology) qed @@ -353,7 +353,7 @@ for k unfolding case_prod_unfold o_def by (intro continuous_map_into_fulltopology [OF continuous_map_fst] continuous_intros) auto - moreover have "?h ` ({0..1} \ topspace (nsphere p)) \ {x. \i\Suc p. x i = 0}" + moreover have "?h \ ({0..1} \ topspace (nsphere p)) \ {x. \i\Suc p. x i = 0}" using continuous_map_image_subset_topspace [OF f] by (auto simp: nsphere image_subset_iff a0) moreover have "(\i. 0) \ ?h ` ({0..1} \ topspace (nsphere p))" @@ -376,7 +376,8 @@ using eq unfolding * by (simp add: fun_eq_iff) qed ultimately show "continuous_map (prod_topology ?T01 (nsphere p)) ?Y ?h" - by (simp add: Euclidean_space_def continuous_map_in_subtopology continuous_map_componentwise_UNIV) + unfolding Euclidean_space_def continuous_map_in_subtopology continuous_map_componentwise_UNIV + by (force simp flip: image_subset_iff_funcset) next have *: "\\i\Suc p. x i = 0; x \ (\i. 0)\ \ (\j\p. (x j)\<^sup>2) \ 0" for x :: "nat \ real" by (force simp: fun_eq_iff not_less_eq_eq sum_nonneg_eq_0_iff) diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Abstract_Topology.thy --- a/src/HOL/Analysis/Abstract_Topology.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Abstract_Topology.thy Sun Mar 23 19:26:23 2025 +0000 @@ -1567,12 +1567,12 @@ by (smt (verit, ccfv_threshold) assms continuous_map image_eqI image_subset_iff in_closure_of mem_Collect_eq) qed -lemma continuous_map_subset_aux1: "continuous_map X Y f \ - (\S. f ` (X closure_of S) \ Y closure_of f ` S)" +lemma continuous_map_subset_aux1: + "continuous_map X Y f \ (\S. f \ (X closure_of S) \ Y closure_of f ` S)" using continuous_map_image_closure_subset by blast lemma continuous_map_subset_aux2: - assumes "\S. S \ topspace X \ f ` (X closure_of S) \ Y closure_of f ` S" + assumes "\S. S \ topspace X \ f \ (X closure_of S) \ Y closure_of f ` S" shows "continuous_map X Y f" unfolding continuous_map_closedin proof (intro conjI ballI allI impI) @@ -1598,18 +1598,18 @@ qed lemma continuous_map_eq_image_closure_subset: - "continuous_map X Y f \ (\S. f ` (X closure_of S) \ Y closure_of f ` S)" + "continuous_map X Y f \ (\S. f \ (X closure_of S) \ Y closure_of f ` S)" using continuous_map_subset_aux1 continuous_map_subset_aux2 by metis lemma continuous_map_eq_image_closure_subset_alt: - "continuous_map X Y f \ (\S. S \ topspace X \ f ` (X closure_of S) \ Y closure_of f ` S)" + "continuous_map X Y f \ (\S. S \ topspace X \ f \ (X closure_of S) \ Y closure_of f ` S)" using continuous_map_subset_aux1 continuous_map_subset_aux2 by metis lemma continuous_map_eq_image_closure_subset_gen: "continuous_map X Y f \ f \ topspace X \ topspace Y \ - (\S. f ` (X closure_of S) \ Y closure_of f ` S)" - by (meson Pi_iff continuous_map continuous_map_eq_image_closure_subset image_subset_iff) + (\S. f \ (X closure_of S) \ Y closure_of f ` S)" + by (metis continuous_map_eq_image_closure_subset continuous_map_funspace) lemma continuous_map_closure_preimage_subset: "continuous_map X Y f @@ -1697,16 +1697,18 @@ by (auto simp: elim!: continuous_map_eq) lemma continuous_map_in_subtopology: - "continuous_map X (subtopology X' S) f \ continuous_map X X' f \ f ` (topspace X) \ S" + "continuous_map X (subtopology X' S) f \ continuous_map X X' f \ f \ (topspace X) \ S" (is "?lhs = ?rhs") proof assume L: ?lhs show ?rhs proof - - have "\A. f ` (X closure_of A) \ subtopology X' S closure_of f ` A" - by (meson L continuous_map_image_closure_subset) + have "\A. f \ (X closure_of A) \ subtopology X' S closure_of f ` A" + by (metis L continuous_map_eq_image_closure_subset image_subset_iff_funcset) then show ?thesis - by (metis (no_types) closure_of_subset_subtopology closure_of_subtopology_subset closure_of_topspace continuous_map_eq_image_closure_subset order.trans) + by (metis closure_of_subset_subtopology closure_of_subtopology_subset + closure_of_topspace continuous_map_eq_image_closure_subset + image_subset_iff_funcset subset_trans) qed next assume R: ?rhs @@ -3963,7 +3965,7 @@ proof show "?lhs \ ?rhs" unfolding embedding_map_def - by (metis continuous_map_in_subtopology homeomorphic_imp_continuous_map inf_absorb2 subtopology_subtopology) + by (metis Int_subset_iff homeomorphic_imp_surjective_map inf_le1 subtopology_restrict subtopology_subtopology topspace_subtopology) qed (simp add: embedding_map_def inf.absorb_iff2 subtopology_subtopology) lemma injective_open_imp_embedding_map: @@ -4118,13 +4120,13 @@ using assms continuous_on_closed by blast lemma continuous_map_subtopology_eu [simp]: - "continuous_map (top_of_set S) (subtopology euclidean T) h \ continuous_on S h \ h ` S \ T" + "continuous_map (top_of_set S) (subtopology euclidean T) h \ continuous_on S h \ h \ S \ T" by (simp add: continuous_map_in_subtopology) lemma continuous_map_euclidean_top_of_set: assumes eq: "f -` S = UNIV" and cont: "continuous_on UNIV f" shows "continuous_map euclidean (top_of_set S) f" - by (simp add: cont continuous_map_in_subtopology eq image_subset_iff_subset_vimage) + using cont continuous_map_iff_continuous2 continuous_map_into_subtopology eq by blast subsection\<^marker>\tag unimportant\ \Half-global and completely global cases\ @@ -4166,25 +4168,14 @@ by (metis Int_commute closedin_closed continuous_on_closed_invariant) lemma continuous_open_preimage: - assumes contf: "continuous_on S f" and "open S" "open T" + assumes "continuous_on S f" and "open S" "open T" shows "open (S \ f -` T)" -proof- - obtain U where "open U" "(S \ f -` T) = S \ U" - using continuous_openin_preimage_gen[OF contf \open T\] - unfolding openin_open by auto - then show ?thesis - using open_Int[of S U, OF \open S\] by auto -qed + by (metis Int_commute assms continuous_on_open_vimage) lemma continuous_closed_preimage: - assumes contf: "continuous_on S f" and "closed S" "closed T" + assumes "continuous_on S f" and "closed S" "closed T" shows "closed (S \ f -` T)" -proof- - obtain U where "closed U" "(S \ f -` T) = S \ U" - using continuous_closedin_preimage[OF contf \closed T\] - unfolding closedin_closed by auto - then show ?thesis using closed_Int[of S U, OF \closed S\] by auto -qed + by (metis assms closed_vimage_Int inf_commute) lemma continuous_open_vimage: "open S \ (\x. continuous (at x) f) \ open (f -` S)" by (metis continuous_on_eq_continuous_within open_vimage) diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Sun Mar 23 19:26:23 2025 +0000 @@ -97,12 +97,23 @@ by (metis locally_compact_closedin closedin_retract) lemma homotopic_into_retract: - "\f \ S \ T; g \ S \ T; T retract_of U; homotopic_with_canon (\x. True) S U f g\ - \ homotopic_with_canon (\x. True) S T f g" - apply (subst (asm) homotopic_with_def) - apply (simp add: homotopic_with retract_of_def retraction_def Pi_iff, clarify) - apply (rule_tac x="r \ h" in exI) - by (smt (verit, ccfv_SIG) comp_def continuous_on_compose continuous_on_subset image_subset_iff) + assumes fg: "f \ S \ T" "g \ S \ T" + assumes "T retract_of U" + assumes "homotopic_with_canon (\x. True) S U f g" + shows "homotopic_with_canon (\x. True) S T f g" +proof - + obtain h r where r: "retraction U T r" + "continuous_on ({0..1::real} \ S) h" + and h: "h \ {0..1} \ S \ U \ (\x. h (0, x) = f x) \ (\x. h (1, x) = g x)" + using assms by (auto simp: homotopic_with_def retract_of_def) + then have "continuous_on ({0..1} \ S) (r \ h)" + by (metis continuous_on_compose continuous_on_subset funcset_image + retraction_def) + then show ?thesis + using r fg h + apply (simp add: retraction homotopic_with Pi_iff) + by (smt (verit, best) imageI) +qed lemma retract_of_locally_connected: assumes "locally connected T" "S retract_of T" @@ -131,7 +142,8 @@ ultimately show ?thesis unfolding homotopy_equivalent_space_def - by (smt (verit, del_insts) continuous_map_id continuous_map_subtopology_eu id_def r retraction retraction_comp subset_refl) + by (meson continuous_map_from_subtopology_mono continuous_map_id + continuous_map_subtopology_eu r retraction_def) qed lemma deformation_retract: @@ -2235,7 +2247,7 @@ have "continuous_on ({0..1} \ S) h" unfolding h_def using g by (intro continuous_intros) (auto simp: path_defs) moreover - have "h ` ({0..1} \ S) \ sphere 0 1" + have "h \ ({0..1} \ S) \ sphere 0 1" unfolding h_def using g by (auto simp: divide_simps path_defs) ultimately show ?thesis using g by (auto simp: h_def path_defs homotopic_with_def) diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Further_Topology.thy Sun Mar 23 19:26:23 2025 +0000 @@ -2743,7 +2743,8 @@ by (auto simp: Arg2pi_ge_0 Arg2pi_lt_2pi less_imp_le) also have "... \ S" using him by blast - finally show "(\w. h (fst w, Arg2pi (snd w) / (2 * pi))) ` ({0..1} \ sphere 0 1) \ S" . + finally show "(\w. h (fst w, Arg2pi (snd w) / (2 * pi))) \ {0..1} \ sphere 0 1 \ S" + by blast qed (auto simp: h0 h1) qed diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Homotopy.thy --- a/src/HOL/Analysis/Homotopy.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Homotopy.thy Sun Mar 23 19:26:23 2025 +0000 @@ -116,21 +116,21 @@ by (cases "t = 1") (simp_all add: assms) qed auto +lemma homotopic_with_imp_funspace1: + "homotopic_with_canon P X Y f g \ f \ X \ Y" + using homotopic_with_imp_continuous_maps by fastforce + lemma homotopic_with_imp_subset1: "homotopic_with_canon P X Y f g \ f ` X \ Y" - by (meson continuous_map_subtopology_eu homotopic_with_imp_continuous_maps) + using homotopic_with_imp_funspace1 by blast + +lemma homotopic_with_imp_funspace2: + "homotopic_with_canon P X Y f g \ g \ X \ Y" + using homotopic_with_imp_continuous_maps by force lemma homotopic_with_imp_subset2: "homotopic_with_canon P X Y f g \ g ` X \ Y" - by (meson continuous_map_subtopology_eu homotopic_with_imp_continuous_maps) - -lemma homotopic_with_imp_funspace1: - "homotopic_with_canon P X Y f g \ f \ X \ Y" - using homotopic_with_imp_subset1 by blast - -lemma homotopic_with_imp_funspace2: - "homotopic_with_canon P X Y f g \ g \ X \ Y" - using homotopic_with_imp_subset2 by blast + using homotopic_with_imp_funspace2 by blast lemma homotopic_with_subset_left: "\homotopic_with_canon P X Y f g; Z \ X\ \ homotopic_with_canon P Z Y f g" @@ -485,10 +485,11 @@ lemma homotopic_paths_imp_subset: "homotopic_paths S p q \ path_image p \ S \ path_image q \ S" - by (metis (mono_tags) continuous_map_subtopology_eu homotopic_paths_def homotopic_with_imp_continuous_maps path_image_def) + by (simp add: homotopic_paths_def homotopic_with_imp_subset1 homotopic_with_imp_subset2 + path_image_def) proposition homotopic_paths_refl [simp]: "homotopic_paths S p p \ path p \ path_image p \ S" - by (simp add: homotopic_paths_def path_def path_image_def) + by (auto simp add: homotopic_paths_def path_def path_image_def) proposition homotopic_paths_sym: "homotopic_paths S p q \ homotopic_paths S q p" by (metis (mono_tags) homotopic_paths_def homotopic_paths_imp_pathfinish homotopic_paths_imp_pathstart homotopic_with_symD) @@ -684,7 +685,7 @@ lemma homotopic_loops: "homotopic_loops S p q \ (\h. continuous_on ({0..1::real} \ {0..1}) h \ - image h ({0..1} \ {0..1}) \ S \ + h \ ({0..1} \ {0..1}) \ S \ (\x \ {0..1}. h(0,x) = p x) \ (\x \ {0..1}. h(1,x) = q x) \ (\t \ {0..1}. pathfinish(h \ Pair t) = pathstart(h \ Pair t)))" @@ -702,12 +703,13 @@ proposition homotopic_loops_imp_subset: "homotopic_loops S p q \ path_image p \ S \ path_image q \ S" unfolding homotopic_loops_def path_image_def - by (meson continuous_map_subtopology_eu homotopic_with_imp_continuous_maps) + by (simp add: homotopic_with_imp_subset1 homotopic_with_imp_subset2) proposition homotopic_loops_refl: "homotopic_loops S p p \ path p \ path_image p \ S \ pathfinish p = pathstart p" - by (simp add: homotopic_loops_def path_image_def path_def) + by (metis (mono_tags, lifting) homotopic_loops_def homotopic_paths_def + homotopic_paths_refl homotopic_with_refl) proposition homotopic_loops_sym: "homotopic_loops S p q \ homotopic_loops S q p" by (simp add: homotopic_loops_def homotopic_with_sym) @@ -726,8 +728,9 @@ proposition homotopic_loops_eq: "\path p; path_image p \ S; pathfinish p = pathstart p; \t. t \ {0..1} \ p(t) = q(t)\ \ homotopic_loops S p q" - unfolding homotopic_loops_def path_image_def path_def pathstart_def pathfinish_def - by (auto intro: homotopic_with_eq [OF homotopic_with_refl [where f = p, THEN iffD2]]) + unfolding homotopic_loops_def path_image_def path_def pathstart_def pathfinish_def image_subset_iff_funcset + using homotopic_with_eq [OF homotopic_with_refl [where f = p, THEN iffD2]] + by fastforce proposition homotopic_loops_continuous_image: "\homotopic_loops S f g; continuous_on S h; h \ S \ t\ \ homotopic_loops t (h \ f) (h \ g)" @@ -1247,7 +1250,7 @@ using p1 p2 unfolding homotopic_loops apply clarify subgoal for h k - by (rule_tac x="\z. (h z, k z)" in exI) (force intro: continuous_intros simp: path_defs) + by (rule_tac x="\z. (h z, k z)" in exI) (auto intro: continuous_intros simp: path_defs) done qed with assms show ?thesis @@ -3786,7 +3789,9 @@ lemma homeomorphic_imp_homotopy_eqv: "S homeomorphic T \ S homotopy_eqv T" unfolding homeomorphic_def homeomorphism_def homotopy_equivalent_space_def - by (metis continuous_map_subtopology_eu homotopic_with_id2 openin_imp_subset openin_subtopology_self topspace_euclidean_subtopology) + apply (erule ex_forward)+ + by (metis continuous_map_subtopology_eu homotopic_with_id2 openin_imp_subset openin_subtopology_self topspace_euclidean_subtopology + image_subset_iff_funcset) lemma homotopy_eqv_inj_linear_image: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" @@ -3963,7 +3968,8 @@ shows "S homotopy_eqv ({}::'b::real_normed_vector set) \ S = {}" (is "?lhs = ?rhs") proof assume ?lhs then show ?rhs - by (metis continuous_map_subtopology_eu empty_iff equalityI homotopy_equivalent_space_def image_subset_iff subsetI) + by (meson continuous_map_subtopology_eu equals0D equals0I funcset_mem + homotopy_equivalent_space_def) qed (use homeomorphic_imp_homotopy_eqv in force) lemma homotopy_eqv_empty2 [simp]: @@ -5281,8 +5287,8 @@ assume c: "homotopic_with_canon (\x. True) (sphere a r) S f (\x. c)" then have contf: "continuous_on (sphere a r) f" by (metis homotopic_with_imp_continuous) - moreover have fim: "f ` sphere a r \ S" - by (meson continuous_map_subtopology_eu c homotopic_with_imp_continuous_maps) + moreover have fim: "f \ sphere a r \ S" + using homotopic_with_imp_subset1 that by blast show ?P using contf fim by (auto simp: sphere_def dist_norm norm_minus_commute) qed @@ -5373,7 +5379,7 @@ by (intro continuous_intros) qed (auto simp: dist_norm norm_minus_commute mult_left_le_one_le) moreover - have "?h ` ({0..1} \ sphere a r) \ S" + have "?h \ ({0..1} \ sphere a r) \ S" by (auto simp: dist_norm norm_minus_commute mult_left_le_one_le gim [THEN subsetD]) moreover have "\x\sphere a r. ?h (0, x) = g a" "\x\sphere a r. ?h (1, x) = f x" diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Retracts.thy --- a/src/HOL/Analysis/Retracts.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Retracts.thy Sun Mar 23 19:26:23 2025 +0000 @@ -1815,7 +1815,7 @@ apply (intro continuous_on_compose continuous_intros) apply (force intro: inV continuous_on_subset [OF contk] continuous_on_subset [OF conta])+ done - show "(k \ (\z. (fst z *\<^sub>R (a \ snd) z, snd z))) ` ({0..1} \ T) \ U" + show "(k \ (\z. (fst z *\<^sub>R (a \ snd) z, snd z))) \ ({0..1} \ T) \ U" using inV kim by auto show "\x\T. (k \ (\z. (fst z *\<^sub>R (a \ snd) z, snd z))) (0, x) = f x" by (simp add: B_def h'_def keq) @@ -2211,7 +2211,7 @@ proof (simp add: homotopic_with, intro exI conjI) show "continuous_on ({0..1} \ T') k" using TW continuous_on_subset contk by auto - show "k ` ({0..1} \ T') \ U" + show "k \ ({0..1} \ T') \ U" using TW kim by fastforce have "T' \ S" by (meson opeT' subsetD openin_imp_subset) @@ -2246,7 +2246,7 @@ and hom: "\n. homotopic_with_canon (\x. True) (V n) T f g" using assms by auto then obtain h where conth: "\n. continuous_on ({0..1::real} \ V n) (h n)" - and him: "\n. h n ` ({0..1} \ V n) \ T" + and him: "\n. h n \ ({0..1} \ V n) \ T" and h0: "\n. \x. x \ V n \ h n (0, x) = f x" and h1: "\n. \x. x \ V n \ h n (1, x) = g x" by (simp add: homotopic_with) metis @@ -2277,7 +2277,7 @@ proof (simp add: homotopic_with eqU [symmetric], intro exI conjI ballI) show "continuous_on ({0..1} \ \\) \" using V eqU by (blast intro!: continuous_on_subset [OF cont]) - show "\` ({0..1} \ \\) \ T" + show "\ \ ({0..1} \ \\) \ T" proof clarsimp fix t :: real and y :: "'a" and X :: "'a set" assume "y \ X" "X \ \" and t: "0 \ t" "t \ 1" diff -r 3529946fca19 -r b022c013b04b src/HOL/Analysis/Urysohn.thy --- a/src/HOL/Analysis/Urysohn.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Analysis/Urysohn.thy Sun Mar 23 19:26:23 2025 +0000 @@ -45,7 +45,7 @@ then show ?thesis by (auto simp: f_def cInf_lower) qed - ultimately have fim: "f ` topspace X \ {0..1}" + ultimately have fim: "f \ topspace X \ {0..1}" by (auto simp: f_def) have 0: "0 \ dyadics \ {0..1::real}" and 1: "1 \ dyadics \ {0..1::real}" by (force simp: dyadics_def)+ @@ -161,17 +161,17 @@ qed qed then have contf: "continuous_map X (top_of_set {0..1}) f" - by (force simp: Met_TC.continuous_map_to_metric dist_real_def continuous_map_in_subtopology fim simp flip: mtopology_is_euclidean) + by (auto simp: Met_TC.continuous_map_to_metric dist_real_def continuous_map_in_subtopology fim abs_minus_commute simp flip: mtopology_is_euclidean) define g where "g \ \x. a + (b - a) * f x" show thesis proof have "continuous_map X euclideanreal g" using contf \a \ b\ unfolding g_def by (auto simp: continuous_intros continuous_map_in_subtopology) - moreover have "g ` (topspace X) \ {a..b}" - using mult_left_le [of "f _" "b-a"] contf \a \ b\ - by (simp add: g_def add.commute continuous_map_in_subtopology image_subset_iff le_diff_eq) + moreover have "g \ (topspace X) \ {a..b}" + using mult_left_le [of "f _" "b-a"] contf \a \ b\ + by (simp add: g_def Pi_iff add.commute continuous_map_in_subtopology image_subset_iff le_diff_eq) ultimately show "continuous_map X (top_of_set {a..b}) g" - by (meson continuous_map_in_subtopology) + using continuous_map_in_subtopology by blast show "g ` S \ {a}" "g ` T \ {b}" using fimS fimT by (auto simp: g_def) qed @@ -576,8 +576,8 @@ where conth: "continuous_map X (top_of_set {0..1}) h" and him: "h ` W \ {0}" "h ` S \ {1}" by (metis XS normal_space_iff_Urysohn) - then have him01: "h ` topspace X \ {0..1}" - by (meson continuous_map_in_subtopology) + then have him01: "h \ topspace X \ {0..1}" + by (metis continuous_map_in_subtopology) obtain z where "z \ T" using \T \ {}\ by blast define g' where "g' \ \x. z + h x * (g x - z)" @@ -1066,7 +1066,7 @@ proof - have *: "\U V. openin X U \ openin X V \ a \ U \ C \ V \ disjnt U V" if contf: "continuous_map X euclideanreal f" and a: "a \ topspace X - C" and "closedin X C" - and fim: "f ` topspace X \ {0..1}" and f0: "f a = 0" and f1: "f ` C \ {1}" + and fim: "f \ topspace X \ {0..1}" and f0: "f a = 0" and f1: "f ` C \ {1}" for C a f proof (intro exI conjI) show "openin X {x \ topspace X. f x \ {..<1 / 2}}" "openin X {x \ topspace X. f x \ {1 / 2<..}}" @@ -1078,9 +1078,9 @@ using \closedin X C\ f1 closedin_subset by auto qed (auto simp: disjnt_iff) show ?thesis - using assms + using assms * unfolding completely_regular_space_def regular_space_def continuous_map_in_subtopology - by (meson "*") + by metis qed @@ -4028,11 +4028,11 @@ have "closedin X {x}" by (simp add: \Hausdorff_space X\ closedin_Hausdorff_singleton \x \ topspace X\) then obtain f where contf: "continuous_map X euclideanreal f" - and f01: "\x. x \ topspace X \ f x \ {0..1}" and fxy: "f y = 0" "f x = 1" - using \completely_regular_space X\ xy unfolding completely_regular_space_def - by (smt (verit, ccfv_threshold) Diff_iff continuous_map_in_subtopology image_subset_iff singleton_iff) + and f01: "f \ topspace X \ {0..1}" and fxy: "f y = 0" "f x = 1" + using \completely_regular_space X\ xy unfolding completely_regular_space_def Pi_iff continuous_map_in_subtopology image_subset_iff + by (metis Diff_iff empty_iff insert_iff) then have "bounded (f ` topspace X)" - by (meson bounded_closed_interval bounded_subset image_subset_iff) + by (metis bounded_closed_interval bounded_subset image_subset_iff_funcset) with contf f01 have "restrict f (topspace X) \ K" by (auto simp: K_def) with fxy xy show ?thesis @@ -4047,11 +4047,13 @@ fix x U assume "e x \ K \\<^sub>E {0..1}" and "x \ topspace X" and "openin X U" and "x \ U" then obtain g where contg: "continuous_map X (top_of_set {0..1}) g" and "g x = 0" - and gim: "g ` (topspace X - U) \ {1::real}" + and gim: "g \ (topspace X - U) \ {1::real}" using \completely_regular_space X\ unfolding completely_regular_space_def - by (metis Diff_iff openin_closedin_eq) + using Diff_iff openin_closedin_eq + by (metis image_subset_iff_funcset) then have "bounded (g ` topspace X)" - by (meson bounded_closed_interval bounded_subset continuous_map_in_subtopology) + by (meson bounded_closed_interval bounded_subset continuous_map_in_subtopology + image_subset_iff_funcset) moreover have "g \ topspace X \ {0..1}" using contg by (simp add: continuous_map_def) ultimately have g_in_K: "restrict g (topspace X) \ K" @@ -4067,7 +4069,7 @@ have "e y (restrict g (topspace X)) \ {0..<1}" using ey by (smt (verit, ccfv_SIG) PiE_mem g_in_K) with gim g_in_K y \y \ U\ show ?thesis - by (fastforce simp: e_def) + by (fastforce simp: e_def Pi_iff) qed ultimately show "\W. openin (product_topology (\f. top_of_set {0..1}) K) W \ e x \ W \ e' ` (e ` topspace X \ W - {e x}) \ U" @@ -4120,7 +4122,7 @@ and g1: "\t. t \ T \ g t ` S \ {1}" by metis then have g01: "\t. t \ T \ g t ` topspace X \ {0..1}" - by (meson continuous_map_in_subtopology) + by (meson continuous_map_in_subtopology image_subset_iff_funcset) define G where "G \ \t. {x \ topspace X. g t x \ {..<1/2}}" have "Ball (G`T) (openin X)" using contg unfolding G_def continuous_map_in_subtopology @@ -4171,11 +4173,12 @@ define g where "g \ \x. a + (b - a) * f x" show thesis proof - have "\x\topspace X. a + (b - a) * f x \ b" - using contf \a \ b\ apply (simp add: continuous_map_in_subtopology image_subset_iff) - by (smt (verit, best) mult_right_le_one_le) + have "a + (b - a) * f i \ b" if "i \ topspace X" for i + using that contf \a \ b\ affine_ineq [of "f i" a b] + unfolding continuous_map_in_subtopology continuous_map_upper_lower_semicontinuous_le_gen Pi_iff + by (simp add: algebra_simps) then show "continuous_map X (top_of_set {a..b}) g" - using contf \a \ b\ unfolding g_def continuous_map_in_subtopology image_subset_iff + using contf \a \ b\ unfolding g_def continuous_map_in_subtopology Pi_iff by (intro conjI continuous_intros; simp) show "g ` T \ {a}" "g ` S \ {b}" using f0 f1 by (auto simp: g_def) @@ -4193,7 +4196,7 @@ show thesis proof show "continuous_map X (top_of_set {a..b}) (uminus \ f)" - using contf by (auto simp: continuous_map_in_subtopology o_def) + using contf by (auto simp: continuous_map_in_subtopology o_def Pi_iff) show "(uminus o f) ` T \ {a}" "(uminus o f) ` S \ {b}" using fim by fastforce+ qed @@ -4256,7 +4259,7 @@ proof show "continuous_map (subtopology cube (e ` S)) X e'" by (meson \compactin X S\ compactin_subset_topspace conte' continuous_map_from_subtopology_mono image_mono) - show "e' ` topspace (subtopology cube (e ` S)) \ S" + show "e' \ topspace (subtopology cube (e ` S)) \ S" using \compactin X S\ compactin_subset_topspace e'e by fastforce qed qed (simp add: contf) diff -r 3529946fca19 -r b022c013b04b src/HOL/Homology/Brouwer_Degree.thy --- a/src/HOL/Homology/Brouwer_Degree.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Homology/Brouwer_Degree.thy Sun Mar 23 19:26:23 2025 +0000 @@ -96,7 +96,7 @@ "hom_boundary p X S \ hom (relative_homology_group p X S) (reduced_homology_group (p-1) (subtopology X S))" proof - - have *: "continuous_map X (discrete_topology {()}) (\x. ())" "(\x. ()) ` S \ {()}" + have *: "continuous_map X (discrete_topology {()}) (\x. ())" "(\x. ()) \ S \ {()}" by auto interpret group_hom "relative_homology_group p (discrete_topology {()}) {()}" "homology_group (p-1) (discrete_topology {()})" @@ -435,33 +435,34 @@ lemma deformation_retraction_relative_homology_group_isomorphisms: - "\retraction_maps X Y r s; r ` U \ V; s ` V \ U; homotopic_with (\h. h ` U \ U) X X (s \ r) id\ + "\retraction_maps X Y r s; r \ U \ V; s \ V \ U; homotopic_with (\h. h ` U \ U) X X (s \ r) id\ \ group_isomorphisms (relative_homology_group p X U) (relative_homology_group p Y V) (hom_induced p X U Y V r) (hom_induced p Y V X U s)" apply (simp add: retraction_maps_def) apply (rule homotopy_equivalence_relative_homology_group_isomorphisms) - apply (auto simp: image_subset_iff continuous_map_compose homotopic_with_equal) + apply (auto simp: image_subset_iff_funcset Pi_iff continuous_map_compose homotopic_with_equal) done lemma deformation_retract_relative_homology_group_isomorphisms: - "\retraction_maps X Y r id; V \ U; r ` U \ V; homotopic_with (\h. h ` U \ U) X X r id\ + "\retraction_maps X Y r id; V \ U; r \ U \ V; homotopic_with (\h. h ` U \ U) X X r id\ \ group_isomorphisms (relative_homology_group p X U) (relative_homology_group p Y V) (hom_induced p X U Y V r) (hom_induced p Y V X U id)" - by (simp add: deformation_retraction_relative_homology_group_isomorphisms) + by (simp add: deformation_retraction_relative_homology_group_isomorphisms + in_mono) lemma deformation_retract_relative_homology_group_isomorphism: - "\retraction_maps X Y r id; V \ U; r ` U \ V; homotopic_with (\h. h ` U \ U) X X r id\ + "\retraction_maps X Y r id; V \ U; r \ U \ V; homotopic_with (\h. h ` U \ U) X X r id\ \ (hom_induced p X U Y V r) \ iso (relative_homology_group p X U) (relative_homology_group p Y V)" by (metis deformation_retract_relative_homology_group_isomorphisms group_isomorphisms_imp_iso) lemma deformation_retract_relative_homology_group_isomorphism_id: - "\retraction_maps X Y r id; V \ U; r ` U \ V; homotopic_with (\h. h ` U \ U) X X r id\ + "\retraction_maps X Y r id; V \ U; r \ U \ V; homotopic_with (\h. h ` U \ U) X X r id\ \ (hom_induced p Y V X U id) \ iso (relative_homology_group p Y V) (relative_homology_group p X U)" by (metis deformation_retract_relative_homology_group_isomorphisms group_isomorphisms_imp_iso group_isomorphisms_sym) lemma deformation_retraction_imp_isomorphic_relative_homology_groups: - "\retraction_maps X Y r s; r ` U \ V; s ` V \ U; homotopic_with (\h. h ` U \ U) X X (s \ r) id\ + "\retraction_maps X Y r s; r \ U \ V; s ` V \ U; homotopic_with (\h. h ` U \ U) X X (s \ r) id\ \ relative_homology_group p X U \ relative_homology_group p Y V" by (blast intro: is_isoI group_isomorphisms_imp_iso deformation_retraction_relative_homology_group_isomorphisms) @@ -471,7 +472,7 @@ by (simp add: deformation_retraction_imp_homotopy_equivalent_space homotopy_equivalent_space_imp_isomorphic_homology_groups) lemma deformation_retract_imp_isomorphic_relative_homology_groups: - "\retraction_maps X X' r id; V \ U; r ` U \ V; homotopic_with (\h. h ` U \ U) X X r id\ + "\retraction_maps X X' r id; V \ U; r \ U \ V; homotopic_with (\h. h ` U \ U) X X r id\ \ relative_homology_group p X U \ relative_homology_group p X' V" by (simp add: deformation_retraction_imp_isomorphic_relative_homology_groups) @@ -482,7 +483,7 @@ lemma epi_hom_induced_inclusion: - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" shows "(hom_induced p (subtopology X S) {} X {} id) \ epi (homology_group p (subtopology X S)) (homology_group p X)" proof (rule epi_right_invertible) @@ -493,14 +494,20 @@ \ carrier (homology_group p X) \ carrier (homology_group p (subtopology X S))" by (simp add: hom_induced_carrier) fix x - assume "x \ carrier (homology_group p X)" - then show "hom_induced p (subtopology X S) {} X {} id (hom_induced p X {} (subtopology X S) {} f x) = x" - by (metis assms continuous_map_id_subt continuous_map_in_subtopology hom_induced_compose' hom_induced_id homology_homotopy_empty homotopic_with_imp_continuous_maps image_empty order_refl) + assume x: "x \ carrier (homology_group p X)" + show "hom_induced p (subtopology X S) {} X {} id (hom_induced p X {} (subtopology X S) {} f x) = x" + proof (subst hom_induced_compose') + show "continuous_map X (subtopology X S) f" + by (meson assms continuous_map_into_subtopology + homotopic_with_imp_continuous_maps) + show "hom_induced p X {} X {} (id \ f) x = x" + by (metis assms(1) hom_induced_id homology_homotopy_empty id_comp x) + qed (use assms in auto) qed lemma trivial_homomorphism_hom_induced_relativization: - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" shows "trivial_homomorphism (homology_group p X) (relative_homology_group p X S) (hom_induced p X {} X S id)" proof - @@ -514,7 +521,7 @@ lemma mon_hom_boundary_inclusion: - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" shows "(hom_boundary p X S) \ mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))" proof - @@ -528,7 +535,7 @@ qed lemma short_exact_sequence_hom_induced_relativization: - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" shows "short_exact_sequence (homology_group (p-1) X) (homology_group (p-1) (subtopology X S)) (relative_homology_group p X S) (hom_induced (p-1) (subtopology X S) {} X {} id) (hom_boundary p X S)" unfolding short_exact_sequence_iff @@ -537,7 +544,7 @@ lemma group_isomorphisms_homology_group_prod_deformation: fixes p::int - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" obtains H K where "subgroup H (homology_group p (subtopology X S))" "subgroup K (homology_group p (subtopology X S))" @@ -561,15 +568,19 @@ have x: "short_exact_sequence (?pX) ?pXS ?rhs ?hi ?hb" using short_exact_sequence_hom_induced_relativization [OF assms, of "p + 1"] by simp have contf: "continuous_map X (subtopology X S) f" - by (meson assms continuous_map_in_subtopology homotopic_with_imp_continuous_maps) + by (metis assms continuous_map_into_subtopology homotopic_with_imp_continuous_maps) obtain H K where HK: "H \ ?pXS" "subgroup K ?pXS" "H \ K \ {one ?pXS}" "set_mult ?pXS H K = carrier ?pXS" and iso: "?hb \ iso ?rhs (subgroup_generated ?pXS H)" "?hi \ iso (subgroup_generated ?pXS K) ?pX" - apply (rule splitting_lemma_right [OF x, where g' = "hom_induced p X {} (subtopology X S) {} f"]) - apply (simp add: hom_induced_empty_hom) - apply (simp add: contf hom_induced_compose') - apply (metis (full_types) assms(1) hom_induced_id homology_homotopy_empty) - apply blast - done + proof (rule splitting_lemma_right [OF x, where g' = "hom_induced p X {} (subtopology X S) {} f"]) + show "hom_induced p X {} (subtopology X S) {} f \ hom (homology_group p X) (homology_group p (subtopology X S))" + using hom_induced_empty_hom by blast + next + fix z + assume "z \ carrier (homology_group p X)" + then show "hom_induced p (subtopology X S) {} X {} id (hom_induced p X {} (subtopology X S) {} f z) = z" + using assms(1) contf hom_induced_id homology_homotopy_empty + by (fastforce simp add: hom_induced_compose') + qed blast show ?thesis proof show "subgroup H ?pXS" @@ -587,7 +598,7 @@ qed lemma iso_homology_group_prod_deformation: - assumes "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + assumes "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" shows "homology_group p (subtopology X S) \ DirProd (homology_group p X) (relative_homology_group(p + 1) X S)" (is "?G \ DirProd ?H ?R") @@ -613,7 +624,7 @@ assumes "contractible_space X" "S \ topspace X" "S \ {}" shows "homology_group 0 (subtopology X S) \ DirProd integer_group (relative_homology_group(1) X S)" proof - - obtain f where "homotopic_with (\x. True) X X id f" and "f ` (topspace X) \ S" + obtain f where "homotopic_with (\x. True) X X id f" and "f \ topspace X \ S" using assms contractible_space_alt by fastforce then have "homology_group 0 (subtopology X S) \ homology_group 0 X \\ relative_homology_group 1 X S" using iso_homology_group_prod_deformation [of X _ S 0] by auto @@ -911,7 +922,8 @@ qed ultimately have cmh: "continuous_map (prod_topology ?T01 ?X12) (nsphere n) h" - by (subst (2) nsphere) (simp add: continuous_map_in_subtopology continuous_map_componentwise_UNIV) + proof (subst (2) nsphere) + qed (fastforce simp add: continuous_map_in_subtopology continuous_map_componentwise_UNIV) have "hom_induced p (subtopology (nsphere n) {x. 0 \ x k}) (topspace (subtopology (nsphere n) {x. 0 \ x k}) \ {x. x k = 0}) ?X12 (topspace ?X12 \ {x. - 1/2 \ x k \ x k \ 0}) id @@ -928,13 +940,13 @@ apply (auto simp: h_def Let_def) done show "continuous_map (subtopology (nsphere n) {x. 0 \ x k}) ?X12 id" - by (simp add: continuous_map_in_subtopology) (auto simp: nsphere) + by (simp add: continuous_map_in_subtopology) qed (simp add: nsphere h) next have h0: "\xa. \xa \ topspace (nsphere n); - (1/2) \ xa k; xa k \ 0\ \ h (0, xa) k = 0" by (simp add: h_def Let_def) - show "(h \ (\x. (0,x))) ` (topspace ?X12 \ {x. - 1 / 2 \ x k \ x k \ 0}) - \ topspace (subtopology (nsphere n) {x. 0 \ x k}) \ {x. x k = 0}" + show "(h \ (\x. (0,x))) \ (topspace ?X12 \ {x. - 1 / 2 \ x k \ x k \ 0}) + \ topspace (subtopology (nsphere n) {x. 0 \ x k}) \ {x. x k = 0}" apply (auto simp: h0) apply (rule subsetD [OF continuous_map_image_subset_topspace [OF cmh]]) apply (force simp: nsphere) @@ -981,9 +993,8 @@ by (simp add: nsphere if_distrib [of "\x. x ^ 2"] cong: if_cong) show ?thesis unfolding n - apply (rule iso_relative_homology_of_contractible [where p = "1 + p", simplified]) - using contractible_space_upper_hemisphere ne apply blast+ - done + using iso_relative_homology_of_contractible [where p = "1 + p", simplified] + by (metis contractible_space_upper_hemisphere dual_order.refl empty_iff ne) qed corollary iso_reduced_homology_group_upper_hemisphere: @@ -1090,10 +1101,8 @@ "\\f \ iso G1 G2. \x \ carrier G1. r2(f x) = f(r1 x); \f \ iso G2 G3. \x \ carrier G2. r3(f x) = f(r2 x)\ \ \f \ iso G1 G3. \x \ carrier G1. r3(f x) = f(r1 x)" apply clarify - apply (rename_tac g f) - apply (rule_tac x="f \ g" in bexI) - apply (metis iso_iff comp_apply hom_in_carrier) - using iso_set_trans by blast + by (smt (verit, ccfv_threshold) Group.iso_iff hom_in_carrier iso_set_trans + o_apply) lemma reduced_homology_group_nsphere_step: "\f \ iso(reduced_homology_group p (nsphere n)) @@ -1106,7 +1115,9 @@ define r where "r \ \x::nat\real. \i. if i = 0 then -x i else x i" have cmr: "continuous_map (nsphere n) (nsphere n) r" for n unfolding r_def by (rule continuous_map_nsphere_reflection) - have rsub: "r ` {x. 0 \ x (Suc n)} \ {x. 0 \ x (Suc n)}" "r ` {x. x (Suc n) \ 0} \ {x. x (Suc n) \ 0}" "r ` {x. x (Suc n) = 0} \ {x. x (Suc n) = 0}" + have rsub: "r \ {x. 0 \ x (Suc n)} \ {x. 0 \ x (Suc n)}" + "r \ {x. x (Suc n) \ 0} \ {x. x (Suc n) \ 0}" + "r \ {x. x (Suc n) = 0} \ {x. x (Suc n) = 0}" by (force simp: r_def)+ let ?sub = "subtopology (nsphere (Suc n)) {x. x (Suc n) \ 0}" let ?G2 = "relative_homology_group (1 + p) ?sub {x. x (Suc n) = 0}" @@ -1126,12 +1137,13 @@ fix c assume "c \ carrier ?G2" have cmrs: "continuous_map ?sub ?sub r" - by (metis (mono_tags, lifting) IntE cmr continuous_map_from_subtopology continuous_map_in_subtopology image_subset_iff rsub(1) topspace_subtopology) + by (metis (no_types, lifting) IntE Pi_iff cmr continuous_map_from_subtopology + continuous_map_into_subtopology rsub(1) topspace_subtopology) have "hom_induced p (nsphere n) {} (nsphere n) {} r \ hom_boundary (1 + p) ?sub {x. x (Suc n) = 0} = hom_boundary (1 + p) ?sub {x. x (Suc n) = 0} \ hom_induced (1 + p) ?sub {x. x (Suc n) = 0} ?sub {x. x (Suc n) = 0} r" using naturality_hom_induced [OF cmrs rsub(3), symmetric, of "1+p", simplified] - by (simp add: subtopology_subtopology subtopology_nsphere_equator flip: Collect_conj_eq cong: rev_conj_cong) + by (simp add: Pi_iff subtopology_subtopology subtopology_nsphere_equator flip: Collect_conj_eq cong: rev_conj_cong) then show "?j p n (?f c) = ?f (hom_induced (1 + p) ?sub {x. x (Suc n) = 0} ?sub {x. x (Suc n) = 0} r c)" by (metis comp_def) next @@ -1199,12 +1211,11 @@ then show ?thesis by (simp add: nsphere) qed - have *: "reduced_homology_group p (subtopology (powertop_real UNIV) {?a, ?b}) \ + have "t1_space (powertop_real UNIV)" + using t1_space_euclidean t1_space_product_topology by blast + then have *: "reduced_homology_group p (subtopology (powertop_real UNIV) {?a, ?b}) \ homology_group p (subtopology (powertop_real UNIV) {?a})" - apply (rule reduced_homology_group_pair) - apply (simp_all add: fun_eq_iff) - apply (simp add: open_fun_def separation_t1 t1_space_def) - done + by (intro reduced_homology_group_pair) (auto simp: fun_eq_iff) have "reduced_homology_group 0 (nsphere 0) \ integer_group" if "p=0" proof - have "reduced_homology_group 0 (nsphere 0) \ homology_group 0 (top_of_set {?a})" if "p=0" @@ -1352,9 +1363,9 @@ and aeq: "subgroup_generated ?G {a} = ?G" using cyclic_reduced_homology_group_nsphere [of p p] by (auto simp: cyclic_group_def) show ?thesis - using hi [OF a] - apply (simp add: Brouwer_degree2 a) - by (metis Brouwer_degree2_iff a aeq f group.trivial_group_subgroup_generated group_reduced_homology_group subsetI trivial_reduced_homology_group_nsphere) + using hi [OF a] unfolding Brouwer_degree2 a + by (metis Brouwer_degree2_iff a aeq f group.trivial_group_subgroup_generated + group_reduced_homology_group subsetI trivial_reduced_homology_group_nsphere) qed lemma Brouwer_degree2_unique_generator: @@ -1487,7 +1498,7 @@ then have he: "hom_induced p (nsphere p) {} (nsphere p) {} (\x. a) = hom_induced p (subtopology (nsphere p) {a}) {} (nsphere p) {} id \ hom_induced p (nsphere p) {} (subtopology (nsphere p) {a}) {} (\x. a)" - by (metis continuous_map_id_subt hom_induced_compose id_comp image_empty order_refl) + by (metis continuous_map_id_subt fun.map_id hom_induced_compose_empty) have 1: "hom_induced p (nsphere p) {} (subtopology (nsphere p) {a}) {} (\x. a) c = \\<^bsub>reduced_homology_group (int p) (subtopology (nsphere p) {a})\<^esub>" using c trivial_reduced_homology_group_contractible_space [of "subtopology (nsphere p) {a}" p] @@ -1586,11 +1597,12 @@ obtain d d' where d: "d \ carrier ?P" and d': "d' \ carrier ?N" and eqc: "?f(d,d') = c" using c by (force simp flip: fim) let ?h = "\xx. hom_induced 0 (subtopology (nsphere 0) {xx}) {} (discrete_topology {()}) {} (\x. ())" - have "retraction_map (subtopology (nsphere 0) {pp}) (subtopology (nsphere 0) {nn}) r" - apply (simp add: retraction_map_def retraction_maps_def continuous_map_in_subtopology continuous_map_from_subtopology cmr image_subset_iff) - apply (rule_tac x=r in exI) - apply (force simp: retraction_map_def retraction_maps_def continuous_map_in_subtopology continuous_map_from_subtopology cmr) - done + have "continuous_map (subtopology (nsphere 0) {nn}) (nsphere 0) r" + using cmr continuous_map_from_subtopology by blast + then have "retraction_map (subtopology (nsphere 0) {pp}) (subtopology (nsphere 0) {nn}) r" + apply (simp add: retraction_map_def retraction_maps_def continuous_map_in_subtopology) + using \r nn = pp\ \r pp = nn\ cmr continuous_map_from_subtopology + by blast then have "carrier ?N = (hom_induced 0 (subtopology (nsphere 0) {pp}) {} (subtopology (nsphere 0) {nn}) {} r) ` carrier ?P" by (rule surj_hom_induced_retraction_map) then obtain e where e: "e \ carrier ?P" and eqd': "hom_induced 0 (subtopology (nsphere 0) {pp}) {} (subtopology (nsphere 0) {nn}) {} r e = d'" diff -r 3529946fca19 -r b022c013b04b src/HOL/Homology/Homology_Groups.thy --- a/src/HOL/Homology/Homology_Groups.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Homology/Homology_Groups.thy Sun Mar 23 19:26:23 2025 +0000 @@ -379,19 +379,19 @@ by (metis hom_boundary)+ lemma hom_chain_map: - "\continuous_map X Y f; f ` S \ T\ + "\continuous_map X Y f; f \ S \ T\ \ (chain_map p f) \ hom (relcycle_group p X S) (relcycle_group p Y T)" - by (force simp: chain_map_add singular_relcycle_chain_map hom_def) + by (simp add: chain_map_add hom_def singular_relcycle_chain_map) lemma hom_induced1: "\hom_relmap. (\p X S Y T f. - continuous_map X Y f \ f ` (topspace X \ S) \ T + continuous_map X Y f \ f \ (topspace X \ S) \ T \ (hom_relmap p X S Y T f) \ hom (relative_homology_group (int p) X S) (relative_homology_group (int p) Y T)) \ (\p X S Y T f c. - continuous_map X Y f \ f ` (topspace X \ S) \ T \ + continuous_map X Y f \ f \ (topspace X \ S) \ T \ singular_relcycle p X S c \ hom_relmap p X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c))" @@ -399,7 +399,7 @@ have "\y. (y \ hom (relative_homology_group (int p) X S) (relative_homology_group (int p) Y T)) \ (\c. singular_relcycle p X S c \ y (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c))" - if contf: "continuous_map X Y f" and fim: "f ` (topspace X \ S) \ T" + if contf: "continuous_map X Y f" and fim: "f \ (topspace X \ S) \ T" for p X S Y T and f :: "'a \ 'b" proof - let ?f = "(#>\<^bsub>relcycle_group p Y T\<^esub>) (singular_relboundary_set p Y T) \ chain_map p f" @@ -441,12 +441,12 @@ "\hom_relmap. (\p X S Y T f. continuous_map X Y f \ - f ` (topspace X \ S) \ T + f \ (topspace X \ S) \ T \ (hom_relmap p X S Y T f) \ hom (relative_homology_group p X S) (relative_homology_group p Y T)) \ (\p X S Y T f c. continuous_map X Y f \ - f ` (topspace X \ S) \ T \ + f \ (topspace X \ S) \ T \ singular_relcycle p X S c \ hom_relmap p X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)) \ @@ -464,13 +464,13 @@ lemma hom_induced3: "\hom_relmap. ((\p X S Y T f c. - ~(continuous_map X Y f \ f ` (topspace X \ S) \ T \ + ~(continuous_map X Y f \ f \ (topspace X \ S) \ T \ c \ carrier(relative_homology_group p X S)) \ hom_relmap p X S Y T f c = one(relative_homology_group p Y T)) \ (\p X S Y T f. hom_relmap p X S Y T f \ hom (relative_homology_group p X S) (relative_homology_group p Y T)) \ (\p X S Y T f c. - continuous_map X Y f \ f ` (topspace X \ S) \ T \ singular_relcycle p X S c + continuous_map X Y f \ f \ (topspace X \ S) \ T \ singular_relcycle p X S c \ hom_relmap p X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)) \ (\p X S Y T. @@ -486,24 +486,24 @@ moreover have "\x. ?P x \ ?Q x" proof - obtain hom_relmap:: "[int,'a topology,'a set,'b topology,'b set,'a \ 'b,('a chain) set] \ ('b chain) set" - where 1: "\p X S Y T f. \continuous_map X Y f; f ` (topspace X \ S) \ T\ \ + where 1: "\p X S Y T f. \continuous_map X Y f; f \ (topspace X \ S) \ T\ \ hom_relmap p X S Y T f \ hom (relative_homology_group p X S) (relative_homology_group p Y T)" and 2: "\p X S Y T f c. - \continuous_map X Y f; f ` (topspace X \ S) \ T; singular_relcycle p X S c\ + \continuous_map X Y f; f \ (topspace X \ S) \ T; singular_relcycle p X S c\ \ hom_relmap (int p) X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)" and 3: "(\p. p < 0 \ hom_relmap p = (\X S Y T f c. undefined))" using hom_induced2 [where ?'a='a and ?'b='b] - by (metis (mono_tags, lifting)) - have 4: "\continuous_map X Y f; f ` (topspace X \ S) \ T; c \ carrier (relative_homology_group p X S)\ \ + by (fastforce simp: Pi_iff) + have 4: "\continuous_map X Y f; f \ (topspace X \ S) \ T; c \ carrier (relative_homology_group p X S)\ \ hom_relmap p X (topspace X \ S) Y (topspace Y \ T) f c \ carrier (relative_homology_group p Y T)" for p X S Y f T c using hom_carrier [OF 1 [of X Y f "topspace X \ S" "topspace Y \ T" p]] continuous_map_image_subset_topspace by fastforce - have inhom: "(\c. if continuous_map X Y f \ f ` (topspace X \ S) \ T \ + have inhom: "(\c. if continuous_map X Y f \ f \ (topspace X \ S) \ T \ c \ carrier (relative_homology_group p X S) then hom_relmap p X (topspace X \ S) Y (topspace Y \ T) f c else \\<^bsub>relative_homology_group p Y T\<^esub>) @@ -522,16 +522,16 @@ show ?thesis proof (cases "continuous_map X Y f") case True - then have "f ` (topspace X \ S) \ topspace Y" + then have "f \ (topspace X \ S) \ topspace Y" using continuous_map_image_subset_topspace by blast then show ?thesis using True False that using 1 [of X Y f "topspace X \ S" "topspace Y \ T" p] - by (simp add: 4 continuous_map_image_subset_topspace hom_mult not_less group.is_monoid monoid.m_closed Int_left_absorb) + by (simp add: 4 Pi_iff continuous_map_funspace hom_mult not_less group.is_monoid monoid.m_closed Int_left_absorb) qed (simp add: group.is_monoid) qed qed - have hrel: "\continuous_map X Y f; f ` (topspace X \ S) \ T; singular_relcycle p X S c\ + have hrel: "\continuous_map X Y f; f \ (topspace X \ S) \ T; singular_relcycle p X S c\ \ hom_relmap (int p) X (topspace X \ S) Y (topspace Y \ T) f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)" for p X S Y T f c @@ -539,13 +539,14 @@ continuous_map_image_subset_topspace by fastforce show ?thesis apply (rule_tac x="\p X S Y T f c. - if continuous_map X Y f \ f ` (topspace X \ S) \ T \ + if continuous_map X Y f \ f \ (topspace X \ S) \ T \ c \ carrier(relative_homology_group p X S) then hom_relmap p X (topspace X \ S) Y (topspace Y \ T) f c else one(relative_homology_group p Y T)" in exI) apply (simp add: Int_left_absorb subtopology_restrict carrier_relative_homology_group - group.is_monoid group.restrict_hom_iff 4 inhom hrel cong: if_cong) - apply (force simp: continuous_map_def intro!: ext) + group.is_monoid group.restrict_hom_iff 4 inhom hrel split: if_splits) + apply (intro ext strip) + apply (auto simp: continuous_map_def) done qed ultimately show ?thesis @@ -558,7 +559,7 @@ hom_induced: "((\p X S Y T f c. ~(continuous_map X Y f \ - f ` (topspace X \ S) \ T \ + f \ (topspace X \ S) \ T \ c \ carrier(relative_homology_group p X S)) \ hom_induced p X (S::'a set) Y (T::'b set) f c = one(relative_homology_group p Y T)) \ @@ -567,7 +568,7 @@ (relative_homology_group p Y T)) \ (\p X S Y T f c. continuous_map X Y f \ - f ` (topspace X \ S) \ T \ + f \ (topspace X \ S) \ T \ singular_relcycle p X S c \ hom_induced p X (S::'a set) Y (T::'b set) f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)) \ @@ -581,7 +582,7 @@ by (fact hom_induced3) lemma hom_induced_default: - "~(continuous_map X Y f \ f ` (topspace X \ S) \ T \ c \ carrier(relative_homology_group p X S)) + "~(continuous_map X Y f \ f \ (topspace X \ S) \ T \ c \ carrier(relative_homology_group p X S)) \ hom_induced p X S Y T f c = one(relative_homology_group p Y T)" and hom_induced_hom: "hom_induced p X S Y T f \ hom (relative_homology_group p X S) (relative_homology_group p Y T)" @@ -593,15 +594,15 @@ by (metis hom_induced)+ lemma hom_induced_chain_map_gen: - "\continuous_map X Y f; f ` (topspace X \ S) \ T; singular_relcycle p X S c\ + "\continuous_map X Y f; f \ (topspace X \ S) \ T; singular_relcycle p X S c\ \ hom_induced p X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)" by (metis hom_induced) lemma hom_induced_chain_map: - "\continuous_map X Y f; f ` S \ T; singular_relcycle p X S c\ + "\continuous_map X Y f; f \ S \ T; singular_relcycle p X S c\ \ hom_induced p X S Y T f (homologous_rel_set p X S c) = homologous_rel_set p Y T (chain_map p f c)" - by (meson Int_lower2 hom_induced image_subsetI image_subset_iff subset_iff) + by (simp add: Pi_iff hom_induced_chain_map_gen) lemma hom_induced_eq: @@ -619,10 +620,11 @@ case 2 have "hom_induced n X S Y T f C = hom_induced n X S Y T g C" for C proof - - have "continuous_map X Y f \ f ` (topspace X \ S) \ T \ C \ carrier (relative_homology_group n X S) - \ continuous_map X Y g \ g ` (topspace X \ S) \ T \ C \ carrier (relative_homology_group n X S)" + have "continuous_map X Y f \ f \ (topspace X \ S) \ T \ C \ carrier (relative_homology_group n X S) + \ continuous_map X Y g \ g \ (topspace X \ S) \ T \ C \ carrier (relative_homology_group n X S)" (is "?P = ?Q") - by (metis IntD1 assms continuous_map_eq image_cong) + using assms Pi_iff continuous_map_eq [of X Y] + by (smt (verit, ccfv_SIG) Int_iff) then consider "\ ?P \ \ ?Q" | "?P \ ?Q" by blast then show ?thesis @@ -633,18 +635,18 @@ next case 2 have "homologous_rel_set n Y T (chain_map n f c) = homologous_rel_set n Y T (chain_map n g c)" - if "continuous_map X Y f" "f ` (topspace X \ S) \ T" - "continuous_map X Y g" "g ` (topspace X \ S) \ T" + if "continuous_map X Y f" "f \ (topspace X \ S) \ T" + "continuous_map X Y g" "g \ (topspace X \ S) \ T" "C = homologous_rel_set n X S c" "singular_relcycle n X S c" for c proof - have "chain_map n f c = chain_map n g c" - using assms chain_map_eq singular_relcycle that by blast + using assms chain_map_eq singular_relcycle that by metis then show ?thesis by simp qed with 2 show ?thesis - by (auto simp: relative_homology_group_def carrier_FactGroup + by (force simp: relative_homology_group_def carrier_FactGroup right_coset_singular_relboundary hom_induced_chain_map_gen) qed qed @@ -705,7 +707,7 @@ by (rule hom_induced_id_gen) auto lemma hom_induced_compose: - assumes "continuous_map X Y f" "f ` S \ T" "continuous_map Y Z g" "g ` T \ U" + assumes "continuous_map X Y f" "f \ S \ T" "continuous_map Y Z g" "g \ T \ U" shows "hom_induced p X S Z U (g \ f) = hom_induced p Y T Z U g \ hom_induced p X S Y T f" proof - consider (neg) "p < 0" | (int) n where "p = int n" @@ -715,7 +717,7 @@ case int have gf: "continuous_map X Z (g \ f)" using assms continuous_map_compose by fastforce - have gfim: "(g \ f) ` S \ U" + have gfim: "(g \ f) \ S \ U" unfolding o_def using assms by blast have sr: "\a. singular_relcycle n X S a \ singular_relcycle n Y T (chain_map n f a)" by (simp add: assms singular_relcycle_chain_map) @@ -727,7 +729,8 @@ case True with gfim show ?thesis unfolding int - by (auto simp: carrier_relative_homology_group gf gfim assms sr chain_map_compose hom_induced_chain_map) + by (auto simp: carrier_relative_homology_group gf gfim assms + sr chain_map_compose hom_induced_chain_map) next case False then show ?thesis @@ -738,12 +741,12 @@ qed lemma hom_induced_compose': - assumes "continuous_map X Y f" "f ` S \ T" "continuous_map Y Z g" "g ` T \ U" + assumes "continuous_map X Y f" "f \ S \ T" "continuous_map Y Z g" "g \ T \ U" shows "hom_induced p Y T Z U g (hom_induced p X S Y T f x) = hom_induced p X S Z U (g \ f) x" using hom_induced_compose [OF assms] by simp lemma naturality_hom_induced: - assumes "continuous_map X Y f" "f ` S \ T" + assumes "continuous_map X Y f" "f \ S \ T" shows "hom_boundary q Y T \ hom_induced q X S Y T f = hom_induced (q - 1) (subtopology X S) {} (subtopology Y T) {} f \ hom_boundary q X S" proof (cases "q \ 0") @@ -767,7 +770,7 @@ using p1 by auto have cbm: "(chain_boundary p (chain_map p f a)) = (chain_map (p - Suc 0) f (chain_boundary p a))" - using a chain_boundary_chain_map singular_relcycle by blast + using a chain_boundary_chain_map singular_relcycle by metis have contf: "continuous_map (subtopology X S) (subtopology Y T) f" using assms by (auto simp: continuous_map_in_subtopology continuous_map_from_subtopology) @@ -838,8 +841,9 @@ \ f ` A = f ` B" for f A B by blast have "?lhs = homologous_rel_set (Suc n) X S ` singular_relcycle_set (Suc n) X {}" - using hom_induced_chain_map chain_map_ident [of _ X] singular_relcycle - by (smt (verit) bot.extremum comp_apply continuous_map_id image_cong image_empty mem_Collect_eq) + using hom_induced_chain_map chain_map_ident [of _ X] singular_relcycle + by (smt (verit, best) comp_apply continuous_map_id empty_iff funcsetI + image_cong mem_Collect_eq) also have "\ = homologous_rel_set (Suc n) X S ` (singular_relcycle_set (Suc n) X S \ {c. singular_relboundary n (subtopology X S) {} (chain_boundary (Suc n) c)})" @@ -849,7 +853,9 @@ then show "\y. y \ singular_relcycle_set (Suc n) X S \ {c. singular_relboundary n (subtopology X S) {} (chain_boundary (Suc n) c)} \ homologous_rel_set (Suc n) X S c = homologous_rel_set (Suc n) X S y" - using singular_cycle singular_relcycle by (fastforce simp: singular_boundary) + using singular_cycle singular_relcycle + by (metis Int_Collect mem_Collect_eq singular_chain_0 + singular_relboundary_0) next fix c assume c: "c \ singular_relcycle_set (Suc n) X S \ @@ -956,15 +962,21 @@ have 2: "\\x. x \ A \ \y. y \ B \ f x = f y; \x. x \ B \ \y. y \ A \ f x = f y\ \ f ` A = f ` B" for f A B by blast - have "?lhs = homologous_rel_set n X {} ` (singular_relcycle_set n (subtopology X S) {})" - by (smt (verit) chain_map_ident continuous_map_id_subt empty_subsetI hom_induced_chain_map image_cong image_empty image_image mem_Collect_eq singular_relcycle) + have "\f. singular_chain n (subtopology X S) f \ + singular_chain (n - Suc 0) trivial_topology (chain_boundary n f) \ + hom_induced (int n) (subtopology X S) {} X {} id (homologous_rel_set n (subtopology X S) {} f) = + homologous_rel_set n X {} f" + by (auto simp: chain_map_ident hom_induced_chain_map singular_relcycle) + then have "?lhs = homologous_rel_set n X {} ` (singular_relcycle_set n (subtopology X S) {})" + by (simp add: singular_relcycle image_comp) also have "\ = homologous_rel_set n X {} ` (singular_relcycle_set n X {} \ singular_relboundary_set n X S)" proof (rule 2) fix c assume "c \ singular_relcycle_set n (subtopology X S) {}" then show "\y. y \ singular_relcycle_set n X {} \ singular_relboundary_set n X S \ homologous_rel_set n X {} c = homologous_rel_set n X {} y" - using singular_chain_imp_relboundary singular_cycle singular_relboundary_imp_chain singular_relcycle by fastforce + using singular_chain_imp_relboundary singular_relboundary_imp_chain + by (fastforce simp: singular_cycle) next fix c assume "c \ singular_relcycle_set n X {} \ singular_relboundary_set n X S" @@ -1031,7 +1043,7 @@ proposition homology_homotopy_axiom: - assumes "homotopic_with (\h. h ` S \ T) X Y f g" + assumes "homotopic_with (\h. h \ S \ T) X Y f g" shows "hom_induced p X S Y T f = hom_induced p X S Y T g" proof (cases "p < 0") case True @@ -1043,7 +1055,7 @@ by (metis int_nat_eq not_le) have cont: "continuous_map X Y f" "continuous_map X Y g" using assms homotopic_with_imp_continuous_maps by blast+ - have im: "f ` (topspace X \ S) \ T" "g ` (topspace X \ S) \ T" + have im: "f \ (topspace X \ S) \ T" "g \ (topspace X \ S) \ T" using homotopic_with_imp_property assms by blast+ show ?thesis proof @@ -1073,7 +1085,7 @@ then obtain n where peq: "p = int n" by (metis int_nat_eq not_le) have cont: "continuous_map (subtopology X (S - U)) (subtopology X S) id" - by (simp add: closure_of_subtopology_mono continuous_map_eq_image_closure_subset) + by (meson Diff_subset continuous_map_from_subtopology_mono continuous_map_id) have TU: "topspace X \ (S - U) \ (T - U) \ T" by auto show ?thesis @@ -1090,9 +1102,9 @@ (homologous_rel_set n (subtopology X (S - U)) (T - U) c) = hom_induced n (subtopology X (S - U)) (T - U) (subtopology X S) T id (homologous_rel_set n (subtopology X (S - U)) (T - U) d)" - then have scc: "singular_chain n (subtopology X (S - U)) c" + then obtain scc: "singular_chain n (subtopology X (S - U)) c" and scd: "singular_chain n (subtopology X (S - U)) d" - using singular_relcycle by blast+ + using singular_relcycle by metis have "singular_relboundary n (subtopology X (S - U)) (T - U) c" if srb: "singular_relboundary n (subtopology X S) T c" and src: "singular_relcycle n (subtopology X (S - U)) (T - U) c" for c @@ -1167,7 +1179,8 @@ "homologous_rel n (subtopology X S) T a c'" using a by (blast intro: excised_relcycle_exists [OF assms]) then have scc': "singular_chain n (subtopology X S) c'" - using homologous_rel_singular_chain singular_relcycle that by blast + using homologous_rel_singular_chain that + by (force simp: singular_relcycle) then show ?thesis using scc' chain_map_ident [of _ "subtopology X S"] c' homologous_rel_set_eq by fastforce @@ -1182,7 +1195,7 @@ homologous_rel_set n (subtopology X (S - U)) (T - U) ` singular_relcycle_set n (subtopology X (S - U)) (T - U) = homologous_rel_set n (subtopology X S) T ` singular_relcycle_set n (subtopology X S) T" - by (simp add: image_comp o_def hom_induced_chain_map_gen cont TU topspace_subtopology + by (simp add: image_comp o_def hom_induced_chain_map_gen cont TU cong: image_cong_simp) qed qed @@ -1776,10 +1789,10 @@ by (simp add: homology_homotopy_axiom) lemma homotopy_equivalence_relative_homology_group_isomorphisms: - assumes contf: "continuous_map X Y f" and fim: "f ` S \ T" - and contg: "continuous_map Y X g" and gim: "g ` T \ S" - and gf: "homotopic_with (\h. h ` S \ S) X X (g \ f) id" - and fg: "homotopic_with (\k. k ` T \ T) Y Y (f \ g) id" + assumes contf: "continuous_map X Y f" and fim: "f \ S \ T" + and contg: "continuous_map Y X g" and gim: "g \ T \ S" + and gf: "homotopic_with (\h. h \ S \ S) X X (g \ f) id" + and fg: "homotopic_with (\k. k \ T \ T) Y Y (f \ g) id" shows "group_isomorphisms (relative_homology_group p X S) (relative_homology_group p Y T) (hom_induced p X S Y T f) (hom_induced p Y T X S g)" unfolding group_isomorphisms_def @@ -1799,10 +1812,10 @@ lemma homotopy_equivalence_relative_homology_group_isomorphism: - assumes "continuous_map X Y f" and fim: "f ` S \ T" - and "continuous_map Y X g" and gim: "g ` T \ S" - and "homotopic_with (\h. h ` S \ S) X X (g \ f) id" - and "homotopic_with (\k. k ` T \ T) Y Y (f \ g) id" + assumes "continuous_map X Y f" and fim: "f \ S \ T" + and "continuous_map Y X g" and gim: "g \ T \ S" + and "homotopic_with (\h. h \ S \ S) X X (g \ f) id" + and "homotopic_with (\k. k \ T \ T) Y Y (f \ g) id" shows "(hom_induced p X S Y T f) \ iso (relative_homology_group p X S) (relative_homology_group p Y T)" using homotopy_equivalence_relative_homology_group_isomorphisms [OF assms] group_isomorphisms_imp_iso by metis @@ -1816,10 +1829,10 @@ using assms by (intro homotopy_equivalence_relative_homology_group_isomorphism) auto lemma homotopy_equivalent_space_imp_isomorphic_relative_homology_groups: - assumes "continuous_map X Y f" and fim: "f ` S \ T" - and "continuous_map Y X g" and gim: "g ` T \ S" - and "homotopic_with (\h. h ` S \ S) X X (g \ f) id" - and "homotopic_with (\k. k ` T \ T) Y Y (f \ g) id" + assumes "continuous_map X Y f" and fim: "f \ S \ T" + and "continuous_map Y X g" and gim: "g \ T \ S" + and "homotopic_with (\h. h \ S \ S) X X (g \ f) id" + and "homotopic_with (\k. k \ T \ T) Y Y (f \ g) id" shows "relative_homology_group p X S \ relative_homology_group p Y T" using homotopy_equivalence_relative_homology_group_isomorphism [OF assms] unfolding is_iso_def by blast @@ -1871,7 +1884,7 @@ by (simp add: trivial_relative_homology_group_empty) lemma homeomorphic_maps_relative_homology_group_isomorphisms: - assumes "homeomorphic_maps X Y f g" and im: "f ` S \ T" "g ` T \ S" + assumes "homeomorphic_maps X Y f g" and im: "f \ S \ T" "g \ T \ S" shows "group_isomorphisms (relative_homology_group p X S) (relative_homology_group p Y T) (hom_induced p X S Y T f) (hom_induced p Y T X S g)" proof - @@ -1884,10 +1897,10 @@ (hom_induced p X (topspace X \ S) Y (topspace Y \ T) f) (hom_induced p Y (topspace Y \ T) X (topspace X \ S) g)" proof (rule homotopy_equivalence_relative_homology_group_isomorphisms) - show "homotopic_with (\h. h ` (topspace X \ S) \ topspace X \ S) X X (g \ f) id" + show "homotopic_with (\h. h \ (topspace X \ S) \ topspace X \ S) X X (g \ f) id" using fg im by (auto intro: homotopic_with_equal continuous_map_compose) next - show "homotopic_with (\k. k ` (topspace Y \ T) \ topspace Y \ T) Y Y (f \ g) id" + show "homotopic_with (\k. k \ (topspace Y \ T) \ topspace Y \ T) Y Y (f \ g) id" using fg im by (auto intro: homotopic_with_equal continuous_map_compose) qed (use im fg in \auto simp: continuous_map_def\) then show ?thesis @@ -2197,21 +2210,23 @@ by (simp add: ext hom_boundary_carrier hom_induced_id hom_relboundary_def) lemma naturality_hom_induced_relboundary: - assumes "continuous_map X Y f" "f ` S \ U" "f ` T \ V" + assumes "continuous_map X Y f" "f \ S \ U" "f \ T \ V" shows "hom_relboundary p Y U V \ hom_induced p X S Y (U) f = hom_induced (p-1) (subtopology X S) T (subtopology Y U) V f \ hom_relboundary p X S T" proof - have [simp]: "continuous_map (subtopology X S) (subtopology Y U) f" - using assms continuous_map_from_subtopology continuous_map_in_subtopology topspace_subtopology by fastforce + using assms continuous_map_from_subtopology continuous_map_in_subtopology topspace_subtopology + by (fastforce simp: Pi_iff) have "hom_induced (p-1) (subtopology Y U) {} (subtopology Y U) V id \ hom_induced (p-1) (subtopology X S) {} (subtopology Y U) {} f = hom_induced (p-1) (subtopology X S) T (subtopology Y U) V f \ hom_induced (p-1) (subtopology X S) {} (subtopology X S) T id" using assms by (simp flip: hom_induced_compose) with assms show ?thesis - by (metis (no_types, lifting) fun.map_comp hom_relboundary_def naturality_hom_induced) + unfolding hom_relboundary_def + by (metis (no_types, lifting) ext fun.map_comp naturality_hom_induced) qed proposition homology_exactness_triple_1: @@ -2222,7 +2237,7 @@ [hom_relboundary p X S T, hom_induced p X T X S id])" (is "exact_seq ([?G1,?G2,?G3], [?h1,?h2])") proof - - have iTS: "id ` T \ S" and [simp]: "S \ T = T" + have iTS: "id \ T \ S" and [simp]: "S \ T = T" using assms by auto have "?h2 B \ kernel ?G2 ?G1 ?h1" for B proof - @@ -2291,7 +2306,7 @@ interpret comm_group "?G2" by (rule abelian_relative_homology_group) have "hom_induced p X T X S id (hom_induced p X {} X T id W) = hom_induced p X {} X S id W" - by (simp add: assms hom_induced_compose') + using assms iTS by (simp add: hom_induced_compose') then have "B = (?h2 \ hom_induced p X {} X T id) W \\<^bsub>?G2\<^esub> ?h2 D" by (simp add: Bcarr Weq hb.G.m_assoc hom_induced_carrier) then show "B = ?h2 ?W" @@ -2314,14 +2329,14 @@ (is "exact_seq ([?G1,?G2,?G3], [?h1,?h2])") proof - let ?H2 = "homology_group (p-1) (subtopology X S)" - have iTS: "id ` T \ S" and [simp]: "S \ T = T" + have iTS: "id \ T \ S" and [simp]: "S \ T = T" using assms by auto have "?h2 C \ kernel ?G2 ?G1 ?h1" for C proof - have "?h1 (?h2 C) = (hom_induced (p-1) X {} X T id \ hom_induced (p-1) (subtopology X S) {} X {} id \ hom_boundary p X S) C" unfolding hom_relboundary_def - by (metis (no_types, lifting) comp_apply continuous_map_id continuous_map_id_subt empty_subsetI hom_induced_compose id_apply image_empty image_id order_refl) + by (metis Pi_empty comp_eq_dest_lhs continuous_map_id continuous_map_id_subt funcsetI hom_induced_compose' id_apply) also have "\ = \\<^bsub>?G1\<^esub>" proof - have *: "hom_boundary p X S C \ carrier ?H2" @@ -2349,7 +2364,8 @@ using that by (simp add: kernel_def) moreover have "hom_boundary (p-1) X T \ hom_induced (p-1) (subtopology X S) T X T id = hom_boundary (p-1) (subtopology X S) T" - by (metis Int_lower2 \S \ T = T\ continuous_map_id_subt hom_relboundary_def hom_relboundary_empty id_apply image_id naturality_hom_induced subtopology_subtopology) + by (metis funcsetI \S \ T = T\ continuous_map_id_subt hom_relboundary_def + hom_relboundary_empty id_apply naturality_hom_induced subtopology_subtopology) then have "hom_boundary (p-1) (subtopology X S) T x = \\<^bsub>homology_group (p - 2) (subtopology (subtopology X S) T)\<^esub>" using naturality_hom_induced [of "subtopology X S" X id T T "p-1"] that hom_one [OF hom_boundary_hom group_relative_homology_group group_relative_homology_group, of "p-1" X T] @@ -2416,14 +2432,14 @@ [hom_induced p X T X S id, hom_induced p (subtopology X S) T X T id])" (is "exact_seq ([?G1,?G2,?G3], [?h1,?h2])") proof - - have iTS: "id ` T \ S" and [simp]: "S \ T = T" + have iTS: "id \ T \ S" and [simp]: "S \ T = T" using assms by auto have 1: "?h2 x \ kernel ?G2 ?G1 ?h1" for x proof - have "?h1 (?h2 x) = (hom_induced p (subtopology X S) S X S id \ hom_induced p (subtopology X S) T (subtopology X S) S id) x" - by (metis comp_eq_dest_lhs continuous_map_id continuous_map_id_subt hom_induced_compose iTS id_apply image_subsetI) + by (simp add: hom_induced_compose' iTS) also have "\ = \\<^bsub>relative_homology_group p X S\<^esub>" proof - have "trivial_group (relative_homology_group p (subtopology X S) S)" @@ -2451,7 +2467,8 @@ have "hom_boundary p X S (hom_induced p X T X S id x) = hom_induced (p-1) (subtopology X T) {} (subtopology X S) {} id (hom_boundary p X T x)" - using naturality_hom_induced [of X X id T S p] by (simp add: assms o_def) meson + using naturality_hom_induced [of X X id T S p] iTS + by (simp add: assms o_def) meson with bcarr have "hom_boundary p X T x \ hom_boundary p (subtopology X S) T ` carrier ?G3" using homology_exactness_axiom_2 [of p "subtopology X S" T] x apply (simp add: kernel_def set_eq_iff subtopology_subtopology) @@ -2467,8 +2484,9 @@ have yyy: "hom_boundary p X T y = \\<^bsub>homology_group (p-1) (subtopology X T)\<^esub>" apply (simp add: y_def bcarr xcarr hom_induced_carrier hom_boundary_carrier hb.inv_solve_right') using naturality_hom_induced [of concl: p X T "subtopology X S" T id] - by (smt (verit, best) \S \ T = T\ bcarr comp_eq_dest continuous_map_id_subt hom_induced_id id_apply - image_subset_iff subtopology_subtopology ueq) + by (metis \S \ T = T\ comp_eq_dest_lhs continuous_map_id_subt + hom_relboundary_def hom_relboundary_empty id_apply image_id + image_subset_iff_funcset subsetI subtopology_subtopology ueq) then have "y \ hom_induced p X {} X T id ` carrier (homology_group p X)" using homology_exactness_axiom_1 [of p X T] x ycarr by (auto simp: kernel_def) then obtain z where zcarr: "z \ carrier (homology_group p X)" @@ -2478,7 +2496,7 @@ by (meson group_hom_axioms_def group_hom_def group_relative_homology_group hom_induced) have "hom_induced p X {} X S id z = (hom_induced p X T X S id \ hom_induced p X {} X T id) z" - by (simp add: assms flip: hom_induced_compose) + using iTS by (simp add: assms flip: hom_induced_compose) also have "\ = \\<^bsub>relative_homology_group p X S\<^esub>" using x 1 by (simp add: kernel_def zeq y_def) finally have "hom_induced p X {} X S id z = \\<^bsub>relative_homology_group p X S\<^esub>" . diff -r 3529946fca19 -r b022c013b04b src/HOL/Homology/Invariance_of_Domain.thy --- a/src/HOL/Homology/Invariance_of_Domain.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Homology/Invariance_of_Domain.thy Sun Mar 23 19:26:23 2025 +0000 @@ -9,8 +9,8 @@ theorem Borsuk_odd_mapping_degree_step: assumes cmf: "continuous_map (nsphere n) (nsphere n) f" - and f: "\x. x \ topspace(nsphere n) \ (f \ (\x i. -x i)) x = ((\x i. -x i) \ f) x" - and fim: "f ` (topspace(nsphere(n - Suc 0))) \ topspace(nsphere(n - Suc 0))" + and f: "\u. u \ topspace(nsphere n) \ (f \ (\x i. -x i)) u = ((\x i. -x i) \ f) u" + and fim: "f \ (topspace(nsphere(n - Suc 0))) \ topspace(nsphere(n - Suc 0))" shows "even (Brouwer_degree2 n f - Brouwer_degree2 (n - Suc 0) f)" proof (cases "n = 0") case False @@ -24,6 +24,8 @@ by (force simp: neg_def) have equator_upper: "equator n \ upper n" by (force simp: equator_def upper_def) + then have [simp]: "id \ equator n \ upper n" + by force have upper_usphere: "subtopology (nsphere n) (upper n) = usphere n" by (simp add: usphere_def) let ?rhgn = "relative_homology_group n (nsphere n)" @@ -41,12 +43,13 @@ have subt_eq: "subtopology (nsphere n) {x. x n = 0} = nsphere (n - Suc 0)" by (metis False Suc_pred le_zero_eq not_le subtopology_nsphere_equator) then have equ: "subtopology (nsphere n) (equator n) = nsphere(n - Suc 0)" - "subtopology (lsphere n) (equator n) = nsphere(n - Suc 0)" - "subtopology (usphere n) (equator n) = nsphere(n - Suc 0)" - using False by (auto simp: lsphere_def usphere_def equator_def lower_def upper_def subtopology_subtopology simp flip: Collect_conj_eq cong: rev_conj_cong) + "subtopology (lsphere n) (equator n) = nsphere(n - Suc 0)" + "subtopology (usphere n) (equator n) = nsphere(n - Suc 0)" + using False by (auto simp: lsphere_def usphere_def equator_def lower_def upper_def + subtopology_subtopology simp flip: Collect_conj_eq cong: rev_conj_cong) have cmr: "continuous_map (nsphere(n - Suc 0)) (nsphere(n - Suc 0)) f" - by (metis (no_types, lifting) IntE cmf fim continuous_map_from_subtopology continuous_map_in_subtopology equ(1) image_subset_iff topspace_subtopology) - + by (metis cmf continuous_map_from_subtopology continuous_map_in_subtopology equ(1) + fim subtopology_restrict topspace_subtopology) have "f x n = 0" if "x \ topspace (nsphere n)" "x n = 0" for x proof - have "x \ topspace (nsphere (n - Suc 0))" @@ -56,7 +59,7 @@ ultimately show ?thesis using fim by auto qed - then have fimeq: "f ` (topspace (nsphere n) \ equator n) \ topspace (nsphere n) \ equator n" + then have fimeq: "f \ (topspace (nsphere n) \ equator n) \ topspace (nsphere n) \ equator n" using fim cmf by (auto simp: equator_def continuous_map_def image_subset_iff) have "\k. continuous_map (powertop_real UNIV) euclideanreal (\x. - x k)" by (metis UNIV_I continuous_map_product_projection continuous_map_minus) @@ -182,13 +185,13 @@ show "hom_induced n (lsphere n) (equator n) (nsphere n) (upper n) id \ Group.iso (relative_homology_group n (lsphere n) (equator n)) (?rhgn (upper n))" - apply (simp add: lsphere_def usphere_def equator_def lower_def upper_def) + unfolding lsphere_def usphere_def equator_def lower_def upper_def using iso_relative_homology_group_lower_hemisphere by blast show "hom_induced n (usphere n) (equator n) (nsphere n) (lower n) id \ Group.iso (relative_homology_group n (usphere n) (equator n)) (?rhgn (lower n))" - apply (simp_all add: lsphere_def usphere_def equator_def lower_def upper_def) - using iso_relative_homology_group_upper_hemisphere by blast+ + unfolding lsphere_def usphere_def equator_def lower_def upper_def + using iso_relative_homology_group_upper_hemisphere by blast show "exact_seq ([?rhgn (lower n), ?rhgn (equator n), @@ -383,7 +386,7 @@ by (simp add: ueq poweq hom_induced_compose' cmf flip: GH_hi.hom_int_pow Brouwer_degree2) also have "\ = hom_induced n (nsphere n) (topspace(nsphere n) \ equator n) (nsphere n) (equator n) f (hom_induced n (nsphere n) {} (nsphere n) (topspace(nsphere n) \ equator n) id v)" - using fimeq by (simp add: hom_induced_compose' cmf) + using fimeq by (simp add: hom_induced_compose' cmf Pi_iff) also have "\ = ?hi_ee f u" by (metis hom_induced inf.left_idem ueq) finally show ?thesis . @@ -467,12 +470,13 @@ let ?TE = "topspace (nsphere n) \ equator n" have fneg: "(f \ neg) x = (neg \ f) x" if "x \ topspace (nsphere n)" for x using f [OF that] by (force simp: neg_def) - have neg_im: "neg ` (topspace (nsphere n) \ equator n) \ topspace (nsphere n) \ equator n" - by (metis cm_neg continuous_map_image_subset_topspace equ(1) topspace_subtopology) + have neg_im: "neg \ (topspace (nsphere n) \ equator n) \ topspace (nsphere n) \ equator n" + using cm_neg continuous_map_image_subset_topspace equator_def + by fastforce have 1: "hom_induced n (nsphere n) ?TE (nsphere n) ?TE f \ hom_induced n (nsphere n) ?TE (nsphere n) ?TE neg = hom_induced n (nsphere n) ?TE (nsphere n) ?TE neg \ hom_induced n (nsphere n) ?TE (nsphere n) ?TE f" - using neg_im fimeq cm_neg cmf - apply (simp add: flip: hom_induced_compose del: hom_induced_restrict) + using neg_im fimeq cm_neg cmf fneg + apply (simp flip: hom_induced_compose del: hom_induced_restrict) using fneg by (auto intro: hom_induced_eq) have "(un [^]\<^bsub>?rhgn (equator n)\<^esub> a) \\<^bsub>?rhgn (equator n)\<^esub> (up [^]\<^bsub>?rhgn (equator n)\<^esub> b) = un [^]\<^bsub>?rhgn (equator n)\<^esub> (Brouwer_degree2 (n - 1) neg * a * Brouwer_degree2 (n - 1) neg) @@ -577,18 +581,25 @@ if "squashable t U" "squashable t V" for U V t unfolding homotopic_with_def proof (intro exI conjI allI ballI) - let ?h = "\(z,x). ret ((1 - z) * t + z * x n) x" - show "(\x. ?h (u, x)) ` V \ V" if "u \ {0..1}" for u - using that + define h where "h \ \(z,x). ret ((1 - z) * t + z * x n) x" + show "(\x. h (u, x)) ` V \ V" if "u \ {0..1}" for u + using that unfolding h_def by clarsimp (metis squashableD [OF \squashable t V\] convex_bound_le diff_ge_0_iff_ge eq_diff_eq' le_cases less_eq_real_def segment_bound_lemma) - have 1: "?h ` ({0..1} \ ({x. \i\Suc n. x i = 0} \ U)) \ U" - by clarsimp (metis squashableD [OF \squashable t U\] convex_bound_le diff_ge_0_iff_ge eq_diff_eq' le_cases less_eq_real_def segment_bound_lemma) - show "continuous_map (prod_topology (top_of_set {0..1}) (subtopology (Euclidean_space (Suc n)) U)) - (subtopology (Euclidean_space (Suc n)) U) ?h" - apply (simp add: continuous_map_in_subtopology Euclidean_space_def subtopology_subtopology 1) - apply (auto simp: case_prod_unfold ret_def continuous_map_componentwise_UNIV) + have "\x y i. \\k\Suc n. y k = 0; Suc n \ i\ \ ret ((1 - x) * t + x * y n) y i = 0" + by (simp add: ret_def) + then have "h \ {0..1} \ ({x. \i\Suc n. x i = 0} \ U) \ {x. \i\Suc n. x i = 0} \ U" + using squashableD [OF \squashable t U\] segment_bound_lemma + apply (clarsimp simp: h_def Pi_iff) + by (metis convex_bound_le eq_diff_eq ge_iff_diff_ge_0 linorder_le_cases) + moreover + have "continuous_map (prod_topology (top_of_set {0..1}) (subtopology (powertop_real UNIV) + ({x. \i\Suc n. x i = 0} \ U))) (powertop_real UNIV) h" + apply (auto simp: h_def case_prod_unfold ret_def continuous_map_componentwise_UNIV) apply (intro continuous_map_into_fulltopology [OF continuous_map_fst] cm_snd continuous_intros) by (auto simp: cm_snd) + ultimately show "continuous_map (prod_topology (top_of_set {0..1}) (subtopology (Euclidean_space (Suc n)) U)) + (subtopology (Euclidean_space (Suc n)) U) h" + by (simp add: continuous_map_in_subtopology Euclidean_space_def subtopology_subtopology) qed (auto simp: ret_def) have cs_hi: "contractible_space(subtopology (Euclidean_space(Suc n)) hi)" proof - @@ -624,7 +635,7 @@ then have "ret 0 x \ topspace (Euclidean_space n)" if "x \ topspace (Euclidean_space (Suc n))" "-1 < x n" "x n < 1" for x using that by (metis continuous_map_image_subset_topspace image_subset_iff retraction_maps_def) - then show "(ret 0) ` (lo \ hi) \ topspace (Euclidean_space n) - S" + then show "(ret 0) \ (lo \ hi) \ topspace (Euclidean_space n) - S" by (auto simp: local.cong ret_def hi_def lo_def) show "homotopic_with (\h. h ` (lo \ hi) \ lo \ hi) (Euclidean_space (Suc n)) (Euclidean_space (Suc n)) (ret 0) id" using hw_sub [OF squashable squashable_0_lohi] by simp @@ -1836,11 +1847,13 @@ proof - have *: "Euclidean_space n = subtopology (Euclidean_space m) (topspace(Euclidean_space n))" by (metis Euclidean_space_def \n \ m\ inf.absorb_iff2 subset_Euclidean_space subtopology_subtopology topspace_Euclidean_space) + then have "openin (Euclidean_space m) (f ` U)" + by (metis "*" U assms(4) cmf continuous_map_in_subtopology invariance_of_domain_Euclidean_space) moreover have "U \ topspace (subtopology (Euclidean_space m) U)" by (metis U inf.absorb_iff2 openin_subset openin_subtopology openin_topspace) ultimately show ?thesis - by (metis (no_types) U \inj_on f U\ cmf continuous_map_in_subtopology inf.absorb_iff2 - inf.orderE invariance_of_domain_Euclidean_space openin_imp_subset openin_subtopology openin_topspace) + by (metis "*" cmf continuous_map_image_subset_topspace dual_order.antisym + openin_imp_subset openin_topspace subset_openin_subtopology) qed corollary invariance_of_domain_Euclidean_space_embedding_map_gen: @@ -2067,7 +2080,7 @@ lemma homeomorphic_maps_iff_homeomorphism [simp]: "homeomorphic_maps (top_of_set S) (top_of_set T) f g \ homeomorphism S T f g" - unfolding homeomorphic_maps_def homeomorphism_def by force + by (force simp: Pi_iff homeomorphic_maps_def homeomorphism_def) lemma homeomorphic_space_iff_homeomorphic [simp]: "(top_of_set S) homeomorphic_space (top_of_set T) \ S homeomorphic T" @@ -2159,7 +2172,7 @@ fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes ope: "openin (top_of_set U) S" and "subspace U" "subspace V" and VU: "dim V \ dim U" - and contf: "continuous_on S f" and fim: "f ` S \ V" + and contf: "continuous_on S f" and fim: "f \ S \ V" and injf: "inj_on f S" shows "openin (top_of_set V) (f ` S)" proof - @@ -2189,26 +2202,25 @@ have "continuous_on ({x. \i\dim U. x i = 0} \ \ ` S) \'" if "continuous_on {x. \i\dim U. x i = 0} \'" using that by (force elim: continuous_on_subset) - moreover have "\' ` ({x. \i\dim U. x i = 0} \ \ ` S) \ S" + moreover have "\' \ ({x. \i\dim U. x i = 0} \ \ ` S) \ S" if "\x\U. \' (\ x) = x" using that \S \ U\ by fastforce ultimately show "continuous_map (subtopology (Euclidean_space (dim U)) (\ ` S)) (top_of_set S) \'" using hom unfolding homeomorphic_maps_def - by (simp add: Euclidean_space_def subtopology_subtopology euclidean_product_topology) + by (simp add: Euclidean_space_def subtopology_subtopology euclidean_product_topology) show "continuous_map (top_of_set S) (top_of_set V) f" by (simp add: contf fim) show "continuous_map (top_of_set V) (Euclidean_space (dim V)) \" by (simp add: \ homeomorphic_imp_continuous_map) qed show "inj_on (\ \ f \ \') (\ ` S)" - using injf hom - unfolding inj_on_def homeomorphic_maps_map - by simp (metis \S \ U\ \'\ fim imageI subsetD) + using injf hom \S \ U\ \'\ fim + by (simp add: inj_on_def homeomorphic_maps_map Pi_iff) (metis subsetD) qed ultimately have "openin (Euclidean_space (dim V)) (\ ` f ` S)" by (simp add: image_comp) - then show ?thesis - by (simp add: fim homeomorphic_map_openness_eq [OF \]) + with fim show ?thesis + by (auto simp: homeomorphic_map_openness_eq [OF \]) qed lemma invariance_of_domain: @@ -2279,7 +2291,7 @@ by (metis \a \ U\ \b \ V\ aff_dim_eq_dim affine_hull_eq aff of_nat_le_iff) show "continuous_on ((+) (- a) ` S) ((+) (- b) \ f \ (+) a)" by (metis contf continuous_on_compose homeomorphism_cont2 homeomorphism_translation translation_galois) - show "((+) (- b) \ f \ (+) a) ` (+) (- a) ` S \ (+) (- b) ` V" + show "((+) (- b) \ f \ (+) a) \ (+) (- a) ` S \ (+) (- b) ` V" using fim by auto show "inj_on ((+) (- b) \ f \ (+) a) ((+) (- a) ` S)" by (auto simp: inj_on_def) (meson inj_onD injf) diff -r 3529946fca19 -r b022c013b04b src/HOL/Homology/Simplices.thy --- a/src/HOL/Homology/Simplices.thy Wed Mar 19 22:18:52 2025 +0000 +++ b/src/HOL/Homology/Simplices.thy Sun Mar 23 19:26:23 2025 +0000 @@ -87,7 +87,7 @@ unfolding g_def continuous_map_componentwise by (force intro: continuous_intros) moreover - have "g x y ` {0..1} \ standard_simplex p" "g x y 0 = x" "g x y 1 = y" + have "g x y \ {0..1} \ standard_simplex p" "g x y 0 = x" "g x y 1 = y" if "x \ standard_simplex p" "y \ standard_simplex p" for x y using that by (auto simp: convex_standard_simplex g_def) ultimately @@ -183,7 +183,7 @@ shows "singular_simplex (p - Suc 0) X (singular_face p k f)" proof - let ?PT = "(powertop_real UNIV)" - have 0: "simplical_face k ` standard_simplex (p - Suc 0) \ standard_simplex p" + have 0: "simplical_face k \ standard_simplex (p - Suc 0) \ standard_simplex p" using assms simplical_face_in_standard_simplex by auto have 1: "continuous_map (subtopology ?PT (standard_simplex (p - Suc 0))) (subtopology ?PT (standard_simplex p)) @@ -341,8 +341,8 @@ subsection\Relative cycles $Z_pX (S)$ where $X$ is a topology and $S$ a subset \ definition singular_relcycle :: "nat \ 'a topology \ 'a set \ ('a chain) \ bool" - where "singular_relcycle p X S \ - \c. singular_chain p X c \ (chain_boundary p c, 0) \ mod_subset (p-1) (subtopology X S)" + where "singular_relcycle \ + \p X S c. singular_chain p X c \ (chain_boundary p c, 0) \ mod_subset (p-1) (subtopology X S)" abbreviation singular_relcycle_set where "singular_relcycle_set p X S \ Collect (singular_relcycle p X S)" @@ -357,8 +357,8 @@ qed lemma singular_relcycle: - "singular_relcycle p X S c \ - singular_chain p X c \ singular_chain (p-1) (subtopology X S) (chain_boundary p c)" + "singular_relcycle \ + \p X S c. singular_chain p X c \ singular_chain (p-1) (subtopology X S) (chain_boundary p c)" by (simp add: singular_relcycle_def mod_subset_def) lemma singular_relcycle_0 [simp]: "singular_relcycle p X S 0" @@ -777,7 +777,7 @@ \ chain_map p f c = c" unfolding singular_chain_def by (erule frag_induction) (auto simp: chain_map_diff simplex_map_id_gen) - + lemma chain_map_ident: "singular_chain p X c \ chain_map p id c = c" by (simp add: chain_map_id_gen) @@ -831,19 +831,20 @@ qed auto lemma singular_relcycle_chain_map: - assumes "singular_relcycle p X S c" "continuous_map X X' g" "g ` S \ T" + assumes "singular_relcycle p X S c" "continuous_map X X' g" "g \ S \ T" shows "singular_relcycle p X' T (chain_map p g c)" proof - have "continuous_map (subtopology X S) (subtopology X' T) g" using assms - using continuous_map_from_subtopology continuous_map_in_subtopology topspace_subtopology by fastforce + by (metis Pi_anti_mono continuous_map_from_subtopology continuous_map_in_subtopology + openin_imp_subset openin_topspace subsetD) then show ?thesis using chain_boundary_chain_map [of p X c g] by (metis One_nat_def assms(1) assms(2) singular_chain_chain_map singular_relcycle) qed lemma singular_relboundary_chain_map: - assumes "singular_relboundary p X S c" "continuous_map X X' g" "g ` S \ T" + assumes "singular_relboundary p X S c" "continuous_map X X' g" "g \ S \ T" shows "singular_relboundary p X' T (chain_map p g c)" proof - obtain d e where d: "singular_chain (Suc p) X d" @@ -853,10 +854,11 @@ using assms(2) d singular_chain_chain_map by blast moreover have "singular_chain p (subtopology X' T) (chain_map p g e)" proof - - have "\t. g ` topspace (subtopology t S) \ T" - by (metis assms(3) closure_of_subset_subtopology closure_of_topspace dual_order.trans image_mono) + have "\Y. g \ topspace (subtopology Y S) \ T" + using assms(3) by auto then show ?thesis - by (meson assms(2) continuous_map_from_subtopology continuous_map_in_subtopology e singular_chain_chain_map) + by (metis assms(2) continuous_map_from_subtopology continuous_map_into_subtopology e + singular_chain_chain_map) qed moreover have "chain_boundary (Suc p) (chain_map (Suc p) g d) + chain_map p g e = chain_map p g (chain_boundary (Suc p) d + e)" @@ -1705,7 +1707,7 @@ proof assume ?lhs then show ?rhs - by (simp add: simplicial_simplex_def singular_simplex_def continuous_map_in_subtopology set_mp) + by (simp add: simplicial_simplex) next assume R: ?rhs then have cm: "continuous_map @@ -1777,7 +1779,7 @@ have "(\i. \j\p. m j i * x j) \ standard_simplex q" if "x \ standard_simplex p" for x using that m unfolding oriented_simplex_def singular_simplex_def - by (auto simp: continuous_map_in_subtopology image_subset_iff) + by (auto simp: continuous_map_in_subtopology Pi_iff) then show ?thesis unfolding oriented_simplex_def simplex_map_def apply (rule_tac x="\j k. (\i\q. l i k * m j i)" in exI) @@ -1785,7 +1787,7 @@ done qed then show ?case - using f one + using f one apply (simp add: simplicial_simplex_def) using singular_simplex_def singular_simplex_simplex_map by blast next @@ -2492,7 +2494,7 @@ and X: "topspace X \ \\" and p: "singular_chain p X c" obtains n where "\m f. \n \ m; f \ Poly_Mapping.keys ((singular_subdivision p ^^ m) c)\ - \ \V \ \. f ` (standard_simplex p) \ V" + \ \V \ \. f \ (standard_simplex p) \ V" proof (cases "c = 0") case False then show ?thesis @@ -2511,7 +2513,7 @@ case False have "\e. 0 < e \ (\K. K \ standard_simplex p \ (\x y i. x \ K \ y \ K \ i \ p \ \x i - y i\ \ e) - \ (\V. V \ \ \ f ` K \ V))" + \ (\V. V \ \ \ f \ K \ V))" if f: "f \ Poly_Mapping.keys c" for f proof - have ssf: "singular_simplex p X f" @@ -2551,19 +2553,19 @@ and Kd: "\x y i. x \ K \ y \ K \ i \ p \ \x i - y i\ \ d" then have "\U. U \ g ` \ \ K \ U" using d [OF K] by auto - then show "\V. V \ \ \ f ` K \ V" + then show "\V. V \ \ \ f \ K \ V" using K geq by fastforce qed (rule \d > 0\) qed then obtain \ where epos: "\f \ Poly_Mapping.keys c. 0 < \ f" and e: "\f K. \f \ Poly_Mapping.keys c; K \ standard_simplex p; \x y i. x \ K \ y \ K \ i \ p \ \x i - y i\ \ \ f\ - \ \V. V \ \ \ f ` K \ V" + \ \V. V \ \ \ f \ K \ V" by metis obtain d where "0 < d" and d: "\f K. \f \ Poly_Mapping.keys c; K \ standard_simplex p; \x y i. \x \ K; y \ K; i \ p\ \ \x i - y i\ \ d\ - \ \V. V \ \ \ f ` K \ V" + \ \V. V \ \ \ f \ K \ V" proof show "Inf (\ ` Poly_Mapping.keys c) > 0" by (simp add: finite_less_Inf_iff \c \ 0\ epos) @@ -2572,7 +2574,7 @@ and le: "\x y i. \x \ K; y \ K; i \ p\ \ \x i - y i\ \ Inf (\ ` Poly_Mapping.keys c)" then have lef: "Inf (\ ` Poly_Mapping.keys c) \ \ f" by (auto intro: cInf_le_finite) - show "\V. V \ \ \ f ` K \ V" + show "\V. V \ \ \ f \ K \ V" using le lef by (blast intro: dual_order.trans e [OF fK]) qed let ?d = "\m. (simplicial_subdivision p ^^ m) (frag_of (restrict id (standard_simplex p)))" @@ -2626,9 +2628,9 @@ then have "\x i - y i\ \ d" if "x \ g ` (standard_simplex p)" "y \ g ` (standard_simplex p)" "i \ p" for i x y using that by blast - ultimately show "\V\\. h ` standard_simplex p \ V" + ultimately show "\V\\. h \ standard_simplex p \ V" using \f \ Poly_Mapping.keys c\ d [of f "g ` standard_simplex p"] - by (simp add: Bex_def heq image_image) + using heq image_subset_iff_funcset by fastforce qed qed qed @@ -2640,13 +2642,13 @@ and X: "topspace X \ \\" and p: "singular_relcycle p X S c" obtains c' where "singular_relcycle p X S c'" "homologous_rel p X S c c'" - "\f. f \ Poly_Mapping.keys c' \ \V \ \. f ` (standard_simplex p) \ V" + "\f. f \ Poly_Mapping.keys c' \ \V \ \. f \ (standard_simplex p) \ V" proof - have "singular_chain p X c" "(chain_boundary p c, 0) \ (mod_subset (p - Suc 0) (subtopology X S))" using p unfolding singular_relcycle_def by auto then obtain n where n: "\m f. \n \ m; f \ Poly_Mapping.keys ((singular_subdivision p ^^ m) c)\ - \ \V \ \. f ` (standard_simplex p) \ V" + \ \V \ \. f \ (standard_simplex p) \ V" by (blast intro: sufficient_iterated_singular_subdivision_exists [OF \ X]) let ?c' = "(singular_subdivision p ^^ n) c" show ?thesis @@ -2665,7 +2667,7 @@ next fix f :: "(nat \ real) \ 'a" assume "f \ Poly_Mapping.keys ?c'" - then show "\V\\. f ` standard_simplex p \ V" + then show "\V\\. f \ (standard_simplex p) \ V" by (rule n [OF order_refl]) qed qed @@ -2685,7 +2687,7 @@ for p X c S and T U :: "'a set" proof - obtain n where n: "\m f. \n \ m; f \ Poly_Mapping.keys ((singular_subdivision p ^^ m) c)\ - \ \V \ {S \ X interior_of T, S - X closure_of U}. f ` standard_simplex p \ V" + \ \V \ {S \ X interior_of T, S - X closure_of U}. f \ (standard_simplex p) \ V" apply (rule sufficient_iterated_singular_subdivision_exists [of "{S \ X interior_of T, S - X closure_of U}"]) using X S c @@ -2791,7 +2793,7 @@ subsection\Homotopy invariance\ theorem homotopic_imp_homologous_rel_chain_maps: - assumes hom: "homotopic_with (\h. h ` T \ V) S U f g" and c: "singular_relcycle p S T c" + assumes hom: "homotopic_with (\h. h \ T \ V) S U f g" and c: "singular_relcycle p S T c" shows "homologous_rel p U V (chain_map p f c) (chain_map p g c)" proof - note sum.atMost_Suc [simp del]