The setting
Iterated matrix multiplication asks for the entry of a product of independent matrices of distinct commuting variables, regarded as a polynomial of degree in all ambient matrix-entry variables. To study the arithmetic complexity of this polynomial in depth five, one considers syntactically homogeneous circuits: five alternating layers of weighted addition gates and multiplication gates built over scalar and variable leaves, with every addition gate combining inputs of equal formal degree. Arbitrary finite fan-in, fan-out, and gate sharing are permitted, bottom linear forms may have arbitrary support, and circuit size counts every gate in all five layers together with the leaves.
Variable matrices
Let be a commutative semiring and let . Let be a set of distinct commuting variables, and let denote the multivariate polynomial ring over in the variables . For each layer index , the variable matrix layer is the matrix over whose entry is the variable .✦
Homogeneous depth-five circuits
A circuit leaf over in the variables is either a scalar or a variable .✦ A scalar leaf has leaf degree and leaf polynomial , while a variable leaf has leaf degree and leaf polynomial .
A syntactically homogeneous depth-five circuit over in the variables consists of five nonnegative integers counting the leaves, bottom sum gates, lower product gates, middle sum gates, and upper product gates, together with a tuple of leaves , a collection of finite input lists for the five gate layers, and formal-degree assignments for the three sum layers.✦ Each bottom sum gate carries a finite list of weighted leaf inputs and a formal degree ; each lower product gate carries a finite list of indices in ; each middle sum gate carries a finite list of weighted inputs and a formal degree ; each upper product gate carries a finite list of indices in ; and the single output sum gate carries a finite list of weighted inputs and a formal degree . These data satisfy the syntactic homogeneity conditions (1) where each sum over an input list is taken with multiplicity, and satisfy the empty-input conditions whenever is empty, whenever is empty, and whenever is empty.
Given a syntactically homogeneous depth-five circuit over in , the bottom sum gate polynomials (), lower product gate polynomials (), middle sum gate polynomials (), and upper product gate polynomials () are defined layer by layer by (2) where sums and products over input lists are taken with multiplicity, with an empty sum equal to and an empty product equal to . In (1) and (2), every gate may appear arbitrarily many times across input lists, so fan-in, fan-out, and gate sharing are unrestricted.
The definition
Definition. Let be a commutative semiring and let . For , the iterated matrix multiplication polynomial is the entry of the product of the variable matrices , given by (3): (3)✦ with the convention that when , and when .
Let be a syntactically homogeneous depth-five circuit over in the variables . The circuit output polynomial is the weighted sum of its upper product gate polynomials given by (4): (4)✦ taken with multiplicity over (with an empty sum equal to ). The circuit size is the total count of leaves and gates given by (5): (5)✦
In the paper, the result reads: for integers , the polynomial is defined for independent variable matrices retaining all ambient variables, with target , and syntactically homogeneous circuits are defined over a field . The Lean library specializes the target directly to and formulates both the polynomial and the circuit model over an arbitrary commutative semiring with explicit formal-degree assignments.
What is checked
The Lean library defines , , and over an arbitrary commutative semiring and a natural number , built from the ambient variables, the variable matrix layers , circuit leaves with their degrees and polynomials, and syntactically homogeneous depth-five circuits with their layered input lists, formal-degree assignments, and internal gate polynomials.