import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variational.Action /-! # Backward paths from square-root curves The transformed action proves integrability before the admissible path is constructed. The C1 hypothesis is only needed on the open interval. Adapted from Mapher `Proofs/M08/SqrtRecovery.lean` and `SquareEnergy.lean`, commit `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter Topology MeasureTheory open scoped Manifold ContDiff Bundle intervalIntegral universe u namespace PoincareMT.ReducedLengthMinimum.Variational variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] theorem sq_mem_backward_interior {a b s : ℝ} (_ha : 0 ≀ a) (hs : s ∈ Ioo (Real.sqrt a) (Real.sqrt b)) : 0 < s ∧ s ^ 2 ∈ Ioo a b := by have hpos : 0 < s := (Real.sqrt_nonneg a).trans_lt hs.1 exact ⟨hpos, Real.lt_sq_of_sqrt_lt hs.1, (Real.lt_sqrt hpos.le).mp hs.2⟩ theorem intervalIntegrable_of_square_transform {a b : ℝ} (ha : 0 ≀ a) (hab : a ≀ b) {g r : ℝ β†’ ℝ} (hr : IntervalIntegrable r volume (Real.sqrt a) (Real.sqrt b)) (heq : βˆ€ s ∈ Ioo (Real.sqrt a) (Real.sqrt b), r s = g (s ^ 2) * (2 * s)) : IntervalIntegrable g volume a b := by have hsqrt : Real.sqrt a ≀ Real.sqrt b := Real.sqrt_le_sqrt hab have hnonneg : βˆ€ s ∈ uIoo (Real.sqrt a) (Real.sqrt b), 0 ≀ 2 * s := by intro s hs rw [uIoo_of_le hsqrt] at hs exact mul_nonneg (by norm_num) ((Real.sqrt_nonneg a).trans hs.1.le) have hiff := intervalIntegral.integrable_comp_mul_deriv_iff_of_deriv_nonneg (f := fun s : ℝ => s ^ 2) (f' := fun s => 2 * s) (g := g) (continuous_id.pow 2).continuousOn (fun s _ => by simpa using hasDerivAt_pow 2 s) hnonneg have htrans : IntervalIntegrable (fun s => g (s ^ 2) * (2 * s)) volume (Real.sqrt a) (Real.sqrt b) := by apply hr.congr_uIoo intro s hs rw [uIoo_of_le hsqrt] at hs exact heq s hs simpa only [Real.sq_sqrt ha, Real.sq_sqrt (ha.trans hab)] using hiff.mp htrans theorem backwardLLength_eq_transformed {J : Set ℝ} {F : RicciFlow n M J} {T a b : ℝ} (p : BackwardTimePath F T a b) : backwardLLength F T a b p.curve = ∫ s in Real.sqrt a..Real.sqrt b, backwardLIntegrand F T p.curve (s ^ 2) * (2 * s) := by have hle := Real.sqrt_le_sqrt p.ordered.le have hsub := intervalIntegral.integral_comp_mul_deriv_of_deriv_nonneg (a := Real.sqrt a) (b := Real.sqrt b) (f := fun s : ℝ => s ^ 2) (f' := fun s => 2 * s) (g := backwardLIntegrand F T p.curve) (continuous_id.pow 2).continuousOn (fun s _ => by simpa using hasDerivAt_pow 2 s) (fun s hs => by rw [min_eq_left hle, max_eq_right hle] at hs exact mul_nonneg (by norm_num) ((Real.sqrt_nonneg a).trans hs.1.le)) simpa only [Real.sq_sqrt p.nonnegative, Real.sq_sqrt (p.nonnegative.trans p.ordered.le), Function.comp_def, backwardLLength] using hsub.symm omit [IsManifold (𝓑 n) ∞ M] in theorem sqrtPullback_regular {a b : ℝ} (ha : 0 ≀ a) (Ξ± : ℝ β†’ M) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) 1 Ξ± (Ioo (Real.sqrt a) (Real.sqrt b))) : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) 1 (fun Ο„ ↦ Ξ± (Real.sqrt Ο„)) (Ioo a b) := by have hsqrt : ContMDiffOn (π“˜(ℝ, ℝ)) (π“˜(ℝ, ℝ)) 1 Real.sqrt (Ioo a b) := by intro Ο„ hΟ„ exact (Real.contDiffAt_sqrt (ne_of_gt (ha.trans_lt hΟ„.1))).contMDiffAt.contMDiffWithinAt exact hΞ±.comp hsqrt (fun Ο„ hΟ„ ↦ ⟨Real.sqrt_lt_sqrt ha hΟ„.1, Real.sqrt_lt_sqrt (ha.trans hΟ„.1.le) hΟ„.2⟩) theorem regularizedLIntegrand_sqrtPullback {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) {a b : ℝ} (ha : 0 ≀ a) (Ξ± : ℝ β†’ M) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) 1 Ξ± (Ioo (Real.sqrt a) (Real.sqrt b))) {s : ℝ} (hs : s ∈ Ioo (Real.sqrt a) (Real.sqrt b)) : regularizedLIntegrand F T Ξ± s = backwardLIntegrand F T (fun Ο„ ↦ Ξ± (Real.sqrt Ο„)) (s ^ 2) * (2 * s) := by let Ξ΄ : ℝ β†’ M := fun Ο„ ↦ Ξ± (Real.sqrt Ο„) have hpos := (sq_mem_backward_interior ha hs).1 have hΟ„ := (sq_mem_backward_interior ha hs).2 have hΞ΄ := ((sqrtPullback_regular ha Ξ± hΞ±) (s ^ 2) hΟ„).contMDiffAt (isOpen_Ioo.mem_nhds hΟ„) have hnear : Ξ± =αΆ [𝓝 s] fun r ↦ Ξ΄ (r ^ 2) := by filter_upwards [Ioi_mem_nhds hpos] with r hr simp only [Ξ΄, Real.sqrt_sq hr.le] have hvel : curveVelocity (n := n) Ξ± s = (2 * s) β€’ curveVelocity (n := n) Ξ΄ (s ^ 2) := by have heq : curveVelocity (n := n) Ξ± s = curveVelocity (n := n) (fun r ↦ Ξ΄ (r ^ 2)) s := by unfold curveVelocity rw [hnear.mfderiv_eq] rfl exact heq.trans (curveVelocity_comp_sq (hΞ΄.mdifferentiableAt one_ne_zero)) change regularizedLIntegrand F T Ξ± s = backwardLIntegrand F T Ξ΄ (s ^ 2) * (2 * s) unfold regularizedLIntegrand backwardLIntegrand rw [Real.sqrt_sq hpos.le, hnear.eq_of_nhds] simp only [hvel, map_smul, smul_apply, smul_eq_mul] ring noncomputable def backwardPathOfSqrt {J : Set ℝ} (F : RicciFlow n M J) (T a b : ℝ) (ha : 0 ≀ a) (hab : a < b) (hT : T ∈ J) (htime : βˆ€ Ο„ ∈ Icc a b, T - Ο„ ∈ J) (Ξ± : ℝ β†’ M) (hcont : ContinuousOn Ξ± (Icc (Real.sqrt a) (Real.sqrt b))) (hreg : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) 1 Ξ± (Ioo (Real.sqrt a) (Real.sqrt b))) (hint : IntervalIntegrable (regularizedLIntegrand F T Ξ±) volume (Real.sqrt a) (Real.sqrt b)) : BackwardTimePath F T a b where curve := fun Ο„ ↦ Ξ± (Real.sqrt Ο„) nonnegative := ha ordered := hab terminal_mem := hT time_mem := htime continuous := hcont.comp Real.continuous_sqrt.continuousOn (fun _ hΟ„ ↦ ⟨Real.sqrt_le_sqrt hΟ„.1, Real.sqrt_le_sqrt hΟ„.2⟩) regular := sqrtPullback_regular ha Ξ± hreg l_integrable := intervalIntegrable_of_square_transform ha hab.le hint (fun _ hs ↦ regularizedLIntegrand_sqrtPullback F T ha Ξ± hreg hs) theorem backwardPathOfSqrt_action {J : Set ℝ} (F : RicciFlow n M J) (T a b : ℝ) (ha : 0 ≀ a) (hab : a < b) (hT : T ∈ J) (htime : βˆ€ Ο„ ∈ Icc a b, T - Ο„ ∈ J) (Ξ± : ℝ β†’ M) (hcont : ContinuousOn Ξ± (Icc (Real.sqrt a) (Real.sqrt b))) (hreg : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) 1 Ξ± (Ioo (Real.sqrt a) (Real.sqrt b))) (hint : IntervalIntegrable (regularizedLIntegrand F T Ξ±) volume (Real.sqrt a) (Real.sqrt b)) : backwardLLength F T a b (backwardPathOfSqrt F T a b ha hab hT htime Ξ± hcont hreg hint).curve = (∫ s in Real.sqrt a..Real.sqrt b, regularizedLIntegrand F T Ξ± s) := by rw [backwardLLength_eq_transformed] apply intervalIntegral.integral_congr_Ioo_of_le (Real.sqrt_le_sqrt hab.le) intro s hs exact (regularizedLIntegrand_sqrtPullback F T ha Ξ± hreg hs).symm end PoincareMT.ReducedLengthMinimum.Variational