The Complexity of Bisimilarity and Model Checking in Finitary Diagrams
Abstract
Inspired by the work of Dubut, Goubault, and Goubault-Larrecq (ICALP 2015) on natural homology, Dubut (RAMiCS 2020) introduces finitary diagrams and studies bisimilarity and diagrammatic path logics for them. To this aim, he defines a fragment of the existential theory of the reals, called the existential theory of invertible matrices (ETIM). Using a PSPACE upper bound for this fragment, he proves that for finitary diagrams, bisimilarity can be decided in EXPSPACE and model checking for diagrammatic path logic in PSPACE.
We significantly improve both these bounds and settle the complexity of model checking for finitary diagrams. As our first main result, we show that there is an efficient randomized algorithm for ETIM. Combining this with the previous work by Dubut, we obtain an NEXP upper bound for bisimilarity of finitary diagrams and an NP upper bound for diagrammatic path logic. We also provide a matching NP-hardness proof for the latter. The hardness proof introduces constrained layered poset problems, which may be of independent interest, and connects them to finitary diagrams using Gabriel’s theorem for representations of path quivers. For bisimilarity over finite fields, we further improve the upper bound to PSPACE. In ETIM, we quantify over invertible matrices. We finally ask what happens if we instead quantify over matrices from the special linear group, that is, of determinant one. We show that in this case, the resulting fragment is equivalent to the existential theory of the reals, under a mild generalization of the allowed linear constraints.
Keywords and phrases:
Bisimilarity, Finitary diagrams, Model checking, Existential Theory of the RealsCategory:
Track B: Automata, Logic, Semantics, and Theory of ProgrammingCopyright and License:
2012 ACM Subject Classification:
Theory of computation LogicEditors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The study of behavioral equivalence in complex systems has been a central theme in concurrency theory and coalgebraic semantics. Among the most prominent notions of equivalence is bisimilarity, which provides a way to compare systems based on their observable behavior rather than their internal structure. In classical models, such as transition systems, bisimilarity relates states in such a way that every move of one system can be matched by a move of the other. Dubut, Goubault, and Goubault-Larrecq [5] proposed a categorical version of this idea in the setting of directed algebraic topology, where systems are represented not merely by states and transitions, but by diagrams with values in algebraic categories. This approach enables the comparison of systems with rich algebraic structure, including linear dynamical systems and weighted automata.
Dubut [4] introduced finitary diagrams as a finite, algebraic setting in which this categorical notion of bisimilarity can be studied algorithmically. A finitary diagram is a functor from a finite poset to a category of finite-dimensional vector spaces. While deciding the bisimilarity of two diagrams, there are two problems: first, finding out how to relate the executions and second, constructing the bisimulation, in particular, the isomorphisms. The first part is difficult in general, because this relation is necessarily infinite when there are loops. Restricting the input category to a finite poset removes this difficulty and allows us to focus on the algebraic problem of finding suitable isomorphisms between vector spaces. This makes finitary diagrams a natural setting for understanding the complexity of bisimilarity.
Dubut, Goubault, and Goubault-Larrecq [5] proposed a homology theory based on natural systems of abelian groups, meant to reflect directed structure, unlike classical homology which ignores direction. A diagram is a functor , where is a small category and is a category of observations. Inspired by the theory in [7] of comparing transition systems, Dubut, Goubault, and Goubault-Larrecq [5] defined two diagrams and to be bisimilar if there is a span of open morphisms between them, i.e., a diagram and two open morphisms from to and to , respectively. Dubut [4] studies equivalent notions of bisimilarity. He first defines the notion of bisimulation between two diagrams and : A bisimulation should identify pairs of elements and such that for any morphism of , there must be a morphism of and an isomorphism satisfying the following commutativity relation (see also Figure 1)
| (1) |
where and are the induced morphisms of . He shows that and are bisimilar if and only if there is a bisimulation between them. Then he goes on to show that bisimilarity can also be characterized in terms of path logics, in the spirit of [6, 7]. He defines a logic called diagrammatic path logic and proves that two diagrams are bisimilar if and only if they are logically equivalent, i.e., for every , there is a such that for every diagrammatic path formula , either and are both a model for or both are not.
1.1 Previous results
Finding bisimulations for finitary diagrams typically has a “combinatorial” part and an “algebraic” part. In the combinatorial part, we have to find an alignment of the objects in and whereas in the algebraic part, we need to find the isomorphisms and .
As a first tool for computing these isomorphisms, [4] introduced the existential theory of invertible matrices (. It contains sentences of the form
Here are natural numbers, , and are variables that quantify over invertible matrices in . is a predicate of the form
| (2) |
for some matrices and of matching sizes and with rational entries. Such systems of equations can be used to model the commutativity relations in Equation 1. It is easy to see that is a fragment of the existential theory of the reals (). Since [2, 9], this implies that too. The survey [10, L-Open2] asks the natural question whether is -complete.
Utilizing the upper bound for , Dubut [4] shows that bisimilarity of finitary diagrams can be decided in . For this, he guesses the tuples of a bisimulation relation with placeholders for the isomorphisms, implicitly using that if there is bisimulation, then there is one of at most exponential size. Then to check whether isomorphisms in the guessed relation can be instantiated such that they fulfill the commutativity relations in (1), he sets up a system of equations and uses the algorithm for on an exponentially large instance to check its feasibility.
1.2 Our contributions
We begin by showing that the aforementioned algebraic part of finding bisimulations is often easy. In particular, we demonstrate that the existential theory of invertible matrices allows for an efficient randomized algorithm over the reals, i.e., , greatly improving on the upper bound of by [4]. This is still true when we allow arbitrary linear constraints in the entries of the matrices and not only constraints of the form (2). We call this generalization . We obtain our efficient algorithm by reducing the problem to the well-known polynomial identity testing problem (PIT). [10, L-Open2] asks whether is -complete. Our results answer this question in the negative (assuming ). We also show that derandomizing the algorithm will be difficult, at least for , since this would be equivalent to derandomizing symbolic determinant identity testing (), which is a major open problem in complexity theory [8].
implies that . In fact, we are able to show that for all fields . Using this new upper bound for readily gives improved upper bounds for testing bisimilarity of finitary diagrams as well as model checking for (negation-free) diagrammatic path logic of finitary diagrams. We call these problems and respectively. We get that and for all fields .
For , we prove a matching lower bound – we show that the problem is -hard too. In the reduction, we define constrained layered poset problems, which might be of independent interest for showing hardness proofs in the context of finitary diagrams. To relate constrained layered posets to finitary diagrams, we make use of Gabriel’s theorem for the representation of path quivers. For , we go further and present a upper bound when is a finite field.
Finally, we study the theory of special linear matrices. Instead of quantifying over invertible matrices, here we quantify over matrices with determinant . This corresponds to isomorphisms that are volume preserving. While we show that the generalized theory of real invertible matrices is in , we prove that the generalized theory of special linear matrices is -complete. We leave it as an open question whether this is also true if we only allow for linear constraints of the form .
2 Preliminaries
2.1 Finitary diagrams
Definition 1 ([4]).
A finitary diagram over a field consists of the following data:
-
1.
a finite partially ordered set (for short poset) which describes the domain,
-
2.
for every , a natural number (which stands for the vector space ),
-
3.
for every pair of , a matrix of size , with coefficients from , such that:
-
is the identity matrix for all ,
-
for every triple , , where “” denotes matrix multiplication.
-
2.2 Bisimilarity
We first give the general definition of bisimulations in the setting of [5] and [4] and then specialize it to finitary diagrams.
Definition 2.
A bisimulation between two diagrams and is a set of triples where is an object of , is an object of and is an isomorphism of A such that:
-
1.
For every and , there exists and such that and , see Figure 1.
-
2.
Symmetrically, for every and , there exists and such that and .
-
3.
.
-
4.
.
Definition 3.
Two diagrams are called bisimilar if there is a bisimulation between them.
We will denote the problem of bisimilarity testing in finitary diagrams by , where is the underlying field of the vector spaces in the diagram. The main result of [4] on the bisimilarity of finitary diagrams is the following.
Proposition 4.
.
2.3 Diagrammatic path logic and finitary formulae
[4] introduces the so-called diagrammatic path logic, which is similar to the logic introduced by [6] for transition systems or to path logics developed by [7]. Finitary formulae are an instance of diagrammatic path logic for finitary diagrams. The syntax is as follows.
- Object formulae:
-
with
- Morphism formulae:
-
,
where is a matrix over some field . Here, asserts that the current object represents the vector space , “fires” a transition via the matrix , “?” transitions back to object-level evaluation, and are standard Boolean connectives, and is the tautology.
The semantics are as follows: For a diagram , an object , and an isomorphism of of the form for some , we define for an object formula , and for a morphism formula by induction on the structure:
-
1.
iff and for some isomorphism .
-
2.
iff there is a in and an isomorphism of such that .
-
3.
? switches back to object formulae, iff .
-
4.
Conjunction has the usual semantics, i.e., iff and .
-
5.
The same is true for negation, iff .
-
6.
Finally, is always satisfied, i.e., always holds.
This setup closely mirrors labeled transition or path logics, but here the “labels” are matrices over a field.
Let denote all triples , where is a finitary object formula, such that . A finitary formula is called positive if it does not contain any negations. Let denote the subset of corresponding to positive finitary formulas, with being the underlying field. [4, Thm. 9] shows the following:
Proposition 5.
.
2.4 Existential theory of the reals
The existential theory of the reals () is the decision problem of determining the truth of formulas of the form
| (3) |
where each is a multivariate polynomial with integer (or rational) coefficients, and
The complexity class is the set of all languages polynomial-time many-one reducible to the problem. It satisfies . By now, there is an abundance of complete problems for known, see the recent compendium [10].
2.5 Existential theory of invertible matrices
Dubut [4] defines the existential theory of invertible matrices as an intermediate problem. It contains sentences of the form
Here are natural numbers, and are variables that quantify over invertible matrices in , for some field . is a predicate of the form for for some matrices and of matching sizes and with entries from . is the set of all true sentences of the above form.
The predicates were chosen to be of the above form because they naturally appear in the case of finitary diagrams. We can also consider a more general problem where each is an arbitrary affine linear equation in the entries of the matrices . We call this problem , as it is a generalization of .
2.6 Nondeterministic reductions
As a tool to prove the containment of problems in or , we will use nondeterministic reductions, which already implicitly appear in [4].
Definition 6.
A language is nondeterministically polynomial time many-one reducible to if there is a deterministically polynomial time computable function with two inputs such that for all : iff there is a with such that . We write .
Proposition 7.
If and , then .
We will also need nondeterministic exponential-time reductions. Exponential here means .
Definition 8.
A language is nondeterministically exponential-time many-one reducible to , if there is an exponential time computable function with two inputs such that for all : iff there is a with such that . We write .
Proposition 9.
If and , then .
2.7 A tool from quiver theory and persistent homology
A finitary diagram is a functor from a poset category to the category of finite-dimensional vector spaces and linear maps. This is closely related to the notion of representations of a quiver and when the poset is totally ordered, it is exactly the same as single-parameter persistent modules. Therefore, tools from quiver theory and persistent homology can prove useful for problems on finitary diagrams. We use one particular tool which follows from the well-known Gabriel’s theorem on quivers and also appears in persistent homology as the rank invariant criterion [3, Theorem 12].
Theorem 10.
We are given the matrices and over some field , where for each , the matrices and have dimension for some integers . For , let denote the product and denote the product . Then,
This criterion follows from the classification of representations of the Dynkin quiver (a special case of Gabriel’s theorem). For more background on the criterion and its connection to Gabriel’s theorem, refer to the full version.
3 Overview of results and techniques
We give a comprehensive overview of our results and explain the main techniques used in our proofs.
3.1 Existential theory of invertible matrices
Dubut introduces the existential theory of invertible matrices () to get upper bounds for deciding bisimilarity of finitary diagrams and model checking of finitary formulae. An instance of is of the form , where each constraint is of the form for matrices and over . If we consider the case of the real field, an instance of can be easily translated into an equivalent instance of the existential theory of the reals. This leads [10, L-Open2] to ask the natural question whether is -complete. We answer this question in the negative (assuming ) by giving an efficient randomized algorithm.
Dubut uses to verify the commutativity relations of the form , which explains the structure of the constraints . It turns out that our algorithm can also handle the case of arbitrary affine linear equations in the entries of the matrices, which we call .
Theorem I (Theorem 12).
for infinite fields .
Proof overview.
In a instance, we have linear equations from the constraints , and polynomial inequalities involving the determinants, expressing that the matrices are invertible. First, we parametrize the solution space of the linear system using free variables and substitute this parametrization into the matrix variables. The instance is satisfiable if and only if after the substitution, all of the determinants are nonzero polynomials. This can be tested with the famous Schwartz-Zippel lemma. We need the infiniteness of the field to sample enough points from it for the use of the lemma.
One can ask the question whether our algorithm can be derandomized. This turns out to be a hard problem, since it is equivalent to the complement of the symbolic determinant identity problem, whose derandomization over the rationals/reals in particular implies strong circuit lower bounds (see [8]).
Theorem II (Theorem 15).
is deterministically polynomial time equivalent to the complement of the symbolic determinant identity testing problem for all fields .
Proof overview.
The reduction from to the complement of is already implicit in the proof strategy of the above theorem. For the other direction, we essentially use the linear constraints of to specify the affine linear entries of the instance.
3.2 First results through our algorithm for ETIM
Dubut essentially constructs nondeterministic reductions from and to . The first one is an exponential time reduction, the second one is polynomial-time. In both reductions, he nondeterministically guesses the assignments between states and for each such guess, he creates an equation of the form (2) to check the existence of a matching isomorphism. All these checks can be pushed to the end, making the algorithms by Dubut essentially nondeterministic reductions. Since (using Theorem 12 for infinite fields and trivially for finite fields) and is closed under nondeterministic polynomial time reductions and the closure of under nondeterministic exponential time reductions is , we get the following results
Theorem III (Corollary 18).
for all fields .
Theorem IV (Corollary 23).
for all fields .
The upper bound for is optimal, the one for can be further improved for finite fields.
3.3 Complexity of bisimilarity checking for finitary diagrams
Theorem V (Theorem 21).
when is a finite field.
Proof overview.
The above reduction approach to produces a system of equations of exponential size, therefore, we have to use a different approach. We set up a quantified formula that is true iff the given diagrams are bisimilar. This formula quantifies over Boolean variables and matrices over . Therefore, we can brute-force over all possibilities in .
3.4 Complexity of model checking for finitary formulae
We already showed that is in . Now we establish its -completeness.
Theorem VI (Theorem 28).
is -hard for all fields .
Proof overview.
We reduce the classic CLIQUE problem to . Given an undirected graph and a parameter , we have to construct a finitary diagram and a finitary formula over the diagram such that the formula is satisfiable if and only if has a clique of size . A finitary diagram is a functor from a poset to the category of finite-dimensional -vector spaces and linear maps. Posets can be viewed as transitive and reflexive directed acyclic graphs, which is already a very restricted class of graphs. Further, whenever there is a chain in the poset, the diagram must satisfy . All these restrictions make the reduction extremely tricky. Therefore, we construct intricate gadgets called constrained layered posets, which help us build the necessary finitary diagram. Then we construct a finitary object formula of the form . The advantage of this special form is that we can use the rank invariant criterion in Theorem 10 to characterize the satisfiability of such formulas. Finally, we can ensure that the rank-invariance conditions are satisfied if and only if has a -clique.
3.5 Existential theory of special linear matrices
Instead of taking arbitrary isomorphisms for identifying the elements of the diagram, we could also consider special linear maps, that is, matrices of determinant one. This would put stronger geometric conditions on the similarity, for instance, volumes being preserved. It is natural to explore the complexity of the corresponding problems. We prove that the existential theory of special linear matrices is -complete, in contrast to .
Theorem VII (Corollary 33).
is -complete.
Proof overview.
The reduction is gadget-based. We start from a special case of , called , where we are only allowed to use equations of the form , , and , cf. [1]. For every variable, we set up a -matrix and use linear equations such that the matrices have the form . Together with the fact that we quantify over special linear matrices, this enforces , that is, . This automatically also implements equations of the form . The tricky part is to implement the additions. This requires a series of cleverly chosen linear equations. In each step, we have to ensure that we do not constrain the matrices too much, since we always have to ensure that there is still a solution in which the determinant of the matrices in the equations is one.
4 An efficient algorithm for the existential theory of invertible matrices
In this section, we present our first main result, an efficient algorithm for the generalized existential theory of invertible matrices. The main insight for designing our algorithm is that we can reduce the existential theory of invertible matrices to polynomial identity testing (PIT). Then we will use the famous Schwartz-Zippel Lemma, see e.g. [11], to get an efficient randomized algorithm.
Lemma 11 (Schwartz-Zippel).
Let be a non-zero polynomial of total degree over an integral domain . Let be a finite subset of and let be selected independently and uniformly at random from . Then:
Let
| (4) |
be the given -instance. Recall that we quantify over invertible matrices and that are affine linear equations in the entries of the matrices , , . The following algorithm decides whether the instance is true:
Input: A -instance like in Equation 4
Output: Whether the instance is satisfiable
Theorem 12.
for infinite fields .
Proof.
We need to prove the correctness of Algorithm 1. If the algorithm returns 1, then by construction it has found an assignment to such that the linear constraints are satisfied and each determinant is nonzero, that is, the matrix is invertible. If on the other hand the algorithm returns , then either the linear system has no solution, or one of the determinants is identically zero, or one of the identity tests erroneously failed. In the first case, there is indeed no solution, since already the linear system without any invertibility constraints is not satisfiable. In the second case, there is no solution, too, since we computed the solution space of the affine system of linear constraints and one of the determinants vanishes on this space. In the third case, by choosing the set in the Schwartz-Zippel lemma large enough, we can ensure that the error probability of one test failing is . This means that by the union bound, the error probability in the yes-case is bounded by , thus we satisfy the acceptance condition of .
The algorithm can be implemented in randomized polynomial time, since we only solve systems of linear equations and evaluate determinants. This proves the theorem.
Corollary 13.
for infinite fields .
Since , we have for all infinite fields . On the other hand, for finite fields , we trivially have , since one can guess the solution to the -instance non-deterministically. The same is true for . Therefore, we have the following corollary.
Corollary 14.
and for all fields .
Next, we show that our upper bound for is optimal in the sense that derandomizing it over rational/real fields would have dramatic consequences in complexity theory. The symbolic determinant identity problem () is the following problem: Given a square matrix whose entries are affine linear polynomials from , decide whether .
Theorem 15.
is deterministically polynomial time equivalent to the complement of for all fields .
Proof.
The reduction from to the complement of is exactly the construction in Algorithm 1. Since we stop just before invoking the Schwartz-Zippel lemma, this part of the construction holds over all fields .
For the other direction, first we can use a standard reduction from for matrices with affine linear entries to for matrices with entries which are only variables or constants. Refer to the full version for this reduction. Now, given an -instance of size with entries that are variables or constants, we create a -instance as follows: We quantify over one matrix of size . If is a constant, then we add the equation to the instance. For each variable that appears in , we let be the entries of in which it occurs. Then we add the equations , , to the instance. By construction iff there is an invertible matrix that satisfies the constructed equations.
Over finite fields, is -complete. Over rational/real fields, derandomizing (as well as PIT in general) is a major open problem in computational complexity, in particular, it implies strong circuit lower bounds ([8]).
5 An improved algorithm for bisimilarity
In this section, we present an improved algorithm for bisimilarity testing of finitary diagrams. [4, Theorem 8] shows that this problem is in . We get an improvement by using our new result for (Theorem 12). [4, Section 7] gives an algorithm, which implicitly constructs a nondeterministic reduction from testing bisimilarity of finitary diagrams to :
Proposition 16 (implicit in [4]).
for all fields .
In his reduction, Dubut essentially guesses a bisimulation, that is, triples of the form , implicitly using the fact that if there is a bisimulation, then there is always one of exponential size. The reduction works as follows: In the triple , is from the poset of the first diagram and is from the poset of the second diagram . is a “placeholder” for the isomorphism between and . We then list all the -equations that need to be satisfied according to Definition 3 and use an -solver to check whether the system is feasible.
This implicitly uses the following lemma. Let be a bisimulation between two finitary diagrams and . We define a partial order on the set of triples in as follows:
Lemma 17.
Any bisimulation between two finitary diagrams and contains a subset such that is a bisimulation and , where .
Proof.
Consider with the order defined above. Among all minimal elements in , choose at most one tuple of the form for each pair and . The number of tuples is bounded by . For every tuple that was chosen in the first round and every , we choose a tuple such that and . Such tuples exist by the definition of bisimulation. We do the same for every . In this way, we add new tuples to for each tuple added in the first round, so we add tuples in total in the second round. Now we go on inductively: For each tuple added in the previous round and each , we choose one tuple such that and add it to . We do the same for every . This process comes to an end after rounds. Therefore, the total size of is bounded by . By construction, satisfies the conditions in the definition of bisimulation.
Together with our improved upper bound for (Corollary 14) and Proposition 9, we get an improved upper bound for testing bisimilarity of finitary diagrams.
Corollary 18.
for all fields .
6 A PSPACE upper bound for bisimilarity over finite fields
Next, we further improve the upper bound for to , when is a finite field. Since the system of equations that is generated in the above reduction is of exponential size, the reduction approach to will not work unless we could prove that there is a smaller system. Instead, we will (deterministically) polynomial-time reduce this problem to , the set of all true quantified Boolean formulas, which is a classical -complete problem.
Let and be two finitary diagrams. We construct a quantified formula , which is true iff and are bisimilar:
(5)
In the formula:
-
1.
and quantify over .
-
2.
is true if and are in different posets and the dimensions of the associated vector spaces match.
-
3.
is true iff are from different posets and is strictly greater than the element or of the matching poset. (The “s” stands for “strictly”.)
-
4.
is defined in the same way, but we only require that is greater than the element of the matching poset.
-
5.
is true if and are in different posets as well as and . Furthermore, the matrices and have to be chosen such that the diagram induced by the four elements commutes. Here we assume that the matrices map from to .
-
6.
is the dimension of the associated vector space, which is either or .
-
7.
quantifies over -matrices of size .
-
8.
.
A model of the formula in (5) can be thought of as a tree. The root has a child for every . The node corresponding to each is labeled with a triple such that is from the other poset with a matching dimension and is an invertible matrix. For each element that is strictly above the matching element or , we select an element that is above the matching element or such that and are in different posets and the dimensions of the associated vector spaces match. Finally, we select an invertible matrix such that the diagram induced by the poset elements as well as the two isomorphisms to commutes. becomes the label of the new nodes. We go on recursively like this until both poset elements of are maximal. This happens at the latest when . Note that when we have reached maximal elements, the predicate is always false, therefore, the implication is always true in this case. Thus it does not matter when we reach a maximal pair of poset elements earlier than after steps.
Lemma 19.
When the formula has a model, then the diagrams and are bisimilar.
Proof.
We claim that the set of labels of the tree constructed above forms a bisimulation. For every there exists with and an such that is a label. This is already ensured by the first layer of nodes in . The same is true for the symmetric statement with the roles of and swapped. Finally, if there is a tuple , then for any , there must be a such that and an invertible matrix such that . This is ensured by the part of the formula. The same is true for the symmetric statement for any . Since or , we can stop at depth , since any ascending chain in with the order iff has length at most .
We can also prove the converse.
Lemma 20.
If and are bisimilar, then has a model.
Proof.
Let be a bisimulation. For each , we choose a tuple and label one child of the root with it. Such tuples exist by the definition of bisimulation. In the same way for every , we choose a tuple and add a child to the root. For every child with label such that either or are not maximal, we add for each a child with tuple for some and such that the diagram induced by commutes. Such a triple exists by the definition of bisimulation. We do the same for each . This obviously creates a model of .
Now we immediately get the following theorem.
Theorem 21.
when is a finite field.
Proof.
The last two lemmas show that and are bisimilar if and only if the formula in Equation 5 has a model. Since is a QBF, we can brute-force over all assignments to the quantified variables in polynomial space and therefore decide its satisfiability in .
7 Complexity of model checking for finitary diagrams
There is a nondeterministic polynomial time reduction from to . Since , this proves that , improving on the upper bound by [4].
Theorem 22.
for all fields .
Proof.
In the model checking problem, there are two kinds of choices that need to be made: In a formula of the form , we need to choose an isomorphism. This will be done by . The second kind of choice is in formulas of the form . Here we can choose the next element of the diagram. This choice will be modeled by the nondeterminism of the reduction. This reduction is implicit in the work of [4], when he proves the upper bound.
Our nondeterministic reduction will add quantifiers of the form one after another to the output formula as well as linear equations. In the beginning, our input is a diagram , and an object and an object formula . The reduction proceeds recursively along the structure of . When is a morphism formula, then besides and , we will also have a variable matrix as an input. Our reduction simulates the semantic rules of Section 2.3 as follows:
-
if , then if , we reject. Otherwise, we add the quantifier for some fresh variable to and we go on with .
-
if , then we go on with .
-
if , then we accept and output .
-
if , then we first go on with and then with .
-
If with being an -matrix, then we first check whether . If not, then we reject. Otherwise, we guess a with such that . If no such exists, then we reject. Otherwise, we add to for some fresh variable as well as the equations . Go on with .
By construction iff there is an accepting path on which we output a satisfiable -instance.
Now, using Corollary 14 immediately gives us the following corollary.
Corollary 23.
for all fields .
Our next goal will be to show -hardness for . We will achieve this by reducing Clique to . For this reduction, we invent a gadget called constrained layered poset, which we outline below.
Definition 24 (Constrained Layered Poset (CLP)).
A poset is said to be a constrained layered poset (CLP) if it satisfies the following properties:
-
Layered structure. For some , we have . The elements are ordered by iff or . Thus, the poset has layers where the -th layer is an antichain , and every element in layer is smaller than every element in layer .
-
Set-labels. Every pair in the poset is labeled by a set for some universe . We will call the label-function of the CLP.
-
Triplet criterion. For any triplet in , we have .
Notice that a finitary diagram can be visualized as the poset having every pair labeled by a matrix . However, in CLPs defined above, the pairs are labeled by sets instead. The idea behind this is to only focus on finitary diagrams where each matrix is a diagonal matrix with diagonal entries and its support being the index-set . Then the triplet criterion basically captures the fact that whenever in .
In the following lemma, we take the first step in our reduction. We show that given a graph, we can construct a CLP in polynomial time satisfying certain properties capturing the edge-relations in the graph.
Lemma 25.
Given an undirected graph and two integers with , we can construct in polynomial time a CLP with label-function such that for all and ,
for some appropriately chosen function .
Proof.
We are given an undirected graph and two integers with . We have to construct a CLP satisfying the given properties.
The poset.
Following the definition of CLP, we can define the comparabilities in our poset as follows:
The universe.
Let be a set of symbols and set the universe . We also define a map given by
which we are going to use later while constructing the labels. Note that in particular, for all since .
Labels.
We have to assign for all comparable in . First of all, we set . Now we handle the strictly comparable pairs. For and , we define
where
The four sets are pairwise disjoint because they have mutually exclusive constraints on the first two coordinates.
For every and every , we have
Hence,
Now define the function as
Then for all ,
Satisfaction of the triplet criterion.
It remains to show that for all in ,
Assume , , with . The sets and can be written as unions of their parts and hence their intersection is the union of the cross-intersections between these parts. The only nonempty cross-intersections are:
The first three equalities are easy to see. For the last equality, observe that contains tuples with first coordinate and third coordinate for while contains tuples with second coordinate and third coordinate for . Therefore, their intersection can contain at most one element and it contains this element only when , i.e., when . It follows that the intersection equals to . Therefore,
As we described earlier, the idea behind using the set-labels for partial orders in CLPs is to define a finitary diagram , where each is a diagonal matrix with diagonal entries and its support being the index-set . In the following lemma, we make this idea explicit in order to lift the CLP-gadget of Lemma 25 to a finitary-diagram-gadget.
Lemma 26.
Given a field , an undirected graph and two integers with , we can construct in polynomial time a finitary diagram from a CLP to a category composed of a single -vector space and linear maps, such that for all and ,
for some appropriately chosen function .
Proof.
Given the undirected graph and the integers with , first use Lemma 25 to construct a CLP with label-function such that for all and ,
for some function . Now we will define the finitary diagram .
Let be the universe used in the label-function , i.e., and let . We will define the range of the diagram to be the single-object category where the object represents the vector space . Therefore, and for all .
Choose any bijection . Now, given a subset , define to be the diagonal matrix whose -th diagonal entry is if and otherwise. We have
for all . Now for all in , define
Then for all in ,
as desired in a diagram, and for all and ,
Having built the necessary gadget, we can proceed towards the main proof now. The following lemma gives a necessary and sufficient condition for a special kind of finitary formula being satisfiable. Focusing on these special kind of formulas will be sufficient for us to prove -hardness of the general problem.
Lemma 27.
Let be a finitary diagram from a poset to a category , where the object represents the vector-space for some field . Let be an object formula for singular matrices over of dimension . Then given , we have if and only if there exists a chain in satisfying
for all .
Proof.
We have
if and only if
a chain in and matrices .
By Theorem 10, such matrices can exist if and only if for all ,
Since each is singular and for all , we conclude that are distinct elements if the above condition is to be satisfied. Hence, we must have , as desired.
Now we are ready to prove -hardness for .
Theorem 28.
is -hard for all fields .
Proof.
We will give a polynomial-time reduction from Clique to . Given a simple undirected graph on the vertex set and a parameter , we have to decide whether has a -clique. Consider the simple undirected graph where
Clearly, has a -clique if and only if has a -clique containing the vertex .
Now, apply Lemma 26 on the graph with the parameters and . Then we can construct in polynomial time a finitary diagram from a CLP to a single-object category such that for all and ,
for some function .
Notice that if we applied Lemma 26 on the complete graph on vertices instead with the same parameters, then we would obtain another finitary diagram from the same CLP to some single-object category such that for all and ,
because would always be an edge. We use the second diagram to define the finitary formula in the -instance we create, while the first diagram will be the diagram in it. Let us set for . Then for all ,
Note that the single-object categories and generated in the above two applications of Lemma 26 may be different. However, with very slight modification in the proof of the lemma, we can ensure that and are equal to the same category . Hence, each is a matrix.
Now define the object formula . We claim that iff has a -sized clique containing the vertex n+1.
Using Lemma 27, we have iff there exists a chain in (note that any chain of increasing elements in must pick exactly one element from each layer) such that for all ,
Therefore,
iff there is a -clique in formed by the vertices
iff there is a -clique in formed by the vertices .
Hence, the problem Clique reduces to , making the latter -hard.
8 Existential theory of special linear matrices
The (generalized) existential theory of special linear matrices is defined in the same way as the (generalized) existential theory of invertible matrices. The only difference is that we quantify over matrices with determinant equal to . Our efficient algorithm from Section 4 does not work in this situation, since the Schwartz-Zippel lemma can only test whether a polynomial is non-zero, but not whether there is an input at which it evaluates to . In fact, we will show that the generalized existential theory of special linear matrices is -complete.
First, we define the -complete problem , which we will reduce to .
Definition 29.
In , we are given formulae of the form , where all are of one of the following forms:
Here, and are arbitrary variables. The question is whether there exists an assignment of real nonzero values to the variables such that the given formula evaluates to true.
There are many variants of known. To the best of our knowledge, the first one was defined by [1], see also [10, Problem L5–L7]. In contrast to our definition, [1] also requires that the domain of the variables is .
Proposition 30.
is -complete.
A self-contained proof of the above proposition can be found in the full version. Now we are ready to prove -hardness of . In fact, our proof will show that this is true even if we restrict ourselves to two kinds of linear equations in , namely matrix equations of the form and . It remains an interesting open question whether only the first type is sufficient to prove -hardness, that is, whether is already -complete.
8.1 Representing variables
We store variables using -matrices . By adding the constraint
which is equivalent to
we ensure that . and are not constrained by this equation. However, since we quantify over matrices of determinant , we get the additional constraint . This ensures that can never be zero and also forces that is the inverse of .
8.2 Setting variables to
We first show how to simulate equations of the type . For this, we have a special -matrix . Since we quantify only over matrices of determinant , simply quantifying over ensures . Now we take the -matrix that stores and add the constraint:
This forces , and henceforth .
8.3 Equations of the form
Given the two representations of and , and , we need to ensure that , since we already know that (and ). This is achieved by the following constraint:
Note that the two equations and then also enforce , so the second constraint is automatically fulfilled.
8.4 Equations of the form
The tricky part is to simulate the additions. For each addition, we have an extra variable , for which we set up a -matrix as above. Second, for each addition, we have a -matrix over which we will quantify. The difficult part is to cope with the constraint that the determinant of has to be .
First we set up the equation
This constrains the first column of the matrix and leaves all other columns unconstrained. In a similar way, we constrain the second column:
By adding two similar constraints for the third and the fourth column involving and , respectively, we can achieve that can only take the form
| (6) |
The reason for this rather involved set of equations is that it ensures that can be achieved.
Observation 31.
-
1.
.
-
2.
In any solution to the equations constructed so far, , , and .
-
3.
Since does not appear anywhere else, we can set to achieve .
We set up a second matrix similar to . We can take the same variable and also take the same set of equations, but we transpose each equation on both sides. Since the -matrices representing the variables are diagonal, they equal their transpose. Therefore, in any solution to the equations, will be the transpose of , i.e.,
In particular, . Finally, we set up the equation that simulates the addition using the matrices and . It is the only equation that is of the form .
| (7) | ||||
The equality of the first entries of the resulting vectors simulates the addition. Note that the equations of the other three entries are trivially satisfied, so they do not impose any new constraints on our variables.
Theorem 32.
.
Proof.
Assume that is a yes-instance of . Let be a satisfying assignment. For each variable , we set up a -matrix as in Section 8.1. If we set the diagonal entries to and and the off-diagonal entries to , then the determinant is and the equations in Section 8.1 are satisfied. If we have an equation , then and the -matrix corresponding to satisfies the equations of Section 8.2 by construction. If we have an equation of the form , then and the equations of Section 8.3 are again satisfied by construction. Finally, if we have an equation of the form , then we first set the values of as depicted in (6) (substituting for ). Since is a feasible solution, all of them are nonzero. Therefore, we can choose in such a way that the determinant of is . is only used for this addition. The entries of the -matrix for are set as above. In the same way, we can choose the values for . Since also the equations is satisfied. Thus we have a yes-instance for .
Conversely, assume that the -instance constructed above is a yes-instance. We claim that the values of the -entries of the -matrices corresponding to are a satisfying solution to the -instance. All are nonzero, since the determinants are . The equations are all satisfied, since for each we set up a gadget that ensures this.
The reduction is obviously polynomial-time computable.
Corollary 33.
is -complete.
9 Conclusions
In the present work, we settled the complexity of the model checking problem for finitary formulae (-complete) and significantly improved the complexity of deciding bisimilarity in finitary diagrams ( in general and for finite fields). We gave an efficient randomized algorithm for the (generalized) existential theory of invertible matrices over infinite fields, in particular over the reals. It is an interesting, but very difficult question whether we can derandomize this algorithm for , since it is equivalent to the complement of symbolic determinant identity testing. Is the subproblem equivalent to the complement of some identity testing problem? Or is there an efficient deterministic algorithm? In contrast to , we proved that the generalized existential theory of special linear matrices is -complete. Is the existential theory of special linear matrices -hard, too?
References
- [1] Mikkel Abrahamsen, Anna Adamaszek, and Tillmann Miltzow. The art gallery problem is -complete. J. ACM, 69(1):4:1–4:70, 2022. doi:10.1145/3486220.
- [2] John Canny. Some algebraic and geometric computations in PSPACE. In Proc. 20th Annual ACM Symposium on Theory of Computing (STOC), pages 460–467. ACM, 1988. doi:10.1145/62212.62257.
- [3] Gunnar Carlsson and Afra Zomorodian. The theory of multidimensional persistence. Discrete and Computational Geometry, 42:71–93, June 2007. doi:10.1007/s00454-009-9176-0.
- [4] Jérémy Dubut. Bisimilarity of diagrams. In Uli Fahrenberg, Peter Jipsen, and Michael Winter, editors, Relational and Algebraic Methods in Computer Science - 18th International Conference, RAMiCS 2020, Palaiseau, France, April 8-11, 2020, Proceedings [postponed], volume 12062 of Lecture Notes in Computer Science, pages 65–81. Springer, 2020. doi:10.1007/978-3-030-43520-2_5.
- [5] Jérémy Dubut, Eric Goubault, and Jean Goubault-Larrecq. Natural homology. In Magnús M. Halldórsson, Kazuo Iwama, Naoki Kobayashi, and Bettina Speckmann, editors, Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, 2015, Proceedings, Part II, volume 9135 of Lecture Notes in Computer Science, pages 171–183. Springer, 2015. doi:10.1007/978-3-662-47666-6_14.
- [6] Matthew Hennessy and Robin Milner. On observing nondeterminism and concurrency. In Jacco de Bakker and Jan van Leeuwen, editors, Automata, Languages and Programming (ICALP 1980), volume 85 of Lecture Notes in Computer Science, pages 299–309. Springer, Berlin, Heidelberg, 1980. doi:10.1007/3-540-10003-2_79.
- [7] André Joyal, Mogens Nielsen, and Glynn Winskel. Bisimulation from open maps. Information and Computation, 127(2):164–185, 1996. doi:10.1006/inco.1996.0057.
- [8] Valentine Kabanets and Russell Impagliazzo. Derandomizing polynomial identity tests means proving circuit lower bounds. Comput. Complex., 13(1-2):1–46, 2004. doi:10.1007/S00037-004-0182-6.
- [9] James Renegar. On the computational complexity and geometry of the first-order theory of the reals. Part I: Introduction. Preliminaries. The geometry of semi-algebraic sets. The decision problem for the existential theory of the reals. Journal of symbolic computation, 13(3):255–299, 1992. doi:10.1016/S0747-7171(10)80003-3.
- [10] Marcus Schaefer, Jean Cardinal, and Tillmann Miltzow. The existential theory of the reals as a complexity class: A compendium. CoRR, abs/2407.18006, 2024. doi:10.48550/arXiv.2407.18006.
- [11] Amir Shpilka and Amir Yehudayoff. Arithmetic circuits: A survey of recent results and open questions. Found. Trends Theor. Comput. Sci., 5(3-4):207–388, 2010. doi:10.1561/0400000039.
