import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Construction.SquareFamily import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Geometry.CompactFieldVariation /-! # Initial-fixed variations realizing smooth fields The compact chart construction realizes the prescribed field, and the actual ancient square-time action supplies integrability of every variation slice. Adapted from Mapher `Proofs/M09/RealizedSquareVariation.lean:29-76`, commit `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false noncomputable section open Set Filter Topology open scoped Manifold ContDiff Bundle namespace PoincareMT.ReducedLengthMinimum.Variation.Construction variable {n : β„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] private theorem alongCurve_const_smul_contMDiffOn (Ξ± : ℝ β†’ M) (Y : βˆ€ s, TangentSpace (𝓑 n) (Ξ± s)) {U : Set ℝ} (hU : IsOpen U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 n) ∞ Ξ± U) (hY : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ (⟨α s, Y s⟩ : TangentBundle (𝓑 n) M)) U) (z : ℝ) : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 n).prod (𝓑 n)) ∞ (fun s ↦ (⟨α s, z β€’ Y s⟩ : TangentBundle (𝓑 n) M)) U := by intro s hs let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n)) (Ξ± s) have hΞ±s := (hΞ± s hs).contMDiffAt (hU.mem_nhds hs) have hYs := (hY s hs).contMDiffAt (hU.mem_nhds hs) apply ContMDiffAt.contMDiffWithinAt apply Bundle.contMDiffAt_totalSpace.mpr refine ⟨hΞ±s, ?_⟩ have hcoord := (Bundle.contMDiffAt_totalSpace.mp hYs).2 have hconst : ContMDiffAt (π“˜(ℝ, ℝ)) (π“˜(ℝ, ℝ)) ∞ (fun _ : ℝ ↦ z) s := contMDiffAt_const apply (hconst.smul hcoord).congr_of_eventuallyEq have hnear : βˆ€αΆ  r in 𝓝 s, Ξ± r ∈ e.baseSet := hΞ±s.continuousAt (e.open_baseSet.mem_nhds (mem_baseSet_trivializationAt _ _ _)) filter_upwards [hnear] with r hr change (e ⟨α r, z β€’ Y r⟩).2 = z β€’ (e ⟨α r, Y r⟩).2 simp only [← e.continuousLinearMapAt_apply_of_mem ℝ hr, map_smul] end PoincareMT.ReducedLengthMinimum.Variation.Construction namespace PoincareMT.AncientKappaSolution open ReducedLengthMinimum.Variation.Geometry ReducedLengthMinimum.Variation.Construction 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] /-- Every smooth field vanishing at the initial point is realized by an actual variation. -/ theorem exists_initialFixedLVariation_of_smooth_field (K : AncientKappaSolution 2 M) {Ο„ : ℝ} (p : BackwardTimePath K.flow 0 0 Ο„) (Ξ± : ℝ β†’ M) (Y : βˆ€ s, TangentSpace (𝓑 2) (Ξ± s)) (U : Set ℝ) (hU : IsOpen U) (hIU : Icc 0 (Real.sqrt Ο„) βŠ† U) (hΞ± : ContMDiffOn (π“˜(ℝ, ℝ)) (𝓑 2) ∞ Ξ± U) (hY : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 2).prod (𝓑 2)) ∞ (fun s ↦ (⟨α s, Y s⟩ : TangentBundle (𝓑 2) M)) U) (hagrees : βˆ€ s ∈ Icc 0 (Real.sqrt Ο„), Ξ± s = p.curve (s ^ 2)) (hY0 : Y 0 = 0) : βˆƒ V : InitialFixedLVariation K.flow 0 0 Ο„ p, V.toLVariation.baseSquareCurve = Ξ± ∧ βˆ€ s ∈ Icc 0 (Real.sqrt Ο„), (squareVariationField V.toLVariation s : EuclideanSpace ℝ (Fin 2)) = Y s := by let Ylin : βˆ€ s, ℝ β†’L[ℝ] TangentSpace (𝓑 2) (Ξ± s) := fun s ↦ ContinuousLinearMap.toSpanSingleton ℝ (Y s) have hYlin (z : ℝ) : ContMDiffOn (π“˜(ℝ, ℝ)) ((𝓑 2).prod (𝓑 2)) ∞ (fun s ↦ (⟨α s, Ylin s z⟩ : TangentBundle (𝓑 2) M)) U := alongCurve_const_smul_contMDiffOn Ξ± Y hU hΞ± hY z obtain ⟨f, Ξ©, N, hΞ©, hN, h0N, hIN, hf, hcenter, hfixed, hvelocity⟩ := exists_smooth_family_of_compact_linear_field Ξ± Ylin U (Icc 0 (Real.sqrt Ο„)) hU isCompact_Icc hIU hΞ± hYlin obtain ⟨ρ, hρ, hρN⟩ := Metric.mem_nhds_iff.mp (hN.mem_nhds h0N) have hparam : Ioo (-ρ) ρ βŠ† N := by intro z hz apply hρN simpa only [Real.ball_eq_Ioo, zero_sub, zero_add] using hz have hrectangle : Icc 0 (Real.sqrt Ο„) Γ—Λ’ Ioo (-ρ) ρ βŠ† Ξ© := fun z hz ↦ hIN ⟨hz.1, hparam hz.2⟩ have hf' : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 2) ∞ f Ξ© := by convert! hf using 1 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] have hYlin0 : Ylin 0 = 0 := by ext z simp [Ylin, hY0] obtain ⟨V, _, hVf, _, _⟩ := K.exists_initialFixedLVariation_of_smoothSquareFamily p f Ξ© hΞ© hf' ρ hρ hrectangle (fun s hs ↦ (hcenter s).trans (hagrees s hs)) (fun z _ ↦ (hfixed 0 hYlin0 z).trans (hcenter 0).symm) refine ⟨V, funext (fun s ↦ (hVf s 0).trans (hcenter s)), ?_⟩ intro s hs have hfield : (squareVariationField V.toLVariation s : EuclideanSpace ℝ (Fin 2)) = curveVelocity (n := 2) (fun z ↦ f (s, z)) 0 := congrArg (fun Ξ³ : ℝ β†’ M ↦ (curveVelocity Ξ³ 0 : EuclideanSpace ℝ (Fin 2))) (funext (hVf s)) rw [hfield] have hc : (fun u : ℝ ↦ f (s, u β€’ (1 : ℝ))) = (fun u ↦ f (s, u)) := by funext u simp only [smul_eq_mul, mul_one] have hv := hvelocity s hs (1 : ℝ) rw [hc] at hv simpa only [Ylin, ContinuousLinearMap.toSpanSingleton_apply_one] using hv end PoincareMT.AncientKappaSolution