import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports import PoincareLib.Topology.Manifold.NeckCap.Theory /-! # Local retractions for the actual embedded spheres Hirsch, Differential Topology, Chapter 8, Section 1, proof of Theorem 1.3, p. 180: extend the isotopy locally near its embedded image before cutting off inside the ambient carrier. Here the supplied immersion's rectifying charts construct the needed local retraction. The embedding condition excludes every other source sheet from the selected ambient neighborhood. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff universe u namespace PoincareMT.M28 variable {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin 3)) M] /-- A supplied sphere embedding has a genuine smooth local retraction inside any prescribed open carrier (Hirsch 8.1.3, p. 180). -/ theorem exists_sphere_embedding_local_retraction {f : UnitTwoSphere โ†’ M} (hf : Manifold.IsSmoothEmbedding (๐“ก 2) (๐“ก 3) โˆž f) (q : UnitTwoSphere) {U : Set M} (hU : IsOpen U) (hqU : f q โˆˆ U) : โˆƒ (V : Set M) (r : M โ†’ UnitTwoSphere), IsOpen V โˆง f q โˆˆ V โˆง V โІ U โˆง ContMDiffOn (๐“ก 3) (๐“ก 2) โˆž r V โˆง โˆ€ z : UnitTwoSphere, f z โˆˆ V โ†’ r (f z) = z := by let h : Manifold.IsImmersionAt (๐“ก 2) (๐“ก 3) โˆž f q := hf.isImmersion.isImmersionAt q let P : EuclideanSpace โ„ (Fin 3) โ†’L[โ„] EuclideanSpace โ„ (Fin 2) := (ContinuousLinearMap.fst โ„ (EuclideanSpace โ„ (Fin 2)) h.complement).comp h.equiv.symm.toContinuousLinearMap let p : M โ†’ EuclideanSpace โ„ (Fin 2) := fun y => P ((h.codChart.extend (๐“ก 3)) y) let r : M โ†’ UnitTwoSphere := fun y => (h.domChart.extend (๐“ก 2)).symm (p y) have hp : ContMDiffOn (๐“ก 3) ๐“˜(โ„, EuclideanSpace โ„ (Fin 2)) โˆž p h.codChart.source := P.contMDiff.comp_contMDiffOn (h.codChart.contMDiffOn_extend h.codChart_mem_maximalAtlas) have hpf (z : UnitTwoSphere) (hz : z โˆˆ h.domChart.source) : p (f z) = (h.domChart.extend (๐“ก 2)) z := by have hzt : (h.domChart.extend (๐“ก 2)) z โˆˆ (h.domChart.extend (๐“ก 2)).target := (h.domChart.extend (๐“ก 2)).map_source (by simpa using hz) have heq := h.writtenInCharts hzt change (h.codChart.extend (๐“ก 3)) (f ((h.domChart.extend (๐“ก 2)).symm ((h.domChart.extend (๐“ก 2)) z))) = h.equiv ((h.domChart.extend (๐“ก 2)) z, 0) at heq rw [h.domChart.extend_left_inv hz] at heq change P ((h.codChart.extend (๐“ก 3)) (f z)) = _ rw [heq] simp [P] obtain โŸจO, hO, hOfโŸฉ := hf.isEmbedding.isInducing.isOpen_iff.mp h.domChart.open_source let V : Set M := (U โˆฉ O) โˆฉ (h.codChart.source โˆฉ p โปยน' (h.domChart.extend (๐“ก 2)).target) have hV : IsOpen V := (hU.inter hO).inter (hp.continuousOn.isOpen_inter_preimage h.codChart.open_source h.domChart.isOpen_extend_target) have hqO : f q โˆˆ O := by have : q โˆˆ f โปยน' O := by rw [hOf]; exact h.mem_domChart_source exact this have hqV : f q โˆˆ V := by refine โŸจโŸจhqU, hqOโŸฉ, h.mem_codChart_source, ?_โŸฉ change p (f q) โˆˆ (h.domChart.extend (๐“ก 2)).target rw [hpf q h.mem_domChart_source] exact (h.domChart.extend (๐“ก 2)).map_source (by simpa using h.mem_domChart_source) have hrs : ContMDiffOn ๐“˜(โ„, EuclideanSpace โ„ (Fin 2)) (๐“ก 2) โˆž (h.domChart.extend (๐“ก 2)).symm (h.domChart.extend (๐“ก 2)).target := by rw [h.domChart.extend_target'] exact contMDiffOn_extend_symm h.domChart_mem_maximalAtlas refine โŸจV, r, hV, hqV, fun _ hy => hy.1.1, hrs.comp (hp.mono fun _ hy => hy.2.1) (fun _ hy => hy.2.2), ?_โŸฉ intro z hz have hzdom : z โˆˆ h.domChart.source := by rw [โ† hOf] exact hz.1.2 change (h.domChart.extend (๐“ก 2)).symm (p (f z)) = z rw [hpf z hzdom] exact h.domChart.extend_left_inv hzdom end PoincareMT.M28