import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PathAliases import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckSpherePaths import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicSplicing import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.CapTopology.NeckRegions import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Action.SpeedDistance /-! # Actual connectors to a selected neck center Morgan--Tian Claim 10.3, pp. 248-249, and Appendix A.1, pp. 497-498. An actual point of a selected neck moves axially to its central sphere, then along that sphere to the selected center. The frozen metric comparison controls the first length, the fixed standard-sphere path controls the second, and the checked C1 splice preserves their exact sum. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff Topology ENNReal Bundle universe u namespace PoincareMT.M28 open Proofs.M28.NeckLengthComparison variable {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} set_option backward.isDefEq.respectTransparency false in /-- Every actual neck point has a neck-valued C1 connector to its literal selected center, under the displayed scale bound. No path or diameter is assumed (Claim 10.3 and Appendix A.1). -/ theorem exists_neck_center_connector (N : EpsilonNeck g) {p : M} (hp : p ∈ N.carrier) : ∃ γ : ℝ → M, γ 0 = p ∧ γ 1 = N.center ∧ ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ MapsTo γ (Icc (0 : ℝ) 1) N.carrier ∧ g.pathELength γ 0 1 < ENNReal.ofReal ((2 * N.epsilon⁻¹ + 4 * standardSpherePathCeiling) * N.scale) := by have hscale : 0 < N.scale := N.scale_pos have hinv : 0 < N.epsilon⁻¹ := inv_pos.mpr N.epsilon_pos have hL : 0 < standardSpherePathCeiling := standardSpherePathCeiling_pos let q : UnitTwoSphere := (N.coordinate_inverse p).1 let s : ℝ := (N.coordinate_inverse p).2 have hs : s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := (N.coordinate_inverse_mem p hp).2 have hsabs : |s| < N.epsilon⁻¹ := abs_lt.mpr hs let η : ℝ → RoundCylinderSpace := fun t => (q, (1 - t) * s) let α : ℝ → M := N.coordinate_map ∘ η have hscalar : ContMDiff 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) 1 (fun t : ℝ => (1 - t) * s) := by rw [contMDiff_iff_contDiff] fun_prop have hη : ContMDiff 𝓘(ℝ, ℝ) ((𝓡 2).prod 𝓘(ℝ, ℝ)) 1 η := contMDiff_const.prodMk hscalar have hηN : MapsTo η (Icc (0 : ℝ) 1) (univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) := by intro t ht refine ⟨mem_univ _, abs_lt.mp ((show |(1 - t) * s| ≤ |s| from ?_).trans_lt hsabs)⟩ rw [abs_mul, abs_of_nonneg (sub_nonneg.mpr ht.2)] nlinarith [abs_nonneg s, ht.1] have hα : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 α (Icc (0 : ℝ) 1) := (N.coordinate_map_smooth.of_le (by simp)).comp hη.contMDiffOn hηN have hαN : MapsTo α (Icc (0 : ℝ) 1) N.carrier := fun t ht => N.coordinate_map_mem_of_axial (η t) (hηN ht).2 have hα0 : α 0 = p := by simpa [α, η, q, s] using N.coordinate_map_coordinate_inverse hp have hα1 : α 1 = N.coordinate_map (q, 0) := by simp [α, η] have hηderiv (t : ℝ) : mfderiv 𝓘(ℝ, ℝ) ((𝓡 2).prod 𝓘(ℝ, ℝ)) η t 1 = (0, -s) := by have hd : HasDerivAt (fun t : ℝ => (1 - t) * s) (-s) t := by simpa only [zero_sub, neg_mul, one_mul] using! ((hasDerivAt_const t (1 : ℝ)).sub (hasDerivAt_id t)).mul_const s change mfderiv 𝓘(ℝ, ℝ) ((𝓡 2).prod 𝓘(ℝ, ℝ)) (fun t => (q, (1 - t) * s)) t 1 = _ rw [mfderiv_prodMk mdifferentiableAt_const (hscalar.contMDiffAt.mdifferentiableAt one_ne_zero), mfderiv_const] apply Prod.ext · rfl · change mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) (fun t : ℝ => (1 - t) * s) t 1 = -s rw [mfderiv_eq_fderiv] change fderiv ℝ (fun u : ℝ => (1 - u) * s) t (1 : ℝ) = -s exact hd.deriv have hαderiv (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : curveVelocity α t = mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map (η t) (0, -s) := by have hcoord : MDifferentiableAt ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map (η t) := ((N.coordinate_map_smooth (η t) (hηN ht)).contMDiffAt ((isOpen_univ.prod isOpen_Ioo).mem_nhds (hηN ht))).mdifferentiableAt (by simp) change mfderiv 𝓘(ℝ, ℝ) (𝓡 3) (N.coordinate_map ∘ η) t 1 = _ rw [mfderiv_comp t hcoord (hη.contMDiffAt.mdifferentiableAt one_ne_zero)] change mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map (η t) (mfderiv 𝓘(ℝ, ℝ) ((𝓡 2).prod 𝓘(ℝ, ℝ)) η t 1) = _ rw [hηderiv] have hspeed (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : g.tangentNorm (α t) (curveVelocity α t) ≤ 2 * N.scale * |s| := by rw [hαderiv t ht] change g.tangentNorm (N.coordinate_map (η t)) (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map (η t) (0, -s)) ≤ _ have hh := (N.coordinate_speed_bounds (η t) (hηN ht).2 (0, -s)).2 simpa only [roundCylinderMetric_self_eq, norm_zero, zero_pow (by decide : 2 ≠ 0), mul_zero, zero_add, neg_sq, Real.sqrt_sq_eq_abs] using hh have hαlen : g.pathELength α 0 1 < ENNReal.ofReal (2 * N.scale * N.epsilon⁻¹) := by have hb := Proofs.M09.pathELength_le_of_speed_le g α 0 1 (2 * N.scale * |s|) (by positivity) hspeed have hstrict : 2 * N.scale * |s| < 2 * N.scale * N.epsilon⁻¹ := mul_lt_mul_of_pos_left hsabs (mul_pos (by norm_num) N.scale_pos) have hb' : g.pathELength α 0 1 ≤ ENNReal.ofReal (2 * N.scale * |s|) := by simpa using hb exact hb'.trans_lt ((ENNReal.ofReal_lt_ofReal_iff (by positivity : 0 < 2 * N.scale * N.epsilon⁻¹)).mpr hstrict) have hx : N.coordinate_map (q, 0) ∈ N.central_sphere := by rw [N.central_sphere_eq] exact ⟨(q, 0), ⟨mem_univ _, rfl⟩, rfl⟩ obtain ⟨β, hβ0, hβ1, hβ, hβsphere, hβlen, _, _⟩ := exists_central_sphere_shortcut N hx N.center_on_central_sphere have hβN : MapsTo β (Icc (0 : ℝ) 1) N.carrier := fun t _ => N.central_sphere_subset (hβsphere (mem_univ t)) obtain ⟨γ, hγ0, hγ1, hγ, hγN, hγlen⟩ := exists_intrinsic_splice g hα hβ.contMDiffOn hαN hβN (hα1.trans hβ0.symm) refine ⟨γ, hγ0.trans hα0, hγ1.trans hβ1, hγ, hγN, ?_⟩ rw [hγlen] have hsum := ENNReal.add_lt_add hαlen hβlen convert hsum using 1 rw [← ENNReal.ofReal_add (by positivity) (by positivity)] congr 1 ring end PoincareMT.M28