import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Exponential.InteriorEndpointFamily import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Initial.InitialVectorVariation /-! # Interior endpoint families along an initial-vector line The endpoint family preserves both outer endpoints and recovers the original square-time curve on its actual parameter diagonal. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 set_option maxHeartbeats 800000 open scoped Manifold ContDiff Bundle Topology open Filter universe u namespace PoincareMT.ReducedLength variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} {F : RicciFlow n M J} {T Ο„max : ℝ} {p : M} local notation "Q" => EuclideanSpace ℝ (Fin n) noncomputable def lineInteriorCoordinate (A : LExponentialFamily F T Ο„max p) (Z W : TangentSpace (𝓑 n) p) (c : ℝ) (r : ℝ) : Q := chartAt Q (A.squareFamily Z (Real.sqrt c)) (A.squareFamily (Z + r β€’ W) (Real.sqrt c)) structure LineInteriorFamily (A : LExponentialFamily F T Ο„max p) (Z W : TangentSpace (𝓑 n) p) (c b : ℝ) where family : (ℝ Γ— Q) Γ— ℝ β†’ M domain : Set ((ℝ Γ— Q) Γ— ℝ) parameters : Set (ℝ Γ— Q) domain_open : IsOpen domain parameters_open : IsOpen parameters center_mem : (0, lineInteriorCoordinate A Z W c 0) ∈ parameters segment_mem : parameters Γ—Λ’ Set.Icc 0 (Real.sqrt b) βŠ† domain smooth : ContMDiffOn (π“˜(ℝ, (ℝ Γ— Q) Γ— ℝ)) (𝓑 n) ∞ family domain target_mem : βˆ€ z ∈ parameters, z.2 ∈ (chartAt Q (A.squareFamily Z (Real.sqrt c))).target left : βˆ€ r y, family ((r, y), 0) = p right : βˆ€ r y, family ((r, y), Real.sqrt b) = A.squareFamily (Z + r β€’ W) (Real.sqrt b) marked : βˆ€ r y, family ((r, y), Real.sqrt c) = (chartAt Q (A.squareFamily Z (Real.sqrt c))).symm y recovery : βˆ€ z ∈ parameters, βˆ€ s ∈ Set.Icc 0 (Real.sqrt b), family ((z.1, lineInteriorCoordinate A Z W c z.1), s) = A.squareFamily (Z + z.1 β€’ W) s coordinate_smooth : ContDiffAt ℝ ∞ (lineInteriorCoordinate A Z W c) 0 diagonal_mem : βˆ€αΆ  r in 𝓝 (0 : ℝ), (r, lineInteriorCoordinate A Z W c r) ∈ parameters set_option backward.isDefEq.respectTransparency false in theorem exists_lineInteriorFamily (A : LExponentialFamily F T Ο„max p) (Z W : TangentSpace (𝓑 n) p) (c b : ℝ) (hc : 0 < c) (hcb : c < b) (hmax : b < Ο„max) : Nonempty (LineInteriorFamily A Z W c b) := by let V := (initialVectorVariation A Z W b (hc.trans hcb) hmax).toLVariation let H : ℝ Γ— ℝ β†’ M := fun z ↦ A.squareFamily (Z + z.1 β€’ W) z.2 let U := Prod.swap ⁻¹' V.squareDomain have hU : IsOpen U := V.square_open.preimage continuous_swap have hV : ContMDiffOn (π“˜(ℝ, ℝ Γ— ℝ)) (𝓑 n) ∞ (fun z : ℝ Γ— ℝ ↦ V.squareFamily z.1 z.2) V.squareDomain := by convert! V.square_smooth using 1 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] have hH : ContMDiffOn (π“˜(ℝ, ℝ Γ— ℝ)) (𝓑 n) ∞ H U := hV.comp (contDiff_snd.prodMk contDiff_fst).contMDiff.contMDiffOn (fun _ hz ↦ hz) have hsegment (s : ℝ) (hs : s ∈ Set.Icc 0 (Real.sqrt b)) : (0, s) ∈ U := by change (s, (0 : ℝ)) ∈ V.squareDomain apply V.square_contains exact ⟨by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs, neg_lt_zero.mpr V.radius_pos, V.radius_pos⟩ have hH0 : H (0, Real.sqrt c) = A.squareFamily Z (Real.sqrt c) := by simp only [H, zero_smul, add_zero] obtain ⟨Φ, Ξ©, N, hΞ©, hN, h0N, hNΞ©, hΞ¦, hinfo, hleft, hright, hmarked, hrecovery⟩ := exists_smooth_interior_endpoint_family H U hU hH 0 (Real.sqrt b) (Real.sqrt c) ⟨Real.sqrt_pos.mpr hc, Real.sqrt_lt_sqrt hc.le hcb⟩ hsegment let e := chartAt Q (A.squareFamily Z (Real.sqrt c)) let a := lineInteriorCoordinate A Z W c have ha : ContDiffAt ℝ ∞ a 0 := by have hmem := hsegment (Real.sqrt c) ⟨Real.sqrt_nonneg c, Real.sqrt_le_sqrt hcb.le⟩ have hslice : ContMDiffAt (π“˜(ℝ, ℝ)) (𝓑 n) ∞ (fun r ↦ H (r, Real.sqrt c)) 0 := (hH.contMDiffAt (hU.mem_nhds hmem)).comp 0 (contDiff_id.prodMk contDiff_const).contMDiff.contMDiffAt have hsource : H (0, Real.sqrt c) ∈ e.source := by rw [hH0] exact mem_chart_source Q _ have hchart : ContMDiffAt (𝓑 n) (𝓑 n) ∞ e (H (0, Real.sqrt c)) := contMDiffOn_chart.contMDiffAt (e.open_source.mem_nhds hsource) exact (hchart.comp 0 hslice).contDiffAt have hcenter : (0, a 0) ∈ N := by simpa only [hH0, a, lineInteriorCoordinate, zero_smul, add_zero] using h0N have hdiag : βˆ€αΆ  r in 𝓝 (0 : ℝ), (r, a r) ∈ N := (continuousAt_id.prodMk ha.continuousAt).preimage_mem_nhds (hN.mem_nhds hcenter) refine ⟨{ family := Ξ¦ domain := Ξ© parameters := N domain_open := hΞ© parameters_open := hN center_mem := hcenter segment_mem := hNΞ© smooth := hΞ¦ target_mem := ?_ left := ?_ right := hright marked := ?_ recovery := ?_ coordinate_smooth := ha diagonal_mem := hdiag }⟩ Β· intro z hz simpa only [hH0] using (hinfo z hz).1 Β· intro r y exact (hleft r y).trans (A.square_at_zero (Z + r β€’ W)) Β· intro r y simpa only [hH0] using hmarked r y Β· intro z hz s hs simpa only [hH0, H, lineInteriorCoordinate] using hrecovery z hz s hs end PoincareMT.ReducedLength