import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Initial.SpectralTrace import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Time.DependentSpectralResidual /-! # Actual sources centered at the initial heat path The mixed estimate uses deviations in its first trace factor and the actual full high state in its second. This avoids a fixed initial-norm smallness condition. MT2007 Claim 19.1, p. 437; contract review block 8 and `2026-09-21-centered-spectral-residual.md`, statements 1-7. -/ set_option autoImplicit false open Set Filter MeasureTheory open scoped Topology ENNReal namespace PoincareMT.M63 open SpectralHeatNative QuasilinearDeTurckNative variable {iota : Type*} [Countable iota] [MeasurableSpace (State iota)] [BorelSpace (State iota)] /-- An actual source evaluated at deviations from the fixed initial heat path, with a common all-pairs mixed estimate. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 1. The stronger centered estimate is an explicit supplier obligation. -/ structure CenteredSpectralResidual (lambda : iota → NNReal) (w : State iota) (T : ℝ) where /-- The actual source at high-state deviation x. -/ toFun : ℝ → State iota → State iota /-- Joint measurability in the actual state Borel topology. -/ measurable : Measurable (Function.uncurry toFun) /-- The actual centered source at zero is time square integrable. -/ zero_memLp : MemLp (fun t => toFun t 0) 2 (timeMeasure T) /-- Size of the fixed principal perturbation. -/ perturbationConstant : NNReal /-- Constant for variation of the principal coefficient. -/ principalConstant : NNReal /-- Constant for the lower trace term. -/ lowerConstant : NNReal /-- One full-measure time set controls every pair of deviations. -/ mixed : ∀ᵐ t ∂timeMeasure T, ∀ x y, ‖toFun t x - toFun t y‖ ≤ (perturbationConstant : ℝ) * ‖x - y‖ + (principalConstant : ℝ) * (max ‖shiftedBaseMultiplier lambda x‖ ‖shiftedBaseMultiplier lambda y‖ * ‖x - y‖ + ‖shiftedBaseMultiplier lambda (x - y)‖ * ‖initialHeatHigh lambda w t + y‖) + (lowerConstant : ℝ) * ‖shiftedBaseMultiplier lambda (x - y)‖ namespace CenteredSpectralResidual variable {lambda : iota → NNReal} {w : State iota} {T : ℝ} (N : CenteredSpectralResidual lambda w T) omit [BorelSpace (State iota)] in /-- The actual centered growth bound retains the initial high path only in an integrable term. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 2. -/ theorem ae_norm_le : ∀ᵐ t ∂timeMeasure T, ∀ x, ‖N.toFun t x‖ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * ‖shiftedBaseMultiplier lambda x‖ + N.lowerConstant) * ‖x‖ + (N.principalConstant : ℝ) * ‖shiftedBaseMultiplier lambda x‖ * ‖initialHeatHigh lambda w t‖ + ‖N.toFun t 0‖ := by filter_upwards [N.mixed] with t ht intro x have h := ht x 0 simp only [map_zero, norm_zero, max_eq_left (norm_nonneg _), sub_zero, add_zero] at h have hJ := mul_le_mul_of_nonneg_left (norm_shiftedBaseMultiplier_le lambda x) N.lowerConstant.coe_nonneg calc _ ≤ ‖N.toFun t x - N.toFun t 0‖ + ‖N.toFun t 0‖ := norm_le_norm_sub_add _ _ _ ≤ _ := by nlinarith /-- Evaluating the centered source on M03's actual high response is time square integrable for every forcing. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 3. -/ theorem memLp_response_source (hT : 0 ≤ T) (F : ForcingSpace iota T) : MemLp (fun t => N.toFun t (shiftedHighOperator hT lambda F t)) 2 (timeMeasure T) := by let H := shiftedHighOperator hT lambda F let K : ℝ := (Real.sqrt T + 1) * ‖F‖ let C : ℝ := N.perturbationConstant + N.principalConstant * K + N.lowerConstant have hK : 0 ≤ K := by dsimp [K]; positivity have hC : 0 ≤ C := by dsimp [C]; positivity have hmeas : AEMeasurable (fun t => N.toFun t (H t)) (timeMeasure T) := N.measurable.comp_aemeasurable (measurable_id.aemeasurable.prodMk (Lp.memLp H).aestronglyMeasurable.aemeasurable) have hcoords (i : iota) : AEStronglyMeasurable (fun t => N.toFun t (H t) i) (timeMeasure T) := ((lp.evalCLM ℝ (fun _ : iota => ℝ) 2 i).continuous.measurable.comp_aemeasurable hmeas).aestronglyMeasurable have hsm := aestronglyMeasurable_stateOfCoeffs hcoords (Eventually.of_forall (fun t => lp.memℓp (N.toFun t (H t)))) have heq : (fun t => stateOfCoeffs (fun i => N.toFun t (H t) i)) = (fun t => N.toFun t (H t)) := by funext t apply lp.ext funext i exact stateOfCoeffs_apply (lp.memℓp (N.toFun t (H t))) i rw [heq] at hsm have hmajor : MemLp (fun t => C * ‖H t‖ + (N.principalConstant : ℝ) * K * ‖initialHeatHigh lambda w t‖ + ‖N.toFun t 0‖) 2 (timeMeasure T) := (((Lp.memLp H).norm.const_mul C).add ((initialHeatHigh_memLp_energy lambda w hT).1.norm.const_mul ((N.principalConstant : ℝ) * K))).add N.zero_memLp.norm apply hmajor.of_le hsm filter_upwards [N.ae_norm_le, intermediate_high_bound_general hT lambda F] with t hN ht rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] apply (hN (H t)).trans apply add_le_add _ le_rfl apply add_le_add · apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) exact add_le_add (add_le_add le_rfl (mul_le_mul_of_nonneg_left ht N.principalConstant.coe_nonneg)) le_rfl · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left ht N.principalConstant.coe_nonneg) (norm_nonneg _) /-- The forcing operator is the actual centered source evaluated at the actual high response. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 4. -/ noncomputable def forcingResidual (hT : 0 ≤ T) (F : ForcingSpace iota T) : ForcingSpace iota T := (N.memLp_response_source hT F).toLp (fun t => N.toFun t (shiftedHighOperator hT lambda F t)) /-- The centered forcing operator retains its exact a.e. source. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 5. -/ theorem forcingResidual_coe (hT : 0 ≤ T) (F : ForcingSpace iota T) : N.forcingResidual hT F =ᵐ[timeMeasure T] fun t => N.toFun t (shiftedHighOperator hT lambda F t) := (N.memLp_response_source hT F).coeFn_toLp /-- Zero forcing gives exactly the actual centered zero source. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 6. -/ theorem forcingResidual_zero (hT : 0 ≤ T) : N.forcingResidual hT 0 = N.zero_memLp.toLp (fun t => N.toFun t 0) := by apply Lp.ext have h := N.forcingResidual_coe hT 0 simp only [map_zero] at h filter_upwards [h, N.zero_memLp.coeFn_toLp, Lp.coeFn_zero (State iota) 2 (timeMeasure T)] with t ht hzero hz simp only [ht, hzero, hz, Pi.zero_apply] /-- The centered forcing estimate uses the initial path's shrinking time-L2 norm, with no fixed initial-norm term. MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 7. -/ theorem norm_forcingResidual_sub_le (hT : 0 ≤ T) (hT1 : T ≤ 1) {r : ℝ} (hr : 0 ≤ r) (F G : ForcingSpace iota T) (hF : ‖F‖ ≤ r) (hG : ‖G‖ ≤ r) : let P := (initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w) ‖N.forcingResidual hT F - N.forcingResidual hT G‖ ≤ (2 * N.perturbationConstant + 8 * N.principalConstant * r + 2 * N.principalConstant * ‖P‖ + 2 * N.lowerConstant * Real.sqrt T) * ‖F - G‖ := by let P := (initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w) let H := shiftedHighOperator hT lambda let J := (shiftedBaseMultiplier lambda).compLpL 2 (timeMeasure T) have hb (U : ForcingSpace iota T) (hU : ‖U‖ ≤ r) : ∀ᵐ t ∂timeMeasure T, ‖shiftedBaseMultiplier lambda (H U t)‖ ≤ 2 * r := (intermediate_high_bound hT hT1 lambda U).mono (fun _ ht => ht.trans (mul_le_mul_of_nonneg_left hU (by norm_num))) have hmain : ‖N.forcingResidual hT F - N.forcingResidual hT G‖ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * ‖H (F - G)‖ + (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖P + H G‖ + (N.lowerConstant : ℝ) * ‖J (H (F - G))‖ := by apply norm_le_mixed _ _ _ _ (by positivity) (by positivity) N.lowerConstant.coe_nonneg filter_upwards [N.forcingResidual_coe hT F, N.forcingResidual_coe hT G, Lp.coeFn_sub (N.forcingResidual hT F) (N.forcingResidual hT G), Lp.coeFn_sub (H F) (H G), (shiftedBaseMultiplier lambda).coeFn_compLpL (H (F - G)), hb F hF, hb G hG, intermediate_high_bound hT hT1 lambda (F - G), N.mixed, (initialHeatHigh_memLp_energy lambda w hT).1.coeFn_toLp, Lp.coeFn_add P (H G)] with t hNF hNG hsubN hsubH hJ hFt hGt hdiff hN hP hadd have hHt : H (F - G) t = H F t - H G t := by rw [map_sub, hsubH, Pi.sub_apply] have hPGt : (P + H G) t = initialHeatHigh lambda w t + H G t := by rw [hadd, Pi.add_apply, hP] rw [hsubN, Pi.sub_apply, hNF, hNG] change ‖N.toFun t (H F t) - N.toFun t (H G t)‖ ≤ _ have h := hN (H F t) (H G t) rw [hHt] at hdiff have htop := mul_le_mul_of_nonneg_right (max_le hFt hGt) (norm_nonneg (H F t - H G t)) have hcross := mul_le_mul_of_nonneg_right hdiff (norm_nonneg (initialHeatHigh lambda w t + H G t)) apply h.trans change _ ≤ _ + (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖(P + H G) t‖ + (N.lowerConstant : ℝ) * ‖J (H (F - G)) t‖ rw [hPGt, hJ, hHt] nlinarith [mul_le_mul_of_nonneg_left (add_le_add htop hcross) N.principalConstant.coe_nonneg] have hhigh : ‖H (F - G)‖ ≤ 2 * ‖F - G‖ := (H.le_opNorm _).trans (mul_le_mul_of_nonneg_right ((norm_shiftedHighOperator_le hT lambda).trans (by linarith)) (norm_nonneg _)) have hGhigh : ‖P + H G‖ ≤ ‖P‖ + 2 * r := by apply (norm_add_le _ _).trans apply add_le_add le_rfl exact ((H.le_opNorm G).trans (mul_le_mul_of_nonneg_right ((norm_shiftedHighOperator_le hT lambda).trans (by linarith)) (norm_nonneg _))).trans (mul_le_mul_of_nonneg_left hG (by norm_num)) calc _ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * ‖H (F - G)‖ + (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖P + H G‖ + (N.lowerConstant : ℝ) * ‖J (H (F - G))‖ := hmain _ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * (2 * ‖F - G‖) + (N.principalConstant : ℝ) * (2 * ‖F - G‖) * (‖P‖ + 2 * r) + (N.lowerConstant : ℝ) * (2 * Real.sqrt T * ‖F - G‖) := add_le_add (add_le_add (mul_le_mul_of_nonneg_left hhigh (by positivity)) (mul_le_mul_of_nonneg_left hGhigh (by positivity))) (mul_le_mul_of_nonneg_left (norm_intermediate_high_le hT hT1 lambda (F - G)) N.lowerConstant.coe_nonneg) _ = _ := by ring end CenteredSpectralResidual end PoincareMT.M63