import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Coordinates.GeneralizedCompactMetricComparisonCoordinates import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Coordinates.FiniteCoordinateOperatorBounds import PoincareLib.Geometry.Riemannian.Coordinates.CompactEnergy /-! # Arbitrarily sharp generalized compact metric comparison Frozen order-zero convergence gives a comparison with any prescribed positive error on a compact set at any included time. The result keeps the literal exhaustion stage, time proof, and generalized pullback metric. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Bundle Topology universe u namespace PoincareMT.M47 attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace normedSpaceTangentSpaceVectorSpace variable {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} (C : GeneralizedBlowupConvergence S J) private local instance : TopologicalSpace C.limit.carrier.carrier := C.limit.carrier.topologicalSpace private local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.limit.carrier.carrier := C.limit.carrier.chartedSpace private local instance : IsManifold (𝓑 3) ∞ C.limit.carrier.carrier := C.limit.carrier.isManifold private theorem eventually_chart_pullback_inner_comparison (q : C.limit.sliceCarrier.carrier) {H : Set (EuclideanSpace ℝ (Fin 3))} (hH : IsCompact H) (hHt : H βŠ† (extChartAt (𝓑 3) q).target) (t : ℝ) (ht : t ∈ J) {delta : ℝ} (hdelta : 0 < delta) (_hdelta_lt : delta < 1) : βˆ€αΆ  k : β„• in atTop, (extChartAt (𝓑 3) q).symm '' H βŠ† C.exhaustion.space k ∧ t ∈ Icc (-C.exhaustion.time k) 0 ∧ βˆ€ y ∈ H, βˆ€ v : EuclideanSpace ℝ (Fin 3), βˆ€ htk : t ∈ Icc (-C.exhaustion.time k) 0, (1 - delta) * (C.limit.flow.metric t).inner ((extChartAt (𝓑 3) q).symm y) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ≀ (C.embedding k).pullbackInner t htk ((extChartAt (𝓑 3) q).symm y) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ∧ (C.embedding k).pullbackInner t htk ((extChartAt (𝓑 3) q).symm y) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ≀ (1 + delta) * (C.limit.flow.metric t).inner ((extChartAt (𝓑 3) q).symm y) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) ((mfderiv (𝓑 3) (𝓑 3) (extChartAt (𝓑 3) q).symm y) v) := by let E := EuclideanSpace ℝ (Fin 3) let c := extChartAt (𝓑 3) q let g := C.limit.flow.metric t let B : E β†’ E β†’L[ℝ] E β†’L[ℝ] ℝ := g.pullbackCoefficients c.symm have hpos (y : E) (hy : y ∈ H) (v : E) (hv : v β‰  0) : 0 < B y v v := by have hi : (mfderiv (𝓑 3) (𝓑 3) c.symm y).IsInvertible := by simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using isInvertible_mfderivWithin_extChartAt_symm (hHt hy) apply g.pos intro hz apply hv apply hi.injective rw [map_zero] convert! hz using 1 obtain ⟨a, ha, hlow⟩ := exists_uniform_bilinear_lower_bound hH ((g.contDiffOn_chartCoefficients q).continuousOn.mono hHt) hpos have hcompact : IsCompact (c.symm '' H) := hH.image_of_continuousOn ((continuousOn_extChartAt_symm q).mono hHt) obtain ⟨j, hj⟩ := C.exists_exhaustion_superset hcompact have hdom : ({t} Γ—Λ’ H) βŠ† {p | p ∈ blowupMetricChartDomain C.limit q ∧ c.symm p.2 ∈ C.exhaustion.space j} := by rintro ⟨s, y⟩ ⟨hs, hy⟩ rcases mem_singleton_iff.mp hs with rfl exact ⟨⟨ht, hHt hy⟩, hj ⟨y, hy, rfl⟩⟩ let eps := a * delta / 18 have heps : 0 < eps := by positivity obtain ⟨N, hjN, hN⟩ := C.pullback_metric_CInfinity q j 0 ({t} Γ—Λ’ H) (isCompact_singleton.prod hH) hdom eps heps have htimeSub := C.exhaustion.time_cofinal {t} isCompact_singleton (singleton_subset_iff.mpr ht) have htime : βˆ€αΆ  k : β„• in atTop, t ∈ Icc (-C.exhaustion.time k) 0 := htimeSub.mono (fun k hk => hk (by simp)) filter_upwards [eventually_ge_atTop N, htime] with k hk htk refine ⟨hj.trans (C.exhaustion.space_increasing (hjN.trans hk)), htk, ?_⟩ intro y hy v htk' let A := mfderiv (𝓑 3) (𝓑 3) c.symm y let f := (C.embedding k).forward t htk' let : NormedAddCommGroup (TangentSpace (𝓑 3) (f (c.symm y))) := by unfold TangentSpace infer_instance let : NormedSpace ℝ (TangentSpace (𝓑 3) (f (c.symm y))) := by unfold TangentSpace infer_instance let D : E β†’L[ℝ] TangentSpace (𝓑 3) (f (c.symm y)) := (mfderiv (𝓑 3) (𝓑 3) f (c.symm y)).comp A let Bk : E β†’L[ℝ] E β†’L[ℝ] ℝ := S.scale (C.subsequence k) β€’ (((S.flow (C.subsequence k)).metric ((S.base (C.subsequence k)).1 + t / S.scale (C.subsequence k))).inner (f (c.symm y))).bilinearComp D D have hentry (i l : Fin 3) : β€–(Bk - B y) (PiLp.single 2 i 1) (PiLp.single 2 l 1)β€– ≀ eps := by have he := (hN k hk).2 i l (t, y) ⟨rfl, hy⟩ have he' : |blowupPullbackCoefficient (C.embedding k) q i l (t, y) - C.limit.carrier.coordinateCoefficient q (fun s x u w => (C.limit.flow.metric s).inner x u w) i l (t, y)| < eps := by simpa only [← dist_eq_norm, dist_iteratedFDerivWithin_zero, Real.dist_eq] using he change |(C.embedding k).pullbackInner t htk' (c.symm y) (A (PiLp.single 2 i 1)) (A (PiLp.single 2 l 1)) - g.inner (c.symm y) (A (PiLp.single 2 i 1)) (A (PiLp.single 2 l 1))| ≀ eps simpa only [blowupPullbackCoefficient, dif_pos htk', FlowCarrier.coordinateCoefficient, EuclideanSpace.basisFun_apply] using he'.le have hnorm : β€–Bk - B yβ€– ≀ a * delta / 2 := by have hb := (Bk - B y).opNorm_le_card_mul_of_coordinates (fun i => ((Bk - B y) (PiLp.single 2 i 1)).opNorm_le_card_mul_of_coordinates (hentry i)) norm_num only [Fintype.card_fin] at hb convert hb using 1 ring have herr : |Bk v v - B y v v| ≀ (a * delta / 2) * β€–vβ€– ^ 2 := by calc _ ≀ β€–Bk - B yβ€– * β€–vβ€– * β€–vβ€– := by simpa only [sub_apply, Real.norm_eq_abs] using (Bk - B y).le_opNormβ‚‚ v v _ ≀ (a * delta / 2) * β€–vβ€– * β€–vβ€– := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hnorm (norm_nonneg v)) (norm_nonneg v) _ = (a * delta / 2) * β€–vβ€– ^ 2 := by ring change (1 - delta) * B y v v ≀ Bk v v ∧ Bk v v ≀ (1 + delta) * B y v v have hvlow : a * β€–vβ€– ^ 2 ≀ B y v v := hlow y hy v have hBnonneg : 0 ≀ B y v v := (mul_nonneg ha.le (sq_nonneg β€–vβ€–)).trans hvlow constructor Β· nlinarith [(abs_le.mp herr).1, (abs_le.mp herr).2] Β· nlinarith [(abs_le.mp herr).1, (abs_le.mp herr).2] /-- Arbitrarily sharp comparison on a compact limit set at an included time. The source time proof is retained in the conclusion. -/ theorem limitNoncollapse_generalized_compact_inner_comparison {K : Set C.limit.sliceCarrier.carrier} (hK : IsCompact K) (t : ℝ) (ht : t ∈ J) {delta : ℝ} (hdelta : 0 < delta) (hdelta_lt : delta < 1) : βˆ€αΆ  k : β„• in atTop, K βŠ† C.exhaustion.space k ∧ t ∈ Icc (-C.exhaustion.time k) 0 ∧ βˆ€ x ∈ K, βˆ€ v : TangentSpace (𝓑 3) x, βˆ€ htk : t ∈ Icc (-C.exhaustion.time k) 0, (1 - delta) * (C.limit.flow.metric t).inner x v v ≀ (C.embedding k).pullbackInner t htk x v v ∧ (C.embedding k).pullbackInner t htk x v v ≀ (1 + delta) * (C.limit.flow.metric t).inner x v v := by classical have hlocal (q : C.limit.sliceCarrier.carrier) : βˆƒ V : Set C.limit.sliceCarrier.carrier, V ∈ 𝓝 q ∧ βˆ€αΆ  k : β„• in atTop, βˆ€ x ∈ V, βˆ€ v : TangentSpace (𝓑 3) x, βˆ€ htk : t ∈ Icc (-C.exhaustion.time k) 0, (1 - delta) * (C.limit.flow.metric t).inner x v v ≀ (C.embedding k).pullbackInner t htk x v v ∧ (C.embedding k).pullbackInner t htk x v v ≀ (1 + delta) * (C.limit.flow.metric t).inner x v v := by let c := extChartAt (𝓑 3) q obtain ⟨H, hH, hqH, hHt⟩ := exists_compact_subset (isOpen_extChartAt_target (I := 𝓑 3) q) (mem_extChartAt_target (I := 𝓑 3) q) let V := c.source ∩ c ⁻¹' H have hV : V ∈ 𝓝 q := inter_mem (extChartAt_source_mem_nhds (I := 𝓑 3) q) ((continuousAt_extChartAt (I := 𝓑 3) q).preimage_mem_nhds (mem_interior_iff_mem_nhds.mp hqH)) refine ⟨V, hV, ?_⟩ filter_upwards [eventually_chart_pullback_inner_comparison C q hH hHt t ht hdelta hdelta_lt] with k hk x hx v obtain ⟨y, hy, rfl⟩ : βˆƒ y ∈ H, c.symm y = x := by exact ⟨c x, (show c x ∈ H from hx.2), c.left_inv hx.1⟩ have hi : (mfderiv (𝓑 3) (𝓑 3) c.symm y).IsInvertible := by simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using isInvertible_mfderivWithin_extChartAt_symm (hHt hy) obtain ⟨w, rfl⟩ := hi.surjective v exact hk.2.2 y hy w choose V hV hbound using hlocal obtain ⟨s, _, hcover⟩ := hK.elim_nhds_subcover V (fun q _ => hV q) obtain ⟨j, hj⟩ := C.exists_exhaustion_superset hK have htimeSub := C.exhaustion.time_cofinal ({t} : Set ℝ) isCompact_singleton (singleton_subset_iff.mpr ht) have htime : βˆ€αΆ  k : β„• in atTop, t ∈ Icc (-C.exhaustion.time k) 0 := htimeSub.mono (fun k hk => hk (show t ∈ ({t} : Set ℝ) by simp)) filter_upwards [s.eventually_all.mpr (fun q _ => hbound q), eventually_ge_atTop j, htime] with k hk hjk htk refine ⟨hj.trans (C.exhaustion.space_increasing hjk), htk, ?_⟩ intro x hx v htk' obtain ⟨q, hqs, hxq⟩ : βˆƒ q ∈ s, x ∈ V q := by simpa only [mem_iUnion, exists_prop] using hcover hx exact hk q hqs x hxq v htk' end PoincareMT.M47