import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.Barriers import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.Exhaustion.Proper import PoincareLib.Analysis.Parabolic.NoncompactMaximum import PoincareLib.Geometry.Riemannian.ScalarOperators.Linearity import PoincareLib.Geometry.Riemannian.ScalarOperators.Extrema /-! # Scalar comparison from a smooth proper exhaustion Subtract the explicit exponential barrier, localize its positive part to a compact sublevel, and apply scalar comparison. This supplies the scalar localization mechanism of Chow et al., Part II, Lemmas 15.23-15.24, pp. 283-287. The exhaustion and its compact sublevels are explicit geometric inputs. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff Bundle universe u namespace PoincareMT.RicciFlow variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] {J : Set ℝ} {F : RicciFlow n M J} {O : M} /-- A bounded scalar subsolution with nonpositive initial data stays nonpositive when the flow admits a smooth proper exhaustion with the stated uniform derivative bounds. Time derivatives include the right endpoint. -/ theorem SmoothExhaustion.nonpos_of_heat_le_mul (S : SmoothExhaustion F O) (hproper : βˆ€ r : ℝ, IsCompact {x | S.toFun x ≀ r}) {u du : M β†’ ℝ β†’ ℝ} {C B T : ℝ} (hC : 0 ≀ C) (hT : Icc 0 T βŠ† J) (hu : ContinuousOn (Function.uncurry u) (univ Γ—Λ’ Icc 0 T)) (hsmooth : βˆ€ t ∈ Icc 0 T, ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun x => u x t)) (hderiv : βˆ€ x t, t ∈ Ioc 0 T β†’ HasDerivWithinAt (u x) (du x t) (Icc 0 T) t) (hbound : βˆ€ x t, t ∈ Icc 0 T β†’ u x t ≀ B) (hheat : βˆ€ x t, t ∈ Ioc 0 T β†’ du x t - (F.connection t).laplacian (fun y => u y t) x ≀ C * u x t) (hinit : βˆ€ x, u x 0 ≀ 0) : βˆ€ x t, t ∈ Icc 0 T β†’ u x t ≀ 0 := by intro x t ht by_contra hnot have hpos : 0 < u x t := lt_of_not_ge hnot let A := C + (n : ℝ) * S.bound + 1 have hL : 0 ≀ (n : ℝ) * S.bound := mul_nonneg (Nat.cast_nonneg _) S.bound_nonneg have hA : 0 < A := by dsimp [A]; linarith have hrate : C + (n : ℝ) * S.bound < A := by dsimp [A]; linarith obtain ⟨Ρ, hΞ΅, hsmall⟩ := S.exists_small_exp_mul (isCompact_singleton : IsCompact {x}) (half_pos hpos) A T hA.le let Ο† : M β†’ ℝ β†’ ℝ := fun y s => Ξ΅ * Real.exp (A * s) * S.toFun y let v : M β†’ ℝ β†’ ℝ := fun y s => u y s - Ο† y s let dv : M β†’ ℝ β†’ ℝ := fun y s => du y s - A * Ο† y s have hΟ†smooth (s : ℝ) : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun y => Ο† y s) := contMDiff_const.mul S.smooth have hΟ†continuous : Continuous (Function.uncurry Ο†) := (continuous_const.mul (Real.continuous_exp.comp (continuous_const.mul continuous_snd))).mul (S.smooth.continuous.comp continuous_fst) have hv : ContinuousOn (Function.uncurry v) (univ Γ—Λ’ Icc 0 T) := hu.sub hΟ†continuous.continuousOn have hdv : βˆ€ y s, s ∈ Ioc 0 T β†’ HasDerivWithinAt (v y) (dv y s) (Icc 0 T) s := by intro y s hs exact (hderiv y s hs).sub (S.hasDerivAt_exp_mul Ξ΅ A s y).hasDerivWithinAt have hlocalization : βˆƒ K : Set M, IsCompact K ∧ βˆ€ y βˆ‰ K, βˆ€ s ∈ Icc 0 T, v y s ≀ 0 := by have hlower (y : M) (s : Icc 0 T) : Ξ΅ * S.toFun y ≀ Ο† y s := by have he : 1 ≀ Real.exp (A * (s : ℝ)) := Real.one_le_exp (mul_nonneg hA.le s.property.1) have hh : 0 ≀ S.toFun y := by linarith [S.one_le y] dsimp [Ο†] exact mul_le_mul_of_nonneg_right (by nlinarith) hh obtain ⟨K, hK, hout⟩ := Poincare.Parabolic.exists_compact_nonpos_outside_of_barrier (I := Icc 0 T) hproper hΞ΅ (u := fun y s => u y s) (Ο† := fun y s => Ο† y s) (fun y s => hbound y s s.property) hlower exact ⟨K, hK, fun y hy s hs => hout y hy ⟨s, hs⟩⟩ obtain ⟨K, hK, hout⟩ := hlocalization have hvinit (y) : v y 0 ≀ 0 := by have hp := S.le_exp_mul hΞ΅.le hA.le (le_refl (0 : ℝ)) y dsimp [v, Ο†] linarith [hinit y] have hvmax : βˆ€ y s, s ∈ Ioc 0 T β†’ 0 < v y s β†’ (βˆ€ z, v z s ≀ v y s) β†’ dv y s ≀ C * v y s := by intro y s hs _ hmax have hs' : s ∈ Icc 0 T := ⟨hs.1.le, hs.2⟩ have hvs : ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun z => v z s) := (hsmooth s hs').sub (hΟ†smooth s) have hlap := (F.connection s).laplacian_nonpos_of_isLocalMax hvs (Filter.Eventually.of_forall hmax) have hΟ†heat := S.exp_mul_heat_gt hΞ΅ hrate (hT hs') y rw [(S.hasDerivAt_exp_mul Ξ΅ A s y).deriv] at hΟ†heat have hsub := (F.connection s).laplacian_sub (hsmooth s hs') (hΟ†smooth s) y change (F.connection s).laplacian (fun z => v z s) y = (F.connection s).laplacian (fun z => u z s) y - (F.connection s).laplacian (fun z => Ο† z s) y at hsub rw [hsub] at hlap change C * Ο† y s < A * Ο† y s - (F.connection s).laplacian (fun z => Ο† z s) y at hΟ†heat dsimp only [dv, v] nlinarith [hheat y s hs] have hvnonpos := Poincare.Parabolic.nonpos_of_deriv_le_mul_at_max_of_nonpos_outside_compact hK hv hdv hvmax hvinit hout x t ht have hsmall' := hsmall t ht x rfl change u x t - Ξ΅ * Real.exp (A * t) * S.toFun x ≀ 0 at hvnonpos linarith /-- On a connected manifold, completeness of one slice supplies the compact sublevels needed for scalar comparison. -/ theorem SmoothExhaustion.nonpos_of_heat_le_mul_of_metricComplete [T3Space M] [PreconnectedSpace M] (S : SmoothExhaustion F O) {tβ‚€ : ℝ} (htβ‚€ : tβ‚€ ∈ J) (hcomplete : MetricComplete (F.metric tβ‚€)) {u du : M β†’ ℝ β†’ ℝ} {C B T : ℝ} (hC : 0 ≀ C) (hT : Icc 0 T βŠ† J) (hu : ContinuousOn (Function.uncurry u) (univ Γ—Λ’ Icc 0 T)) (hsmooth : βˆ€ t ∈ Icc 0 T, ContMDiff (𝓑 n) π“˜(ℝ, ℝ) ∞ (fun x => u x t)) (hderiv : βˆ€ x t, t ∈ Ioc 0 T β†’ HasDerivWithinAt (u x) (du x t) (Icc 0 T) t) (hbound : βˆ€ x t, t ∈ Icc 0 T β†’ u x t ≀ B) (hheat : βˆ€ x t, t ∈ Ioc 0 T β†’ du x t - (F.connection t).laplacian (fun y => u y t) x ≀ C * u x t) (hinit : βˆ€ x, u x 0 ≀ 0) : βˆ€ x t, t ∈ Icc 0 T β†’ u x t ≀ 0 := S.nonpos_of_heat_le_mul (S.isCompact_sublevel_of_metricComplete htβ‚€ hcomplete) hC hT hu hsmooth hderiv hbound hheat hinit end PoincareMT.RicciFlow