import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.SquareVariationConstruction import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.VariationAcceleration import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.Endpoints /-! Adapted from Mapher `PoincareMT/Proofs/M08/SupportedChartVariation.lean` at `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false noncomputable section open Set Filter Topology open scoped Manifold ContDiff Bundle universe u namespace PoincareMT.LGeometry variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} {F : RicciFlow n M J} {T τ₁ Ο„β‚‚ : ℝ} {p : BackwardTimePath F T τ₁ Ο„β‚‚} def supportedChartShift (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) (z : ℝ Γ— ℝ) : EuclideanSpace ℝ (Fin n) := variationChart V x z + (z.2 * c) β€’ Ξ· z.1 def supportedChartDomain (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) : Set (ℝ Γ— ℝ) := (variationChartDomain V x ∩ supportedChartShift V x Ξ· c ⁻¹' (extChartAt (𝓑 n) x).target) βˆͺ (V.squareDomain ∩ Prod.fst ⁻¹' (tsupport Ξ·)ᢜ) def supportedChartFamily (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) (z : ℝ Γ— ℝ) : M := by classical exact if z.1 ∈ tsupport Ξ· then (extChartAt (𝓑 n) x).symm (supportedChartShift V x Ξ· c z) else V.squareFamily z.1 z.2 theorem supportedChartShift_contDiffOn (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (hΞ· : ContDiff ℝ ∞ Ξ·) (c : ℝ) : ContDiffOn ℝ ∞ (supportedChartShift V x Ξ· c) (variationChartDomain V x) := (variationChart_contDiffOn V x).add (((contDiff_snd.mul contDiff_const).smul (hΞ·.comp contDiff_fst)).contDiffOn) theorem supportedChartDomain_open (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (hΞ· : ContDiff ℝ ∞ Ξ·) (c : ℝ) : IsOpen (supportedChartDomain V x Ξ· c) := ((supportedChartShift_contDiffOn V x Ξ· hΞ· c).continuousOn.isOpen_inter_preimage (variationChartDomain_open V x) (isOpen_extChartAt_target (I := 𝓑 n) x)).union (V.square_open.inter ((isClosed_tsupport Ξ·).isOpen_compl.preimage continuous_fst)) theorem supportedChartFamily_eq_of_not_support (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) {z : ℝ Γ— ℝ} (hz : z.1 βˆ‰ tsupport Ξ·) : supportedChartFamily V x Ξ· c z = V.squareFamily z.1 z.2 := by simp only [supportedChartFamily, if_neg hz] theorem supportedChartFamily_eq_chart (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) {z : ℝ Γ— ℝ} (hz : V.squareFamily z.1 z.2 ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : supportedChartFamily V x Ξ· c z = (extChartAt (𝓑 n) x).symm (supportedChartShift V x Ξ· c z) := by classical by_cases hs : z.1 ∈ tsupport Ξ· Β· simp only [supportedChartFamily, if_pos hs] Β· rw [supportedChartFamily_eq_of_not_support V x Ξ· c hs] have hΞ·zero : Ξ· z.1 = 0 := image_eq_zero_of_notMem_tsupport hs simp only [supportedChartShift, hΞ·zero, smul_zero, add_zero, variationChart] exact ((extChartAt (𝓑 n) x).left_inv (by simpa only [extChartAt_source] using hz)).symm theorem supportedChartFamily_contMDiffOn (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (hΞ· : ContDiff ℝ ∞ Ξ·) (c : ℝ) : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (supportedChartFamily V x Ξ· c) (supportedChartDomain V x Ξ· c) := by let U := variationChartDomain V x ∩ supportedChartShift V x Ξ· c ⁻¹' (extChartAt (𝓑 n) x).target let W := V.squareDomain ∩ Prod.fst ⁻¹' (tsupport Ξ·)ᢜ have hU : IsOpen U := (supportedChartShift_contDiffOn V x Ξ· hΞ· c).continuousOn.isOpen_inter_preimage (variationChartDomain_open V x) (isOpen_extChartAt_target (I := 𝓑 n) x) have hW : IsOpen W := V.square_open.inter ((isClosed_tsupport Ξ·).isOpen_compl.preimage continuous_fst) have hshift : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (supportedChartShift V x Ξ· c) U := by have h := ((supportedChartShift_contDiffOn V x Ξ· hΞ· c).mono (show U βŠ† variationChartDomain V x from inter_subset_left)).contMDiffOn rw [modelWithCornersSelf_prod, ← chartedSpaceSelf_prod] at h exact h have hchart := (contMDiffOn_extChartAt_symm (I := 𝓑 n) (n := ∞) x).comp hshift (fun z hz ↦ hz.2) have hleft : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (supportedChartFamily V x Ξ· c) U := by apply hchart.congr intro z hz exact supportedChartFamily_eq_chart V x Ξ· c hz.1.2 have hright : ContMDiffOn ((π“˜(ℝ, ℝ)).prod (π“˜(ℝ, ℝ))) (𝓑 n) ∞ (supportedChartFamily V x Ξ· c) W := by apply (V.square_smooth.mono inter_subset_left).congr intro z hz exact supportedChartFamily_eq_of_not_support V x Ξ· c hz.2 exact hleft.union_of_isOpen hright hU hW theorem supportedChartDomain_zero (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) (hsrc : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, s ∈ tsupport Ξ· β†’ V.baseSquareCurve s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : sqrtParameterInterval τ₁ Ο„β‚‚ Γ—Λ’ {(0 : ℝ)} βŠ† supportedChartDomain V x Ξ· c := by rintro ⟨s, v⟩ ⟨hs, hv⟩ obtain rfl := mem_singleton_iff.mp hv have hdom : (s, (0 : ℝ)) ∈ V.squareDomain := V.square_contains ⟨hs, neg_neg_of_pos V.radius_pos, V.radius_pos⟩ by_cases hsupport : s ∈ tsupport Ξ· Β· left refine ⟨⟨hdom, hsrc s hs hsupport⟩, ?_⟩ simp only [mem_preimage, supportedChartShift, zero_mul, zero_smul, add_zero, variationChart] exact (extChartAt (𝓑 n) x).map_source (by simpa only [extChartAt_source, LVariation.baseSquareCurve] using hsrc s hs hsupport) Β· exact Or.inr ⟨hdom, hsupport⟩ theorem supportedChartFamily_at_zero (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) (hsrc : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, s ∈ tsupport Ξ· β†’ V.baseSquareCurve s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) {s : ℝ} (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : supportedChartFamily V x Ξ· c (s, 0) = V.baseSquareCurve s := by by_cases hsupport : s ∈ tsupport Ξ· Β· rw [supportedChartFamily_eq_chart V x Ξ· c (z := (s, 0)) (hsrc s hs hsupport)] simp only [supportedChartShift, zero_mul, zero_smul, add_zero, variationChart] exact (extChartAt (𝓑 n) x).left_inv (by simpa only [extChartAt_source, LVariation.baseSquareCurve] using hsrc s hs hsupport) Β· exact supportedChartFamily_eq_of_not_support V x Ξ· c hsupport theorem supportedChartFamily_eq_of_zero (V : LVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (c : ℝ) {z : ℝ Γ— ℝ} (hz : z ∈ supportedChartDomain V x Ξ· c) (hzero : Ξ· z.1 = 0) : supportedChartFamily V x Ξ· c z = V.squareFamily z.1 z.2 := by rcases hz with hz | hz Β· rw [supportedChartFamily_eq_chart V x Ξ· c hz.1.2] simp only [supportedChartShift, hzero, smul_zero, add_zero, variationChart] exact (extChartAt (𝓑 n) x).left_inv (by simpa only [extChartAt_source] using (show V.squareFamily z.1 z.2 ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source from hz.1.2)) Β· exact supportedChartFamily_eq_of_not_support V x Ξ· c hz.2 theorem exists_supportedChartVariation (hM04 : RicciFlowCurvatureTheory.{u}) (V : FixedEndpointLVariation F T τ₁ Ο„β‚‚ p) (x : M) (Ξ· : ℝ β†’ EuclideanSpace ℝ (Fin n)) (hΞ· : ContDiff ℝ ∞ Ξ·) (c : ℝ) (hsrc : βˆ€ s ∈ sqrtParameterInterval τ₁ Ο„β‚‚, s ∈ tsupport Ξ· β†’ V.toLVariation.baseSquareCurve s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) (hleft : Ξ· (Real.sqrt τ₁) = 0) (hright : Ξ· (Real.sqrt Ο„β‚‚) = 0) : βˆƒ W : FixedEndpointLVariation F T τ₁ Ο„β‚‚ p, W.radius ≀ V.radius ∧ (βˆ€ s v, W.squareFamily s v = supportedChartFamily V.toLVariation x Ξ· c (s, v)) ∧ EqOn W.toLVariation.baseSquareCurve V.toLVariation.baseSquareCurve (sqrtParameterInterval τ₁ Ο„β‚‚) := by let H := supportedChartFamily V.toLVariation x Ξ· c let Ξ© := supportedChartDomain V.toLVariation x Ξ· c have hΞ© := supportedChartDomain_open V.toLVariation x Ξ· hΞ· c have hH := supportedChartFamily_contMDiffOn V.toLVariation x Ξ· hΞ· c obtain ⟨r, hr, hrV, hCr⟩ := exists_squareTube_radius isCompact_Icc hΞ© (supportedChartDomain_zero V.toLVariation x Ξ· c hsrc) V.radius_pos have hzero (s : ℝ) (hs : s ∈ sqrtParameterInterval τ₁ Ο„β‚‚) : H (s, 0) = p.curve (s ^ 2) := (supportedChartFamily_at_zero V.toLVariation x Ξ· c hsrc hs).trans ((V.square_agrees s hs 0 ⟨neg_neg_of_pos V.radius_pos, V.radius_pos⟩).trans (V.at_zero (s ^ 2))) have hparameter (v : ℝ) (hv : v ∈ Ioo (-r) r) : v ∈ V.toLVariation.parameterDomain := ⟨(neg_le_neg hrV).trans_lt hv.1, hv.2.trans_le hrV⟩ have hL (v : ℝ) (hv : v ∈ Ioo (-r) r) : H (Real.sqrt τ₁, v) = p.curve τ₁ := by rw [show H (Real.sqrt τ₁, v) = V.squareFamily (Real.sqrt τ₁) v from supportedChartFamily_eq_of_zero V.toLVariation x Ξ· c (hCr ⟨⟨le_rfl, Real.sqrt_le_sqrt p.ordered.le⟩, hv⟩) hleft] exact squareFamily_left_eq V.toInitialFixedLVariation (hparameter v hv) have hR (v : ℝ) (hv : v ∈ Ioo (-r) r) : H (Real.sqrt Ο„β‚‚, v) = p.curve Ο„β‚‚ := by rw [show H (Real.sqrt Ο„β‚‚, v) = V.squareFamily (Real.sqrt Ο„β‚‚) v from supportedChartFamily_eq_of_zero V.toLVariation x Ξ· c (hCr ⟨⟨Real.sqrt_le_sqrt p.ordered.le, le_rfl⟩, hv⟩) hright] exact squareFamily_right_eq V (hparameter v hv) let W := fixedVariationOfSquare hM04 p H Ξ© hΞ© r hr hCr hH hzero hL hR exact ⟨W, hrV, fun _ _ ↦ rfl, fun s hs ↦ supportedChartFamily_at_zero V.toLVariation x Ξ· c hsrc hs⟩ end PoincareMT.LGeometry