Formal Theories for Linear Algebra

We introduce two-sorted theories in the style of [CN10] for the complexity classes \oplusL and DET, whose complete problems include determinants over Z2 and Z, respectively. We then describe interpretations of Soltys' linear algebra theory LAp over arbitrary integral domains, into each of our new theories. The result shows equivalences of standard theorems of linear algebra over Z2 and Z can be proved in the corresponding theory, but leaves open the interesting question of whether the theorems themselves can be proved.


Introduction
This paper is a contribution to bounded reverse mathematics [Ngu08,CN10], that part of proof complexity concerned with determining the computational complexity of concepts needed to prove theorems of interest in computer science.We are specifically interested in theorems of linear algebra over finite fields and the integers.The relevant complexity classes for each case have been well-studied in the computational complexity literature.The classes are ⊕L and DET , associated with linear algebra over Z 2 and Z, respectively.We introduce formal theories V ⊕L and V #L for ⊕L and DET , each intended to capture reasoning in the corresponding class.Each theory allows induction over any relation in the associated complexity class, and the functions definable in each theory are exactly the functions in the class.In particular determinants and coefficients of the characteristic polynomial of a matrix can be defined.
To study the question of which results from linear algebra can be proved in the theories we take advantage of Soltys's theory LAp [SK01,SC04] for formalizing linear algebra over an arbitrary field or integral domain.We present two interpretations of LAp: one into V ⊕L and one into V #L.Both interpretations translate theorems of LAp to theorems in the corresponding theory, but the meaning of the theorems differs in the two translations since the ring elements range over Z 2 in one and over Z in the other.From these interpretations and results in [SK01,SC04] we show that the theories prove some interesting properties of determinants, but leave open the question of whether the proofs of some basic theorems such as the Caley-Hamilton Theorem can be formalized in the theories.We also leave open the question of whether the theories prove simple matrix identities studied in [SK01,SC04], such as AB = I → BA = I.An affirmative answer would shed light on interesting questions in propositional proof complexity concerning the lengths of proofs required in various proof systems to prove tautology families corresponding to the identities.
1.1.The complexity classes.Complete problems for the classes ⊕L and DET include standard computational problems of linear algebra over their respective rings Z 2 and Z, such as computing determinants, matrix powers, and coefficients of the characteristic polynomial of a matrix.(Recently [BKR09] proved that for each k ≥ 1, computing the permanent mod 2 k of an integer matrix is in ⊕L, and hence complete.)The classes satisfy the inclusions (1.1) (ignoring the distinction between function and language classes) where L and N L are the problems accepted in deterministic and nondeterministic log space, respectively.It is not known whether ⊕L and N L are comparable.(In fact no one has been able to disprove the unlikely possibility that all of the above classes except AC 0 coincide.) The simplest way of defining the classes ⊕L and DET is using uniform AC 0 reductions: Let AC 0 (f ) be the set of functions computable by a uniform family of polynomial size constant depth circuits with oracle access to f .Then ⊕L = AC 0 (det 2 ) and DET = AC 0 (det), where det 2 and det are the determinant functions for matrices over Z 2 and Z respectively.For the case of Z, integer entries of a matrix are presented in binary.
The usual definitions of these classes involve counting the number of accepting computations of nondeterministic log space Turing machines.Thus #L is the class of functions f such that for some nondeterministic log space Turing machine M , f (x) is the number of accepting computations of M on input x.Then the sets in ⊕L are those of the form {x | f (x) mod 2 = 1} for some f in #L.It turns out that AC 0 (det) = AC 0 (#L), and AC 0 (det 2 ) = AC 0 (⊕L) = ⊕L [AO96,BDHM92].
DET can also be characterized as the #L hierarchy #LH.This is defined as follows: #LH 1 = #L, and for i ≥ 1, #LH i+1 = #L #LH i .(The exponent #LH i indicates that a function from this class is allowed to be an oracle for the log space machine whose accepting computations are being counted).Then [AO96] shows We should clarify that our definition of DET = AC 0 (det) here differs from that given in [Coo85], where DET is defined to be N C 1 (det), the closure of {det} under the more general N C 1 reductions.Allender proved (see the Appendix to [All04]) that if AC 0 (det) = N C 1 (det) then the #L hierarchy collapses to some finite level #LH i , something that is not known to be true.However the present first author wrote [Coo85] before uniform AC 0 reductions had been studied, and now believes that AC 0 reductions are the natural ones to use in studying small complexity classes.Evidence for this is that (1.2) holds when DET = AC 0 (det) as we now define DET , and does not hold under the old definition (assuming the #L hierarchy is strict).
The above inclusions (1.1) compare the class of functions DET with classes of relations.Here and elsewhere we sometimes do not explicitly distinguish between a function class F C and the corresponding relation class C, using the following standard correspondence (which applies to all classes we consider): A relation is in C iff its characteristic function is in F C, and a function is in F C iff it is polynomially bounded and its bit graph is in C. (The bit graph of a function F : {0, 1} * → {0, 1} * is the relation B F (i, X) which holds iff the ith bit of F (X) is 1.) 1.2.The theories V ⊕L and V #L.To construct formal theories for the classes ⊕L and DET we follow the framework laid out in Chapter 9 of the monograph [CN10] of Cook and Nguyen for defining theories for certain complexity classes between AC 0 and P .All of these theories share a common two-sorted (number and string) vocabulary L 2 A (see Equation 2.1).The intention is that the number sort ranges over N and the string sort ranges over bit strings (more precisely, finite subsets of N).The strings are intended to be inputs to the machine or circuit defining a member of the complexity class, and the numbers are used to index bits in the strings.Each theory V C for a class C extends the finitely-axiomatized base theory V 0 for AC 0 by addition of a single axiom stating the existence of a solution to a complete problem for C. General techniques are presented for defining a universally-axiomatized conservative extension V C of V C which has function symbols and defining axioms for each function in F C, and V C admits induction on open formulas in this enriched vocabulary.It follows from the Herbrand Theorem that the provably-total functions in V C (and hence in V C) are precisely the functions in F C.
Chapter 9 (with earlier chapters) of [CN10] explicitly defines theories for the following classes: 3) These classes are defined briefly as follows.A problem in AC 0 is solved by a uniform family of polynomial size constant depth Boolean circuits with unbounded fanin AND and OR gates.AC 0 (2) properly extends AC 0 by also allowing unbounded fanin parity gates (determining whether the inputs have an odd number of 1's) in its circuits.T C 0 allows majority gates rather than parity gates in its circuits (and has binary integer multiplication as a complete problem).N C 1 circuits restrict all Boolean gates to fanin two, but the circuits are allowed to have logarithmic depth.Problems in L and N L are solved respectively by deterministic and nondeterministic log space Turing machines.N C is defined like N C 1 , but the circuits can have polylogarithmic depth (and polynomial size).Problems in P are solved by polynomial time Turing machines.
Our new theories V ⊕L and V #L for ⊕L and DET extend the base theory V 0 for AC 0 by adding axioms stating the existence of powers A k of matrices A over Z 2 and Z, respectively.Here k is presented in unary, but for the case of V #L integer entries for A are presented in binary.(Matrix powering is a complete problem for these classes).Here there is a technical difficulty of how to nicely state these axioms, since neither the parity function (needed to define matrix multiplication over Z 2 ) nor integer product and multiple summation (needed to define matrix multiplication over Z) are AC 0 functions, and hence neither is definable in the base theory V 0 .We solve this by basing an initial version of V ⊕L on the theory V 0 (2) for AC 0 (2) (which contains the parity function) and basing an initial version of V #L on the theory V T C 0 for T C 0 (which contains integer product).We then use results from [CN10] to translate the axioms for the initial versions to the language of the base theory V 0 , to obtain the actual theories V ⊕L and V #L.We show that the resulting theories satisfy the requirements of Chapter 9 (existence of "aggregate functions") that allow the existence of the nice universal conservative extensions V ⊕L and V #L of V ⊕L and V #L.Using general results from Chapter 9 of [CN10] we show the following (see Theorems 3.4 and 3.7 for more formal statements).
Theorem 1.1.The provably total functions of V ⊕L and V ⊕L (resp.V #L and V #L) are exactly the functions of the class ⊕L (resp.DET ).Further V ⊕L (resp.V #L) proves the induction scheme for Σ B 0 (L F ⊕L ) formulas (resp.Σ B 0 (L F #L ) formulas.The last sentence means in effect that V ⊕L and V #L prove the induction schemes for formulas expressing concepts in their corresponding complexity classes.
The new theories mesh nicely with the theories for the complexity classes in (1.3).In particular, we have We also have V L ⊆ V N L ⊆ V #L.We do not know whether V N L and V ⊕L are comparable, because we do not know whether N L and ⊕L are comparable.
1.3.The interpretations.Next we study the question of which results from linear algebra can be proved in the theories.As mentioned above, we take advantage of Soltys's theory LAp [SK01,SC04] for formalizing results from linear algebra over an arbitrary field or integral domain.We present two interpretations of LAp: one into V ⊕L and one into V #L.Both interpretations translate theorems of LAp to theorems in the corresponding theory, but the meaning of the theorems differs in the two translations since the ring elements range over Z 2 in one and over Z in the other.
LAp defines matrix powering, and uses this definition and Berkowitz's algorithm [Ber84] to define several functions of matrices, including determinant, adjoint, and characteristic polynomial.The following standard principles of linear algebra are discussed: (i) The Cayley-Hamilton Theorem (a matrix satisfies its characteristic polynomial).
(ii) The axiomatic definition of the determinant (the function det(A) is characterized by the properties that it is multilinear and alternating in the rows and columns of A, and det(I) = 1).(iii) The co-factor expansion of the determinant.
Although it remains open whether LAp can prove any of these, a major result from [SK01,SC04] is that LAp proves their pairwise equivalence.As a result of this and our interpretations (Theorems 4.1 and 4.3) we have the following.
Theorem 1.2.V ⊕L proves the equivalence of (i), (ii), and (iii) over the ring Z 2 , and V #L proves their equivalence over Z.
An intriguing possibility is that either V ⊕L or V #L could use special properties of Z 2 or Z to prove its version of the principles, but LAp cannot prove them (for all integral domains or fields).For example there is a dynamic programming algorithm involving combinatorial graph properties (see the concluding Section 5) whose correctness for Z might be provable in V #L using combinatorial reasoning with concepts from #L which are not available in LAp.
[SK01, SC04] also present the so-called hard matrix identities: Definition 1.3.The hard matrix identities are where A, B, C are square matrices of the same dimensions, and A t is the transpose of A.
Again it is open whether LAp proves these identities, but LAp does prove that they follow from any of the principles mentioned in Theorem 1.2 above.The next result follows from this and our interpretations (Theorems 4.1 and 4.3).
Theorem 1.4.V ⊕L proves that (1.5) over the ring Z 2 follows from any of the three principles mentioned in Theorem 1.2.The same is true for V #L over the ring Z.
[SK01, SC04] introduce an extension ∀LAp of LAp, which includes an induction rule that applies to formulas with bounded universally quantified matrix variables, and show that the three principles mentioned in Theorem 1.2 and the four matrix identities are all provable in ∀LAp.These papers claim that these proofs in ∀LAp translate into proofs in the theory V 1 for polynomial time (V 1 extends V P in equation (1.4)) when the underlying ring is finite or Q. However Jeřábek [Jeř05] (page 44) points out that for infinite rings this is not true, because the definition given of bounded universal matrix quantifiers only bounds the number of rows and columns, and not the size of the entries.To fix this, [Jeř05] defines a subsystem ∀LAp − of ∀LAp, with properly defined bounded universal matrix quantifiers, which still proves the three principles mentioned in Theorem 1.2 and the four matrix identities, and shows that these proofs translate into proofs in V 1 when the underlying ring is finite or Q (and hence also Z).Since V 1 is conservative over V P for universal theorems involving polynomial time functions we have the following result.

Two-Sorted Theories
We start by reviewing the two-sorted logic used here and in [CN10].We have number variables x, y, z, . . .whose intended values are numbers (in N), and string variables X, Y, Z, . . .whose intended values are finite sets of numbers.We think of the finite sets as binary strings giving the characteristic vectors of the sets.For example the string corresponding to the set {0, 3, 4} is 10011.
All our two-sorted theories include the basic vocabulary L 2 A , which extends the firstorder vocabulary of Peano Arithmetic as follows: The symbols 0, 1, +, • are intended to take their usual meanings on N.Here | | is a function from strings to numbers, and the intended meaning of |X| is 1 plus the largest element of X, or 0 if X is empty.(If X = {0, 3, 4} then |X| = 5.)The binary predicate ∈ is intended to denote set membership.We often write X(t) for t ∈ X (think that bit number t of the string X is 1).The equality predicates = 1 and = 2 are for numbers and strings, respectively.We will write = for both, since the missing subscript will be clear from the context.A by adding string-valued functions, other string terms will be built as usual.Formulas are built from atomic formulas (e.g.t = u, t ≤ u, X(t), X = Y ) using ∧, ∨, ¬ and ∃x, ∀x, ∃X, ∀X.
Bounded quantifiers are defined as usual, except bounds on string quantifiers refer to the length of the string.For example ∃X≤t ϕ stands for ∃X(|X|≤t ∧ ϕ).
We define two important syntactic classes of formulas.
Definition 2.1.Σ B 0 is the class of L 2 A formulas with no string quantifiers, and only bounded number quantifiers.Σ B 1 formulas are those of the form ∃ X≤ t ϕ, where ϕ is in Σ B 0 and the prefix of bounded quantifiers may be empty.
Notice our nonstandard requirement that the string quantifiers in Σ B 1 formulas must be in front.
We also consider two-sorted vocabularies L ⊇ L 2 A which extend L 2 A by possibly adding predicate symbols P, Q, R, . . .and function symbols f, g, h, . . .and F, G, H, . ...Here f, g, h, . . .are number functions and are intended to take values in N, and F, G, H, . . .are string functions and are intended to take string values.Each predicate or function symbol has a specified arity (n, m) indicating that it takes n number arguments and m string arguments.Number arguments are written before string arguments, as in The formula classes Σ B 0 (L) and Σ B 1 (L) are defined in the same way as Σ B 0 and Σ B 1 , but allow function and relation symbols from L in addition to L 2 A .
2.1.Two-sorted complexity classes.In standard complexity theory an element of a complexity class is either a set of binary strings or a function f : {0, 1} * → {0, 1} * .In our two-sorted point of view (Chapter 4 of [CN10]) it is convenient to replace a set of strings by a relation R( x, X) of any arity (n, m), and functions are generalized to allow both number functions and string functions as in (2.2).Each standard complexity class, including those in (1.3) and ⊕L and #L, is defined either in terms of Turing machines or circuit families.These definitions naturally extend to two-sorted versions by representing strings (as inputs to machines or circuits) in a straightforward way as binary strings, but by representing numbers using unary notation.This interpretation of numbers is a convenience, and is justified by our intention that numbers are 'small' and are used to index strings and measure their length.For example, the (two-sorted) complexity class P (resp.NP) is the set of relations R( x, X) recognized by polynomial time (resp.nondeterministic polynomial time) Turing machines, with the above input conventions.Thus the relation P rime 1 (x) (x is a prime number) is trivially in P since there are at most x possible divisors to test, and the testing can obviously be done in time polynomial in x.The relation P rime 2 (X) (the number whose binary notation is X is prime) is also in P, but this is a major result [AKS04], since the testing must be done in time polynomial in the length |X| of X.
The class (uniform) AC 0 can be defined in terms of uniform polynomial size constant depth circuit families, but it has a nice characterization as those sets recognized by an alternating Turing machine (ATM) in log time with a constant number of alternations.More useful for us, [Imm99] showed that an element of AC 0 can be described as an element of F O, namely the set of finite models of some first-order formula with a certain vocabulary.From this and the ATM definition of two-sorted AC 0 , we have the following important results relating syntax and semantics.

Special functions.
There are several conventional number and string functions in F AC 0 used to encode and retrieve information from bit-strings.Their usage is crucial to several technical proofs below, so we here provide definitions of common functions from [CN10] as well as extensions useful for our own purposes.The pairing function x, y = (x + y)(x + y + 1) + 2y allows easy 2-dimensional indexing in strings.It can be extended to k-arity.
We construct the unary relation Pair (z) to be true only of numbers in the range of the pairing function.The functions left( x, y ) = x and right( x, y ) = y reverse the pairing function, and are defined to be 0 on numbers z where Pair (z) is false.
For example a k-dimensional bit array can be encoded by a string X, with bits recovered using the pairing function.By convention, we write: For 2-dimensional arrays, the x th row can be recovered using the Row function, which is bit-defined: . Thus a 1-dimensional array of j strings X 1 , . . ., X j can be encoded in a single bit-string Z, where X i = Z [i] .
It will be useful when dealing with integers (section 3.2) to be able to encode 2dimensional arrays of strings X i,j as a single string Z.To do so, we first encode each row of the 2-dimensional matrix of strings as a 1-dimensional array of strings Y i so that Y Then we encode a 1-dimensional array of those arrays: The Row and Row 2 functions allow a bit-string Z to encode a list or matrix of other bit-strings.We have analogous functions seq and entry that enable string Z to encode a list or matrix of numbers (respectively).Thus the numbers y 0 , y 1 , y 2 , . . .encoded in Z can be recovered Numbers y i,j are encoded in Z by first arranging them into rows Y i where (Y i ) j = seq(j, Y i ).
Then Y i = Z [i] .The numbers are retrieved using the entry function: y i,j = entry(i, j, Z).
3. The classes ⊕L and DET .
Definition 2.3.⊕L is the set of relations R( x, X) such that there is a nondeterministic log space Turing machine M such that M with input x, X (represented as described in Section 2.1) has an odd number of accepting computations iff R( x, X) holds.#L is the set of string functions F ( x, X) such that there exists nondeterministic log space Turing machine M , and F ( x, X) is the number (in binary) of accepting computations of M with input x, X.
In the above definition we restrict attention to log space Turing machines that halt for all computations on all inputs.We think of the binary string F ( x, X) as a number, as given by the following definition.
where we treat the predicate X(i) as a 0-1 valued function.
We now formalize the correspondence (mentioned in Section 1) between a complexity class C of relations and a complexity class F C of functions.A number function f ( x, X) Definition 2.5.If C is a class of (two-sorted) relations then F C denotes the corresponding class of functions, where f (respectively F ) is in F C iff it is p-bounded and its graph (respectively bit graph) is in C. If C is a two-sorted complexity class of functions, then RC consists of all relations whose characteristic functions are in C.
In general when we refer to a complexity class such as AC 0 or P we refer to the relations in the class, and sometimes also to the functions in the corresponding function classes F AC 0 and F P .
We will consider two-sorted vocabularies L which extend L 2 A , and in all cases each function and relation symbol in L has a specific intended interpretation in our standard two-sorted model (the two universes being N and the set of finite subsets of N).Thus we can make sense of both syntactic and semantic statements about L.
If L is a two-sorted vocabulary, then f (respectively F ) is Σ B 0 -definable from L if it is p-bounded and its graph (respectively bit graph) is represented by a formula in Σ B 0 (L).In this case f (or F ) can be computed by a uniform polynomial size family of bounded-depth circuits with oracle access to the functions and predicates in L.
The following definition is from page 269 of [CN10].
It is easy to see from the above definitions and Proposition 2.2 that AC 0 (L 2 A ) is the set of all AC 0 functions and relations.
From Lemma 6 in [BDHM92] we know that ⊕L is closed under N C 1 reductions, and hence also under the weaker AC 0 reductions, so AC 0 (⊕L) = ⊕L.However we do not know whether #L is closed under AC 0 reductions [AO96].Since our theories can only characterize classes closed under AC 0 reductions, we use the class DET instead of #L.
Definition 2.7.DET = AC 0 (#L) Matrix powering is central to our theories for ⊕L and DET .So we need to define this for each of the two classes as a two-sorted function.For ⊕L we use the truth values {false, true} to represent the elements {0, 1} of Z 2 , and we represent a matrix over Z 2 with a string X.For DET we represent integers with binary notation by bit strings (using Definition 2.4), and we represent a matrix over Z by an array of strings (see Section 2.2).We number rows and columns starting with 0, so if X is an n × n matrix then 0 ≤ i, j < n for all entries X(i, j).
Definition 2.8 (Matrix Powering).Let X be a string representing an n × n matrix over Z 2 (resp.Z).Then the string function Pow 2 (n, k, X) (resp.Pow Z (n, k, X)) has output X k , the string representing the k th power of the same matrix.
Proof.For DET , by Definition 2.7 it suffices to show AC 0 (Pow Z ) = AC 0 (#L), and this is proved in [Fon09].A proof can also be extracted from the earlier literature as follows.Let IntDet(n, X) be the function that returns the determinant of the n × n integer matrix X.By Berkowitz's algorithm [Ber84,SC04], IntDet is AC 0 reducible to Pow Z , and by a standard reduction (see for example the proof of Proposition 5.2 in [Coo85]) Pow Z is AC 0 reducible to IntDet.Hence it remains to show that AC 0 (IntDet) = AC 0 (#L), and this is stated as Corollary 21 in [AO96].A key idea is to show that the problem of counting the number of paths of length at most a parameter p from nodes s to t in a directed graph is complete for #L.
The fact that ⊕L = AC 0 (Pow 2 ) follows from Theorem 10 in [BDHM92].(That theorem is stated in terms of N C 1 reductions, but the needed reductions are easily shown to be AC 0 .)Although Pow Z (n, k, X) allows the entries of the matrix X to be arbitrary binary integers, it turns out that the function is still complete for DET when the argument X is restricted to matrices with entries in 0, 1 (see for example the proof of Lemma 16 in [Fon09]).
2.4.The Theories V 0 , V 0 (2), and V T C 0 .The theory V 0 for AC 0 is the basis for every two-sorted theory considered here and in [CN10].It has the two-sorted vocabulary L 2 A , and is axiomatized by the set 2-BASIC (Figure 1) of axioms consisting of 15 Σ B 0 formulas expressing basic properties of the symbols of L 2 A , together with the following Σ B 0 comprehension scheme.
V 0 has no explicit induction axiom, but nevertheless the induction scheme is provable in V 0 , using Σ B 0 -COMP and the fact that |X| produces the maximum element of the set X.
Definition 2.10.A string function F ( x, X) is Σ B 1 -definable (or provably total) in a twosorted theory T if there is a Σ B 1 formula ϕ( x, X, Y ) representing the graph It is shown in Chapter 5 of [CN10] that V 0 is finitely axiomatizable, and the Σ B 1definable functions in V 0 comprise the class F AC 0 (see Definition 2.5).
The definition in [CN10] of the theory V 0 (2) for the class AC 0 (2) is based on V 0 and an axiom showing the definability of the function Parity(x, Y ).If Z = Parity(x, Y ) then Z(z) holds iff 1 ≤ z ≤ x and there is an odd number of ones in Y (0)Y (1) . . .Y (z − • 1).The graph of Parity is defined by the following Σ B 0 formula: A and axioms those of V 0 and ∃Z≤x+1 δ Parity (x, Y, Z).
The complexity class F AC 0 (2) is the AC 0 closure of the function Parity(x, Y ), and in fact the Σ B 1 -definable functions of V 0 (2) are precisely those in F AC 0 (2).The theory V T C 0 for the counting class T C 0 is defined similarly to V 0 (2), but now the function Parity(x, Y ) is replaced by the function numones(y, X), whose value is the number of elements (i.e.'ones') of X that are less than y.The axiom for V T C 0 is based on a Σ B 0 formula δ NUM (y, X, Z) defining the graph of a string function accumulating the values of numones(y, X) as y increases.
Definition 2.12.[CN10] The theory V T C 0 has vocabulary L 2 A and axioms those of V 0 and ∃Z≤1+ y, y δ NUM (y, X, Z).
The class F T C 0 is the AC 0 closure of the function numones, and in fact the Σ B 1definable functions of V T C 0 are precisely those in F T C 0 .
In Chapters 5 and 9 of [CN10] it is shown that the theories V 0 , V 0 (2), V T C 0 have respective universally axiomatized conservative extensions V 0 , V 0 (2), V T C 0 obtained by introducing function symbols and their defining axioms for all string functions (and some number functions) in the corresponding complexity class.These have the following properties.
Proposition 2.13.Let (F C, V, V ) be any of the triples

The New Theories
When developing theories for ⊕L and #L it will be more convenient to work first with ⊕L, where each number can be represented by a single bit, before adding the complication of multi-bit numbers in #L.
3.1.The Theory V ⊕L.The theory V ⊕L is an extension of V 0 (2) (Definition 2.11) obtained by adding an axiom showing the existence of matrix powering over Z 2 .We use the fact that ⊕L is the AC 0 closure of this matrix powering function (Proposition 2.9) and the development in Chapter 9 of [CN10] to show that the provably total functions in V ⊕L are exactly the set F ⊕L.
The actual method followed below of describing the theory V ⊕L is slightly more complicated.In order to obtain the desired axiom for matrix powering (i.e., the function Pow 2 in Definition 2.8), we will work with the theory V 0 (2), a conservative extension of V 0 (2), and its vocabulary L FAC 0 (2) , which has function symbols or terms for every function in FAC 0 (2) (Proposition 2.13).We describe the Σ B 1 axiom for matrix powering as a Σ B 1 (L F AC 0 (2) ) formula and refer to part (v) of proposition 2.13 to conclude that this formula is provably equivalent to a Σ B 1 (L 2 A ) formula.Hence we will freely use FAC 0 functions and the function Parity(x, Y ) when describing formulas which will help express the Σ B 1 axiom.Each string function F ( x, X) (other than Parity(x, Y )) in the vocabulary of V 0 (2) has a defining axiom specifying its bit graph as follows: where t is an L 2 A term bounding the function and the formula ϕ is Σ B 0 in the previously defined symbols.
In order for a formula to encode matrix powering, it will need to include witnessesenough information to "check" that the matrix has been powered correctly.The function PowSeq 2 computes every entry of every power of matrix X up to the k th power.Definition 3.1 (PowSeq 2 ).Let X be a string representing an n × n matrix over Z 2 , and let X i be the string representing the i th power of the same matrix.Then the string function PowSeq 2 (n, k, X) has output the list of matrices [ID(n), X, X 2 , . . ., X k ], coded as described in Section 2.2.
Note that the functions Pow 2 and PowSeq 2 are AC 0 -reducible to each other, so both are complete for F ⊕L.Our axiom for V ⊕L states the existence of values for PowSeq 2 .
We start by defining the matrix product operation.The AC 0 string function ID(n) codes the n × n identity matrix, and has the defining axiom (recall Section 2.2) For X and Y encoding two matrices, the AC 0 string function G(n, i, j, X, Y ) codes the string of pairwise bit products of row i of X and column j of Y : We define PAR(X) ≡ Parity(|X|, X)(|X|) (3.1) so that PAR(X) holds iff X has an odd number of ones.Thus the function Prod 2 (n, X, Y ) producing the product of two n × n matrices X and Y over Z 2 , has bit graph axiom: This yields a Σ B 0 (L F AC 0 (2) ) formula δ PowSeq 2 (n, k, X, Y ) for the graph of PowSeq 2 (n, k, X, Y ): The second line ensures that Y is uniquely defined by specifying that all bits not used in encoding matrix entries must be false.Note that δ PowSeq 2 involves the function Prod 2 and hence is not equivalent to a Σ B 0 formula, but by part (v) of Proposition 2.13, V 0 (2) proves it is equivalent to a Σ B 1 formula δ ′ PowSeq 2 .
Definition 3.2.The theory V ⊕L has vocabulary L 2 A and axioms those of V 0 (2) and the Proof.Since V 0 (2) is a conservative extension of V 0 (2), it follows that the theory is a conservative extension of V ⊕L, and this allows us to reason in T to make inferences about the power of V ⊕L.Thus by part (v) of Proposition 2.13, to prove that a function is Σ B 1 -definable in V ⊕L it suffices to prove that it is Σ B 1 (L F AC 0 (2) )-definable in T .For the function PowSeq 2 the graph is given by either of the equivalent formulas δ PowSeq 2 or δ ′ PowSeq 2 .Existence of the function value follows immediately from the axiom given in Definition 3.2, and uniqueness is proved by induction (justified by part (iv) of Proposition 2.13) on the Σ B 0 (L F AC 0 (2) ) formula stating that the first i bits of the function's output are unique.
For Pow 2 the function value can be extracted from the value for PowSeq 2 by an AC 0 function, and existence and uniqueness of that value follows from existence and uniqueness for PowSeq 2 .
Recall from chapter 8 of [CN10] (Definition VIII.1.9)that the aggregate function PowSeq ⋆ 2 is the polynomially bounded string function that satisfies and X encode b-length lists of inputs to each place of PowSeq 2 : W 1 encodes the list of numbers n 0 , n 1 , n 2 , . . ., n b−1 ; W 2 encodes the list of numbers k 0 , k 1 , . . ., k b−1 ; and X encodes the list of strings X 0 , X 1 , . . ., X b−1 .Our goal is to raise the n i ×n i matrix encoded in X i to the powers 1, 2, . . ., k i .The string function PowSeq ⋆ 2 computes all these lists of powers, aggregating many applications of the function PowSeq 2 .This is accomplished by forming a large matrix S by placing padded versions of the matrices X 0 , X 1 , . . ., X b−1 down its diagonal, and noting that the ith power of X j can be extracted from the ith power of S. The padding is necessary to make the diagonal matrices all the same size, so the location of X j in S can be computed with AC 0 (2) functions.The details of a formula for the graph of PowSeq ⋆ 2 and the proof that T can prove its unique output exists can be found in appendix A.
Section IX.2 in [CN10] presents a general method for defining a universal conservative extension V C (satisfying the properties of Proposition 2.13) of a theory V C over L 2 A .Here V C is assumed to be defined in a manner similar to V 0 (2) and V T C 0 ; namely by adding a Σ B 1 axiom to V 0 showing the existence of a complete function F C (and its aggregate F ⋆ ) for the complexity class C.Although our new theory V ⊕L fits this pattern, for the purpose of defining V ⊕L it is easier to start from the conservative extension T of V ⊕L defined in (3.4).
We now view T as the extension of V 0 (2) obtained by adding the axiom where δ PowSeq 2 is the original version of δ ′ PowSeq 2 given in (3.3).(Note that this axiom is equivalent to the one in Definition 3.2.) A small modification to the development in Section IX.2 generalizes it to the case in which the base theory is an extension V of V 0 rather than just V 0 (in this case V = T ).The construction of V C works so that Proposition 2.13 holds, where now the complexity class C is the AC 0 closure of {L, F }, where L is the vocabulary of V and F is the function whose existence follows from the axiom.In the present case, this allows us to define V ⊕L satisfying Proposition 2.13, where now the complexity class C is the AC 0 closure of {L F AC 0 (2) , PowSeq 2 }, which is same as the AC 0 closure of {PowSeq 2 }, namely ⊕L.
To start this construction we need a quantifier-free axiomatization of T = V ⊕L+V 0 (2).This consists of the axioms for V 0 (2) (which are quantifier-free) together with a quantifierfree defining axiom for PowSeq 2 .The formula (3.3) for δ PowSeq 2 (n, k, X, Y ) (the graph of PowSeq 2 ) has bounded number quantifiers, but these may be eliminated using functions in F AC 0 (2) (see Section V.6 of [CN10]).Thus δ PowSeq 2 (n, k, X, Y ) is provably equivalent to a quantifier-free formula δ ′′ PowSeq 2 (n, k, X, Y ) over the vocabulary L F AC 0 (2) for V 0 (2).The required quantifier-free defining axiom is As a result of this development we have a version of Proposition 2.13 for V ⊕L: Theorem 3.4.Let L F ⊕L be the vocabulary of V ⊕L.
(i) V ⊕L is a universal conservative extension of V ⊕L, (ii) the Σ B 1 -definable functions of both V ⊕L and V ⊕L are those of F ⊕L, (iii) a string function (respectively, number function) is in F ⊕L iff it has a function symbol (resp., term) in L F ⊕L , (iv) V ⊕L proves the Σ B 0 (L F ⊕L )-IND and Σ B 0 (L F ⊕L )-COMP schemes, and 3.2.The Theory V #L.Our theory V #L is associated with the class DET = AC 0 (#L) (Definition 2.7).Just as V ⊕L is an extension of V 0 (2), V #L is the extension of V T C 0 (Definition 2.12) obtained by adding an axiom showing the existence of matrix powering for matrices with binary integer entries.We use the fact that DET is the AC 0 closure of this matrix powering function (Proposition 2.9) and the development in Chapter 9 of [CN10] to show that the provably total functions in V #L are exactly the set F DET .The development of V #L is similar to that of V ⊕L, but has extra complications.Before defining matrix multiplication and powering we must define multiplication and iterated sum for binary integers.Both of these functions are complete for the complexity class T C 0 , so we define V #L as an extension of the theory V T C 0 (recall that V ⊕L is defined as an extension of V 0 (2)).To define the required functions we work in the conservative extension V T C 0 of V T C 0 (just as we worked in the conservative extension V 0 (2) of V 0 (2) when developing V ⊕L).
We represent integers by strings.For a string X encoding an integer x, the first bit X(0) indicates the sign of x: x < 0 iff X(0).The rest of string X is a binary representation of x, from least to most significant bit.The magnitude of an integer can be extracted with the F AC 0 function intsize(X), which simply deletes the low order bit of the string X.Thus an integer can be recovered from its string encoding by computing (−1) X(0) • intsize(X).
The theory V 0 defines binary addition X + N Y over natural numbers (Example V.2.5 in [CN10]), and V T C 0 defines binary multiplication X × N Y over natural numbers and Sum N (n, X) (the sum of the list X [0] , . . ., X [n−1] of natural numbers) (Section IX.3.6 in [CN10]).These functions over N can be used to help develop quantifier-free formulas over L F T C 0 which define the corresponding functions + Z , × Z , and Sum Z over Z.For example the function × N can be used to define the graph R × Z (X, Y, Z) by The definition of integer addition + Z is more complicated and requires defining the 'borrow' relation for subtraction as well as using + N .The definition of Sum Z (n, X) (iterated integer sum) splits the list X into a list of positive integers and a list of negative integers, sums each using Sum N , and subtracts the second sum from the first.
Matrices of integers are represented by arrays of strings using the Row 2 function (2.3).Integer matrix product is the T C 0 function Prod Z (n, X, Y ) defined analogously to formula (3.2) for Prod 2 , and the graph of iterated matrix product is defined by the Σ B 0 (L F T C 0 ) formula δ PowSeq Z (n, k, X, Y ) analogous to δ PowSeq 2 (3.3).(See [Fon09]) for more details.) By part (v) of Theorem 2.13, V T C 0 proves δ PowSeq Z is equivalent to a Σ B 1 formula δ ′ PowSeq Z , which we use in the following axiom for V #L.
Definition 3.5.The theory V #L has vocabulary L 2 A and axioms those of V T C 0 and the Σ B 1 formula ∃Y ≤t δ ′ PowSeq Z (n, k, X, Y ) for a suitable bounding term t.The next two results are proved similarly to Lemma 3.3 and Theorem 3.4.

Interpretations of LAp
Having established the theories V ⊕L and V #L, we are interested in studying which results from linear algebra are provable in these theories.This job is made much easier by taking advantage of Soltys' theory LAp [SK01, SC04], which formalizes linear algebra over an arbitrary field (or integral domain).As explained in Section 1, this theory defines standard matrix functions such as determinant, adjoint, and characteristic polynomial, in terms of matrix powering, and formalizes relative proofs of their properties.We show that V ⊕L and V #L prove these same properties by interpreting LAp into each of them.The two interpretations are different because the intended semantics are different: the underlying rings are respectively Z 2 and Z.Now Theorems 1.2 and 1.4 in Section 1 follow from the fact that each interpretation translates theorems of LAp into theorems in the theory.Actually there are exceptions to this preservation in the case of V #L, because the underlying ring Z is not a field.However as explained at the beginning of Section 4.3, Theorems 1.2 and 1.4 do indeed hold for V #L.The language L LAp of LAp has symbols index , div, rem, r, c, 0 field , 1 field , + field , * field , − field , −1 , e, , ≤ index , = index , = field , = matrix , cond index , cond field , p The intended meanings of 0, 1, +, * , −1 , and − field are obvious.The symbol .
index is cutoff subtraction; div(i, j) and rem(i, j) are the quotient and remainder functions; r(A) and c(A) return the numbers of rows and columns in A; e(A, i, j) is the field element A ij , (where A ij = 0 if i = 0 or j = 0 or i > r(A) or j > c(A)), (A) is the sum of all the entries of A; and for α a formula, cond index (α, i, j) is i if α is true and j otherwise (similarly for cond field (α, a, b)).The powering function p(n, A) = A n .
Terms and quantifier-free formulas are mostly constructed in the usual way, respecting types.We use n, m for index terms, t, u for field terms, T, U for matrix terms, and α, β for (quantifier-free) formulas.The four kinds of atomic formulas are m ≤ index n, m = index n, t = field u, and T = matrix U .Formulas are built from atomic formulas using ∧, ∨, ¬.There are restrictions on terms beginning with cond: If α is a formula with atomic subformulas all of the form m ≤ index n and m = index n, then cond index (α, m ′ , n ′ ) is a term of type index and cond field (α, t, u) is a term of type field.
A term of type matrix is either a variable (A, B, C, • • • ) or a lambda term of the form λ ij m, n, t (with the restriction that i and j are not free in the index terms m and n).This lambda term defines an m × n matrix with (i, j) th entry given by t(i, j).
There are two nonlogical rules.The first nonlogical rule is the Induction Rule: The second nonlogical rule is the Matrix Equality Rule, which states that two matrices are equal if they have the same numbers of rows and columns, and have equal entries: where Many matrix functions such as multiplication, addition, transpose, can be defined using λ terms, avoiding the need for separately defined function symbols.We use the following abbreviations for defined terms.

Integer maximum
max{i, j} := cond(i ≤ j, j, i) Note that A + B is well defined even if A and B are incompatible in size, because of the convention that out-of-bound entries are 0.

Scalar product
aA Zero and Identity matrices 0 kl := λij k, l, 0 and Sometimes we will just write 0 and I when the sizes are clear from the context.

Matrix trace
Matrix product is defined even when c(A) = r(B), again by the convention that outof-bound entries are 0.
Finally, the following decomposition of an n × n matrix A is used in the axioms defining Σ(S) and in presenting Berkowitz's algorithm: where a 11 is the (1, 1) entry of A, and R, S are 1×(n−1), (n−1)×1 submatrices, respectively, and M is the principal submatrix of A Therefore, we make the following precise definitions: Here we take the underlying field in the semantics of LAp to be Z 2 .We interpret the three-sorted theory LAp into the two-sorted theory V ⊕L.
The index sort is interpreted as the number sort, field elements are interpreted as Boolean values, and matrices are interpreted as strings.We translate each formula α of LAp into a formula α σ of V ⊕L.Here α σ is in Σ B 0 (L F ⊕L ), so by part(v) of Theorem 3.4, α σ is equivalent to a Σ B 1 formula (α σ ) ′ of V ⊕L.The translation preserves provability (sequent theorems are translated to sequent theorems) and it also preserves truth in our intended standard models: (N, Z 2 , matrices over Z 2 ) for LAp and (N, finite subsets of N) for V ⊕L.
In order for Theorems 1.2 and 1.4 (for the case of V ⊕L) to follow from this interpretation we need that a term T of type matrix in LAp, when interpreted as a matrix over Z 2 , is translated to a string term T σ in V ⊕L which represents the same matrix, using conventions like those developed in Sections 2.2 and 3.1.In particular the matrix entries (elements of Z 2 ) are certain bits in the string T σ , which is why we represent the elements 0, 1 of Z 2 as the Boolean values ⊥ and ⊤.
Recall that formulas of LAp are built from atomic formulas using the Boolean connectives ∧, ∨, ¬.Below we show how to translate atomic formulas.Then each formula α is translated by translating its atomic formulas and putting them together with the same connectives.Thus (α ∧ β) σ = α σ ∧ β σ , (α ∨ β) σ = α σ ∨ β σ , and (¬α) σ = ¬α σ .Finally, a sequent of LAp is translated to a sequent of V ⊕L formula by formula.Thus the translation of α 1 , . . ., The atomic formulas of LAp are simple, since the only predicate symbols are ≤ and the three sorts of =.Thus the main work in defining the interpretation comes in translating the three sorts of terms: m to m σ , t to t σ , and T to T σ .In order to do this we define function symbols in the language of V ⊕L to interpret functions in LAp: ., f div , f rem , f r , f c , and functions f ϕ and F ϕ for certain formulas ϕ.All of these functions have Σ B 0 definitions and are definable in the subtheory V 0 of V ⊕L.However to interpret Σ and p we need to go beyond V 0 .Defining Σ requires the parity function P AR(X), which is definable in the theory V 0 (2).We note that the theory LAp is the extension of the base theory LA obtained by adding the function p and the two axioms A35 and A36 defining matrix powering.Our interpretation translates LA into V 0 (2).Conveniently V ⊕L is obtained from V 0 (2) by adding the axiom defining PowSeq 2 (defining matrix powering).
The next three subsections give inductive definitions for translating LAp terms of each of the three sorts.4.2.1.Index sort.The table below shows how to translate each index term m of LAp into a term m σ in V ⊕L, except we postpone to Subsection 4.2.3 translating terms involving r and c, which specify the numbers of rows and columns in a matrix.The graph of each function symbol used in m σ is defined by a Σ B 0 formula (except for the case cond index (α, m, n), for which the formula is in Σ B 0 (α σ )).These formulas are given in the table below.(The first three lines give the base case of the inductive definition of the translation.) index n m σ .n σ ' .' is standard limited subtraction, defined: where for certain formulas ϕ, f ϕ is defined: Note that in LAp, cond index (α, m, n) is defined only when all atomic sub-formulas of α have the form m = n or m ≤ n.Thus f ϕ (x, y) need only be defined when ϕ is the interpretation of such a formula from LAp.
4.2.2.Field sort.Since we represent elements of Z 2 by Boolean values in V ⊕L, each field term t is translated to a Σ B 0 (L F ⊕L ) formula t σ .(This convenient representation of ring elements as truth values is not possible for the ring Z, complicating section 4.3.)Each variable of type field is interpreted as a formula specifying the first entry of a 1 × 1 matrix variable.
The table below shows how to interpret variables of type field (except those involving the matrix entry function e and the matrix sum function Σ, which are given in Subsection 4.2.3).
For t and u terms of type field, we interpret: The translation of terms involving matrices is complicated.Every matrix of LAp has three attributes: number of rows, number of columns, and matrix entries (field elements).In our two-sorted language for V ⊕L we represent a matrix by a string which codes all of these.Thus an a × b matrix A is represented by a string A σ such that A σ (0, a, b ) is true, and for all i, j with 1 ≤ i ≤ a and 1 ≤ j ≤ b and e(A, i, j) = A ij = 1, the bit A σ (i, j) is true.All other bits of A σ are false.
We will use the formula isMatrix 2 (X) (equivalent to a Σ B 0 formula) which asserts that the string X properly encodes a matrix as above.We allow the number of rows and/or columns to be 0, but any entry out of bounds is 0 (a false bit).isMatrix 2 (X) ≡ ∃x, y<|X| X(0, x, y ) ∧ (4.5) The following table completes the inductive definition of the translation of all LAp terms.(Here PAR(X) is defined in (3.1) and the functions f r , f c , F ϕ , F p are defined below).) The above translation is designed so that for every LAp matrix term T (except a matrix variable A), isMatrix 2 (T σ ) holds and is provable in (V ⊕L).
The V ⊕L functions f r (X) and f c (X) extract the numbers of rows and columns of the matrix coded by X, and are used in the table above to translate the LAp terms r(T ) and c(T ).These have defining equations ∧ ∃y≤|X| X(0, y, z ) Note that strings not encoding a matrix are semantically interpreted as the 0 × 0 matrix.The translation of the matrix entry term e(T, m, n) is consistent with the LAp convention that rows and columns are numbered starting with 1.A string not properly encoding a matrix has no non-zero entries.
The translation of the entry sum term (T ) is ⊥ if T σ does not properly encode a matrix, and otherwise it is the parity of 1 + the number of one-bits in T σ (the extra bit is T σ (0, a, b ) coding the number of rows and columns).
The matrix term λ ij m, n, t is interpreted by the V ⊕L term F t σ (m σ , n σ ).Here F t σ (x, y) is a string function, which has additional arguments corresponding to any free variables in t σ other than the distinguished variables i, j (we interpret i σ = i and j σ = j).The bit defining formula for F t σ is where t σ (i, j) indicates the distinguished variables i, j.Then isMatrix 2 (F t σ (m σ , n σ )) is always true (and provable in V ⊕L)).
The last line in the table above translates the LAp term p(m, T ) representing matrix powering to the V ⊕L term F p (m σ , T σ ).The function F p is defined in terms of Pow 2 (Definition 2.8) which defines matrix powering in V ⊕L.But the definition of F p is not straightforward, because our translation of LAp terms includes the extra bit in row 0 coding the matrix dimension.
Thus we need two Σ B 0 string functions.The first one strips the dimensions from the string, converting a matrix encoded according to our interpretation (of LAp into V ⊕L) into a matrix according to the standard in V ⊕L.Strip(X)(i, j) ↔ X(i + 1, j + 1) The second function adds the dimension-encoding "wrapper" back, converting a standardform V ⊕L matrix into the form of an interpreted matrix from LAp.
Wrap(r, c, X)(b) ↔ b = 0, r, c ∨ ∃0<i, j<b (b = i, j ∧ X(i, j)) Given these two functions, we want F p (i, X) to interpret the LAp function p(i, X).Let r X = f r (X) be the interpretation of r(X), and c X = f c (X) be the interpretation of c(X).For strings X that satisfy isMatrix 2 (X) and powers i > 0, This is consistent with the LAp convention that for i > 1, p(i, A) retains the row and column dimensions of A, and is defined by raising the matrix A ′ to the power i and truncating excess rows or columns, where A ′ is the square matrix of dimension max{r(A), c(A)} obtained from A by adding 0 entries where needed.
There is a special case: if i = 0, then LAp specifies that the zeroth power of a matrix A is the r(A) × r(A) identity matrix.
Combining all these cases, we can bit-define F p as follows: ∨ ¬isMatrix 2 (X) ∧ b = 0, 0, 0 4.2.4.Translating atomic formulas.We translate atomic formulas as follows: The translation of T = matrix U could be simplified to T σ = U σ for all LAp terms T and U other than matrix variables A, since all other terms translate to terms satisfying isMatrix 2 .However two distinct string variables A, B could nevertheless represent matrices that are equal according to the Matrix Equality Rule (4.2) if they do not satisfy isMatrix 2 .4.2.5.Provability is preserved.
The nonlogical axioms A1,...,A36 for LAp are given in Appendix B and the nonlogical rules are (4.1)(Induction) and (4.2) (Matrix Equality).It suffices to show that the translated axioms are theorems of V ⊕L, and for each of the rules, if the translated hypotheses are theorems of V ⊕L then so is the translated conclusion.
The two rules are easily handled.Consider the Induction Rule (4.1).Since the translation of each sequent of LAp is a sequent of quantifier-free formulas in V ⊕L, the fact that this translated rule preserves theorems in V ⊕L follows from the fact that V ⊕L proves the induction scheme for Σ B 0 (L F ⊕L ) formulas (part (iv) of Theorem 3.4).Now consider the Matrix Equality Rule (4.2).The fact that this translated rule preserves theorems in V ⊕L follows immediately from the way that matrix equality = matrix is translated (Section 4.2.4).Now consider the axioms of LAp.Axioms A1 to A5 are equality axioms, and their translations mostly follow from the usual equality axioms.However = matrix is not translated as equality, but it does translate to an equivalence relation, and the functions which take a matrix A as an argument (namely r, c, e, , and p) depend only on the numbers of rows and columns of A, and the entries of A. Hence all translations of A1 to A5 are theorems of V ⊕L.
Axioms A6 to A14 translate to simple properties of N under +, •, and ≤, which are provable in V 0 (see Chapter III of [CN10]).A15, A16, and A17 translate to simple properties of N which are easily proved in V 0 from the definitions f div , f rem , and f ϕ .
Axioms A18 to A26 are the axioms that define a field.Section 4.2.2 translates field terms to formulas (where ⊥ represents 0 and ⊤ represents 1).All these axioms translate into logical tautologies, so they are all trivially provable in V ⊕L.For example . The term p(0, A) is translated F p (0, A), and the term I r(A) is translated F t σ (f r (A), f r (A)), where t is the term cond(i = j, 1, 0) (see the definition of I k in Section 4.1).The symbol = in the axiom is really = matrix , so the translated axiom asserts that the number of rows, number of columns, and entries of the translations of the two matrix terms, are all respectively equal.Proving this amounts to verifying that all the defined functions have their intended meanings.
Axiom A36 is → p(n + 1, A) = p(n, A) * A. The proof of the translation distinguishes the two cases ¬isMatrix 2 (A) and isMatrix 2 (A).The former is easy, since both sides of the equation translate into the zero by zero matrix.V ⊕L proves the second case by induction on n.Recall that p(n, A) is translated F p (n, A), where F p is defined in terms of Pow 2 , which in turn is defined in terms of PowSeq 2 (3.3), whose value is a sequence of successive powers of its matrix argument.The induction proof involves verifying that the translated lambda term defining matrix product in Section 4.1 correctly corresponds to the definition (3.2) defining Prod 2 in V ⊕L.

4.3.
Interpreting LAp into V #L.Now we interpret the underlying 'field' in the semantics of LAp to be the ring Z of integers.Of course Z is not a field, so we cannot translate the axiom A21 a = 0 → a * (a −1 ) = 1 for field inverses.However according to the footnote on page 283 of [SC04], this axiom is not used except in the proof of Lemma 3.1 and Theorem 4.1.We do not need Lemma 3.1, and it is not hard to see that Theorem 4.1 does hold for integral domains (the field inverse axiom can be replaced by the axiom a * b = 0, a = 0 → b = 0 prohibiting zero divisors).It follows that LAp over integral domains proves the hard matrix identities in Definition 1.3 and the equivalence of (i), (ii), and (iii) in Section 1. Thus our interpretation of LAp into V #L will show that V #L proves both of these results, and so Theorems 1.2 and 1.4 hold for V #L.
The interpretation of LAp into V #L is similar to the interpretation into V ⊕L.We first translate LAp into V #L, and then into V #L, using part (v) of Theorem 3.7.As before, it suffices to show how to translate terms and atomic formulas, since general formulas and sequents are translated by translating their atomic formulas.We do not translate terms or formulas involving the field inverse function t −1 .
We use t σ and α σ to denote the translation of LAp terms t and formulas α.Terms of type index (which do not involve matrices) are translated into number terms in exactly the same way as for V ⊕L (see Section 4.2.1).
Terms of type field (integers) are now translated into strings representing integers in binary, using the functions + Z and × Z described in Section 3.2.
For t and u terms of type field in LAp we interpret: LAp V #L 0 field the empty string ∅ 1 field the string "10", i.e., X such that X(i) ↔ i = 1 a X a field variables map to string variables t + field u t where for each formula ϕ, define: LAp terms T of type matrix are translated into string terms T σ representing arrays of binary integers.As in the translation into V ⊕L, if T has r rows and c columns, then T σ (0, x) holds iff x = r, c .For 1 ≤ i ≤ r and 1 ≤ j ≤ c, the binary integer entry T ij is given by Row 2 (i, j, T σ ), where Row 2 is defined in (2.3).We need a formula isMatrix Z (X) asserting that X is a valid encoding of a matrix of integers.This is defined similarly to isMatrix 2 for the translation into V ⊕L.
The following table shows how to translate terms involving matrices.
The functions above with superscripts # are similar to their prototypes for the translation into V ⊕L.Thus f # r and f # c have the same definitions as f r and f c except isMatrix 2 is replaced by isMatrix Z .The entry function F e is defined by The function F (X) sums the integer entries of the matrix X, and is defined in terms of the iterated integer sum function Sum Z (n, Y ) mentioned in Section 3.2 (where Y is a rearrangement of the integer entries of the matrix X to form a linear list).
The matrix term λ ij m, n, t is interpreted by the V #L term F # t σ (m σ , n σ ).Here F # t σ (x, y) has additional arguments corresponding to any free variables in t σ other than the distinguished variables i, j.Its bit defining axiom is similar to that of F σ t , used to translate lambda terms into V ⊕L.
The function F # p interpreting matrix powering is defined similarly to F p for the V ⊕L case, except that the functions Wrap and Strip need to be modified, Pow 2 is replaced by Pow Z , and isMatrix 2 is replaced by isMatrix Z .
To complete the definition of the interpretation, we note that atomic formulas are translated as in Section 4.2.4.4.3.1.Provability is preserved.
Proof.As in the case for V ⊕L, the proof involves showing that the translated axioms (with the axiom prohibiting zero divisors replacing the field inverse axiom A21) are theorems of V #L, and the translated rules preserve provability in V #L.(The proof for each axiom and rule is similar to the proof for the case of V ⊕L, except for the field axioms, which we discuss below.)This shows that the translation S σ of a theorem S of LAp is provable in V #L, provided that the proof of S in LAp does not use the field inverse axiom A21.However Theorem 4.3 makes a stronger claim, namely that the proof of S can use the original axiom A21, provided that no term t −1 involving field inverses occurs in S.This holds because the theorems S are quantifier-free (semantically the free variables are universally quantified).Reasoning model-theoretically, if S holds for an arbitrary field, then it also holds for an arbitrary integral domain, because the domain can be extended to a field (the field of fractions).
The only LAp axioms whose translations in V #L require proof methods significantly different than for V ⊕L are the field axioms A18 to A26 (where we replace A21 a = 0 → a * (a −1 ) = 1 by the integral domain axiom a * b = 0, a = 0 → b = 0).Showing that V #L (in fact V T C 0 ) proves the commutative, associative, and distributive laws for the operations + Z and × Z over the binary integers is tedious.This is not much different than proving that the operations + N and × N over binary natural numbers satisfy these laws.Some proof outlines and hints for the latter can be found in Section IX.3.6 of [CN10].

Conclusion
There are two general motivations for associating theories with complexity classes.The first is that of reverse mathematics [Sim99]: determining the complexity of concepts needed to prove various theorems, and in particular whether the correctness of an algorithm can be proved with concepts of complexity comparable to that of the algorithm.The second motivation comes from propositional proof complexity: determining the proof lengths of various tautology families in various proof systems.To explain these we start by stating the following: Open Problem 5.1.Can V ⊕L prove the Cayley-Hamilton Theorem or the 'hard matrix identities' (Definition 1.3) over Z 2 ?Can V #L prove these over Z?
The importance of these questions stems partly from Theorem 1.2, which states that the theories prove the equivalence of the Cayley-Hamilton Theorem and two other properties of the determinant, and from Theorem 1.4, which states that the theories prove that the Cayley-Hamilton Theorem implies the 'hard matrix identities'.Theorems 1.2 and 1.4 follow from the corresponding theorems in LAp (for which Open Questions 5.1 also apply), and from our interpretations (Sections 4.2.5 and 4.3.1).
It is possible that these questions (Open Questions 5.1) could be answered positively without answering the corresponding questions for LAp, by using methods not available to LAp.For example a proof in V ⊕L might be able to take advantage of the simplicity of Z 2 , or a proof in V #L might be able use the algorithmic strength of integer matrix powering (as opposed to matrix powering over an unspecified field) to prove correctness of the dynamic programming algorithm for the determinant in [MV97].This algorithm is based on a combinatorial characterization of det(A) using clow (closed walk) sequences in the edge-labeled graph specified by the matrix A.
Over the field Z 2 the hard matrix identities translate naturally to a family of propositional tautologies (and over Z they translate into another family of tautologies).The motivation for studying these identities is to give further examples of tautology families (like those in [BBP94]) that might be hard for the class of propositional proof systems known as Frege systems.There is a close connection between the strength of a theory needed to prove these identities (or any Σ B 0 formula) and the strength of the propositional proof system required for their propositional translations to have polynomial size proofs.(Chapter 10 of [CN10] gives propositional proof systems corresponding in this way to five of the theories in (1.4).) In particular, the fact that the hard matrix identities are provable in V P shows that their propositional translations have polynomial size proofs in Extended Frege systems.If the identities were provable in V N C 1 then the tautologies would have polynomial size Frege proofs.If the identities turn out to be provable in one of our new theories, then the tautologies would have polynomial size proofs in proof systems (yet to be defined) of strength intermediate between Frege and Extended Frege systems.
Finally, we point out a lesser open problem.The main axiom for our new theory V #L asserts that integer matrix powers exist, where integers are represented in binary.As explained at the end of Section 2.3 integer matrix powering is complete for the complexity class DET even when restricted to 0-1 matrices, because the binary case is AC 0 -reducible to the 0-1 case.It would be interesting to investigate whether the nontrivial reduction (see [Fon09]) can be proved correct in the base theory V T C 0 , so that V #L could equivalently be axiomatized by the axiom for the 0-1 case rather than the binary case.
Axiom A28 states that e(A, i, j) is zero when i, j are outside the size of A. Axiom A29 defines the behavior of constructed matrices.Axioms A30-A33 define the function Σ recursively by first defining it for row vectors, then column vectors (recall A t is the transpose of A), and then in general using the decomposition (4.4).Finally, axiom A34 takes care of empty matrices.A28 (i = 0 ∨ r(A) < i ∨ j = 0 ∨ c(A) < j) → e(A, i, j) = 0 A29 → r(λij m, n, t ) = m and → c(λij m, n, t ) = n and 1 ≤ i, i ≤ m, 1 ≤ j, j ≤ n → e(λij m, n, t , i, j) = t 2 This version is from page 45 of [SK01]

4. 1 .
Defining LAp.Soltys' theory LAp (for Linear Algebra with matrix Powering) is a quantifier-free theory based on Gentzen-style sequents.It has three sorts: indices (i.e.natural numbers) (represented by i, j, k), field elements (a, b, c), and matrices (A, B, C) with entries from the field.
stating the existence of a string value for the function PowSeq 2 (n, k, X).