Download data/lean/OAI/Analysis/Fourier/SquareFunction/CubeVectors.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.88 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Fourier/SquareFunction/CubeVectors.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Fourier/SquareFunction/CubeVectors.lean
-
curl -L -o CubeVectors.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Fourier/SquareFunction/CubeVectors.lean
9.88 kB
| import OAI.Analysis.Fourier.SquareFunction.CubeKernels | |
| import OAI.Analysis.Fourier.SquareFunction.ScaleVectors | |
| import OAI.Analysis.Fourier.SquareFunction.ScaleDecomposition | |
| import OAI.Analysis.Fourier.SquareFunction.SharpEnvelope | |
| import OAI.Analysis.Fourier.SquareFunction.MiddleAverage | |
| open OAI.Analysis.Fourier.Wave | |
| /-! The actual low and high convolution vectors on a cube. -/ | |
| namespace OAI.Analysis.Fourier.SquareFunction | |
| open _root_.MeasureTheory Set Metric | |
| open scoped ENNReal | |
| theorem norm_le_of_enorm_product {H : Type*} [NormedAddCommGroup H] | |
| {u : H} {A : β} {B D : ββ₯0β} (hA : 0 β€ A) (hB : B β β) (hD : D β β) | |
| (h : βuββ β€ ENNReal.ofReal A * (B * D)) : | |
| βuβ β€ A * (B.toReal * D.toReal) := by | |
| have ht : ENNReal.ofReal A * (B * D) β β := | |
| ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.mul_ne_top hB hD) | |
| have hh := ENNReal.toReal_mono ht h | |
| simpa only [toReal_enorm, ENNReal.toReal_mul, ENNReal.toReal_ofReal hA] using hh | |
| theorem component_maximal_le_vector_maximal {n : β} {I : Type*} [Fintype I] | |
| (f : I β Space n β β) (i : I) (z : Space n) : | |
| ballMaximal volume (fun y => βf i yββ) z β€ | |
| ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z := by | |
| apply ballMaximal_mono | |
| intro y | |
| simpa only [ofReal_norm] using ENNReal.ofReal_le_ofReal (component_norm_le_vectorNorm (fun i => f i y) i) | |
| /-- The entire low vector enjoys a geometric gain, independent of the | |
| number of scales. The derivative estimate is the one in the source lemma. -/ | |
| theorem low_cube_vector {n : β} {H : Type*} | |
| [NormedAddCommGroup H] [NormedSpace β H] [CompleteSpace H] | |
| (s : Finset β€) (Q : BoxIntegral.Box (Fin n)) {d q C : β} | |
| (hd : 0 < d) (hside : β i, Q.upper i - Q.lower i = d) | |
| (hq : (n : β) < q) (hC : 0 β€ C) | |
| (K : s β Space n β H) (f : s β Space n β β) | |
| (hKd : β i, Differentiable β (K i)) | |
| (hK : β i u, βfderiv β (K i) uβ β€ C * (((2 : β) ^ i.val) ^ n * (2 : β) ^ i.val) * | |
| ((2 : β) ^ i.val * βuβ + 1) ^ (-q)) | |
| (hB : β i, BddAbove (range fun x => βK i xβ)) | |
| (hfm : β i, Measurable (f i)) (hfi : β i, Integrable (f i)) | |
| {j L : β€} (hL : 0 β€ L) (hj : (2 : β) ^ j * (2 * (((n : β) + 1) * d)) β€ 1) | |
| {x z : Space n} (hx : x β euclideanBox Q) (hz : z β euclideanBox Q) | |
| (hM : ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z β β) : | |
| vectorNorm (lowScaleDifference Subtype.val j L | |
| (fun i => convolveKernel (K i) (f i) x) | |
| (fun i => convolveKernel (K i) (f i) (cubeCorner Q))) β€ | |
| Real.sqrt (4 / 3) * (2 : β) ^ (-L) * | |
| (C * 2 ^ q * (polynomialKernelMass n q).toReal * | |
| (ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z).toReal) := by | |
| classical | |
| let M := ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z | |
| let m := (polynomialKernelMass n q).toReal | |
| apply low_scale_vector_le s (j := j) (L := L) _ (by positivity) | |
| intro i | |
| by_cases hi : i.val β€ j - L | |
| Β· have hij : i.val β€ j := by omega | |
| have ha : 0 < (2 : β) ^ i.val := zpow_pos (by norm_num) _ | |
| have has : (2 : β) ^ i.val * (2 * (n : β) * d) β€ 1 := by | |
| apply le_trans _ (reference_scale_unit hj hij) | |
| apply mul_le_mul_of_nonneg_left _ ha.le | |
| nlinarith | |
| have hfactor : (2 : β) ^ i.val * ((n : β) * d) β€ (2 : β) ^ (i.val - j) := by | |
| apply le_trans _ (reference_scale_upper hj i.val) | |
| apply mul_le_mul_of_nonneg_left _ ha.le | |
| nlinarith [mul_nonneg (Nat.cast_nonneg n) hd.le] | |
| have hh := low_convolution_on_cube Q hd hside ha (lt_of_le_of_lt (Nat.cast_nonneg n) hq) | |
| hC has (hKd i) (hK i) (hB i) (hfm i) (hfi i) hx hz | |
| have hh' : βconvolveKernel (K i) (f i) x - convolveKernel (K i) (f i) (cubeCorner Q)ββ β€ | |
| ENNReal.ofReal (C * 2 ^ q * (2 : β) ^ (i.val - j)) * (polynomialKernelMass n q * M) := by | |
| apply hh.trans | |
| apply mul_le_mul | |
| Β· apply ENNReal.ofReal_le_ofReal | |
| nlinarith [mul_le_mul_of_nonneg_left hfactor (show 0 β€ C * 2 ^ q by positivity)] | |
| Β· exact mul_le_mul_right (component_maximal_le_vector_maximal f i z) _ | |
| Β· exact bot_le | |
| Β· exact bot_le | |
| have hn := norm_le_of_enorm_product (by positivity : 0 β€ C * 2 ^ q * (2 : β) ^ (i.val - j)) | |
| (polynomialKernelMass_lt_top hq).ne hM hh' | |
| simp only [lowScaleDifference, hi, ite_true] | |
| convert hn using 1 ; ring | |
| Β· simp only [lowScaleDifference, hi, ite_false, norm_zero, zero_mul, le_refl] | |
| /-- The off-diagonal high vector has the same summable scale gain. Here the | |
| one spare decay power is used; the remaining kernel still has exponent `>n`. -/ | |
| theorem high_cube_vector {n : β} {H : Type*} | |
| [NormedAddCommGroup H] [NormedSpace β H] [CompleteSpace H] | |
| (s : Finset β€) (Q : BoxIntegral.Box (Fin n)) {d q C : β} | |
| (hd : 0 < d) (hside : β i, Q.upper i - Q.lower i = d) | |
| (hq : (n : β) + 1 < q) (hC : 0 β€ C) | |
| (K : s β Space n β H) (f : s β Space n β β) | |
| (hK : β i u, βK i uβ β€ C * ((2 : β) ^ i.val) ^ n * | |
| ((2 : β) ^ i.val * βuβ + 1) ^ (-q)) | |
| (hfm : β i, Measurable (f i)) | |
| {j L : β€} (hj : 1 / 2 < (2 : β) ^ j * (2 * (((n : β) + 1) * d))) | |
| {x z : Space n} (hx : x β euclideanBox Q) (hz : z β euclideanBox Q) | |
| (hM : ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z β β) : | |
| vectorNorm (highScaleTerm Subtype.val j L (fun i => convolveKernel (K i) | |
| ((ball (cubeCorner Q) (8 * (((n : β) + 1) * d)))αΆ.indicator (f i)) x)) β€ | |
| Real.sqrt (4 / 3) * (2 : β) ^ (-L) * | |
| (C * 2 ^ q * (polynomialKernelMass n (q - 1)).toReal * | |
| (ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z).toReal) := by | |
| classical | |
| let M := ballMaximal volume (fun y => ENNReal.ofReal (vectorNorm (fun i => f i y))) z | |
| apply high_scale_vector_le s (j := j) (L := L) _ (by positivity) | |
| intro i | |
| by_cases hi : j + L β€ i.val | |
| Β· have ha : 0 < (2 : β) ^ i.val := zpow_pos (by norm_num) _ | |
| have hr : 0 < q - 1 := by linarith [show (0 : β) β€ n from Nat.cast_nonneg n] | |
| have hfactor : ((2 : β) ^ i.val * (4 * (((n : β) + 1) * d)))β»ΒΉ β€ | |
| (2 : β) ^ (-(i.val - j)) := by | |
| convert reference_tail_inverse hj i.val using 1 ; congr 2 ; ring | |
| have hh := tail_convolution_on_cube Q hd hside ha hr (by linarith : q - 1 β€ q) | |
| hC (hK i) (hfm i) hx hz | |
| rw [show q - 1 - q = (-1 : β) by ring, Real.rpow_neg_one] at hh | |
| have hh' : βconvolveKernel (K i) | |
| ((ball (cubeCorner Q) (8 * (((n : β) + 1) * d)))αΆ.indicator (f i)) xββ β€ | |
| ENNReal.ofReal (C * 2 ^ q * (2 : β) ^ (-(i.val - j))) * | |
| (polynomialKernelMass n (q - 1) * M) := by | |
| apply hh.trans | |
| apply mul_le_mul | |
| Β· apply ENNReal.ofReal_le_ofReal | |
| exact mul_le_mul_of_nonneg_left hfactor (by positivity) | |
| Β· exact mul_le_mul_right (component_maximal_le_vector_maximal f i z) _ | |
| Β· exact bot_le | |
| Β· exact bot_le | |
| have hn := norm_le_of_enorm_product (by positivity : 0 β€ C * 2 ^ q * (2 : β) ^ (-(i.val - j))) | |
| (polynomialKernelMass_lt_top (show (n : β) < q - 1 by linarith)).ne hM hh' | |
| simp only [highScaleTerm, hi, ite_true] | |
| convert hn using 1 ; ring | |
| Β· simp only [highScaleTerm, hi, ite_false, norm_zero, zero_mul, le_refl] | |
| theorem middle_subtype_card (s : Finset β€) (j L : β€) : | |
| ((Finset.univ : Finset s).filter (fun i => j - L < i.val β§ i.val < j + L)).card β€ | |
| (2 * L).toNat := by | |
| classical | |
| have he : ((Finset.univ : Finset s).filter (fun i => j - L < i.val β§ i.val < j + L)).card = | |
| (s.filter (fun k => j - L < k β§ k < j + L)).card := by | |
| have hh := sum_mask_over_subtype (s := s) (fun k => j - L < k β§ k < j + L) (fun _ => (1 : β)) | |
| rw [β Finset.sum_filter] at hh | |
| simpa using hh | |
| rw [he] | |
| exact middle_window_card | |
| /-- The middle window on an arbitrary genuine cube has the desired | |
| `(2L)^(1/2-1/p)` loss, irrespective of the total number of scales. -/ | |
| theorem middle_cube_vector_average {n : β} {H : Type*} | |
| [NormedAddCommGroup H] [MeasurableSpace H] [BorelSpace H] | |
| (s : Finset β€) (Q : BoxIntegral.Box (Fin n)) {d : β} | |
| (hd : 0 < d) (hside : β i, Q.upper i - Q.lower i = d) | |
| (u : s β Space n β H) (hu : β i, Measurable (u i)) | |
| (j L : β€) {p : β} (hp : 2 β€ p) | |
| {z : Space n} (hz : z β euclideanBox Q) : | |
| (β«β» x in euclideanBox Q, ENNReal.ofReal (vectorNorm | |
| (middleScaleTerm Subtype.val j L (fun i => u i x)))) / volume (euclideanBox Q) β€ | |
| (cubeBallRatio n ^ (1 / 2 : β) * ((2 * L).toNat : ββ₯0β) ^ (1 / 2 - 1 / p)) * | |
| (β i, ballMaximal volume (fun x => βu i xββ ^ (2 : β)) z ^ (p / 2)) ^ (1 / p) := by | |
| classical | |
| have hQball : euclideanBox Q β ball (cubeCorner Q) (8 * (((n : β) + 1) * d)) := by | |
| intro y hy | |
| have hy0 := euclideanBox_subset_ball Q hd hside hy | |
| have hr : 0 < ((n : β) + 1) * d := by positivity | |
| exact mem_ball.mpr ((mem_ball.mp hy0).trans_le (by linarith)) | |
| have h := masked_middle_vector_average u hu (D := cubeBallRatio n) | |
| (fun i => j - L < i.val β§ i.val < j + L) | |
| (by rw [volume_euclideanBox]; exact volume_box_ne_zero Q) | |
| (by rw [volume_euclideanBox]; exact (Q.measure_coe_lt_top volume).ne) | |
| hQball (hQball hz) | |
| (by simpa only [cubeBallRatio, mul_assoc] using | |
| (volume_enlarged_cube_ball Q hd (show 0 < 8 * ((n : β) + 1) by positivity) hside).le) hp | |
| apply h.trans | |
| apply mul_le_mul_left | |
| apply mul_le_mul_right | |
| apply ENNReal.rpow_le_rpow | |
| Β· exact_mod_cast middle_subtype_card s j L | |
| Β· have hpp : 0 < p := by linarith | |
| have hdiv : 1 / p β€ (1 : β) / 2 := one_div_le_one_div_of_le (by norm_num) hp | |
| linarith | |
| end OAI.Analysis.Fourier.SquareFunction | |