Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorRank

3-tensor CP-rank fan-in-2 circuit lower bounds (3.041n) #

Rather than sweeping a circuit graph along a 1D layout into a read-once branching program (2-way matrix rank), this module cuts Compiler.graph c once into three vertex parts V = V₀ ⊔ V₁ ⊔ V₂ using exists_balanced_threeWayCut:

  1. 3-way network splicing into square matrix multiplication. Given a coloring col : Compiler.Vertex c → Fin 3 compatible with an input tripartition p : Fin n → Fin 3 (Compiler.site c i = some v → p i = col v), the unique satisfying edge assignment of Compiler.network c I Acc decomposes into three local validity predicates on V₀, V₁, V₂ communicating solely across the three pairwise cuts E(V₀, V₁), E(V₁, V₂), E(V₂, V₀). Over any commutative semiring K, partitionThreeTensor K p S is therefore a tensor restriction of Tensor.mm D D D with D = |U| ^ max(|E₀₁|, |E₁₂|, |E₂₀|).
  2. Degree-≤ 1 input rebalancing and unread-input rank shortcut. Every input vertex .signal ⟨.input i, hi⟩ in Compiler.graph c has degree at most 1, so greedy single-input moves convert the o(|V|)-balanced 3-way cut into an exact BalancedTripartition (≥ ⌊n/3⌋ inputs per leg) while perturbing each pairwise cut by o(|V|). If the circuit ignores more than 2 δ n inputs, partitionThreeTensor already has trivial CP-rank |U| ^ ((2 / 3 - o(1)) n) without invoking matrix multiplication; otherwise β₁ ≤ s - n + 2 δ n + 1.
  3. Wiring ω ≤ 9 / 4 (3.041n). Combining exists_rank_mm_le_rpow with NineQuarters.omega_le_nine_quarters (ω(K) ≤ 9 / 4 in characteristic zero) and threeWayCapCoefficient ≤ 21773 / 100000 yields (3041 / 1000 - ε) n < c.innerSize for every fan-in-2 circuit deciding a ThreeTensorHard set (innerSize_gt_3041_of_threeTensorHard), together with unconditional finite-counting non-vacuity (exists_threeTensorHard over arbitrary fields and exists_set_innerSize_gt_3041).

Main definitions #

Main results #

Balanced input tripartitions and ThreeTensorHard predicates #

An input 3-coloring p : Fin n → Fin 3 is balanced when each color class has size at least n / 3.

Characterization of BalancedTripartition: every fiber has size at least n / 3.

def Cslib.Circuits.Frontier.TensorRank.mergeTripartition {n : ℕ} {U : Type u_1} (p : Fin n → Fin 3) (x₀ : { i : Fin n // p i = 0 } → U) (x₁ : { i : Fin n // p i = 1 } → U) (x₂ : { i : Fin n // p i = 2 } → U) (i : Fin n) :
U

Reassemble a full input Fin n → U from partial assignments on the three fibers of p.

noncomputable def Cslib.Circuits.Frontier.TensorRank.partitionThreeTensor (K : Type u_1) [Zero K] [One K] {n : ℕ} {U : Type u_2} (p : Fin n → Fin 3) (S : Set (Fin n → U)) :
Tensor K ({ i : Fin n // p i = 0 } → U) ({ i : Fin n // p i = 1 } → U) ({ i : Fin n // p i = 2 } → U)

The 0-1 order-three tensor over K induced by S : Set (Fin n → U) under an input tripartition p : Fin n → Fin 3.

theorem Cslib.Circuits.Frontier.TensorRank.partitionThreeTensor_apply (K : Type u_1) [Zero K] [One K] {n : ℕ} {U : Type u_2} (p : Fin n → Fin 3) (S : Set (Fin n → U)) (x₀ : { i : Fin n // p i = 0 } → U) (x₁ : { i : Fin n // p i = 1 } → U) (x₂ : { i : Fin n // p i = 2 } → U) :
partitionThreeTensor K p S x₀ x₁ x₂ = if mergeTripartition p x₀ x₁ x₂ ∈ S then 1 else 0

Evaluation of partitionThreeTensor K p S on partial assignments (x₀, x₁, x₂).

def Cslib.Circuits.Frontier.TensorRank.ThreeTensorHard (K : Type u_1) [CommSemiring K] {n : ℕ} {U : Type u_2} (r : ℕ) (S : Set (Fin n → U)) :

A subset S ⊆ (Fin n → U) is 3-tensor hard at CP-rank r over K if for every balanced input tripartition p, partitionThreeTensor K p S does not have CP-rank ≤ r.

@[simp]
theorem Cslib.Circuits.Frontier.TensorRank.mergeTripartition_apply_zero {n : ℕ} {U : Type u_1} (p : Fin n → Fin 3) (x₀ : { i : Fin n // p i = 0 } → U) (x₁ : { i : Fin n // p i = 1 } → U) (x₂ : { i : Fin n // p i = 2 } → U) {i : Fin n} (h0 : p i = 0) :
mergeTripartition p x₀ x₁ x₂ i = x₀ ⟨i, h0⟩

mergeTripartition reads x₀ on fiber 0.

@[simp]
theorem Cslib.Circuits.Frontier.TensorRank.mergeTripartition_apply_one {n : ℕ} {U : Type u_1} (p : Fin n → Fin 3) (x₀ : { i : Fin n // p i = 0 } → U) (x₁ : { i : Fin n // p i = 1 } → U) (x₂ : { i : Fin n // p i = 2 } → U) {i : Fin n} (h1 : p i = 1) :
mergeTripartition p x₀ x₁ x₂ i = x₁ ⟨i, h1⟩

mergeTripartition reads x₁ on fiber 1.

@[simp]
theorem Cslib.Circuits.Frontier.TensorRank.mergeTripartition_apply_two {n : ℕ} {U : Type u_1} (p : Fin n → Fin 3) (x₀ : { i : Fin n // p i = 0 } → U) (x₁ : { i : Fin n // p i = 1 } → U) (x₂ : { i : Fin n // p i = 2 } → U) {i : Fin n} (h2 : p i = 2) :
mergeTripartition p x₀ x₁ x₂ i = x₂ ⟨i, h2⟩

mergeTripartition reads x₂ on fiber 2.

Non-vacuity: counting existence of ThreeTensorHard sets over arbitrary fields #

theorem Cslib.Circuits.Frontier.TensorRank.exists_threeTensorHard (K : Type u_1) [Field K] {n : ℕ} {U : Type u_2} [Fintype U] (hU : 1 ≤ Fintype.card U) {r : ℕ} (hcount : 3 ^ n * (3 * Fintype.card U ^ n + 1) ^ (3 * r * Fintype.card U ^ (n / 3 + 2)) < 2 ^ Fintype.card U ^ n) :
∃ (S : Set (Fin n → U)), ThreeTensorHard K r S

Existence of ThreeTensorHard sets over any field K. By union-bounding card_rank_indicatorThreeTensor_le over all balanced p : Fin n → Fin 3 (≤ 3 ^ n partitions), whenever 3 ^ n * (3 * |U| ^ n + 1) ^ (3 * r * |U| ^ (n / 3 + 2)) < 2 ^ (|U| ^ n), there exists S : Set (Fin n → U) satisfying ThreeTensorHard K r S (nonconstructive finite counting).

3-way network splicing into Tensor.mm D D D #

theorem Cslib.Circuits.Frontier.TensorRank.isRestriction_partitionThreeTensor_mm (K : Type u_1) [CommSemiring K] {σ : Signature} {n : ℕ} {U : Type u_2} [Fintype U] [Nonempty U] (c : Circuit σ n 1) (I : Interpretation σ U) (Acc : Fin 1 → Set U) (col : Compiler.Vertex c → Fin 3) (p : Fin n → Fin 3) (hcompat : ∀ (i : Fin n) (v : Compiler.Vertex c), Compiler.site c i = some v → p i = col v) {B : ℕ} (hcut : ∀ (k : Fin 3), ((Compiler.graph c).edgeCut {v : Compiler.Vertex c | col v = k} ∩ (Compiler.graph c).edgeCut {v : Compiler.Vertex c | col v = k + 1}).ncard ≤ B) :

3-way circuit splicing into square matrix multiplication. Let c : Circuit σ n 1 be a circuit over a finite nonempty alphabet U, col : Compiler.Vertex c → Fin 3 a vertex 3-coloring, and p : Fin n → Fin 3 an input 3-coloring compatible with Compiler.site c (site c i = some v → p i = col v). If every pairwise edge cut G.edgeCut {v | col v = k} ∩ G.edgeCut {v | col v = k + 1} has size at most B, then over any commutative semiring K, partitionThreeTensor K p {x | c.eval I x 0 ∈ Acc 0} is a restriction of Tensor.mm (|U| ^ B) (|U| ^ B) (|U| ^ B).

Degree-≤ 1 input-vertex rebalancing and unread-input rank shortcut #

Fan-in-2 circuit lower bounds (innerSize_gt_of_threeTensorHard & 3.041n) #

theorem Cslib.Circuits.Frontier.TensorRank.innerSize_gt_of_threeTensorHard (K : Type u_1) [Field K] [CharZero K] {U : Type u_2} [Fintype U] (hU : 2 ≤ Fintype.card U) {ε : ℝ} (hε : 0 < ε) :
∃ (δ : ℝ), 0 < δ ∧ ∃ (N₀ : ℕ), ∀ {σ : Signature} {n : ℕ}, N₀ ≤ n → ∀ {S : Set (Fin n → U)}, ThreeTensorHard K ⌊↑(Fintype.card U) ^ ((2 / 3 - δ) * ↑n)⌋₊ S → ∀ (c : Circuit σ n 1) (I : Interpretation σ U) (Acc : Fin 1 → Set U), c.FanInAtMost 2 → (∀ (x : Fin n → U), c.eval I x 0 ∈ Acc 0 ↔ x ∈ S) → (1 + 1 / (Arithmetic.MatrixMultiplication.omega K * threeWayCapCoefficient) - ε) * ↑n < ↑c.innerSize

Parametric fan-in-2 circuit lower bound from ThreeTensorHard. Over any characteristic-zero field K, for every ε > 0 there is δ > 0 and N₀ : ℕ (depending only on K, |U|, and ε) such that for all n ≥ N₀, every fan-in-2 circuit deciding a ThreeTensorHard set at CP-rank ⌊|U| ^ ((2 / 3 - δ) * n)⌋₊ has strictly more than (1 + 1 / (omega K * threeWayCapCoefficient) - ε) * n inner gates.

Each of the three pairwise edge cuts has size B ≈ (2 / 3) · threeWayCapCoefficient · (s - n), so Tensor.mm (|U| ^ B) (|U| ^ B) (|U| ^ B) has rank |U| ^ ((2 / 3) · omega K · threeWayCapCoefficient · (s - n) + o(n)). Requiring this exponent to reach (2 / 3) n cancels the factor of 2 / 3 and gives s ≥ (1 + 1 / (omega K * threeWayCapCoefficient) - o(1)) n.

theorem Cslib.Circuits.Frontier.TensorRank.innerSize_gt_3041_of_threeTensorHard (K : Type u_1) [Field K] [CharZero K] {U : Type u_2} [Fintype U] (hU : 2 ≤ Fintype.card U) {ε : ℝ} (hε : 0 < ε) :
∃ (δ : ℝ), 0 < δ ∧ ∃ (N₀ : ℕ), ∀ {σ : Signature} {n : ℕ}, N₀ ≤ n → ∀ {S : Set (Fin n → U)}, ThreeTensorHard K ⌊↑(Fintype.card U) ^ ((2 / 3 - δ) * ↑n)⌋₊ S → ∀ (c : Circuit σ n 1) (I : Interpretation σ U) (Acc : Fin 1 → Set U), c.FanInAtMost 2 → (∀ (x : Fin n → U), c.eval I x 0 ∈ Acc 0 ↔ x ∈ S) → (3041 / 1000 - ε) * ↑n < ↑c.innerSize

Unconditional 3.041n fan-in-2 circuit lower bound from ThreeTensorHard. Wiring omega_le_nine_quarters (ω(K) ≤ 9 / 4 over any characteristic-zero field K) and circuitThreshold_gt_3041 (3041 / 1000 < 1 + 4 / (9 * threeWayCapCoefficient)) into innerSize_gt_of_threeTensorHard yields (3041 / 1000 - ε) * n < c.innerSize.

theorem Cslib.Circuits.Frontier.TensorRank.exists_set_innerSize_gt_3041 {U : Type u_1} [Fintype U] (hU : 2 ≤ Fintype.card U) {ε : ℝ} (hε : 0 < ε) :
∃ (N₀ : ℕ), ∀ (n : ℕ), N₀ ≤ n → ∃ (S : Set (Fin n → U)), ∀ {σ : Signature} (c : Circuit σ n 1) (I : Interpretation σ U) (Acc : Fin 1 → Set U), c.FanInAtMost 2 → (∀ (x : Fin n → U), c.eval I x 0 ∈ Acc 0 ↔ x ∈ S) → (3041 / 1000 - ε) * ↑n < ↑c.innerSize

End-to-end unconditional existence of U-ary functions requiring > (3.041 - ε) n inner fan-in-2 gates. Instantiates innerSize_gt_3041_of_threeTensorHard over ℚ together with the finite-counting witness exists_threeTensorHard_eventually ℚ. Note that S is a nonconstructive counting witness (independent of the circuit signature σ, interpretation I, and acceptance set Acc), not a polynomial-time explicit function family.