# HG changeset patch # User paulson # Date 1587331017 -3600 # Node ID 7c0de1eb6075cd2ecf270134886bb2cea776a120 # Parent 33e886e21ed45b46c64ba101de6161f869b1f5dd removal of symmetries in Polytope, plus some tidying diff -r 33e886e21ed4 -r 7c0de1eb6075 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Sun Apr 19 13:01:40 2020 +0100 +++ b/src/HOL/Analysis/Further_Topology.thy Sun Apr 19 22:16:57 2020 +0100 @@ -4,6 +4,7 @@ theory Further_Topology imports Weierstrass_Theorems Polytope Complex_Transcendental Equivalence_Lebesgue_Henstock_Integration Retracts +Sketch_and_Explore begin subsection\A map from a sphere to a higher dimensional sphere is nullhomotopic\ @@ -28,10 +29,10 @@ by (rule diff_f' derivative_intros differentiable_on_compose [where f=f] | force)+ have geq: "g ` (S - {0}) = T - {0}" proof - have "g ` (S - {0}) \ T" - apply (auto simp: g_def subspace_mul [OF \subspace T\]) - apply (metis (mono_tags, lifting) DiffI subS01 subspace_mul [OF \subspace T\] fim image_subset_iff inf_le2 singletonD) - done + have "\u. \u \ S; norm u *\<^sub>R f (u /\<^sub>R norm u) \ T\ \ u = 0" + by (metis (mono_tags, lifting) DiffI subS01 subspace_mul [OF \subspace T\] fim image_subset_iff inf_le2 singletonD) + then have "g ` (S - {0}) \ T" + using g_def by blast moreover have "g ` (S - {0}) \ UNIV - {0}" proof (clarsimp simp: g_def) fix y @@ -51,12 +52,14 @@ proof - have "x /\<^sub>R norm x \ T" using \subspace T\ subspace_mul that by blast - then show ?thesis - using * [THEN subsetD, of "x /\<^sub>R norm x"] that apply clarsimp - apply (rule_tac x="norm x *\<^sub>R xa" in image_eqI, simp) - apply (metis norm_eq_zero right_inverse scaleR_one scaleR_scaleR) - using \subspace S\ subspace_mul apply force - done + then obtain u where u: "f u \ T" "x /\<^sub>R norm x = f u" "norm u = 1" "u \ S" + using * [THEN subsetD, of "x /\<^sub>R norm x"] \x \ 0\ by auto + with that have [simp]: "norm x *\<^sub>R f u = x" + by (metis divideR_right norm_eq_zero) + moreover have "norm x *\<^sub>R u \ S - {0}" + using \subspace S\ subspace_scale that(2) u by auto + with u show ?thesis + by (simp add: image_eqI [where x="norm x *\<^sub>R u"]) qed then have "T - {0} \ (\x. norm x *\<^sub>R f (x /\<^sub>R norm x)) ` (S - {0})" by force @@ -107,12 +110,10 @@ qed (auto simp: p1span p2 span_base span_add) ultimately have "linear p1" "linear p2" by unfold_locales auto - have "(\z. g (p1 z)) differentiable_on {x + y |x y. x \ S - {0} \ y \ T'}" - apply (rule differentiable_on_compose [where f=g]) - apply (rule linear_imp_differentiable_on [OF \linear p1\]) - apply (rule differentiable_on_subset [OF gdiff]) - using p12_eq \S \ T\ apply auto - done + have "g differentiable_on p1 ` {x + y |x y. x \ S - {0} \ y \ T'}" + using p12_eq \S \ T\ by (force intro: differentiable_on_subset [OF gdiff]) + then have "(\z. g (p1 z)) differentiable_on {x + y |x y. x \ S - {0} \ y \ T'}" + by (rule differentiable_on_compose [OF linear_imp_differentiable_on [OF \linear p1\]]) then have diff: "(\x. g (p1 x) + p2 x) differentiable_on {x + y |x y. x \ S - {0} \ y \ T'}" by (intro derivative_intros linear_imp_differentiable_on [OF \linear p2\]) have "dim {x + y |x y. x \ S - {0} \ y \ T'} \ dim {x + y |x y. x \ S \ y \ T'}" @@ -141,10 +142,7 @@ proof clarsimp fix z assume "z \ T'" show "\x y. z = x + y \ x \ g ` (S - {0}) \ y \ T'" - apply (rule_tac x="p1 z" in exI) - apply (rule_tac x="p2 z" in exI) - apply (simp add: p1 eq p2 geq) - by (metis \z \ T'\ add.left_neutral eq p2) + by (metis Diff_iff \z \ T'\ add.left_neutral eq geq p1 p2 singletonD) qed ultimately have "negligible (-T')" using negligible_subset by blast @@ -173,8 +171,7 @@ then obtain g where pfg: "polynomial_function g" and gim: "g ` (sphere 0 1 \ S) \ T" and g12: "\x. x \ sphere 0 1 \ S \ norm(f x - g x) < 1/2" apply (rule Stone_Weierstrass_polynomial_function_subspace [OF _ contf _ \subspace T\, of "1/2"]) - using fim apply auto - done + using fim by auto have gnz: "g x \ 0" if "x \ sphere 0 1 \ S" for x proof - have "norm (f x) = 1" @@ -190,10 +187,8 @@ using gnz [of x] by (auto simp: subspace_mul [OF \subspace T\] subsetD [OF gim]) have diffh: "h differentiable_on sphere 0 1 \ S" - unfolding h_def - apply (intro derivative_intros diffg differentiable_on_compose [OF diffg]) - using gnz apply auto - done + unfolding h_def using gnz + by (fastforce intro: derivative_intros diffg differentiable_on_compose [OF diffg]) have homfg: "homotopic_with_canon (\z. True) (sphere 0 1 \ S) (T - {0}) f g" proof (rule homotopic_with_linear [OF contf]) show "continuous_on (sphere 0 1 \ S) g" @@ -204,18 +199,19 @@ have "f x \ sphere 0 1" using fim that by (simp add: image_subset_iff) moreover have "norm(f x - g x) < 1/2" - apply (rule g12) - using that by force + using g12 that by auto ultimately show ?thesis by (auto simp: norm_minus_commute dest: segment_bound) qed - show "\x. x \ sphere 0 1 \ S \ closed_segment (f x) (g x) \ T - {0}" - apply (simp add: subset_Diff_insert non0fg) - apply (simp add: segment_convex_hull) - apply (rule hull_minimal) - using fim image_eqI gim apply force - apply (rule subspace_imp_convex [OF \subspace T\]) - done + show "closed_segment (f x) (g x) \ T - {0}" if "x \ sphere 0 1 \ S" for x + proof - + have "convex T" + by (simp add: \subspace T\ subspace_imp_convex) + then have "convex hull {f x, g x} \ T" + by (metis IntD2 closed_segment_subset fim gim image_subset_iff segment_convex_hull that) + then show ?thesis + using that non0fg segment_convex_hull by fastforce + qed qed obtain d where d: "d \ (sphere 0 1 \ T) - h ` (sphere 0 1 \ S)" using h spheremap_lemma1 [OF ST \S \ T\ diffh] by force @@ -225,13 +221,17 @@ have conth: "continuous_on (sphere 0 1 \ S) h" using differentiable_imp_continuous_on diffh by blast have hom_hd: "homotopic_with_canon (\z. True) (sphere 0 1 \ S) (T - {0}) h (\x. -d)" - apply (rule homotopic_with_linear [OF conth continuous_on_const]) - apply (simp add: subset_Diff_insert non0hd) - apply (simp add: segment_convex_hull) - apply (rule hull_minimal) - using h d apply (force simp: subspace_neg [OF \subspace T\]) - apply (rule subspace_imp_convex [OF \subspace T\]) - done + proof (rule homotopic_with_linear [OF conth continuous_on_const]) + fix x + assume x: "x \ sphere 0 1 \ S" + have "convex hull {h x, - d} \ T" + proof (rule hull_minimal) + show "{h x, - d} \ T" + using h d x by (force simp: subspace_neg [OF \subspace T\]) + qed (simp add: subspace_imp_convex [OF \subspace T\]) + with x segment_convex_hull show "closed_segment (h x) (- d) \ T - {0}" + by (auto simp add: subset_Diff_insert non0hd) + qed have conT0: "continuous_on (T - {0}) (\y. inverse(norm y) *\<^sub>R y)" by (intro continuous_intros) auto have sub0T: "(\y. y /\<^sub>R norm y) ` (T - {0}) \ sphere 0 1 \ T" @@ -242,13 +242,11 @@ apply (rule homotopic_with_compose_continuous_left [OF hom_hd conT0 sub0T]) using d apply (auto simp: h_def) done - show ?thesis - apply (rule_tac x=c in exI) - apply (rule homotopic_with_trans [OF _ homhc]) - apply (rule homotopic_with_eq) - apply (rule homotopic_with_compose_continuous_left [OF homfg conT0 sub0T]) - apply (auto simp: h_def) - done + have "homotopic_with_canon (\x. True) (sphere 0 1 \ S) (sphere 0 1 \ T) f h" + apply (rule homotopic_with_eq [OF homotopic_with_compose_continuous_left [OF homfg conT0 sub0T]]) + by (auto simp: h_def) + then show ?thesis + by (metis homotopic_with_trans [OF _ homhc]) qed @@ -283,15 +281,21 @@ then have affS_eq: "aff_dim S = aff_dim (ball 0 1 \ T)" using \aff_dim T = aff_dim S\ by simp have "rel_frontier S homeomorphic rel_frontier(ball 0 1 \ T)" - apply (rule homeomorphic_rel_frontiers_convex_bounded_sets [OF \convex S\ \bounded S\]) - apply (simp add: \subspace T\ convex_Int subspace_imp_convex) - apply (simp add: bounded_Int) - apply (rule affS_eq) - done + proof (rule homeomorphic_rel_frontiers_convex_bounded_sets [OF \convex S\ \bounded S\]) + show "convex (ball 0 1 \ T)" + by (simp add: \subspace T\ convex_Int subspace_imp_convex) + show "bounded (ball 0 1 \ T)" + by (simp add: bounded_Int) + show "aff_dim S = aff_dim (ball 0 1 \ T)" + by (rule affS_eq) + qed also have "... = frontier (ball 0 1) \ T" - apply (rule convex_affine_rel_frontier_Int [OF convex_ball]) - apply (simp add: \subspace T\ subspace_imp_affine) - using \subspace T\ subspace_0 by force + proof (rule convex_affine_rel_frontier_Int [OF convex_ball]) + show "affine T" + by (simp add: \subspace T\ subspace_imp_affine) + show "interior (ball 0 1) \ T \ {}" + using \subspace T\ subspace_0 by force + qed also have "... = sphere 0 1 \ T" by auto finally show ?thesis . @@ -367,11 +371,10 @@ next case False with \\ s \ 0\ have "r > 0" "s > 0" by auto - show ?thesis + show thesis apply (rule inessential_spheremap_lowdim_gen [of "cball a r" "cball b s" f]) - using \0 < r\ \0 < s\ assms(1) - apply (simp_all add: f aff_dim_cball) - using that by blast + using \0 < r\ \0 < s\ assms(1) that + by (simp_all add: f aff_dim_cball inessential_spheremap_lowdim_gen [of "cball a r" "cball b s" f]) qed qed @@ -404,7 +407,6 @@ show ?case apply (rule_tac x="\x. if x \ S then f x else g x" in exI, simp) apply (intro conjI continuous_on_cases) - apply (simp_all add: insert closed_Union contf contg) using fim gim feq geq apply (force simp: insert closed_Union contf contg inf_commute intro: fg)+ done @@ -426,18 +428,18 @@ assumes "finite \" "\ \ \" "convex T" "bounded T" and poly: "\X. X \ \ \ polytope X" and aff: "\X. X \ \ - \ \ aff_dim X < aff_dim T" - and face: "\S T. \S \ \; T \ \\ \ (S \ T) face_of S \ (S \ T) face_of T" + and face: "\S T. \S \ \; T \ \\ \ (S \ T) face_of S" and contf: "continuous_on (\\) f" and fim: "f ` (\\) \ rel_frontier T" obtains g where "continuous_on (\\) g" "g ` (\\) \ rel_frontier T" "\x. x \ \\ \ g x = f x" proof (cases "\ - \ = {}") case True - then have "\\ \ \\" - by (simp add: Union_mono) - then show ?thesis - apply (rule_tac g=f in that) - using contf continuous_on_subset apply blast - using fim apply blast - by simp + show ?thesis + proof + show "continuous_on (\ \) f" + using True \\ \ \\ contf by auto + show "f ` \ \ \ rel_frontier T" + using True fim by auto + qed auto next case False then have "0 \ aff_dim T" @@ -446,19 +448,17 @@ by (metis nonneg_eq_int) have Union_empty_eq: "\{D. D = {} \ P D} = {}" for P :: "'a set \ bool" by auto + have face': "\S T. \S \ \; T \ \\ \ (S \ T) face_of S \ (S \ T) face_of T" + by (metis face inf_commute) have extendf: "\g. continuous_on (\(\ \ {D. \C \ \. D face_of C \ aff_dim D < i})) g \ g ` (\ (\ \ {D. \C \ \. D face_of C \ aff_dim D < i})) \ rel_frontier T \ (\x \ \\. g x = f x)" if "i \ aff_dim T" for i::nat using that proof (induction i) - case 0 then show ?case - apply (simp add: Union_empty_eq) - apply (rule_tac x=f in exI) - apply (intro conjI) - using contf continuous_on_subset apply blast - using fim apply blast - by simp + case 0 + show ?case + using 0 contf fim by (auto simp add: Union_empty_eq) next case (Suc p) with \bounded T\ have "rel_frontier T \ {}" @@ -477,12 +477,12 @@ if D: "D \ \ \ ?Faces" for D proof (cases "D \ \(\ \ {D. \C \ \. D face_of C \ aff_dim D < p})") case True - then show ?thesis - apply (rule_tac x=h in exI) - apply (intro conjI) - apply (blast intro: continuous_on_subset [OF conth]) - using him apply blast - by simp + have "continuous_on D h" + using True conth continuous_on_subset by blast + moreover have "h ` D \ rel_frontier T" + using True him by blast + ultimately show ?thesis + by blast next case False note notDsub = False @@ -507,9 +507,7 @@ then have [simp]: "\ affine D" using affine_bounded_eq_trivial False \D \ {}\ \bounded D\ by blast have "{F. F facet_of D} \ {E. E face_of C \ aff_dim E < int p}" - apply clarify - apply (metis \D face_of C\ affD eq_iff face_of_trans facet_of_def zle_diff1_eq) - done + by clarify (metis \D face_of C\ affD eq_iff face_of_trans facet_of_def zle_diff1_eq) moreover have "polyhedron D" using \C \ \\ \D face_of C\ face_of_polytope_polytope poly polytope_imp_polyhedron by auto ultimately have relf_sub: "rel_frontier D \ \ {E. E face_of C \ aff_dim E < p}" @@ -540,30 +538,39 @@ if "E \ \ \ {D. Bex \ ((face_of) D) \ aff_dim D < int p}" for E proof (rule face_of_subset_rel_frontier) show "D \ E face_of D" - using that \C \ \\ \D face_of C\ face - apply auto - apply (meson face_of_Int_subface \\ \ \\ face_of_refl_eq poly polytope_imp_convex subsetD) - using face_of_Int_subface apply blast - done + using that + proof safe + assume "E \ \" + then show "D \ E face_of D" + by (meson \C \ \\ \D face_of C\ assms(2) face' face_of_Int_subface face_of_refl_eq poly polytope_imp_convex subsetD) + next + fix x + assume "aff_dim E < int p" "x \ \" "E face_of x" + then show "D \ E face_of D" + by (meson \C \ \\ \D face_of C\ face' face_of_Int_subface that) + qed show "D \ E \ D" using that notDsub by auto qed - then show ?thesis - apply (rule_tac x=g in exI) - apply (intro conjI ballI) - using continuous_on_subset contg apply blast - using gim apply blast - using gh by fastforce + moreover have "continuous_on D g" + using contg continuous_on_subset by blast + ultimately show ?thesis + by (rule_tac x=g in exI) (use gh gim in fastforce) qed qed have intle: "i < 1 + int j \ i \ int j" for i j by auto have "finite \" using \finite \\ \\ \ \\ rev_finite_subset by blast - then have fin: "finite (\ \ ?Faces)" - apply simp - apply (rule_tac B = "\{{D. D face_of C}| C. C \ \}" in finite_subset) - by (auto simp: \finite \\ finite_polytope_faces poly) + moreover have "finite (?Faces)" + proof - + have \
: "finite (\ {{D. D face_of C} |C. C \ \})" + by (auto simp: \finite \\ finite_polytope_faces poly) + show ?thesis + by (auto intro: finite_subset [OF _ \
]) + qed + ultimately have fin: "finite (\ \ ?Faces)" + by simp have clo: "closed S" if "S \ \ \ ?Faces" for S using that \\ \ \\ face_of_polytope_polytope poly polytope_imp_closed by blast have K: "X \ Y \ \(\ \ {D. \C\\. D face_of C \ aff_dim D < int p})" @@ -571,9 +578,7 @@ proof - have ff: "X \ Y face_of X \ X \ Y face_of Y" if XY: "X face_of D" "Y face_of E" and DE: "D \ \" "E \ \" for D E - apply (rule face_of_Int_subface [OF _ _ XY]) - apply (auto simp: face DE) - done + by (rule face_of_Int_subface [OF _ _ XY]) (auto simp: face' DE) show ?thesis using that apply auto @@ -586,22 +591,19 @@ "g ` \(\ \ ?Faces) \ rel_frontier T" "(\x \ \(\ \ ?Faces) \ \(\ \ {D. \C\\. D face_of C \ aff_dim D < p}). g x = h x)" - apply (rule exE [OF extending_maps_Union [OF fin extendh clo K]], blast+) - done + by (rule exE [OF extending_maps_Union [OF fin extendh clo K]], blast+) then show ?case - apply (simp add: intle local.heq [symmetric], blast) - done + by (simp add: intle local.heq [symmetric], blast) qed have eq: "\(\ \ {D. \C \ \. D face_of C \ aff_dim D < i}) = \\" proof show "\(\ \ {D. \C\\. D face_of C \ aff_dim D < int i}) \ \\" - apply (rule Union_subsetI) - using \\ \ \\ face_of_imp_subset apply force - done + using \\ \ \\ face_of_imp_subset by fastforce show "\\ \ \(\ \ {D. \C\\. D face_of C \ aff_dim D < i})" - apply (rule Union_mono) - using face apply (fastforce simp: aff i) - done + proof (rule Union_mono) + show "\ \ \ \ {D. \C\\. D face_of C \ aff_dim D < int i}" + using face by (fastforce simp: aff i) + qed qed have "int i \ aff_dim T" by (simp add: i) then show ?thesis @@ -647,13 +649,15 @@ by (simp add: C card_insert_if insert.hyps le_SucI) have "closed (\\)" using clo insert.hyps by blast + have "continuous_on (X - insert a C) f" + using contf by (force simp: elim: continuous_on_subset) + moreover have "continuous_on (\ \ - insert a C) g" + using contg by (force simp: elim: continuous_on_subset) + ultimately have "continuous_on (X - insert a C \ (\\ - insert a C)) (\x. if x \ X then f x else g x)" - apply (rule continuous_on_cases_local) - apply (simp_all add: closedin_closed) + apply (intro continuous_on_cases_local; simp add: closedin_closed) using \closed X\ apply blast using \closed (\\)\ apply blast - using contf apply (force simp: elim: continuous_on_subset) - using contg apply (force simp: elim: continuous_on_subset) using fh gh insert.hyps pwX by fastforce then show "continuous_on (\(insert X \) - insert a C) (\a. if a \ X then f a else g a)" by (blast intro: continuous_on_subset) @@ -687,9 +691,7 @@ obtain C g where "finite C \ disjnt C U \ card C \ card ?\ \ continuous_on (\?\ - C) g \ g ` (\?\ - C) \ T \ (\x \ (\?\ - C) \ K. g x = h x)" - apply (rule exE [OF extend_map_lemma_cofinite0 [OF fin pw, of U T h]]) - apply (fastforce intro!: clo \)+ - done + using extend_map_lemma_cofinite0 [OF fin pw, of U T h] by (fastforce intro!: clo \) ultimately show ?thesis by (rule_tac C=C and g=g in that) auto qed @@ -699,7 +701,7 @@ assumes "finite \" "\ \ \" and T: "convex T" "bounded T" and poly: "\X. X \ \ \ polytope X" and contf: "continuous_on (\\) f" and fim: "f ` (\\) \ rel_frontier T" - and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X \ (X \ Y) face_of Y" + and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X" and aff: "\X. X \ \ - \ \ aff_dim X \ aff_dim T" obtains C g where "finite C" "disjnt C (\\)" "card C \ card \" "continuous_on (\\ - C) g" @@ -708,28 +710,23 @@ define \ where "\ \ \ \ {D. \C \ \ - \. D face_of C \ aff_dim D < aff_dim T}" have "finite \" using assms finite_subset by blast - moreover have "finite (\{{D. D face_of C} |C. C \ \})" - apply (rule finite_Union) - apply (simp add: \finite \\) - using finite_polytope_faces poly by auto - ultimately have "finite \" - apply (simp add: \_def) - apply (rule finite_subset [of _ "\ {{D. D face_of C} | C. C \ \}"], auto) - done - have *: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + have *: "finite (\{{D. D face_of C} |C. C \ \})" + using finite_polytope_faces poly \finite \\ by force + then have "finite \" + by (auto simp: \_def \finite \\ intro: finite_subset [OF _ *]) + have face': "\S T. \S \ \; T \ \\ \ (S \ T) face_of S \ (S \ T) face_of T" + by (metis face inf_commute) + have *: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" unfolding \_def - apply (elim UnE bexE CollectE DiffE) - using subsetD [OF \\ \ \\] apply (simp_all add: face) - apply (meson subsetD [OF \\ \ \\] face face_of_Int_subface face_of_imp_subset face_of_refl poly polytope_imp_convex)+ + using subsetD [OF \\ \ \\] apply (auto simp add: face) + apply (meson face' face_of_Int_subface face_of_refl_eq poly polytope_imp_convex)+ done obtain h where conth: "continuous_on (\\) h" and him: "h ` (\\) \ rel_frontier T" - and hf: "\x. x \ \\ \ h x = f x" - using \finite \\ - unfolding \_def - apply (rule extend_map_lemma [OF _ Un_upper1 T _ _ _ contf fim]) - using \\ \ \\ face_of_polytope_polytope poly apply fastforce - using * apply (auto simp: \_def) - done + and hf: "\x. x \ \\ \ h x = f x" + proof (rule extend_map_lemma [OF \finite \\ [unfolded \_def] Un_upper1 T]) + show "\X. \X \ \ \ {D. \C\\ - \. D face_of C \ aff_dim D < aff_dim T}\ \ polytope X" + using \\ \ \\ face_of_polytope_polytope poly by fastforce + qed (use * \_def contf fim in auto) have "bounded (\\)" using \finite \\ \\ \ \\ poly polytope_imp_bounded by blast then have "\\ \ UNIV" @@ -783,7 +780,7 @@ fix E assume "b \ E" "E \ \" then have "E \ D face_of E \ E \ D face_of D" - using \\ \ \\ face that by auto + using \\ \ \\ face' that by auto with face_of_subset_rel_frontier \E \ \\ \b \ E\ brelD rel_interior_subset [of D] D_not_subset rel_frontier_def \_def show False @@ -824,11 +821,10 @@ next case 2 show ?thesis proof (rule face_of_subset_rel_frontier [THEN subsetD]) - show "D \ A face_of D" - apply (rule face_of_Int_subface [of D B _ A, THEN conjunct1]) - apply (simp_all add: 2 \D \ \\ face) - apply (simp add: \polyhedron D\ polyhedron_imp_convex face_of_refl) - done + have "D face_of D" + by (simp add: \polyhedron D\ polyhedron_imp_convex face_of_refl) + then show "D \ A face_of D" + by (meson "2"(2) "2"(3) \D \ \\ face' face_of_Int_Int face_of_face) show "D \ A \ D" using "2" D_not_subset \_def by blast qed (auto simp: 2) @@ -873,7 +869,7 @@ assumes "finite \" and S: "S \ \\" "closed S" and T: "convex T" "bounded T" and poly: "\X. X \ \ \ polytope X" and aff: "\X. X \ \ \ aff_dim X < aff_dim T" - and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X \ (X \ Y) face_of Y" + and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X" and contf: "continuous_on S f" and fim: "f ` S \ rel_frontier T" obtains g where "continuous_on (\\) g" "g ` (\\) \ rel_frontier T" "\x. x \ S \ g x = f x" @@ -888,7 +884,7 @@ and diaG: "\X. X \ \ \ diameter X < d" and polyG: "\X. X \ \ \ polytope X" and affG: "\X. X \ \ \ aff_dim X \ aff_dim T - 1" - and faceG: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + and faceG: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" proof (rule cell_complex_subdivision_exists [OF \d>0\ \finite \\ poly _ face]) show "\X. X \ \ \ aff_dim X \ aff_dim T - 1" by (simp add: aff) @@ -928,7 +924,7 @@ assumes "finite \" and S: "S \ \\" "closed S" and T: "convex T" "bounded T" and poly: "\X. X \ \ \ polytope X" and aff: "\X. X \ \ \ aff_dim X \ aff_dim T" - and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X \ (X \ Y) face_of Y" + and face: "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X" and contf: "continuous_on S f" and fim: "f ` S \ rel_frontier T" obtains C g where "finite C" "disjnt C S" "continuous_on (\\ - C) g" "g ` (\\ - C) \ rel_frontier T" "\x. x \ S \ g x = f x" @@ -943,7 +939,7 @@ and diaG: "\X. X \ \ \ diameter X < d" and polyG: "\X. X \ \ \ polytope X" and affG: "\X. X \ \ \ aff_dim X \ aff_dim T" - and faceG: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + and faceG: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" by (rule cell_complex_subdivision_exists [OF \d>0\ \finite \\ poly aff face]) auto obtain C h where "finite C" and dis: "disjnt C (\(\ \ Pow V))" and card: "card C \ card \" and conth: "continuous_on (\\ - C) h" @@ -978,8 +974,7 @@ show "h x = f x" if "x \ S" for x proof - have "h x = g x" - apply (rule hg) - using Ssub that by blast + using Ssub hg that by blast also have "... = f x" by (simp add: gf that) finally show "h x = f x" . @@ -1054,7 +1049,7 @@ using \compact S\ compact_eq_bounded_closed by auto show poly: "\X. X \ {bbox \ T} \ polytope X" by (simp add: polytope_Int_polyhedron bbox_def polytope_interval affine_imp_polyhedron \affine T\) - show "\X Y. \X \ {bbox \ T}; Y \ {bbox \ T}\ \ X \ Y face_of X \ X \ Y face_of Y" + show "\X Y. \X \ {bbox \ T}; Y \ {bbox \ T}\ \ X \ Y face_of X" by (simp add:poly face_of_refl polytope_imp_convex) show "\X. X \ {bbox \ T} \ aff_dim X \ aff_dim U" by (simp add: \aff_dim (bbox \ T) \ aff_dim U\) @@ -3886,7 +3881,7 @@ by (auto simp: homotopic_with_imp_continuous dest: homotopic_with_imp_subset1 homotopic_with_imp_subset2) next assume ?rhs then show ?lhs - by (force simp: elim: homotopic_with_eq dest: homotopic_with_sphere_times [where h=g]) + by (elim conjE homotopic_with_eq [OF homotopic_with_sphere_times]; force) qed then show ?thesis by (simp add: *) diff -r 33e886e21ed4 -r 7c0de1eb6075 src/HOL/Analysis/Polytope.thy --- a/src/HOL/Analysis/Polytope.thy Sun Apr 19 13:01:40 2020 +0100 +++ b/src/HOL/Analysis/Polytope.thy Sun Apr 19 22:16:57 2020 +0100 @@ -2913,7 +2913,7 @@ assumes "finite \" and "\X. X \ \ \ polytope X" and "\X. X \ \ \ aff_dim X \ d" - and "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X \ (X \ Y) face_of Y" + and "\X Y. \X \ \; Y \ \\ \ (X \ Y) face_of X" and "finite I" shows "\\. \\ = \\ \ finite \ \ @@ -2921,7 +2921,7 @@ (\C \ \. \x \ C. \D. D \ \ \ x \ D \ D \ C) \ (\X \ \. polytope X) \ (\X \ \. aff_dim X \ d) \ - (\X \ \. \Y \ \. X \ Y face_of X \ X \ Y face_of Y) \ + (\X \ \. \Y \ \. X \ Y face_of X) \ (\X \ \. \x \ X. \y \ X. \a b. (a,b) \ I \ a \ x \ b \ a \ y \ b \ a \ x \ b \ a \ y \ b)" @@ -2937,7 +2937,7 @@ and sub2: "\C x. C \ \ \ x \ C \ \D. D \ \ \ x \ D \ D \ C" and poly: "\X. X \ \ \ polytope X" and aff: "\X. X \ \ \ aff_dim X \ d" - and face: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + and face: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" and I: "\X x y a b. \X \ \; x \ X; y \ X; (a,b) \ I\ \ a \ x \ b \ a \ y \ b \ a \ x \ b \ a \ y \ b" by (auto simp: that) @@ -2960,7 +2960,7 @@ (a,b) \ insert ab I \ a \ x \ b \ a \ y \ b \ a \ x \ b \ a \ y \ b" using \ab = (a, b)\ I by fastforce - show "\X \ ?\. \Y \ ?\. X \ Y face_of X \ X \ Y face_of Y" + show "\X \ ?\. \Y \ ?\. X \ Y face_of X" by (auto simp: eqInt halfspace_Int_eq face_of_Int_Int face face_of_halfspace_le face_of_halfspace_ge) show "\C \ ?\. \D. D \ \ \ C \ D" using sub1 by force @@ -2984,10 +2984,10 @@ assumes "0 < e" "finite \" and poly: "\X. X \ \ \ polytope X" and aff: "\X. X \ \ \ aff_dim X \ d" - and face: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + and face: "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" obtains "\'" where "finite \'" "\\' = \\" "\X. X \ \' \ diameter X < e" "\X. X \ \' \ polytope X" "\X. X \ \' \ aff_dim X \ d" - "\X Y. \X \ \'; Y \ \'\ \ X \ Y face_of X \ X \ Y face_of Y" + "\X Y. \X \ \'; Y \ \'\ \ X \ Y face_of X" "\C. C \ \' \ \D. D \ \ \ C \ D" "\C x. C \ \ \ x \ C \ \D. D \ \' \ x \ D \ D \ C" proof - @@ -3009,7 +3009,7 @@ obtain \' where eq: "\\' = \\" and "finite \'" and poly: "\X. X \ \' \ polytope X" and aff: "\X. X \ \' \ aff_dim X \ d" - and face: "\X Y. \X \ \'; Y \ \'\ \ X \ Y face_of X \ X \ Y face_of Y" + and face: "\X Y. \X \ \'; Y \ \'\ \ X \ Y face_of X" and I: "\X x y a b. \X \ \'; x \ X; y \ X; (a,b) \ I\ \ a \ x \ b \ a \ y \ b \ a \ x \ b \ a \ y \ b" and sub1: "\C. C \ \' \ \D. D \ \ \ C \ D" @@ -3214,15 +3214,13 @@ finite \ \ (\S \ \. \n. n simplex S) \ (\F S. S \ \ \ F face_of S \ F \ \) \ - (\S S'. S \ \ \ S' \ \ - \ (S \ S') face_of S \ (S \ S') face_of S')" + (\S S'. S \ \ \ S' \ \ \ (S \ S') face_of S)" definition\<^marker>\tag important\ triangulation where "triangulation \ \ finite \ \ (\T \ \. \n. n simplex T) \ - (\T T'. T \ \ \ T' \ \ - \ (T \ T') face_of T \ (T \ T') face_of T')" + (\T T'. T \ \ \ T' \ \ \ (T \ T') face_of T)" subsection\Refining a cell complex to a simplicial complex\ @@ -3312,7 +3310,7 @@ and "\C. C \ \ \ polytope C" and "\C. C \ \ \ aff_dim C \ of_nat n" and "\C F. \C \ \; F face_of C\ \ F \ \" - and "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" shows "\\. simplicial_complex \ \ (\K \ \. aff_dim K \ of_nat n) \ \\ = \\ \ @@ -3322,9 +3320,9 @@ proof (induction n arbitrary: \ rule: less_induct) case (less n) then have poly\: "\C. C \ \ \ polytope C" - and aff\: "\C. C \ \ \ aff_dim C \ of_nat n" - and face\: "\C F. \C \ \; F face_of C\ \ F \ \" - and intface\: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and aff\: "\C. C \ \ \ aff_dim C \ of_nat n" + and face\: "\C F. \C \ \; F face_of C\ \ F \ \" + and intface\: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" by metis+ show ?case proof (cases "n \ 1") @@ -3339,22 +3337,22 @@ case False define \ where "\ \ {C \ \. aff_dim C < n}" have "finite \" "\C. C \ \ \ polytope C" "\C. C \ \ \ aff_dim C \ int (n - 1)" - "\C F. \C \ \; F face_of C\ \ F \ \" - "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + "\C F. \C \ \; F face_of C\ \ F \ \" + "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" using less.prems - apply (auto simp: \_def) + apply (auto simp: \_def) by (metis aff_dim_subset face_of_imp_subset less_le not_le) with less.IH [of "n-1" \] False obtain \ where "simplicial_complex \" - and aff_dim\: "\K. K \ \ \ aff_dim K \ int (n - 1)" - and "\\ = \\" - and fin\: "\C. C \ \ \ \F. finite F \ F \ \ \ C = \F" - and C\: "\K. K \ \ \ \C. C \ \ \ K \ C" + and aff_dim\: "\K. K \ \ \ aff_dim K \ int (n - 1)" + and "\\ = \\" + and fin\: "\C. C \ \ \ \F. finite F \ F \ \ \ C = \F" + and C\: "\K. K \ \ \ \C. C \ \ \ K \ C" by auto then have "finite \" - and simpl\: "\S. S \ \ \ \n. n simplex S" - and face\: "\F S. \S \ \; F face_of S\ \ F \ \" - and faceI\: "\S S'. \S \ \; S' \ \\ \ (S \ S') face_of S \ (S \ S') face_of S'" + and simpl\: "\S. S \ \ \ \n. n simplex S" + and face\: "\F S. \S \ \; F face_of S\ \ F \ \" + and faceI\: "\S S'. \S \ \; S' \ \\ \ (S \ S') face_of S" by (auto simp: simplicial_complex_def) define \ where "\ \ {C \ \. aff_dim C = n}" have "finite \" @@ -3364,7 +3362,7 @@ and closed\: "\C. C \ \ \ closed C" by (auto simp: \_def poly\ polytope_imp_convex polytope_imp_closed) have in_rel_interior: "(SOME z. z \ rel_interior C) \ rel_interior C" if "C \ \" for C - using that poly\ polytope_imp_convex rel_interior_aff_dim some_in_eq by (fastforce simp: \_def) + using that poly\ polytope_imp_convex rel_interior_aff_dim some_in_eq by (fastforce simp: \_def) have *: "\T. \ affine_dependent T \ card T \ n \ aff_dim K < n \ K = convex hull T" if "K \ \" for K proof - @@ -3392,7 +3390,7 @@ by (simp add: \closed C\ rel_frontier_def subset_iff) finally have "K \ C" . have "L \ C face_of C" - using \_def \_def \C \ \\ \L \ \\ intface\ by auto + using \_def \_def \C \ \\ \L \ \\ intface\ by (simp add: inf_commute) moreover have "L \ C \ C" using \C \ \\ \L \ \\ apply (clarsimp simp: \_def \_def) @@ -3480,192 +3478,185 @@ ultimately show ?thesis using that by auto qed - have "(S \ S' face_of S) \ (S \ S' face_of S')" - if "S \ \ \ ?\" "S' \ \ \ ?\" for S S' + have \
: "X \ Y face_of X \ X \ Y face_of Y" + if XY: "X \ \" "Y \ ?\" for X Y proof - - have symmy: "\\X Y. R X Y \ R Y X; - \X Y. \X \ \; Y \ \\ \ R X Y; - \X Y. \X \ \; Y \ ?\\ \ R X Y; - \X Y. \X \ ?\; Y \ ?\\ \ R X Y\ \ R S S'" for R - using that by (metis (no_types, lifting) Un_iff) - show ?thesis - proof (rule symmy) - show "Y \ X face_of Y \ Y \ X face_of X" - if "X \ Y face_of X \ X \ Y face_of Y" for X Y :: "'a set" - by (simp add: inf_commute that) - next - show "X \ Y face_of X \ X \ Y face_of Y" - if "X \ \" and "Y \ \" for X Y - by (simp add: faceI\ that) - next - show "X \ Y face_of X \ X \ Y face_of Y" - if XY: "X \ \" "Y \ ?\" for X Y - proof - - obtain C K - where "C \ \" "K \ \" "K \ rel_frontier C" - and Y: "Y = convex hull insert (SOME z. z \ rel_interior C) K" - using XY by blast - have "convex C" - by (simp add: \C \ \\ convex\) - have "K \ C" - by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed rel_frontier_def subset_iff) - let ?z = "(SOME z. z \ rel_interior C)" - have z: "?z \ rel_interior C" - using \C \ \\ in_rel_interior by blast - obtain D where "D \ \" "X \ D" - using C\ \X \ \\ by blast - have "D \ rel_interior C = (C \ D) \ rel_interior C" - using rel_interior_subset by blast - also have "(C \ D) \ rel_interior C = {}" - proof (rule face_of_disjoint_rel_interior) - show "C \ D face_of C" - using \_def \_def \C \ \\ \D \ \\ intface\ by blast - show "C \ D \ C" - by (metis (mono_tags, lifting) Int_lower2 \_def \_def \C \ \\ \D \ \\ aff_dim_subset mem_Collect_eq not_le) - qed - finally have DC: "D \ rel_interior C = {}" . - have eq: "X \ convex hull (insert ?z K) = X \ convex hull K" - apply (rule Int_convex_hull_insert_rel_exterior [OF \convex C\ \K \ C\ z]) - using DC by (meson \X \ D\ disjnt_def disjnt_subset1) - obtain I where I: "\ affine_dependent I" - and Keq: "K = convex hull I" and [simp]: "convex hull K = K" - using "*" \K \ \\ by force - then have "?z \ affine hull I" - using ahK_C_disjoint \C \ \\ \K \ \\ \K \ rel_frontier C\ affine_hull_convex_hull z by blast - have "X \ K face_of K" - by (simp add: \K \ \\ faceI\ \X \ \\) - also have "... face_of convex hull insert ?z K" - by (metis I Keq \?z \ affine hull I\ aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert) - finally have "X \ K face_of convex hull insert ?z K" . - then show ?thesis - using "*" \K \ \\ faceI\ that(1) by (fastforce simp add: Y eq) - qed - next - show "X \ Y face_of X \ X \ Y face_of Y" - if XY: "X \ ?\" "Y \ ?\" for X Y - proof - - obtain C K D L - where "C \ \" "K \ \" "K \ rel_frontier C" + obtain C K + where "C \ \" "K \ \" "K \ rel_frontier C" + and Y: "Y = convex hull insert (SOME z. z \ rel_interior C) K" + using XY by blast + have "convex C" + by (simp add: \C \ \\ convex\) + have "K \ C" + by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed rel_frontier_def subset_iff) + let ?z = "(SOME z. z \ rel_interior C)" + have z: "?z \ rel_interior C" + using \C \ \\ in_rel_interior by blast + obtain D where "D \ \" "X \ D" + using C\ \X \ \\ by blast + have "D \ rel_interior C = (C \ D) \ rel_interior C" + using rel_interior_subset by blast + also have "(C \ D) \ rel_interior C = {}" + proof (rule face_of_disjoint_rel_interior) + show "C \ D face_of C" + using \_def \_def \C \ \\ \D \ \\ intface\ by blast + show "C \ D \ C" + by (metis (mono_tags, lifting) Int_lower2 \_def \_def \C \ \\ \D \ \\ aff_dim_subset mem_Collect_eq not_le) + qed + finally have DC: "D \ rel_interior C = {}" . + have eq: "X \ convex hull (insert ?z K) = X \ convex hull K" + apply (rule Int_convex_hull_insert_rel_exterior [OF \convex C\ \K \ C\ z]) + using DC by (meson \X \ D\ disjnt_def disjnt_subset1) + obtain I where I: "\ affine_dependent I" + and Keq: "K = convex hull I" and [simp]: "convex hull K = K" + using "*" \K \ \\ by force + then have "?z \ affine hull I" + using ahK_C_disjoint \C \ \\ \K \ \\ \K \ rel_frontier C\ affine_hull_convex_hull z by blast + have "X \ K face_of K" + by (simp add: XY(1) \K \ \\ faceI\ inf_commute) + also have "... face_of convex hull insert ?z K" + by (metis I Keq \?z \ affine hull I\ aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert) + finally have "X \ K face_of convex hull insert ?z K" . + then show ?thesis + by (simp add: XY(1) Y \K \ \\ eq faceI\) + qed + + show "S \ S' face_of S" + if "S \ \ \ ?\ \ S' \ \ \ ?\" for S S' + using that + proof (elim conjE UnE) + fix X Y + assume "X \ \" and "Y \ \" + then show "X \ Y face_of X" + by (simp add: faceI\) + next + fix X Y + assume XY: "X \ \" "Y \ ?\" + then show "X \ Y face_of X" "Y \ X face_of Y" + using \
[OF XY] by (auto simp: Int_commute) + next + fix X Y + assume XY: "X \ ?\" "Y \ ?\" + show "X \ Y face_of X" + proof - + obtain C K D L + where "C \ \" "K \ \" "K \ rel_frontier C" and X: "X = convex hull insert (SOME z. z \ rel_interior C) K" and "D \ \" "L \ \" "L \ rel_frontier D" and Y: "Y = convex hull insert (SOME z. z \ rel_interior D) L" - using XY by blast - let ?z = "(SOME z. z \ rel_interior C)" - have z: "?z \ rel_interior C" - using \C \ \\ in_rel_interior by blast + using XY by blast + let ?z = "(SOME z. z \ rel_interior C)" + have z: "?z \ rel_interior C" + using \C \ \\ in_rel_interior by blast + have "convex C" + by (simp add: \C \ \\ convex\) + have "convex K" + using "*" \K \ \\ by blast + have "convex L" + by (meson \L \ \\ convex_simplex simpl\) + show ?thesis + proof (cases "D=C") + case True + then have "L \ rel_frontier C" + using \L \ rel_frontier D\ by auto + show ?thesis + apply (simp add: X Y True) + apply (simp add: convex_hull_insert_Int_eq [OF z] \K \ rel_frontier C\ \L \ rel_frontier C\ \convex C\ \convex K\ \convex L\) + using face_of_polytope_insert2 + by (metis "*" IntI \C \ \\ \K \ \\ \L \ \\\K \ rel_frontier C\ \L \ rel_frontier C\ aff_independent_finite ahK_C_disjoint empty_iff faceI\ polytope_convex_hull z) + next + case False + have "convex D" + by (simp add: \D \ \\ convex\) + have "K \ C" + by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed rel_frontier_def subset_eq) + have "L \ D" + by (metis DiffE \D \ \\ \L \ rel_frontier D\ closed\ closure_closed rel_frontier_def subset_eq) + let ?w = "(SOME w. w \ rel_interior D)" + have w: "?w \ rel_interior D" + using \D \ \\ in_rel_interior by blast + have "C \ rel_interior D = (D \ C) \ rel_interior D" + using rel_interior_subset by blast + also have "(D \ C) \ rel_interior D = {}" + proof (rule face_of_disjoint_rel_interior) + show "D \ C face_of D" + using \_def \C \ \\ \D \ \\ intface\ by blast + have "D \ \ \ aff_dim D = int n" + using \_def \D \ \\ by blast + moreover have "C \ \ \ aff_dim C = int n" + using \_def \C \ \\ by blast + ultimately show "D \ C \ D" + by (metis Int_commute False face_of_aff_dim_lt inf.idem inf_le1 intface\ not_le poly\ polytope_imp_convex) + qed + finally have CD: "C \ (rel_interior D) = {}" . + have zKC: "(convex hull insert ?z K) \ C" + by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed convex\ hull_minimal insert_subset rel_frontier_def rel_interior_subset subset_iff z) + have eq: "convex hull (insert ?z K) \ convex hull (insert ?w L) = + convex hull (insert ?z K) \ convex hull L" + apply (rule Int_convex_hull_insert_rel_exterior [OF \convex D\ \L \ D\ w]) + using zKC CD apply (force simp: disjnt_def) + done + have ch_id: "convex hull K = K" "convex hull L = L" + using "*" \K \ \\ \L \ \\ hull_same by auto have "convex C" by (simp add: \C \ \\ convex\) - have "convex K" - using "*" \K \ \\ by blast - have "convex L" - by (meson \L \ \\ convex_simplex simpl\) - show ?thesis - proof (cases "D=C") - case True - then have "L \ rel_frontier C" - using \L \ rel_frontier D\ by auto - show ?thesis - apply (simp add: X Y True) - apply (simp add: convex_hull_insert_Int_eq [OF z] \K \ rel_frontier C\ \L \ rel_frontier C\ \convex C\ \convex K\ \convex L\) - using face_of_polytope_insert2 - by (metis "*" IntI \C \ \\ \K \ \\ \L \ \\\K \ rel_frontier C\ \L \ rel_frontier C\ aff_independent_finite ahK_C_disjoint empty_iff faceI\ polytope_convex_hull z) - next - case False - have "convex D" - by (simp add: \D \ \\ convex\) - have "K \ C" - by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed rel_frontier_def subset_eq) - have "L \ D" - by (metis DiffE \D \ \\ \L \ rel_frontier D\ closed\ closure_closed rel_frontier_def subset_eq) - let ?w = "(SOME w. w \ rel_interior D)" - have w: "?w \ rel_interior D" - using \D \ \\ in_rel_interior by blast - have "C \ rel_interior D = (D \ C) \ rel_interior D" - using rel_interior_subset by blast - also have "(D \ C) \ rel_interior D = {}" + have "convex hull (insert ?z K) \ L = L \ convex hull (insert ?z K)" + by blast + also have "... = convex hull K \ L" + proof (subst Int_convex_hull_insert_rel_exterior [OF \convex C\ \K \ C\ z]) + have "(C \ D) \ rel_interior C = {}" proof (rule face_of_disjoint_rel_interior) - show "D \ C face_of D" + show "C \ D face_of C" using \_def \C \ \\ \D \ \\ intface\ by blast - have "D \ \ \ aff_dim D = int n" - using \_def \D \ \\ by blast - moreover have "C \ \ \ aff_dim C = int n" - using \_def \C \ \\ by blast - ultimately show "D \ C \ D" - by (metis False face_of_aff_dim_lt inf.idem inf_le1 intface\ not_le poly\ polytope_imp_convex) + have "D \ \" "aff_dim D = int n" + using \_def \D \ \\ by fastforce+ + moreover have "C \ \" "aff_dim C = int n" + using \_def \C \ \\ by fastforce+ + ultimately have "aff_dim D + - 1 * aff_dim C \ 0" + by fastforce + then have "\ C face_of D" + using False \convex D\ face_of_aff_dim_lt by fastforce + show "C \ D \ C" + by (metis inf_commute \C \ \\ \D \ \\ \\ C face_of D\ intface\) qed - finally have CD: "C \ (rel_interior D) = {}" . - have zKC: "(convex hull insert ?z K) \ C" - by (metis DiffE \C \ \\ \K \ rel_frontier C\ closed\ closure_closed convex\ hull_minimal insert_subset rel_frontier_def rel_interior_subset subset_iff z) - have eq: "convex hull (insert ?z K) \ convex hull (insert ?w L) = - convex hull (insert ?z K) \ convex hull L" - apply (rule Int_convex_hull_insert_rel_exterior [OF \convex D\ \L \ D\ w]) - using zKC CD apply (force simp: disjnt_def) - done - have ch_id: "convex hull K = K" "convex hull L = L" - using "*" \K \ \\ \L \ \\ hull_same by auto - have "convex C" - by (simp add: \C \ \\ convex\) - have "convex hull (insert ?z K) \ L = L \ convex hull (insert ?z K)" - by blast - also have "... = convex hull K \ L" - proof (subst Int_convex_hull_insert_rel_exterior [OF \convex C\ \K \ C\ z]) - have "(C \ D) \ rel_interior C = {}" - proof (rule face_of_disjoint_rel_interior) - show "C \ D face_of C" - using \_def \C \ \\ \D \ \\ intface\ by blast - have "D \ \" "aff_dim D = int n" - using \_def \D \ \\ by fastforce+ - moreover have "C \ \" "aff_dim C = int n" - using \_def \C \ \\ by fastforce+ - ultimately have "aff_dim D + - 1 * aff_dim C \ 0" - by fastforce - then have "\ C face_of D" - using False \convex D\ face_of_aff_dim_lt by fastforce - show "C \ D \ C" - using \C \ \\ \D \ \\ \\ C face_of D\ intface\ by fastforce - qed - then have "D \ rel_interior C = {}" - by (metis inf.absorb_iff2 inf_assoc inf_sup_aci(1) rel_interior_subset) - then show "disjnt L (rel_interior C)" - by (meson \L \ D\ disjnt_def disjnt_subset1) - next - show "L \ convex hull K = convex hull K \ L" - by force - qed - finally have chKL: "convex hull (insert ?z K) \ L = convex hull K \ L" . - have "convex hull insert ?z K \ convex hull L face_of K" - by (simp add: \K \ \\ \L \ \\ ch_id chKL faceI\) - also have "... face_of convex hull insert ?z K" - proof - - obtain I where I: "\ affine_dependent I" "K = convex hull I" - using * [OF \K \ \\] by auto - then have "\a. a \ rel_interior C \ a \ affine hull I" - using ahK_C_disjoint \C \ \\ \K \ \\ \K \ rel_frontier C\ affine_hull_convex_hull by blast - then show ?thesis - by (metis I affine_independent_insert face_of_convex_hull_affine_independent hull_insert subset_insertI z) - qed - finally have 1: "convex hull insert ?z K \ convex hull L face_of convex hull insert ?z K" . - have "convex hull insert ?z K \ convex hull L face_of L" - by (simp add: \K \ \\ \L \ \\ ch_id chKL faceI\) - also have "... face_of convex hull insert ?w L" - proof - - obtain I where I: "\ affine_dependent I" "L = convex hull I" - using * [OF \L \ \\] by auto - then have "\a. a \ rel_interior D \ a \ affine hull I" - using \D \ \\ \L \ \\ \L \ rel_frontier D\ affine_hull_convex_hull ahK_C_disjoint by blast - then show ?thesis - by (metis I aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert w) - qed - finally have 2: "convex hull insert ?z K \ convex hull L face_of convex hull insert ?w L" . - show ?thesis - by (simp add: X Y eq 1 2) + then have "D \ rel_interior C = {}" + by (metis inf.absorb_iff2 inf_assoc inf_sup_aci(1) rel_interior_subset) + then show "disjnt L (rel_interior C)" + by (meson \L \ D\ disjnt_def disjnt_subset1) + next + show "L \ convex hull K = convex hull K \ L" + by force qed + finally have chKL: "convex hull (insert ?z K) \ L = convex hull K \ L" . + have "convex hull insert ?z K \ convex hull L face_of K" + by (simp add: \K \ \\ \L \ \\ ch_id chKL faceI\) + also have "... face_of convex hull insert ?z K" + proof - + obtain I where I: "\ affine_dependent I" "K = convex hull I" + using * [OF \K \ \\] by auto + then have "\a. a \ rel_interior C \ a \ affine hull I" + using ahK_C_disjoint \C \ \\ \K \ \\ \K \ rel_frontier C\ affine_hull_convex_hull by blast + then show ?thesis + by (metis I affine_independent_insert face_of_convex_hull_affine_independent hull_insert subset_insertI z) + qed + finally have 1: "convex hull insert ?z K \ convex hull L face_of convex hull insert ?z K" . + have "convex hull insert ?z K \ convex hull L face_of L" + by (metis \K \ \\ \L \ \\ chKL ch_id faceI\ inf_commute) + also have "... face_of convex hull insert ?w L" + proof - + obtain I where I: "\ affine_dependent I" "L = convex hull I" + using * [OF \L \ \\] by auto + then have "\a. a \ rel_interior D \ a \ affine hull I" + using \D \ \\ \L \ \\ \L \ rel_frontier D\ affine_hull_convex_hull ahK_C_disjoint by blast + then show ?thesis + by (metis I aff_independent_finite convex_convex_hull face_of_convex_hull_insert face_of_refl hull_insert w) + qed + finally have 2: "convex hull insert ?z K \ convex hull L face_of convex hull insert ?w L" . + show ?thesis + by (simp add: X Y eq 1 2) qed qed - qed - then - show "S \ S' face_of S" "S \ S' face_of S'" if "S \ \ \ ?\ \ S' \ \ \ ?\" for S S' - using that by auto + qed qed show "\F \ \ \ ?\. C = \F" if "C \ \" for C proof (cases "C \ \") @@ -3772,7 +3763,7 @@ lemma simplicial_subdivision_of_cell_complex_lowdim: assumes "finite \" and poly: "\C. C \ \ \ polytope C" - and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" and aff: "\C. C \ \ \ aff_dim C \ d" obtains \ where "simplicial_complex \" "\K. K \ \ \ aff_dim K \ d" "\\ = \\" @@ -3800,10 +3791,13 @@ if "G \ (\C\\. {F. F face_of C})" and "F face_of G" for F G using that face_of_trans by blast next - show "F1 \ F2 face_of F1 \ F1 \ F2 face_of F2" - if "F1 \ (\C\\. {F. F face_of C})" and "F2 \ (\C\\. {F. F face_of C})" for F1 F2 - using that - by safe (meson face face_of_Int_subface)+ + fix F1 F2 + assume "F1 \ (\C\\. {F. F face_of C})" and "F2 \ (\C\\. {F. F face_of C})" + then obtain C1 C2 where "C1 \ \" "C2 \ \" and F: "F1 face_of C1" "F2 face_of C2" + by auto + show "F1 \ F2 face_of F1" + using face_of_Int_subface [OF _ _ F] + by (metis \C1 \ \\ \C2 \ \\ face inf_commute) qed moreover have "\(\C\\. {F. F face_of C}) = \\" @@ -3838,7 +3832,7 @@ proposition simplicial_subdivision_of_cell_complex: assumes "finite \" and poly: "\C. C \ \ \ polytope C" - and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" obtains \ where "simplicial_complex \" "\\ = \\" "\C. C \ \ \ \F. finite F \ F \ \ \ C = \F" @@ -3848,7 +3842,7 @@ corollary fine_simplicial_subdivision_of_cell_complex: assumes "0 < e" "finite \" and poly: "\C. C \ \ \ polytope C" - and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" obtains \ where "simplicial_complex \" "\K. K \ \ \ diameter K < e" "\\ = \\" @@ -3857,7 +3851,7 @@ proof - obtain \ where \: "finite \" "\\ = \\" and diapoly: "\X. X \ \ \ diameter X < e" "\X. X \ \ \ polytope X" - and "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X \ X \ Y face_of Y" + and "\X Y. \X \ \; Y \ \\ \ X \ Y face_of X" and \covers: "\C x. C \ \ \ x \ C \ \D. D \ \ \ x \ D \ D \ C" and \covered: "\C. C \ \ \ \D. D \ \ \ C \ D" by (blast intro: cell_complex_subdivision_exists [OF \0 < e\ \finite \\ poly aff_dim_le_DIM face]) @@ -3952,7 +3946,7 @@ assumes "0 < e" "finite \" and poly: "\C. C \ \ \ polytope C" and aff: "\C. C \ \ \ aff_dim C = d" - and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1 \ C1 \ C2 face_of C2" + and face: "\C1 C2. \C1 \ \; C2 \ \\ \ C1 \ C2 face_of C1" obtains \ where "triangulation \" "\k. k \ \ \ diameter k < e" "\k. k \ \ \ aff_dim k = d" "\\ = \\" "\C. C \ \ \ \f. finite f \ f \ \ \ C = \f"