Prob schwartz zippel mv polynomial
prob_schwartz_zippel_mv_polynomial
Plain-language statement
Schwartz-Zippel Lemma (Probability Form): For a non-zero multivariate polynomial P of total degree at most d over a finite field L, the probability that P(r) evaluates to 0 for a uniformly random r is at most d / |L|.
Exact Lean statement
lemma prob_schwartz_zippel_mv_polynomial {R : Type} [CommRing R] [IsDomain R] [Fintype R]
{n : ℕ}
(P : MvPolynomial (Fin n) R) (h_nonzero : P ≠ 0) (h_deg : P.totalDegree ≤ n) :
Pr_{ let r ←$ᵖ (Fin n → R) }[ MvPolynomial.eval r P = 0 ] ≤
(n : ℝ≥0) / (Fintype.card R : ℝ≥0)Formal artifact
Lean source
lemma prob_schwartz_zippel_mv_polynomial {R : Type} [CommRing R] [IsDomain R] [Fintype R] {n : ℕ} (P : MvPolynomial (Fin n) R) (h_nonzero : P ≠ 0) (h_deg : P.totalDegree ≤ n) : Pr_{ let r ←$ᵖ (Fin n → R) }[ MvPolynomial.eval r P = 0 ] ≤ (n : ℝ≥0) / (Fintype.card R : ℝ≥0) := by classical rw [prob_uniform_eq_card_filter_div_card] push_cast have sz_bound := MvPolynomial.schwartz_zippel_totalDegree (R := R) (n := n) (p := P) (hp := h_nonzero) (S := Finset.univ) simp only [Fintype.piFinset_univ, card_univ] at sz_bound have sz_bound_le_n_div_card_R : ((#{f | (MvPolynomial.eval f) P = 0}) : ℚ≥0) / ((Fintype.card R ^ n)) ≤ (n : ℚ≥0) / ((#(Finset.univ : Finset R)) : ℚ≥0) := by calc _ ≤ (P.totalDegree : ℚ≥0) / ((#(Finset.univ : Finset R)) : ℚ≥0) := sz_bound _ ≤ _ := by simp only [card_univ] apply div_le_of_le_mul₀ (hb := by simp only [zero_le]) (hc := by simp only [zero_le]) -- ⊢ ↑P.totalDegree ≤ ↑n / ↑(Fintype.card R) * ↑(Fintype.card R) rw [div_mul_cancel₀ (h := by simp only [ne_eq, Nat.cast_eq_zero, Fintype.card_ne_zero, not_false_eq_true])] exact Nat.cast_le.mpr h_deg have sz_bound_ENNReal : ((#{f | (MvPolynomial.eval f) P = 0}) : ENNReal) / ((Fintype.card R ^ n) : ℕ) ≤ (n : ENNReal) / (Fintype.card R : ENNReal) := by simp_rw [ENNReal.coe_Nat_coe_NNRat] conv_lhs => rw [ENNReal.coe_div_of_NNRat (hb := by simp only [Nat.cast_pow, ne_eq, pow_eq_zero_iff', Nat.cast_eq_zero, Fintype.card_ne_zero, false_and, not_false_eq_true])] conv_rhs => rw [ENNReal.coe_div_of_NNRat (hb := by simp only [ne_eq, Nat.cast_eq_zero, Fintype.card_ne_zero, not_false_eq_true])] rw [ENNReal.coe_le_of_NNRat] simp only [Nat.cast_pow] exact sz_bound_le_n_div_card_R simp only [Fintype.card_pi, prod_const, card_univ, Fintype.card_fin, Nat.cast_pow, ge_iff_le] rw [Nat.cast_pow] at sz_bound_ENNReal exact sz_bound_ENNReal- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Data/Probability/Instances.lean:457-492
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Affine gaps lifted to interleaved codes
affine_gaps_lifted_to_interleaved_codes
Project documentation
This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose coeff
ArkLib.Lattices.Ajtai.gadgetDecompose_coeff
Plain-language statement
The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose lawful
ArkLib.Lattices.Ajtai.gadgetDecompose_lawful
Plain-language statement
The base-b gadget decomposition is a lawful gadget decomposition.
Source project: ArkLib
Person-level attribution pending.