Documentation

Complexitylib.Algebraic.LowerBound.Cutwidth.MultiOutput.PolyMul.Internal

Proofs for polynomial multiplication #

The two halves of the inputs #

Block matrices #

def Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.upperMatrix {n : ℕ} {R : Type u_1} [Zero R] (Λ : Matrix (Fin n) (Fin n) R) :
Matrix (Fin (n + n)) (Fin (n + n)) R

The block matrix [[0, Λ], [0, 0]], whose quadratic form is xᵀ Λ y.

Equations
Instances For
    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.upperMatrix_natAdd {n : ℕ} {R : Type u_1} [Zero R] (Λ : Matrix (Fin n) (Fin n) R) (j : Fin n) (k : Fin (n + n)) :
    upperMatrix Λ (Fin.natAdd n j) k = 0

    The symmetrization of [[0, Λ], [0, 0]] is [[0, Λ], [Λᵀ, 0]].

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.quadForm_upperMatrix {n : ℕ} {R : Type u_1} [CommRing R] (Λ : Matrix (Fin n) (Fin n) R) (z : Fin (n + n) → R) :
    quadForm (upperMatrix Λ) z = ∑ i : Fin n, ∑ j : Fin n, Λ i j * (z (Fin.castAdd n i) * z (Fin.natAdd n j))

    The quadratic form of [[0, Λ], [0, 0]] is xᵀ Λ y.

    Weighted sums of the outputs #

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.sum_mul_sum_sum_ite {n : ℕ} {R : Type u_1} [CommSemiring R] (μ : ℕ → R) (f : Fin n → Fin n → R) :
    (∑ m : Fin (2 * n - 1), μ ↑m * ∑ i : Fin n, ∑ j : Fin n, if ↑i + ↑j = ↑m then f i j else 0) = ∑ i : Fin n, ∑ j : Fin n, μ (↑i + ↑j) * f i j

    A weighted sum of sums over i + j = m is a sum over all i and j.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.sum_mul_polyMul {n : ℕ} {R : Type u_1} [CommSemiring R] (μ : ℕ → R) (z : Fin (n + n) → R) :
    ∑ m : Fin (2 * n - 1), μ ↑m * polyMul n z m = ∑ i : Fin n, ∑ j : Fin n, μ (↑i + ↑j) * (z (Fin.castAdd n i) * z (Fin.natAdd n j))

    A weighted sum of the outputs of polynomial multiplication is ∑ᵢ ∑ⱼ μ (i + j) xᵢ yⱼ.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.polyMul_eq_eval {n : ℕ} {K : Type u_1} [CommSemiring K] (z : Fin (n + n) → K) (m : Fin (2 * n - 1)) :

    Polynomial multiplication evaluates its polynomials.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.polyMul_eq_aeval {n : ℕ} {K : Type u_1} {A : Type u_2} [CommSemiring K] [CommSemiring A] [Algebra K A] (z : Fin (n + n) → A) (m : Fin (2 * n - 1)) :

    Over every commutative algebra, polynomial multiplication evaluates its polynomials.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.polyMul_append_eq_coeff {n : ℕ} {R : Type u_1} [CommSemiring R] (x y : Fin n → R) (m : Fin (2 * n - 1)) :
    polyMul n (Fin.append x y) m = ((∑ i : Fin n, Polynomial.C (x i) * Polynomial.X ^ ↑i) * ∑ j : Fin n, Polynomial.C (y j) * Polynomial.X ^ ↑j).coeff ↑m

    Polynomial multiplication computes the coefficients of the product of two polynomials.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.polyMul_nonconstant {n : ℕ} {K : Type u_1} [Field K] (m : Fin (2 * n - 1)) :
    ∃ (x : Fin (n + n) → K) (y : Fin (n + n) → K), polyMul n x m ≠ polyMul n y m

    Every output of polynomial multiplication is a nonconstant function: it vanishes at zero and is one at the indicator of one first-factor and one second-factor coefficient.

    The Hessian #

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.aeval_pderiv_pderiv_polyMulPolynomial {n : ℕ} {K : Type u_1} {L : Type u_2} [CommRing K] [Field L] [Algebra K L] (a : Fin (n + n) → L) (m : Fin (2 * n - 1)) (k l : Fin (n + n)) :
    (MvPolynomial.aeval a) ((MvPolynomial.pderiv k) ((MvPolynomial.pderiv l) (polyMulPolynomial K n m))) = ∑ i : Fin n, ∑ j : Fin n, if ↑i + ↑j = ↑m then (if l = Fin.castAdd n i ∧ k = Fin.natAdd n j then 1 else 0) + if l = Fin.natAdd n j ∧ k = Fin.castAdd n i then 1 else 0 else 0
    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.sum_smul_hessian_polyMulPolynomial {n : ℕ} {K : Type u_1} {L : Type u_2} [CommRing K] [Field L] [Algebra K L] (μ : ℕ → L) (a : Fin (n + n) → L) :
    ∑ m : Fin (2 * n - 1), μ ↑m • Taylor.hessian (polyMulPolynomial K n m) a = crossMatrix (hankel n μ)

    The Hessian of a weighted sum of the outputs. For every point, the Hessian of ∑ₘ μₘ z_m is [[0, Λ], [Λᵀ, 0]] for the Hankel matrix Λ = (μ (i + j)).

    Blocks of [[0, Λ], [Λᵀ, 0]] #

    The block rank. If Λ is totally regular, the block of [[0, Λ], [Λᵀ, 0]] with rows X and columns Xᶜ has rank at least min(|X ∩ x|, |Xᶜ ∩ y|) + min(|X ∩ y|, |Xᶜ ∩ x|).

    A generic totally regular Hankel matrix #

    A strictly monotone permutation of Fin k is the identity.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.det_X_pow_sq_ne_zero_of_strictMono {n : ℕ} {K : Type u_1} [Field K] {k : ℕ} (r c : Fin k → Fin n) (hr : StrictMono r) (hc : StrictMono c) :
    (Matrix.of fun (i j : Fin k) => Polynomial.X ^ (↑(r i) + ↑(c j)) ^ 2).det ≠ 0

    Increasing minors. For increasing rows r and columns c, the minor of (t ^ ((i + j)²)) has the monomial t ^ ∑ₐ (r a + c a)² with coefficient one.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.det_X_pow_sq_ne_zero {n : ℕ} {K : Type u_1} [Field K] {k : ℕ} (r c : Fin k → Fin n) (hr : Function.Injective r) (hc : Function.Injective c) :
    (Matrix.of fun (i j : Fin k) => Polynomial.X ^ (↑(r i) + ↑(c j)) ^ 2).det ≠ 0

    Every square minor of (t ^ ((i + j)²)) over K[X] is nonzero.

    A generic totally regular Hankel matrix. Over the rational functions K(t), in every characteristic, the Hankel matrix (t ^ ((i + j)²)) is totally regular.

    Counting the two halves #

    A set of exactly n of the 2n inputs meets the two factors in complementary amounts.

    The cut bound #

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.min_add_min_le_of_formallyComputes {n : ℕ} {σ : Signature} {s : ℕ} {K : Type u_1} [Field K] (P : (op : σ.Op) → MvPolynomial (Fin (σ.Arity op)) K) (p : Program σ (n + n) s) (out : Fin (2 * n - 1) → Wire (n + n) s) (hf : ∀ (m : Fin (2 * n - 1)), Taylor.wirePolynomial P p (out m) = polyMulPolynomial K n m) (S : Finset (Wire (n + n) s)) :

    The cut bound for formal computation. If a program with polynomial gates over any field carries the outputs of polynomial multiplication, every split S is crossed by at least min(|X_S ∩ x|, |X_T ∩ y|) + min(|X_S ∩ y|, |X_T ∩ x|) signals: apply the Hessian consequence of the Taylor cut lemma over K(t) with the weights t ^ (m²).

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.min_add_min_le_of_computes_zmod {n : ℕ} {σ : Signature} {s : ℕ} (q : ℕ) [Fact (Nat.Prime q)] (hq : 2 * n < q) (I : Interpretation σ (ZMod q)) (p : Program σ (n + n) s) (out : Fin (2 * n - 1) → Wire (n + n) s) (hf : ∀ (x : Fin (n + n) → ZMod q) (m : Fin (2 * n - 1)), p.trace I x (out m) = polyMul n x m) (S : Finset (Wire (n + n) s)) :

    The cut bound over ZMod q, for arbitrary gates. If a program over ZMod q, q > 2n prime, with arbitrary gate functions computes polynomial multiplication, every split S is crossed by at least min(|X_S ∩ x|, |X_T ∩ y|) + min(|X_S ∩ y|, |X_T ∩ x|) signals: the weighted sum ∑ₘ zₘ / (m + 2) = xᵀ Λ y with the Hankel Cauchy matrix Λ has vanishing mixed second differences on every class, so the counting rank-cut bound applies.

    One component #

    All inputs lie in one component. If every split satisfies the cut bound, the component of the first input contains every input: it is crossed by no signal.

    The finite bound #

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.le_of_prefix {σ : Signature} {s : ℕ} {A η C : ℝ} (hAη : 0 ≤ A + η) (order : Multigraph.OrderingBound A η C) {N : ℕ} (p : Program σ N s) (hp : p.FanInAtMost 2) (j₀ : Fin N) (hcomp : ∀ (j : Fin N), Wire.input j ∈ component p (Wire.input j₀)) {k β : ℕ} (hk : 1 ≤ k) (hkN : k ≤ N) (hcut : ∀ (S : Finset (Wire N s)), (SingleCut.inputsIn S).card = k → β ≤ (SingleCut.forward p S).card + (SingleCut.backward p S).card) :
    ↑β ≤ (A + η) * max (↑s - ↑N) 0 + 3 * Real.logb 2 (↑N + 3 * ↑s) + C

    The prefix argument. If all inputs lie in one component and every split holding exactly k ≥ 1 inputs is crossed by at least β signals, then β ≤ (A + η) (s - N)⁺ + 3 log₂ (N + 3 s) + C.

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.le_of_cut {n : ℕ} {σ : Signature} {s : ℕ} {A η C : ℝ} (hAη : 0 ≤ A + η) (order : Multigraph.OrderingBound A η C) (p : Program σ (n + n) s) (hp : p.FanInAtMost 2) (hcut : ∀ (S : Finset (Wire (n + n) s)), min (firstIn (SingleCut.inputsIn S)).card (secondIn (SingleCut.inputsIn S)ᶜ).card + min (secondIn (SingleCut.inputsIn S)).card (firstIn (SingleCut.inputsIn S)ᶜ).card ≤ (SingleCut.forward p S).card + (SingleCut.backward p S).card) :
    ↑n ≤ (A + η) * max (↑s - 2 * ↑n) 0 + 3 * Real.logb 2 (2 * ↑n + 3 * ↑s) + C

    The finite bound for polynomial multiplication. If every split of a fan-in-two program with the 2n inputs of polynomial multiplication satisfies the cut bound, then under the graph-ordering hypothesis n ≤ (A + η) (s - 2n)⁺ + 3 log₂ (2n + 3 s) + C.

    Asymptotics #

    theorem Algebraic.Cutwidth.MultiOutput.PolyMul.Internal.eventually_lt_of_le {A : ℝ} (hA : 0 < A) (order : ∀ (η : ℝ), 0 < η → ∃ (C : ℝ), Multigraph.OrderingBound A η C) {ε : ℝ} (hε : 0 < ε) :
    ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (s : ℕ), (∀ (η C : ℝ), 0 ≤ A + η → Multigraph.OrderingBound A η C → ↑n ≤ (A + η) * max (↑s - 2 * ↑n) 0 + 3 * Real.logb 2 (2 * ↑n + 3 * ↑s) + C) → (2 + 1 / A - ε) * ↑n < ↑s

    The asymptotic bound. If the graph-ordering hypothesis holds with coefficient A > 0 for every positive slack, then for every ε > 0 and all large n, every size s satisfying the finite bound for every ordering has s > (2 + 1/A - ε) n.