Abstract 1 Introduction 2 Preliminaries 3 Overview of results and techniques 4 An efficient algorithm for the existential theory of invertible matrices 5 An improved algorithm for bisimilarity 6 A PSPACE upper bound for bisimilarity over finite fields 7 Complexity of model checking for finitary diagrams 8 Existential theory of special linear matrices 9 Conclusions References

The Complexity of Bisimilarity and Model Checking in Finitary Diagrams

Markus Bläser ORCID Saarland University, Saarland Informatics Campus, Saarbrücken, Germany    Sagnik Dutta ORCID Max Planck Institut für Informatik, Saarland Informatics Campus, Saarbrücken, Germany    Samuel Okyay Saarland University, Saarland Informatics Campus, Saarbrücken, Germany
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 Reals
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Copyright and License:
[Uncaptioned image] © Markus Bläser, Sagnik Dutta, and Samuel Okyay; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic
Related Version:
Full Version: http://arxiv.org/abs/2606.16744
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

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 F:CA, where C is a small category and A is a category of observations. Inspired by the theory in [7] of comparing transition systems, Dubut, Goubault, and Goubault-Larrecq [5] defined two diagrams F:CA and G:DA to be bisimilar if there is a span of open morphisms between them, i.e., a diagram H:EA and two open morphisms from H to F and H to G, respectively. Dubut [4] studies equivalent notions of bisimilarity. He first defines the notion of bisimulation between two diagrams F:CA and G:DA: A bisimulation should identify pairs of elements cC and dD such that for any morphism i:cc of C, there must be a morphism j:dd of D and an isomorphism g:F(c)G(d) satisfying the following commutativity relation (see also Figure 1)

gF(i)=G(j)f, (1)

where F(i) and G(j) are the induced morphisms of A. He shows that F and G 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 cC, there is a dD such that for every diagrammatic path formula S, either F,c and G,d are both a model for S 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 C and D whereas in the algebraic part, we need to find the isomorphisms f and g.

As a first tool for computing these isomorphisms, [4] introduced the existential theory of invertible matrices (ETIM). It contains sentences of the form

n1X1n2X2nkXk:i=1mPi(X1,,Xk).

Here nκ0 are natural numbers, 1κk, and Xκ are variables that quantify over invertible matrices in nκ×nκ. Pj is a predicate of the form

AXκ=XμBfor 1κ,μk (2)

for some matrices A and B 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 ETIM is a fragment of the existential theory of the reals (ETR). Since ETR𝖯𝖲𝖯𝖠𝖢𝖤 [2, 9], this implies that ETIM𝖯𝖲𝖯𝖠𝖢𝖤 too. The survey [10, L-Open2] asks the natural question whether ETIM is -complete.

Utilizing the 𝖯𝖲𝖯𝖠𝖢𝖤 upper bound for ETIM, 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 ETIM on an exponentially large instance to check its feasibility.

In a similar fashion, Dubut [4] solves the model checking problem for positive diagrammatic path logic in 𝖯𝖲𝖯𝖠𝖢𝖤. He first guesses the “combinatorial” part of the model checking problem, then sets up a system of equations of the form (1), and then invokes the 𝖯𝖲𝖯𝖠𝖢𝖤 algorithm for ETIM.

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 ETIM allows for an efficient randomized algorithm over the reals, i.e., ETIM𝖱𝖯, 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 genETIM. We obtain our efficient algorithm by reducing the problem to the well-known polynomial identity testing problem (PIT). [10, L-Open2] asks whether ETIM is -complete. Our results answer this question in the negative (assuming 𝖱𝖯). We also show that derandomizing the algorithm will be difficult, at least for genETIM, since this would be equivalent to derandomizing symbolic determinant identity testing (SDIT), which is a major open problem in complexity theory [8].

ETIM𝖱𝖯 implies that ETIM𝖭𝖯. In fact, we are able to show that ETIM𝔽𝖭𝖯 for all fields 𝔽. Using this new upper bound for ETIM 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 BisimFD𝔽 and posFF𝔽 respectively. We get that posFF𝔽𝖭𝖯 and BisimFD𝔽𝖭𝖤𝖷𝖯 for all fields 𝔽.

For posFF𝔽, 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 BisimFD𝔽, 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 1. 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).

2 Preliminaries

2.1 Finitary diagrams

Definition 1 ([4]).

A finitary diagram F over a field 𝔽 consists of the following data:

  1. 1.

    a finite partially ordered set (for short poset) (C,) which describes the domain,

  2. 2.

    for every cC, a natural number F(c) (which stands for the vector space 𝔽F(c)),

  3. 3.

    for every pair cc of C, a matrix F(cc) of size F(c)×F(c), with coefficients from 𝔽, such that:

    • F(cc) is the identity matrix for all cC,

    • for every triple ccc′′, F(cc′′)=F(cc′′)F(cc), 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 R between two diagrams F:CA and G:DA is a set of triples (c,f,d) where c is an object of C, d is an object of D and f:F(c)G(d) is an isomorphism of A such that:

  1. 1.

    For every (c,f,d)R and i:ccC, there exists j:ddD and g:F(c)G(d)A such that gF(i)=G(j)f and (c,g,d)R, see Figure 1.

  2. 2.

    Symmetrically, for every (c,f,d)R and j:ddD, there exists i:ccC and g:F(c)G(d)A such that gF(i)=G(j)f and (c,g,d)R.

  3. 3.

    cC:d,f:(c,f,d)R.

  4. 4.

    dD:c,f:(c,f,d)R.

Figure 1: If f identifies c with d and i is a morphism cc, then there must be an object d and an isomorphism g such that the diagram commutes.
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 BisimFD𝔽, 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.

BisimFD𝖤𝖷𝖯𝖲𝖯𝖠𝖢𝖤.

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:

S::=[n]P with n

Morphism formulae:

P::=MP|?S|¬P|P1P2|,

where M is a matrix over some field 𝔽. Here, [n]P asserts that the current object represents the vector space 𝔽n, MP “fires” a transition via the matrix M, “?” transitions back to object-level evaluation, ¬ and are standard Boolean connectives, and is the tautology.

The semantics are as follows: For a diagram F:𝒞𝒜, an object c𝒞, and an isomorphism f of 𝒜 of the form f:𝔽F(d)𝔽F(d) for some d, we define F,cS for an object formula S, and F,f,dP for a morphism formula P by induction on the structure:

  1. 1.

    F,c[n]P iff F(c)=n and F,f,cP for some isomorphism f:𝔽F(c)𝔽F(c).

  2. 2.

    F,f,cMP iff there is a cc in 𝒞 and an isomorphism f of 𝔽F(c) such that Mf=fF(cc).

  3. 3.

    ? switches back to object formulae, F,f,c?S iff F,cS.

  4. 4.

    Conjunction has the usual semantics, i.e., F,f,cP1P2 iff F,f,cP1 and F,f,cP2.

  5. 5.

    The same is true for negation, F,f,c¬P iff F,f,c⊧̸P.

  6. 6.

    Finally, is always satisfied, i.e., F,f,c always holds.

This setup closely mirrors labeled transition or path logics, but here the “labels” are matrices over a field.

Let FF denote all triples (F,c,S), where S is a finitary object formula, such that F,cS. A finitary formula is called positive if it does not contain any negations. Let posFF𝔽 denote the subset of FF corresponding to positive finitary formulas, with 𝔽 being the underlying field. [4, Thm. 9] shows the following:

Proposition 5.

posFF𝖯𝖲𝖯𝖠𝖢𝖤.

2.4 Existential theory of the reals

The existential theory of the reals (ETR) is the decision problem of determining the truth of formulas of the form

x1,,xn:(p1(x1,,xn)1 0)(pm(x1,,xn)m 0), (3)

where each pi is a multivariate polynomial with integer (or rational) coefficients, and

i{=,<,,>,}.

The complexity class is the set of all languages polynomial-time many-one reducible to the ETR 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

n1X1n2X2nkXk:i=1mPi(X1,,Xk).

Here nκ0 are natural numbers, 1κk and Xκ are variables that quantify over invertible matrices in 𝔽nκ×nκ, for some field 𝔽. Pj is a predicate of the form AXκ=XμB for 1κ,μk for some matrices A and B of matching sizes and with entries from 𝔽. ETIM𝔽 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 Pi is an arbitrary affine linear equation in the entries of the matrices X1,,Xk. We call this problem genETIM𝔽, as it is a generalization of ETIM𝔽.

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 A is nondeterministically polynomial time many-one reducible to B if there is a deterministically polynomial time computable function f with two inputs such that for all x: xA iff there is a y with |y|poly(|x|) such that f(x,y)B. We write ANPB.

Proposition 7.

If ANPB and B𝖭𝖯, then A𝖭𝖯.

We will also need nondeterministic exponential-time reductions. Exponential here means 2poly(n).

Definition 8.

A language A is nondeterministically exponential-time many-one reducible to B, if there is an exponential time computable function f with two inputs such that for all x: xA iff there is a y with |y|2poly(|x|) such that f(x,y)B. We write ANEXPB.

Proposition 9.

If ANEXPB and B𝖭𝖯, then A𝖭𝖤𝖷𝖯.

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 A1,,Ak and B1,,Bk over some field 𝔽, where for each i[k], the matrices Ai and Bi have dimension di+1×di for some integers d1,,dk+1. For 1iik, let A[i,i] denote the product AiAi1Ai and B[i,i] denote the product BiBi1Bi. Then,

 invertible matrices X1,,Xk+1:i2,XiAi1=Bi1Xi1
 for all 1iik,rkA[i,i]=rkB[i,i].

This criterion follows from the classification of representations of the Dynkin quiver An (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 (ETIM) to get upper bounds for deciding bisimilarity of finitary diagrams and model checking of finitary formulae. An instance of ETIM𝔽 is of the form n1X1n2X2nkXk:i=1mPi(X1,,Xk), where each constraint is of the form AXi=XjB for matrices A and B over 𝔽. If we consider the case of the real field, an instance of ETIM 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 ETIM is -complete. We answer this question in the negative (assuming 𝖱𝖯) by giving an efficient randomized algorithm.

Dubut uses ETIM𝔽 to verify the commutativity relations of the form (2), which explains the structure of the constraints Pi. 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 genETIM𝔽.

Theorem I (Theorem 12).

genETIM𝔽𝖱𝖯 for infinite fields 𝔽.

Proof overview.

In a genETIM instance, we have linear equations from the constraints P1,,Pm, and polynomial inequalities involving the determinants, expressing that the matrices X1,,Xk 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).

genETIM𝔽 is deterministically polynomial time equivalent to the complement of the symbolic determinant identity testing problem SDIT𝔽 for all fields 𝔽.

Proof overview.

The reduction from genETIM𝔽 to the complement of SDIT𝔽 is already implicit in the proof strategy of the above theorem. For the other direction, we essentially use the linear constraints of genETIM𝔽 to specify the affine linear entries of the SDIT𝔽 instance.

3.2 First results through our algorithm for ETIM

Dubut essentially constructs nondeterministic reductions from BisimFD and posFF to ETIM. 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 ETIM𝔽𝖭𝖯 (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).

BisimFD𝔽𝖭𝖤𝖷𝖯 for all fields 𝔽.

Theorem IV (Corollary 23).

posFF𝔽𝖭𝖯 for all fields 𝔽.

The upper bound for posFF is optimal, the one for BisimFD can be further improved for finite fields.

3.3 Complexity of bisimilarity checking for finitary diagrams

Theorem V (Theorem 21).

BisimFD𝔽𝖯𝖲𝖯𝖠𝖢𝖤 when 𝔽 is a finite field.

Proof overview.

The above reduction approach to ETIM 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 posFF is in 𝖭𝖯. Now we establish its 𝖭𝖯-completeness.

Theorem VI (Theorem 28).

posFF𝔽 is 𝖭𝖯-hard for all fields 𝔽.

Proof overview.

We reduce the classic CLIQUE problem to posFF. Given an undirected graph G and a parameter k, we have to construct a finitary diagram and a finitary formula over the diagram such that the formula is satisfiable if and only if G has a clique of size k. A finitary diagram F 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 abc in the poset, the diagram must satisfy F(bc)F(ab)=F(ac). 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 [q]M1M2Mk. 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 G has a k-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 genETIM.

Theorem VII (Corollary 33).

genETSLM is -complete.

Proof overview.

The reduction is gadget-based. We start from a special case of ETR, called ETRinv, where we are only allowed to use equations of the form x=1, x+y=z, and xy=1, cf. [1]. For every variable, we set up a 2×2-matrix and use linear equations such that the matrices have the form (x00x). Together with the fact that we quantify over special linear matrices, this enforces xx=1, that is, x=x1. This automatically also implements equations of the form xy=1. 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 PR[x1,x2,,xn] be a non-zero polynomial of total degree d>0 over an integral domain R. Let S be a finite subset of R and let r1,r2,,rn be selected independently and uniformly at random from S. Then:

Pr[P(r1,r2,,rn)=0]d|S|.

Let

n1X1n2X2nkXk:i=1mPi(X1,,Xk). (4)

be the given genETIM-instance. Recall that we quantify over invertible matrices and that P1,,Pm are affine linear equations in the entries xi,j(h) of the matrices Xh, 1i,jnh, 1hk. The following algorithm decides whether the instance is true:

Algorithm 1 genETIM by identity testing.

Input: A genETIM-instance like in Equation 4
   Output: Whether the instance is satisfiable

Theorem 12.

genETIM𝔽𝖱𝖯 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 X1,,Xk 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 0, 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 S in the Schwartz-Zippel lemma large enough, we can ensure that the error probability of one test failing is 1/(2k). This means that by the union bound, the error probability in the yes-case is bounded by 1/2, 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.

ETIM𝔽𝖱𝖯 for infinite fields 𝔽.

Since 𝖱𝖯𝖭𝖯, we have genETIM𝔽𝖭𝖯 for all infinite fields 𝔽. On the other hand, for finite fields 𝔽, we trivially have genETIM𝔽𝖭𝖯, since one can guess the solution to the genETIM-instance non-deterministically. The same is true for ETIM. Therefore, we have the following corollary.

Corollary 14.

genETIM𝔽𝖭𝖯 and ETIM𝔽𝖭𝖯 for all fields 𝔽.

Next, we show that our upper bound for genETIM is optimal in the sense that derandomizing it over rational/real fields would have dramatic consequences in complexity theory. The symbolic determinant identity problem (SDIT𝔽) is the following problem: Given a square matrix A(𝐲) whose entries are affine linear polynomials from 𝔽[y1,,ym], decide whether detA=0.

Theorem 15.

genETIM𝔽 is deterministically polynomial time equivalent to the complement of SDIT𝔽 for all fields 𝔽.

Proof.

The reduction from genETIM𝔽 to the complement of SDIT𝔽 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 SDIT for matrices with affine linear entries to SDIT for matrices with entries which are only variables or constants. Refer to the full version for this reduction. Now, given an SDIT-instance A=(ai,j) of size n×n with entries that are variables or constants, we create a genETIM-instance as follows: We quantify over one matrix X=(xi,j) of size n×n. If ai,j is a constant, then we add the equation xi,j=ai,j to the instance. For each variable y that appears in A, we let (i1,j1),,(ik,jk) be the entries of A in which it occurs. Then we add the equations xis,js=xis+1,js+1, 1s<k, to the instance. By construction detA0 iff there is an invertible matrix that satisfies the constructed equations.

Over finite fields, SDIT is 𝖼𝗈𝖭𝖯-complete. Over rational/real fields, derandomizing SDIT (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 genETIM (Theorem 12). [4, Section 7] gives an algorithm, which implicitly constructs a nondeterministic reduction from testing bisimilarity of finitary diagrams to ETIM:

Proposition 16 (implicit in [4]).

BisimFD𝔽NEXPETIM𝔽 for all fields 𝔽.

In his reduction, Dubut essentially guesses a bisimulation, that is, triples of the form (a,X,b), 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 (a,X,b), a is from the poset C of the first diagram F:CA and b is from the poset D of the second diagram G:DA. X is a “placeholder” for the isomorphism between F(a) and G(b). We then list all the ETIM-equations that need to be satisfied according to Definition 3 and use an ETIM-solver to check whether the system is feasible.

This implicitly uses the following lemma. Let S be a bisimulation between two finitary diagrams F:CA and G:DA. We define a partial order on the set of triples in S as follows:

(a,f,b)(a,f,b)aa and bb and fF(aa)=G(bb)f.
Lemma 17.

Any bisimulation S between two finitary diagrams F:CA and G:DA contains a subset SS such that S is a bisimulation and |S|=2poly(n), where |C|,|D|n.

Proof.

Consider S with the order defined above. Among all minimal elements in S, choose at most one tuple of the form (a,f,b) for each pair aC and bD. The number of tuples is bounded by n2. For every tuple (a,f,b) that was chosen in the first round and every a<a, we choose a tuple (a,f,b)S such that bb and fF(aa)=G(bb)f. Such tuples exist by the definition of bisimulation. We do the same for every b<b. In this way, we add 2n new tuples to S for each tuple added in the first round, so we add n2(2n) tuples in total in the second round. Now we go on inductively: For each tuple (a,f,b) added in the previous round and each aa, we choose one tuple (a,f,b)S such that fF(aa)=G(bb)f and add it to S. We do the same for every bb. This process comes to an end after 2n rounds. Therefore, the total size of S is bounded by |S|n2i=02n(2n)i=2poly(n). By construction, S satisfies the conditions in the definition of bisimulation.

Together with our improved upper bound for ETIM (Corollary 14) and Proposition 9, we get an improved upper bound for testing bisimilarity of finitary diagrams.

Corollary 18.

BisimFD𝔽𝖭𝖤𝖷𝖯 for all fields 𝔽.

6 A PSPACE upper bound for bisimilarity over finite fields

Next, we further improve the upper bound for BisimFD𝔽 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 ETIM will not work unless we could prove that there is a smaller system. Instead, we will (deterministically) polynomial-time reduce this problem to TQBF, the set of all true quantified Boolean formulas, which is a classical 𝖯𝖲𝖯𝖠𝖢𝖤-complete problem.

Let F:CA and G:DA be two finitary diagrams. We construct a quantified formula Φ, which is true iff F and G are bisimilar:
a1b1D(a1)X1:match(a1,b1)a2:sabove(a2,a1,b1)b2:above(b2,a1,b1)match(a2,b2)D(a2)X2:comm(a1,b1,X1,a2,b2,X2)a3:sabove(a3,a2,b2)b3:above(b3,a2,b2)match(a3,b3)D(a3)X3:comm(a2,b2,X2,a3,b3,X3)am:sabove(am,am1,bm1)bm:above(bm,am1,bm1)match(am,bm)D(am)Xm:comm(am1,bm1,Xm1,am,bm,Xm) (5)
In the formula:

  1. 1.

    ai and bi quantify over CD.

  2. 2.

    match(ai,bi) is true if ai and bi are in different posets and the dimensions of the associated vector spaces match.

  3. 3.

    sabove(ai,ai1,bi1) is true iff ai1,bi1 are from different posets and ai is strictly greater than the element ai1 or bi1 of the matching poset. (The “s” stands for “strictly”.)

  4. 4.

    above(bi,ai1,bi1) is defined in the same way, but we only require that bi is greater than the element of the matching poset.

  5. 5.

    comm(ai1,bi1,Xi1,ai,bi,Xi) is true if ai1 and bi1 are in different posets as well as ai and bi. Furthermore, the matrices Xi1 and Xi have to be chosen such that the diagram induced by the four elements commutes. Here we assume that the matrices map from F to G.

  6. 6.

    D(ai) is the dimension of the associated vector space, which is either F(ai) or G(ai).

  7. 7.

    DX quantifies over 𝔽-matrices of size D×D.

  8. 8.

    m=|C|+|D|.

A model of the formula Φ in (5) can be thought of as a tree. The root has a child for every a1CD. The node corresponding to each a1 is labeled with a triple (a1,X1,b1) such that b1 is from the other poset with a matching dimension and X1𝔽D(a1)×D(a1) is an invertible matrix. For each element a2 that is strictly above the matching element a1 or b1, we select an element b2 that is above the matching element a1 or b1 such that a2 and b2 are in different posets and the dimensions of the associated vector spaces match. Finally, we select an invertible matrix X2 such that the diagram induced by the poset elements a1,a2,b1,b2 as well as the two isomorphisms X1 to X2 commutes. (a2,X2,b2) becomes the label of the new nodes. We go on recursively like this until both poset elements of (ai,Xi,bi) are maximal. This happens at the latest when i=m=|C|+|D|. Note that when we have reached maximal elements, the predicate sabove() 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 m steps.

Lemma 19.

When the formula Φ has a model, then the diagrams F and G are bisimilar.

Proof.

We claim that the set S of labels of the tree T constructed above forms a bisimulation. For every cC there exists dD with F(c)=G(d) and an M𝔽F(c)×F(c) such that (c,M,d) is a label. This is already ensured by the first layer of nodes in T. The same is true for the symmetric statement with the roles of c and d swapped. Finally, if there is a tuple (c,M,d)S, then for any c<c, there must be a dd such that F(c)=G(d) and an invertible matrix M𝔽F(c)×F(c) such that MF(cc)=G(dd)M. This is ensured by the bi part of the formula. The same is true for the symmetric statement for any d<d. Since c<c or d<d, we can stop at depth m, since any ascending chain in C×D with the order (c,d)(c,d) iff ccdd has length at most |C|+|D|=m.

We can also prove the converse.

Lemma 20.

If F and G are bisimilar, then Φ has a model.

Proof.

Let S be a bisimulation. For each cC, we choose a tuple (c,M,d)S and label one child of the root with it. Such tuples exist by the definition of bisimulation. In the same way for every dD, we choose a tuple (c,M,d) and add a child to the root. For every child with label (c,M,d) such that either c or d are not maximal, we add for each c>c a child with tuple (c,M,d) for some dd and M such that the diagram induced by c,c,d,d commutes. Such a triple exists by the definition of bisimulation. We do the same for each d>d. This obviously creates a model of Φ.

Now we immediately get the following theorem.

Theorem 21.

BisimFD𝔽𝖯𝖲𝖯𝖠𝖢𝖤 when 𝔽 is a finite field.

Proof.

The last two lemmas show that F and G 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 posFF to ETIM. Since ETIM𝖭𝖯, this proves that posFF𝖭𝖯, improving on the 𝖯𝖲𝖯𝖠𝖢𝖤 upper bound by [4].

Theorem 22.

posFF𝔽NPETIM𝔽 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 [n]P, we need to choose an isomorphism. This will be done by ETIM. The second kind of choice is in formulas of the form MP. Here we can choose the next element c 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 nX one after another to the output formula O as well as linear equations. In the beginning, our input is a diagram F, and an object c and an object formula P. The reduction proceeds recursively along the structure of P. When P is a morphism formula, then besides F and c, we will also have a variable matrix X as an input. Our reduction simulates the semantic rules of Section 2.3 as follows:

  • if P=[n]S, then if nF(c), we reject. Otherwise, we add the quantifier nX for some fresh variable X to O and we go on with F,c,X,P.

  • if P=?S, then we go on with F,c,S.

  • if P=, then we accept and output O.

  • if P=P1P2, then we first go on with F,c,X,P1 and then with F,c,X,P2.

  • If P=MP with M being an n2×n1-matrix, then we first check whether n1=F(c). If not, then we reject. Otherwise, we guess a c with cc such that F(c)=n2. If no such c exists, then we reject. Otherwise, we add n2Y to O for some fresh variable Y as well as the equations MX=YF(cc). Go on with F,c,Y,P.

By construction (F,c)posFF iff there is an accepting path on which we output a satisfiable ETIM-instance.

Now, using Corollary 14 immediately gives us the following corollary.

Corollary 23.

posFF𝔽𝖭𝖯 for all fields 𝔽.

Our next goal will be to show 𝖭𝖯-hardness for posFF. We will achieve this by reducing Clique to posFF. For this reduction, we invent a gadget called constrained layered poset, which we outline below.

Definition 24 (Constrained Layered Poset (CLP)).

A poset C is said to be a constrained layered poset (CLP) if it satisfies the following properties:

  • Layered structure. For some k,n, we have C={ci,j|i[k],j[n]}. The elements are ordered by ci,jci,j iff i<i or (i,j)=(i,j). Thus, the poset has k layers where the i-th layer is an antichain {ci,1,,ci,n}, and every element in layer i is smaller than every element in layer i>i.

  • Set-labels. Every pair ab in the poset is labeled by a set L(a,b)U for some universe U. We will call L:C×C2U the label-function of the CLP.

  • Triplet criterion. For any triplet abc in C, we have L(a,b)L(b,c)=L(a,c).

Notice that a finitary diagram F:CA can be visualized as the poset C having every pair cc labeled by a matrix F(cc). However, in CLPs defined above, the pairs cc are labeled by sets L(c,c) instead. The idea behind this is to only focus on finitary diagrams where each matrix F(cc) is a diagonal matrix with 01 diagonal entries and its support being the index-set L(c,c). Then the triplet criterion basically captures the fact that F(ac)=F(bc)F(ab) whenever abc in C.

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 G=([n],E) and two integers k,m with mn, we can construct in polynomial time a CLP C={ci,j|i[k],j[n]} with label-function L such that for all 1i<ik and j,j[n],

|L(ci,j,ci,j)|={f(i,i,k,m)if (j,j)E,f(i,i,k,m)1otherwise,

for some appropriately chosen function f:4.

Proof.

We are given an undirected graph G=([n],E) and two integers k,m with mn. 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 C={ci,j|i[k],j[n]} as follows:

ci,jci,j iff i<i or (i,j)=(i,j).

The universe.

Let X:={eu,v,   e u,v|(u,v)[m]2} be a set of symbols and set the universe U:=[k]2×X. We also define a map η:[m]2X given by

η(u,v)={eu,vif (u,v)E,   e u,vif (u,v)E,

which we are going to use later while constructing the labels. Note that in particular, η(u,v)=   e u,v for all (u,v)[m]2[n]2 since E[n]2.

Labels.

We have to assign L(c,c)U for all comparable cc in C. First of all, we set L(c,c):=U for all cC. Now we handle the strictly comparable pairs. For i<i and j,j[n], we define

L(ci,j,ci,j):=Qi,iRi,i,jSi,i,jTi,i,j,j

where

Qi,i ={(a,a,x)[k]2×X|a<i<i<a},
Ri,i,j ={(i,a,ej,b)[k]2×X|a>i,b[m]},
Si,i,j ={(a,i,η(b,j))[k]2×X|a<i,b[m]},
Ti,i,j,j ={{(i,i,ej,j)}if (j,j)E,otherwise.

The four sets are pairwise disjoint because they have mutually exclusive constraints on the first two coordinates.

For every i<i and every j,j[n], we have
|Qi,i|=(i1)(ki)2m2,|Ri,i,j|=(ki)m,|Si,i,j|=(i1)m,|Ti,i,j,j|=𝟙(j,j)E.

Hence,

|L(ci,j,ci,j)|=2(i1)(ki)m2+(ki)m+(i1)m+𝟙(j,j)E.

Now define the function f:4 as

f(i,i,k,m)=2(i1)(ki)m2+(ki)m+(i1)m+1.

Then for all j,j,

|L(ci,j,ci,j)|={f(i,i,k,m)if (j,j)E,f(i,i,k,m)1otherwise.

Satisfaction of the triplet criterion.

It remains to show that for all abc in C,

L(a,b)L(b,c)=L(a,c).

Assume a=ci,j, b=ci,j, c=ci′′,j′′ with i<i<i′′. The sets L(ci,j,ci,j) and L(ci,j,ci′′,j′′) can be written as unions of their Q,R,S,T parts and hence their intersection is the union of the cross-intersections between these parts. The only nonempty cross-intersections are:

Qi,iQi,i′′ =Qi,i′′, Ri,i,jQi,i′′=Ri,i′′,j,
Si,i′′,j′′Qi,i =Si,i′′,j′′, Ri,i,jSi,i′′,j′′=Ti,i′′,j,j′′.

The first three equalities are easy to see. For the last equality, observe that Ri,i,j contains tuples with first coordinate i and third coordinate ej,b for b[m] while Si,i′′,j′′ contains tuples with second coordinate i′′ and third coordinate η(b,j′′) for b[m]. Therefore, their intersection can contain at most one element (i,i′′,ej,j′′) and it contains this element only when η(j,j′′)=ej,j′′, i.e., when (j,j′′)E. It follows that the intersection equals to Ti,i′′,j,j′′. Therefore,

L(ci,j,ci,j)L(ci,j,ci′′,j′′)=Qi,i′′Ri,i′′,jSi,i′′,j′′Ti,i′′,j,j′′=L(ci,j,ci′′,j′′).

As we described earlier, the idea behind using the set-labels L(c,c) for partial orders cc in CLPs is to define a finitary diagram F:CA, where each F(cc) is a diagonal matrix with 01 diagonal entries and its support being the index-set L(cc). 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 G=([n],E) and two integers k,m with mn, we can construct in polynomial time a finitary diagram F from a CLP C={ci,j|i[k],j[n]} to a category A composed of a single 𝔽-vector space and linear maps, such that for all 1i<ik and j,j[n],

rkF(ci,jci,j)={f(i,i,k,m)if (j,j)E,f(i,i,k,m)1otherwise,

for some appropriately chosen function f:4.

Proof.

Given the undirected graph G=([n],E) and the integers k,m with mn, first use Lemma 25 to construct a CLP C={ci,j|i[k],j[n]} with label-function L such that for all 1i<ik and j,j[n],

|L(ci,j,ci,j)|={f(i,i,k,m)if (j,j)E,f(i,i,k,m)1otherwise,

for some function f:4. Now we will define the finitary diagram F:CA.

Let U be the universe used in the label-function L, i.e., U=a,bCabL(a,b), and let q:=|U|. We will define the range of the diagram to be the single-object category A:={q} where the object q represents the vector space 𝔽q. Therefore, F(c)=q and F(cc)=𝐈q for all cC.

Choose any bijection ϕ:[q]U. Now, given a subset SU, define 𝐈S to be the diagonal q×q matrix whose i-th diagonal entry is 1 if ϕ(i)S and 0 otherwise. We have

rk𝐈S=|S| and 𝐈S𝐈T=𝐈ST

for all S,TU. Now for all ab in C, define

F(ab)=𝐈L(a,b).

Then for all abc in C,

F(bc)F(ab)=𝐈L(a,b)𝐈L(b,c)=𝐈L(a,b)L(b,c)=𝐈L(a,c)=F(ac),

as desired in a diagram, and for all 1i<ik and j,j[n],

rkF(ci,jci,j)=|L(ci,j,ci,j)|={f(i,i,k,m)if (j,j)E,f(i,i,k,m)1otherwise.

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 F be a finitary diagram from a poset C to a category A={q}, where the object q represents the vector-space 𝔽q for some field 𝔽. Let S=[q]M1M2Mk be an object formula for singular matrices M1,,Mk over 𝔽 of dimension q×q. Then given c1C, we have F,c1S if and only if there exists a chain c1<c2<<ck+1 in C satisfying

rk(MiMi+1Mi1)=rkF(cici)

for all 1i<ik+1.

Proof.

We have

F,c1[q]M1M2Mk if and only if

a chain c1c2ck+1 in C and matrices X1,,Xk+1GLq(𝔽):i[k],MiXi=Xi+1F(cici+1).

By Theorem 10, such matrices X1,,Xk+1 can exist if and only if for all 1i<ik,

rk(MiMi+1Mi1)=rkF(cici).

Since each Mi is singular and F(cc)=𝐈q for all cC, we conclude that c1,,ck+1 are distinct elements if the above condition is to be satisfied. Hence, we must have c1<c2<<ck+1, as desired.

Now we are ready to prove 𝖭𝖯-hardness for posFF.

Theorem 28.

posFF𝔽 is 𝖭𝖯-hard for all fields 𝔽.

Proof.

We will give a polynomial-time reduction from Clique to posFF𝔽. Given a simple undirected graph G on the vertex set [n] and a parameter k, we have to decide whether G has a k-clique. Consider the simple undirected graph G=([n+1],E) where
E={(i,j)[n+1]2|i=n+1 or j=n+1 or there is an edge between vertex i and j in G}.

Clearly, G has a k-clique if and only if G has a (k+1)-clique containing the vertex (n+1).

Now, apply Lemma 26 on the graph G with the parameters k+1 and n+1. Then we can construct in polynomial time a finitary diagram F from a CLP C={ci,j|i[k+1],j[n+1]} to a single-object category A such that for all 1i<ik+1 and j,j[n+1],

rkF(ci,jci,j)=f(i,i,k+1,n+1)𝟙(j,j)E,

for some function f:4.

Notice that if we applied Lemma 26 on the complete graph on (n+1) vertices instead with the same parameters, then we would obtain another finitary diagram F from the same CLP C to some single-object category A such that for all 1i<ik+1 and j,j[n+1],

rkF(ci,jci,j)=f(i,i,k+1,n+1),

because (j,j) would always be an edge. We use the second diagram F to define the finitary formula in the posFF-instance we create, while the first diagram F will be the diagram in it. Let us set Mi:=F(ci,1ci+1,1) for 1ik. Then for all 1i<ik,

rk(MiMi+1Mi1)=rkF(ci,1ci,1)=f(i,i,k+1,n+1).

Note that the single-object categories A and A 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 A and A are equal to the same category {q}. Hence, each Mi is a q×q matrix.

Now define the object formula S:=[q]M1M2Mk. We claim that F,c1,n+1S iff G has a (k+1)-sized clique containing the vertex n+1.

Using Lemma 27, we have F,c1,n+1S iff there exists a chain c1,b1=c1,n+1<c2,b2<<ck+1,bk+1 in C (note that any chain of k+1 increasing elements in C must pick exactly one element from each layer) such that for all 1i<ik,

rk(MiMi+1Mi1)=rkF(ci,bici,bi),
which means f(i,i,k+1,n+1)=f(i,i,k+1,n+1)𝟙(bi,bi)E,
which means (bi,bi)E.

Therefore, F,c1,n+1S
iff there is a (k+1)-clique in G formed by the vertices n+1,b2,b3,,bk+1
iff there is a k-clique in G formed by the vertices b2,,bk+1.

Hence, the problem Clique reduces to posFF𝔽, 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 1. 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 1. In fact, we will show that the generalized existential theory of special linear matrices genETSLM is -complete.

First, we define the -complete problem ETRinv, which we will reduce to genETSLM.

Definition 29.

In ETRinv, we are given formulae of the form x1xn:c1c2c3cm, where all ci are of one of the following forms:

x=1,x+y=z,xy=1

Here, x,y and z 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 ETRinv 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 [12,2].

Proposition 30.

ETRinv 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 genETSLM. In fact, our proof will show that this is true even if we restrict ourselves to two kinds of linear equations in genETSLM, namely matrix equations of the form XA=BY and XA=YB. It remains an interesting open question whether only the first type is sufficient to prove -hardness, that is, whether ETSLM is already -complete.

8.1 Representing variables

We store variables using 2×2-matrices (xr1r2x). By adding the constraint

(xr1r2x)(1000) =(1000)(xr1r2x),

which is equivalent to

(x0r20) =(xr100),

we ensure that r1=r2=0. x and x are not constrained by this equation. However, since we quantify over matrices of determinant 1, we get the additional constraint xx=1. This ensures that x can never be zero and also forces that x is the inverse of x.

8.2 Setting variables to 𝟏

We first show how to simulate equations of the type x=1. For this, we have a special 1×1-matrix E. Since we quantify only over matrices of determinant 1, simply quantifying over E ensures E=(1). Now we take the 2×2-matrix (x00x) that stores x and add the constraint:

E(10) =(10)(x00x)
(10) =(x0)

This forces x=1, and henceforth x=1.

8.3 Equations of the form 𝒙𝒚=𝟏

Given the two representations of x and y, (x00x) and (y00y), we need to ensure that x=y, since we already know that xx=1 (and yy=1). This is achieved by the following constraint:

(x00x)(0110) =(0110)(y00y)
(0xx0) =(0yy0).

Note that the two equations xx=1 and yy=1 then also enforce y=x, 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 r, for which we set up a 2×2-matrix as above. Second, for each addition, we have a 4×4-matrix H=(hi,j) over which we will quantify. The difficult part is to cope with the constraint that the determinant of H has to be 1.

First we set up the equation

(h1,1h1,2h1,3h1,4h2,1h2,2h2,3h2,4h3,1h3,2h3,3h3,4h4,1h4,2h4,3h4,4)(10000000) =(10000000)(r00r)
(h1,10h2,10h3,10h4,10) =(r0000000).

This constrains the first column of the matrix H and leaves all other columns unconstrained. In a similar way, we constrain the second column:

(h1,1h1,2h1,3h1,4h1,2h2,2h2,3h2,4h3,1h3,2h3,3h3,4h4,1h4,2h4,3h4,4)(00100000) =(10100000)(x00x)
(h1,20h2,20h3,20h4,20) =(x0x00000).

By adding two similar constraints for the third and the fourth column involving y and z, respectively, we can achieve that H can only take the form

H =(rxyz0x0000y0000z) (6)

The reason for this rather involved set of equations is that it ensures that detH=1 can be achieved.

Observation 31.
  1. 1.

    detH=rxyz.

  2. 2.

    In any solution to the equations constructed so far, x0, y0, and z0.

  3. 3.

    Since r does not appear anywhere else, we can set r=1/(xyz) to achieve detH=1.

We set up a second matrix T similar to H. We can take the same variable r and also take the same set of equations, but we transpose each equation on both sides. Since the 2×2-matrices representing the variables are diagonal, they equal their transpose. Therefore, in any solution to the equations, T will be the transpose of H, i.e.,

T=HT=(r000xx00y0y0z00z).

In particular, detT=detH=1. Finally, we set up the equation that simulates the addition using the matrices H and T. It is the only equation that is of the form XA=YB.

(rxyz0x0000y0000z)(0111) =(r000xx00y0y0z00z)(0111) (7)
(x+yzxyz) =(0xyz).

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.

ETRinvPgenETSLM.

Proof.

Assume that x1xk:c1cm is a yes-instance of ETRinv. Let ξ1,,ξk be a satisfying assignment. For each variable xi, we set up a 2×2-matrix as in Section 8.1. If we set the diagonal entries to ξi and ξi1 and the off-diagonal entries to 0, then the determinant is 1 and the equations in Section 8.1 are satisfied. If we have an equation xi=1, then ξi=1 and the 2×2-matrix corresponding to xi satisfies the equations of Section 8.2 by construction. If we have an equation cμ of the form xixj=1, then ξi=1/ξj and the equations of Section 8.3 are again satisfied by construction. Finally, if we have an equation cμ of the form xi+xj=xh, then we first set the values of H as depicted in (6) (substituting ξi,ξj,ξh for x,y,z). Since ξ1,,ξk is a feasible solution, all of them are nonzero. Therefore, we can choose r in such a way that the determinant of H is 1. r is only used for this addition. The entries of the 2×2-matrix for r are set as above. In the same way, we can choose the values for T. Since ξi+ξj=ξh also the equations (7) is satisfied. Thus we have a yes-instance for genETSLM.

Conversely, assume that the genETSLM-instance constructed above is a yes-instance. We claim that the values of the (1,1)-entries ξi of the 2×2-matrices corresponding to x1,,xk are a satisfying solution to the ETRinv-instance. All ξi are nonzero, since the determinants are 1. The equations c1,,cm are all satisfied, since for each cμ we set up a gadget that ensures this.

The reduction is obviously polynomial-time computable.

Corollary 33.

genETSLM 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 genETIM, since it is equivalent to the complement of symbolic determinant identity testing. Is the subproblem ETIM equivalent to the complement of some identity testing problem? Or is there an efficient deterministic algorithm? In contrast to genETIM, 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.