OctoInform Beta

OpenAI preprint, September 2026 · §6. Completion and consequences

Proposition 6.2: Over any field KK and n≥2n \ge 2, a homogeneous depth five circuit computes IMMn,n\mathrm{IMM}_{n,n} with at most nn+4n^{\sqrt{n} + 4} gates

Homogeneous depth five upper bound for iterated matrix multiplication.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

In algebraic circuit complexity, a basic question is how many gates are needed to compute iterated matrix multiplication using arithmetic circuits of bounded depth and syntactic homogeneity. Proposition 6.2 establishes an explicit upper bound on the gate count of a homogeneous depth five circuit computing the iterated matrix multiplication polynomial IMMn,n\mathrm{IMM}_{n,n} over an arbitrary field KK for every integer n≥2n \ge 2. The bound holds unconditionally over every field and counts both internal gates and leaves.

Iterated matrix multiplication

Let KK be a commutative semiring and let nn be a natural number. Let K[X]K[X] denote the polynomial ring over KK in n3n^3 commuting variables xℓ,i,jx_{\ell, i, j} indexed by triples (ℓ,i,j)∈{1,…,n}3(\ell, i, j) \in \{1, \ldots, n\}^3. For each layer index ℓ∈{1,…,n}\ell \in \{1, \ldots, n\}, the variable matrix layer X(ℓ)X^{(\ell)} over KK is the n×nn \times n matrix with entries in K[X]K[X] whose (i,j)(i, j) entry is xℓ,i,jx_{\ell, i, j}.✦

For n≥1n \ge 1, the iterated matrix multiplication polynomial IMMn,n∈K[X]\mathrm{IMM}_{n,n} \in K[X] over KK is the (1,1)(1, 1) entry of the product of these nn independent variable matrix layers, retaining all n3n^3 variables as ambient variables: IMMn,n=(X(1)X(2)⋯X(n))1,1.\mathrm{IMM}_{n,n} = \bigl(X^{(1)} X^{(2)} \cdots X^{(n)}\bigr)_{1, 1}.(1)✦ For n=0n = 0, IMM0,0=0\mathrm{IMM}_{0,0} = 0.

Homogeneous depth five circuits

Let KK be a commutative semiring and let nn be a natural number. A circuit leaf over KK of dimension nn is either a scalar a∈Ka \in K or a variable indexed by a triple (ℓ,i,j)∈{1,…,n}3(\ell, i, j) \in \{1, \ldots, n\}^3.✦ The leaf degree of a circuit leaf is 00 for a scalar leaf and 11 for a variable leaf.✦ The leaf polynomial in K[X]K[X] associated to a circuit leaf is the constant polynomial aa for a scalar leaf a∈Ka \in K and the variable xℓ,i,jx_{\ell, i, j} for a variable leaf at (ℓ,i,j)(\ell, i, j).✦

A homogeneous depth five circuit CC over KK in n3n^3 variables consists of six layers: L0L_0 circuit leaves; L1L_1 bottom sum gates, each given a finite list of KK-weighted leaf inputs and a declared degree in ℕ\mathbb{N}; L2L_2 lower product gates, each given a finite list of bottom sum gate inputs; L3L_3 middle sum gates, each given a finite list of KK-weighted lower product gate inputs and a declared degree in ℕ\mathbb{N}; L4L_4 upper product gates, each given a finite list of middle sum gate inputs; and a single output sum gate, given a finite list of KK-weighted upper product gate inputs and a declared output degree in ℕ\mathbb{N}.✦ These layers satisfy three syntactic homogeneity conditions: every leaf input to a bottom sum gate has leaf degree equal to that gate’s declared degree; every lower product gate input to a middle sum gate has the sum of the declared degrees of its bottom sum gate inputs equal to that middle sum gate’s declared degree; and every upper product gate input to the output gate has the sum of the declared degrees of its middle sum gate inputs equal to the output degree. Whenever a bottom sum gate, a middle sum gate, or the output gate has an empty input list, its declared degree is 00.

Each gate of CC computes a polynomial in K[X]K[X] from bottom to top: each bottom sum gate computes a bottom sum gate polynomial as the KK-weighted sum of its input leaf polynomials✦, each lower product gate computes a lower product gate polynomial as the product of its input bottom sum gate polynomials✦, each middle sum gate computes a middle sum gate polynomial as the KK-weighted sum of its input lower product gate polynomials✦, each upper product gate computes an upper product gate polynomial as the product of its input middle sum gate polynomials✦, and the output gate computes the circuit output polynomial val(C)∈K[X]\mathrm{val}(C) \in K[X] as the KK-weighted sum of its input upper product gate polynomials.✦ The circuit size size(C)\mathrm{size}(C) is the total number of leaves and gates, defined by (2): size(C)=L0+L1+L2+L3+L4+1.\mathrm{size}(C) = L_0 + L_1 + L_2 + L_3 + L_4 + 1.(2)✦

The upper gate count bound

For a natural number nn, the ceiling square root s(n)∈ℕs(n) \in \mathbb{N} is defined by (3): s(n)=⌊n⌋+{0if ⌊n⌋2=n,1otherwise,s(n) = \lfloor \sqrt{n} \rfloor + \begin{cases} 0 & \text{if } \lfloor \sqrt{n} \rfloor^2 = n, \\ 1 & \text{otherwise,} \end{cases}(3)✦ which equals ⌈n⌉\lceil \sqrt{n} \rceil. For natural numbers nn and dd, the ceiling division q(n,d)∈ℕq(n, d) \in \mathbb{N} is defined by (4): q(n,d)=⌊n+d−1d⌋,q(n, d) = \left\lfloor \frac{n + d - 1}{d} \right\rfloor,(4)✦ using natural-number subtraction and division (so q(n,0)=0q(n, 0) = 0 and q(n,d)=⌈n/d⌉q(n, d) = \lceil n / d \rceil for d≥1d \ge 1).

For a natural number nn, putting t=s(n)t = s(n) and r=q(n,t)r = q(n, t), the upper gate count bound B(n)∈ℕB(n) \in \mathbb{N} is defined by (5): B(n)=2n3+rn2+rnt+1+nr−1+1,B(n) = 2 n^3 + r n^2 + r n^{t + 1} + n^{r - 1} + 1,(5)✦ with natural-number subtraction in the exponent r−1r - 1.

The claim

Proposition 6.2. Let KK be any field and let n≥2n \ge 2 be a natural number. There exists a homogeneous depth five circuit CC over KK in n3n^3 variables such that val(C)=IMMn,nandsize(C)≤B(n)≤nn+4.\mathrm{val}(C) = \mathrm{IMM}_{n,n} \qquad\text{and}\qquad \mathrm{size}(C) \le B(n) \le n^{\sqrt{n} + 4}.(6)✦

In the paper, the result reads: for any field KK and n≥2n \ge 2, with t=⌈n⌉t = \lceil \sqrt{n} \rceil and r=⌈n/t⌉r = \lceil n / t \rceil, there is a syntactically homogeneous ΣΠΣΠΣ\Sigma\Pi\Sigma\Pi\Sigma circuit over KK computing IMMn,n\mathrm{IMM}_{n,n} whose number of gates, including leaves, is at most 2n3+rn2+rnt+1+nr−1+1≤nn+42n^3 + r n^2 + r n^{t + 1} + n^{r - 1} + 1 \le n^{\sqrt{n} + 4}, where B(n)B(n) stands for this intermediate bound.

What is checked

In the Lean library, Proposition 6.2 states (6) over every field KK and every natural number n≥2n \ge 2, built from the variable matrix layers, the iterated matrix multiplication polynomial (1), homogeneous depth five circuits with their layer-by-layer polynomial evaluations and circuit size (2), and the upper gate count bound (5) defined via (3) and (4). The underlying polynomial and homogeneous depth five circuit definitions are formulated over an arbitrary commutative semiring KK.