Download data/lean/OAI/NumberTheory/TwoPoint/Circuits/CircuitErrorCutoff.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.68 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Circuits/CircuitErrorCutoff.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/TwoPoint/Circuits/CircuitErrorCutoff.lean
-
curl -L -o CircuitErrorCutoff.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/TwoPoint/Circuits/CircuitErrorCutoff.lean
3.68 kB
| import OAI.NumberTheory.TwoPoint.Circuits.CircuitSemiExact | |
| namespace OAI | |
| /-! The algebraic error-cutoff step of Braverman's Lemma 10. A Fourier | |
| approximation of the exceptional event suppresses the large polynomial | |
| values on that event while preserving exact zeros. -/ | |
| namespace TwoPointCorrelations | |
| open scoped Classical | |
| noncomputable def exceptionalExtension {n : β} (F : BooleanCube n β β) | |
| (E : BooleanCube n β Bool) (x : BooleanCube n) : β := | |
| if E x then 1 else F x | |
| noncomputable def errorCutoffPolynomial {n : β} (P T : BooleanCube n β β) | |
| (x : BooleanCube n) : β := P x * (1 - T x) | |
| lemma exceptionalExtension_boolean {n : β} {F : BooleanCube n β β} | |
| (hF : β x, F x = 0 β¨ F x = 1) (E : BooleanCube n β Bool) (x : BooleanCube n) : | |
| exceptionalExtension F E x = 0 β¨ exceptionalExtension F E x = 1 := by | |
| unfold exceptionalExtension | |
| split_ifs | |
| Β· exact Or.inr rfl | |
| Β· exact hF x | |
| lemma errorCutoffPolynomial_zero {n : β} {F P T : BooleanCube n β β} | |
| {E : BooleanCube n β Bool} (he : β x, E x = false β P x = F x) | |
| (x : BooleanCube n) (hx : exceptionalExtension F E x = 0) : | |
| errorCutoffPolynomial P T x = 0 := by | |
| have hE : E x = false := by | |
| cases h : E x <;> simp_all [exceptionalExtension] | |
| have hF : F x = 0 := by simpa [exceptionalExtension, hE] using hx | |
| simp [errorCutoffPolynomial, he x hE, hF] | |
| lemma errorCutoffPolynomial_degree {n p q : β} {P T : BooleanCube n β β} | |
| (hP : WalshDegreeLE P p) (hT : WalshDegreeLE T q) : | |
| WalshDegreeLE (errorCutoffPolynomial P T) (p + q) := | |
| hP.mul ((WalshDegreeLE.const 1 q).sub hT) | |
| lemma errorCutoffPolynomial_sq_bound {n : β} {F P T : BooleanCube n β β} | |
| {E : BooleanCube n β Bool} (hF : β x, F x = 0 β¨ F x = 1) | |
| (he : β x, E x = false β P x = F x) {B : β} (hB : 1 β€ B) | |
| (hP : β x, |P x| β€ B) (x : BooleanCube n) : | |
| (exceptionalExtension F E x - errorCutoffPolynomial P T x) ^ 2 β€ | |
| 2 * (if E x then (1 : β) else 0) + | |
| 2 * B ^ 2 * ((if E x then (1 : β) else 0) - T x) ^ 2 := by | |
| have hp : (P x) ^ 2 β€ B ^ 2 := by | |
| have ha := abs_le.mp (hP x) | |
| nlinarith | |
| have hBsq : 1 β€ B ^ 2 := by nlinarith | |
| cases hE : E x | |
| Β· have heq := he x hE | |
| rcases hF x with hf | hf | |
| Β· simp [exceptionalExtension, errorCutoffPolynomial, hE, heq, hf] | |
| positivity | |
| Β· simp only [exceptionalExtension, errorCutoffPolynomial, hE, | |
| Bool.false_eq_true, ite_false, heq, hf, one_mul, mul_zero, zero_add] | |
| have hh := mul_le_mul_of_nonneg_right hBsq (sq_nonneg (T x)) | |
| nlinarith only [hh, sq_nonneg (T x)] | |
| Β· simp only [exceptionalExtension, errorCutoffPolynomial, hE, ite_true] | |
| have hh := mul_le_mul_of_nonneg_right hp (sq_nonneg (1 - T x)) | |
| nlinarith only [hh, sq_nonneg (1 + P x * (1 - T x))] | |
| theorem errorCutoffPolynomial_mean_sq {n : β} {F P T : BooleanCube n β β} | |
| {E : BooleanCube n β Bool} (hF : β x, F x = 0 β¨ F x = 1) | |
| (he : β x, E x = false β P x = F x) {B Ξ΄ Ξ΅ : β} (hB : 1 β€ B) | |
| (hP : β x, |P x| β€ B) | |
| (hE : cubeAverage (fun x => if E x then (1 : β) else 0) β€ Ξ΄) | |
| (hT : cubeAverage (fun x => ((if E x then (1 : β) else 0) - T x) ^ 2) β€ Ξ΅) : | |
| cubeAverage (fun x => | |
| (exceptionalExtension F E x - errorCutoffPolynomial P T x) ^ 2) β€ | |
| 2 * Ξ΄ + 2 * B ^ 2 * Ξ΅ := by | |
| have hh := cubeAverage_mono (errorCutoffPolynomial_sq_bound (T := T) hF he hB hP) | |
| rw [cubeAverage_add, cubeAverage_mul_const, cubeAverage_mul_const] at hh | |
| exact hh.trans (add_le_add (mul_le_mul_of_nonneg_left hE (by norm_num)) | |
| (mul_le_mul_of_nonneg_left hT (by positivity))) | |
| end TwoPointCorrelations | |
| end OAI | |