import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.ODE.SquareChartFlow import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.ChartCurveEquation import Mathlib.Analysis.Calculus.Deriv.Prod /-! # Constructed local families with initial square-root velocity 2Z The actual chart equation is solved on a common neighborhood of an initial tangent vector. Its inverse-chart image supplies the curve, velocity extension and regularized Euler equation on one signed time interval. -/ set_option autoImplicit false set_option maxSynthPendingDepth 3 set_option maxHeartbeats 800000 open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.ReducedLength variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] local notation "E" => EuclideanSpace ℝ (Fin n) structure LocalRegularizedInitialFamily {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (p : M) (Z0 : TangentSpace (𝓑 n) p) where radius : ℝ radius_pos : 0 < radius neighborhood : Set (TangentSpace (𝓑 n) p) neighborhood_open : IsOpen neighborhood center_mem : Z0 ∈ neighborhood curve : TangentSpace (𝓑 n) p β†’ ℝ β†’ M curve_smooth : letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (fun z ↦ curve z.1 z.2) (neighborhood Γ—Λ’ Set.Ioo (-radius) radius) curve_start : βˆ€ Z ∈ neighborhood, curve Z 0 = p initial_derivative : βˆ€ Z (hZ : Z ∈ neighborhood), (curve_start Z hZ) β–Έ curveVelocity (n := n) (curve Z) 0 = (2 : ℝ) β€’ Z time_mem : βˆ€ s ∈ Set.Ioo (-radius) radius, T - s ^ 2 ∈ J velocity_extension : βˆ€ Z ∈ neighborhood, ParametricAlongCurveExtensionOn (n := n) (Set.Ioo (-radius) radius) (curve Z) (curveVelocityWithin (n := n) (curve Z) (Set.Ioo (-radius) radius)) equation : βˆ€ Z (hZ : Z ∈ neighborhood), βˆ€ s ∈ Set.Ioo (-radius) radius, regularizedLGeodesicEquation F T (curve Z) (Set.Ioo (-radius) radius) (velocity_extension Z hZ) s set_option backward.isDefEq.respectTransparency false in theorem nonempty_localRegularizedInitialFamily {J : Set ℝ} (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T βŠ† J) (p : M) (Z0 : TangentSpace (𝓑 n) p) : Nonempty (LocalRegularizedInitialFamily F T p Z0) := by letI : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨(F.metric T).toRiemannianMetric⟩ let e := chartAt E p let L : TangentSpace (𝓑 n) p β†’L[ℝ] E := mfderiv (𝓑 n) (𝓑 n) e p let q : TangentSpace (𝓑 n) p β†’ E Γ— E := fun Z ↦ (e p, (2 : ℝ) β€’ L Z) have hq : ContDiff ℝ ∞ q := contDiff_const.prodMk (L.contDiff.const_smul (2 : ℝ)) obtain ⟨beta, W, d, hW, hq0, _, hd, hbeta, hbeta0, hbetaODE⟩ := exists_squareChart_initial_flow F hM04 T b hb hwindow p (e p) ((2 : ℝ) β€’ L Z0) (e.map_source (mem_chart_source E p)) let N : Set (TangentSpace (𝓑 n) p) := q ⁻¹' W let I : Set ℝ := Set.Ioo (-d) d let a : TangentSpace (𝓑 n) p β†’ ℝ β†’ E := fun Z s ↦ (beta (q Z, s)).1 let v : TangentSpace (𝓑 n) p β†’ ℝ β†’ E := fun Z s ↦ (beta (q Z, s)).2 let c : TangentSpace (𝓑 n) p β†’ ℝ β†’ M := fun Z s ↦ e.symm (a Z s) have hN : IsOpen N := hW.preimage hq.continuous have hZ0 : Z0 ∈ N := hq0 have hI : IsOpen I := isOpen_Ioo have h0 : (0 : ℝ) ∈ I := ⟨neg_lt_zero.mpr hd, hd⟩ have hmap : ContDiff ℝ ∞ (fun z : TangentSpace (𝓑 n) p Γ— ℝ ↦ (q z.1, z.2)) := (hq.comp contDiff_fst).prodMk contDiff_snd have hbmap : ContDiffOn ℝ ∞ (fun z : TangentSpace (𝓑 n) p Γ— ℝ ↦ beta (q z.1, z.2)) (N Γ—Λ’ I) := hbeta.comp hmap.contDiffOn (fun z hz ↦ ⟨hz.1, hz.2⟩) have hy : βˆ€ Z ∈ N, βˆ€ s ∈ I, a Z s ∈ e.target := fun Z hZ s hs ↦ (hbetaODE (q Z) hZ s hs).2.1 have htime : I βŠ† Set.Ioo (-Real.sqrt b) (Real.sqrt b) := fun s hs ↦ (hbetaODE (q Z0) hZ0 s hs).1 have ha : βˆ€ Z ∈ N, βˆ€ s ∈ I, HasDerivAt (a Z) (v Z s) s := by intro Z hZ s hs exact (ContinuousLinearMap.fst ℝ E E).hasFDerivAt.comp_hasDerivAt s (hbetaODE (q Z) hZ s hs).2.2 have hdv : βˆ€ Z ∈ N, βˆ€ s ∈ I, HasDerivAt (v Z) (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p) (s, (a Z s, v Z s))).2 s := by intro Z hZ s hs exact (ContinuousLinearMap.snd ℝ E E).hasFDerivAt.comp_hasDerivAt s (hbetaODE (q Z) hZ s hs).2.2 have hv : βˆ€ Z ∈ N, ContDiffOn ℝ ∞ (v Z) I := by intro Z hZ exact contDiff_snd.contDiffOn.comp (hbeta.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun s hs ↦ ⟨hZ, hs⟩)) (fun _ _ ↦ Set.mem_univ _) have hc : ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (fun z ↦ c z.1 z.2) (N Γ—Λ’ I) := by have haSmooth : ContDiffOn ℝ ∞ (fun z : TangentSpace (𝓑 n) p Γ— ℝ ↦ a z.1 z.2) (N Γ—Λ’ I) := contDiff_fst.contDiffOn.comp hbmap (fun _ _ ↦ Set.mem_univ _) have haM : ContMDiffOn ((π“˜(ℝ, TangentSpace (𝓑 n) p)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (fun z ↦ a z.1 z.2) (N Γ—Λ’ I) := by convert! haSmooth.contMDiffOn using 1 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] exact contMDiffOn_chart_symm.comp haM (fun z hz ↦ hy z.1 hz.1 z.2 hz.2) have hstart : βˆ€ Z ∈ N, c Z 0 = p := by intro Z hZ change e.symm (beta (q Z, 0)).1 = p rw [hbeta0 (q Z) hZ] exact e.left_inv (mem_chart_source E p) have hinitial : βˆ€ Z (hZ : Z ∈ N), (hstart Z hZ) β–Έ curveVelocity (n := n) (c Z) 0 = (2 : ℝ) β€’ Z := by intro Z hZ have hvel := curveVelocityWithin_inverseChart p (a Z) I 0 (v Z 0) (hI.uniqueDiffOn 0 h0) (ha Z hZ 0 h0) (hy Z hZ 0 h0) have htotal : curveVelocityWithin (n := n) (c Z) I 0 = curveVelocity (n := n) (c Z) 0 := by unfold curveVelocityWithin curveVelocity rw [mfderivWithin_of_isOpen hI h0] rw [htotal] at hvel have hz : a Z 0 = e p := congrArg Prod.fst (hbeta0 (q Z) hZ) have hvz : v Z 0 = (2 : ℝ) β€’ L Z := congrArg Prod.snd (hbeta0 (q Z) hZ) have hinv := congrArg (fun A : TangentSpace (𝓑 n) p β†’L[ℝ] TangentSpace (𝓑 n) p ↦ A Z) ((mdifferentiable_chart (I := 𝓑 n) p).symm_comp_deriv (mem_chart_source E p)) have hcast (x y : M) (h : x = y) (w : TangentSpace (𝓑 n) x) : (h β–Έ w : TangentSpace (𝓑 n) y) = (show TangentSpace (𝓑 n) y from w) := by cases h rfl rw [hcast _ _ (hstart Z hZ) (curveVelocity (n := n) (c Z) 0)] change curveVelocity (n := n) (c Z) 0 = (2 : ℝ) β€’ Z calc _ = mfderiv (𝓑 n) (𝓑 n) e.symm (a Z 0) (v Z 0) := hvel _ = mfderiv (𝓑 n) (𝓑 n) e.symm (e p) ((2 : ℝ) β€’ L Z) := by rw [hz, hvz] _ = (2 : ℝ) β€’ Z := by rw [map_smul]; exact congrArg ((2 : ℝ) β€’ Β·) hinv let ext := fun Z (hZ : Z ∈ N) ↦ chartCurveVelocityExtension p (a Z) (v Z) I I hI (Set.Subset.refl I) hI.uniqueDiffOn (hv Z hZ) (ha Z hZ) (hy Z hZ) refine ⟨{ radius := d radius_pos := hd neighborhood := N neighborhood_open := hN center_mem := hZ0 curve := c curve_smooth := hc curve_start := hstart initial_derivative := hinitial time_mem := fun s hs ↦ hwindow (squareTime_mem_window T hb (htime hs)) velocity_extension := ext equation := ?_ }⟩ intro Z hZ s hs exact chartCurve_regularized_equation F hM04 T b hb hwindow p (a Z) (v Z) I I hI (Set.Subset.refl I) hI.uniqueDiffOn (hv Z hZ) (ha Z hZ) (hy Z hZ) htime (hdv Z hZ) s hs end PoincareMT.ReducedLength