Manuscript Offprint
arXiv:2611.02039Factor Closure in Noncommutative Algebraic Complexity
Abstract
We prove that is closed under taking factors over every field. If a noncommutative circuit of size computes a nonconstant polynomial of degree at most , then each left or right factor has a circuit of size . A central factor in a decomposition , with nonconstant outer factors , has a circuit of size .
The proof uses a small weighted nondeterministic finite automaton (NFA) with replacement labels. Given , its labels depend on a word of maximum degree in and the coefficients of its suffixes. A pairing of accepting paths proves that the induced linear map satisfies . Matrix substitution implements in a circuit. Applying the same substitution to a Boolean-sum verifier proves closure.
The construction also proves formula closure. The automaton has one copying state and, after leaving it, uses only scalar replacements. This structure gives formulas of size for one-sided factors and for central factors of a size- formula. The same map proves that polynomial-size noncommutative algebraic branching programs are closed under taking factors. Polynomial-size ABP factorizations over finite fields are already known from [6].
These are arithmetic size bounds, with arbitrary field constants at unit cost, including over . Over finite fields, combining the formula construction with [5] gives randomized polynomial-time complete factorization of formula inputs, with factors output as formulas. For polynomial-degree circuit inputs, we obtain polynomial-length succinct ABP descriptions with polynomial-time edge queries. We also give two algorithms that output complete ordered irreducible factorizations as polynomial-size circuits: a deterministic algorithm and a zero-error randomized algorithm with an NP oracle and expected polynomial running time.
*Institute of Mathematical Sciences, Chennai, India. arvind@imsc.res.in †Vishwakarma Institute of Technology, Pune, India. joglekar.pushkar@gmail.com
1 Introduction
Let be a nonzero polynomial of degree at most , computed by a circuit of size . We study the circuit size of a specified factor in an identity . The objective is a bound polynomial in and , with no homogeneity assumption and over an arbitrary field. We also study the corresponding questions for formulas, algebraic branching programs, and polynomials presented as Boolean sums of small circuits. The bounds must hold for every specified factorization, since noncommutative factorizations need not be unique.
Over finite fields, polynomial-time factorization is known for ABP inputs, with the factors output as ABPs [6]. That work explicitly leaves the circuit-input problem open: its concluding remarks identify Higman linearization as an obstacle to extending the algorithm and report no nontrivial complexity upper bound for general circuit-input factorization. A basic structural question precedes the algorithmic one: do factors of a small circuit even have small circuits? We answer this question for polynomial-degree inputs. Our formula theorem also preserves the more restrictive input model, giving small formulas for factors; combined with [5], it yields finite-field factorization with formula outputs. The oracle algorithms later in the paper use the circuit-size bound to search for factors, while ordinary polynomial-time factorization of polynomial-degree circuit inputs remains open.
Closure also connects factorization to lower bounds. If a polynomial family requires large circuits, and small circuits are closed under taking factors, then every nonzero multiple of that family of polynomially bounded degree requires large circuits as well. For a class defined by a sum over Boolean assignments, closure asks a related question: does a factor still admit a short circuit whose Boolean sum gives the polynomial? These questions concern the existence of small representations. Finding such representations from the product alone is a further algorithmic problem.
In the commutative setting, small-circuit bounds for factors were established in [10]. Closure of commutative VNP in characteristic zero and sufficiently large characteristic was proved in [9]. More recently, commutative formula closure in characteristic zero was proved in [7]. We study the corresponding questions in the free associative algebra . Here monomials are words, and multiplication concatenates them in order. Factorizations need not be unique. We consequently formulate our results for every specified factor: whenever with all three polynomials nonzero, we bound the complexity of .
Theorem 1.1 (Circuits for factors). Let a noncommutative circuit of size compute a nonzero polynomial of degree at most over a field , where .
(i) If with , then each of has a circuit of size .
(ii) If with , then has a circuit of size . This covers central factors as well as one-sided factors.
The circuits can be constructed deterministically with field operations when the following cofactor data are supplied. To recover from , supply a maximum-degree word of , its nonzero coefficient, and the coefficients of all its proper suffixes, including the empty suffix. To recover h, supply the analogous data for rev(g). To recover g from f = agb, supply these data for b and for rev(a). Thus the central-factor construction uses two words of length at most D and O(D) field elements. A scalar cofactor requires only its nonzero value. The construction outputs a circuit for the specified factor and preserves any syntactic degree bound on the input circuit.
Theorem 1.2 (Formula bounds and closure). Over any field, polynomial-size noncommutative formulas, , and are closed under taking factors. In each case this means closure for every specified in .
More precisely, a one-sided factor of a polynomial computed by a size-s formula has a formula of size . A central factor g in has a formula of size .
For a constant , all its factors are nonzero constants and have constant-size circuits. The degree bound in Theorem 1.1 concerns the output polynomial; intermediate gates may have larger degree. The construction assumes that the stated cofactor data are supplied and does not find them from the input circuit. The theorem applies to nonhomogeneous polynomials and to every characteristic. It also applies over : a bound on the number of additional constants is enough for arithmetic circuit size. Bounds on their binary lengths are a separate question, discussed in Section 2.1.
We also obtain algorithmic consequences over explicitly represented finite fields. Every factor of a polynomial-degree circuit has a polynomial-length succinct ABP description: it specifies the layers and a polynomial-time algorithm that returns the affine edge label at any requested pair of vertex indices. The ABP itself may have exponential width. Given the input circuit and a degree bound in unary, our factorization algorithms output a scalar and an ordered list of circuits for nonconstant irreducible factors. They run deterministically in , or with zero error and expected polynomial time using an NP oracle. The randomized algorithm first samples a list of identity tests and uses the oracle to certify that the list works for all bounded candidate circuits. For formula inputs, combining our formula construction with [5] instead outputs the irreducible factors as formulas in randomized polynomial time.
1.2 The idea of the proof
Suppose . Choose a word of maximum length in , with coefficient . Our weighted NFA first copies a chosen prefix of its input. It then follows the letters of , replacing them by 1, with additional transitions that return to the start of this part and replace a letter by a negative suffix coefficient divided by .
Fix a word in place of . Only suffixes of in can contribute to . Every accepting path on that returns to state 0 has a partner on a shorter input: delete its last return block. The two paths have opposite contributions. The sole unpaired path copies and erases , proving . Linearity gives .
Replacing each variable by a transition matrix applies this map to a circuit. The same substitution in a VNP verifier works because commutes with its finite Boolean sum. For formulas, we use one further fact: the matrix block that describes erasing contains only field constants. At a product gate, these constants can be evaluated first, so there is no need to duplicate a polynomial formula for every matrix entry. This gives the quadratic formula bound.
1.3 Relation to earlier work
Variable-disjoint, homogeneous, and multilinear noncommutative factorization are studied in [3]. That work relates variable-disjoint factorization to polynomial identity testing and reduces homo-geneous factorization to that case by labelling variables with their positions. The general-circuit algorithms use identity testing and output circuits; the ABP versions admit deterministic polynomial-time algorithms with ABP outputs.
The closest connection with our proof is word differentiation. If is homogeneous and for a degree- word , retaining the words of that end in and removing that suffix gives . Our automaton does exactly this when all reset labels vanish. For a nonhomogeneous , simply removing can also retain contributions from shorter words of completed by letters from . The suffix coefficients supply reset labels that cancel these additional contributions. Thus the additional step is a linear extraction identity for arbitrary nonhomogeneous cofactors, proved in Section 3; the implementation by automata and matrix substitution builds on [1, 3, 2].
There is also an algorithmic distinction. The algorithms in [3] find factors in their stated settings. Our circuit-closure proof constructs a specified factor once a longest cofactor word and its suffix coefficients are supplied; it does not find those data from a general circuit in polynomial time. Homogeneity removes the shorter-suffix terms, which is why the homogeneous extraction needs less information.
Computing the homogeneous components of alone does not resolve this issue. Writing and for the homogeneous components of the factors, one has . A component of the product is generally a sum of products, so the homogeneous factorization result does not directly recover the nonhomogeneous factors. Our map acts on the whole polynomial and needs only one longest cofactor word and its suffix coefficients.
The algorithm of [5] takes finite-field formula inputs and outputs factors as ABPs. The journal version [6] extends this to ABP inputs, so polynomial-size ABP factorizations over finite fields are already known. These algorithms use Higman linearization and invariant-subspace methods. We include a direct ABP closure proof to show how the same extraction map acts on this model. The formula result gives a stronger output guarantee for formula inputs: using the cofactor ABPs supplied by [5], our construction produces formulas for the factors. Section 5.3 explains this combination. The new formula construction uses the existing algorithm to find the factorization.
The distinction between these representations matters for the size bounds. The ABP algorithm measures its cost and output size in the input ABP size; it does not supply a polynomial-size ABP for an arbitrary small circuit. Conversely, its ABP outputs do not by themselves establish formula closure. For circuits, our extraction map is applied directly to the input circuit. For formulas, we additionally use the automaton's scalar erasing block to avoid duplicating polynomial subformulas for all matrix entries. These are the two size-preservation arguments behind our main results.
Factorization using minimal linear representations is studied in [14]. Our bounds are measured in the size of the original circuit, which can be much smaller than an explicit linear representation.
Our formula result also complements the characteristic-zero commutative formula-closure theorem of [7]. The proof here uses the order of letters in a noncommutative word: the automaton copies a prefix and cancels the unwanted suffix contributions. Its scalar erasing block then gives a small formula for the extracted factor. Both steps work in every characteristic.
2 Polynomials, circuits, and fields
Let , with , and let be the set of finite words in . The empty word represents the multiplicative identity. For a polynomial and a word , write for the coefficient of . Multiplication satisfies
The degree of a nonzero polynomial is the maximum length of a word with nonzero coefficient.
Lemma 2.1. If , then and .
Proof. Put and . Choose words of lengths with nonzero coefficients in , respectively. A contribution to must use a word of length at most from and one of length at most from . Since , both lengths must be maximal. The cut is therefore fixed after the first letters, and . No product word is longer than .
A factor of a nonzero polynomial means a polynomial such that for some . A left factor has a presentation , and a right factor has a presentation . In a presentation with both nonconstant, we call a central factor. These descriptions need not be exclusive: they refer to positions in a chosen decomposition. Nonzero scalars are units.
A nonconstant polynomial is irreducible if it is not a product of two nonconstant polynomials. By Lemma 2.1, repeated splitting gives at most nonconstant irreducible factors. For two or more variables, ordered factorizations into irreducibles need not be unique up to scalar rescaling [3]. Our closure results apply to every specified in every identity ; they do not select a preferred factorization. The algorithms later in the paper output one complete factorization , consisting of a nonzero field element and an ordered list of nonconstant irreducible factors in the stated representation. The list is empty for a scalar input.
Circuit conventions. Circuits have variable or field-constant input gates, binary addition gates, and ordered binary multiplication gates. We count gates. A formula is a circuit whose underlying computation is a tree; repeated uses of a subexpression are counted separately. There are no division gates. Field inverses used in constructing a circuit may be supplied as constant inputs. Syntactic degree is zero at a constant, one at a variable, the maximum at an addition gate, and the sum at a multiplication gate.
For , an actual degree bound can be converted into a syntactic bound with polynomial overhead. At every gate retain the homogeneous components of degrees . Addition is componentwise, and multiplication uses
Components of higher degree cannot contribute to a lower degree and can be discarded. Summing the output components gives a circuit of size and syntactic degree at most D for any size-s circuit whose output degree is at most D. If D = 0, evaluating the input circuit at X = 0 gives its constant output in field operations.
Reversal. Reverse the order of letters in a word and extend this operation linearly, writing it as rev. Then . Reversing the order of the two inputs at every multiplication gate gives a same-size circuit for the reversed polynomial.
2.1 Arithmetic size and binary length
In the arithmetic model, any element of may appear as a constant input. Its cost is one gate, independent of how it is represented. All our arithmetic closure statements use this model and are nonuniform: a different circuit may be chosen for each input length. These conventions are the usual ones for the classes [4].
In particular, a rational number is allowed at one input gate even if its numerator or denominator has many bits. The NFA below is specified by the additional constants
where is a nonzero top-degree coefficient and the are its word's proper suffixes. There are only linearly many such constants. The formula construction also evaluates scalar matrix expressions in these and the input constants, and puts the resulting field elements at its leaves. The number of leaves remains polynomial. Binary lengths play no role in these arithmetic size bounds. Thus a coefficient-length bound for factors over is not an assumption of the closure theorems.
Binary descriptions require a different qualification. The present proof does not bound the binary lengths of these rational constants in terms of the original circuit alone. Moreover, an exact factor can be rescaled by any nonzero rational , with the inverse scalar absorbed into an adjacent factor. A claim about binary descriptions of all exact factors must account for this choice. We do not claim closure with polynomial-bit constants, or with constants restricted to a fixed finite set.
For circuit construction over , a conditional bit bound is available. Suppose the valid cofactor words and coefficients required by Theorem 1.1 are supplied explicitly, with total binary length . The construction then outputs the factor circuit in time polynomial in the encoded input size, , and . The required inverses and coefficient ratios have polynomial bit length, and the remaining operations create circuit gates. This statement neither bounds in terms of the original circuit nor provides an algorithm for finding the cofactor data. It also does not assert a bit bound for the constants evaluated in the formula construction.
All subsequent algorithmic bit bounds use an explicitly represented finite field , with the prime and an irreducible polynomial supplied in a valid encoding. A field element uses bits, and field operations take polynomial time in . Degree bounds supplied to the circuit-factorization algorithms are encoded in unary. Output factors are presented by circuits or formulas over the same field, as specified in each result.
3 An NFA that removes a right cofactor
Fix with . Choose with . For , put
Thus and . These data will determine a linear map . They are chosen from ; no information about the polynomial multiplied on its left is needed.
3.1 States and replacement labels
The machine has states . Its initial state is *, and its only accepting state is . Each transition specifies the input letter to read and the expression by which to replace it. The following are all transitions; the last two rows apply for .
| Transition | Input consumed | Replacement |
|---|---|---|
| any | ||
| 1 | ||
| 1 | ||
The transition with input consumes no letter. The last row is a reset. State has no outgoing transitions, and no state can return to *. An accepting path must consume the whole input and end at .
For a word , multiply the replacement labels along each accepting path, in their order. Sum these products and multiply by ; this defines . Extend the definition linearly:
If , an accepting run on with ordered replacement product contributes to . Summing these products over all runs and all input words gives (3). At * the machine copies letters. After leaving * it replaces each letter by a field element, so is a scalar multiple of the copied prefix.
All sums are finite. The empty-input transition can be used at most once, and every other transition consumes a letter. Only finitely many input words have nonzero coefficient in . Hence is a well-defined linear map and never increases degree. We keep transitions with replacement 0 as formal paths contributing zero.
3.2 The cancellation proof
A reset block of length starts at 0, advances times, and then resets to 0. It reads and replaces this whole block by . The case is a loop at 0. Every accepting path ends with a full advancing traversal of : this traversal begins after its last reset, or just after leaving * if there is no reset. In particular, every accepted word ends in .
Theorem 3.1 (Removal of a right cofactor). For every word , . Consequently, for every polynomial ,
Equivalently, for every word , including , whose coefficient is the constant term.
Proof. Fix . Every word in has length at most . If has an accepting path, it ends in , so must be the suffix of of length . Therefore
Terms with are included formally.
The word may end in several of the words . We do not choose one of these suffixes in advance. Instead, fix one accepting path on that has a reset. This path determines a unique index : its last reset goes from state to state 0. The block ending at that reset begins immediately after the preceding reset, or immediately after leaving * if there is no preceding reset. It advances times and then resets, so it reads exactly . The final advancing traversal of follows this block. Let be the input read before that reset block, and let be the product of all replacement labels on this earlier part of the path. This part ends at state 0. The input has the form
Cancelling the common suffix gives , and therefore
Keep the entire earlier path on , including its choice of when to stop copying and all its earlier resets, and delete the last reset block. Follow it directly by the advancing traversal of . This is an accepting path on .
Including the coefficients in (4) and the final multiplier , the two paths contribute
They cancel. The polynomial is a scalar multiple of a copied prefix, so cancellation occurs at that same output monomial. The paired input words can be different: their lengths differ by .
To check that every suffix-term path is paired exactly once, start with an accepting path on . Write its input as , where the final is its last advancing traversal. The path before that traversal ends at 0. Since
right cancellation gives . Insert a reset block reading immediately before the final traversal of . The resulting path reads , and the inserted block is its last reset. This reverses the deletion uniquely. The argument also applies when and .
For each fixed , deletion and insertion therefore give inverse correspondences between the paths on whose last reset has index and all paths in the summand . The first collections are disjoint for different : one path has only one last reset. Several can be suffixes of , and several different paths can have the same last reset index, but every individual path still occurs in exactly one pair. The earlier path is preserved, so distinct histories are not identified. In particular, no path is cancelled twice. The copied prefix is also preserved, proving cancellation separately at each output monomial.
Only the accepting path on with no reset remains. It must copy exactly and then replace the final by 1. Its contribution is . Zero labels cause no problem, and the cancellation is valid in every characteristic. We have proved, for every word ,
Finally, write . Linearity gives
The proof expands to identify cancelling contributions. The machine can instead act directly on the combined coefficients of : multiplication by a path's replacement product distributes over the finite sum . No grouping of monomials is needed.
If is a scalar, use one initial and accepting state, with a loop reading and replacing by for every variable, and multiply the total by . Then .
Remark 3.2 (The homogeneous case). If is homogeneous of degree , then all in (2) are zero. Only paths without resets can contribute nonzero terms, and
This is the familiar operation that removes a fixed word from the right. For a nonhomogeneous , the proper suffixes can have nonzero coefficients. The reset transitions provide exactly the cancellations proved above. This explains the additional step beyond the homogeneous word-removal argument, while keeping the same matrix-substitution method.
4 Implementing the NFA in a circuit
The use of finite automata to define matrix substitutions for noncommutative circuits appears in [1]. Substitution automata, whose transitions replace input letters by variables or scalars, are used in [3, 2]. We apply this established implementation method to the factor-extraction automaton of Theorem 3.1. Evaluating the input circuit on its transition matrices sums the accepting-path contributions without expanding the circuit into monomials.
For each , let be the scalar transition matrix on the erasing states . Its entry is the sum of the replacement labels on transitions from to reading . Thus, for each with , add 1 at and at . All other entries are zero. Write for the coordinate column vector of state .
Index an additional row and column by * and define
These matrices have entries in . The top-left entry copies . The row combines the empty-input transition with the first letter read after that transition. Thus the matrices have no empty-input edges to handle.
Lemma 4.1 (Circuit implementation). For the nonscalar cofactor map, with , every polynomial satisfies
If has a circuit of size , then has a circuit of size . The construction preserves any syntactic degree bound on the given circuit. Scalar cofactor removal uses one scalar multiplication.
Proof. Let be nonempty. Multiplying the block matrices gives
The term indexed by copies the first letters. The scalar matrix product sums all erasing paths on the remaining suffix, starting at 0 and ending at . It therefore accounts for exactly the runs that switch from copying to erasing after letters. An accepting run cannot switch after the last letter: reaching from 0 requires further letters because . These are all accepting runs on .
For , matrix substitution gives the identity matrix, whose entry is zero. The NFA has no accepting run on either. Multiplying (9) by and extending linearly proves (8).
To obtain a circuit, replace a scalar input by and a variable input by . Replace every internal gate by matrix addition or ordered matrix multiplication. Express each matrix entry using scalar gates. Addition requires gates and multiplication requires gates per original gate. Previously computed entries are shared. Finally take the designated entry and multiply by .
At a scalar input every entry has syntactic degree zero; at a variable input it has syntactic degree at most one. Induction over the gates proves that each new entry has syntactic degree at most that of its original gate. No division gate is introduced.
Proof of Theorem 1.1. For with , combine Theorem 3.1 and Lemma 4.1. This gives a circuit for of size . If is a scalar, multiply the input circuit by .
For , reverse the circuit for . Since , the same construction gives ; reverse the resulting circuit to obtain .
For a factorization , first remove the right cofactor to obtain . Then use reversal to remove the left cofactor and obtain . By Lemma 2.1, both cofactor degrees are at most . There are at most two matrix substitutions, with scalar multiplications for scalar cofactors, so the size is . Each substitution needs one word and linearly many field elements, and preserves syntactic degree.
The structural estimate requires only the actual degree of . Substitution into matrices respects addition and multiplication, so any cancellations already present in the input circuit remain valid after substitution, even if some intermediate gates have very large degree.
Remark 4.2 (A common bound for all factors). For an input circuit of syntactic degree at most , where , fix an absolute constant large enough that
bounds the above construction. Every factor has a circuit of size at most and syntactic degree at most . Crucially, this is a bound in terms of the original circuit; it need not grow each time a factor is split further.
5 Formulas and algebraic branching programs
5.1 A direct formula construction
We apply the factor-extraction NFA of Section 3 to a polynomial computed by a formula. As in Section 4, this means substituting its transition matrix from (7) for each variable . The substitution produces the matrix , and the required polynomial is its normalized entry
We will construct a small formula for this entry directly.
The NFA first copies letters and then replaces letters by scalars. It can change from copying to replacing only once. Correspondingly, the upper-left entry of is P, and the lower-right block contains only field elements. The latter block can therefore be evaluated before constructing the output formula. At a multiplication gate, the change can occur in the left part of the input word or in the right part. These two possibilities give the recursion below.
Lemma 5.1 (Applying the map to a formula). If has a formula of size , then has a formula of size . For , given the NFA data, the formula can be constructed using field operations and operations to write the formula. A scalar cofactor requires only scalar multiplication of the original formula.
Proof. Assume ; a scalar cofactor only requires a scalar multiplication. Let be the original formula, with root . For each node occurrence of , let denote the polynomial computed by the original subtree rooted at . Thus . Throughout this proof, denote the left and right children of an internal node .
Recall that has blocks , , 0, and , where is a matrix over . Evaluation of the subtree at gives
Here is a row of noncommutative polynomials, and is a matrix over . Concretely, to compute , take the original subtree at , replace each variable leaf by and each scalar leaf by , and perform its additions and ordered multiplications as matrix operations. No polynomial variables remain in this evaluation. Thus at a variable leaf, at a scalar leaf, and at internal nodes
according to the gate. We compute all these matrices from the leaves to the root.
Constructing the formula. For a column , let be the formula we construct to compute the single polynomial . The column consists of field elements, not polynomial variables. At a scalar leaf labelled , the row is zero, so is the single constant leaf 0. At a variable leaf labelled , it is the single constant leaf .
At an addition node U, construct
At a multiplication node U, construct
In this rule, the factor is represented by an unchanged copy of the original subtree at . Only the two occurrences of are recursive calls. The scalar column is computed before making the call on .
To verify the product rule, multiply the two block matrices:
Consequently, , exactly as in (12). The first term corresponds to copying the whole left part and changing to scalar replacement in the right part. The second corresponds to changing in the left part; the right part then acts only through the matrix over . The addition rule follows from block addition. Induction on the original formula proves that computes . In particular, the desired output is the formula .
Why the NFA structure matters. Two features of (10) make this recursion work. The upper-left block is the single original polynomial , so its occurrence in (12) is supplied by an unchanged subtree. The lower-right block has entries in the field, so is again a column of field elements. Thus the recursive call has exactly the same form: its column parameter carries no polynomial formulas, and every leaf contraction is just one precomputed constant. This permits one recursive call on each original child. A general NFA with replacement labels need not have this triangular form or a lower block over the field. If contained polynomial entries, could no longer be precomputed as field data, and the leaf contractions would themselves require polynomial formulas. The size recurrence below would then no longer follow. The argument therefore uses the particular structure of our NFA; it does not establish the same bound for an arbitrary NFA.
Formula size. Write for the number of nodes in the original subtree at U, including leaves, so . Let be the number of nodes in the unsimplified formula . This count is independent of z: each evaluated constant, even zero, is kept as one leaf. The recurrences are
if U is a leaf,
if U is an addition node,
(13)
if U is a multiplication node.
(14)
In the last line, counts the unchanged copy of the original left subtree. The final 2 counts one multiplication gate and one addition gate used to join the terms in (12).
There is exactly one recursive call for each node occurrence of : at either kind of internal node we call each original child once. In particular, inserting the unchanged copy of the left subtree does not start a further recursion on that copy. Let be the number of original multiplication nodes, and let be the left child of a multiplication node . Summing the recurrences gives
To see each term in (15), first count one node for every original node occurrence. This contributes : one constant leaf at an original leaf, one addition gate at an original addition, and one of the two connecting gates at an original multiplication. Each multiplication contributes one further connecting gate, accounting for , and its unchanged left-subtree copy, accounting for the sum.
Thus the extra contribution at each multiplication node is . There are at most multiplication nodes. It follows directly that
The final multiplication by adds only a scalar leaf and a multiplication gate. This is a formula-size count with no sharing: every copied occurrence is included.
Construction time. First compute the matrices . Ordinary matrix addition and multiplication use field operations in total. Next start the formula recursion with . At a multiplication node, computing the new column costs field operations. At a variable leaf, evaluating costs at most the same amount. There are recursive calls, so this part uses field operations. Finally, writing the unchanged subtree copies and connecting gates takes operations, by the size count above. These are arithmetic operation bounds; bit costs depend on the representation of the field and its elements.
Corollary 5.2 (Formula factor closure). If a nonzero polynomial has a formula of size , each one-sided factor has a formula of size . If , then has a formula of size .
Proof. Apply Lemma 5.1 to the map removing the right cofactor. Reversal preserves formula size, so it gives the same bound for a right factor. For , remove and then, using reversal, remove . There are two formula transformations. The degree of a polynomial computed by a size- formula is at most , so the data and arithmetic construction time are polynomial in .
The scalar computations in this proof are performed while constructing the formula. Their results are supplied as constant leaves. This is valid over every field in our arithmetic model, including ; Section 2.1 explains why binary lengths are a separate issue.
5.2 Algebraic branching programs
An affine layered algebraic branching program (ABP) has a source, a sink, and edges between consecutive layers. Each edge is labelled by an affine linear polynomial. Its value is the sum of the ordered products of labels along source-to-sink paths. Its length is the number of edges on each such path, and its width is the largest layer size.
The ABP case is included for completeness. Polynomial-size ABP factorizations over finite fields are already known from the journal version [6], which gives a randomized polynomial-time factorization algorithm with ABP inputs and outputs. The following direct proof shows that the same extraction automaton preserves polynomial ABP size. We state and prove the size bound over every field.
Proposition 5.3 (ABP factor closure). Every factor of a polynomial computed by a polynomial-size noncommutative ABP has a polynomial-size ABP over the same field.
Proof. Let an ABP compute , and put for a nonscalar removal map. Replace each vertex by vertices indexed by the NFA states. An edge labelled is replaced by edges whose labels are the entries of
These labels are still affine linear polynomials. For each original path, summing over the new state indices gives the corresponding entry of the ordered product of its label matrices. Summing over original paths therefore gives . Choose state * at the source and state at the sink, and multiply by on a final constant edge. The resulting ABP computes by Lemma 4.1.
Each original edge gives at most edges, and each layer width grows by at most , apart from the final single sink. Scalar removal uses just a constant edge. Reversing edges and interchanging source and sink reverses every path word, so the construction also removes a left cofactor. Apply it twice for a central factor. The cofactor degrees are bounded by the input ABP length, proving polynomial size.
5.3 Formula outputs from finite-field factorization
The size theorem can be combined with an existing algorithm that finds ABP factors. We first explain how to obtain the required cofactor data from an ABP.
Lemma 5.4. Given an ABP for a nonzero , a word of degree with , and the coefficients of all its suffixes in , can be found in deterministic time polynomial in the encoded ABP size and .
Proof. The degree is at most the ABP length. Form its homogeneous components by recording at every vertex the degree used so far, splitting each affine edge into its constant and linear parts. This increases the size only polynomially. Within a fixed degree, eliminate scalar edges by summing the weights of scalar-only paths in the acyclic graph, using dynamic programming. The degree- component then has a representation
where the matrices and endpoint vectors have polynomial dimension and scalar entries. Deterministic ABP identity testing [12] finds the largest nonzero degree by testing these components.
In the degree- component, suppose a prefix has been fixed. The polynomial of its possible completions is represented by the remaining layers, with initial row
If this polynomial is nonzero and , at least one next letter leaves a nonzero completion polynomial. Try the letters and use the same identity test to choose one. After steps the chosen word has nonzero coefficient. To compute a suffix coefficient, use the component of that suffix's length and multiply its letter coefficient matrices. This takes polynomial time for all suffixes. If , the polynomial is a nonzero scalar and its value is obtained by setting all variables to zero.
Corollary 5.5 (Finite-field factorization with formula outputs). Given a nonzero noncommutative formula of size over an explicitly represented finite field , a complete factorization can be computed in randomized time polynomial in , the number of variables, and . The output is a nonzero scalar and an ordered list of formulas for the nonconstant irreducible factors. Each output formula has size .
Proof. Apply the algorithm of [5] to the input formula. It gives polynomial-size ABPs for a complete factorization . For each , concatenate the earlier and later ABPs to represent
Empty products are 1. These cofactor ABPs have polynomial size. Obtain the removal data for and using Lemma 5.4; reversing the edges gives an ABP for the reversed cofactor.
Starting from the original formula for , remove , reverse, remove , and reverse again. Lemma 5.1 gives successive formula sizes and . Scalar cofactors only require scalar multiplication. We start separately from the original formula for each , so the exponent does not grow along the factor list. Since , there are at most output factors and at most output formula nodes in total. The cofactor ABPs have polynomial size, their data are recovered in polynomial time, and all scalar computations in Lemma 5.1 have polynomial bit cost over . Thus the whole reconstruction takes polynomial time. A scalar input has an empty list of nonconstant factors and is handled separately.
The reconstruction is deterministic once the ABP factorization is supplied, and preserves its factors exactly. Its success probability is therefore that of the algorithm in [5]. The conference version [5] already suffices for this corollary. We use the factor ABPs to obtain cofactor data and transform the original formula; no general conversion of an arbitrary ABP into a small formula is assumed.
6 Closure of VP and VNP
We use the standard nonuniform definitions over a fixed field [4]. A family has polynomially many variables and polynomial degree. It belongs to if it has polynomial-size noncommutative circuits.
6.1 VP closure
If and , Theorem 1.1 gives polynomial-size circuits for every specified . Degree additivity gives polynomial degree as well. The cofactor data chosen for each become constants in the output circuit. Their existence suffices for this nonuniform closure statement; finding them is a separate algorithmic problem.
6.2 VNP closure
Let and be disjoint sets of free noncommuting variables. A circuit for , together with the designation of as Boolean inputs, represents
Here is the polynomial in obtained by replacing by the field scalar . The circuit is for ; we do not assume a small circuit for the whole sum . The polynomial is called a verifier. A family is in when the number of variables, the number of Boolean inputs, and the verifier size and degree are polynomially bounded in .
Theorem 6.1 (VNP factor closure). Over every field, is closed under taking factors. Quantitatively, suppose has a representation (16) whose verifier has circuit size and degree at most , where .
(i) If , then for a verifier of size and degree at most . The same bounds hold for a right factor.
(ii) If , then has a verifier of size and degree at most .
The new verifiers use the same Boolean variables . A constant verifier is handled by scalar arithmetic.
Proof. We first prove (i). Suppose and . Choose the cofactor data for from the factorization of the whole polynomial . Let
be the corresponding linear map of Theorem 3.1. Its extraction property is . The map is defined on every polynomial in , even if that polynomial is not divisible by .
Let and be the normalization constant and matrices of Lemma 4.1 for these same cofactor data. Set . The matrices are fixed independently of the Boolean assignment, and for every the lemma gives
Each entry of has degree at most one in .
Construct a matrix circuit from the circuit for by substituting
and using matrix addition and ordered matrix multiplication at its gates. Let be its output matrix and define
This is one verifier circuit in the formal variables .
Fix a Boolean assignment . Specialization respects addition and ordered multiplication. Both ways of evaluating the original circuit send to , to , and a field constant to . Induction over the gates therefore gives
Applying Lemma 4.1 to yields . Hence
(18)
The second equality uses linearity of the fixed map ; the final equality is Theorem 3.1. Individual summands need not be divisible by . Before specialization, need not commute with , and no such commutation was used.
To implement the verifier by ordinary circuit gates, each matrix addition costs gates and each multiplication costs gates. Sharing previously computed entries gives size . Degree additivity and (16) imply , so this is . Every substituted entry has degree at most one in , and therefore . This degree statement concerns the polynomial computed by the verifier and remains valid in the presence of cancellations. A supplied syntactic degree bound is also preserved. If is scalar, take .
Interchanging the inputs at every multiplication gate computes word reversal without changing circuit size. Reversal commutes with Boolean specialization, because the assigned values are field scalars. Thus it preserves Boolean-sum representations, and applying (i) to gives the right-factor claim.
For (ii), first remove to obtain a verifier for . Reverse, remove the right cofactor from , and reverse again. Both cofactor degrees are at most . Two applications of the preceding construction give size , degree at most , and the same Boolean variables. For a VNP family all these parameters are polynomially bounded, proving closure for every specified factor family.
The proof uses more than the assertion of VP factor closure: need not have a small circuit, and its summands need not share a factor. What permits the passage to VNP is one cofactor-dependent linear map together with one small verifier implementing it for all Boolean assignments. The data are chosen nonuniformly for the specified factor. Together with Corollary 5.2 and the VP argument, Theorem 6.1 proves Theorem 1.2.
Corollary 6.2. If a polynomial-degree family requires superpolynomial noncommutative circuit size, then every polynomial-degree family satisfying also requires superpolynomial circuit size. The same statement holds for formulas and for ABPs in their respective size measures.
Proof. Small representations of would give small representations of by the corresponding closure theorem.
7 Succinct ABPs with polynomial-time edge queries
For this section and the next, all bit-complexity statements are over an explicitly represented finite field. We use the affine layered ABPs defined in Section 5.2.
A succinct description gives the layer sizes and an algorithm that, on binary indices , returns the edge label from vertex of layer to vertex of layer . A nonedge has label zero. Both the length of this description and the cost of an edge query matter.
Lemma 7.1 (Computing one coefficient). For a circuit and a word of length , the coefficient can be computed in field operations. The empty-word coefficient can be computed in field operations. No degree bound on intermediate gates is needed.
Proof. At each gate, compute the coefficient of every substring , including empty substrings. Input gates are immediate. Addition is componentwise. At a product gate use
Process gates in topological order. For , there are intervals and cuts for each interval. Longer words in the gate polynomials cannot contribute to these coefficients. The empty-word coefficient is obtained by evaluating the circuit at .
Theorem 7.2 (Local representation of a factor). Suppose a size-s circuit over computes a nonzero polynomial of degree at most in variables. Every factor has an affine layered ABP of length and width at most , whose description has polynomial length in and whose edge labels are computable in deterministic polynomial time in these parameters.
Proof. Let be the specified factor. For , Theorem 1.1 gives it a circuit of size poly; for , is a scalar. For , make a separate path for each word . Give each path internal vertices, identify all sources, and identify all sinks. The first edge has label . The remaining edges spell the letters of and then have label 1 until the sink is reached. Thus each path has length and weight , and the ABP computes .
Number the words by length and then lexicographically. An internal vertex is identified by its word number and layer. The word number has bits and can be converted to a word in polynomial time. An edge query checks whether the indices describe consecutive vertices of one path, allowing for the common source and sink. The label is then zero, one, a variable, or the coefficient . The last is computable in polynomial time by Lemma 7.1 and finite-field arithmetic. A full affine coefficient list has only entries. For , a single constant edge suffices.
The description may include the factor circuit itself. Equivalently, it may include the original circuit and the at most two sets of NFA data from Theorem 1.1, from which that circuit is built in polynomial time. All their field elements have bits.
This theorem gives a deterministic polynomial-time local evaluator. Finding its description is a separate task. The possibly exponential width is allowed; no minimum-width claim is made. Over , the coefficient algorithm still uses polynomially many field operations, but explicitly writing one coefficient can require many bits. The finite-field bit-time conclusion does not follow over from circuit size alone.
8 Finding a complete factorization over finite fields
Given a circuit over an explicitly represented finite field for a nonzero polynomial , and a degree bound in unary, we seek a complete ordered factorization . The output consists of and circuits over for the nonconstant irreducible factors . The list is empty for a scalar input. We prove a deterministic bound and a zero-error randomized bound with an NP oracle and expected polynomial running time.
Both algorithms use the factor-size theorem to search for bounded circuits giving a non-trivial split of a current factor . Comparing every word coefficient of gives an existential circuit choice followed by a universal word test, yielding the first bound. For the second, we first sample and certify a polynomial-size list of matrix evaluations that tests every bounded candidate identity exactly. With the list fixed, verifying a proposed split takes polynomial time, so split search requires only an NP oracle.
A degree bound gives a scalar input, handled by evaluation at . Assume . Replace the input by the homogeneous-component construction of Section 2, of syntactic degree at most , and let be its size. Fix the original factor bound from Remark 4.2. We use this same bound throughout the search. All size and degree bounds in oracle queries are encoded in unary and have values polynomial in the original input length and . Relabel the input variables as , with at most the input circuit size. Lemma 7.1 computes each specified polynomial-length word coefficient in polynomial time.
8.1 Deterministic search with a second-level oracle
Theorem 8.1 (Deterministic factorization). Given the circuit and unary degree bound above, a complete ordered irreducible factorization can be computed in . The output is a scalar and a list of circuits, with total encoded length polynomial in the input length and .
Proof. First ask whether some nonempty word of length at most has a nonzero coefficient in . This is an NP question. If not, the input is a nonzero scalar: output and an empty factor list. Henceforth the current polynomial is a nonconstant factor of , represented by a circuit of size at most .
A nontrivial split is described by circuits , each of size at most and syntactic degree at most , and nonempty words of length at most , satisfying
The first two conditions certify that both factors are nonconstant. The last certifies equality: , so checking these coefficients checks the whole polynomial.
The circuits and the two nonconstancy words form a polynomial-length existential witness. For any specified , all checks in (19) take polynomial time. Thus existence of a split is a predicate. Here means one polynomial-length existential quantifier followed by one polynomial-length universal quantifier and a polynomial-time check. Word encodings have polynomial length; malformed encodings can be ignored.
This bounded search misses no genuine split. If is a nontrivial factorization, both and are factors of the original , so the original bound applies to them. Conversely, every successful witness gives an actual nontrivial split.
If a split exists, recover a witness one bit at a time. At each step, ask whether the proposed prefix can be extended to a successful witness. Fixing some existential bits leaves a predicate. Polynomially many queries recover both circuits. Recurse on them in product order. If no split exists, output as irreducible.
Each split has two positive-degree factors. Degree additivity therefore bounds the recursion by leaves and nodes. Every circuit found obeys the same original bound , so the queries, computation, and total output length remain polynomial. For a nonconstant input we may take , absorbing scalar choices into the factors. Fixed encoding and witness order make the selection deterministic.
8.2 Zero-error randomized search with an NP oracle
Theorem 8.2 (Zero-error randomized factorization). Given the circuit and unary degree bound above, a complete ordered irreducible factorization can be computed with an NP oracle by a zero-error randomized algorithm of expected polynomial running time. It terminates with probability one and outputs a scalar and a list of circuits over the input field, of polynomial total encoded length.
Proof. Handle scalar inputs as above, and assume . Every candidate identity in the preceding search is . Fix
and let consist of circuits over , in the input variables , of size at most and syntactic degree at most . Every candidate difference belongs to this class.
A finite list of matrix substitutions is called valid if every nonzero polynomial computed by a circuit in has a nonzero value on at least one substitution in the list. For this class, a valid list makes vanishing on all tests equivalent to being the zero polynomial.
Sampling a list. Matrix evaluations give randomized identity tests for noncommutative circuits [8]. For the test used here, choose a finite extension with and polynomial-bit representation. For each variable , independently sample uniform elements , for , and substitute
Here is an matrix, indexed from 0 to , and has a single 1 in position and zeros elsewhere. Thus every letter advances one position.
To analyze a test, first regard the weights as commuting indeterminates. For a polynomial of degree at most ,
The diagonal entries equal the constant coefficient. Different words on the right of (20) give different commuting monomials, because each weight records both its letter and its position. Hence, if , some matrix entry is a nonzero polynomial in the weights, of degree at most .
After assigning independent uniform field values to the weights, the polynomial zero bound [13] gives
Nonzero constants are detected with probability one. A test is performed by evaluating the circuit on these matrices, in polynomial time.
One random test may miss some circuits. We need a list that works simultaneously for all circuits in . Fix a padded binary encoding of this class, of length
This accounts for the gate types, wires, input labels, constants, and output gate. There are at most encoded circuits. Sample independent substitutions. For any fixed nonzero circuit, the probability of missing all its tests is at most . A union bound therefore gives
The list has polynomial length and is valid with probability greater than 3/4. Random sampling alone does not identify which sampled lists are valid. The next step supplies that guarantee.
Certifying the list. A proposed list is invalid exactly when there exist a circuit and a word such that
If , use . Otherwise choose the least with . Then . Enumerating monic degree- polynomials over and applying the standard polynomial-time irreducibility test constructs a suitable extension in polynomial time.
The coefficient proves that computes a nonzero polynomial, while the evaluations show that the list misses it.
This is an NP predicate. The circuit and word are polynomial-length witnesses. Size and syntactic degree are checked directly; Lemma 7.1 computes the specified coefficient; and the polynomially many matrix evaluations are polynomial-time computations. Empty words are allowed, so the test also covers a nonzero constant coefficient.
Ask the NP oracle whether (21) has a witness. If the answer is yes, discard the list and sample a fresh one. If the answer is no, retain it. A retained list is certainly valid. Each independent trial succeeds with probability greater than 3/4, so the expected number of trials is less than 4/3, and termination occurs with probability one. Exact uniform sampling of field elements by rejection sampling also has expected polynomial cost.
Searching for factors. Now use the same search as in Theorem 8.1, replacing its universal coefficient test by
Because and the list is valid, these checks are equivalent to the polynomial identity .
A split query guesses only within the fixed bounds and words certifying that they are nonconstant. Checking this witness now takes polynomial time, so the split predicate is in NP. Certification of the list was completed beforehand; it is not an additional condition inside this NP verifier.
Recover witnesses by fixing their encoding bits through NP queries, and recurse in product order. The same bound detects every genuine split, and the same degree argument gives at most search nodes. All guessed factors have coefficients in the original field ; the extension field is used only for evaluating tests.
Fix a padded encoding of the split witnesses, and always try bit 0 before bit 1 when recovering a witness. Every certified list accepts exactly the witnesses to a genuine split, so all such lists give the same answers to the prefix queries. Inductively, they yield the same ordered output factorization. Thus the random choices affect the running time, but need not affect which factorization is returned.
The list remains valid for candidates chosen using previous oracle answers: it was certified for the entire bounded class, including every possible candidate difference. Thus all later decisions, including declarations of irreducibility, are exact.
After certification, the computation is deterministic polynomial time with an NP oracle. Only the sampling stage is randomized, and it has zero error and expected polynomial running time. This proves the theorem.
The randomized upper bound also follows from the general inclusion [11, Theorem 5]. Indeed, existence of a bounded split, with any prescribed prefix of its witness encoding, is in . The witness supplies the factor circuits and nonconstancy words; the verifier checks the size and syntactic degree bounds and the two nonzero coefficients deterministically, and uses randomized noncommutative identity testing [8] to verify the product. A correct identity always passes, while an incorrect one passes with probability at most . The inclusion gives exact expected-polynomial-time decisions for these prefix queries. Witness recovery and recursive splitting use polynomially many queries of polynomial length, so their total expected running time is polynomial. The direct proof above implements the bound through one list of matrix evaluations certified for all candidate identities. In both arguments, the factor-size theorem supplies the polynomial bound on the witnesses.
The second result is an expected-polynomial-time randomized oracle bound. It does not give an unconditional deterministic algorithm. A deterministic polynomial-time identity test would give that stronger conclusion directly, by making the verification of a guessed split polynomial time.
Closing remark. The extraction proof uses the automaton to arrange cancellation between accepting runs. The identity-testing constructions in [1, 2] use automata to isolate a contribution that survives, while the word-removal construction in [3] selects and erases a prescribed word. Here the reset labels are chosen from the cofactor so that, including its word coefficients, runs on different input words have paired contributions that cancel, leaving precisely the required factor. To our knowledge, this cofactor-dependent pairing for nonhomogeneous factor extraction is new.
The closure proofs construct a specified factor from short cofactor data, while the circuit-factorization algorithms find factors by bounded search and identity testing. Finding the cofactor data efficiently from a general circuit remains an open direction. It would also be useful to reduce the degree dependence of the construction and to obtain bit-complexity bounds over Q under a suitable normalization of factors.
Acknowledgments
We acknowledge the use of OpenAI's ChatGPT (GPT-6 Astra) for discussions during this work. We initially set out to explore the computation of succinct algebraic branching programs for factors. A series of discussions led from this question to the factor-extraction NFA and the subsequent VP, VNP, Formula factor-closure results. ChatGPT also assisted in examining proof details, locating relevant literature, and structuring and editing the write-up. The results and text are the authors' responsibility.
References
[1] V. Arvind, P. Mukhopadhyay, and S. Srinivasan. New results on noncommutative and commutative polynomial identity testing. Computational Complexity, 19(4):521–558, 2010. Preliminary version in CCC 2008. doi:10.1007/s00037-010-0299-8.
[2] V. Arvind, P. S. Joglekar, P. Mukhopadhyay, and S. Raja. Randomized polynomial-time identity testing for noncommutative circuits. Theory of Computing, 15(7):1–36, 2019. Preliminary version in STOC 2017. doi:10.4086/toc.2019.v015a007.
[3] V. Arvind, P. S. Joglekar, and G. Rattan. On the complexity of noncommutative polynomial factorization. Information and Computation, 262:22–39, 2018. doi:10.1016/j.ic.2018.05.009.
[4] V. Arvind, P. S. Joglekar, and S. Raja. Noncommutative Valiant's classes: Structure and complete problems. ACM Transactions on Computation Theory, 9(1):3:1–3:29, 2016. doi:10.1145/2956230.
[5] V. Arvind and P. S. Joglekar. On efficient noncommutative polynomial factorization via Higman linearization. In 37th Computational Complexity Conference (CCC 2022), volume 234 of LIPIcs, pages 12:1–12:22, 2022. doi:10.4230/LIPIcs.CCC.2022.12.
[6] V. Arvind and P. S. Joglekar. On efficient noncommutative polynomial factorization via Higman linearization. Computational Complexity, 34, article 10, 2025. doi:10.1007/s00037-025-00272-9.
[7] S. Bhattacharjee, M. Kumar, S. S. Rai, V. Ramanathan, R. Saptharishi, and S. Saraf. Closure under factorization from a result of Furstenberg. arXiv:2506.23214, 2025. https://arxiv.org/abs/2506.23214.
[8] A. Bogdanov and H. Wee. More on noncommutative polynomial identity testing. In 20th IEEE Conference on Computational Complexity, pages 92–99, 2005. doi:10.1109/CCC.2005.13.
[9] C.-N. Chou, M. Kumar, and N. Solomon. Closure results for polynomial factorization. Theory of Computing, 15(13):1–34, 2019. doi:10.4086/toc.2019.v015a013.
[10] E. Kaltofen. Factorization of polynomials given by straight-line programs. In S. Micali, editor, Randomness and Computation, volume 5 of Advances in Computing Research, pages 375–412. JAI Press, 1989.
[11] O. Goldreich and D. Zuckerman. Another proof that BPP PH (and more). In O. Goldreich, editor, Studies in Complexity and Cryptography: Miscellanea on the Interplay between Randomness and Computation, volume 6650 of Lecture Notes in Computer Science, pages 40–53. Springer, 2011. Preliminary version: ECCC TR97-045, 1997. doi:10.1007/978-3-642-22670-0_6.
[12] R. Raz and A. Shpilka. Deterministic polynomial identity testing in non-commutative models. Computational Complexity, 14(1):1–19, 2005. doi:10.1007/s00037-005-0188-8.
[13] J. T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM, 27(4):701–717, 1980. doi:10.1145/322217.322225.
[14] K. Schrempf. On the factorization of non-commutative polynomials (in free associative algebras). Journal of Symbolic Computation, 94:126–148, 2019. doi:10.1016/j.jsc.2018.07.004.