Documentation

CslibFrontier.Foundations.Data.Code.ProximityGap.Johnson.DegZ

Shared Degree Bounds and Variable-Specialization Helpers #

Internal foundation for the Johnson-bound proximity-gap split: the Z-degree measures degZ₂ and degZ, the subadditive DegBound resultant-degree bundler, the curve polynomial curveWord, and specialization homomorphisms evZ, evZ₁, and evZ₂. Imported privately by the sibling submodules under CslibFrontier.Foundations.Data.Code.ProximityGap.Johnson.

Main definitions #

noncomputable def Cslib.Code.ProximityGap.degZ₂ {R : Type u_1} [CommSemiring R] (f : Polynomial (Polynomial R)) :

Z-degree of f ∈ R[Z][X].

theorem Cslib.Code.ProximityGap.degZ₂_mul {R : Type u_1} [CommRing R] [IsDomain R] {f g : Polynomial (Polynomial R)} (hf : f ≠ 0) (hg : g ≠ 0) :

Z-degree of Q ∈ R[Z][X][Y].

theorem Cslib.Code.ProximityGap.degZ_le_iff {R : Type u_1} [CommSemiring R] {Q : Polynomial (Polynomial (Polynomial R))} {B : ℕ} :
degZ Q ≤ B ↔ ∀ (a b : ℕ), ((Q.coeff b).coeff a).natDegree ≤ B
theorem Cslib.Code.ProximityGap.degZ_le_of_dvd {R : Type u_1} [CommRing R] [IsDomain R] {A B : Polynomial (Polynomial (Polynomial R))} (hB : B ≠ 0) (hdvd : A ∣ B) :
structure Cslib.Code.ProximityGap.DegBound (R : Type u_1) [CommRing R] :
Type u_1

Bundler for subadditive degree-like measures deg : R → ℕ (covers natDegree in R[X] and degZ₂ in R[X][X]).

  • deg : R → ℕ

    Degree function mapping ring elements to ℕ.

  • zero : self.deg 0 = 0

    Degree of 0 is 0.

  • one : self.deg 1 = 0

    Degree of 1 is 0.

  • neg (x : R) : self.deg (-x) = self.deg x

    Negation preserves degree.

  • add_le (x y : R) : self.deg (x + y) ≤ max (self.deg x) (self.deg y)

    Subadditivity under addition.

  • mul_le (x y : R) : self.deg (x * y) ≤ self.deg x + self.deg y

    Subadditivity under multiplication.

Standard polynomial degree packaged as a DegBound on R[X].

Z-degree packaged as a DegBound on R[X][X].

theorem Cslib.Code.ProximityGap.DegBound.sub_le {R : Type u_1} [CommRing R] (db : DegBound R) (x y : R) :
db.deg (x - y) ≤ max (db.deg x) (db.deg y)
theorem Cslib.Code.ProximityGap.DegBound.sum_le {R : Type u_1} [CommRing R] (db : DegBound R) {α : Type u_2} (s : Finset α) (u : α → R) {B : ℕ} (h : ∀ i ∈ s, db.deg (u i) ≤ B) :
db.deg (∑ i ∈ s, u i) ≤ B
theorem Cslib.Code.ProximityGap.DegBound.pow_le {R : Type u_1} [CommRing R] (db : DegBound R) (x : R) (n : ℕ) :
db.deg (x ^ n) ≤ n * db.deg x
theorem Cslib.Code.ProximityGap.DegBound.resultant_le {R : Type u_1} [CommRing R] (db : DegBound R) {f g : Polynomial R} (m n : ℕ) {Bf Bg : ℕ} (hf : ∀ (i : ℕ), db.deg (f.coeff i) ≤ Bf) (hg : ∀ (i : ℕ), db.deg (g.coeff i) ≤ Bg) :
db.deg (f.resultant g m n) ≤ m * Bg + n * Bf
theorem Cslib.Code.ProximityGap.card_filter_eval_eq_zero_le {R : Type u_1} [CommRing R] [IsDomain R] [DecidableEq R] {p : Polynomial R} (hp : p ≠ 0) (T : Finset R) :
{z ∈ T | Polynomial.eval z p = 0}.card ≤ p.natDegree

Shared root-counting and resultant helpers.

theorem Cslib.Code.ProximityGap.resultant_ne_zero_of_isCoprime_map {R : Type u_1} {K : Type u_2} [CommRing R] [Field K] (φ : R →+* K) (hφ : Function.Injective ⇑φ) {f g : Polynomial R} (hcop : IsCoprime (Polynomial.map φ f) (Polynomial.map φ g)) :
theorem Cslib.Code.ProximityGap.coeff_sum_Icc_C_mul_X_pow {R : Type u_1} [Semiring R] (a b k : ℕ) (f : ℕ → R) :
(∑ j ∈ Finset.Icc a b, Polynomial.C (f j) * Polynomial.X ^ j).coeff k = if a ≤ k ∧ k ≤ b then f k else 0
@[reducible, inline]
noncomputable abbrev Cslib.Code.ProximityGap.curveWord {F : Type u_1} [Field F] [DecidableEq F] {ι : Type u_2} {r : ℕ} (u : Fin (r + 1) → ι → F) (i : ι) :

Curve polynomial w_i(Z) = ∑_j u_j(i) Z^j ∈ F[Z], built via Polynomial.ofFn.

noncomputable def Cslib.Code.ProximityGap.evZ {F : Type u_1} [Field F] (z : F) :

Specialization Z ↦ z on F[Z].

noncomputable def Cslib.Code.ProximityGap.evZ₁ {F : Type u_1} [Field F] (z : F) :

Specialization Z ↦ z on F[Z][X].

Specialization Z ↦ z on F[Z][X][Y].

theorem Cslib.Code.ProximityGap.exists_mem_eval_map_eq_zero {R : Type u_2} {S : Type u_3} [CommRing R] [CommRing S] [IsDomain S] (φ : R →+* S) (ms : Multiset (Polynomial R)) (y : S) (h : Polynomial.eval y (Polynomial.map φ ms.prod) = 0) :
∃ f ∈ ms, Polynomial.eval y (Polynomial.map φ f) = 0
theorem Cslib.Code.ProximityGap.ceil_div_le_card_of_sum_le {ι : Type u_2} {W : ι → ℕ} {M B_W : ℕ} (hM : 0 < M) (hW_le : ∀ (i : ι), W i ≤ M) {A : Finset ι} (hsum : B_W ≤ ∑ i ∈ A, W i) :
(B_W + M - 1) / M ≤ A.card