1 Introduction

The Bell–Kochen–Specker theorem [1, 9] is an important no-go theorem in quantum mechanics, which proves the incompatibility of quantum physics with local hidden-variable theories. The Kochen–Specker proof is based on a construction of a set of 117 vectors from \(\mathbb{R}^3\) admitting no \(\{0,1\}\)-coloring (definitions follow).

Since then, many simplifications of the proof appeared in the sense of the number of vectors needed, 33 in [12] and 31 in [13]. Another notable result is a simple proof of Kochen–Specker theorem in 4 dimensions, which uses 18 vectors [2].

There are numerous generalizations of the Kochen–Specker theorem, e.g., using rational vectors [4, 7], or replacing a \(\{0,1\}\)-coloring with a \(\mathbb{Z}_2\)-coloring. It was shown in [14], that there is no \(\mathbb{Z}_2\)-coloring of vectors in \(\mathbb{R}^4\) and consequently no \(\mathbb{Z}_2\)-coloring in dimensions greater than four, see [11]. We show that there is no non-constant \(\mathbb{Z}_2\)-coloring even for \(\mathbb{R}^3\), which was an open question, formulated, e.g., in [6, 10]. The existence of a \(\mathbb{Z}_2\)-coloring in \(\mathbb{R}^2\) is trivial; hence we answer the only remaining case.

A computer was used to symbolically solve a system of two polynomial equations in two variables.

2 Definitions

We will work in \(\mathbb{R}^3\), so we restrict the definitions to this case.

  1. 1.

    A \(\{0,1\}\)-coloring is a mapping \(m: \mathbb{R}^3 \setminus \{\mathbf{0}\} \rightarrow \{0,1\}\) such that, for every three pairwisely orthogonal vectors, \(\mathbf{u}, \mathbf{v}, \mathbf{w}\), it holds that \(m(\mathbf{u}) + m(\mathbf{v}) + m(\mathbf{w}) = 1\).

  2. 2.

    A \(\mathbb{Z}_2\)-coloring is a mapping \(m: \mathbb{R}^3 \setminus \{\mathbf{0}\} \rightarrow \{0,1\}\) such that, for every three pairwisely orthogonal vectors, \(\mathbf{u}, \mathbf{v}, \mathbf{w}\), it holds that \(m(\mathbf{u}) \oplus m(\mathbf{v}) \oplus m(\mathbf{w}) = 1\), where \(\oplus \) denotes addition modulo 2.

  3. 3.

    Two vectors, \(\mathbf{u}\), \(\mathbf{v}\), are called isochromatic if \(m(\mathbf{u}) = m(\mathbf{v})\) for all \(\mathbb{Z}_2\)-colorings m.

We are interested in \(\mathbb{Z}_2\)-colorings and we call them just colorings in the sequel. We are not interested in coloring of the origin. For brevity, we write vector instead of non-zero vector. Any two linearly dependent vectors are isochromatic, and so are all vectors of any one-dimensional subspace of \(\mathbb{R}^3\). For simplicity, we call such subspaces rays and will use vectors and rays interchangeably. Standard linear-algebraic definitions of the dot product, cross product, and angles are used, where the angle between two rays is between 0 and \(\pi /2\).

3 Basic Construction

At first, a construction of 21 rays is shown. It contains three non pairwisely-orthogonal rays \(\mathbf{u}\), \(\mathbf{r}\), \(\mathbf{o}\) such that in every coloring m, \(m(\mathbf{u}) \oplus m(\mathbf{r}) \oplus m(\mathbf{o}) = 1\). In Sect. 4, we shall show that this property of three rays is sufficient for every coloring to be constant.

The figure shows a hypergraph that represents a set of rays used in the proof of the main theorem. Vertices (dots) of the hypergraph represent rays. Its edges (smooth curves) represent orthogonality relations in such a way that two vertices contained in an edge are orthogonal. E.g., ray \(\mathbf{a}\) is orthogonal to rays \(\mathbf{b}, \mathbf{c}, \mathbf{f}, \mathbf{g}\).

We shall show that there exist rays with these orthogonality relations. We do so by the following explicit construction that ensures the orthogonality relations drawn by thin straight lines in the figure. Each line represents three binary orthogonality relations, ensured by the choice of vectors or by choosing one vector as the cross product of the remaining two orthogonal vectors. The construction uses two non-zero real parameters, xy, which will be specified later.Footnote 1

figure a

It remains to ensure the orthogonality relations drawn by bold round curves in the figure. The last line of the table contains the respective two framed cross products whose arguments need not be orthogonal. We shall achieve their orthogonality, \(\mathbf{s} \perp \mathbf{l}\), \(\mathbf{j} \perp \mathbf{t}\), by adjusting the parameters xy. This requires to solve the following system of two polynomial equations:

$$\begin{aligned} \mathbf{l} \cdot \mathbf{s}&= 0 \,,\\ \mathbf{t} \cdot \mathbf{j}&= 0 \,. \end{aligned}$$

It has real roots, e.g., the following:

$$\begin{aligned} y&= \frac{1}{3} \sqrt{1+\root 3 \of {163-9\sqrt{57}}+\root 3 \of {163+9\sqrt{57}}} \doteq 1.14\,, \\ x&= -\sqrt{\frac{y^2 + \sqrt{4y^8 + 16y^6 + 25y^4 + 16y^2 + 4}}{2y^2+2}} \doteq -1.61\,. \end{aligned}$$

We shall further verify that all the constructed vectors, \(\mathbf{a}, \mathbf{b}, \dots , \mathbf{u}\), are non-zero. It can be checked by a computer, but we show it for the sake of completeness. The vectors \(\mathbf{a}, \dots , \mathbf{g}\) are clearly non-zero. The cross product of two vectors is zero if and only if the vectors are linearly dependent. Assume to the contrary that some of the vectors are zero vectors. Let \(\mathbf{v}\) be the first such vector in alphabetical order, hence it is defined using only non-zero vectors. We inspect multiple cases and arrive at a contradiction in every branch:

  1. 1.

    If \(\mathbf{v} \in \{\mathbf{i}, \mathbf{j}, \mathbf{l}, \mathbf{m}, \mathbf{o}, \mathbf{p}, \mathbf{r}, \mathbf{s}\}\), then it is a cross product of two orthogonal vectors.

  2. 2.

    If \(\mathbf{v} = \mathbf{h} = \mathbf{e} \times \mathbf{g}\): The contradiction is immediate.

  3. 3.

    If \(\mathbf{v} = \mathbf{k} = \mathbf{b} \times \mathbf{i}\): Vector \(\mathbf{i}\) is orthogonal to \(\mathbf{g}\), but \(\mathbf{b}\) is not.

  4. 4.

    If \(\mathbf{v} = \mathbf{n} = \mathbf{m}\times \mathbf{f}\): Vector \(\mathbf{m}\) is orthogonal to \(\mathbf{b}\), but \(\mathbf{f}\) is not.

  5. 5.

    If \(\mathbf{v} = \mathbf{q} = \mathbf{d} \times \mathbf{p}\): Vector \(\mathbf{p}\) is orthogonal to \(\mathbf{f}\), but \(\mathbf{d}\) is not.

  6. 6.

    If \(\mathbf{v} \in \{\mathbf{t}, \mathbf{u}\}\): We have chosen xy such that \(\mathbf{v}\) is a cross product of two orthogonal vectors.

Suppose that there is a coloring, m. Then we sum its values over all vertices of all 13 edges:

$$\begin{aligned} s = \bigoplus _{e \in E}\bigoplus _{\mathbf{v}\in e} m(\mathbf{v}) \equiv 13 \equiv 1 \qquad ({\text{mod}} \,2)\,. \end{aligned}$$

Vertices from \(F=\bigcup E\setminus \{\mathbf{r}, \mathbf{u}, \mathbf{o}\}\) are contained twice in the latter sum, thus their coloring does not influence the result. Only vertices \(\mathbf{r}, \mathbf{u}, \mathbf{o}\) are contained in a single edge. We may rewrite the sum as

$$\begin{aligned} s = 2\biggl (\bigoplus _{\mathbf{v}\in F} m(\mathbf{v})\biggr ) \oplus m(\mathbf{r}) \oplus m(\mathbf{u}) \oplus m(\mathbf{o}) = m(\mathbf{r}) \oplus m(\mathbf{u}) \oplus m(\mathbf{o}) = 1\,. \end{aligned}$$

It remains to prove that the rays \(\mathbf{r}, \mathbf{u}, \mathbf{o}\) are not all pairwisely orthogonal. We shall verify that \(\mathbf{r} \not \perp \mathbf{o}\). According to [5], the hypergraphs representing orthomodular lattices cannot contain cycles of lengths 3 or 4.Footnote 2 As \(\mathbf{r}, \mathbf{o}\) already have distance 3 in our hypergraph, they can be neither identified, nor connected by an edge, without breaking this rule; hence \(\mathbf{r} \ne \mathbf{o}\), \(\mathbf{r} \not \perp \mathbf{o}\).

Remark 3.1

We give a detailed argument for readers not familiar with the properties of hypergraphs of orthomodular lattices (Greechie diagrams). Suppose that \(\mathbf{r} \perp \mathbf{o}\). Then \(\mathbf{r} \times \mathbf{n}\) would be both \(\mathbf{o}\) and \(\mathbf{p}\), but these are distinct.

We do not verify that there are no other orthogonality relations not drawn in the figure, but this is not needed in the sequel. We could say more about the rays \(\mathbf{r}, \mathbf{u}, \mathbf{o}\): they are distinct, not coplanar, etc.

However, the hypergraph techniques have limitations; the fact that \(\mathbf{o} \ne \mathbf{u}\) does not follow from the hypergraph. Nevertheless, it can be checked for our particular case by computer algebra.

4 Application to the Coloring Problem

The coloring is independent of the choice of a coordinate system. For any orthonormal matrix \(\mathbf{U}\in \mathbb{R}^{3\times 3}\), if m is a coloring, then \(m':\mathbb{R}^3 \setminus \{\mathbf{0}\}\rightarrow \{0,1\}\), defined by \(m'(\mathbf{x}) = m(\mathbf{Ux})\), is also a coloring because the multiplication by an orthonormal matrix preserves the dot product.

Rotations and reflextions are represented by orthonormal matrices. For any two pairs of rays, \((\mathbf{u}, \mathbf{v}), (\mathbf{u}', \mathbf{v}')\), such that \(\angle (\mathbf{u},\mathbf{v})=\angle (\mathbf{u}',\mathbf{v}')\), i.e., \(\frac{\vert \mathbf{u} \cdot \mathbf{v} \vert }{\left\Vert \mathbf{u}\right\Vert \left\Vert \mathbf{v}\right\Vert } = \frac{\vert \mathbf{u}' \cdot \mathbf{v}' \vert }{\left\Vert \mathbf{u}'\right\Vert \left\Vert \mathbf{v}'\right\Vert }\), there exists an orthonormal matrix \(\mathbf{U}\) such that \(\mathbf{U}\mathbf{u}=\mathbf{u}'\) and \(\mathbf{U}\mathbf{v}=\mathbf{v}'\).

Corollary 4.1

If some pair of rays with angle \(\theta \) is isochromatic, then every pair of rays with angle \(\theta \) is isochromatic.

Theorem 4.2

If two different rays are isochromatic, then the only coloring is the constant one.

Proof

Let \(\mathbf{u},\mathbf{v}\) be isochromatic rays, \(\theta =\angle (\mathbf{u}, \mathbf{v})\ne 0\). We define \(\mathbf{S}\) as the set of all rays \(\mathbf{w}\) such that \(\angle (\mathbf{u}, \mathbf{w})=\theta \). All rays from \(\mathbf{S}\) are isochromatic and their mutual angles span the whole interval \([0, \min (\pi /2, 2\theta )]\). By Corollary 4.1, every pair of rays with angle in \([0, \min (\pi /2, 2\theta )]\) is isochromatic. We repeat this procedure, extending the result to larger angles, and after \(\lfloor \log _2{\frac{\pi }{2\theta }}\rfloor \) repetitions we obtain that all rays are isochromatic. \(\square \)

Theorem 4.3

If there are three different rays \(\mathbf{u}, \mathbf{v}, \mathbf{w}\) that are not all pairwisely orthogonal and a constant \(c\in \mathbb{Z}_2\) such that every coloring m satisfies \(m(\mathbf{u}) \oplus m(\mathbf{v}) \oplus m(\mathbf{w}) = c\), then every coloring is constant.

Proof

We split the proof into two cases. The first is when the three rays are coplanar. Then there is a ray \(\mathbf{n}\) orthogonal to all of \(\mathbf{u}, \mathbf{v}, \mathbf{w}\). (It need not be unique in singular cases, which are allowed here.) The rotation by \(\pi /2\) about \(\mathbf{n}\) maps \(\mathbf{u}\mapsto \mathbf{u'}\), \(\mathbf{v}\mapsto \mathbf{v'}\), \(\mathbf{w}\mapsto \mathbf{w'}\) and is represented by an orthonormal matrix \(\mathbf{U}\). We take an arbitrary coloring m and construct a coloring \(m'\), defined as \(m'(\mathbf{x}) = m(\mathbf{Ux})\). The values of \(\mathbf{u}, \mathbf{v}, \mathbf{w}\) are summing up to c in any coloring; hence also for \(m'\), then

$$\begin{aligned} c = m'(\mathbf{u}) \oplus m'(\mathbf{v}) \oplus m'(\mathbf{w}) = m(\mathbf{Uu}) \oplus m(\mathbf{Uv}) \oplus m(\mathbf{Uw}) = m(\mathbf{u'}) \oplus m(\mathbf{v'}) \oplus m(\mathbf{w'}). \end{aligned}$$

We say that rotation and reflection preserve coloring. Now we may continue with the equations:

$$\begin{aligned} m(\mathbf{u}) \oplus m(\mathbf{u'}) \oplus m(\mathbf{n})&= 1\,, \\ m(\mathbf{v}) \oplus m(\mathbf{v'}) \oplus m(\mathbf{n})&= 1\,, \\ m(\mathbf{w}) \oplus m(\mathbf{w'}) \oplus m(\mathbf{n})&= 1\,, \\ \underbrace{m(\mathbf{u}) \oplus m(\mathbf{v}) \oplus m(\mathbf{w})}_c&\\ \oplus \ \underbrace{m(\mathbf{u'}) \oplus m(\mathbf{v'}) \oplus m(\mathbf{w'})}_c&\\ \oplus \ m(\mathbf{n})\oplus m(\mathbf{n})\oplus m(\mathbf{n})&= 1\,,\\ m(\mathbf{n})&= 1\,. \end{aligned}$$

We determined the value of m at a single ray, \(\mathbf{n}\). As colorings are preserved by rotations, the same arguments apply to the images of \(\mathbf{n}\) (and all rays used in the construction) under any rotation. Due to the spherical symmetry, \(\mathbf{n}\) can be mapped to any other ray by some rotation, and m attains the constant value 1 at all rays.

The other case is when the rays \(\mathbf{u}\), \(\mathbf{v}\), \(\mathbf{w}\) are not coplanar. If the vectors are not pairwisely orthogonal, they contain a non-orthogonal pair. Without loss of generality, we assume that it is \((\mathbf{v}, \mathbf{w})\), i.e., \(\mathbf{v} \not \perp \mathbf{w}\). The reflection w.r.t. the plane \(\text{span}(\{\mathbf{u}, \mathbf{v}\})\) maps \(\mathbf{u}\) and \(\mathbf{v}\) to themselves, but maps \(\mathbf{w}\) to \(\mathbf{w}'\ne \mathbf{w}\). It preserves colorings, thus each coloring m satisfies

$$\begin{aligned} m(\mathbf{u}) \oplus m(\mathbf{v}) \oplus m(\mathbf{w})&= c, \\ m(\mathbf{u}) \oplus m(\mathbf{v}) \oplus m(\mathbf{w}')&= c, \\ m(\mathbf{w})&= m(\mathbf{w}') \end{aligned}$$

for two different rays \(\mathbf{w}, \mathbf{w'}\). A direct application of Theorem 4.2 finishes the proof. \(\square \)

Theorem 4.4

There is no non-constant \(\mathbb{Z}_2\)-coloring of a sphere in \(\mathbb{R}^3\).

Proof

This is a straightforward consequence of Theorem 4.3, applied to rays \(\mathbf{u}, \mathbf{r}, \mathbf{o}\) from the construction described in Sect. 3. \(\square \)

Remark 4.5

The rays \(\mathbf{u}, \mathbf{r}, \mathbf{o}\), constructed in Sect. 3, are not coplanar. However, the proof of this fact (cf. Rem. 3.1) is more complicated than the proof of the “coplanar” part of Theorem 4.3, which, possibly, could find application elsewhere.

We proved that there are two distinct sufficient properties (see Theorems 4.2, 4.3) for the coloring to be constant. Our collection of vectors satisfies the first oneFootnote 3, and by taking the union of our collection with its reflected copy about the plane \(\text{span}(\{\mathbf{u}, \mathbf{o}\})\), we arrive at a set of 40 vectorsFootnote 4, satisfying the secondFootnote 5 property. We proved Theorem 4.3 in a more general form than needed and for c not necessarily equal to 1.

5 Conclusions

The problem of hidden variables in quantum mechanics is equivalent to the existence of \(\{0,1\}\)-colorings. It was proved in the sixties that they are impossible in dimensions more than two. One of the elegant proofs [2] allowed to prove also the non-existence of \(\mathbb{Z}_2\)-colorings in dimensions greater than three [6, 11]. The case of dimension three remained an open problem. Here we answer it by proving the non-existence of \(\mathbb{Z}_2\)-colorings also in this case, thus answering the problem completely. From it, the version for \(\{0,1\}\)-colorings follows easily; thus we get another alternative proof of Bell–Kochen–Specker Theorem.

Our construction uses either 21 vectors to construct a gadget which forces certain three vectors to sum up to 1 in every coloring, or alternatively, a gadget of 40 vectors forcing certain two vectors to equal in every coloring. Here, a gadget stands for a collection of vectors having certain property. The use of gadgets in the context of Bell–Kochen–Specker constructions was recently employed in [15]. They showed that every collection of vectors which cannot be \(\{0, 1\}\)-colored necessarily uses a 01-gadget. The 01-gadget is a \(\{0,1\}\)-colorable collection of vectors, with two distinguished ones, \(\mathbf{x}\), \(\mathbf{y}\), \(\mathbf{x} \not \perp \mathbf{y}\), and for any \(\{0,1\}\)-coloring m it holds that \(m(\mathbf{x}) + m(\mathbf{y}) \le 1\).

The gadgets we constructed admitted to prove the more difficult case of \(\mathbb{Z}_2\)-colorings, and they also extend possible techniques of proving no-go theorems because they are based on new ideas. They enrich the gallery of clever techniques, proving an important result of quantum mechanics using elementary tools.