1 Introduction

Given a class \(\mathcal {A}\) of algebraic structures, the equational theory \(\mathsf{Eq}(\mathcal {A})\) of \(\mathcal {A}\) consists of all identities valid in all members of \(\mathcal {A}\), and so in the variety \(\mathsf{V}(\mathcal {A})\) generated by \(\mathcal {A}\). The associated decision problem asks, for any given identity, whether or not it is in \(\mathsf{Eq}(\mathcal {A})\). This problem is also known as the equivalence problem for \(\mathcal {A}\). The triviality problem for \(\mathcal {A}\) is to decide for each given finite presentation whether the associated freely generated member of \(\mathsf{V}(\mathcal {A})\) is trivial or not. For a survey of decision problems in Universal Algebra see [6].

Generalizing the well known Boolean case, in [16] the following decision problems have been considered. Refutability (corresponding to “weak satisfiability” in [16]) \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {A}\): Given terms \(t({\bar{x}}),s({\bar{x}})\) is there \(A \in \mathcal {A}\) and \({\bar{a}}\) in A such that \(A\models t(\bar{a}) \ne s({\bar{a}})\). Satisfiability (corresponding to “strong satisfiability” in [16]) \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {A}\): Given terms \(t_i({\bar{x}}),s_i({\bar{x}})\), \(i=1,\ldots , n\), is there \(A \in \mathcal {A}\) and \({\bar{a}}\) in A such that \(A\models t_i({\bar{a}})=s_i({\bar{a}})\) for all i and such that the entries of \({\bar{a}}\) generate a non-trivial subalgebra (this is to exclude trivial assignments when dealing with lattices). These decision problems are polynomial-time (shortly “p-time”) equivalent to the complement of the decision problem for the equational theory and the triviality problem for \(\mathcal {A}\), respectively. We write \({{\,\mathrm{\mathrm{SAT}}\,}}_A\) and \({{\,\mathrm{\mathrm{REF}}\,}}_A\) if \(\mathcal {A}=\{A\}\).

According to Proposition 1.16 and the proof of Theorem 2.11 in [16], \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) and \({{\,\mathrm{\mathrm{REF}}\,}}_L\) are p-time equivalent and \(\mathcal {NP}\)-hard whenever L is a simple modular ortholattice of finite height. We are going to derive in Section 3\(\mathcal {NP}\)-hardness of \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) and \({{\,\mathrm{\mathrm{REF}}\,}}_L\) for simple complemented modular lattices L (bounds 0, 1 in the signature or not) of finite height. The key is the case of the 2-element lattice \(\mathbf{2} \). \(\mathcal {NP}\)-completeness of \({{\,\mathrm{\mathrm{REF}}\,}}_L\) for \(L=\mathbf{2} \) and even any finite lattice L is Theorem 3.3 in Bloniarz, Hunt, and Rosenkrantz [5]. For \(L=\mathbf{2} \) we rely on a simple proof due to Ross Willard.

For the subspace lattice \({{\,\mathrm{\mathsf L}\,}}(V_F)\) of an F-vector space, we show in Section 4 that both \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(V_F)}\) and \({{\,\mathrm{\mathrm{REF}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(V_F)}\) are p-time equivalent to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) provided that \(3 \le \dim V_F < \infty \). Here, for a ring R, the problem \({\mathrm{FEAS}_{\mathbb {Z},R}}\) is to decide, for any finite list of terms \(p_i({\bar{x}})\), in the signature of rings with 0, 1, \(+,-,\cdot \), whether there is a common zero within R. In case of commutative R, the \(p_i(\bar{x})\) can be replaced by multivariate polynomials \(p_i\) in commuting variables and with integer coefficients.

Focus of [16] was on the class \(\mathcal {H}\) of all finite dimensional real and complex Hilbert spaces (that is, Euclidean and unitary spaces) and the class \(\mathcal {L}\) of subspace ortholattices \(\mathsf{L}(H)\), \(H \in \mathcal {H}\); that is, \(\mathsf{L}(H)\) is the lattice of all linear subspaces of H, with constants 0 and H, and orthocomplementation \(U \mapsto U^\perp \), the orthogonal of U. Here, for any fixed \(H\in \mathcal {H}\), \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathsf{L}(H)}\) and \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathsf{L}(H)}\) are both decidable due to Tarski’s decision procedure for \(\mathbb {R}\); for \(\dim H\ge 3\), the complexity has been determined, in [16, Theorem 2.7], within the Blum-Shub-Smale model of non-deterministic computation over the reals: both problems are complete for BP\(\mathcal {NP}^0_\mathbb {R}\), the part of the model which allows only integer constants and binary instances. This class contains \(\mathcal {NP}\) and is, within this model, polynomial-time equivalent to the problem \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\), see [16] for references.

The decision problem for \(\mathsf{Eq}(\mathcal {L})\) was shown solvable in [9, 12] with \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}} \in \mathrm{BP}\mathcal {NP}^0_\mathbb {R}\) in [16, Theorem 4.4]. On the other hand, \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {L}}\) was shown undecidable in [17], as well as \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {C}\) for any class \(\mathcal {C}\) of (expansions of) modular lattices containing some subspace lattice \(\mathsf{L}(V_F)\) of a vector space \(V_F\) where \(\dim V_F\) is infinite or contains all \(\mathsf{L}(V_F)\) where F is of characteristic 0 and \(\dim (V_F)\) finite.

The main objective of the present note was to answer [16, Question 4.5], namely to show (in Section 6) that \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\) is p-time equivalent to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\). In Section 7, \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) is also shown p-time equivalent to \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {R}\), where \(\mathcal {R}\) is the class of all \(*\)-rings (with pseudo-inversion) \({{\,\mathrm{\mathsf{End}}\,}}(H)\) of endomorphisms of H, \(H \in \mathcal {H}\). This result extends to the additive category of finite dimensional Hilbert spaces, enriched by adjunction and pseudo-inversion.

As general references for lattice theory we refer to [3, 4, 8, 26, 29], for decision problems to [7]. Non-determinism in real computation will not enter into our discussion, explicitly. That is, decision problems are understood in the sense of Logic and related by p-time reductions, given by translations of formulas to be carried out by a Turing machine in polynomial-time. In particular, this applies when considering \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\).

Thanks are due to referees and editor for detailed corrections and valuable suggestions, in particular the hint to [5]. Thanks are also due to Martin Ziegler for introduction to and collaboration on complexity of decision problem concerning subspace ortholattices of Hilbert spaces.

Best wishes go to Bill, J.B., and Ralph; also sincere thanks for hospitality, inspiring discussions, and excellent refereeing.

2 Preliminaries

2.1 Basic equations and unnested terms

Translation from one equational language into another means, in essence, to translate basic equations. Also, reducing a problem first to one formulated via basic equations avoids possible exponential blowup in translations. This technique is well known, compare [7].

A basic equation is of the form \(y=x\) or \(y=f({\bar{x}})\) where f is a fundamental operation symbol and \({\bar{x}}\) a string of variables, the length of which is the arity of f. A simple formula \(\phi ({\bar{x}})\) in (a string of free) variables \({\bar{x}}\) is of the form \(\exists {\bar{u}}\,\phi _0({\bar{x}}, {\bar{u}})\) where \(\phi _0({\bar{x}},{\bar{u}})\) is a conjunction of basic equations in variables \({\bar{x}},{\bar{u}}\).

Given a first order language, the set \(\Omega ({\bar{x}})\) of circuits in input variables \({\bar{x}}\) and output variables \({\bar{y}}\) (here, \({\bar{x}}\) and \({\bar{y}}\) are lists without repetition) consists of pairs \((\phi ,{\bar{y}})\), where \(\phi \) is a formula, according to the following inductive definition:

  • \((\emptyset ,{\bar{x}}) \in \Omega ({\bar{x}})\) for the empty conjunction \(\emptyset \).

  • Assume that \((\phi ,{\bar{y}}) \in \Omega ({\bar{x}})\) and that \(\psi \) is an equation \(y=f(y_1,\ldots ,y_m)\) where f is an m-ary fundamental operation, each \(y_i\) occurs in \({\bar{y}}\), and y is a new variable; then \((\phi ',{\bar{y}}') \in \Omega ({\bar{x}})\) where \(\phi '\) is the conjunction of \(\phi \) and \(\psi \) and where \({\bar{y}}'\) is obtained from \({\bar{y}}\) by possibly omitting some of the \(y_i\) occurring in \(\psi \) and by adding y.

This is just a variant of the concept of algebraic circuit. Let the set \(\Theta ({\bar{x}})\) of unnested terms consist of the \((\emptyset ,x_i)\) and the \((\phi ,y)\in \Omega ({\bar{x}})\), that is, those with singleton output variable y. For \(T=(\phi _T,y_T) \in \Theta ({\bar{x}})\), that is with input variables \({\bar{x}}\) and output variable \(y_T\), let \({{\bar{u}}}_T\) denote the variables occurring in \(\phi _T\) which are distinct from \(y_T\) and the \(x_i\). Then \(\phi _T\) is of the form \(\phi ({\bar{x}},y_T,{{\bar{u}}}_T)\) and for any algebraic structure A (of the relevant similarity type) and assignment \(\bar{x} \mapsto {\bar{a}}\) in A there is a unique \(b \in A\) such that \(A\models \phi _T({\bar{a}},b,{\bar{c}})\) for some (also unique) \({\bar{c}}\) in A. Accordingly, we write \(T=T({\bar{x}})\) and \(T({\bar{a}})=b\) and use \(T({\bar{x}})=y\) as an abbreviation for the simple formula \(\exists y_T\exists {{\bar{u}}}_T.\,\phi _T({\bar{x}},y_T,{{\bar{u}} }_T) \wedge y_T=y\). The length of terms \(t({\bar{x}})\) and unnested terms \(T({\bar{x}})\) will be denoted by \(|t({\bar{x}}) |\) and \(|T({\bar{x}})|\). Let \(o(t({\bar{x}}))\) and \(o(T({\bar{x}}))\) denote the number of occurrences of variables from \({\bar{x}}\) in \(t({\bar{x}})\) and \(T({\bar{x}})\), respectively. Observe that all variables listed in \({\bar{x}}\) are considered to occur in \(t({\bar{x}})\).

Fact 2.1

There is a map \(\theta \), associating in p-time with a term \(t(\bar{x})\) an unnested term \(T({\bar{x}})\), of length linear in that of \(t({\bar{x}})\), such that \(t({\bar{x}})=y\) is equivalent to \(T({\bar{x}})=y\) and such that \(o(T({\bar{x}}))=o(t({\bar{x}}))\). For any unnested term \(T({\bar{x}})\) there is a term t(x) such that \(\theta (t(\bar{x}))=T({\bar{x}})\).

Thus, \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {A}}\) reduces in p-time to its analogue \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {A}}\) for unnested terms: to decide for any \(T({\bar{x}})\) and \(S({\bar{x}})\) whether \(T({\bar{a}})\ne S({\bar{a}})\) for some \(A\in \mathcal {A}\) and \({\bar{a}}\) in A.

The decision problem \({{\,\mathrm{\mathrm{sSAT}}\,}}_{\mathcal {A}}\) is to decide for any conjunction \(\phi _0({\bar{x}}, {\bar{u}})\) of basic equations whether there are \(A\in \mathcal {A}\) and \({\bar{a}}\) in A such that the members of \({\bar{a}}\) generate a non-trivial subalgebra of A and such that \(A \models \exists {\bar{u}}.\,\phi _0({\bar{a}},{\bar{u}})\).

Fact 2.2

The decision problem \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {A}}\) reduces in p-time to \({{\,\mathrm{\mathrm{sSAT}}\,}}_{\mathcal {A}}\). In the presence of constants \(0\ne 1\) the problems are p-time equivalent.

2.2 Feasibility

We consider rings with basic operations multiplication, addition, and subtraction and constants 0, 1. For a ring R, the decision problem \({\mathrm{FEAS}_{\mathbb {Z},R}}\) is to decide, for any finite list of terms \(p_i(\bar{x})\), whether there is a common zero within R, that is \({\bar{r}} \in R\) such that \(R\models \bigwedge _i p_i({\bar{r}})=0\). Thus, unless R is a zero ring, this is just the problem \({{\,\mathrm{\mathrm{SAT}}\,}}_R\).

According to [16, Observation 1.9], this decision problem is p-time equivalent to the analogous decision problem where the \(p_i({\bar{x}})\) are multivariate polynomials in non-commuting variables (commuting variables in case of commutative R) and with integer coefficients, each polynomial given as list of monomials and coefficients.

The reduction is first from a list of terms \(p_i({\bar{x}})\), via Fact 2.1, to the existentially quantified sentence obtained from the formula \(\bigwedge _i(\phi _i({\bar{x}},y_i,{\bar{z}}_i)\,\wedge \, y_i=0)\) where the \(\phi _i({\bar{x}},y_i,{\bar{z}}_i)\) are unnested terms, each with separate auxiliary variables; and then replacing in the latter each equation of the form \(u=f({\bar{v}})\), f a fundamental operation symbol, by \(u-f({\bar{v}})=0\).

2.3 Retractive terms

The hardness results to be derived here rely on the technique for reducing word problems to free word problems, as developed by Ralph Freese [11] (in a much more sophisticated context). Denote by \(F(\mathcal {A};\pi )\) the \(\mathcal {A}\)-algebra freely generated within \(\mathsf{V}(\mathcal {A})\) under the presentation \(\pi =({\bar{g}},R)\), that is with system \({\bar{g}}=(g_1,\ldots ,g_n)\) of generator symbols and set R of relations. Let \(\pi ^+\) be obtained by extending R to a set \(R^+\) of relations in the same generator symbols \({\bar{g}}\). Now, consider the canonical homomorphism \(\phi :F(\mathcal {A};\pi )\rightarrow F(\mathcal {A};\pi ^+)\). \(\phi \) is a retraction with section homomorphism \(\rho :F(\mathcal {A};\pi ^+)\rightarrow F(\mathcal {A};\pi )\) if and only if there is a system of terms \(t_i({\bar{x}})\) such that for any system \(\bar{a}=(a_1,\ldots ,a_n)\) in any \(A \in \mathcal {A}\), one has the following:

  • if \({\bar{a}}\) satisfies the relations R, then \((t_1({\bar{a}}), \ldots ,t_n({\bar{a}}))\) satisfies the relations \(R^+\);

  • if \({\bar{a}}\) satisfies the relations \(R^+\), then \(t_i({\bar{a}})=a_i\) for all i.

Here, \(\rho \) and the \(t_i\) are related by \(\rho \phi g_i =t_i(\bar{g})\) for \(i=1,\ldots , n\). Such system of terms will be called retractive for \((\pi ,\pi ^+)\) within \(\mathsf{V}(\mathcal {A})\). Retractions can be composed in steps: If \(\pi '\) is obtained from \(\pi ^+\) by adding relations and if the \(s_i({\bar{x}})\) are retractive for \((\pi ^+,\pi ')\) within \(\mathsf{V}(\mathcal {A})\) then so are the \(s_i(t_1({\bar{x}}), \ldots )\) for \((\pi ,\pi ')\).

As an illustration consider generator symbols \({\bar{g}}=(g_1,g_2,g_3,g_4)\), \(\mathcal {A}\) the variety of modular lattices, and R the relations \(g_1 \le g_2\) and \(g_3 \le g_4\). Obtain \(R^+\) by adding the relation \(g_2\cdot g_4 \le g_1 \cdot g_3\). Retractive terms for passing from R to \(R^+\) are given by \(t_1= x_1+x_2\cdot x_4\), \(t_2=x_2\), \(t_3=x_3+x_2\cdot x_4\), and \(t_4=x_4\).

2.4 Complemented modular lattices

We consider lattices L with bounds 0, 1. The complexity results to be derived are valid if the bounds are considered constants in the signature as well if they are not. L is modular if \(a\cap (b +c)= a\cap b +c\) for all abc with \(c \le a\) – we write \(a+b\) for joins, \(a \cap b\) for meets and \(\cap \) has binding priority over \(+\). Also, we use \(\sum _i a_i\) and \(\bigcap _i a_i\) for multiple joins and meets. Elements \(a_1, \ldots ,a_n\) of an interval [uv] are independent in [uv] if \(a_i\cap \sum _{j\ne i}a_j=u\) for all i; in this case, we write \(\sum _i a_i=a_1 \oplus _u \ldots \oplus _u a_n\) and, if \(u=0\), \(\sum _i a_i=a_1\oplus \ldots \oplus a_n\). A lattice L is complemented if for any \(a \in L\) there is \(b\in L\) such that \(a\oplus b=1\). A modular lattice has height d if some (every) maximal chain has \(d+1\) elements.

Any complemented modular lattice L of finite height is isomorphic to a direct product of simple ones. Thus, the decision problems \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) and \({{\,\mathrm{\mathrm{REF}}\,}}_L\) break down to the case of simple L. Up to isomorphism, the latter are the subspace lattices of irreducible \((d-1)\)-dimensional projective spaces. With exceptions for \(d\le 2\), these lattices are isomorphic to lattices \(\mathsf{L}(V_F)\) of all subspaces of (left) F-vector spaces \(V_F\), \(\dim V_F=d\), the case of most interest for us. Thus, one may read all of the following in the context of Linear Algebra.

2.5 Frames

Reducing arithmetic to modular (ortho-)lattices is most conveniently done via von Neumann frames and their coordinate rings, in particular if generators and relations may be used on the lattice side; cf. [25].

A d-frame \({\bar{a}}\) in a modular lattice consists of elements \(a_\bot \le a_\top \) and \(a_1,a_j,a_{1j} (1<j\le d)\) in the interval \([a_\bot ,a_\top ]\) such that \(a_\top =a_1 \oplus _{a_\bot } \cdots \ \oplus _{a_\bot } a_d\) and \(a_1 \oplus _{a_\bot } a_{1j}=a_j\oplus _{a_\bot } a_{1j}=a_1+a_j\) for \(1<j\le d\).

Given a d-frame \({\bar{a}}\) in a modular lattice L of height d, if \(a_i>a_\bot \) for some i, then \(a_j>a_\bot \) for all j, whence \([a_\bot ,a_\top ]\) has height at least d and so \(a_\bot =0\) and \(a_\top =1\). In this case the frame is called spanning; the \(a_i\) are independent atoms and L is simple and complemented. On the other hand, if \(a_i=a_\bot \) for one i then \(a_j=a_\bot \) for all j and \(a_\bot =a_\top \); such frame is called trivial. To summarize, a d-frame in a height d modular lattice is either spanning or trivial. Also, if L is complemented and simple then any atom \(a_1\) is part of some (many, in general) spanning d-frame. Indeed, the \(a_i\) can be chosen so that \(a_1, \ldots ,a_d\) are independent atoms and the \(a_{1j}\) are axes of perspectivity.

For \(\dim V_F=d\), the non-trivial d-frames in \({{\,\mathrm{\mathsf L}\,}}(V_F)\) have \(a_\bot =0\), \(a_\top =V\); and \({\bar{a}}\) is a non-trivial d-frame if and only if there is a basis \(e_1, \ldots ,e_d\) of \(V_F\) such that \(a_i=e_iF\), and \(a_{1j}= (e_1-e_i)F\). Thus, the automorphism group of \({{\,\mathrm{\mathsf L}\,}}(V_F)\) acts transitively on the set of such d-frames. The following is well known and easy to prove.

Fact 2.3

For any d-frame \({\bar{a}}\) and \(a_\bot \le b_1 \le a_1\), the \(b_j:=(b_1+a_{1j})\cap a_j\), \(b_{1j:}=(b_1+b_j)\cap a_{1j}\), form a d-frame \({\bar{b}}\) with \(b_\bot :=a_\bot \) and \(b_\top :=\sum _ib_i\) and such that \({\bar{b}}={\bar{a}}\) if \(b_1=a_1\).

Retractive terms for constructing (equivalent variants of) d-frames in modular lattices have been provided by Huhn [20] and Freese [10]; here, using a list \({\bar{z}}\) of variables for the elements of the d-frame to be obtained, we denote such terms by \(a_i({\bar{z}}), a_{1j}({\bar{z}}), a_\bot ({\bar{z}}), a_\top ({\bar{z}})\). The following is a special case of [18, Fact 5.2]. For convenience, we provide a proof.

Lemma 2.4

For any d there is a term \(\delta _d(x,{\bar{z}})\) such that for any spanning d-frame \({\bar{a}}\) in a height d modular lattice L and any \(b \in L\) one has \(\delta _d(b,{\bar{a}})=1\) if \(b \ne 0\); moreover \(\delta _d(0,{\bar{a}})=0\).

Proof

Define the lattice terms \(z_{ii}'(x,{\bar{z}})= (x+\sum _{k\ne i}z_k)\cap z_i\) and \(z_{ij}'(x,{\bar{z}})=(z'_{ii}(x,{\bar{z}}) + z_{ij})\cap z_j\) for \(j\ne i\). Observe that for any b and spanning frame \({\bar{a}}\) in L one has \(z_{ij}'(b,{\bar{a}})=a_j\) if \(b \not \le \sum _{k\ne i}a_k\), \(z_{ij}'(b,{\bar{a}})=0\) otherwise. Now, put \(\delta _d(x,{\bar{z}})= \sum _{i,j=1}^d z_{ij}'(x,{\bar{z}})\). \(\square \)

2.6 Coordinate ring

Fix \(d\ge 3\). For each operation symbol \(+,-,\cdot ,0,1\) in the signature of rings and each term \(t({\bar{y}})\) defining the associated operation, there is a lattice term \(\tilde{t}({\bar{y}}, {\bar{z}})\) such that each variable \(y_i\) occurs only once in \(\tilde{t}({\bar{y}}, \bar{z})\) and such that the following holds: For each vector space \(V_F\) and d-frame \({\bar{a}}\) in \({{\,\mathrm{\mathsf L}\,}}(V_F)\) the set

$$\begin{aligned}R({\bar{a}})=\{ r \in \mathsf{L}(V_F)\mid r \oplus _{a_\bot } a_2= a_1+ a_2, \,r \cap a_2=a_\bot \}\end{aligned}$$

becomes a ring, the coordinate ring of \({\bar{a}}\), with operations defined by \(\tilde{t}({\bar{y}}, {\bar{a}})\), cf. [10, 11]. For example, for \(t(y_1,y_2)= y_1 \cdot y_2\) one can choose \(\tilde{t}(y_1,y_2,{\bar{z}})= y_1 \otimes _{{\bar{z}}} y_2\) given as

$$\begin{aligned}{}[(y_2+z_{23})\cap (z_1+z_3)+ (y_1 +z_{13})\cap (z_2+z_3)] \cap (z_1+z_2).\end{aligned}$$

Moreover, if \(a_\bot =0\) then there is a (unique) linear isomorphism \(\varepsilon _{{\bar{a}}}: a_1 \rightarrow a_2\) such that \( a_{12}=\{v-\varepsilon _{{\bar{a}}} v\mid v \in a_1\}\) as well as a ring isomorphism \(\omega _{{\bar{a}}}:{{\,\mathrm{\mathsf{End}}\,}}( a_1) \rightarrow R({\bar{a}})\) given by \(f\mapsto \{v-\varepsilon _{{\bar{a}}} fv\mid v \in a_1\}\). If \(a_\bot =a_\top \) then \(R({\bar{a}})\) is a zero ring. If \({\bar{a}}\) is non-trivial and \(\dim V_F=d\), then \(R({\bar{a}})\) is isomorphic to F. We write \(\otimes _{{\bar{a}}}\) and \(\ominus _{{\bar{a}}}\) for multiplication and subtraction. In particular, the zero is \(a_1\), the unit is \( a_{12}\), and \(r \in R({\bar{a}})\) is invertible if and only if \(r \oplus _{a_\bot } a_1= a_1+ a_2\). Due to the above mentioned unique occurrence of variables one has the following.

Fact 2.5

With any ring term \(p({\bar{x}})\) one associates in p-time a lattice term \(\tilde{p}({\bar{x}},{\bar{z}})\) such that for any d-frame \({\bar{a}}\) in any \({{\,\mathrm{\mathsf L}\,}}(V_F)\) one has \(\tilde{p}({\bar{r}},{\bar{a}})=p({\bar{r}})\) for all \({\bar{r}}\) in \(R({\bar{a}})\).

3 \(\mathcal {NP}\)-hardness in complemented modular lattices

We will deal with simple complemented modular lattices L of finite height \(d\ge 1\) (that is, L isomorphic to the subspace lattice of a \((d-1)\)-dimensional irreducible projective space) and varieties generated by such lattices. Here, the requirement that \({\bar{a}}\) generates a non-trivial sublattice amounts to \({\bar{a}}\) being non-constant.

Observe that, for fixed finite L, evaluating lattice terms can be done in time polynomial in the length of the terms. On the other hand, any n-generated sublattice of L of height at most 2 is isomorphic to \(\mathbf{2}\) or, for some \(m \le n\), to the height 2-lattice \(M_m\) with m atoms. Thus, if L is finite or of height 2 then both \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) and \({{\,\mathrm{\mathrm{REF}}\,}}_L\) are in \(\mathcal {NP}\).

For lattices L, the case where the bounds are constants and the case where they are not will not be distinguished in notation, so that all results may be read both ways. Observe in this context that the decision problems \({{\,\mathrm{\mathrm{SAT}}\,}}\) and \({{\,\mathrm{\mathrm{REF}}\,}}\) associated with the latter are subproblems of the former, obviously.

3.1 Distributive lattices

Theorem 3.1

[5, 30]. For the 2-element lattice \(\mathbf{2}\), both \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathbf{2}\) and \({{\,\mathrm{\mathrm{REF}}\,}}_\mathbf{2}\) are \(\mathcal {NP}\)-complete. In particular, the decision problem for the equational theory of distributive lattices is \(\mathrm{co}\mathcal {NP}\)-complete.

Proof

We include the proof, due to Ross Willard, for \(\mathcal {NP}\)-hardness of \({{\,\mathrm{\mathrm{REF}}\,}}_\mathbf{2}\) in the case without constants. The claim for \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathbf{2}\) follows from Proposition 3.2, below. Given a string \({\bar{x}}=(x_1,\ldots , x_n)\) of variables, choose new variables \(y_i,z\) and put \({\bar{y}}=(y_1,\ldots , y_n)\). Define the lattice terms \(\lambda _i({\bar{x}},{\bar{y}},z)\) by recursion: \(\lambda _0=z\), \(\lambda _{i+1}=\lambda _i \cap (x_i+y_i)+ x_i\cap y_i\). Observe that in \(\mathbf{2}\) the polynomial function \(\lambda _n({\bar{a}},{\bar{b}},z)\) is identity if \(a_i\ne b_i\) for all i, constant otherwise. Also observe that \(\lambda _n\) has length linear in n and a single occurrence of z.

Now, consider a boolean term \(t({\bar{x}})\) without constants 0, 1 and in negation normal form. Replacing each occurrence of \(x_i^\perp \) (where \(^\perp \) denotes negation) by \(y_i\), one obtains a lattice term \(t^\#({\bar{x}},{\bar{y}})\) such that \(t({\bar{a}})= t^\#({\bar{a}},\bar{b})\) holds in \(\mathbf{2}\) if \(b_i=a_i^\perp \) for all i. Consider the lattice equation \(\varepsilon =\varepsilon ({\bar{x}},{\bar{y}})\) given as

$$\begin{aligned}\lambda _n({\bar{x}},{\bar{y}},t^\#({\bar{x}},{\bar{y}}))=\lambda _n({\bar{x}},\bar{y},x_1\cap y_1). \end{aligned}$$

Thus, \(\varepsilon \) has length linear in that of \(t({\bar{x}})\). We claim that \(t({\bar{a}})=1\) for some \({\bar{a}}\) in \(\mathbf{2}\) if and only if \(\varepsilon ({\bar{a}},{\bar{b}})\) fails for some \({\bar{a}},{\bar{b}}\) in \(\mathbf{2}\). Indeed, given \({\bar{a}},{\bar{b}}\) such that \(a_i \ne b_i\), that is \(b_i=a_i^\perp \), for all i, one has \(\lambda _n({\bar{a}}, {\bar{b}},t^\#({\bar{a}}))= t({\bar{a}})\) while \(\lambda _n({\bar{a}},{\bar{b}},a_1\cap b_1)= a_1\cap b_1=0\). Thus, if there is \({\bar{a}}\) such that \(t({\bar{a}})=1\) choose \(b_i=a_i^\perp \) for all i to refute \(\varepsilon \). Conversely, assume \(t({\bar{a}})\ne 1\), that is \(t({\bar{a}})=0\) for all \({\bar{a}}\). Then \(\mathbf{2} \models \varepsilon ({\bar{a}},{\bar{b}})\) for all \({\bar{b}}\): giving both sides value 0 if \(a_i\ne b_i\) for all i, the constant value of \(\lambda _n({\bar{a}},{\bar{b}},z)\), otherwise. \(\square \)

3.2 Reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_L\) to \({{\,\mathrm{\mathrm{SAT}}\,}}_L\)

Proposition 3.2

For fixed d, there is a p-time reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_L\) to \({{\,\mathrm{\mathrm{SAT}}\,}}_L\), uniform for all modular lattices L of height d and admitting a non-trivial d-frame.

Proof

The proof is the same with and without constants 0, 1. It suffices to consider \(t({\bar{x}}),s({\bar{x}})\) such that \(\forall \bar{x}.\,t({\bar{x}}) \le s({\bar{x}})\) holds in all lattices (replace t by \(t\cap s\) and s by \(t+s\)). Let \(\phi ({\bar{z}})\) be the conjunction of equations defining a d-frame. Now consider the following conjunction \(\psi ({\bar{x}},{\bar{z}})\) of lattice equations (where \(x\le y\) means \(x+y=y\))

$$\begin{aligned}\phi ({\bar{z}}) \;\wedge \; z_1\le s({\bar{x}}) \, \wedge \; z_1 \cap t({\bar{x}})=z_\bot \;\wedge \;\bigwedge _{i=1}^n\; z_\bot \le x_i\le z_\top . \end{aligned}$$

Given \({\bar{b}}\) in L such that \(t({\bar{b}})< s({\bar{b}})\), there is an atom \(a_1 \le s({\bar{b}})\), \(a_1 \not \le t({\bar{b}})\) (since L is geometric) and that extends to a spanning d-frame \({\bar{a}}\); thus \(L\models \exists {\bar{x}} \exists {\bar{z}}.\;\psi ({\bar{x}},{\bar{z}})\). Conversely, given non-constant \({\bar{b}},{\bar{a}}\) in L such that \(L \models \psi ({\bar{b}},{\bar{a}})\) one must have \(a_\bot \ne a_\top \), whence \({\bar{a}}\) is spanning; it follows that \(t({\bar{b}}) <s({\bar{b}})\). \(\square \)

3.3 \(\mathcal {NP}\)-hardness

Theorem 3.3

For any non-trivial modular lattice L of height d and admitting a nontrivial d-frame, the decision problems \({{\,\mathrm{\mathrm{REF}}\,}}_L\) and \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) are \(\mathcal {NP}\)-hard; these problems are \(\mathcal {NP}\)-complete if L is finite or of height 2.

Proof

To prove hardness, in view of Proposition 3.2 it remains to consider \({{\,\mathrm{\mathrm{REF}}\,}}_L\) for L of fixed height d. Again, the proof is the same whether the bounds 0, 1 are considered constants or not. Given a lattice term \(t({\bar{x}})\), let \({\bar{x}}'=(x_1',\ldots , x_n')\) where

$$\begin{aligned}x_i':= \delta _d(z_\bot +z_\top \cap x_i,\,{\bar{z}})\end{aligned}$$

(from Lemma 2.4) and put \(t'({\bar{x}},{\bar{z}})=t({\bar{x}}')\). Observe that for any assignment \(\gamma \) for \({\bar{x}},{\bar{z}}\) in L one has either \(\gamma {\bar{z}}\) trivial and \(\gamma x_i'=\gamma z_\bot \) or \(\gamma {\bar{z}}\) spanning and \(\gamma x_i'\in \{0,1\}\); also, in the latter case, \(\gamma x_i'=\gamma x_i\) if \(\gamma x_i \in \{0,1\}\).

Now, consider a second term \(s({\bar{x}})\). Then there is an assignment \(\gamma \) for \({\bar{x}}\) in \(\{0,1\}\) such that \(t( \gamma {\bar{x}})\ne s(\gamma {\bar{x}})\) if and only if there is an assignment \(\gamma '\) for \({\bar{x}}{\bar{z}}\) in L such that \(s'(\gamma ' {\bar{x}} {\bar{z}})\ne t'(\gamma ' {\bar{x}} {\bar{z}})\). Namely, given \(\gamma \) choose \(\gamma ' {\bar{z}}\) any spanning frame and \(\gamma ' {\bar{x}}=\gamma {\bar{x}}\). Conversely, given \(\gamma '\) choose \(\gamma x_i := \delta _d(\gamma ' z_\bot +\gamma ' z_\top \cap \gamma 'x_i,\,\gamma {\bar{z}})\). This provides a reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_\mathbf{2}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_L\). \(\mathcal {NP}\)-hardness of the latter and of \({{\,\mathrm{\mathrm{SAT}}\,}}_L\) follows by Theorem 3.1 and Proposition 3.2. For finite L, both problems are in \(\mathcal {NP}\), as observed at the beginning of Section 3. For L of height 2 one uses the fact that k-generated sublattices have at most \(k+2\) elements. \(\square \)

4 Relating feasibility to lattices

Recall from Section 3.1 the remark on constants.

Theorem 4.1

For fixed \(3\le d \le \infty \) and d-dimensional F-vector space \(V_F\), both \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathsf{L}(V_F)}\) and \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathsf{L}(V_F)}\) are p-time equivalent to \({\mathrm{FEAS}_{\mathbb {Z},F}}\).

This follows from Proposition 3.2, Fact 2.2, and Sections 4.1 and 4.2 below.

4.1 Reduction of \(\mathrm{sSAT}_ {{{\,\mathrm{\mathsf L}\,}}(V_F)}\) to \({\mathrm{FEAS}_{\mathbb {Z},F}}\)

The reduction of \({{\,\mathrm{\mathrm{sSAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(V_F)}\) to \({\mathrm{FEAS}_{\mathbb {Z},F}}\) via non-determinism and BSS-machines is contained in [16, Proposition 2.1]. We sketch a direct proof. One has to consider existentially quantified conjunctions of equations of the form \(x=y+z\), \(x=y\cap z\), \(x=0\), \(x=1\), and \(x=y\). Using the partial order on \({{\,\mathrm{\mathsf L}\,}}(V_F)\), each of these can be obtained as a conjunction of formulas of the form \(x \le y\), \(x \le 0\), \(1 \le x\), \(x \le y+z\), and \(y =z\cap u\). Thus, each of the latter has to be translated into a feasibility condition.

Dealing with \({{\,\mathrm{\mathsf L}\,}}(V_F)\) for fixed \(\dim V_F=d<\infty \), we may assume \(V_F=F^d\). Associate with 0 and 1 the \(d\times d\) zero and unit matrices O and I, and with each variable \(\xi \) a \(d\times d\)-matrix \(\hat{\xi }\) of new variables to be interpreted in the ring F; namely, \(\hat{\xi } \mapsto A\) corresponding to \(\xi \mapsto \mathrm{Span}(A)\) where \(\mathrm{Span}(A)\) denotes the subspace of \(F^d\) spanned by the columns of A. In our translation, quantifications over matrices of variables always are with new variables (that is, specific to the formula translated). Observe that \(\mathrm{Span}(A) \le \mathrm{Span}(B)\) if and only if \(A=BU\) for some matrix U. Thus, \(x \le y\) translates into

$$\begin{aligned} \exists U.\,\hat{x}=\hat{y} U; \end{aligned}$$

and, if 0, 1 are considered constants, \(x \le 0\) into \(\hat{x}=O\) and \(1\le x\) into \(\exists U.\, I=\hat{x}U\). Also observe that \(\mathrm{Span}(A)\le \mathrm{Span}(B)+\mathrm{Span}(C)\) if and only if \(A=BU_1+CU_2\) for suitable matrices \(U_1,U_2\). Thus, we translate \(x\le y+z\) into

$$\begin{aligned}\exists U_1 \exists U_2\, \hat{x}=\hat{y}U_1+\hat{z}U_2.\end{aligned}$$

Meets are dealt with using the idea underlying the Zassenhaus algorithm: \(y=z\cap u\) is translated into

$$\begin{aligned}\exists X\exists Y \exists Z \exists U.\; \begin{pmatrix} \hat{z}&{}\quad \hat{u}\\ \hat{z}&{}\quad 0 \end{pmatrix}X = \begin{pmatrix} Z&{}\quad 0\\ U&{} \quad \hat{y} \end{pmatrix} \;\wedge \; \begin{pmatrix} Z&{}\quad 0\\ U&{}\quad \hat{y} \end{pmatrix}Y = \begin{pmatrix} \hat{z}&{}\quad \hat{u}\\ \hat{z}&{}\quad 0 \end{pmatrix} \end{aligned}$$

with \(2d\times 2d\)-block matrices. Observe that all these translations yield conjunctions of at most quadratic equations in non-commuting variables; for commutative F, these can be converted in p-time into such conjunctions with commuting variables.

4.2 Reduction of \({\mathrm{FEAS}_{\mathbb {Z},F}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_L\)

This does not require the bounds 0, 1 to be considered constants. Consider \( \mathsf{L}(V_F)\) where \(\dim V_F=d\) and recall that spanning d-frames \({\bar{a}}\) exist and that any non-spanning d-frame is trivial. Also observe that Fact 2.3 allows one to pass from a d-frame to a new one, given \(a_\bot \le b_1 \le a_1\); given \(a_\bot \le b_2 \le a_2\) first form \(b_1:= a_1\cap (b_2+a_{12})\). We will apply this reduction procedure to force relations. In doing so, we will either have \({\bar{a}}={\bar{b}}\) spanning or \({\bar{b}}\) trivial. Also, if \({\bar{a}}\) is trivial then \({\bar{a}}={\bar{b}}\). Thus, we may think of a fixed but arbitrary spanning d-frame \({\bar{a}}^\ell \) to deal with in each step.

Given ring terms \(p_k({\bar{x}})\), we may consider the \(x_i\) as lattice variables, too. We start with the d-frame \({\bar{a}}^1\). Given an assignment \(r_i \in \mathsf{L}(V_F)\) for the \(x_i\), put \(r^1_i:=(a^1_\bot + r_i)\cap (a^1_1+a^1_2)\) to achieve \(a^1_\bot \le r_i^1 \le a^1_1+a^1_2\). Applying the reduction step with \(b_2:=a^1_2\cap \sum _i r^1_i\) one obtains a frame \({\bar{a}}^2\) and \(r_i^2=r_i^1 \cap a^2_\top \) such that \(r^2_i \cap a^2_2=a^2_\bot \). Forcing via \(b_1:= a^2_1\cap \bigcap _i (r^2_i+a^2_2)\) one obtains \({\bar{a}}^3\) and \(r_i^3\) such that \(r^3_i\oplus _{a^3_\bot } a^3_2=a^3_1+a^3_2\), that is \(r_i^3 \in R({\bar{a}}^3)\). Forcing via \(b_1:= a^3_1\cap \bigcap _k \tilde{p}_k({\bar{r}}^3,{\bar{a}}^3)\) one obtains \({\bar{a}}^4\) such that \(a^4_1=\tilde{p}_k({\bar{r}}^4,{\bar{a}}^4)\) for all k, that is \(R({\bar{a}}^4) \models p_k({\bar{r}}^4)= 0\). (This strongly relies on the fact that \({\bar{a}}={\bar{b}}\) or \({\bar{b}}\) trivial. In general, reduction of frames will preserve only very special relations, as in the ingenious work of Ralph Freese [10, 11].)

In order to implement the reduction of \({\mathrm{FEAS}_{\mathbb {Z},F}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_L\), recall the retractive terms \({\bar{a}}={\bar{a}}({\bar{z}})\) for d-frames to start with. The forcing process described above can be captured by a sequence of tuplets of lattice terms, obviously. The result is a pair of (tuplets of) lattice terms \({\bar{a}}^\#({\bar{x}},{\bar{z}})\) and \({\bar{r}}^\#({\bar{x}},{\bar{z}})\) such that, for any substitution \(\gamma \) in \( \mathsf{L}(V_F)\) for the variables \({\bar{x}}\) and \({\bar{z}}\), one has that \({\bar{a}}^\#={\bar{a}}^\#(\gamma {\bar{x}}, \gamma {\bar{z}})\) is a d-frame and that, with \(r_i^\#:=r_i^\#(\gamma {\bar{x}}, \gamma {\bar{z}})\), either \({\bar{a}}^\#\) is trivial and \(r_i^\#=a^\#_\bot \) for all i or that \({\bar{a}}^\#\) is spanning and \({\bar{r}}^\#\) is a common zero of the \(p_k\) in \(R({\bar{a}}^\#)\). Moreover, if \(\gamma {\bar{z}}\) is a spanning d-frame and \(\gamma {\bar{x}}\) a common zero of the \(p_k({\bar{x}})\) in \(R(\gamma {\bar{z}})\), then \({\bar{a}}^\#(\gamma {\bar{x}},\gamma {\bar{z}})=\gamma {\bar{z}}\) and \({\bar{r}}^\#(\gamma {\bar{x}},\gamma {\bar{z}})=\gamma {\bar{x}}\). Summarizing, the \(p_k\) have a common zero in F if and only if there is a substitution \({\bar{\gamma }}\) in \( \mathsf{L}(V_F)\) such that \(a^\#_\bot (\gamma {\bar{x}}, \gamma {\bar{z}})\ne a^\#_\top (\gamma {\bar{x}}, \gamma {\bar{z}})\).

4.3 Varieties generated by complemented modular lattices

Fact 4.2

Given an atomic complemented modular lattice L and lattice terms \(s({\bar{x}})\), \(t({\bar{x}})\) such that \(L\models \forall {\bar{x}}.\, s({\bar{x}}) \le t({\bar{x}})\), if \(\exists {\bar{x}}.\, s({\bar{x}})<t(\bar{x})\) holds in L then it does so in a section [0, u] of L where the height of u is at most the number of occurrences of variables in \(t({\bar{x}})\).

Proof

One shows by structural induction for any atom p and term \(t(\bar{x})\): if \(p\le t({\bar{b}})\), then there is \({\bar{c}}\) such that \(p\le t({\bar{c}})\), \(c_i\le b_i\) for all i and, for \(u:=\sum _i c_i\), [0, u] is of height at most the number of occurrences of variables in \(t({\bar{x}})\). Indeed, if \(t=t_1+t_2\), then there are atoms \(p_j\le t_j({\bar{b}})\) such that \(p\le p_1+p_2\). By inductive hypothesis there are \({\bar{c}}^j\) such that \(p_j \le t_j({\bar{c}}^j)\), \(c_i^j\le b_i\), and the height of \(\sum _i c_i^j\) is at most the number of occurrences of variables in \(t_j({\bar{x}})\). Put \(c_i:=c_i^1+c_i^2\). Similarly for \(t=t_1\cap t_2\), given \(p \le t({\bar{b}})\), by inductive hypothesis there are \({\bar{c}}^j \le {\bar{b}}\) such that \(p\le t_j({\bar{c}}^j)\) and one has \(p\le t({\bar{c}})\) where \(c_i= c^1_i \cap c^2_i\). Now, if \(s({\bar{b}}) <t({\bar{b}})\), choose an atom \(p\le t({\bar{b}})\), \(p\not \le s({\bar{b}})\). Then \(p\le t(\bar{c})\) but \(p\not \le s({\bar{c}})\).

\(\square \)

For c, c prime or 0, let \(\mathcal {V}_c\) be the smallest lattice variety containing all \({{\,\mathrm{\mathsf L}\,}}(V_F)\) over division rings of characteristic p. Observe that for a division ring \(F'\) embedded into F, \({{\,\mathrm{\mathsf L}\,}}(V_F)\) is a sublattice of \({{\,\mathrm{\mathsf L}\,}}(V_{F'})\) if V is considered a vector space over \(F'\) and that \({{\,\mathrm{\mathsf L}\,}}(W_{F'})\) is embedded into \({{\,\mathrm{\mathsf L}\,}}(V_F)\) if \(\dim W_{F'}=\dim V_F\). It follows from Fact 4.2 that, for each F of characteristic c, \(\mathcal {V}_c\) is generated by any class of \({{\,\mathrm{\mathsf L}\,}}(V_F)\) where \(\dim V_F\) is finite and unbounded. For each c, the equational theory of \(\mathcal {V}_c\) is decidable [13, 21]. An upper bound on the complexity is given by the following (though, it remains open to establish a lower bound, say \(\mathcal {NP}\)).

Corollary 4.3

Given a field F of characteristic c, there is a p-time reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {V}_c}\) to \({\mathrm{FEAS}_{\mathbb {Z},F}}\). In particular, \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {V}_c}\) is in \(\mathcal {NP}\) for any prime c.

Proof

By Fact 4.2, if an equation fails in some member of \(\mathcal {V}_c\), then it does so in \({{\,\mathrm{\mathsf L}\,}}(V_{F})\) where \(\dim V_{F}\) is the number of occurrences of variables in the equation. Now apply Sections 3.2 and 4.1 for reduction to \({\mathrm{FEAS}_{\mathbb {Z},F}}\). \(\square \)

5 Preliminaries: part II

5.1 Inverses in coordinate rings

Continuing with Sections 2.5 and 2.6 we consider the lattice \({{\,\mathrm{\mathsf L}\,}}(V_F)\) of subspaces of an F-vector space and a 3-frame \({\bar{a}}\) such that \(a_\bot =0\) and \(a_\top =V\). We extend \({\bar{a}}\) adding the elements \(a_{23} =(a_2+a_3)\cap (a_{12}+a_{13})\) and \(a_{ji}=a_{ij}\) for \(i<j\). Observe that, by modularity, one has

$$\begin{aligned} (a_i +a_j)\cap (a_{ik}+a_{kj})= a_{ij} \text{ for } \{i,j,k\}=\{1,2,3\}. \qquad \qquad \qquad (+) \end{aligned}$$

Thus, one obtains a normalized frame of order 3 in the sense of von Neumann. Also, we introduce corresponding variables \(z_{23}\) and \(z_{ji}\) and the perspectivity terms

$$\begin{aligned}\pi _{ijk}^{{\bar{z}}}(x):=(x+z_{jk})\cap (z_i+z_k)\end{aligned}$$

which define the isomorphism \(u \mapsto \pi _{ijk}^{{\bar{a}}}(u)\) of \([0,a_i+a_j]\) onto \([0,a_i+a_k]\); in particular \(a_i \mapsto a_i\), \(a_j \mapsto a_k\), and \(a_{ij} \mapsto a_{ik}\).

For given \(i\ne j\) and linear map \(f:a_i\rightarrow a_j\), define

$$\begin{aligned} \Gamma _{ij}^{{\bar{a}}}(f)=\{ v-f(v) \mid v \in a_i\}, \end{aligned}$$

the (negative) graph of f; this establishes a 1-1-correspondence between linear maps \(f:a_i\rightarrow a_j\) and subspaces U such that \(U\oplus a_j=a_i+a_j\). Invertible f are characterized by the additional condition \(U\oplus a_i=a_i+a_j\); here, \(\Gamma _{ji}^{{\bar{a}}}(f^{-1})=\Gamma _{ij}^{{\bar{a}}}(f)\).

In particular, one has the linear isomorphisms \(\varepsilon _{ij}^{{\bar{a}}}: a_i \rightarrow a_j\) such that \(\Gamma _{ij}^{{\bar{a}}}(\varepsilon ^{\bar{a}}_{ij})=a_{ij}\). From \(a_{ji}=a_{ij}\) it follows that \(\varepsilon ^{\bar{a}}_{ji}= \varepsilon ^{{\bar{a}}}_{ij}\). (Observe that \(\varepsilon ^{\bar{a}}_{12}=\varepsilon _{{\bar{a}}}\) and \(\varepsilon ^{{\bar{a}}}_{21}=\varepsilon _{{\bar{a}}}^{-1}\).) For pairwise distinct ijk and linear maps \(f:a_i \rightarrow a_j\), \(g:a_j\rightarrow a_k\) one has

$$\begin{aligned} \Gamma ^{{\bar{a}}}_{ik}(g f)= (\Gamma ^{{\bar{a}}}_{ij}(f) + \Gamma ^{{\bar{a}}}_{jk}(g))\cap (a_i +a_k). \qquad \qquad \qquad (++) \end{aligned}$$

In particular, from (+) it follows that \(\varepsilon ^{{\bar{a}}}_{jk} \varepsilon ^{{\bar{a}}}_{ij}= \varepsilon ^{{\bar{a}}}_{ik}\). Define the lattice term

$$\begin{aligned} s(x,{\bar{z}}):=\pi _{231}^{{\bar{z}}}\pi _{312}^{{\bar{z}}}\pi ^{{\bar{z}}}_{123}(x).\end{aligned}$$

Fact 5.1

For \({{\,\mathrm{\mathsf L}\,}}(V_F)\) and \({\bar{a}}\) as above and \(f \in {{\,\mathrm{\mathsf{End}}\,}}(a_1) \) one has

$$\begin{aligned} s(\omega _{{\bar{a}}}(f), {\bar{a}})= \{ f\varepsilon ^{{\bar{a}}}_{21}(w) -w\mid w \in a_2\}. \end{aligned}$$

In particular, \( s(\omega _{{\bar{a}}}(f), {\bar{a}})= \omega _{\bar{a}}(f^{-1})\) if f is invertible.

Proof

Observe that \(\omega _{{\bar{a}}}(f)= \Gamma ^{{\bar{a}}}_{12}(\varepsilon ^{\bar{a}}_{12} f)\). Applying (++) three times we get \(s(\omega _{\bar{a}}(f),{\bar{a}})= \Gamma ^{{\bar{a}}}_{21}(g)\) where \(g= (\varepsilon ^{\bar{a}}_{21}((\varepsilon ^{{\bar{a}}}_{12} f) \varepsilon ^{{\bar{a}}}_{23})) \varepsilon ^{\bar{a}}_{31}=f \varepsilon ^{{\bar{a}}}_{21}\). If f is invertible, then \(\varepsilon ^{{\bar{a}}}_{12} f^{-1}\) is an isomorphism of \(a_1\) onto \(a_2\) and with \(w=\varepsilon ^{{\bar{a}}}_{12} f^{-1}(v)\) one gets \(\{ f\varepsilon ^{\bar{a}}_{21}(w) -w\mid w \in a_2\} =\omega _{{\bar{a}}}(f^{-1}) \). \(\square \)

5.2 Modular ortholattices

An ortholattice is a lattice L with bounds 0, 1 as constants in the signature as well as a map, called orthocomplementation, \(a \mapsto a^\perp \) such that for all \(a,b \in L\)

$$\begin{aligned} a\le b \;\Leftrightarrow \;b^\perp \le a^\perp , \quad (a^\perp )^\perp =a,\quad a\oplus a^\perp =1.\end{aligned}$$

We write \(\sum _i a _i=a_1\oplus ^\perp \cdots \oplus ^\perp a_n\) iff \(a_i\le a_j^\perp \) for all \(i\ne j\). A MOL is a modular ortholattice. Let \(\mathcal {H}\) denote the class of all finite dimensional real or complex Hilbert spaces and \(\mathcal {H}_{\mathbb {R}}\) the class of those \(H\in \mathcal {H}\) which are over \(\mathbb {R}\). The lattice of all linear subspaces of a given \(H \in \mathcal {H}\) is a MOL \({{\,\mathrm{\mathsf L}\,}}(H)\) with \(X^\perp \) the orthogonal complement of X w.r.t. the inner product.

In a modular ortholattice L, every section [0, u] is again a MOL with \(x \mapsto x^\perp \cap u\). Moreover, \([0,u] \in \mathsf{HS}(L)\) via the homomorphism \(x \mapsto x \cap u\) defined on the sub-ortholattice \([0,u] \cup [u^\perp ,1]\) of L. For a subspace U of H, the ortholattice so obtained is \({{\,\mathrm{\mathsf L}\,}}(U)\).

Fact 5.2

Within the class of MOLs any conjunction of identities is equivalent to a single identity of the form \(t=0\).

Indeed, any identity \(s=t\) is equivalent to \((s+t)\cap (s\cap t)^\perp =0\) and \(\bigwedge _i t_i=0\) is equivalent to \(\sum _i t_i=0\). Thus, for a class \(\mathcal {C}\) of MOLs, \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {C}\) and \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {C}\) both amount to the following: Given a term \(t({\bar{x}})\), is there a non-trivial \(L\in \mathcal {C}\) and an assignment \({\bar{a}}\) in L such that \(t({\bar{a}}) \ne 0\) (respectively, \(t({\bar{a}})=1\))? Similarly, for \({{\,\mathrm{\mathrm{uREF}}\,}}_\mathcal {C}\) and \({{\,\mathrm{\mathrm{sSAT}}\,}}_\mathcal {C}\).

5.3 Dimension bounds in \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\)

Lemma 5.3

Given an unnested ortholattice term \(T({\bar{x}})\) and \(H \in \mathcal {H}_{\mathbb {R}}\) such that \({{\,\mathrm{\mathsf L}\,}}(H) \models \exists {\bar{x}}.\,T({\bar{x}})\ne 0\), there is \(H' \in \mathcal {H}_{\mathbb {R}}\), \(\dim H'= o(T({\bar{x}}))\) such that \({{\,\mathrm{\mathsf L}\,}}(H') \models \exists {\bar{x}}.\,T({\bar{x}})\ne 0\). Analogously, in the complex case.

Proof

The analogue for terms follows from [12, Lemma 2.2] and the fact \({{\,\mathrm{\mathsf L}\,}}(H)\in \mathsf{HS}({{\,\mathrm{\mathsf L}\,}}(H'))\) for any extension \(H'\) of H. In view of Fact 2.1 this proves the Lemma. \(\square \)

5.4 Orthogonal frames

Recall Section 2.5. A d-frame in a MOL is orthogonal if \(a_\bot =0\) and \(\sum _i a_i=\bigoplus _i^\perp a_i\). For a Hilbert space \(H=\bigoplus ^\perp _i H_i\) with isomorphisms \(\varepsilon _j:H_1 \rightarrow H_j\) one obtains an orthogonal d-frame in \({{\,\mathrm{\mathsf L}\,}}(H)\) with \(a_i=H_i\) and \(a_{1j}=\{ x -\varepsilon _j x\mid x \in H_1\}\); and all orthogonal d-frames in \({{\,\mathrm{\mathsf L}\,}}(H)\) with \(a_\top =H\), \(H \in \mathcal {H}\), arise this way. Observe that \(\bar{a}\) is an orthogonal d-frame if and only it is so in the section \([0,a_\top ]\). Fact 2.3 reads now as follows.

Fact 5.4

For any orthogonal d-frame \({\bar{a}}\) in a modular ortholattice L and \(b_1 \le a_1\), the \(b_j:=(b_1+a_{1j})\cap a_j\), \(b_{1j}:=(b_1+b_j)\cap a_{1j}\), form an orthogonal d-frame \(\bar{b}\) with \(b_\bot :=a_\bot =0\) and \(b_\top :=\sum _ib_i\) and such that \({\bar{b}}={\bar{a}}\) if \(b_1=a_1\). Moreover, if \(L={{\,\mathrm{\mathsf L}\,}}(H)\) and if \(b_1\) is invariant for a given \(f\in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\), then \(\omega _{\bar{b}} f= (b_1+b_2)\cap \omega _{{\bar{a}}} f\).

Existence of retractive terms for orthogonal d-frames within the variety of MOLs is due to Mayet and Roddy [27]. More easily it is seen as follows. We will need only the case \(d=3\) and \(L={{\,\mathrm{\mathsf L}\,}}(H)\). Given \({\bar{a}}\) in the modular ortholattice L, let \(u:=\bigcap _{i\ne j}(a_i+a_j)\) and \(a_i^1:=u+a_i\). Then \(a_1^1,a_2^1,a_3^1\) is independent in [u, 1]. Thus, \({a_1^1}^\perp ,{a_2^1}^\perp ,{a_3^1}^\perp \) is dually independent in \([0,u^\perp ]\) and defining \(a_i^2:={a_j^1}^\perp \cap {a_k^1}^\perp \), \(\{i,j,k\}=\{1,2,3\}\), one has \(a_\top ^2:=u^\perp = a_1^2\oplus ^\perp a_2^2\oplus ^\perp a_3^2\). Put \(a_{12}^2:= a_{12}\cap (a_1^2+a_2^2)\). For \(\{i,j\}=\{1,2\}\) put \(c_i=a_i\cap (a_j+a_{12})\) and \(d_i=a_i \cap a_{12}\) to obtain the sublattice in Figure 1. Now, with \(a^3_i=c_i\cap d_i^\perp \) for \(i=1,2\) one has \(a_1^3+a_2^3\) a complement of \(d_1+d_2\) in \([0,c_1+c_2]\) and with \(a_{12}^3=(a_1^3+a_2^3)\cap a_{12}\) it follows that \(a_i^3 \oplus a_{12}^3=a_1^3+a_2^3\). Put \(a^3_\top := a_1^3\oplus ^\perp a_2^3\oplus ^\perp a_3^3\). Similarly, one obtains \({\bar{a}}^4\) such that \(a^4_\top := a_1^4\oplus ^\perp a_2^4\oplus ^\perp a_3^4\) and \(a^4_{13}\oplus a^4_j= a^4_1+a^4_3\) for \(j=1,3\). Finally, put \(a^5_j:=a^4_j\) for \(j=1,3\), \(a^5_{13}:=a^4_{13}\), \(a^5_2:= (a^5_1 +a^4_{12})\cap a^4_2\), and \(a^5_{12}:= a^4_{12} \cap (a^5_1+a^5_2)\) to obtain an orthogonal 3-frame \({{\bar{a}}}^5\).

Fig. 1
figure 1

Reduction of frames.

5.5 Coordinate ring

Consider \(d \ge 3\) and an orthogonal d-frame \({\bar{a}}\) in \({{\,\mathrm{\mathsf L}\,}}(H)\), \(H \in \mathcal {H}\). Recall the coordinate ring \(R({\bar{a}})\) from Section 2.6. In the ortholattice setting, elements of the coordinate ring can be forced via the following where \(\#(x,y,z)\) is a term defining the relative orthocomplement of z in the interval [xy],

$$\begin{aligned} \#(x,y,z):= x+ y\cap z^\perp .\end{aligned}$$

Observe that, by modularity, \(\#(x,y,z)= (z^\perp +x)\cap y\) if \(x \le y\). Now, define

$$\begin{aligned} \#"(x,y,z):=\#(z\cap (x\cap z)^\perp , y, x+ z) \end{aligned}$$

Lemma 5.5

In a MOL, if \(a,c \le b\), then \(\#"(a,b,c)\oplus a=b\). Moreover, if \(b=c\oplus a\) then \(\#"(a,b,c)=c\).

Proof

See Figure 2. Let \(c'=c\cap (a \cap c)^\perp \) and \(c"= \#(c',b, a+c)\). From \(c=c'\oplus a \cap c\) follows \(a+c=c'\oplus a\). Now, c" is a complement of \(a+c\) in \([c',b]\), whence of a in [0, b]. Clearly, if \(b=c\oplus a\), then \(c=c'=c"\).\(\square \)

Fig. 2
figure 2

Forcing elements of the coordinate ring.

5.6 Orthonormal frames

Recall that for any subspaces UW of \(H\in \mathcal {H}\) and any linear map \(f:U\rightarrow W\) there is a unique linear map \(g:W\rightarrow U\) such that \(\langle x \mid g(y)\rangle =\langle f(x)\mid y \rangle \) for all \(x \in U\), \(y \in W\). g is called the adjoint of f and in case \(U=W=H\) we write \(g=f^*\). An isomorphism \(f:U \rightarrow W\) is an isometry if and only if the inverse is the adjoint. If \(U \subseteq W^\perp \) then g is the adjoint of f if and only if \(\{v+fv\mid v \in U\}\) is orthogonal to \(\{w -gw\mid w \in W\}\).

Lemma 5.6

Given an orthogonal 3-frame \({\bar{a}}\) in \({{\,\mathrm{\mathsf L}\,}}(H)\), \(H\in \mathcal {H}\) one has \(\varepsilon _{ {\bar{a}}}\) an isometry if and only if

$$\begin{aligned} a_{12}^\perp \cap (a_1+a_2)= a_1\ominus _{{\bar{a}}}a_{12}. \qquad \qquad \qquad (*) \end{aligned}$$

Proof

Observe that \(a_1\ominus _{{\bar{a}}}a_{12}= \omega _{\bar{a}}(-{{\,\mathrm{\mathsf{id}}\,}}_{a_1})\). Thus, \((*)\) holds if and only if \(\omega _{\bar{a}}(-{{\,\mathrm{\mathsf{id}}\,}}_{a_1}) \le a_{12}^\perp \) if and only if \(\langle v+\varepsilon _{{\bar{a}}}(v) \mid w -\varepsilon _{{\bar{a}}}^{-1}(w) \rangle =0\) for all \(v \in a_1\) and \(w \in a_2\) if and only if \(\langle v \mid \varepsilon _{{\bar{a}}}^{-1}(w) \rangle = \langle \varepsilon _{{\bar{a}}}(v) \mid w \rangle \) for all \(v \in a_1\) and \(w \in a_2\) if and only if \(\varepsilon _{{\bar{a}}}^{-1}\) and \(\varepsilon _{{\bar{a}}}\) are adjoints of each other. \(\square \)

An orthogonal 3-frame \({\bar{a}}\) is called an ON-3-frame if and only if (*) holds. In particular, any \(H_1\in \mathcal {H}\) occurs as \(a_1\) for some ON-3-frame \({\bar{a}}\) in some H, \(\dim H= 3 \dim H_1\). Also, the automorphism group of \({{\,\mathrm{\mathsf L}\,}}(H)\) acts transitively on the set of ON-3-frames.

In order to construct retractive terms for passing from orthogonal 3-frames to ON-3-frames we use Fact 5.4. Here, we have \(f=-\mathsf{id}\) and put \(b_1:= (a_{12}^\perp \cap \omega _{{\bar{a}}} f +a_2)\cap a_1\). Summarizing Sections 5.4 and 5.6 and Lemma 5.5, we have retractive terms for passing from \({\bar{a}}\) and \({\bar{r}}\) with no relations to ON-3-frames and elements of the coordinate ring. More precisely,

Lemma 5.7

Given variables \({\bar{z}}=(z_\bot ,z_\top ,z_1,z_2.z_3,z_{12},z_{13})\) and \(x_i\) there are ortholattice terms \({\bar{a}}({\bar{z}})= (a_\bot ,a_\top ,a_1,a_2,a_3,a_{12},a_{13})({\bar{z}})\) and \(r_i(x_i,{\bar{z}})\), such that for any \(H \in \mathcal {H}\) and substitution \({\bar{z}} \rightarrow {\bar{u}}\) and \(x_i \rightarrow v_i\) in \({{\,\mathrm{\mathsf L}\,}}(H)\), one has \(\bar{a}({\bar{u}})\) an ON-3-frame and \(r_i(v_i,{\bar{u}}) \in R({\bar{a}})\); moreover, if \({\bar{u}}\) is an ON-3-frame and \(v_i\in R({\bar{u}})\) then \({\bar{a}}({\bar{u}})= {\bar{u}}\) and \(r_i(v_i)=v_i\).

5.7 Capturing adjoints in coordinate \(*\)-rings

The endomorphism ring \({{\,\mathrm{\mathsf{End}}\,}}(H)\) of \(H \in \mathcal {H}\) is also a \(*\)-ring: A ring with involution, namely the involution \(f \mapsto f^*\), the adjoint of f. Given subspaces U, W with orthogonal projections \(\pi _U\), \(\pi _W\) and a linear map \(f:U\rightarrow W\), one has \(\pi _Uf^*|_W\) the adjoint of f where \(f^*\) refers to f considered a map \(f:U\rightarrow H\). In particular, \({{\,\mathrm{\mathsf{End}}\,}}(U)\) becomes a \(*\)-ring \({{\,\mathrm{\mathsf{End}}\,}}^*(U)\) where \(f \mapsto \pi _U f^*|_U\). In order to capture the involution in the coordinate ring of an ON-3-frame we use the following ortholattice term (where \(s(x,{\bar{z}})\) is from Section 5.1):

$$\begin{aligned} x^{\dagger _{{\bar{z}}}}:= s((z_1 \ominus _{{\bar{z}}} x)^\perp \cap (z_1+z_2),{\bar{z}}). \end{aligned}$$

Lemma 5.8

Given \(H \in \mathcal {H}\), an ON-3-frame \({\bar{a}}\) in \({{\,\mathrm{\mathsf L}\,}}(H)\), \(f \in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\), and \(r=\omega _{{\bar{a}}}(f)\), one has \(r^{\dagger _{{\bar{a}}}} =\omega _{{\bar{a}}}(g)\) where \(g=\pi _U f^*|_U\) is the adjoint of f in the Hilbert space \(U=a_1\). In particular, \(\omega _{{\bar{a}}}\) is an isomorphism of \(*\)-rings \({{\,\mathrm{\mathsf{End}}\,}}^*(a_1)\) and \(R({\bar{a}})\), the latter with involution \(r \mapsto r^{\dagger _{\bar{a}}}\).

Proof

Write \(U=a_1\) and consider \(f,g \in {{\,\mathrm{\mathsf{End}}\,}}(U)\). Then, as observed above, g is adjoint to f if and only if \(g=\pi _Uf^*|_U\). Now, one has \(\pi _Uf^*\varepsilon _{{\bar{a}}}^{-1} =\pi _U f^*\pi _U\varepsilon _{\bar{a}}^{-1} = \pi _Uf^*\pi _U(\varepsilon _{{\bar{a}}})^* =\pi _U (\varepsilon _{\bar{a}}\pi _Uf)^* =\pi _U(\varepsilon _{{\bar{a}}}f)^* \). Thus, g is adjoint to f if and only if \(g\varepsilon _{{\bar{a}}}^{-1}\) is adjoint to \(\varepsilon _{{\bar{a}}}f\) if and only if \(\Gamma ^{{\bar{a}}}_{12} (-\varepsilon _{{\bar{a}}}f)\) is orthogonal to \(\Gamma ^{{\bar{a}}}_{21}(g \varepsilon _{{\bar{a}}}^{-1})\), that is, \(\Gamma ^{{\bar{a}}}_{21}(g \varepsilon _{{\bar{a}}}^{-1})= \Gamma ^{{\bar{a}}}_{12} (-\varepsilon _{{\bar{a}}}f)^\perp \cap (a_1+a_2)\). The latter is equal to \(r':=(a_1\ominus _{{\bar{a}}} r)^\perp \cap (a_1+a_2)\). In view of Fact 5.1, g is adjoint to f if and only if \(s(r',\bar{a})= \omega _{{\bar{a}}}(g)\). \(\square \)

In the sequel, we will consider adjoints only within the space \(a_1\) where \({\bar{a}}\) is an ON-3-frame in some \({{\,\mathrm{\mathsf L}\,}}(H)\), \(H\in \mathcal {H}\), and use \(f^*\) to denote the adjoint of \(f \in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\) within \(a_1\).

6 Complexity of the equational theory of \(\mathcal {L}\)

Recall that \(\mathcal {L}\) is the class of subspace ortholattices \({{\,\mathrm{\mathsf L}\,}}(H)\), \(H \in \mathcal {H}\), where \(\mathcal {H}\) is the class of all finite dimensional real or complex Hilbert spaces. Our main result is the following.

Theorem 6.1

The decision problems \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\), \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\), and \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) are p-time equivalent to each other.

6.1 Outline

By Fact 6.2 below, \(\mathsf{V}(\mathcal {L})\) is generated by the \(\mathsf{L}(H)\), \(H \in \mathcal {H}_{\mathbb {R}}\), where \(\mathcal {H}_{\mathbb {R}}\) denotes the class of all finite dimensional real Hilbert spaces. Thus, to reduce to \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {L}\), our task is the following (recall Fact 5.2 and that for \({\bar{r}} \in \mathbb {R}\) one has \(p_i({\bar{r}})=0\) for \(i=1,\ldots ,m\) if and only if \(\sum _i p_i({\bar{r}})^2=0\)).

(\(*\)) Given a term \(p({\bar{x}})\) in the language of rings, construct (in p-time) a conjunction \(\phi _p({\bar{x}},{\bar{z}})\) of ortholattice identities such that \(p({\bar{r}})\ne 0\) for all \({\bar{r}}\) from \(\mathbb {R}\) if and only if \(\mathsf{L}(H)\models \forall {\bar{x}} \forall {\bar{z}}.\,\phi _p( {\bar{x}},{\bar{z}})\) for all \(H\in \mathcal {H}_{\mathbb {R}}\).

In [16, Proposition 4.9] the commutativity relations required by the Spectral Theorem have been encoded in a conjunction of equations (to be viewed as a system of generators and relations) to prove that \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) reduces to \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {L}\). Though, dealing with \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {L}\), we have to force such relations by Ralph Freese’s technique of retractive terms. The first step is to construct elements in a coordinate \(*\)-ring of an ON-3-frame, via Lemma 5.7. This is used in Section 6.3 to reduce from \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\). The reduction from \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {L}\) is in [16, Theorem 4.4] via non-deterministic BSS-machines. We give a direct proof: In Sections 6.46.6, we reduce \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\) in fixed dimension via \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\); to combine these to the required reduction, we use the dimension bound (from [12]) for failure of equations. For later use, we describe these reductions for \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\) in place of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\).

Lemma 8.3, below, gives the reduction from \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\), \(\mathcal {R}\) the class of the \({{\,\mathrm{\mathsf{End}}\,}}(H)\) (considered as \(*\)-rings with pseudo-inversion), \(H \in \mathcal {H}\). Not requiring retractive terms, the proof is much simpler and might be read first. Though, in the converse direction, we reduce (in Subsection 8.3) \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\) in polynomial time; that we have to employ the latter is due to multiple occurrence of variables in the term translating, to the language of \(\mathcal {L}\), the fundamental operation of pseudo-inversion. It remains open whether there is a direct p-time reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\).

6.2 Varieties generated by ortholattices \({{\,\mathrm{\mathsf L}\,}}(H)\)

Fact 6.2

For every \(\mathcal {C} \subseteq \mathcal {L}\), the variety \(\mathsf{V}(\mathcal {C})\) either is generated by one or two members of \(\mathcal {C}\) or is equal to \(\mathcal {L}\) and is generated by any family in \( \mathcal {L}\) having unbounded dimensions.

We mention that \(\mathsf{V}(\mathcal {L})\) con tains all projection ortholattices of finite Rickart \(C^*\)-algebras [14].

Proof

Recall that for any d there is, up to (isometric) isomorphism, just one real (respectively complex) Hilbert space of dimension d. Also, if \(H_1,H_2\) are both real (respectively complex) and \(d_1 \le d_2\) then \(\mathsf{L}(H_1)\) is a homomorphic image of a sub-ortholattice of \(\mathsf{L}(H_2)\), namely \(\mathsf{L}(U) \times \mathsf{L}(U^\perp )\) embeds into \(\mathsf{L}(H_2)\) where \(U \in \mathsf{L}(H_2)\) with \(\dim U=d_1\). Recall, finally, that \(\mathsf{L}(H)\), \(H\in \mathcal {H}_{\mathbb {R}}\), embeds into the subspace ortholattice of the complex Hilbert space \(\mathbb {C }\otimes _{\mathbb {R}}H\); and recall that for H over \(\mathbb {C}\), considering H as the complexification of the \(\mathbb {R}\)-vector space \(H_0\), \(\mathsf{L}(H)\) embeds into \(\mathsf{L}(H_0)\) where \(H_0\) is endowed with the real part of the scalar product on H. \(\square \)

6.3 Reducing \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\)

We have to prove (*) from Section 6.1. In view of Lemma 5.7 we may continue from an ON-3-frame \({\bar{a}}\) and \(r_1,\ldots ,r_n\in R({\bar{a}})\). Now, recall that for \(f \in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\) one has

$$\begin{aligned}\ker f = a_1\cap \omega _{{\bar{a}}} f. \end{aligned}$$

Thus, with \(r_i:=\omega _{{\bar{a}}} f_i\), \(i=1,\ldots ,n\), and \(X:=\{r_i,r_i^{\dagger _{{\bar{a}}}}\mid i=1,\ldots ,n\}\) put

$$\begin{aligned}u:=k({\bar{r}},{\bar{a}}):= \bigcap _{r,s \in X} a_1\cap (r\otimes _{{\bar{a}}} s \ominus _{{\bar{a}}} s \otimes _{{\bar{a}}} r).\end{aligned}$$

Denoting by c the set of all vectors \(v\in a_1\) on which any two of \(f_i,f_i^*,f_j,f_j^*\) commute, we have \(c=u\). Let \(x\tilde{+}_{{\bar{z}}}y\) denote the lattice term defining addition in \(R({\bar{a}})\) and \(\widetilde{2^{-1}}_{{\bar{z}}}\) the one for the inverse of \(a_{12}\tilde{+}_{{\bar{a}}}a_{12}\) (cf. Fact 5.1). Define

$$\begin{aligned}s_i:= \widetilde{2^{-1}}_{{\bar{a}}}\bigl ((r_i\cap (u+a_2) + u^\perp ) \tilde{+}_{{\bar{a}}} (r_i\cap (u+a_2) + u^\perp )^{\dagger _{{\bar{a}}}}\bigr ), \end{aligned}$$

that is \(s_i =\omega _{{\bar{a}}} \frac{1}{2}(\hat{f}_i+\hat{f}^*_i) \) where \(\hat{f}_i\) is \(f_i\) on u and 0 on \(u^\perp \). In particular, the \(\hat{f}_i\) are self-adjoint and commute on \(a_1\). Moreover, if the \(r_i\), respectively \(f_i\), commute and are self-adjoint then \(a_1=k(\bar{r},{\bar{a}})\), \(f_i=\hat{f}_i\) and \(r_i=s_i\).

Of course, these definitions work uniformly for all \(H \in \mathcal {H}\) and ON-3-frames \({\bar{a}}\) and \(r_i\in R({\bar{a}})\) in \({{\,\mathrm{\mathsf L}\,}}(H)\). Thus, we have achieved terms \(t_j({\bar{z}})\), \(t_{1j}({\bar{z}})\), and \(s_i({\bar{x}},{\bar{z}})\) which are retractive from no relations to ON-3-frames \({\bar{a}}\) with \({\bar{r}}\) in \(R({\bar{a}})\) consisting of commuting self-adjoints. Given a term \(p({\bar{x}})\) in the language of rings, let \(\tilde{p}({\bar{x}},{\bar{z}})\) the associated lattice term, that is, for any frame \({\bar{a}}\)

$$\begin{aligned} \omega _{{\bar{a}}}p(f_1,\ldots , f_n) =\tilde{p}(\omega _{{\bar{a}}}f_1,\ldots ,\omega _{{\bar{a}}} f_n) \text{ for } f_i \in {{\,\mathrm{\mathsf{End}}\,}}(a_1).\end{aligned}$$

Observe that, due to uniqueness of occurrences of variables \({\bar{x}}\) (Sections 2.6 and 5.6 and Lemma 5.8), \(\tilde{p}({\bar{x}},{\bar{z}})\) is constructed from \(p({\bar{x}})\) in p-time. Let the ortholattice term \(\hat{p}({\bar{x}},{\bar{z}})\) be obtained from \(\tilde{p}({\bar{x}},{\bar{z}})\) substituting first \(s_i({\bar{x}},{\bar{z}})\) for \(x_i\), then \(t_j({\bar{z}})\) for \(z_j\) and \(t_{1j}({\bar{z}})\) for \(z_{1j}\). Let \(p^\#({\bar{x}},{\bar{z}})=0\) be the ortholattice identity equivalent to the conjunction of \(\hat{p}({\bar{x}},{\bar{z}})\cap z_1=0\) and \(\hat{p}({\bar{x}},{\bar{z}})+z_1=z_1+z_2\) (see Fact 5.2). Observe that this is still obtained in p-time from \(p({\bar{x}})\). Then the following are equivalent

  1. (i)

    \(p^\#({\bar{x}},{\bar{z}})=0\) is valid in \(\mathcal {L}\).

  2. (ii)

    For all \(H\in \mathcal {H}_{\mathbb {R}}\), ON-3-frames \({\bar{a}}\) of \(\mathsf{L}(H)\) and commuting self-adjoint \(r_1, \ldots ,r_n \in R({\bar{a}})\) one has \(\tilde{p}(r_1,\ldots ,r_n)\) invertible in \(R({\bar{a}})\).

  3. (iii)

    For all \(H\in \mathcal {H}_{\mathbb {R}}\) and commuting self-adjoint endomorphisms \(f_1,\ldots ,f_n\) of H one has \(p(f_1,\ldots ,f_n)\) invertible.

  4. (iv)

    \(p(\rho _1, \ldots ,\rho _n)\ne 0\) for all \(\rho _1,\ldots ,\rho _n\in \mathbb {R}\).

The equivalence of (i), (ii), and (iii) is obvious by the above, that of (iii) and (iv) by the Spectral Theorem: the \(f_i\) have a common basis of eigenvectors. Thus, we have obtained \((*)\).

6.4 Reducing \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\)

We continue the proof in Section 4.1 to include orthocomplementation in the reduction from \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) for the case of fixed dimension of \(V_{\mathbb {R}}=H\). Here, we may assume \(H=\mathbb {R}^d\) with the canonical inner product. Observe that \(\mathrm{Span}(B)^\perp = \mathrm{Span}(C)\) if and only if \(C^tB=0\) and \(BY+CZ=I\) for suitable YZ. Here \(C^t\) denotes the transpose of C. Thus, we translate \(y=z^\perp \) into

$$\begin{aligned}\hat{z}^t\hat{y} =0 \,\wedge \; \exists Y \exists Z.\, \hat{y}Y+\hat{z}Z=I.\end{aligned}$$

In view of Fact 2.2 we have a polynomial \(p_\tau (x,y)\) over \(\mathbb {Z}\) and for each d the reduction \(\tau _d\) in time \(p_\tau (x,d)\) from \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\), where \(H \in \mathcal {H}_{\mathbb {R}}\) and \(\dim H=d\).

6.5 Reducing \({{\,\mathrm{\mathrm{uREF}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\)

Given d, let \(\phi _d({\bar{z}})\) be the conjunction of equations defining d-frames \({\bar{a}}\) such that \(a_\bot =0\) and \(a_\top =1\). Recall the term \(\delta _d(x,{\bar{z}})\) from Lemma 2.4. Now, given an unnested term \(T({\bar{x}})\) in the language of ortholattices, define \(\sigma _d(T)({\bar{x}})\) as

$$\begin{aligned} \exists {\bar{z}} \exists y.\, T({\bar{x}})=y \,\wedge \, \delta _d(y,{\bar{z}})=1 \,\wedge \, \phi _d({\bar{z}}) \end{aligned}$$

the prenex equivalent of which is an existentially quantified conjunction of equations. Then the following holds.

  • For any \(H\in \mathcal {H}_{\mathbb {R}}\), \(\dim H=d\), one has \({\mathsf{L}(H)}\models \exists {\bar{x}}.\,T({\bar{x}})\ne 0\) if and only if \({\mathsf{L}(H)}\models \exists {\bar{x}} \,\sigma _d(T)({\bar{x}})\).

Hence, there is a polynomial \(p_\sigma (x,y)\) over \(\mathbb {Z}\) such that \(\sigma _d\) is a \(p_\sigma (x,d)\)-time reduction from \({{\,\mathrm{\mathrm{uREF}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\), for each d and \(H \in \mathcal {H}_{\mathbb {R}}\), \(\dim H=d\).

6.6 Reducing \({{\,\mathrm{\mathrm{uREF}}\,}}_\mathcal {L}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) and proof of Theorem 6.1

Combining Sections 6.4 and 6.5, the reduction \(\rho _d\) from \({{\,\mathrm{\mathrm{uREF}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) given by \(\rho _d(T)=\tau _d(\sigma _d(T))\) is carried out in time \(p_\tau (p_\sigma (x,d),d)\). And, in view of Lemma 5.3, a p-time reduction of \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) is obtained applying \(\rho _d\) to T where \(d=o(T)\). Since \(o(T) \le |T|\), obviously, a polynomial bound in terms of |T| is given by \(p_\tau (p_\sigma (x,x),x)\).

By Fact 2.1 we derive a p-time reduction from \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {L}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_\mathcal {L}\). The converse reduction is Section 6.3.

6.7 Equivalences for arbitrary \({\mathsf{L}(H)}\)

Corollary 6.3

Any two of the following decision problems are p-time equivalent: \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\), \({{\,\mathrm{\mathrm{REF}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\), \({{\,\mathrm{\mathrm{SAT}}\,}}_{{{\,\mathrm{\mathsf L}\,}}(H)}\) where \(H \in \mathcal {H}\), \(\dim H\ge 3\), arbitrary.

Using non-deterministic BSS-machines, this has been derived in Corollaries 2.8 and 2.12 in [16].

Proof

The reduction from \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathsf{L}(H)}\) via \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathsf{L}(H)}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) is given by Sections 6.5 and 6.4 (in the complex case one has to use real and imaginary parts for the encoding into \(\mathbb {R}\)). Conversely, for fixed \(H \in \mathcal {H}\), the equivalence of (iv) and of the statements in (ii) and (iii) in Section 6.3 is valid (since ON-3-frames in lower sections of \({\mathsf{L}(H)}\) exist). \(\square \)

6.8 2-Distributive modular ortholattices

A (ortho)lattice L is 2-distributive if the identity

$$\begin{aligned}x \cap \sum _{i=0}^2 x_i = \sum _{j\ne k} x\cap (x_j+x_k)\end{aligned}$$

holds in L. Examples of such are, for any cardinal \(n>0\), the MOLs MO\(_n\) of height 2 with n pairs \(a,a^\perp \) of atoms. Put \(M_0=\mathbf{2}\).

Fact 6.4

  1. (i)

    Any finite MOL is 2-distributive.

  2. (ii)

    A 2-distributive MOL is subdirectly irreducible if and only if it is isomorphic to some MO\(_n\).

  3. (iii)

    For any class \(\mathcal {C}\) of 2-distributive MOLs, \(\mathsf{V}(\mathcal {C})\) is generated by some MO\(_n\), \(n \le \omega \).

Proof

Recall that in MOLs congruences are the same as lattice congruences. Thus, if L is a finite MOL, it is isomorphic to a direct product of subspace lattices \(L_i\) of finite irreducible projective spaces, and the \(L_i\) are MOLs. Thus, according to Baer [2], the \(L_i\) are of height \(\le 2\). Now let L be a 2-distributive subdirectly irreducible MOL. According to Jónsson [22], any complemented modular lattice L embeds into a direct product of subspace lattices \(L_i\) of irreducible projective spaces, \(L_i \in \mathsf{V}(L)\). Being a subdirectly irreducible lattice, L embeds into some \(L_i\) which is of height \(\le 2\) by 2-distributivity. Thus, L is of height \(\le 2\), whence isomorphic to some MO\(_n\). (iii) follows from the fact that MO\(_n\) embeds into MO\(_m\) for \(n \le m\) and that any variety is generated by its at most countable subdirectly irreducibles. \(\square \)

Proposition 6.5

If \(\mathcal {C}\) consists of 2-distributive MOLs, then \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {C}\) and \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {C}\) are \(\mathcal {NP}\)-complete.

Proof

That both are in \(\mathcal {NP}\) is [16, Proposition 1.19]. \(\mathcal {NP}\)-hardness of \({{\,\mathrm{\mathrm{SAT}}\,}}_\mathcal {C}\) is [16, Proposition 1.16]. Now, \(\mathsf{Eq}(\mathcal {C}) =\mathsf{Eq}(\mathrm{MO}_n)\) for some n by (iii) of Fact 6.4, whence its decision problem is co\(\mathcal {NP}\)-hard by [16, Theorem 1.20]. \(\square \)

7 Preliminaries: part III

7.1 Translations

Consider the quantifier free parts \(\Lambda _1\) and \(\Lambda _2\) of two first order languages with equality (also denoted by \(=\)). Let \({\bar{z}}\) be a string of variables in \(\Lambda _2\). Suppose that for each variable x in \(\Lambda _1\) there is given a term \(\tau (x)({\bar{z}})\) in \(\Lambda _2\) and, for each operation symbol f in \(\Lambda _1\) and term \(f({\bar{x}})\), a term \(\tau (f(\bar{x}))(\tau ({\bar{x}}),{\bar{z}})\) where \(\tau ({\bar{x}})\) denotes the string of \(\tau (x_i)\)’s. Then there is a unique extension to a map (also denoted by \(\tau \)) from \(\Lambda _1\) to \(\Lambda _2\) such that for any n-ary operation symbol f and terms \(t_i({\bar{y}}_i)\) in \(\Lambda _1\),

$$\begin{aligned}&\tau (f(t_1({\bar{y}}_1), \ldots , f(t_n({\bar{y}}_n)))\\&\quad =\tau (f)( \tau (t_i({\bar{y}}_1))(\tau ({\bar{y}}_1),{\bar{z}}), \ldots , \tau (t_n({\bar{y}}_n))(\tau ({\bar{y}}_n),{\bar{z}}) ,{\bar{z}}), \end{aligned}$$

(equality of terms) and such that an equation \(t({\bar{x}})= s({\bar{x}})\) is translated into the equation \(\tau (t({\bar{x}})) =\tau (s({\bar{x}}))\), and, finally, such that \(\tau \) is compatible with the propositional junctors.

Fact 7.1

The translation \(\tau (T({\bar{x}}))\) of unnested terms \(T({\bar{x}})\) is carried out in p-time.

Recall the translation \(\theta _i\) (Fact 2.1) within \(\Lambda _i\) of terms into unnested terms. Structural induction yields the following.

Fact 7.2

For any term \(t({\bar{x}})\) in \(\Lambda _1\), \(\tau (t({\bar{x}}))=y\) is logically equivalent to \(\tau (\theta _1(t({\bar{x}})))=y\).

In view of Fact 2.1, as an immediate consequence one obtains the following for classes \(\mathcal {A}_i\) of algebraic structures in the signature of \(\Lambda _i\).

Fact 7.3

If \(\tau \) restricts to a reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {A}_1}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {A}_2}\) then \(\theta _2 \circ \tau \) yields a p-time reduction of \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {A}_1}\) to \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {A}_2}\).

7.2 \(*\)-Regular rings

A \(*\)-ring is a ring (with unit) having as additional operation an involution \(a \mapsto a^*\). This involution is proper if \(aa^*=0\) only for \(a=0\). A ring R with proper involution is \(*\)-regular if, for any \(a\in R\), there is \(x\in R\) such that \(axa=a\); equivalently, for any \(a \in R\) there is a [Moore-Penrose] pseudo-inverse (or Rickart relative inverse) \(a^+ \in R\), that is,

$$\begin{aligned}a=aa^+a,\quad a^+=a^+aa^+,\quad (aa^+)^*=aa^+,\quad (a^+a)^*=a^+a;\end{aligned}$$

cf. [23, Lemma 4]. In this case, \(a^+\) is uniquely determined by a and will be considered an additional unary fundamental operation \(q(a)=a^+\) of the \(*\)-regular ring R. Thus, \(*\)-regular rings form a variety. An element e of a \(*\)-regular ring is a projection if \(e=e^2=e^*\). For such e, one has \(e=e^+\); also, each \(aa^+\) is a projection.

Lemma 7.4

  Within the class of \(*\)-regular rings with pseudo-inversion, any conjunction of equations is equivalent to a single one of the form \(t=0\), to be obtained in p-time.

Proof

Let R be any \(*\)-regular ring. If \(e^2=e\) and \(1=er\) for some r, then \(e=e^2r=er=1\). Thus, by induction, if \(\prod _{i=1}^n e_i=1\) with idempotents \(e_i\) then \(e_i=1\) for all \(e_i\). Now, the given equations may be assumed to have the form \(t_i({\bar{x}})=0\). Put \(t({\bar{x}})=1-\prod _i (1- t_it^+_i)\). Then \(t({\bar{a}})=0\) if and only if \(1-t_it_i^+({\bar{a}})=1\) for all i, that is \(t_it_i^+({\bar{a}})=0\) which means \(t_i(a)=0\). \(\square \)

The endomorphisms of a finite dimensional Hilbert space H over \(\mathbb {F}\in \{\mathbb {R},\mathbb {C}\}\) form a \(*\)-regular ring \({{\,\mathrm{\mathsf{End}}\,}}(H)\) where \(f^*\) is the adjoint of f and where the projections are the orthogonal projections \(\pi _U\) onto subspaces U. Moreover, \(f^+\) is given by \(f^+|_{W^\perp }=0\) and \(f^+|_W:W \rightarrow U\) being the inverse of \(f|_{U}:U\rightarrow W\) where \(U=(\ker f)^\perp \) and \(W= {{\,\mathrm{\mathsf{im}}\,}}f\). \({{\,\mathrm{\mathsf{End}}\,}}(H)^+\) will denote \({{\,\mathrm{\mathsf{End}}\,}}(H)\) endowed with this additional operation.

7.3 Ortholattices of projections

The projections of a \(*\)-regular ring R form a modular ortholattice \(\mathsf{L}(R)\) where the partial order is given by \(e \le f \Leftrightarrow fe=e \Leftrightarrow ef=e\), least and greatest elements as 0 and 1, join and meet as

$$\begin{aligned} e \cup f= f+ (e(1-f))^+ e (1-f),\quad e \cap f = (e^\perp \cup f^\perp )^\perp \end{aligned}$$

and the orthocomplement as \(e^\perp =1-e\). Moreover, for a finite dimensional Hilbert space H, \(e \mapsto \mathsf{im}\,e\) is an isomorphism of \(\mathsf{L}({{\,\mathrm{\mathsf{End}}\,}}(H))\) onto \(\mathsf{L}(H)\). Thus, associating with each ortholattice variable x a ring variable \(\hat{x}\) and replacing each occurrence of x by \(\hat{x}\hat{x}^+\) one obtains an (EXP-time) interpretation of \(\mathsf{L}(R)\) within R, uniformly for all \(*\)-regular rings.

7.4 Capturing pseudo-inverse

Recall from Sections 5.6 and 5.7 the concept of an ON-3-frame \({\bar{a}}\) in \(\mathsf{L}(H)\) and its associated coordinate ring \(R({\bar{a}})\) with involution \(r \mapsto r^{\dagger _{{\bar{a}}}}\), isomorphic to \({{\,\mathrm{\mathsf{End}}\,}}(a_1)\) as a \(*\)-ring via \(\omega _{{\bar{a}}}\). We have to capture the additional operation \(f \mapsto f^+\) of pseudo-inversion on \({{\,\mathrm{\mathsf{End}}\,}}^+(H_1)\), \(H_1\) a subspace of H such that \(\dim H \ge 3 \dim H_1\). Indeed, for any ON-3-frame \({\bar{a}}\) of \(\mathsf{L}(H)\) (and there is one such that \(a_1=H_1\)) and for any \(r=\omega _{{\bar{a}}} f\), \(f\in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\), one has \( \mathsf{ker }f=\mathsf{ker}(r,{\bar{a}})\) and \({{{\,\mathrm{\mathsf{im}}\,}}}f = \mathsf{im}(r,{\bar{a}})\) where

$$\begin{aligned} \mathsf{ker}(x,{\bar{z}}):= x \cap z_1 \text{ and } \mathsf{im}(x,{\bar{z}}) := ((x+z_1)\cap z_2 +z_{12})\cap z_1.\end{aligned}$$

Indeed, \(\omega _{{\bar{a}}}(f)\cap a_1=\{v -\varepsilon _{{\bar{a}}}f(v)\mid v \in a_1,\, \varepsilon _{{\bar{a}}}f(v)=0\}=\{v\in a_1\mid f(v)=0\}\) and \((\omega _{{\bar{a}}}(f)+a_1)\cap a_2= \{ \varepsilon _{{\bar{a}}}f(v)\mid v \in a_1\}\) whence one has \({{\,\mathrm{\mathsf{im}}\,}}(\omega _{{\bar{a}}}(f),{\bar{a}}) = \{x - \varepsilon _{{\bar{a}}}(x) +\varepsilon _{{\bar{a}}}f(v)\mid x,v \in a_1\}\cap a_1 = \{x \in a_1\mid \exists v \in a_1.\,\varepsilon _{{\bar{a}}}(x) =\varepsilon _{{\bar{a}}}f(v)\} ={{\,\mathrm{\mathsf{im}}\,}}f\).

Thus, with \(s(x,{\bar{z}})\) from Fact 5.1 one obtains an ortholattice term capturing pseudo-inversion, uniformly for all \(H_1 \in \mathcal {H}\). Define

$$\begin{aligned} {{\,\mathrm{\mathsf{im}}\,}}^+(x,{\bar{z}})&:=(z_1\cap \ker (x,{\bar{z}})^\perp +z_{12})\cap (z_1+z_2)\\ \psi _0(x,{\bar{z}})&:=s(x,{\bar{z}}) \cap ({{\,\mathrm{\mathsf{im}}\,}}(x,{\bar{z}}) + {{\,\mathrm{\mathsf{im}}\,}}^+(x,{\bar{z}}))\\ \psi (x,{\bar{z}})&:= \psi _0(x,{\bar{z}}) +z_1\cap (\mathsf{im}(x,{\bar{z}}))^\perp . \end{aligned}$$

Lemma 7.5

For each ON-3-frame \({\bar{a}}\) in \({{\,\mathrm{\mathsf L}\,}}(H)\), \(H \in \mathcal {H}\), and all \(f \in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\) one has \(\omega _{\bar{a}}(f^+)=\psi (\omega _{{\bar{a}}}(f),{\bar{a}})\).

Proof

Put \(r=\omega _{{\bar{a}}}(f)\). Then \({{\,\mathrm{\mathsf{im}}\,}}^+_2(r,{\bar{a}})= \varepsilon ^{ \bar{a}}_{12}({{\,\mathrm{\mathsf{im}}\,}}f^+) \) and, in view of Fact 5.1, \(\psi _0(r,{\bar{a}})\) consists of the \(f\varepsilon _{{\bar{a}}}^{-1}(w) -w\) where \( w \in a_2\) and \(w=\varepsilon _{{\bar{a}}}f^+(v_2)\) for some \(v_2\in {{\,\mathrm{\mathsf{im}}\,}}f\) and \( f \varepsilon _{{\bar{a}}}^{-1}(w)= f(v_1)\) for some \(v_1 \in {{\,\mathrm{\mathsf{im}}\,}}f^+\). It follows that \(f(v_1)= f f^+(v_2)=v_2\) and \(f \varepsilon _{\bar{a}}^{-1}(w)-w= v_2- (\varepsilon _{{\bar{a}}} f^+)(v_2)\), that is, \(\psi _0(r,{\bar{a}})= \{v_2 -\varepsilon _{{\bar{a}}} f^+(v_2)\mid v_2 \in {{\,\mathrm{\mathsf{im}}\,}}f\}\). \(\square \)

8 Complexity of the equational theory of \(\mathcal {R}\)

For finite dimensional real or complex Hilbert spaces H, let \({{\,\mathrm{\mathsf{End}}\,}}^+(H)\) denote the endomorphism \(*\)-ring with pseudo-inversion; let \(\mathcal {R}\) denote the class of all these. In analogy to Fact 6.2 we have the following.

Fact 8.1

For any \(\mathcal {C} \subseteq \mathcal {R}\), the variety \(\mathsf{V}(\mathcal {C})\) either is generated by one or two members of \(\mathcal {C}\) or it equals \(\mathcal {R}\) and is generated by any family in \(\mathcal {R}\) having unbounded dimensions.

We mention that \(\mathsf{V}(\mathcal {R})\) contains all finite Rickart \(C^*\)-algebras [14, Theorem 2]. According to [17, Theorem 22], \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {R}}\) is undecidable. Our main result is as follows.

Theorem 8.2

The decision problems \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\), \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\), \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\), \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\), and \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) are pairwise p-time equivalent; in particular, the equational theory of \({\mathcal {R}}\) is decidable.

Decidability of the equational theory is also shown in unpublished joint work with Marina Semenova by reduction to decidability of the reals.

8.1 Outline

The reduction from \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) is established in Section 8.2, directly. Concerning the reduction in the converse direction, recall that the reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) relied on the fact that \(t({\bar{x}})=0\) fails in \(\mathcal {L}\) if it does so in some \({{\,\mathrm{\mathsf L}\,}}(H)\), \(\dim H\) polynomially bounded by the length of \(t({\bar{x}})\). We make use of this, reducing via \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {L}\). Though, expressing pseudo-inversion within the coordinate ring of an ON-3-frame requires multiple occurrences of the principal variable causing exponential blowup when translating terms. Therefore, we reduce \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\) to \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\) in Section 8.3. The Theorem then follows from Section 6.6.

A term for quasi-inversion is essential for the above hardness result and similar ones in fixed finite dimension. Considering polynomial identities for matrix rings in fixed dimension, lower bounds on proof complexity have been established by Tzameret et al. [24].

8.2 Reduction from \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_\mathcal {R}\)

Recall from Section 7.2 that, for any \(f \in {{\,\mathrm{\mathsf{End}}\,}}(H)\), \(ff^+\) is a projection such that \({{\,\mathrm{\mathsf{im}}\,}}f={{\,\mathrm{\mathsf{im}}\,}}ff^+\). Thus, according to Section 7.3, there is a binary term \(x\cap y\) in the language of \(*\)-rings with pseudo-inversion such that \(f\cap g\) is the orthogonal projection onto \({{\,\mathrm{\mathsf{im}}\,}}f \cap {{\,\mathrm{\mathsf{im}}\,}}g\), for all \(f,g \in {{\,\mathrm{\mathsf{End}}\,}}(H)\) and \(H \in \mathcal {H}\). Similarly, the term \(k(x):=1- x^{*}x^{*+}\) is such that k(f) is the orthogonal projection onto \(\ker f = ({{\,\mathrm{\mathsf{im}}\,}}f^*)^\perp \).

Lemma 8.3

For all \(\mathcal {C}\subseteq \mathcal {R}\), containing a non-zero member, there is a uniform p-time reduction of \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\).

Proof

Given a multivariate polynomial \(p({\bar{x}})\) with integer coefficients, choose new variables \(y_i\) and define the following term in the language of \(*\)-rings with pseudo-inversion (considering \(p({\bar{x}})\) a ring term):

$$\begin{aligned} p^\circ ({\bar{x}},{\bar{y}}):= k(p(x_1q +(1-q),\ldots , x_nq +(1-q)) \end{aligned}$$

where

$$\begin{aligned}q:=q({\bar{x}},{\bar{y}}):= k(p({\bar{x}})) \cap \bigcap _i k(x_i+x_i-(y_i+y^*_i)) \cap \bigcap _{i,j} k(y_iy_j^* -y_j^*y_i) \end{aligned}$$

and where \(\bigcap \) stands for suitable iterations of \(\cap \). Observe that for any substitution \({\bar{x}} \mapsto {\bar{f}}\), \({\bar{y}} \mapsto {\bar{g}}\) within \({{\,\mathrm{\mathsf{End}}\,}}(H)\), the \(f_iq({\bar{f}},{\bar{g}})+(1-q({\bar{f}},{\bar{g}}))\) are self-adjoint, equal to \(\frac{1}{2} (g_iq({\bar{f}},{\bar{g}})+g^*_iq({\bar{f}},{\bar{g}})) + 1-q({\bar{f}},{\bar{g}})\), and commute pairwise. On the other hand, given any self-adjoint and pairwise commuting \(f_i=g_i\) one has \(q({\bar{f}},{\bar{g}})={{\,\mathrm{\mathsf{id}}\,}}\) and it follows that \(p^\circ ({\bar{f}},{\bar{g}})\) is the projection onto \(\mathsf{ker}\,p({\bar{f}})\) and that \(p^\circ ({\bar{f}},{\bar{g}})=0\) if and only if \(p({\bar{f}})\) is invertible. Now, in view of the Spectral Theorem as in the proof of Theorem 6.1, given \(H\in \mathcal {C}\), one has \(p^\circ ({\bar{f}},\bar{g})= 0\) for all \({\bar{f}},{\bar{g}}\) in \({{\,\mathrm{\mathsf{End}}\,}}(H)\) if and only if \(p(\bar{x})\) has no zero in \(\mathbb {R}\). \(\square \)

8.3 Reducing \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\) to \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\) and proof of Theorem 8.2

In view of Sections 2.6, 5.6, and 7.4, for each operation symbol g (with associated basic equation \(y=g({\bar{x}})\)) in the language of \(\mathcal {R}\), there is an ortholattice term \(\hat{g}({\bar{x}},{\bar{z}})\) such that for any \(H \in \mathcal {H}\) and ON-3-frame \({\bar{a}}\) of \({{\,\mathrm{\mathsf L}\,}}(H)\) one has, for all \(f_i \in {{\,\mathrm{\mathsf{End}}\,}}(a_1)\) and \(r_i=\omega _{{\bar{a}}} f_i\) in \(R({\bar{a}})\),

$$\begin{aligned}{{\,\mathrm{\mathsf{End}}\,}}(a_1) \models g({\bar{f}})=f_0\;\Leftrightarrow \;R({\bar{a}})\models \hat{g}({\bar{r}},{\bar{a}})=r_0.\end{aligned}$$

Recall Lemma 5.7 and the retractive terms \({\bar{a}}({\bar{z}})\) for ON-3-frames \({\bar{a}}\) and \(r_i(x_i,{\bar{z}})\) for elements of \(R({\bar{a}})\). For each operation symbol g in the language of \(\mathcal {R}\) define

$$\begin{aligned}\tau (g({\bar{x}})):= \hat{g}({\bar{r}}({\bar{x}}, {\bar{a}}({\bar{z}})),{\bar{a}}({\bar{z}})), \end{aligned}$$

where \({\bar{r}}({\bar{x}},{\bar{a}}({\bar{z}}))\) is the string of the \(r_i(x_i,{\bar{a}}({\bar{z}}))\). According to Section 7.1, this defines a translation \(\tau \) from the language of \(\mathcal {R}\) to that of \(\mathcal {L}\). Since any \(H_1 \in \mathcal {H}\) occurs as \(a_1\) for some ON-3-frame \({\bar{a}}\) of \(\mathsf{L}(H)\), for some extension H in \(\mathcal {H}\), \(\tau \) provides a (EXP-time) reduction of the equational theory of \(\mathcal {R}\) to that of \(\mathcal {L}\); that is, of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\). Thus, by Facts 2.1 and 7.3, \(\tau \) provides a p-time reduction from \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) (via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\)) to \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\).

Together with Section 6.6 one obtains a p-time reduction from \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\) and \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {L}}\). The converse reduction is Lemma 8.3. The reduction of \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {L}}\) is Section 6.3.

8.4 Dimension bounds in \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {R}}\)

With Lemma 5.3, Section 8.3 yields the following.

Corollary 8.4

There is a polynomial p(x) such that an equation \(t({\bar{x}})\) fails in \(\mathcal {R}\) if and only if it does so in \({{\,\mathrm{\mathsf{End}}\,}}^+(H)\) for some H with \(\dim H\le p(|t|)\).

9 The category of finite dimensional Hilbert spaces

Finite dimensional Hilbert spaces have a prominent rôle in the approach to Quantum Mechanics in terms of Category Theory, see e.g. Abramsky and Coecke [1] and, for equational aspects, Selinger [28].

Let \(\mathcal {H}\) denote the additive category of finite dimensional Hilbert spaces, enriched by the contravariant functor of adjunction, cf. [1, 19, 28]. Let \(\mathcal {H}^+\) arise from \(\mathcal {H}\) by endowing each endomorphism \(*\)-ring \({{\,\mathrm{\mathsf{End}}\,}}(H)\) also with the operation of pseudo-inversion. Both \(\mathcal {H}\) and \(\mathcal {H}^+\) shall be considered as two-sorted partial algebraic structures: one sort for objects, one for morphisms. Also, we require unary operations \(\delta \) and \(\rho \) from morphisms to objects yielding domain and codomain as well as \(\iota \) associating the identity on H with the object H. Also, we have the map \(\omega \) associating with objects \(H_1,H_2\) the zero map from \(H_1\) to \(H_2\). Speaking about subcategories we require closure under the additive structure and these operations.

Terms are built from morphism variables \(x_i\) and expressions \(\iota (v_i)\) and \(\omega (v_i,v_j)\) with object variables \(v_i,v_j\), subject to rules which grant evaluation in \(\mathcal {H}\) respectively \(\mathcal {H}^+\). Namely, with each term t we associate object variables for domain and codomain, denoted by \(\delta (t)\) and \(\rho (t)\). We require \(\delta (\iota (v_i))=v_i=\rho (\iota (v_i))\), \(\delta (\omega (v_i,v_j)) =v_i\), \(\rho (\omega (v_i,v_j))=v_j\); moreover, \(t=t_2 \circ t_1\) is defined if and only if \(\delta (t_2)=\rho (t_1)\) and then \(\delta (t)=\delta (t_1)\) and \(\rho (t)=\rho (t_2)\); similarly, for the other symbols for operations on the sort of morphisms. Compare [28, Section 5].

Defining unnested terms \(T=(\phi _T,y_T)\) in analogy to Section 2.1, the conditions on \(\delta \) and \(\rho \) are included as conjuncts into \(\phi _T\). An assignment \(\gamma \) admissible for a term t (unnested term T) assigns a morphism \(\gamma (z)\) and an object \(\gamma (v)\) to each morphism variable z and object variable v occurring in t (T) such that \(\gamma (z) \in \mathsf{Hom}(\gamma (\delta (z)),\gamma (\rho (z)))\) for each z, \(\iota (v)\in {{\,\mathrm{\mathsf{End}}\,}}(\gamma (v))\), and \(\gamma (\omega (v_i,v_j)) \in \mathsf{Hom}(\gamma (v_i),\gamma (v_j))\) for all \(v,v_i,v_j\) (and such that \(\phi _T\) is satisfied). Such \(\gamma \) provides a unique evaluation \(\gamma (t)\) (\(\gamma (T)\)); in particular, \(\gamma (x)=\gamma (x_1)\circ \gamma (x_2)\) if \(x=x_1 \circ x_2\) occurs in \(\phi _T\).

Satisfiability and refutability of (unnested) equations are defined w.r.t. admissible assignments in analogy to Section 2.1. Observe that within \(\mathcal {H}\) (\(\mathcal {H}^+\)) any equation is equivalent to one where one side is a zero. This yields the decision problems \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\), \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\) and their unnested variants \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\) and \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {C}}\) for subcategories \(\mathcal {C}\) of \(\mathcal {H}\) and \(\mathcal {H}^+\). Observe the p-time reductions of \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\) to \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\) and \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\) to \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {C}}\).

Fact 9.1

With any equation \(\eta \) in the language of \(*\)-rings one associates in p-time an equation \(\eta '\) in the language of \(\mathcal {H}\) such that, for any subcategory \(\mathcal {C}\) of \(\mathcal {H}\) one has \(\eta '\) satisfiable respectively refutable in \(\mathcal {C}\) if and only if \(\eta \) is so in the class of \({{\,\mathrm{\mathsf{End}}\,}}(H)\), H ranging over objects of \(\mathcal {C}\); similarly, with the language of \(\mathcal {R}\), \(\mathcal {H}^+\), and \({{\,\mathrm{\mathsf{End}}\,}}^+(H)\). Also, the analogues hold for unnested equations.

Proof

Choose a single object variable v and put \(\delta (t)=\rho (t)=v\) for all subterms t occurring in \(\eta \). \(\square \)

Theorem 9.2

  1. (i)

    Let \(\mathcal {C}\) be a subcategory of \(\mathcal {H}^+\) respectively \(\mathcal {H}\) with finitely many objects including some non-zero H. In case of \(\mathcal {H}^+\), the decision problems \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\), \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\), \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\), and \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {C}}\) are each p-time equivalent to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\); in case of \(\mathcal {H}\) so are \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\) and \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\). In particular, decidability holds in all cases.

  2. (ii)

    \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\) and \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\) are undecidable for \(\mathcal {C}=\mathcal {H},\,\mathcal {H}^+\).

  3. (iii)

    \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {H}^+}\) and \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {H}^+}\) are both decidable and each is p-time equivalent to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\).

Proof

Lemma 8.3 and Fact 9.1 provide, for any subcategory \(\mathcal {C}\) of \(\mathcal {H}^+\), a p-time reduction of \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) to \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\).

In (i), given \(\mathcal {C}\) with finitely many objects, let d be the maximal dimension of an object in \(\mathcal {C}\). Introducing coordinates one obtains a p-time reduction of \({{\,\mathrm{\mathrm{uSAT}}\,}}_{\mathcal {C}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\). A p-time reduction of \({{\,\mathrm{\mathrm{REF}}\,}}_{\mathcal {C}}\) to \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\) (and, similarly, for the unnested variants) can be based on the observation that for \(f \in \mathsf{Hom}(H',H)\) one has \(f \ne \omega (H',H)\) if and only if there are \(g_i \in {{\,\mathrm{\mathsf{End}}\,}}(H)\) such that \({{\,\mathrm{\mathsf{id}}\,}}_H= \sum _{i=1}^d g_i\circ f\) where \(\dim H\le d\).

Now, let \(H \in \mathcal {C}\) with \(d=\dim H\). \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) reduces to \({{\,\mathrm{\mathrm{SAT}}\,}}_{\mathcal {C}}\) requiring, in a conjunction of equations with unique object variable v, a system of \(d\times d\) \(*\)-matrix units \(e_{ij}\) such that \(\iota (v)\) evaluates to \(\sum _{ii} e_{ii}\) and interpreting \(\mathbb {R}\) as the set of \(r \in {{\,\mathrm{\mathsf{End}}\,}}(H)\) such that \(r=r^*=e_{11}re_{11}\) cf. [16, Theorem 4.4].

Undecidability in (ii) follows from Fact 9.1 and [17, Theorem 22].

In order to prove in (iii) the reduction to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\), we relate subcategories \(\mathcal {C}\) with n objects to \(({{\,\mathrm{\mathsf{End}}\,}}^+(H);{\bar{\pi }})\) where H is a finite dimensional Hilbert space and \({\bar{\pi }}\) an n-tuple of orthogonal projections in \({{\,\mathrm{\mathsf{End}}\,}}(H)\). Given H and \({\bar{\pi }}\), let \(\mathcal {C}_{H{\bar{\pi }}}\) have objects \(H_i={{\,\mathrm{\mathsf{im}}\,}}\pi _i\); then \(\mathsf{Hom}(H_i,H_j)\) consists of the \(\pi '_j\circ f \circ \varepsilon _i\), \(f \in {{\,\mathrm{\mathsf{End}}\,}}(H)\), where \(\pi '_j\in \mathsf{Hom}(H,H_j)\) is the orthogonal projection onto \(H_j\) and \(\varepsilon _i\) the identity embedding of \(H_i\) into H. Given \(\mathcal {C}\) with objects \(H_i\) let \(H_{\mathcal {C}}\) be given by \(H=\bigoplus ^\perp _i H_i\) and \(\pi _i\) the orthogonal projection onto the summand corresponding to \(H_i\). Observe that \(\mathcal {C}\) is isomorphic to \(\mathcal {C}_{H_{\mathcal {C}}}\).

To translate an unnested equation \(\eta \) in the language of \(\mathcal {H}^+\) into an unnested equation \(\tau (\eta )\) in the language of \(\mathcal {R}\), consider both morphism and object variables as variables for \(\mathcal {R}\). Delete the side conditions on domain and range and read \(\circ , +,-,^*,^+\) as operation symbols for \(\mathcal {R}\). Replace any \(\omega (v_1,v_2)\) by 0 and \(\iota (v)\) by \(vv^+\). Replace any morphism variable z in the resulting formula by the \(\mathcal {R}\)-term \(\hat{z}\) given as

$$\begin{aligned} \rho (z)\circ \rho (z)^+ \circ z \circ \delta (z)\circ \delta (z)^+.\end{aligned}$$

Now, assume that \(\eta \) fails in \(\mathcal {H}^+\); then it does so in some subcategory \(\mathcal {C}\) with finitely many objects and \(\tau (\eta )\) fails in \(H_{\mathcal {C}}\): Given a failing assignment obtain one in \(H_{\mathcal {C}}\), namely associate with \(z \mapsto f\in \mathsf{Hom}(H_i,H_j)\), \(v \mapsto H_k\) in \(\mathcal {C}\) the assignment \(z \mapsto \varepsilon _j\circ f \circ \pi '_i\), \(v \mapsto \pi _k\). Conversely, assume a failing assignment for \(\tau (\eta )\) in \({{\,\mathrm{\mathsf{End}}\,}}^+(H)\) with values \(\pi _i\) for the terms \(v_iv_i^+\), \(v_i\) an object variable occurring in \(\eta \). Form \(\mathcal {C}=\mathcal {C}_{H{\bar{\pi }}}\) to obtain a failing assignment for \(\eta \) where \(v_k \mapsto H_k={{\,\mathrm{\mathsf{im}}\,}}\pi _k\) and \(z \mapsto \pi _j \circ f \circ \varepsilon _i\) if \(\hat{z}\) is evaluated to \(\pi '_j \circ f \circ \pi _i\). This provides a p-time reduction of \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {H}^+}\) via \({{\,\mathrm{\mathrm{uREF}}\,}}_{\mathcal {R}}\) to \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) according to Section 8.3. \(\square \)

Omitting pseudo-inversion, any term is equivalent to one where \(^*\) occurs only in the form \(x_i^*\). Thus, a polynomial dimension bound for refutation can be established, directly. Namely, for any such term t, \({\bar{f}}\) in \({{\,\mathrm{\mathsf{End}}\,}}(H)\), and \(a \in H\) one has \(t(\bar{f})(a)= t({\bar{g}})(a)\) where \(g_i=\pi _U \circ f_i\circ \varepsilon _U\) and U is the subspace spanned by the \(s({\bar{f}})(a)\), s a subterm of t. This gives the upper complexity bound.

Similarly, consider the category \(\mathcal {H}\) and such term \(t({\bar{x}})\), admissible substitution \({\bar{f}}\) of morphisms, and a such that \(t({\bar{f}})(a)\) is defined. By recursion, one defines a subspace \(H_{t{\bar{f}} a}\) of H for each \(H\in \mathcal {H}\) to obtain the objects of a category \(\mathcal {H}_{t{\bar{f}} a}\) in which \(t({\bar{f}})(a)\) evaluates the same as in \(\mathcal {H}\); here, one has a polynomial bound on the sum of the dimensions of objects. Again, this gives the complexity of \({\mathrm{FEAS}_{\mathbb {Z},\mathbb {R}}}\) as an upper bound for deciding identities.