Download data/lean/OAI/AlgebraicGeometry/CycleClass/Geometric/ConvexComplement.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 12.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/CycleClass/Geometric/ConvexComplement.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/AlgebraicGeometry/CycleClass/Geometric/ConvexComplement.lean
-
curl -L -o ConvexComplement.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/CycleClass/Geometric/ConvexComplement.lean
12.1 kB
| import OAI.AlgebraicGeometry.CycleClass.Geometric.ClosedBallRadial | |
| import Mathlib.Topology.MetricSpace.Bounded | |
| /-! # Convex Complement -/ | |
| namespace OAI.AlgebraicGeometry.CycleClass.Geometric.ConvexComplement.Cycles | |
| noncomputable section | |
| /-! | |
| # Complements of compact convex sets | |
| The inclusion of the complement of a compact convex set into the complement | |
| of any one of its points is a genuine homotopy equivalence. An explicit | |
| radial map about that point takes values on a sphere strictly enclosing the | |
| set. The homotopies interpolate the radius and stay in the required | |
| complements. No nonemptiness assumption on a sphere or a complement is used. | |
| -/ | |
| open unitInterval | |
| variable {E : Type*} | |
| /-- A point outside a set differs from every specified point of the set. -/ | |
| theorem convexComplement_ne_point (K : Set E) (x : E) (hx : x β K) | |
| (y : β₯(KαΆ)) : (y : E) β x := by | |
| intro h | |
| apply y.property | |
| simpa only [h] using hx | |
| variable [NormedAddCommGroup E] | |
| /-- The literal inclusion of the complement of a set into a point complement. -/ | |
| def convexComplementInclusion (K : Set E) (x : E) (hx : x β K) : | |
| C(β₯(KαΆ), β₯(({x} : Set E)αΆ)) where | |
| toFun y := β¨y, convexComplement_ne_point K x hx yβ© | |
| continuous_toFun := continuous_subtype_val.subtype_mk (convexComplement_ne_point K x hx) | |
| @[simp] | |
| theorem convexComplementInclusion_coe (K : Set E) (x : E) (hx : x β K) | |
| (y : β₯(KαΆ)) : (convexComplementInclusion K x hx y : E) = y := rfl | |
| /-- Translation from a punctured space centered at `x` to the punctured vector space. -/ | |
| def puncturedPointToOrigin (x : E) : C(β₯(({x} : Set E)αΆ), NormalSphere.Cycles.PuncturedNormal E) where | |
| toFun y := β¨(y : E) - x, sub_ne_zero.mpr y.propertyβ© | |
| continuous_toFun := (continuous_subtype_val.sub continuous_const).subtype_mk _ | |
| theorem puncturedOrigin_add_ne (x : E) (y : NormalSphere.Cycles.PuncturedNormal E) : (y : E) + x β x := by | |
| intro h | |
| apply y.property | |
| simpa using congrArg (fun z : E => z - x) h | |
| /-- Inverse translation from the punctured vector space. -/ | |
| def puncturedOriginToPoint (x : E) : C(NormalSphere.Cycles.PuncturedNormal E, β₯(({x} : Set E)αΆ)) where | |
| toFun y := β¨(y : E) + x, puncturedOrigin_add_ne x yβ© | |
| continuous_toFun := | |
| (continuous_subtype_val.add continuous_const).subtype_mk (puncturedOrigin_add_ne x) | |
| @[simp] | |
| theorem puncturedOriginToPoint_toOrigin (x : E) (y : β₯(({x} : Set E)αΆ)) : | |
| puncturedOriginToPoint x (puncturedPointToOrigin x y) = y := by | |
| apply Subtype.ext | |
| exact sub_add_cancel _ _ | |
| variable [NormedSpace β E] | |
| /-- The positive-radius projection centered at the specified point. -/ | |
| def puncturedPointRadiusMap (x : E) (R : β) (hR : 0 < R) : | |
| C(β₯(({x} : Set E)αΆ), β₯(({x} : Set E)αΆ)) := | |
| (puncturedOriginToPoint x).comp ((ClosedBallRadial.Cycles.normalRadiusMap E R hR).comp (puncturedPointToOrigin x)) | |
| /-- Radial interpolation centered at `x`, on the actual point complement. -/ | |
| def puncturedPointRadiusHomotopy (x : E) (R : β) (hR : 0 < R) : | |
| ContinuousMap.Homotopy (ContinuousMap.id β₯(({x} : Set E)αΆ)) | |
| (puncturedPointRadiusMap x R hR) where | |
| toFun z := puncturedOriginToPoint x | |
| (ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR (z.1, puncturedPointToOrigin x z.2)) | |
| continuous_toFun := (puncturedOriginToPoint x).continuous.comp | |
| ((ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR).continuous.comp | |
| (continuous_fst.prodMk ((puncturedPointToOrigin x).continuous.comp continuous_snd))) | |
| map_zero_left y := by | |
| exact (congrArg (fun z : NormalSphere.Cycles.PuncturedNormal E => puncturedOriginToPoint x z) | |
| ((ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR).map_zero_left (puncturedPointToOrigin x y))).trans | |
| (puncturedOriginToPoint_toOrigin x y) | |
| map_one_left y := by | |
| exact congrArg (fun z : NormalSphere.Cycles.PuncturedNormal E => puncturedOriginToPoint x z) | |
| ((ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR).map_one_left (puncturedPointToOrigin x y)) | |
| /-- The radial projection is on the sphere of radius `R` about `x`. -/ | |
| theorem puncturedPointRadiusMap_dist (x : E) (R : β) (hR : 0 < R) | |
| (y : β₯(({x} : Set E)αΆ)) : | |
| dist (puncturedPointRadiusMap x R hR y : E) x = R := by | |
| change dist ((ClosedBallRadial.Cycles.normalRadiusMap E R hR (puncturedPointToOrigin x y) : E) + x) x = R | |
| simpa only [dist_eq_norm, add_sub_cancel_right] using | |
| ClosedBallRadial.Cycles.normalRadiusMap_norm E R hR (puncturedPointToOrigin x y) | |
| /-- The interpolated distance is the convex combination of the two radii. -/ | |
| theorem puncturedPointRadiusHomotopy_dist (x : E) (R : β) (hR : 0 < R) | |
| (t : I) (y : β₯(({x} : Set E)αΆ)) : | |
| dist (puncturedPointRadiusHomotopy x R hR (t, y) : E) x = | |
| (1 - (t : β)) * dist (y : E) x + (t : β) * R := by | |
| change dist ((ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR (t, puncturedPointToOrigin x y) : E) + x) x = _ | |
| simp only [dist_eq_norm, add_sub_cancel_right] | |
| exact ClosedBallRadial.Cycles.normalRadiusHomotopy_norm E R hR t (puncturedPointToOrigin x y) | |
| /-- The existing polar-coordinate interpolation has the usual scalar formula. -/ | |
| theorem normalRadiusHomotopy_coe (R : β) (hR : 0 < R) (t : I) | |
| (y : NormalSphere.Cycles.PuncturedNormal E) : | |
| (ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR (t, y) : E) = | |
| (((1 - (t : β)) * β(y : E)β + (t : β) * R) / β(y : E)β) β’ (y : E) := by | |
| change ((1 - (t : β)) * ((homeomorphUnitSphereProd E y).2 : β) + (t : β) * R) β’ | |
| ((homeomorphUnitSphereProd E y).1 : E) = _ | |
| simp only [homeomorphUnitSphereProd_apply_fst_coe, homeomorphUnitSphereProd_apply_snd_coe, | |
| smul_smul, div_eq_mul_inv] | |
| /-- Radial interpolation about `x` moves along the ray through its argument. -/ | |
| theorem puncturedPointRadiusHomotopy_coe (x : E) (R : β) (hR : 0 < R) | |
| (t : I) (y : β₯(({x} : Set E)αΆ)) : | |
| (puncturedPointRadiusHomotopy x R hR (t, y) : E) = | |
| (((1 - (t : β)) * β(y : E) - xβ + (t : β) * R) / β(y : E) - xβ) β’ | |
| ((y : E) - x) + x := by | |
| change (ClosedBallRadial.Cycles.normalRadiusHomotopy E R hR (t, puncturedPointToOrigin x y) : E) + x = _ | |
| rw [normalRadiusHomotopy_coe] | |
| rfl | |
| /-- Once a ray from a point of a convex set has left the set, all farther | |
| points of that ray remain outside. -/ | |
| theorem convex_ray_not_mem {K : Set E} (hK : Convex β K) {x y : E} | |
| (hx : x β K) (hy : y β K) {a : β} (ha : 1 β€ a) : | |
| a β’ (y - x) + x β K := by | |
| intro hz | |
| have hapos : 0 < a := lt_of_lt_of_le zero_lt_one ha | |
| have hmem := hK.add_smul_sub_mem hx hz | |
| (show aβ»ΒΉ β Set.Icc (0 : β) 1 from | |
| β¨inv_nonneg.mpr hapos.le, (inv_le_oneβ hapos).mpr haβ©) | |
| apply hy | |
| simpa [smul_smul, hapos.ne', add_comm] using hmem | |
| /-- A radial projection onto a sphere strictly enclosing `K` lies outside `K`. -/ | |
| theorem puncturedPointRadiusMap_not_mem (K : Set E) (x : E) (R : β) (hR : 0 < R) | |
| (hbound : K β Metric.ball x R) (y : β₯(({x} : Set E)αΆ)) : | |
| (puncturedPointRadiusMap x R hR y : E) β K := by | |
| intro hy | |
| have hlt := Metric.mem_ball.mp (hbound hy) | |
| rw [puncturedPointRadiusMap_dist] at hlt | |
| exact lt_irrefl R hlt | |
| /-- The radial interpolation remains outside a convex set containing its center. -/ | |
| theorem puncturedPointRadiusHomotopy_not_mem (K : Set E) (x : E) | |
| (hconv : Convex β K) (hx : x β K) (R : β) (hR : 0 < R) | |
| (hbound : K β Metric.ball x R) (t : I) (y : β₯(KαΆ)) : | |
| (puncturedPointRadiusHomotopy x R hR | |
| (t, convexComplementInclusion K x hx y) : E) β K := by | |
| have hnorm : 0 < β(y : E) - xβ := | |
| norm_pos_iff.mpr (sub_ne_zero.mpr (convexComplement_ne_point K x hx y)) | |
| by_cases hsmall : β(y : E) - xβ β€ R | |
| Β· rw [puncturedPointRadiusHomotopy_coe] | |
| apply convex_ray_not_mem hconv hx y.property | |
| apply (one_le_div hnorm).mpr | |
| have ht := t.property.1 | |
| have hmul := mul_nonneg ht (sub_nonneg.mpr hsmall) | |
| change β(y : E) - xβ β€ (1 - (t : β)) * β(y : E) - xβ + (t : β) * R | |
| nlinarith | |
| Β· have hlarge : R β€ dist (y : E) x := by | |
| rw [dist_eq_norm] | |
| exact le_of_lt (lt_of_not_ge hsmall) | |
| have hdist : R β€ dist (puncturedPointRadiusHomotopy x R hR | |
| (t, convexComplementInclusion K x hx y) : E) x := by | |
| rw [puncturedPointRadiusHomotopy_dist] | |
| change R β€ (1 - (t : β)) * dist (y : E) x + (t : β) * R | |
| have hmul := mul_nonneg (sub_nonneg.mpr t.property.2) (sub_nonneg.mpr hlarge) | |
| nlinarith | |
| intro hy | |
| exact (not_lt_of_ge hdist) (Metric.mem_ball.mp (hbound hy)) | |
| /-- The explicit homotopy inverse sends each punctured point to the enclosing sphere. -/ | |
| def convexComplementRetractionOfRadius (K : Set E) (x : E) (R : β) (hR : 0 < R) | |
| (hbound : K β Metric.ball x R) : C(β₯(({x} : Set E)αΆ), β₯(KαΆ)) where | |
| toFun y := β¨puncturedPointRadiusMap x R hR y, | |
| puncturedPointRadiusMap_not_mem K x R hR hbound yβ© | |
| continuous_toFun := ((puncturedPointRadiusMap x R hR).continuous.subtype_val).subtype_mk | |
| (puncturedPointRadiusMap_not_mem K x R hR hbound) | |
| /-- Restriction of the explicit radial homotopy to the complement of `K`. -/ | |
| def convexComplementHomotopyOfRadius (K : Set E) (x : E) | |
| (hconv : Convex β K) (hx : x β K) (R : β) (hR : 0 < R) | |
| (hbound : K β Metric.ball x R) : | |
| ContinuousMap.Homotopy (ContinuousMap.id β₯(KαΆ)) | |
| ((convexComplementRetractionOfRadius K x R hR hbound).comp | |
| (convexComplementInclusion K x hx)) where | |
| toFun z := β¨puncturedPointRadiusHomotopy x R hR | |
| (z.1, convexComplementInclusion K x hx z.2), | |
| puncturedPointRadiusHomotopy_not_mem K x hconv hx R hR hbound z.1 z.2β© | |
| continuous_toFun := | |
| (((puncturedPointRadiusHomotopy x R hR).continuous.comp | |
| (continuous_fst.prodMk ((convexComplementInclusion K x hx).continuous.comp | |
| continuous_snd))).subtype_val).subtype_mk | |
| (fun z => puncturedPointRadiusHomotopy_not_mem K x hconv hx R hR hbound z.1 z.2) | |
| map_zero_left y := by | |
| apply Subtype.ext | |
| exact congrArg (fun z : β₯(({x} : Set E)αΆ) => (z : E)) | |
| ((puncturedPointRadiusHomotopy x R hR).map_zero_left | |
| (convexComplementInclusion K x hx y)) | |
| map_one_left y := by | |
| apply Subtype.ext | |
| exact congrArg (fun z : β₯(({x} : Set E)αΆ) => (z : E)) | |
| ((puncturedPointRadiusHomotopy x R hR).map_one_left | |
| (convexComplementInclusion K x hx y)) | |
| /-- The actual complement inclusion is a homotopy equivalence whenever a | |
| positive-radius ball strictly contains the convex set. -/ | |
| def convexComplementHomotopyEquivOfRadius (K : Set E) (x : E) | |
| (hconv : Convex β K) (hx : x β K) (R : β) (hR : 0 < R) | |
| (hbound : K β Metric.ball x R) : | |
| ContinuousMap.HomotopyEquiv β₯(KαΆ) β₯(({x} : Set E)αΆ) where | |
| toFun := convexComplementInclusion K x hx | |
| invFun := convexComplementRetractionOfRadius K x R hR hbound | |
| left_inv := β¨(convexComplementHomotopyOfRadius K x hconv hx R hR hbound).symmβ© | |
| right_inv := β¨(puncturedPointRadiusHomotopy x R hR).symmβ© | |
| /-- For a compact convex set and any point in it, the literal inclusion of | |
| its complement into that point's complement is a homotopy equivalence. | |
| This holds in every real normed space, including the zero-dimensional case. -/ | |
| def convexComplementHomotopyEquiv (K : Set E) (x : E) (hK : IsCompact K) | |
| (hconv : Convex β K) (hx : x β K) : | |
| ContinuousMap.HomotopyEquiv β₯(KαΆ) β₯(({x} : Set E)αΆ) := by | |
| let R := Classical.choose (hK.isBounded.subset_ball_lt 0 x) | |
| have hR : 0 < R := (Classical.choose_spec (hK.isBounded.subset_ball_lt 0 x)).1 | |
| have hbound : K β Metric.ball x R := (Classical.choose_spec (hK.isBounded.subset_ball_lt 0 x)).2 | |
| exact convexComplementHomotopyEquivOfRadius K x hconv hx R hR hbound | |
| /-- The forward map is precisely the original inclusion, not an independently | |
| chosen homotopy-equivalent map. -/ | |
| @[simp] | |
| theorem convexComplementHomotopyEquiv_toFun (K : Set E) (x : E) (hK : IsCompact K) | |
| (hconv : Convex β K) (hx : x β K) : | |
| (convexComplementHomotopyEquiv K x hK hconv hx).toFun = | |
| convexComplementInclusion K x hx := rfl | |
| end | |
| end OAI.AlgebraicGeometry.CycleClass.Geometric.ConvexComplement.Cycles | |