Exists irreducible factorization
ArkLib.Lattices.CyclotomicModulus.exists_irreducible_factorization
Plain-language statement
Factor existence. For q ≡ 5 (mod 8), X^{2^α}+1 factors over Z_q as a product of two coprime irreducible polynomials. Extracted from cyclotomic_card_normalizedFactors (the two normalized factors), with coprimality from Irreducible.coprime_iff_not_dvd.
Exact Lean statement
theorem exists_irreducible_factorization (hq5 : q % 8 = 5) {α : ℕ} (hα : 1 ≤ α) :
∃ p₁ p₂ : (ZMod q)[X], Irreducible p₁ ∧ Irreducible p₂ ∧ IsCoprime p₁ p₂ ∧
(X ^ (2 ^ α) + 1 : (ZMod q)[X]) = p₁ * p₂Formal artifact
Lean source
theorem exists_irreducible_factorization (hq5 : q % 8 = 5) {α : ℕ} (hα : 1 ≤ α) : ∃ p₁ p₂ : (ZMod q)[X], Irreducible p₁ ∧ Irreducible p₂ ∧ IsCoprime p₁ p₂ ∧ (X ^ (2 ^ α) + 1 : (ZMod q)[X]) = p₁ * p₂ := by classical have hqcop : ¬ (q ∣ 2 ^ (α + 1)) := by intro h have hq2 : q ∣ 2 := Nat.Prime.dvd_of_dvd_pow Fact.out h have := Nat.le_of_dvd (by norm_num) hq2; omega haveI : NeZero ((2 ^ (α + 1) : ℕ) : ZMod q) := ⟨by rw [Ne, ZMod.natCast_eq_zero_iff]; exact hqcop⟩ set f : (ZMod q)[X] := cyclotomic (2 ^ (α + 1)) (ZMod q) with hf have hfne : f ≠ 0 := cyclotomic_ne_zero _ _ have hf_monic : f.Monic := cyclotomic.monic _ _ have hsqf : Squarefree f := squarefree_cyclotomic _ _ have hnodup := (UniqueFactorizationMonoid.squarefree_iff_nodup_normalizedFactors hfne).mp hsqf have hcard : Multiset.card (UniqueFactorizationMonoid.normalizedFactors f) = 2 := by have h2 := cyclotomic_card_normalizedFactors q hq5 hα rw [← hf] at h2 rwa [← Multiset.toFinset_card_of_nodup hnodup] obtain ⟨a, b, hab⟩ := Multiset.card_eq_two.mp hcard have ha_mem : a ∈ UniqueFactorizationMonoid.normalizedFactors f := by rw [hab]; simp have hb_mem : b ∈ UniqueFactorizationMonoid.normalizedFactors f := by rw [hab]; simp have ha_irr := UniqueFactorizationMonoid.irreducible_of_normalized_factor a ha_mem have hb_irr := UniqueFactorizationMonoid.irreducible_of_normalized_factor b hb_mem have ha_monic : a.Monic := by have h := UniqueFactorizationMonoid.normalize_normalized_factor a ha_mem rw [← h]; exact monic_normalize ha_irr.ne_zero have hb_monic : b.Monic := by have h := UniqueFactorizationMonoid.normalize_normalized_factor b hb_mem rw [← h]; exact monic_normalize hb_irr.ne_zero have hne : a ≠ b := by have := hnodup; rw [hab] at this; simpa using this have hprod : a * b = f := by have hassoc : Associated (a * b) f := by have := UniqueFactorizationMonoid.prod_normalizedFactors hfne rwa [hab, Multiset.prod_pair] at this calc a * b = normalize (a * b) := ((ha_monic.mul hb_monic).normalize_eq_self).symm _ = normalize f := normalize_eq_normalize_iff.mpr ⟨hassoc.dvd, hassoc.symm.dvd⟩ _ = f := hf_monic.normalize_eq_self have hcop : IsCoprime a b := by rw [ha_irr.coprime_iff_not_dvd] intro hdvd have hassoc : Associated a b := ha_irr.associated_of_dvd hb_irr hdvd refine hne ?_ calc a = normalize a := (ha_monic.normalize_eq_self).symm _ = normalize b := normalize_eq_normalize_iff.mpr ⟨hassoc.dvd, hassoc.symm.dvd⟩ _ = b := hb_monic.normalize_eq_self exact ⟨a, b, ha_irr, hb_irr, hcop, by rw [Xpow_add_one_eq_cyclotomic q α, ← hf, ← hprod]⟩- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Data/Lattices/CyclotomicRing/Subfield/Field.lean:96-142
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.