import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Geometry.Action import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variational.Recovery.BackwardPath import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variational.Regularity /-! # Variations from smooth square-time families Every slice has integrable action by the actual ancient square-time potential and metric regularity. The center retains the original backward path globally. Adapted from Mapher `Proofs/M09/SmoothSquareVariation.lean:25-114`, commit `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`, using an arbitrary backward path and the retained ancient flow in place of an exponential-family service. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false noncomputable section open Set Filter Topology MeasureTheory open scoped Manifold ContDiff Bundle intervalIntegral namespace PoincareMT.AncientKappaSolution open ReducedLengthMinimum.Variational ReducedLengthMinimum.Variation.Geometry variable {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓑 2) ∞ M] [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] theorem regularizedLIntegrand_contDiffOn_of_smooth (K : AncientKappaSolution 2 M) (Ξ± : ℝ β†’ M) {U : Set ℝ} (hU : IsOpen U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 2) ∞ Ξ± U) : ContDiffOn ℝ ∞ (regularizedLIntegrand K.flow 0 Ξ±) U := by have hA : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 2).prod (𝓑 2)) ∞ (fun s ↦ Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin 2)) (Ξ± s) (curveVelocity (n := 2) Ξ± s)) U := contMDiffOn_mfderiv_const_apply hU Ξ± hΞ± 1 have ht : ContMDiffOn (π“˜(ℝ, ℝ)) (π“˜(ℝ, ℝ)) ∞ (fun s : ℝ ↦ 0 - s ^ 2) U := (contDiff_const.sub (contDiff_id.pow 2)).contMDiff.contMDiffOn have hmem : MapsTo (fun s : ℝ ↦ 0 - s ^ 2) U (Iic 0) := by intro s _ exact sub_nonpos.mpr (sq_nonneg s) have hg := (movingMetric_pair_contMDiffOn K.flow (fun s : ℝ ↦ 0 - s ^ 2) Ξ± (curveVelocity (n := 2) Ξ±) (curveVelocity (n := 2) Ξ±) ht hΞ± hA hA hmem).contDiffOn have hV := (K.regularizedPotential_contMDiff.comp_contMDiffOn (contMDiffOn_id.prodMk hΞ±)).contDiffOn exact hV.add (contDiffOn_const.mul hg) theorem regularizedLIntegrand_intervalIntegrable_of_smooth (K : AncientKappaSolution 2 M) (Ξ± : ℝ β†’ M) {U : Set ℝ} (hU : IsOpen U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 2) ∞ Ξ± U) {Ο„ : ℝ} (hI : Icc 0 (Real.sqrt Ο„) βŠ† U) : IntervalIntegrable (regularizedLIntegrand K.flow 0 Ξ±) volume 0 (Real.sqrt Ο„) := by have hcont : ContinuousOn (regularizedLIntegrand K.flow 0 Ξ±) (Icc 0 (Real.sqrt Ο„)) := (K.regularizedLIntegrand_contDiffOn_of_smooth Ξ± hU hΞ±).continuousOn.mono hI exact hcont.intervalIntegrable_of_Icc (Real.sqrt_nonneg Ο„) /-- A smooth square family supplies every frozen variation obligation. -/ theorem exists_lVariation_of_smoothSquareFamily (K : AncientKappaSolution 2 M) {Ο„ : ℝ} (p : BackwardTimePath K.flow 0 0 Ο„) (f : ℝ Γ— ℝ β†’ M) (U : Set (ℝ Γ— ℝ)) (hU : IsOpen U) (hf : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 2) ∞ f U) (ρ : ℝ) (hρ : 0 < ρ) (hI : Icc 0 (Real.sqrt Ο„) Γ—Λ’ Ioo (-ρ) ρ βŠ† U) (hcenter : βˆ€ s ∈ Icc 0 (Real.sqrt Ο„), f (s, 0) = p.curve (s ^ 2)) : βˆƒ V : LVariation K.flow 0 0 Ο„ p, V.radius = ρ ∧ (βˆ€ s u, V.squareFamily s u = f (s, u)) ∧ (βˆ€ u, EqOn (fun t ↦ V.family t u) (fun t ↦ f (Real.sqrt t, u)) (Icc 0 Ο„)) ∧ βˆ€ u, variationLLength V u = backwardLLength K.flow 0 0 Ο„ (fun t ↦ f (Real.sqrt t, u)) := by classical let family : ℝ β†’ ℝ β†’ M := fun t u ↦ if u = 0 then p.curve t else f (Real.sqrt t, u) have heq (u : ℝ) : EqOn (fun t ↦ family t u) (fun t ↦ f (Real.sqrt t, u)) (Icc 0 Ο„) := by intro t ht by_cases hu : u = 0 Β· subst u simp only [family, if_pos rfl] have hs : Real.sqrt t ∈ Icc 0 (Real.sqrt Ο„) := ⟨Real.sqrt_nonneg t, Real.sqrt_le_sqrt ht.2⟩ simpa only [Real.sq_sqrt ht.1] using (hcenter (Real.sqrt t) hs).symm Β· simp only [family, if_neg hu] let V : LVariation K.flow 0 0 Ο„ p := { family := family at_zero := fun t ↦ by simp only [family, if_pos rfl] radius := ρ radius_pos := hρ squareFamily := fun s u ↦ f (s, u) squareDomain := U square_open := hU square_contains := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hI square_smooth := hf square_agrees := by intro s hs u _ have hs0 : 0 ≀ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 have hsΟ„ : s ^ 2 ≀ Ο„ := by have h := mul_self_le_mul_self hs0 hs.2 simpa only [← pow_two, Real.sq_sqrt p.ordered.le] using h have h := heq u (show s ^ 2 ∈ Icc 0 Ο„ from ⟨sq_nonneg s, hsΟ„βŸ©) simpa only [Real.sqrt_sq hs0] using h.symm l_integrable := by intro u hu by_cases hu0 : u = 0 Β· subst u simpa only [family, if_pos rfl] using p.l_integrable Β· let D := (fun s : ℝ ↦ (s, u)) ⁻¹' U have hD : IsOpen D := hU.preimage (continuous_id.prodMk continuous_const) have hDI : Icc 0 (Real.sqrt Ο„) βŠ† D := fun s hs ↦ hI ⟨hs, hu⟩ have hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 2) ∞ (fun s ↦ f (s, u)) D := hf.comp (contMDiff_id.prodMk contMDiff_const).contMDiffOn (fun s hs ↦ hs) have hcont : ContinuousOn (fun s ↦ f (s, u)) (Icc (Real.sqrt 0) (Real.sqrt Ο„)) := by simpa only [Real.sqrt_zero] using hΞ±.continuousOn.mono hDI have hreg : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 2) 1 (fun s ↦ f (s, u)) (Ioo (Real.sqrt 0) (Real.sqrt Ο„)) := by simpa only [Real.sqrt_zero] using (hΞ±.of_le (by simp)).mono (Ioo_subset_Icc_self.trans hDI) have hint : IntervalIntegrable (regularizedLIntegrand K.flow 0 (fun s ↦ f (s, u))) volume (Real.sqrt 0) (Real.sqrt Ο„) := by simpa only [Real.sqrt_zero] using K.regularizedLIntegrand_intervalIntegrable_of_smooth (fun s ↦ f (s, u)) hD hΞ± hDI let Q := backwardPathOfSqrt K.flow 0 0 Ο„ p.nonnegative p.ordered p.terminal_mem p.time_mem (fun s ↦ f (s, u)) hcont hreg hint simpa only [Q, backwardPathOfSqrt, family, if_neg hu0] using Q.l_integrable } refine ⟨V, rfl, fun _ _ ↦ rfl, heq, ?_⟩ intro u change backwardLLength K.flow 0 0 Ο„ (fun t ↦ family t u) = _ unfold backwardLLength apply intervalIntegral.integral_congr_Ioo_of_le p.ordered.le intro t ht have hnear : (fun r ↦ family r u) =αΆ [𝓝 t] (fun r ↦ f (Real.sqrt r, u)) := by filter_upwards [isOpen_Ioo.mem_nhds ht] with r hr exact heq u (Ioo_subset_Icc_self hr) have hd := hnear.mfderiv_eq (I := π“˜(ℝ, ℝ)) (I' := 𝓑 2) have hvalue : family t u = f (Real.sqrt t, u) := heq u (Ioo_subset_Icc_self ht) simp only [backwardLIntegrand, curveVelocity, hd] rw [hvalue] /-- Fixing the initial square-time row gives an actual initial-fixed variation. -/ theorem exists_initialFixedLVariation_of_smoothSquareFamily (K : AncientKappaSolution 2 M) {Ο„ : ℝ} (p : BackwardTimePath K.flow 0 0 Ο„) (f : ℝ Γ— ℝ β†’ M) (U : Set (ℝ Γ— ℝ)) (hU : IsOpen U) (hf : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 2) ∞ f U) (ρ : ℝ) (hρ : 0 < ρ) (hI : Icc 0 (Real.sqrt Ο„) Γ—Λ’ Ioo (-ρ) ρ βŠ† U) (hcenter : βˆ€ s ∈ Icc 0 (Real.sqrt Ο„), f (s, 0) = p.curve (s ^ 2)) (hleft : βˆ€ u ∈ Ioo (-ρ) ρ, f (0, u) = f (0, 0)) : βˆƒ V : InitialFixedLVariation K.flow 0 0 Ο„ p, V.radius = ρ ∧ (βˆ€ s u, V.squareFamily s u = f (s, u)) ∧ (βˆ€ u, EqOn (fun t ↦ V.family t u) (fun t ↦ f (Real.sqrt t, u)) (Icc 0 Ο„)) ∧ βˆ€ u, variationLLength V.toLVariation u = backwardLLength K.flow 0 0 Ο„ (fun t ↦ f (Real.sqrt t, u)) := by obtain ⟨V, hVr, hVf, hVeq, hVa⟩ := K.exists_lVariation_of_smoothSquareFamily p f U hU hf ρ hρ hI hcenter have hfix : βˆ€ u ∈ Ioo (-V.radius) V.radius, V.family 0 u = p.curve 0 := by intro u hu have hu' : u ∈ Ioo (-ρ) ρ := by simpa only [hVr] using hu have h1 := hVeq u (show (0 : ℝ) ∈ Icc 0 Ο„ from ⟨le_rfl, p.ordered.le⟩) have h0 := hVeq 0 (show (0 : ℝ) ∈ Icc 0 Ο„ from ⟨le_rfl, p.ordered.le⟩) dsimp only at h1 h0 rw [Real.sqrt_zero, hleft u hu'] at h1 rw [Real.sqrt_zero, V.at_zero] at h0 exact h1.trans h0.symm exact ⟨{ toLVariation := V, fixed_left := hfix }, hVr, hVf, hVeq, hVa⟩ end PoincareMT.AncientKappaSolution