Available via license: CC BY 4.0
Content may be subject to copyright.
Mathematical Structures in Computer Science (2024), 1–29
doi:10.1017/S0960129524000136
PAPER
Logical characterizations of algebraic circuit classes
over integral domains
Timon Barlag1, Florian Chudigiewitsch2and Sabrina A. Gaube1
1Leibniz Universität Hannover, Hannover, Germany and 2Universität zu Lübeck, Lübeck, Germany
Corresponding author: Timon Barlag; Email: barlag@thi.uni-hannover.de
(Received 14 April 2023; revised 28 February 2024; accepted 8 April 2024)
Abstract
We present an adapted construction of algebraic circuits over the reals introduced by Cucker and Meer
to arbitrary infinite integral domains and generalize the ACRand NCRclasses for this setting. We give a
theorem in the style of Immerman’s theorem which shows that for these adapted formalisms, sets decided
by circuits of constant depth and polynomial size are the same as sets definable by a suitable adaptation
of first-order logic. Additionally, we discuss a generalization of the guarded predicative logic by Durand,
Haak and Vollmer, and we show characterizations for the ACRand NCRhierarchy. Those generalizations
apply to the Boolean AC and NC hierarchies as well. Furthermore, we introduce a formalism to be able to
compare some of the aforementioned complexity classes with different underlying integral domains.
Keywords: algebraic circuits; descriptive complexity
1. Introduction
Boolean circuits as a computational model are a fundamental concept in the study of theoretical
computer science. Mainly in computational complexity, Boolean circuits play a central part in the
analysis of parallel algorithms and the corresponding complexity classes, enabling a finer view
and providing new proof methods, especially for subpolynomial complexity classes. An obvious
generalization of Boolean circuits is that instead of dealing with truth values as inputs – or the field
Z2for the algebraically minded – we consider elements from some other algebraic structure. This
approach has its roots in the works of Blum, Shub and Smale, whose model of the BSS-machine is
able to describe computations over real numbers. Following this, Blum, Shub, Smale and Cucker
(Blum et al., 1998) also give a generalization to algebraic circuits over the reals.
1.1 Our contribution
In this article, we provide logical characterizations of circuit complexity classes over integral
domains. In particular, we define natural extensions of the classical circuit complexity hierarchies
ACiand NCiover arbitrary integral domains. The resulting classes are denoted as ACi
Rand NCi
R,
respectively. We adapt the framework of metafinite model theory to define various extensions of
first-order logic, which capture these new complexity classes.
We establish a Immerman-style theorem stating that FOR=AC0
Rand provide a framework to
establish complexity-theoretic comparisons of classes with different underlying integral domains
and give examples over which integral domain the AC0classes are equal.
C
The Author(s), 2024. Published by Cambridge University Press. This is an Open Access article, distributed under the terms of the
Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and
reproduction, provided the original article is properly cited.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
2 T. Barlag et al.
We adapt the GPR operator, which Durand, Haak and Vollmer use to provide logical charac-
terizations of AC1and NC1(Durand et al., 2018) to logics over metafinite structures and extend it
to be able to characterize the whole ACRand NCRhierarchies.
Finally, we define a formalism suitable for comparing complexity classes with different under-
lying integral domains and we show that a hierarchy of sets of complexity classes emerges, such
that each set is able to “simulate” the complexity classes from the sets lower in the hierarchy.
1.2 Related work
Another model of computation that is commonly known under the name “algebraic circuit” are
Valiant circuits (Valiant, 1979), which are the foundational model in the emerging subfields of
algebraic and geometric complexity theory. They differ from the model we analyse in this work
in the way that we use <gates, which are not available in the Valiant setting. This difference is
of complexity-theoretical significance, since for our model, we have that NCi
RNCi+1
R(Cucker,
1992)butwehavethatVNC
2=VNC3=...=VP (Bürgisser, 2013) in the Valiant setting for
every field, in particular over the reals.
1.3 Outline of the paper
We start with an overview of some central concepts from algebra and circuit complexity, which
are needed for the definition of our model. We then establish our model of algebraic circuits for
arbitrary integral domains and the analogous complexity classes induced by them in analogy to
the Boolean case. Afterwards, we give a logical characterization of the presented circuit classes
inspired by classical descriptive complexity. However, since our models now have an infinite
component, we build on the foundations of metafinite model theory.
We then go on to define first-order logic over Rand show that, like in the classical case, we have
that AC0
R=FOR[ArbR]+SUMR+PRODR.
In Section 4, we give logical characterizations of ACiand NCi. The tool of our choice is an
adaptation of the guarded predicative logic of Durand et al. (2018).
In Section 5, we discuss connections between AC0
Rclasses over different integral domains.
2. Preliminaries
First, we discuss the theoretical background of this paper. We give the basic definitions and
remarks on the notation used in this paper. We denote the set of natural numbers with 0 as N
andthesetofnaturalnumberswithout0asN>0.
Notation 1. In this paper, we will generally use overlined letters (e. g. x) to denote tuples.
As the name suggests, algebraic circuit classes make use of concepts originating from abstract
algebra. We assume the reader has basic knowledge of algebra, especially rings, integral domains
and fields, polynomials and adjoining elements to rings. For an introduction to abstract algebra,
the reader may refer to the books by Aluffi (2009)orLang(2002).
Our considered rings are always assumed to be a commutative ring with unit. Throughout the
paper, whenever not otherwise specified, we use Rto denote an infinite integral domain.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 3
Remark 2. In particular, we require that for every r∈Rthe equations
r×0=0
0×r=0
hold.
Example 3. Popular examples of rings include Z,Q,Rand C,as well as sets with adjoined elements
like Z[j], Z[p
√−1], Z[√p,√q,...], R[jk], Z[jk], ...,where k ∈N,p= qareprimesandj
kdenotes
the kth root of −1, that is ik
k=−1. Alternatively, we can adjoin algebraic independent prime root
elements with 2=k and get an analogous construction.
Remark 4. The denotation of R[jk]resp.Z[jk] is not unique but the constructions of the circuit
over the underlying rings are analogous except for the placeholders for the adjoined numbers.
For example, Z4can denote Z[j4]=Z[j4,j2
4,j3
4]orZ[√2, √5] =Z[√2, √5, √10] or many other
rings. Since we only focus on the structure of the tuples, that is the coefficients of adjoint elements,
or later the underlying circuits, our short notation for Zkfor arbitrary k>1 is not unique and
may differ, for example Z2may denote Z[j] or may denote Q. In the context of the placeholder
notation, the arithmetic of the specific ring must be clear, if it is important.
We need some ordering <on our integral domain R.Insomecases,likeRand Z,wehavesome
natural ordering that we want to use. In other cases, like C, we have to construct some ordering.
This ordering does not have to be closed under multiplication, and we only have to distinguish
different numbers from each other. So an ordering on tuples (z1=a1+b1i,z2=a2+b2i∈C:
(a1,b1)<C(a2,b2)⇐⇒ a1<Ra2or a1=a2and b1<Rb2)ispossible.
Definition 5. A strict total order on a set S is a binary relation <on S which is irreflexive, transitive
and total.
Example 6. For some field Fpkfor some prime p and a natural number k,we write the finitely
many elements in a list and then use the lexicographical on this list. For example, let R =Z3.Then,
we define <Z3as 0<1<2.
There are multiple possibilities for such a <over the field of complex numbers. Let z =a+bj ∈C
and let <1be the lexicographic order on pairs (√a2+b2,a). Furthermore, let <2be the lexico-
graphic order on pairs of the form (a,b). Then, both variants are possible since both distinguish
different complex numbers.
Definition 7. A strict total order <over a ring R induces a sign function as follows:
sign(R,<)(x)=1ifx>0
0 otherwise.
In the following, unless explicitly otherwise specified, the symbol Rdenotes an infinite integral
domain with a strict total order <on R. Most of the rings we consider have a natural ordering. In
this case, we omit the ordering symbol.
2.1 Algebraic circuits over R
As this work is a generalization of the well established Boolean circuits, some background in circuit
complexity is assumed. Standard literature which introduces this topic is the book by Vollmer
(1999). The generalization to algebraic circuits over real numbers were first introduced by Cucker
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
4 T. Barlag et al.
(1992). In analogy to them, Barlag and Vollmer defined an unbounded fan-in version of algebraic
circuits (Barlag and Vollmer, 2021).
Definition 8. We define an algebraic circuit C over an integral domain R with a strict total order
<,or R circuit for short, as a directed acyclic graph. It has gates of the following types:
Input nodes have indegree 0and contain the respective input values of the circuit.
Constant nodes have indegree 0and are labelled with elements of R
Arithmetic nodes have an arbitrary indegree ≥1, bounded by the number of nodes in the circuit
and are labelled with either +or ×.
Comparison (<) nodes have indegree 2.
Output nodes have indegree 1and contain the output value after the computation of the circuit.
Nodes cannot be predecessors of the same node more than once, and thus, the outdegree of nodes
in these algebraic circuits is bounded by the number of gates in the circuit.
During the computation of an algebraic circuit, the arithmetic gates compute their respective
functions with the values of their predecessor gates being taken as the function arguments and the
comparison gates compute the characteristic function of <inthesameway.Thevaluesoftheoutput
gates at the end of the computation are the result of the computation.
In contrast to the classical setting, where we consider words over an alphabet as inputs, and
where languages are thus defined to be subsets of the Kleene closure of the alphabet (in symbols,
L⊆∗), we consider vectors of integral domain elements as input. In analogy to ∗, we denote
for an integral domain R:
R∗=
k∈N0
Rk
With |x|, we denote the length of x,i.e.,ifx∈Rkthen |x|=k.
Remark 9. We will use the term algebraic circuit to describe circuits in the sense of Blum et al.
(1998) rather than arithmetic circuits as for example in Barlag and Vollmer (2021) to distinguish
them from arithmetic circuits in the sense of Valiant, see for example (Bürgisser et al., 1997).
Valiant circuits are essentially algebraic circuits without sign or comparison gates (Blum et al.,
1998, page 350).
Remark 10. In the special case R=Z2, the definition above yields exactly the Boolean circuits.
Definition 11. We call the number of gates in a circuit the size of the circuit and the longest path
from an input gate to an output gate the depth of the circuit.
Remark 12. Unlike the way algebraic circuits with unbounded fan-in gates were introduced pre-
viously (Barlag and Vollmer, 2021), algebraic circuits in this context have comparison gates instead
of sign gates. This stems from the fact that when dealing with real or complex numbers, we can
construct a sign function from <via Definition 7and the order relation from the sign function
via
x<y⇐⇒ sign(sign(y−x)·(2 +sign(x−y))) =1.
If we consider finite integral domains, however, suddenly it becomes less clear how to construct
the <relation from the sign function, while the other way around still works by Definition 7.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 5
Given that we define circuits and logic fragments relative to an ordering, it is natural for both
to have access to this ordering. Therefore, we choose to use <gates rather than sign gates. So in
the following, all usages of sign are implicit uses of the order relation as by Definition 7.
In the cases which are considered in other literature (Ror F2), this has no complexity-theoretic
impact, since in the emulation of one formalism using the other, we get a linear overhead in the
size and constant overhead in the depth of the circuit.
In order to define complexity classes with respect to algebraic circuits, we have to define the
function calculated by such a circuit and define the term of circuit families.
Definition 13. The (n ary) function fC:Rn→Rmcomputed by an R circuit C (with n input gates
and m output gates) is defined by
fC(x1,...,xn)=(y1,...,ym),
where y1,...,ymare the values of the output gates of C,when given x1,...,xnas its inputs.
Definition 14. A family of R circuits C=(Cn)n∈Nis a sequence of circuits which contains one
circuit for every input length n ∈N.The function fC:R∗→R∗computed by a circuit family Cis
defined by
fC(x)=fC|x|(x)
The size (resp. depth) of a circuit family (Cn)n∈Nis defined as a function mapping n ∈Nto the size
(resp. depth) of Cn.
Analogously to the classical case, we say that a set S⊆R∗can be decided by a circuit family C,
if Ccan compute the characteristic function of S.
Definition 15. Let f1,f2:N→Nbe two functions. We then write UnbSizeDepthR(f1,f2)to denote
the class of sets decidable by R circuit families of size O(f1(n)) and depth O(f2(n)). We write
SizeDepthR(f1,f2)to denote the class of sets decidable by R circuit families of size O(f1(n)) and
depth O(f2(n)), where each arithmetic gate has indegree bounded by 2(we call this bounded fan-in).
Definition 16. ACi
R:=UnbSizeDepthR(nO(1),(log
2n)i)
Definition 17. NCi
R:=SizeDepthR(nO(1),(log
2n)i)
Remark 18. The circuit families we have just introduced do not have any restrictions on the diffi-
culty of constructing any individual circuit given the input length. If it is important to know how
hard obtaining a particular circuit is, one can consider so-called uniform circuit families. These
families require their circuits to meet restrictions on the difficulties of obtaining them. For more
information on uniformity, cf. (Vollmer, 1999).
Uniformity criteria can be defined for algebraic circuit classes in a similar way. See for example
(Blum et al., 1998, Section 18.5).
2.2 Structures and first-order logic over integral domains
As we want to characterize circuit complexity classes with logical fragments, this work falls broadly
under the umbrella of finite model theory and, in particular, descriptive complexity. Foundational
knowledge of these topics is assumed and can be found in the books by Grädel et al. (2007);
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
6 T. Barlag et al.
Immerman (1999); and Libkin (2004). Traditionally, descriptive complexity is viewed as a sub-
discipline of finite model theory. In our setting, however, we want to (carefully) introduce infinite
structures to our reasoning. For this, we use metafinite model theory, an extension of the finite
model formalism first introduced by (Grädel and Gurevich, 1998). A short introduction to metafi-
nite model theory is also featured in the book by Grädel et al. 2007, page 210). The approach was
taken by Grädel and Meer (1995) to describe some essential complexity classes over real numbers.
These descriptions were later extended by Cucker and Meer (1999), where, among other things,
the NC hierarchy over real numbers was defined. For their logical characterizations, these papers
introduce a so-called first-order logic with arithmetics, which we will adapt to be used in our
setting.
To make proofs easier, we will make use of the well-known trick that any predicate can be
emulated by its characteristic function. Thus we only consider predicates, when convenient. We
can furthermore emulate constants in the usual way by 0 ary functions.
Definition 19. Let Ls,Lfbe finite vocabularies which only contain function symbols. An R structure
of signature σ=(Ls,Lf)is a pair D=(A,F)where
1. Ais a finite structure of vocabulary Lswhich we call the skeleton of Dwhose universe A we will
refer to as the universe of Dand whose cardinality we will refer to by |A|
2. and F is a finite set which contains functions of the form X:Ak→Rfork∈Nwhich interpret
the function symbols in Lf.
We will use STRUCR(σ)to refer to the set of all R structures of signature σ,and we will assume
that for any signature σ=(Ls,Lf), the symbols in Lsand Lfare ordered.
Remark 20. In this paper, we only consider ranked structures, that is structures, in which the
skeleton is ordered.
It often comes in handy to be able to encode an Rstructure Dover a signature σas an
element of R∗. We do so by simply concatenating the function values of all functions of Din
lexicographical order with respect to the function arguments.
Example 21. Let A ={♦,♠},f1={♦→ 1, ♠→ 0},f2={♦→ π,♠ → 42}and let D=(A,F)
be an R structure with universe A,♦being ranked below ♠and F ={f1,f2}.Then, Dgets encoded
as (1, 0, π, 42).
Definition 22 (First-order logic over R). The language of first-order logic over an integral domain
R contains for each signature σ=(Ls,Lf)a set of formulae and terms. The terms are divided into
index terms which take values in universe of the skeleton and number terms which take values in R.
These terms are inductively defined as follows:
1. The set of index terms is defined as the closure of the set of variables V under applications of the
function symbols of Ls.
2. Any element of R is a number term.
3. For index terms h1,...,hkand a k ary function symbol X ∈Lf,X(h1,...,hk)is a number term.
4. If t1,t2are number terms, then so are t1+t2,t1×t2and sign(t1).
Atomic formulae are equalities of index terms h1=h2and number terms t1=t2,inequalities of
number terms t1<t2and expressions of the form P(h1,...,hk), where P ∈Lsis a k-ary predicate
symbol and h1, .., hkare index terms.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 7
The set FORis the smallest set which contains the closure of atomic formulae under the logical
connectives {∧,∨,¬,→,↔} and quantification ∃vψand ∀vψwhere v ranges over A.
For better readability, we will use inequalities of the form x≤yand the extensions of equal-
ities x=yand the inequalities x<yand x≤yto tuples throughout this paper. Note that these
extensions are easily definable from =and <in first-order logic.
Remark 23. We call any element of Ra number term even though some integral domains can
contain elements like ζ,ℵor which are not numbers.
Equivalence of FORformulae and sets defined by FORformulae are done in the usual way,
that is a formula ϕdefines a set Sif and only if the elements of Sare exactly the encodings of R
structures under which ϕholds and two such formulae are said to be equivalent if and only if they
define the same set.
With the goal in mind to create a logic which can define sets decided by circuits with
unbounded fan-in, we introduce new rules for building number terms: the sum and the product
rule. We will also define a further rule, which we call the maximization rule. This one is, however,
already definable in FOR, and we thus do not gain any expressive power by using it. We will use it
to show that we can represent characteristic functions in FOR.
Definition 24 (Sum, product and maximization rule). Let t be a number term in which the vari-
ables xandthevariablesw occur freely and let A denote the universe of the given input structure.
Then,
sumx(t(x,w))
is also a number term which is interpreted as x∈A|x|t(x,w). The number terms prodx(t(x,w)) and
maxx(t(x,w)) are defined analogously.
We call these operators aggregators, and for any formula ϕcontaining aggregators of the above
form, the variables in x are considered bound in ϕ.
Example 25. Let σ=({},{f2
E})be the signature of weighted graphs, that is Lsis empty and Lfcon-
tains the single function symbol fEwhich is interpreted such that fE(x,y)gives the weight of the
edge from x to y or 0if there is none. Let Gbe a (graph) structure over σ.Then, the following
FOR+SUMRsentence ϕstates that there is a node in the skeleton of G,for which the sum of its
outgoing edges is more than double the sum of the outgoing edges of any other node.
ϕ:=∃x∀y(x=y→suma(fE(x,a)) >2×sumb(fE(y,b)))
Observation 26. FOR=FOR+MAXR.
Proof. An occurrence of maxi(F(i)) essentially assures that there exists an element x, such that for
all elements y,F(x)≥F(y) and takes the value of F(x). Clearly, this can be defined in fist order
logic by a formula of the form ∀x∃yF(x)≥F(y).
Furthermore, any characteristic function of a logical formula can be described in FOR.The
proof for this runs analogously to that of Cucker and Meer 1999, Proposition 2), since this proof
does not make any use of special properties of the reals.
3. AC0
R=FOR
In this section, we present a proof that FORcaptures the class AC0
R. The proof idea is similar to
the proof of the established result by Immerman which characterizes AC0via FO.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
8 T. Barlag et al.
When using logics to check, whether a given Rtuple would be accepted by a Rcircuit, one
needs to think about how this Rtuple would be interpreted as an Rstructure A.Thiscanbe
done by interpreting it as the set of the circuit’s input gates along with a single unary function
felement :A→Rmapping the ith input gate to the ith input of the circuit. We call this kind of
structure a circuit structure.
In the following, we would like to extend FORby additional functions and relations that are
not given in the input structure. To that end, we make a small addition to Definition 19 where we
defined Rstructures. Whenever we talk about Rstructures over a signature (Ls,Lf), we now also
consider structures over signatures of the form (Ls,Lf,La). The additional (also ordered) vocabu-
lary Ladoes not have any effect on the Rstructure, but it contains function symbols, which can be
used in a logical formula with this signature. This means that any Rstructure of signature (Ls,Lf)
is also an Rstructure of signature (Ls,Lf,La) for any vocabulary La.ThesymbolsinLastand for
functions that we will use to extend the expressive power of FORto capture various complexity
classes.
Definition 27. Let F be a set of finitary functions. We will write FOR[F]to denote the class of sets
that can be defined by FORsentences which can make use of the functions in F in addition to what
they are given in their structure.
Formally, this means that FOR[F] describes exactly those sets S⊆R∗for which there exists an
FORsentence ϕover a signature σ=(Ls,Lf,La) such that for each length n, there is an interpre-
tation Ininterpreting the symbols in Laas elements of Fsuch that for all R∗tuples sof length n
it holds that s∈Sif and only if sencodes an Rstructure over (Ls,Lf,La) which models ϕwhen
using In.
Example 28. Let us take as an example the scenario where we are given a graph as a
structure but want to make use of additional functions to interpret that graph as a cir-
cuit, by having those functions determine the gate types of the nodes in the graph. We
will use the signature σ=({E2},{},{f1
out,f1
add,f1
in}), and we will use a set of functions F =
{Fout,1,Fout,2 ,...,Fadd,1,Fadd,2 ,...,Fin,1,Fin,2,...},where each function is a characteristic func-
tion which maps the nodes of the graph to 1, ifthegatetypematchesand0, otherwise. Hence, if a
node v is an addition gate, we have Fadd,1(v)=1and Fout,1(v)=0. The number in the subscript of
the functions of F refers to the size of the encoding of the structure, for which the functions should
be used. For example, Fadd,4 is used for structures that are encoded as elements of R4.Now suppose
we are interested in those circuits where there exists an input gate that has an addition gate as a
successor. A fitting FOR[F]sentence would be
ϕ=∃x∃yfin(x)=1∧fadd(y)=1∧E(x,y)
The reason why ϕworks is that for each n ∈N,there exists an interpretation Inwhich maps the
symbols used in ϕto functions in F.This interpretation just maps fin to Fin,n and fadd to Fadd,n.
If we are now given a graph structure of a graph such as the first one in Figure 1,encoded as its
adjacency matrix
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
0000
1000
0100
0100
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 9
Figure 1. Example graphs that satisfy the imposed conditions of Example 28.
which would amount to the R16 tuple (0,0,0,0,1,0,0,0,0,1,0,0,0,1,0,0),then our interpretation
I16 would map fin to Fin,16 and fadd to Fadd,16.This means that the set of encodings of circuits which
have gate types according to F that contain at least one input gate followed by an addition gate
is definable in FOR[F]. This is because ϕis a FOR[F]sentence over σsuch that for each n,the
interpretation Ininterprets the symbols fin and fadd as elements of F,such that for all s ∈R∗it holds
that s is an encoding of such a circuit if and only if the graph structure encoded by s satisfies ϕ.
Definition 29. We write ArbRto denote the set of all functions f :Rk→R,where k ∈N.
Theorem 30. Let R be an infinite integral domain. Then, AC0
R=FOR[ArbR]+SUMR+PRODR.
Proof. The proof for this theorem works similarly to the construction for FOR[ArbR]+SUMR+
PRODR=AC0
R(Barlag and Vollmer, 2021), since this construction does not make use of any
special properties of the real numbers.
The basic idea for this proof is that we first show that for any FOR[ArbR]+SUMR+PRODR
sentence ϕ, we can construct a circuit family which accepts its input if and only if the input encodes
an Rstructure that satisfies ϕ. This is basically done by mimicking the behaviour of the logical
operators of ϕusing the available gate types and evaluating the formula level by level. A universal
quantifier as in ∀xϕ(x), for instance, is implemented by using a sign gate (obtained from <as
per Definition 7) on top of a multiplication gate, which has the circuits for ϕ(a)foreachain the
skeleton of the encoded structure as its predecessors.
To translate the semantics of FORinto a circuit, we can mostly use the same translations as
in the proof for the real case, as for the most part only properties of integral domains are used.
We need ring properties for most of these translations and in particular for universal quantifiers,
we also need commutativity of multiplication and no zero dividers, hence we require integral
domains.
We do need to change the translation for existential quantifiers and ∨,however.Inthe
real case, the circuit for ∃xϕ(x) is constructed similarly to the universal case with a sign gate
followed by an addition gate with the circuits for ϕ(a)foreachain the skeleton as its pre-
decessors. Since there are infinite integral domains with characteristic greater than 0, that is
where adding a positive amount of 1 elements can yield 0, this would not always produce the
desired result. However, we can overcome this easily by translating ∃xϕ(x)to¬∀x¬ϕ(x)andx∨y
to ¬(¬x∧¬y), as negation, universal quantifiers and ∧are constructible with integral domain
properties.
For the converse inclusion, a number term vald(g) is created which, when given a circuit family
(Cn)n∈N, evaluates to the value of gate gif gis on the dth level of the respective circuit Cn.Forthis
purpose, functions encoding the structure of these circuits are given by the ArbRextension of the
logic. These functions provide information about the gate type of each gate, their constant values
if they are constant gates, their index if they are input gates and the edge relation of the circuit.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
10 T. Barlag et al.
For this construction, with integral domain properties no changes need to be made to the formula
in the real setting.
4. Algebraic Circuits and Guarded Functional Recursion
In this section, we generalize the logical characterizations of NC1and AC1by Durand et al. (2018)
to the respective complexity classes over integral domains NC1
Rand AC1
R. We furthermore extend
this method to capture the entire NCRand ACRhierarchies.
In their paper, Durand, Haak and Vollmer use what they call guarded predicative recursion to
extend first-order logic in order to capture the logarithmic depth circuit complexity classes NC1
and AC1. This essentially amounts to a recursion operator, which halves a tuple of variables (in
their numerical interpretation) which is handed down in each recursion step. This ensures that
the total recursion depth is at most logarithmic. The halving of the variable tuple is performed by
using the fact that addition is expressible in FO if BIT and <are expressible (Immerman, 1999)in
the following way
x≤y/2⇐⇒ x+x≤y.
Note that we do not define the formula of the halving to be equality, since this is not possible for
odd numbers. However, this is not an issue since we only want to bound the worst case recursion
depth. In order to capture classes of polylogarithmic depth, we would like to find a suitable factor
to replace 1
2with, so that the recursion process has polylogarithmic depth as well. As it turns out,
for any i∈N, we can assure a recursion depth of O(( log2n)i) by using the factor 2−log2n
(log
2n)i.
Observation 31. Any number n ∈Ncan be multiplied by the factor 2−log2n
(log
2n)iexactly (log
2n)i
times, before reaching 1.
A more general version of this observation can be found in Lemma 58 in the appendix.
Unfortunately, while it is simple to divide by 2 when the BIT predicate is available, it is not at
all clear if multiplying by a factor such as 2−log2n
(log
2n)ican be done in first-order logic.
We can, however, make use of the ability to divide by 2 in order to achieve polylogarithmic
recursion depth, by instead of dividing a number, essentially dividing the digits of a base nnumber
individually and carrying over once 0 is reached.
Let us take for example the base 5 number 444. The previously mentioned process is illustrated
in Table 1. The table is supposed to be read from top to bottom and then from left to right.
We divide the digits of 444 from the least to most the significant digit until 0 is reached. So,
the first step is dividing the rightmost digit of 444 by 2, getting from 444 to 442. After two more
divisions of that kind, we reach 0 and in the subsequent step we reset the rightmost digit and divide
the second digit once. This works in a similar way to counting down, where instead of taking away
1 in each step, we divide by 2 and carry over in an analogous way. Notably, reaching 000 from 444
takes 63 =(log25+2)3−1 steps. This is no coincidence: It can easily be shown that for any
base nnumber of idigits, this sort of process reaches the smallest possible element after less than
(log2n−1+2)i−1steps.
Since we wish to logically characterize languages decided by circuit families, it is useful to briefly
talk about representation of numbers. In descriptive complexity, tuples of elements from a finite,
ordered domain Aare often associated with numbers. This is frequently done by interpreting the
tuple as a base |A|number with each element of the tuple representing its position in the ordering
of A.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 11
Tab le 1 . Illustration of digit-wise division until 0 of the base
5 number 444 which takes 63 =(log25+2)3−1steps
444 244 144 044
442 242 142 042
441 241 141 041
440 240 140 040
424 224 124 024
422 222 122 022
421 221 121 021
420 220 120 020
414 214 114 014
412 212 112 012
411 211 111 011
410 210 110 010
404 204 104 004
402 202 102 002
401 201 101 001
400 200 100 000
Example 32. For example, let D ={a,b,c,d}be ordered such that a <b<c<d.Then, the tuple
(b,d,c,a)=(1,3,2,0)would be interpreted as the base 4number 1320, which would correspond to
60 in decimal.
Whenever we talk about the numerical interpretation of a tuple, we refer to this sort of interpre-
tation. With this interpretation in mind, we now want to define a BIT predicate, which is needed
to express divisions in our logic. In our definition, we assume that the most significant bit of j’s
binary representation is the bit at index 1:
Definition 33. For any ranked structure with universe D,let the relation BIT2⊆D∗×D∗be
defined as follows:
BIT :={(i,j)|when i and j are taken as their numerical interpretations, the
ith bit of the binary representation of j is 1, i,j∈D∗}
Note that the case D∗=Nyields the classical BIT predicate. With the BIT predicate and an
order relation, we are now able to express division by 2 in first-order logic. We use the fact that
whenever BIT and an order are available, we can express multiplication and addition of numerical
interpretations of tuples (Immerman, 1999). This result was shown for plain first-order logic,
and since our two-sorted first-order logic FORis equivalent to first-order logic if the secondary
component is ignored, we can apply it here as well.
We express division by 2 as follows:
x≤y/2⇐⇒ ∃z x +x=z∧z≤y
Note again that since the numerical interpretations of tuples are natural numbers, expressing
x≤y/2 is really as good as we can do, since x=y/2 would not work for odd numbers.
Next, we will turn to defining the recursion operator which we have alluded to in the begin-
ning of this section. First, we need a little bit of additional notation, that is relativized aggregators.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
12 T. Barlag et al.
A relativization of an aggregator is a formula restricting which elements are considered for the
aggregator.
Notation 34. For a number term t and an FORformula ϕ,we write
maxx.(ϕ(x))t(x)
as a shorthand for
maxx(χ[ϕ(x)] ×t(x)).
Analogously, we write
sumx.(ϕ(x))t(x)
for
sumx(χ[ϕ(x)] ×t(x))
and
prodx.(ϕ(x))t(x)
as a shorthand for
prodx(χ[ϕ(x)] ×t(x)+χ[¬ϕ(x)] ×1).
In all these cases, we say that the term t(x)is in the scope of the respective aggregator. For example
in the first case, t(x)is in the scope of the relativized aggregator maxx.(ϕ(x)).
We now define the GFRi
Roperator and logics extended by GFRi
Rof the form L+GFRi
R.The
idea is to mimic the behaviour demonstrated in Table 1.
Definition 35 (GFRi
R). Let F be a set of functions such that BIT is definable in FOR[F]and let L
be FOR[F]or a logic obtained by extending FOR[F]with some construction rules (such as the sum
or the product rule as per Definition 24).
For i ≥0, the set of L+GFRi
Rformulae over σ=(Ls,Lf,La)is the set of formulae by the
grammar for Lover σextended by the rule
ϕ:=[f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)]ψ(f),
where ψis an Lformula, f is a function symbol, and t is an Lnumber term with free variables
x,y1,...,yi,yi+1such that
1. all yjfor 1≤j≤i contain the same (positive) number of variables,
2. f only occurs in the form f (a,z1,...,zi,zi+1), where z1,...,zi,zi+1are in the scope of a guarded
aggregation
Az1,...,zi,zi+1.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧ξ(y1,...,yi,yi+1,z1,...,zi,zi+1)⎞
⎠
with A ∈{max,sum,prod},ξ∈Land ξnot containing any symbols of Lsor Lfand
3. f never occurs in the scope of any aggregation (or quantification) not guarded in this way.
The function symbol f is considered bound in
ϕ:=[f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)]ψ(f).
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 13
The semantics for the GFRRioperator are defined as follows: Let ϕbe an L+GFRi
Rformula over
σwith the single GFRi
Roccurrence
[f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)]ψ(z,f)
and let D∈STRUCR(σ). Then, the operator which is applied to the formula ψ,namely
[f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)], defines the interpretation of f in ψin the follow-
ing way: For all tuples a,b1,...,bi,bi+1of elements of the universe D of Dwith the same arities as
x,y1,...,yi,yi+1,respectively,
f(a,b1,...,bi,bi+1)=t(a,b1,...,bi,bi+1,f).
This means that the formula [f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)]ψ(c,f)holds for a tuple
c∈D|c|with the same arity as zifandonlyif D|= ψ(c,fI)where fIis the interpretation of f as
defined by the GFRRioperator. Semantics of formulae with several GFRi
Roperators are defined
analogously.
Note that the (i+1)th tuple does not get restricted by the guarded aggregation.
An example is in order. In the following scenario, we would like to illustrate the use of the
GFRi
Roperator. A more thorough examination of its recursion depth will follow in Lemma 37.
Example 36. Let us consider the scenario where we are given a graph G,twonodessandtof G,and
we wish to express that there is a path from s to t in G.Let the graphs we consider be encoded by a
structure D,such that each node can be uniquely identified with a quadruple of values of the universe
of D.The signature we will be using is σ=({},{f8
E,f4
start,f4
target},{}), where fstart(x1,x2,x3,x4)=1if
(x1,x2,x3,x4)encodes the starting node, ftarget(x1,x2,x3,x4)=1if (x1,x2,x3,x4)encodes the target
node and fE(x1,...,x8)=1if there is an edge in G from the node encoded by (x1,x2,x3,x4)to the
node encoded by (x5,x6,x7,x8). This means that, if D=(A,F), then the graph it encodes has size
|A|4.
If we are interested in finding out whether there exists a path of length bounded by (logn)4from
the start node to the target node, we can use the following FOR+SUMR+PRODR+GFR4
Rsen-
tence. (A more exact treatment of the recursion depth of the GFRi
Roperator will follow this example
in Lemma 37.)
ϕ=[f(y1,...,y8)≡t(y1,...,y8,f)]
∃x1,x2,x3,x4fstart(x1,x2,x3,x4)=1∧
∃mf(m,m,m,m,x1,x2,x3,x4)≥1
where
t(y1,...,y8,f)=ftarget(y5,y6,y7,y8)+
sumz1,...,z8.⎛
⎝
4
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠⎞
⎠
(fE(y5,y6,y7,y8,z5,z6,z7,z8)×f(z1,...,z8))
In ϕ,we first identify the starting node and then dive into the recursion. Note first that the val-
ues y5,y6,y7,y8essentially take the place of the yi+1in Definition 35.Note also that the values
y1,y2,y3,y4take the place of the y1...yiin the aforementioned definition and are in this example
essentially only used as a counter mimicking the behaviour shown in Table 1to ensure the correct
recursion depth. The point of m in ϕis thus merely to essentially start this counter which will then
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
14 T. Barlag et al.
become decreased in the recursion. We could also impose that m be the maximum value of the uni-
verse of D,but we do not need to, as if any such m exists, our requirement that a path with length
bounded by O(( log n)4)is satisfied.
In t,we first check whether we have already reached the target node. Afterwards, we use a guarded
sum-aggregator to decrease the counter stored in z1,z2,z3,z4,iterate over all nodes z5,z6,z7,z8and
jump into the recursion, zeroing out all non-neighbouring nodes of the current node.
In total, ϕessentially describes an algorithm which traverses the given graph in a depth-first man-
ner and which terminates after polylogarithmically many steps because of the guarded aggregations.
The exact recursion depth is not obvious and will be investigated further in the following.
Having introduced the GFRi
Roperator, it remains to be shown that it indeed ensures polyloga-
rithmic recursion depth in the way that we want it to.
Lemma 37. Let D∈STRUCR(σ)and let ϕbe a formula containing a GFRi
Roperator. Then, the
recursion depth of the GFRi
Roperator is bounded by O(( log2n)i), where n is the size of the universe
of D.
Proof. Let nbe the size of the universe of the structure under which the GFRi
Roperator is inter-
preted. The bound for the recursion depth of the GFRi
Roperator stems from the relativization
which guards the aggregated variables. Let f(x,z1,...,zi,zi+1) be an occurrence of a GPRioper-
ator. Then, the variables in z1,...,zi,zi+1are in the scope of a guarded aggregation of the form
Az1,...,zi,zi+1.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧ξ(y1,...,yi,yi+1,z1,...,zi,zi+1)⎞
⎠
as per Definition 35.
Let zjbe the numerical interpretation of zjfor all 1 ≤j≤i. We interpret the tuple z1,...,zias
anaturalnumberzof base nwhere the jth digit of zis zj.
First, observe that in this interpretation, the relativization of the variables used in the recursive
call ensures that zstrictly decreases in each step. The big disjunction
i
j=1zj≤yj/2∧
j−1
k=1
zk≤yk
makes sure that there is an index j, such that zj≤yj/2, which means that the numerical interpre-
tation of zjis at most half of the numerical interpretation of yj. It also ensures that all tuples with
smaller indices zk(i.e., the more significant tuples in the interpretation of z1,...,zias a base n
number) do not increase.
Sinceeachofthetupleszj(in their numerical interpretation) can only get halved at most
log2n+1 times before reaching 0, it takes at most log2n+2 recursion steps until a tuple
other than the ith has been halved, in the worst case that is the (i−1)th tuple. This process can
then be repeated at most log2n+1 times, before the tuple at the next lower index gets halved.
In total, in the worst case, it takes (log2n+2)jrecursion steps until the i−jth tuple gets halved
in this process.
This means that after (log2n+2)i−1 recursion steps, each tuple has reached 0. Therefore,
the total maximum recursion depth is (log2n+2)i−1∈O(( log2n)i).
This process can be thought of as counting down a base log2nnumber. The idea for it has
already been visualized in Table 1. It is also explicitly illustrated in Tables 3and 4in the appendix,
for a sequence which we will define shortly in Definition 42 to make use of exactly this kind of
process.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 15
Since our final goal is to characterize both ACi
Rand NCi
R, we need to also define aggregators
which model the properties of NCRcircuits. For this purpose, we introduce bounded aggregators,
that is relativized aggregators where we only consider the two elements of maximal size meeting
the condition in the relativization.
Definition 38. We define the bounded aggregators sumx,bound and prodx,bound.They are used
in the same way as the aggregators defined earlier in Definition 24.The semantics are defined as
follows:
sumx,bound.(ϕ(x))t(x,w)≡
sumx.(ϕ(x)∧∀y∀z((y= z∧x<y∧x<z)→(¬ϕ(y)∨¬ϕ(z))))t(x,w)
The bounded aggregators prodx,bound and maxx,bound are defined analogously.
With this bounded aggregation, we can now define a slightly weaker version of the guarded
functional recursion from Definition 35, which we call bounded guarded functional recursion
GFRi
R,bound. This allows us then to define logics of the form FOR[F]+GFRi
Ror FOR[F]+
GFRi
R,bound.
Definition 39 (GFRi
R,bound). A formula is in FOR[F]+GFRi
R,bound if the same conditions as in
Definition 35 are met, but instead of a guarded aggregation in (2), we require a bounded guarded
aggregation.
Our goal in the following is to characterize the ACRand NCRhierarchies using first-order logic
and guarded functional recursion. For that purpose, we now define a sequence which we will later
use as part of the numbers of our gates in order to encode the gates’ depth into their numbers. The
idea behind the construction of this sequence will be that for a circuit family (Cn)n∈Nwith depth
bounded by c·(log
2n)i, each of the sequence’s elements is essentially a idigit base c·log2n−1
number with each digit being encoded in unary and padded by zeroes. For readability purposes, we
will refer to this encoding simply as a unary encoding. The sequence can then be seen as counting
down to 0 in that interpretation. This will then result in a length of ci·log2ni∈O(( log2n)i)for
fixed i. We begin by introducing our conventions regarding unary encodings of numbers.
Definition 40. Let n,∈Nsuch that ≥n.Then, we will refer to the function unary:N→{0, 1}
defined as
unary(n):=0−n1n
as the (length ) unary encoding of n.
Definition 41. For any binary string a of the form
a=0k−m1m
for some k,m,we define the function uval:{0, 1}→Ndefined as
uval(a):=m
and call uval(a)the value of the unary encoding a.
We now proceed to define the aforementioned sequence dwhich we will later use to essentially
encode our circuits’ gates’ depth into their gate numbers.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
16 T. Barlag et al.
Tab le 2 . The sequence d(8, 2, 2)
i12
1 11111 11111
2 11111 01111
3 11111 00111
4 11111 00011
5 11111 00001
6 11111 00000
7 01111 11111
8 01111 01111
9 01111 00111
10 01111 00011
11 01111 00001
12 01111 00000
13 00111 11111
.
.
..
.
..
.
.
35 00000 00001
36 00000 00000
Definition 42. For each n,c,i∈N>0,we define the sequence d(n,c,i)as follows. For readability
purposes, we leave out the arguments (n,c,i)in the definition of the sequence and only write d
instead of d(n,c,i).
1. Each element dof d consists of i tuples d,j(1≤j≤i), each of which is the length
c·log2n−1unary encoding of a number in [0, c·log2n−1].
2. d1=1...1(I. e., d1,j=unaryc·log2n−1(c·log2n−1) =1...1for all j with 1≤j≤i.)
3. d+1,i=⎧
⎨
⎩
unaryc·log2n−1(c·log2n−1) if uval(d,i)=0,
unaryc·log2n−1(uval(d,i)−1) otherwise, for all where d= 0...0.
4. d+1,j=unaryc·log2n−1(uval(d,j−1)) if uval(d,j+1)=0,
d,jotherwise, for j <i.
Table 2shows an abbreviated example for the sequence d. A further example as well as the full
version of Table 2can be found in the appendix as Tables 3and 4.
Remark 43. Note that substracting the value 1 in this unary encoding can be seen as an integer
division by 2 in binary. This will become useful later when putting this into the context of guarded
functional recursion with BIT.
Note that the length (i. e. the number of elements) of d(8,1,2)is
9=12·log282(=ci·log2ni).
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 17
and the length of d(8,2,2)is
36 =22·log282(=ci·log2ni).
This is no coincidence. Next, we show that this observation holds in general.
Lemma 44. Let n,c,i∈N>0.Then, d(n,c,i)has length ci·log2ni.
Proof. Since for each element ein d(n,c,i) the successor rule can be interpreted as subtracting
1 from ewhen eis seen as a base c·log2nnumber with idigits, we are starting at the largest
possible element in that sense (i. e. 1 ...1, which would correspond to (c·log2n)i−1) and
we are counting down to the lowest possible element (i. e. 0 ...0, corresponding to 0), there are
exactly (c·log2n)i=ci·log2nielements in d(n,c,i).
The remaining problem that stands in the way of using the sequence dfor the numbering of
gates in descriptions for circuits is that the length of the elements in ddepends on n(which will
be the number of input gates of our circuit). However, we can remedy this, since we essentially
have access to base nnumbers in the description for a circuit with ninput gates (by virtue of
interpreting circuit inputs as circuit structures). Combining those with the BIT predicate and now
interpreting the unary encoded tuples in elements of das binary numbers allows us to encode
elements of dusing a constant number of digits.
Observation 45. Let n,c∈N>0and 1≤≤c·log2n.The number 2−1can be encoded by a
base n number of length c.
Proof. The largest possible number of that form is 2c·log2n−1≤nc−1, which corresponds to
"n−1...n−1
ctimes
"inbasen. Therefore, 2c·log2n−1 can be encoded with cbase ndigits and thus
also all smaller natural numbers can be encoded in this way.
We can thus encode the binary valuations of tuples in elements of das base nnumbers of length
c. Therefore, each element of dcan be encoded using ibase nnumbers of length c(or i·cbase n
digits).
Before we proceed to use the sequence dfor circuit descriptions, we need one more lemma
which provides a useful property of ACi
Rresp. NCi
Rcircuits. We would like to be able to talk
about the depth of gates, that is the distance of a gate to the input gates of the circuit. For this
reason, we will establish the fact that for the circuit families we investigate, circuits exist where for
each gate g,eachinputgpath has the same length.
Lemma 46. Let L be in ACi
Ror NCi
Rvia the circuit family C=(Cn)n∈N.Then, there exists a circuit
family C=(Cn)n∈Ndeciding L,such that for all n ∈Nand each gate g in Cn,each path from an
input gate to g in Cnhas the same length. We call Cna balanced DAG.
The lemma follows from standard circuit manipulation (cf. also (Vollmer, 1999, Exercise 4.35)).
For convenience, a proof is provided in the appendix.
As previously mentioned, whenever we are dealing with balanced DAGs, we will refer to the
unambiguous length from input gates to a gate gas the depth of g.
Now we will turn to a lemma which will then finally enable us to use the previously defined
sequence dto encode our gates’ depth into their circuit numbers. The idea is for a gate g,to
prepend the depth(g)th element of dto the gate number of g. This way each path from an input
gate to the output essentially contains elements of din order in the prefixes of its gate numbers.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
18 T. Barlag et al.
This, combined with Lemma 44, provides us with a way to logically ensure the polylogarithmic
depth of a circuit given as a circuit structure.
Lemma 47. Let L be in ACi
Ror NCi
Rvia the circuit family C=(Cn)n∈N.Then, there exists an ACi
R
(resp. NCi
R) circuit family C=(Cn)n∈Ndeciding L with depth bounded by c ·(log
2n)i,such that
each circuit in Cis a balanced DAG, numbered by base n numbers and each gate g in Cencodes
the depth(g)’s element of d in the first c ·i digits of its gate number.
The numbering after the first c ·i digits can be chosen arbitrarily.
Proof. Let L∈ACi
Ror L∈NCi
Rvia the circuit family C=(Cn)n∈Nthe depth of which is bounded
by c1·(log
2n)i. Without loss of generality, let the circuits of Cbe balanced DAGs as per Lemma
46. That means that for each circuit Cnin C, for each gate gin Cn, the length of all paths from input
gates to gis the same. Let c∈N>0be such that ci·log2niis larger than the depth of Cn(which is
bounded by c1·(log
2n)i). We pad each path in Cnto length ci·log2niby replacing each edge
from an input gate to a gate in Cnby a path of dummy gates of length ci·log2ni−depth(Cn)so
that the resulting circuit has exactly depth ci·log2ni.
We now use any base nnumbering for the gates of Cnand for each gate gprepend the
depth(g)th element of d(n,c,i) to the number of g. Since we made sure that each input-output-
path in Cnhas length exactly ci·log2ni, we can encode exactly the sequence d(n,c,i)inthe
numbers of each input-output-path. So now for each input-output-path, the first c·idigits of gate
numbers encode the elements of d(n,c,i) in the order that they appear in the sequence.
With the normal form from Lemma 47 and the previous definitions, we can now turn to a
theorem characterizing ACi
Rand NCi
Rlogically by tying it all together.
Theorem 48.
1. ACi
R=FOR[ArbR]+SUMR+PRODR+GFRRifor i ∈N
2. NCi
R=FOR[ArbR]+SUMR+PRODR+GFRR,boundifor i ∈N>0
Proof. We start by showing the inclusions of the circuit classes in the respective logics and will
then proceed with the converse directions.
Step 1: ACi
R⊆FOR[ArbR]+SUMR+PRODR+GFRRi:
Let L∈ACi
Rvia the nonuniform circuit family C=(Cn)n∈Nand let the depth of Cbe bounded by
c·(log
2n)i. We construct an FOR[ArbR]+SUMR+PRODR+GFRi
Rsentence ϕdefining L.As
the circuit input is interpreted as a circuit structure, the signature σof ϕcontains only the single
unary function symbol felement.
We define the following additional relations and functions which will essentially encode our
given circuits. We will have access to them because of the ArbRextension of our logic and we
use relations here instead of functions for ease of reading, since we essentially have access to rela-
tions in functional structures if we consider the respective characteristic functions of the relations
instead.
•G+(x)⇐⇒ xis an addition gate.
•G×(x)⇐⇒ xis a multiplication gate.
•G<(x)⇐⇒ xis a <gate, the left predecessor of which is lexicographically lower than the
right predecessor.
•Ginput(x)⇐⇒ xis an input gate.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 19
•GE(x,y)⇐⇒ yis a successor gate of x.
•Goutput(x)⇐⇒ xis the output gate.
•Gconst(x)⇐⇒ xis a constant gate.
•fconst_val(x)=y∈R⇐⇒ yis the value of xif xis a constant gate and y=0 otherwise.
Without loss of generality let all circuits of Cbe in the normal form of Lemma 47 and let the
numbering of Cnbe such that the last digit of the number of the jth input gate is jfor 1 ≤j≤n.
Recall that this means that for each gate number of a gate grepresented as a tuple g,thefirstc·i
elements of gencode the depth(g)th element of d(n,c,i). The following sentence ϕdefines L:
ϕ:=[f(y)≡t(y,f)]∃aG
output(a)∧f(a)=1
where tis defined as follows (with zjdenoting the jth clong subtuple in the c·ilong prefix of z,
which, as per the normal form of Lemma 47, encodes the jth tuple of an element of d(n,c,i)):
t(y,f):=χ[G+(y)] ×sumz.i
j=1zj≤yj/2∧
j−1
k=1
zk≤yk∧GE(y,z)f(z)+
χ[G×(y)] ×prodz.i
j=1zj≤yj/2∧
j−1
k=1
zk≤yk∧GE(y,z)f(z)+
χ[G<(y)] ×maxz.i
j=1zj≤yj/2∧
j−1
k=1
zk≤yk∧GE(y,z)
maxb.i
j=1bj≤yj/2∧
j−1
k=1
bk≤yk∧GE(y,b)∧b<z)
χ[f(b)<f(z)]+
χ[Ginput(y)] ×felement (y|y|)+
χ[Gconst(y)] ×fconst_val (y)+
χ[Goutput(y)] ×sumz.i
j=1zj≤yj/2∧
j−1
k=1
zk≤yk∧GE(y,z)f(z).
Here, the relations Gg(y)forg∈{+,×,<, input, const, output}give information about the gate
type of the gate encoded by yand are provided by the ArbRextension of FOR. They are interpreted
as mentioned above. The BIT predicate is provided in the same way.
We will now prove that ϕdoes indeed define L.Leta∈Rnbe the input to Cn.Wewillshow
that for all g∈Rl,wherelis the encoding length of a gate in C, the value of the gate encoded by
gin the computation of Cnwhen Cnis given aas the input is f(g). Let gbe the gate encoded by
g. We will argue by induction on the depth of the gate g, that is by the distance between gand an
input gate.
d=0: If d=0, then gis an input gate. Therefore, the only summand in t(g,f) that is not trivially
0 is the fourth one, which is equal to felement(g|g|)(whichisthevalueoftheg|g|th input gate).
d→d+1: Since d+1>0, gis not an input gate. This means that there are the following 5
possibilities for g:
1. gis an addition gate: In that case, the only summand in t(g,f) which is not trivially 0 is the
first one. All predecessors of ghave a number, the first c·idigits of which are the successor
of the first c·idigits of gin the sequence d(n,c,i) because of the normal form of Lemma 47.
Additionally, the relativization ensures that the gate encoded by zin the respective summand
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
20 T. Barlag et al.
has exactly the successor in the sequence d(n,c,i)ofg’s first c·idigits in its first c·idigits.
This means that by the induction hypothesis
sumz.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧GE(y,z)⎞
⎠f(z)
yields exactly the sum of all the values of predecessor gates of g.
2. gis a multiplication gate: Analogously to the above case,
prodz.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧GE(y,z)⎞
⎠f(z)
yields exactly the product of all predecessor gates of g.
3. gis a <gate: In that case, the relativization
maxz.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧GE(y,z)⎞
⎠
makes sure that zis the maximum gate number of a predecessor of gand
maxb.⎛
⎝
i
j=1⎛
⎝bj≤yj/2∧
j−1
k=1
bk≤yk⎞
⎠∧GE(y,b)∧b<z)⎞
⎠χ[f(b)<f(z)]
makes sure that bis the gate number of the other predecessor of gand that therefore χ[f(b)<
f(z)] is the value of t(g,f), which is exactly the value of gin the computation of Cn.
4. gis a constant gate: Since fconst_val(g) returns exactly the constant that gis labelled with, that
value is taken by g.
5. gis the output gate: In that case, gonly has one predecessor and thus
sumz.⎛
⎝
i
j=1⎛
⎝zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠∧GE(y,z)⎞
⎠f(z)
ensures that gtakes the value of that predecessor, since there is only one element matching
the relativization.
Finally, by
ϕ:=[f(y)≡t(y,f)]∃aG
output(a)∧f(a)=1
we make sure that there exists an output gate which has the value 1 at the end of the computation.
Step 2: NCi
R⊆FOR[ArbR]+SUMR+PRODR+GFRi
R,bound:
The proof for this inclusion follows in the same way as the proof for the ACi
Rcase, by just replacing
all guarded aggregations in the formulae by bounded guarded aggregations.
Step 3: FOR[ArbR]+SUMR+PRODR+GFRi
R⊆ACi
R:
Let L∈FOR[ArbR]+SUMR+PRODR+GFRi
Rvia a formula ϕover some signature σ=
(Ls,Lf,La) and let there be only one occurrence of a GFRi
Roperator in ϕ. This proof easily extends
to the general case. This means that ϕis of the form
ϕ=[f(x,y1,...,yi,yi+1)≡t(x,y1,...,yi,yi+1,f)]ψ(f).
We now construct an ACi
Rcircuit family C=(Cn)n∈Ndeciding L.
https://doi.org/10.1017/S0960129524000136 Published online by Cambridge University Press
Mathematical Structures in Computer Science 21
We first construct an ACi
Rfamily evaluating ϕwithout the occurrences of fas in Theorem 30.
This is possible, since ϕis an FOR[ArbR]+SUMR+PRODRformula over (Ls,Lf,La∪{f}), and
by Theorem 30, there is such a circuit family for ϕ.
Next, we explain how we build an ACi
Rcircuit family for the whole formula ϕfrom this point.
For this, we need to construct an ACi
Rcircuit family computing the value of f(x,y) for each pair
a,bwith a∈A|x|for some k∈Nand b∈Ai·|y1|+|yi+1|. Notice that tis an FOR[ArbR]+SUMR+
PRODR+GFRRinumber term and can therefore be evaluated by an AC0
Rcircuit family, except
for the occurrences of f. We now obtain Cnby taking the nth circuit of all those (polynomially
many) AC0
Rcircuit families and for all a,breplacing the gate labelled f(a,b) by the output gate of
the circuit computing t(a,b,f).
Since all occurrences of f(x,y) are in the scope of a guarded aggregation
Az1,...,zi.⎛
⎝
i
j=1
zj≤yj/2∧
j−1
k=1
zk≤yk⎞
⎠
the number of steps from any f(a,b) before reaching a function call of the form f(c,0, d), with
|c|=|x|and |d|=|yi+1|, terminating the recursion, is bounded by O(( log2n)i) as per Lemma 37.
Since each such step – computing f(a1,b1), when given values of the next recursive call
f(a2,b2) – is done by an AC0
Rcircuit and therefore has constant depth, in total, any path from the
first recursive call to the termination has length in O(( log2n)i).