import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckShortening import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckExcursionSubarcs /-! # Endpoint-neck replacement from an actual excursion Morgan--Tian Lemma A.1, pp. 497-498, with the smaller positive saving needed in Claim 10.3. An actual excursion outside the middle neck produces its own half-neck subarc and an admissible shorter path. The full curve is only required to lie in its actual minimization region. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff Topology ENNReal Bundle universe u namespace PoincareMT.M28 variable {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] [T2Space M] {g : RiemannianMetric 3 M} /-- An actual middle-neck excursion between two central-sphere points admits a C1 replacement in the same region with a fixed positive saving. No neck-contained subarc or length-saving hypothesis is supplied (A.1). -/ theorem exists_endpoint_neck_shortening (N : EpsilonNeck g) (hepsilon : N.epsilon ≤ neckShorteningEpsilon) {U : Set M} (hNU : N.central_sphere ⊆ U) {γ : ℝ → M} {a b c d t : ℝ} (hac : a ≤ c) (hct : c ≤ t) (htd : t ≤ d) (hdb : d ≤ b) (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b)) (hγU : MapsTo γ (Icc a b) U) (hc : γ c ∈ N.central_sphere) (hd : γ d ∈ N.central_sphere) (hexcursion : γ t ∉ N.region (-(N.epsilon⁻¹ / 2)) (N.epsilon⁻¹ / 2)) : ∃ σ : ℝ → M, σ 0 = γ a ∧ σ 1 = γ b ∧ ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 σ (Icc (0 : ℝ) 1) ∧ MapsTo σ (Icc (0 : ℝ) 1) U ∧ g.pathELength σ 0 1 + ENNReal.ofReal (N.scale * N.epsilon⁻¹ / 8) ≤ g.pathELength γ a b := by obtain ⟨w, hcw, hwt, hprefix, hheight⟩ := N.exists_first_half_neck_subarc hct (hγ.continuousOn.mono (Icc_subset_Icc hac (htd.trans hdb))) hc hexcursion exact exists_neck_excursion_replacement N hepsilon hNU hac le_rfl hcw.le (hwt.trans htd) hdb hγ hγU hc hd hprefix hheight.ge end PoincareMT.M28