All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Four pow i reindex

ArkLib.Lattices.CyclotomicModulus.four_pow_i_reindex

Plain-language statement

Claim 1 reindex: ∑_{a<n} X^{i·((4k+1)^a mod 2d)} = X^i·∑_{j<n} (X^{4ki})^j. The subgroup ⟨4k+1⟩ = {(4k+1)^a mod 2d} equals the arithmetic progression {4k·j+1 : j<n} (both have n distinct elements, and (4k+1)^a ≡ 1 mod 4k), which linearizes the exponent and exposes the geometric series.

Exact Lean statement

theorem four_pow_i_reindex (α κ i : ℕ) (hκ : κ + 1 ≤ α) :
    ∑ a ∈ Finset.range (2 ^ (α - κ - 1)),
        Xpow (powTwoCyclotomic (R := R) α) (i * ((4 * 2 ^ κ + 1) ^ a % 2 ^ (α + 1)))
      = Xpow (powTwoCyclotomic (R := R) α) i
        * ∑ j ∈ Finset.range (2 ^ (α - κ - 1)),
            (Xpow (powTwoCyclotomic (R := R) α) (4 * 2 ^ κ * i)) ^ j

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem four_pow_i_reindex (α κ i : ) (hκ : κ + 1  α) :    ∑ a  Finset.range (2 ^- κ - 1)),        Xpow (powTwoCyclotomic (R := R) α) (i * ((4 * 2 ^ κ + 1) ^ a % 2 ^+ 1)))      = Xpow (powTwoCyclotomic (R := R) α) i        * ∑ j  Finset.range (2 ^- κ - 1)),            (Xpow (powTwoCyclotomic (R := R) α) (4 * 2 ^ κ * i)) ^ j := by  have h2κ : 1  2 ^ κ := Nat.one_le_two_pow  have hgM : (4 * 2 ^ κ : ) ∣ 2 ^+ 1) := by    rw [show (4 * 2 ^ κ : ) = 2 ^ (2 + κ) from by rw [show (4 : ) = 2 ^ 2 from rfl,  pow_add]]    exact pow_dvd_pow 2 (by omega)  have hMn : 4 * 2 ^ κ * 2 ^- κ - 1) = 2 ^+ 1) := by    rw [show (4 : ) = 2 ^ 2 from rfl, mul_assoc,  pow_add,  pow_add]; congr 1; omega  have hφinj : Set.InjOn (fun a => (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1))      ↑(Finset.range (2 ^- κ - 1))) := four_pow_injOn κ α hκ  have hψinj : Set.InjOn (fun j => 4 * 2 ^ κ * j + 1)      ↑(Finset.range (2 ^- κ - 1))) := by    intro a _ b _ h    exact Nat.eq_of_mul_eq_mul_left (by positivity) (Nat.add_right_cancel h)  have himg : (Finset.range (2 ^- κ - 1))).image        (fun a => (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1))      = (Finset.range (2 ^- κ - 1))).image (fun j => 4 * 2 ^ κ * j + 1) := by    apply Finset.eq_of_subset_of_card_le    · intro x hx      rw [Finset.mem_image] at hx       obtain a, _, rfl := hx      have hlt : (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) < 2 ^+ 1) := Nat.mod_lt _ (by positivity)      have hmod1 : (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) % (4 * 2 ^ κ) = 1 := by        rw [Nat.mod_mod_of_dvd _ hgM, Nat.pow_mod,          show (4 * 2 ^ κ + 1) % (4 * 2 ^ κ) = 1 from by            rw [Nat.add_mod_left]; exact Nat.mod_eq_of_lt (by omega),          one_pow, Nat.mod_eq_of_lt (by omega)]      have hge1 : 1  (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) := by        rcases Nat.eq_zero_or_pos ((4 * 2 ^ κ + 1) ^ a % 2 ^+ 1)) with h | h        · rw [h, Nat.zero_mod] at hmod1; exact absurd hmod1 (by norm_num)        · exact h      have hdvd : (4 * 2 ^ κ) ∣ ((4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) - 1) :=        (Nat.modEq_iff_dvd' hge1).mp (by rw [Nat.ModEq, hmod1, Nat.mod_eq_of_lt (by omega)])      refine ((4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) - 1) / (4 * 2 ^ κ), ?_, ?_      · rw [Finset.mem_range]        have hbound : (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1) - 1 < 4 * 2 ^ κ * 2 ^- κ - 1) := by          rw [hMn]; omega        exact Nat.div_lt_of_lt_mul hbound      · rw [Nat.mul_div_cancel' hdvd]; omega    · rw [Finset.card_image_of_injOn hφinj, Finset.card_image_of_injOn hψinj]  have e1 : ∑ a  Finset.range (2 ^- κ - 1)),        Xpow (powTwoCyclotomic (R := R) α) (i * ((4 * 2 ^ κ + 1) ^ a % 2 ^+ 1)))      = ∑ x  (Finset.range (2 ^- κ - 1))).image          (fun a => (4 * 2 ^ κ + 1) ^ a % 2 ^+ 1)),          Xpow (powTwoCyclotomic (R := R) α) (i * x) :=    (Finset.sum_image (f := fun x => Xpow (powTwoCyclotomic (R := R) α) (i * x)) hφinj).symm  have e2 : ∑ x  (Finset.range (2 ^- κ - 1))).image (fun j => 4 * 2 ^ κ * j + 1),        Xpow (powTwoCyclotomic (R := R) α) (i * x)      = ∑ j  Finset.range (2 ^- κ - 1)),          Xpow (powTwoCyclotomic (R := R) α) (i * (4 * 2 ^ κ * j + 1)) :=    Finset.sum_image (f := fun x => Xpow (powTwoCyclotomic (R := R) α) (i * x)) hψinj  rw [e1, himg, e2, Finset.mul_sum]  refine Finset.sum_congr rfl (fun j _ => ?_)  rw [show i * (4 * 2 ^ κ * j + 1) = i + 4 * 2 ^ κ * i * j from by ring, Xpow_add, Xpow_mul]
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Data/Lattices/CyclotomicRing/Subfield/TraceVanishing.lean:109-166

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

Project-declaredLean 4.31.0

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...

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

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.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose lawful

ArkLib.Lattices.Ajtai.gadgetDecompose_lawful

Plain-language statement

The base-b gadget decomposition is a lawful gadget decomposition.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record