From 69558659b266a4722fc617dad0172622161e25e4 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sat, 28 Nov 2026 18:43:40 +0000 Subject: [PATCH] Speed up FastDynamo resolvent and cutoff proofs --- .../TransverseSmoothBumpH2CutoffConcrete.lean | 34 +++------------ .../TransverseSmoothH2CutoffMultiplier.lean | 43 +++++++++---------- .../Analysis/TransverseWeightedDiffusion.lean | 15 +++---- .../Dynamics/Assembly/ProductResolvent.lean | 3 ++ .../Global/TorusBackgroundWeightedEnergy.lean | 30 ++++++------- .../Local/HorizontalDeltaResolvent.lean | 2 + .../Local/HorizontalFormCompactness.lean | 2 + .../FastDynamo/Local/HorizontalFormDelta.lean | 2 + .../Local/HorizontalFormOperator.lean | 4 ++ .../Local/HorizontalFormResolvent.lean | 36 +++++++++------- .../Local/HorizontalModeContour.lean | 2 + .../Local/HorizontalModeEigenpair.lean | 2 + .../Local/HorizontalModeIsolation.lean | 2 + .../Local/HorizontalModeWeakIdentity.lean | 2 + .../Local/HorizontalRieszPerturbation.lean | 35 ++++++++------- .../Local/HorizontalSeedResolventH2.lean | 2 + .../Local/HorizontalSeedUniformResolvent.lean | 2 + .../Local/HorizontalSeedWitness.lean | 2 + .../Local/HorizontalSpectrumEigenvalue.lean | 2 + .../FastDynamo/Local/HorizontalWeakForm.lean | 11 +++-- .../FastDynamo/Local/LocalSeedC2Concrete.lean | 2 + LeanPool/FastDynamo/Local/WholePlaneC2.lean | 9 ++-- 22 files changed, 128 insertions(+), 116 deletions(-) diff --git a/LeanPool/FastDynamo/Analysis/TransverseSmoothBumpH2CutoffConcrete.lean b/LeanPool/FastDynamo/Analysis/TransverseSmoothBumpH2CutoffConcrete.lean index 8052eea424..c786b40221 100644 --- a/LeanPool/FastDynamo/Analysis/TransverseSmoothBumpH2CutoffConcrete.lean +++ b/LeanPool/FastDynamo/Analysis/TransverseSmoothBumpH2CutoffConcrete.lean @@ -66,6 +66,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] transverseH2Submodule + open scoped FourierTransform SchwartzMap namespace TransverseSmoothBumpH2Cutoff @@ -85,12 +87,8 @@ theorem polynomialH2Multiplier_single_smul apply ContinuousLinearMap.ext intro b apply transverseH2Embedding_injective - simp only [smul_apply] - rw [map_smul, transverseH2Embedding_polynomialH2Multiplier] - rw [polynomialValueMap_apply, polynomialLInf_single, map_smul] - rw [transverseH2Embedding_polynomialH2Multiplier, - polynomialValueMap_apply] - rfl + simp only [smul_apply, map_smul, transverseH2Embedding_polynomialH2Multiplier, + polynomialValueMap_apply, polynomialLInf_single, one_smul] /-- The whole four-component package at frequency `n` is homogeneous in the coefficient: `coefficientSecondOrderPackage n c = c • monomialSecondOrderPackage n`. -/ @@ -133,27 +131,7 @@ theorem norm_coefficientSecondOrderPackage_le ‖coefficientSecondOrderPackage n c‖ ≤ ‖c‖ * secondOrderFourierWeight n := by rw [coefficientSecondOrderPackage_eq_smul] - rw [secondOrderFourierWeight] - simp only [monomialSecondOrderPackage, Prod.norm_def, Prod.smul_fst, - Prod.smul_snd] - rw [max_le_iff, max_le_iff, max_le_iff] - refine ⟨?_, ?_, ?_, ?_⟩ - · rw [norm_smul] - exact mul_le_mul_of_nonneg_left - (le_max_left _ (max _ (max _ _))) (norm_nonneg c) - · rw [norm_smul] - exact mul_le_mul_of_nonneg_left - ((le_max_left _ (max _ _)).trans - (le_max_right _ _)) (norm_nonneg c) - · rw [norm_smul] - exact mul_le_mul_of_nonneg_left - ((le_max_left _ _).trans - ((le_max_right _ _).trans (le_max_right _ _))) (norm_nonneg c) - · exact (ContinuousLinearMap.opNorm_smul_le c _).trans - (mul_le_mul_of_nonneg_left - ((le_max_right _ _).trans - ((le_max_right _ _).trans (le_max_right _ _))) - (norm_nonneg c)) + exact norm_smul_le c (monomialSecondOrderPackage n) /-- The operator-adapted summability premise follows from the ordinary scalar weighted `ℓ1` premise. This is the convenient interface for Fourier-decay @@ -359,6 +337,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] transverseH2Submodule + open MeasureTheory namespace TransverseSmoothBumpH2CutoffConcrete diff --git a/LeanPool/FastDynamo/Analysis/TransverseSmoothH2CutoffMultiplier.lean b/LeanPool/FastDynamo/Analysis/TransverseSmoothH2CutoffMultiplier.lean index d1cfbd64fe..49994e9db5 100644 --- a/LeanPool/FastDynamo/Analysis/TransverseSmoothH2CutoffMultiplier.lean +++ b/LeanPool/FastDynamo/Analysis/TransverseSmoothH2CutoffMultiplier.lean @@ -64,6 +64,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] MeasureTheory.Lp + open MeasureTheory open scoped ENNReal @@ -354,27 +356,26 @@ theorem polynomialLaplacianProductMap_apply scalarVectorMulTransverse (polynomialLInf (polynomialLaplacian p)) (transverseH2Embedding b) := by - simp [polynomialLaplacianProductMap] + simp only [polynomialLaplacianProductMap, add_apply, smul_apply, sum_apply, + ContinuousLinearMap.comp_apply] /-- Multiplication by the zero polynomial is the zero map. -/ theorem polynomialValueMap_zero : polynomialValueMap (0 : TransverseTrigPolynomial) = 0 := by - ext b - simp [polynomialValueMap] + rw [polynomialValueMap, polynomialLInf_zero, map_zero, ContinuousLinearMap.zero_comp] /-- Physical multiplication depends additively on the polynomial cutoff. -/ theorem polynomialValueMap_add (p q : TransverseTrigPolynomial) : polynomialValueMap (p + q) = polynomialValueMap p + polynomialValueMap q := by - ext b - simp [polynomialValueMap, polynomialLInf_add] + simp only [polynomialValueMap, polynomialLInf_add, map_add, ContinuousLinearMap.add_comp] /-- The first-order Leibniz candidate of the zero polynomial is the zero map. -/ theorem polynomialDerivProductMap_zero (j : Fin 2) : polynomialDerivProductMap (0 : TransverseTrigPolynomial) j = 0 := by - ext b - simp [polynomialDerivProductMap] + simp only [polynomialDerivProductMap, map_zero, polynomialLInf_zero, + ContinuousLinearMap.zero_comp, add_zero] /-- The first-order Leibniz candidate depends additively on the polynomial cutoff. -/ theorem polynomialDerivProductMap_add @@ -391,8 +392,8 @@ theorem polynomialDerivProductMap_add /-- The second-order Leibniz candidate of the zero polynomial is the zero map. -/ theorem polynomialLaplacianProductMap_zero : polynomialLaplacianProductMap (0 : TransverseTrigPolynomial) = 0 := by - ext b - simp [polynomialLaplacianProductMap] + simp only [polynomialLaplacianProductMap, map_zero, polynomialLInf_zero, + ContinuousLinearMap.zero_comp, Finset.sum_const_zero, smul_zero, add_zero] /-- The second-order Leibniz candidate depends additively on the polynomial cutoff. -/ theorem polynomialLaplacianProductMap_add @@ -420,13 +421,12 @@ theorem polynomialMul_hasFourierDerivative | zero => rw [polynomialValueMap_zero, polynomialDerivProductMap_zero] intro n i - simp + simp only [zero_apply, map_zero, mul_zero] | add p q hp hq => rw [polynomialValueMap_add, polynomialDerivProductMap_add] intro n i simp only [add_apply, map_add] - rw [hp n i, hq n i] - ring + rw [hp n i, hq n i, mul_add] | single m c => intro q i change transverseCoeffCLM q i @@ -458,13 +458,12 @@ theorem polynomialMul_hasFourierLaplacian | zero => rw [polynomialValueMap_zero, polynomialLaplacianProductMap_zero] intro n i - simp + simp only [zero_apply, map_zero, mul_zero] | add p q hp hq => rw [polynomialValueMap_add, polynomialLaplacianProductMap_add] intro n i simp only [add_apply, map_add] - rw [hp n i, hq n i] - ring + rw [hp n i, hq n i, mul_add] | single m c => intro q i change transverseCoeffCLM q i @@ -479,10 +478,8 @@ theorem polynomialMul_hasFourierLaplacian transverseCoeffCLM_transverseLaplacianFromH2, transverseCoeff_polynomialSingleVectorMul, transverseCoeff_polynomialSingleVectorMul] - simp_rw [map_sum, polynomialDeriv_single, - transverseCoeff_polynomialSingleVectorMul, - transverseCoeffCLM_transverseDerivFromH2] - simp only [smul_eq_mul] + simp only [map_sum, polynomialDeriv_single, transverseCoeff_polynomialSingleVectorMul, + transverseCoeffCLM_transverseDerivFromH2, smul_eq_mul] let z := transverseCoeffCLM (q - m) i (transverseH2Embedding b) change c * (-(transverseFrequencyEnergy (q - m) : ℂ) * z) + 2 * (∑ x : Fin 2, transverseFourierDerivMultiplier x m * c * @@ -623,6 +620,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] MeasureTheory.Lp + open MeasureTheory namespace TransverseSmoothH2CutoffMultiplier @@ -873,7 +872,7 @@ theorem embeddingDefect_completed_eq_zero unfold completedSecondOrderPackage rw [(embeddingDefect b).map_tsum (summable_secondOrderPackageSeries ha)] - simp [secondOrderPackageSeries, embeddingDefect_coefficient] + simp only [secondOrderPackageSeries, embeddingDefect_coefficient, tsum_zero] /-- The first-order Leibniz identity passes to the Fourier limit: the continuous linear defect map `derivativeDefect j b` annihilates the completed package. -/ @@ -885,7 +884,7 @@ theorem derivativeDefect_completed_eq_zero unfold completedSecondOrderPackage rw [(derivativeDefect j b).map_tsum (summable_secondOrderPackageSeries ha)] - simp [secondOrderPackageSeries, derivativeDefect_coefficient] + simp only [secondOrderPackageSeries, derivativeDefect_coefficient, tsum_zero] /-- The second-order Leibniz identity passes to the Fourier limit: the continuous linear defect map `laplacianDefect b` annihilates the completed package. -/ @@ -897,7 +896,7 @@ theorem laplacianDefect_completed_eq_zero unfold completedSecondOrderPackage rw [(laplacianDefect b).map_tsum (summable_secondOrderPackageSeries ha)] - simp [secondOrderPackageSeries, laplacianDefect_coefficient] + simp only [secondOrderPackageSeries, laplacianDefect_coefficient, tsum_zero] /-! ## The completed periodic cutoff -/ diff --git a/LeanPool/FastDynamo/Analysis/TransverseWeightedDiffusion.lean b/LeanPool/FastDynamo/Analysis/TransverseWeightedDiffusion.lean index e91d917ca9..4459e19b2f 100644 --- a/LeanPool/FastDynamo/Analysis/TransverseWeightedDiffusion.lean +++ b/LeanPool/FastDynamo/Analysis/TransverseWeightedDiffusion.lean @@ -666,15 +666,12 @@ theorem transverseWeightedGradientDefect_young (β : TransverseScalarW1Inf) (transverseH2Embedding h)‖ ≤ ‖β.grad j‖ * ‖transverseH2Embedding h‖ := norm_scalarVectorMulTransverseVec_apply_le _ _ - have hnn : (0 : ℝ) ≤ ‖scalarVectorMulTransverseVec ι (β.grad j) - (transverseH2Embedding h)‖ := norm_nonneg _ - have hsq : ‖scalarVectorMulTransverseVec ι (β.grad j) - (transverseH2Embedding h)‖ ^ 2 ≤ - ‖β.grad j‖ ^ 2 * ‖transverseH2Embedding h‖ ^ 2 := by - have := mul_self_le_mul_self hnn hhold - nlinarith [this] - nlinarith [sq_nonneg (‖transverseVecDerivFromH2 ι j h‖ / 2 - - ‖scalarVectorMulTransverseVec ι (β.grad j) (transverseH2Embedding h)‖), hsq] + have young (derivative error : ℝ) : + error * derivative ≤ derivative ^ 2 / 4 + error ^ 2 := by + nlinarith only [sq_nonneg (derivative / 2 - error)] + refine (young _ _).trans (add_le_add le_rfl ?_) + rw [← mul_pow] + exact pow_le_pow_left₀ (norm_nonneg _) hhold 2 /-- The `ε`-weighted Young absorption used in `eq:background-coercivity`: `ε ∫ |∇β| |h| |∇h| ≤ (ε/4) ‖∇h‖₂² + ε ‖∇β‖_∞² ‖h‖₂²`. -/ diff --git a/LeanPool/FastDynamo/Dynamics/Assembly/ProductResolvent.lean b/LeanPool/FastDynamo/Dynamics/Assembly/ProductResolvent.lean index 9d1f46c455..fe7f4c526b 100644 --- a/LeanPool/FastDynamo/Dynamics/Assembly/ProductResolvent.lean +++ b/LeanPool/FastDynamo/Dynamics/Assembly/ProductResolvent.lean @@ -68,6 +68,9 @@ namespace FastDynamo noncomputable section +-- Keep the Fourier graphs bundled while inferring the domain instances. +attribute [local irreducible] productH2Submodule transverseH2Submodule + open scoped ENNReal /-! ## Block diagonality of the all-frequency pencil -/ diff --git a/LeanPool/FastDynamo/Global/TorusBackgroundWeightedEnergy.lean b/LeanPool/FastDynamo/Global/TorusBackgroundWeightedEnergy.lean index c6cc28a923..a902729618 100644 --- a/LeanPool/FastDynamo/Global/TorusBackgroundWeightedEnergy.lean +++ b/LeanPool/FastDynamo/Global/TorusBackgroundWeightedEnergy.lean @@ -610,25 +610,25 @@ theorem growth_mul_eps_gradientEnergy_le (D : BackgroundCoercivity β u ε K z S have hge := D.re_inner_pencil_ge h have hle := D.re_inner_pencil_le h have hgn := D.growth_mul_norm_le h - have hmul : Real.sqrt 2 * Real.sqrt 2 = 2 := Real.mul_self_sqrt (by norm_num) - have hf := norm_nonneg ((horizontalInductionOperator u ε K).pencil z h) have hgN2 : 0 ≤ D.growth * ‖transverseH2Embedding h‖ ^ 2 := mul_nonneg D.growth_pos.le (sq_nonneg _) - have hE1 : ε * transverseGradientEnergy h ≤ + have hgrad : ε * transverseGradientEnergy h ≤ 2 * (Real.sqrt 2 * ‖transverseH2Embedding h‖ * ‖(horizontalInductionOperator u ε K).pencil z h‖) := by - linarith - have hE2 : D.growth * (ε * transverseGradientEnergy h) ≤ - D.growth * (2 * (Real.sqrt 2 * ‖transverseH2Embedding h‖ * - ‖(horizontalInductionOperator u ε K).pencil z h‖)) := - mul_le_mul_of_nonneg_left hE1 D.growth_pos.le - have hE4 : 2 * Real.sqrt 2 * - ‖(horizontalInductionOperator u ε K).pencil z h‖ * - (D.growth * ‖transverseH2Embedding h‖) ≤ - 2 * Real.sqrt 2 * ‖(horizontalInductionOperator u ε K).pencil z h‖ * - (Real.sqrt 2 * ‖(horizontalInductionOperator u ε K).pencil z h‖) := - mul_le_mul_of_nonneg_left hgn (by positivity) - nlinarith [hE2, hE4, hmul] + linarith only [hge, hle, hgN2] + have combine (growth state forcing : ℝ) (hf : 0 ≤ forcing) + (hstate : growth * state ≤ Real.sqrt 2 * forcing) : + growth * (2 * (Real.sqrt 2 * state * forcing)) ≤ 4 * forcing ^ 2 := by + calc + _ = (2 * Real.sqrt 2 * forcing) * (growth * state) := by ring + _ ≤ (2 * Real.sqrt 2 * forcing) * (Real.sqrt 2 * forcing) := + mul_le_mul_of_nonneg_left hstate (by positivity) + _ = 2 * (Real.sqrt 2 * Real.sqrt 2) * forcing ^ 2 := by ring + _ = _ := by + rw [Real.mul_self_sqrt (by norm_num : (0 : ℝ) ≤ 2)] + norm_num + exact (mul_le_mul_of_nonneg_left hgrad D.growth_pos.le).trans + (combine _ _ _ (norm_nonneg _) hgn) /-- The constant of `eq:bg-resolvent` in terms of the retained growth rate `g`: `‖h‖₂ + √ε‖∇_⊥h‖₂ ≤ (√2/g + 2/√g)‖f‖₂`. -/ diff --git a/LeanPool/FastDynamo/Local/HorizontalDeltaResolvent.lean b/LeanPool/FastDynamo/Local/HorizontalDeltaResolvent.lean index 9d1dc3bae8..52486b31b7 100644 --- a/LeanPool/FastDynamo/Local/HorizontalDeltaResolvent.lean +++ b/LeanPool/FastDynamo/Local/HorizontalDeltaResolvent.lean @@ -46,6 +46,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory Metric Set /-- A family continuous on a compact parameter set is uniformly bounded in norm there. This diff --git a/LeanPool/FastDynamo/Local/HorizontalFormCompactness.lean b/LeanPool/FastDynamo/Local/HorizontalFormCompactness.lean index 47e6db2858..090ffd02b2 100644 --- a/LeanPool/FastDynamo/Local/HorizontalFormCompactness.lean +++ b/LeanPool/FastDynamo/Local/HorizontalFormCompactness.lean @@ -61,6 +61,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory open scoped ENNReal diff --git a/LeanPool/FastDynamo/Local/HorizontalFormDelta.lean b/LeanPool/FastDynamo/Local/HorizontalFormDelta.lean index fee0cb9764..e3df09f6fd 100644 --- a/LeanPool/FastDynamo/Local/HorizontalFormDelta.lean +++ b/LeanPool/FastDynamo/Local/HorizontalFormDelta.lean @@ -46,6 +46,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory namespace HorizontalWeakForm diff --git a/LeanPool/FastDynamo/Local/HorizontalFormOperator.lean b/LeanPool/FastDynamo/Local/HorizontalFormOperator.lean index 7efc3565f5..a283b10976 100644 --- a/LeanPool/FastDynamo/Local/HorizontalFormOperator.lean +++ b/LeanPool/FastDynamo/Local/HorizontalFormOperator.lean @@ -50,6 +50,10 @@ namespace FastDynamo noncomputable section +-- Instance search on the form graph only needs the bundled defect map. +-- Unfolding it expands the Sobolev and anti-dual instances during conversion. +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory open scoped ENNReal diff --git a/LeanPool/FastDynamo/Local/HorizontalFormResolvent.lean b/LeanPool/FastDynamo/Local/HorizontalFormResolvent.lean index fc3ec4a0bd..68cd9e15bb 100644 --- a/LeanPool/FastDynamo/Local/HorizontalFormResolvent.lean +++ b/LeanPool/FastDynamo/Local/HorizontalFormResolvent.lean @@ -42,6 +42,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory Metric Set Filter Topology open scoped ENNReal @@ -102,6 +104,15 @@ omit [CompleteSpace V] in (formPencilDomainInverse j a z R hR f).1 = formPencilGraphPair j z R f := rfl +omit [CompleteSpace V] in +private theorem associatedFormProdOperator_pencil_apply (j : V →L[ℂ] X) + (hj : Function.Injective j) (hdense : DenseRange j) (a : ComplexForm V) (z : ℂ) + (d : AssociatedFormProdDomain j a) : + (associatedFormProdOperator j hj hdense a).pencil z d = z • j d.1.1 + d.1.2 := by + simp only [DomainOperator.pencil, sub_apply, smul_apply, + associatedFormProdOperator_embedding_apply, associatedFormProdOperator_op_apply, + sub_neg_eq_add] + omit [CompleteSpace V] in /-- The domain-valued solution map is a right inverse of the operator pencil. -/ theorem formPencilDomainInverse_right_apply (j : V →L[ℂ] X) (hj : Function.Injective j) @@ -119,10 +130,10 @@ theorem formPencilDomainInverse_right_apply (j : V →L[ℂ] X) (hj : Function.I z • j (formPencilDomainInverse j a z R hR f).1.1 + (formPencilDomainInverse j a z R hR f).1.2 := by simp only [DomainOperator.pencil, sub_apply, smul_apply, - associatedFormProdOperator_embedding_apply, associatedFormProdOperator_op_apply] - module - rw [hpencil, hfst, hsnd] - module + associatedFormProdOperator_embedding_apply, associatedFormProdOperator_op_apply, + sub_neg_eq_add] + rw [hpencil, hfst, hsnd, add_comm] + exact sub_add_cancel _ _ omit [CompleteSpace V] in /-- Injectivity of the pencil form identifies the first graph coordinate of any graph element @@ -135,11 +146,8 @@ theorem formPencilDomainInverse_fst_of_injective (j : V →L[ℂ] X) (hj : Funct (d : AssociatedFormProdDomain j a) : R ((associatedFormProdOperator j hj hdense a).pencil z d) = d.1.1 := by set f : X := (associatedFormProdOperator j hj hdense a).pencil z d with hf - have hfval : f = z • j d.1.1 + d.1.2 := by - rw [hf] - simp only [DomainOperator.pencil, sub_apply, smul_apply, - associatedFormProdOperator_embedding_apply, associatedFormProdOperator_op_apply] - module + have hfval : f = z • j d.1.1 + d.1.2 := + associatedFormProdOperator_pencil_apply j hj hdense a z d have hdiff : R f - d.1.1 = 0 := by apply hinj intro phi @@ -169,19 +177,15 @@ theorem formPencilDomainInverse_left_apply (j : V →L[ℂ] X) (hj : Function.In formPencilDomainInverse j a z R hR ((associatedFormProdOperator j hj hdense a).pencil z d) = d := by set f : X := (associatedFormProdOperator j hj hdense a).pencil z d with hf - have hfval : f = z • j d.1.1 + d.1.2 := by - rw [hf] - simp only [DomainOperator.pencil, sub_apply, smul_apply, - associatedFormProdOperator_embedding_apply, associatedFormProdOperator_op_apply] - module + have hfval : f = z • j d.1.1 + d.1.2 := + associatedFormProdOperator_pencil_apply j hj hdense a z d have hRf : R f = d.1.1 := formPencilDomainInverse_fst_of_injective j hj hdense a z R hR hinj d apply Subtype.ext rw [formPencilDomainInverse_val, formPencilGraphPair_apply, hRf] refine Prod.ext rfl ?_ change f - z • j d.1.1 = d.1.2 - rw [hfval] - module + rw [hfval, add_sub_cancel_left] /-- The chosen domain-valued inverse family, junk outside the parameter set. -/ def formPencilInvFamily (j : V →L[ℂ] X) (a : ComplexForm V) {S : Set ℂ} diff --git a/LeanPool/FastDynamo/Local/HorizontalModeContour.lean b/LeanPool/FastDynamo/Local/HorizontalModeContour.lean index 2a10d4b31e..fcbd4107fd 100644 --- a/LeanPool/FastDynamo/Local/HorizontalModeContour.lean +++ b/LeanPool/FastDynamo/Local/HorizontalModeContour.lean @@ -51,6 +51,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory Metric Set Filter Topology Complex open scoped ENNReal diff --git a/LeanPool/FastDynamo/Local/HorizontalModeEigenpair.lean b/LeanPool/FastDynamo/Local/HorizontalModeEigenpair.lean index ac9d2148cb..3692aba983 100644 --- a/LeanPool/FastDynamo/Local/HorizontalModeEigenpair.lean +++ b/LeanPool/FastDynamo/Local/HorizontalModeEigenpair.lean @@ -45,6 +45,8 @@ formalisation takes `ϱ = 32`, whence `448 - 4π²`. noncomputable section namespace FastDynamo + +attribute [local irreducible] associatedFormProdGraphDefect namespace HorizontalMode open Complex Filter MeasureTheory Metric Set Topology diff --git a/LeanPool/FastDynamo/Local/HorizontalModeIsolation.lean b/LeanPool/FastDynamo/Local/HorizontalModeIsolation.lean index f65ca4415e..18175c3525 100644 --- a/LeanPool/FastDynamo/Local/HorizontalModeIsolation.lean +++ b/LeanPool/FastDynamo/Local/HorizontalModeIsolation.lean @@ -47,6 +47,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory Metric Set Filter Topology open scoped ENNReal diff --git a/LeanPool/FastDynamo/Local/HorizontalModeWeakIdentity.lean b/LeanPool/FastDynamo/Local/HorizontalModeWeakIdentity.lean index 00287ab028..a2bca33076 100644 --- a/LeanPool/FastDynamo/Local/HorizontalModeWeakIdentity.lean +++ b/LeanPool/FastDynamo/Local/HorizontalModeWeakIdentity.lean @@ -45,6 +45,8 @@ What is *not* proved here is the distributional identity itself; it is stated ve noncomputable section namespace FastDynamo + +attribute [local irreducible] associatedFormProdGraphDefect namespace HorizontalMode open Complex MeasureTheory Metric Set diff --git a/LeanPool/FastDynamo/Local/HorizontalRieszPerturbation.lean b/LeanPool/FastDynamo/Local/HorizontalRieszPerturbation.lean index a18e2ff755..cae862add1 100644 --- a/LeanPool/FastDynamo/Local/HorizontalRieszPerturbation.lean +++ b/LeanPool/FastDynamo/Local/HorizontalRieszPerturbation.lean @@ -50,6 +50,10 @@ namespace FastDynamo noncomputable section +-- Instance search on the form graph only needs the bundled defect map. +-- Unfolding it expands the Sobolev and anti-dual instances during conversion. +attribute [local irreducible] associatedFormProdGraphDefect wholePlaneH1Graph + open MeasureTheory Metric Set /-! ## Two generic additions -/ @@ -373,8 +377,10 @@ theorem norm_stateResolvent_sub_le (nd : HorizontalNeumannData N delta w' w lam have hmem := iso.neumannOpen_subset_neumannSet (iso.sphere_subset_neumannOpen hz) have bound := norm_horizontalDeltaStateResolvent_sub_le N delta w' w z (nd.size_le hmem) nd.small (nd.solutionBound_le z hmem) - rw [nd.stateResolvent_eq hz, iso.contour_stateResolvent hz] - exact bound + have difference := congrArg₂ + (fun left right : WholePlaneC2L2 →L[ℂ] WholePlaneC2L2 => ‖left - right‖) + (nd.stateResolvent_eq hz) (iso.contour_stateResolvent hz) + exact difference.le.trans bound /-- **`‖P_{h,δ} - P⁰‖_{2→2} ≤ r‖j‖ Bη(1-Bη)^{-1}C`**, the explicit form of the display `‖P_{h,δ} - P⁰‖_{2→2} ≤ C(h^{1/4} + |δ-1|)` in the proof of `prop:local-seed`: the contour @@ -394,23 +400,16 @@ theorem norm_stateResolvent_sub_le_two (nd : HorizontalNeumannData N delta w' w (hz : z ∈ Metric.sphere lam iso.radius) : ‖nd.contourResolvent.stateResolvent z - iso.contourResolvent.stateResolvent z‖ ≤ 2 * ‖wholePlaneH1Embedding C2‖ * (nd.invBound * nd.formBound) * nd.solutionBound := by - have hden : (0 : ℝ) < 1 - nd.invBound * nd.formBound := by linarith - have hinvnn : (0 : ℝ) ≤ (1 - nd.invBound * nd.formBound)⁻¹ := le_of_lt (inv_pos.mpr hden) - have hmul : (1 - nd.invBound * nd.formBound)⁻¹ * (1 - nd.invBound * nd.formBound) = 1 := - inv_mul_cancel₀ (ne_of_gt hden) + have hden : (1 / 2 : ℝ) ≤ 1 - nd.invBound * nd.formBound := by linarith only [hhalf] have hinvle : (1 - nd.invBound * nd.formBound)⁻¹ ≤ 2 := by - nlinarith [hmul, hinvnn, hhalf] - have hj0 : (0 : ℝ) ≤ ‖wholePlaneH1Embedding C2‖ := - ContinuousLinearMap.opNorm_nonneg (wholePlaneH1Embedding C2) - have e1 : nd.invBound * nd.formBound * (1 - nd.invBound * nd.formBound)⁻¹ * - nd.solutionBound ≤ nd.invBound * nd.formBound * 2 * nd.solutionBound := - mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hinvle hc0) hC0 - have e2 : ‖wholePlaneH1Embedding C2‖ * (nd.invBound * nd.formBound * - (1 - nd.invBound * nd.formBound)⁻¹ * nd.solutionBound) ≤ - ‖wholePlaneH1Embedding C2‖ * (nd.invBound * nd.formBound * 2 * nd.solutionBound) := - mul_le_mul_of_nonneg_left e1 hj0 - refine le_trans (nd.norm_stateResolvent_sub_le hz) ?_ - linarith [e2] + calc + _ ≤ (1 / 2 : ℝ)⁻¹ := inv_anti₀ (by norm_num) hden + _ = 2 := by norm_num + have bound := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hinvle hc0) hC0 + refine (nd.norm_stateResolvent_sub_le hz).trans ?_ + have reorder (embedding size solution : ℝ) : + embedding * (size * 2 * solution) = 2 * embedding * size * solution := by ring + exact (mul_le_mul_of_nonneg_left bound (norm_nonneg _)).trans_eq (reorder _ _ _) /-- The projection difference under the working smallness `Bη ≤ 1/2`. -/ theorem norm_projection_sub_le_two (nd : HorizontalNeumannData N delta w' w lam iso) diff --git a/LeanPool/FastDynamo/Local/HorizontalSeedResolventH2.lean b/LeanPool/FastDynamo/Local/HorizontalSeedResolventH2.lean index afa3c2d653..c0eb3edc27 100644 --- a/LeanPool/FastDynamo/Local/HorizontalSeedResolventH2.lean +++ b/LeanPool/FastDynamo/Local/HorizontalSeedResolventH2.lean @@ -71,6 +71,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory open scoped ENNReal LineDeriv SchwartzMap diff --git a/LeanPool/FastDynamo/Local/HorizontalSeedUniformResolvent.lean b/LeanPool/FastDynamo/Local/HorizontalSeedUniformResolvent.lean index 69d90938e1..5a9e866dd5 100644 --- a/LeanPool/FastDynamo/Local/HorizontalSeedUniformResolvent.lean +++ b/LeanPool/FastDynamo/Local/HorizontalSeedUniformResolvent.lean @@ -58,6 +58,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory /-! ## Generic: the graph norm of the pencil solution map -/ diff --git a/LeanPool/FastDynamo/Local/HorizontalSeedWitness.lean b/LeanPool/FastDynamo/Local/HorizontalSeedWitness.lean index d4b8079d1c..0d35dd6f0e 100644 --- a/LeanPool/FastDynamo/Local/HorizontalSeedWitness.lean +++ b/LeanPool/FastDynamo/Local/HorizontalSeedWitness.lean @@ -50,6 +50,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory Filter open scoped ENNReal Topology open PonomarenkoFreeOmegaInterface diff --git a/LeanPool/FastDynamo/Local/HorizontalSpectrumEigenvalue.lean b/LeanPool/FastDynamo/Local/HorizontalSpectrumEigenvalue.lean index 237205ae26..38981cf2c3 100644 --- a/LeanPool/FastDynamo/Local/HorizontalSpectrumEigenvalue.lean +++ b/LeanPool/FastDynamo/Local/HorizontalSpectrumEigenvalue.lean @@ -44,6 +44,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory open scoped ENNReal diff --git a/LeanPool/FastDynamo/Local/HorizontalWeakForm.lean b/LeanPool/FastDynamo/Local/HorizontalWeakForm.lean index d932f236e4..c22f4197e5 100644 --- a/LeanPool/FastDynamo/Local/HorizontalWeakForm.lean +++ b/LeanPool/FastDynamo/Local/HorizontalWeakForm.lean @@ -601,10 +601,13 @@ theorem norm_horizontalStretchTransport_self_le (w : WholePlaneC3LInf) 5 * ‖w‖ * ‖wholePlaneH1Embedding C2 b‖ * (‖wholePlaneH1FirstDerivative C2 0 b‖ + ‖wholePlaneH1FirstDerivative C2 1 b‖) := by - have h1 := norm_horizontalTransportForm_apply_le w b b - have h2 := norm_horizontalStretchDivergenceForm_apply_le w b b - have h3 := norm_horizontalStretchGradientForm_apply_le w b b - nlinarith [h1, h2, h3] + have sum_bounds (velocity derivatives state : ℝ) : + velocity * derivatives * state + 2 * velocity * derivatives * state + + 2 * velocity * state * derivatives = 5 * velocity * state * derivatives := by + ring + exact (add_le_add (add_le_add (norm_horizontalTransportForm_apply_le w b b) + (norm_horizontalStretchDivergenceForm_apply_le w b b)) + (norm_horizontalStretchGradientForm_apply_le w b b)).trans_eq (sum_bounds _ _ _) /-- The explicit Gårding constant of `eq:jump-sectorial-form`, depending only on `N` and `‖w‖_∞`. -/ diff --git a/LeanPool/FastDynamo/Local/LocalSeedC2Concrete.lean b/LeanPool/FastDynamo/Local/LocalSeedC2Concrete.lean index 6ea0cd7349..e70ccb5fa2 100644 --- a/LeanPool/FastDynamo/Local/LocalSeedC2Concrete.lean +++ b/LeanPool/FastDynamo/Local/LocalSeedC2Concrete.lean @@ -57,6 +57,8 @@ namespace FastDynamo noncomputable section +attribute [local irreducible] associatedFormProdGraphDefect + open MeasureTheory HorizontalWeakForm PonomarenkoFreeOmegaInterface namespace HorizontalMode diff --git a/LeanPool/FastDynamo/Local/WholePlaneC2.lean b/LeanPool/FastDynamo/Local/WholePlaneC2.lean index 1023bd239e..4118c3e66f 100644 --- a/LeanPool/FastDynamo/Local/WholePlaneC2.lean +++ b/LeanPool/FastDynamo/Local/WholePlaneC2.lean @@ -248,11 +248,10 @@ theorem norm_wholePlaneC2CoordH1_apply_le (i : Fin 2) (b : WholePlaneC2H1) : have h0 := norm_wholePlaneC2CoordL2_apply_le i (wholePlaneH1Embedding C2 b) have h1 := norm_wholePlaneC2CoordL2_apply_le i (wholePlaneH1FirstDerivative C2 0 b) have h2 := norm_wholePlaneC2CoordL2_apply_le i (wholePlaneH1FirstDerivative C2 1 b) - have e0 := norm_nonneg (wholePlaneC2CoordL2 i (wholePlaneH1Embedding C2 b)) - have e1 := norm_nonneg (wholePlaneC2CoordL2 i (wholePlaneH1FirstDerivative C2 0 b)) - have e2 := norm_nonneg (wholePlaneC2CoordL2 i (wholePlaneH1FirstDerivative C2 1 b)) - nlinarith [h0, h1, h2, e0, e1, e2] - nlinarith [hsq, norm_nonneg (wholePlaneC2CoordH1 i b), norm_nonneg b] + exact add_le_add (pow_le_pow_left₀ (norm_nonneg _) h0 2) + (add_le_add (pow_le_pow_left₀ (norm_nonneg _) h1 2) + (pow_le_pow_left₀ (norm_nonneg _) h2 2)) + exact le_of_sq_le_sq hsq (norm_nonneg b) /-! ## Gradient, Laplacian, and the canonical inclusions -/