Xpow mul coeff
ArkLib.Lattices.CyclotomicModulus.Xpow_mul_coeff
Plain-language statement
Coefficient of an X^e-shift of a reduced element. For e < d, p < d and any x : R_q, the p-th coefficient of x·X^e is the (p-e)-th coefficient of x (no wrap, e ≤ p), or minus the (p+d-e)-th coefficient (one wrap past X^d = -1, p < e). This is the only place the proof needs the ring's multiplication; everything downstream is coef...
Exact Lean statement
theorem Xpow_mul_coeff (α e : ℕ) (he : e < 2 ^ α) (x : Rq (powTwoCyclotomic (R := R) α))
{p : ℕ} (hp : p < 2 ^ α) :
(x * Xpow (powTwoCyclotomic α) e).1.coeff p
= if e ≤ p then x.1.coeff (p - e) else - x.1.coeff (p + 2 ^ α - e)Formal artifact
Lean source
theorem Xpow_mul_coeff (α e : ℕ) (he : e < 2 ^ α) (x : Rq (powTwoCyclotomic (R := R) α)) {p : ℕ} (hp : p < 2 ^ α) : (x * Xpow (powTwoCyclotomic α) e).1.coeff p = if e ≤ p then x.1.coeff (p - e) else - x.1.coeff (p + 2 ^ α - e) := by have hexp : x = ∑ k ∈ Finset.range (2 ^ α), Rq.mk (powTwoCyclotomic α) (CompPoly.CPolynomial.monomial k (x.1.coeff k)) := by conv_lhs => rw [← galoisAut_one_eq α x] rw [galoisAut_eq_sum] simp only [_root_.mul_one, powTwoCyclotomic_natDegree] conv_lhs => rw [hexp, Finset.sum_mul, ← Rq.coeffHom_apply, map_sum] simp only [Rq.coeffHom_apply, mk_monomial_mul_Xpow, mk_monomial_coeff_full] by_cases hep : e ≤ p · rw [if_pos hep, Finset.sum_eq_single (p - e)] · have h1 : p - e + e = p := by omega rw [h1, Nat.mod_eq_of_lt hp, Nat.div_eq_of_lt hp, pow_zero, _root_.one_mul, if_pos rfl] · intro k hk hkne rw [Finset.mem_range] at hk rw [if_neg] intro hpk rcases lt_or_ge (k + e) (2 ^ α) with hlt | hge · rw [Nat.mod_eq_of_lt hlt] at hpk; exact hkne (by omega) · rw [Nat.mod_eq_sub_mod hge, Nat.mod_eq_of_lt (by omega)] at hpk; omega · intro h; exact absurd (Finset.mem_range.mpr (by omega : p - e < 2 ^ α)) h · rw [if_neg hep, Finset.sum_eq_single (p + 2 ^ α - e)] · have h1 : p + 2 ^ α - e + e = p + 2 ^ α := by omega rw [h1, Nat.add_mod_right, Nat.mod_eq_of_lt hp, Nat.add_div_right _ (by positivity), Nat.div_eq_of_lt hp, _root_.zero_add, pow_one, neg_one_mul, if_pos rfl] · intro k hk hkne rw [Finset.mem_range] at hk rw [if_neg] intro hpk rcases lt_or_ge (k + e) (2 ^ α) with hlt | hge · rw [Nat.mod_eq_of_lt hlt] at hpk; omega · rw [Nat.mod_eq_sub_mod hge, Nat.mod_eq_of_lt (by omega)] at hpk; exact hkne (by omega) · intro h; exact absurd (Finset.mem_range.mpr (by omega : p + 2 ^ α - e < 2 ^ α)) h- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Data/Lattices/CyclotomicRing/Subfield/Basis.lean:434-468
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.