{'fraction_non_alphanumeric': 0.031630612615888024, 'fraction_numerical': 0.005615140681492254, 'mean_word_length': 4.406202227560603, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
All the Bell inequalities

Bell inequalities are derived for any number of observers, any number of alternative setups for each one of them, and any number of distinct outcomes for each experiment. It is shown that if a physical system consists of several distant subsystems, and if the results of tests performed on the latter are determined by local variables with objective values, then the joint probabilities for triggering any given set of distant detectors are convex combinations of a finite number of Boolean arrays, whose components are either 0 or 1 according to a simple rule. This convexity property is both necessary and sufficient for the existence of local objective variables. It leads to a simple graphical method which produces a large number of generalized Clauser- Horne inequalities corresponding to the faces of a convex polytope. It is plausible that quantum systems whose density matrix has a positive partial transposition satisfy all these inequalities, and therefore are compatible with local objective variables, even if their quantum properties are essentially nonlocal.


PATTERNS OF LOCAL OBJECTIVE VARIABLES
A local realistic theory purports that the results of tests (or "measurements") performed on distant physical systems by independent observers are determined by local variables with objective values. It was shown long ago by Bell [1] that this assumption led to an upper bound on the correlations of the results of these tests, and that this bound was violated by the predictions of quantum theory. Early versions of Bell's inequality [1,2] involved only two observers, each one having a choice of two (mutually incompatible) experiments. The various outcomes of each experiment were lumped into two sets, arbitrarily called +1 and −1. Generalizations involving more than two observers, or more than two alternative experiments for each observer, or more than two distinct outcomes for each experiment, were considered by many authors [3]. Another type of inequality was derived by Clauser and Horne [4], who supplied only one detector to each observer, so that not all events could be detected. This simpler inequality has the advantage that it is not affected by our lack of knowledge of the total number of quantum systems, which in general is not observable. Still, detector inefficiencies reduce the chances of observing an actual violation of the CH inequality.
In the present article, it will be shown that all these inequalities can be derived from a universal convexity rule, which is not only a necessary condition, but also a sufficient one for the existence of local objective variables. To avoid a possible misunderstanding: this article is not an attempt to attribute physical reality to the so-called "hidden" variables, nor to speculate on their dynamical properties. It is only an intellectual exercise extending the work of Bell and others in the most general way. The only assumption is that, for a given set of physical situations, there exist local rules that determine coincidences between detections of distant macroscopic events. This assumption is sufficient to derive constraints on the probabilities of these coincidences, in the form of inequalities.
Probabilities can in principle be measured experimentally with arbitrary accuracy. A violation of any one of the above constraints is sufficient for proving the nonexistence of local hidden variables (that is, of hypothetical local rules as postulated above). Conversely, if all the constraints are satisfied for a particular physical preparation and a particular set of detectors, then such rules can be formulated. The sole subject of this article is to define what is meant by all the constraints (i.e., all the Bell inequalities.) The first step of this work is to develop suitable algebraic and graphical notations for representing all we shall need to know about local objective variables. Then, in Sect. 2, it is shown that every Bell inequality can be written as F K P K ≥ 0, where the P K are probabilities of detector coincidences (which can be measured experimentally), and the coefficients F K are a set of integers. The problem is to find these coefficients explicitly. A method generating sets of F K for any number of observers, any number of alternative setups for each one of them, and any number of distinct outcomes for each experimental setup, is given in Sect. 3. Sequential tests and quantum distillation are discussed in Sect. 4, and the main new results in this article are summarized in Sect. 5. Finally, an appendix presents an algebraic (rather than graphical) method for constructing the vectors F K .
Consider first the case of two observers, conventionally called Alice and Bob (the presence of additional observers will be discussed whenever appropriate). Alice has a choice of several tests, which may be mutually incompatible. The fact that some tests are mutually incompatible is a consequence of the quantum formalism (Bohr's principle of complementarity). However, quantum theory is not involved at all in the present discussion, which is strictly phenomenological. All we have to know is that Alice's first type of test, if performed, yields one of several distinct outcomes, labelled a, b, c, etc. Her second type of test may likewise yield outcomes labelled m, n, s, etc., her third type of test has outcomes u, v, w, and so on. These symbols are completely arbitrary, for example, they are labels marked on Alice's detectors. Note that Alice is free to choose the test that she performs. It is the result of the test that is in general not known to her in advance.
Likewise, Bob has a free choice of performing a test whose possible outcomes are α, β, γ, etc., or another test (perhaps incompatible with the first one) with outcomes labelled µ, ν, σ, and so on. Additional observers, if any, would also have a free choice between various, possibly incompatible tests. It is essential that each observer can choose his/her test independently of what the other distant observers do (or have done, or will do).
Local hidden variable theories assume that each preparation of the physical system is characterized by a parameter λ, which acts as a kind of "set of instructions" [5] that determines the outcome of any test that can be performed on each one of the subsystems. For example, as illustrated in Fig. 1, if Alice has a choice of three tests, a particular value of λ would determine that their outcomes are b, s, or u (whenever Alice elects to perform the corresponding test), and likewise the outcomes of Bob's two possible tests are β or ρ. Even if present technology does not allow us to control the value of λ, we may speculate that such "hidden variables" λ do exist, and the statistical results of our coarse experiments correspond to an average over a suitable probability distribution for λ. Note that if a test fails to provide a detection event because of detector inefficiency (or lack of detector in the appropriate direction), this also has to be considered as an event in the statistics. Therefore each sector in Fig. 1 should include one row and one column labelled 0 (or likewise). These merely correspond to hidden variables λ whose "set of instructions" is: no detection.
It is crucial for the following argument to have a clear system of notations. We shall associate to each coincidence of outcomes, such as bβ, or uσ, etc., a single symbol K, which stands for a pair of indices (one index for each observer). The values of K thus label all possible coincidences between the detectors that are used by the two observers, in all their alternative experimental setups. If Alice's i-th test has A i distinct outcomes, and Bob's j-th test has B j distinct outcomes, there are distinct values of K (i.e., types of coincidences between the observers' detectors). Note that to each value of the hidden variable λ corresponds a well defined set of values of K. For example, Fig. 1 illustrates a particular λ which is associated with the coincidences bβ, bρ, sβ, sρ, uβ, and uρ. We could therefore denote this λ more explicitly by a symbol such as [bsu; βρ]. In general, each λ refers to a definite pattern of points in the figure. This means that effectively there are no more than different values of λ, covering all the combinations of experimental setups used by Alice and Bob. We don't have to speculate about the physical nature and dynamical properties of the hidden variables. For our present purpose, we may simply lump together all the values of the hidden variables that determine the same pattern of outcomes, and denote them collectively by a single label λ. All these notions are readily generalized to the case of three or more observers. Each new observer should have a private set of labels for the outcomes of his/her tests. The collective index K (which indicates detector coincidences) comprises one individual index for each observer. The case of three observers is illustrated in Fig. 2, where a typical value of K would be γmR. We now define a Boolean matrix B λ K as follows: B λ K = 1 if the hidden variable λ leads to a coincidence of type K (whenever the various observers choose to perform the kind of test that may generate that type of event), and B λ K = 0 if a coincidence of type K never results from that particular λ. Explicitly, when the collective indices are written in full detail, we have, for example, Note that this is a product of two factors, each factor related to one of the observers. The importance of this property will become apparent later (see Appendix).
In general, if Alice has a choice of N A tests, and Bob a choice of N B tests, and so on, the total number of different tests (i.e., of sectors in a diagram like Fig. 1) is and we have, for each value of λ, The N λ different values of λ are nothing more than labels which distinguish various combinations of events (i.e., various patterns of points in Fig. 1). It is convenient to define "vectors" B λ whose components are B λ K (where λ is a "name" identifying each vector, and K is an index referring to each one of its N K components). These vectors are completely defined by enumerating the tests available to each observer and the outcomes of each one of these tests, as explicitly shown by Eq. (3). The uniqueness of this set of vectors is crucial for proving the convexity property expressed in Eq. (7) below.
An important property of the vectors B λ is that they are not linearly independent. The linear dependence is due to the existence of equivalent superposition of patterns. For example, it follows from Eq.
Many more such relationships appear when a larger number of indices are permuted. In spite of these numerous linear dependence relations, none of the vectors B λ can be expressed as a convex combination of the others (that is, a linear combination with positive coefficients). This is easily seen from the fact that each one of these vectors has exactly N T components equal to 1, and all the others are 0. Therefore, each vector B λ is an extreme ray of a convex cone. Finally, let us note that hidden variables as described above have a deterministic nature, because each λ completely specifies the outcomes of all experiments that can be performed. It is also possible to imagine stochastic hidden variables, which only attribute definite probabilities to these outcomes [6]. In that case, the values of B λ K are arbitrary positive numbers, summing up to 1 in each sector. This obviously is equivalent to subdividing the hidden variables λ into other, more detailed, deterministic hidden variables. No new Bell inequality can be obtained in this way.

FARKAS'S LEMMA
Different λ are just like different pages in a catalog [7] which specifies the outcomes of all experiments that may follow a given preparation. Let w λ be the probability of occurrence of a particular λ. Let each observer choose a specific test. In this way, one of the sectors in Fig. 1 is selected, and each value of λ determines the resulting coincidence, K. The probability of that outcome is The left hand side of this equation is an experimentally accessible quantity; it may also be computed by quantum theory, or any other supposedly valid theory. Note that K P K = N T , since there are N T possible combinations of tests. In geometrical terms, Eq. (7) states that the vector P (whose components are the probabilities P K ) is a convex combination of the known Boolean vectors B λ [8,9]. This obviously is a necessary condition for the existence of local objective variables λ as defined above. This is also a sufficient condition: if the vector P lies within the convex cone of the given vectors B λ , then it is possible to expand P K as in Eq. (7), with non-negative coefficients w λ . It is even possible, in general, to do that in an infinity of ways, if N λ > N K .
Even though this problem is in principle straightforward, it is notoriously difficult to determine whether or not a specific vector is included in a given convex cone. A necessary condition can be derived from Eq. (7) as follows. Let a vector with real components F K have the property that, for all λ, where M and N are fixed numbers. Then, obviously, since the w λ are non-negative and sum up to 1, we also have In the special case M = 0, it can be proved (this is Farkas's Lemma [10]) that if the above relationship holds for every vector F K that satisfies then the inequality is a sufficient condition for P to be in the convex cone spanned by the vectors B λ , in accordance with Eq. (7). Obviously, the Farkas vectors with components F K also form a convex cone. It is in principle possible to find all its extreme rays by algebraic methods, as shown in refs. [8,9] and here in the Appendix. Unfortunately, that algebra becomes quite unwieldy when N λ is large. It requires an amount of computation which increases exponentially with N λ , and therefore it has little practical value. The main purpose of this article is to derive a graphical method which generates a large number of Farkas vectors (admittedly, only the simplest of these graphs are explicitly displayed here, and I make no claim of completeness). The importance of Farkas vectors in the present context stems from the fact that the relationship (11) is not trivial, if some of the components F K are negative. The probabilities P K can, in principle, be measured experimentally with arbitrary accuracy. Thus, if it turns out that Eq. (11) is not satisfied by the experimental data, it follows that the assumption of existence of local objective variables is incompatible with physical reality. Bell's inequality and all similar relations [1][2][3][4] are special cases of Eq. (11).
I shall now present a simple graphical method which produces a large number of Farkas vectors with M = 0 (the value of N is irrelevant, since it can always be adjusted by multiplying all the components F K by a suitable positive factor). That set of Farkas vectors may be redundant, but it is finite. These explicit results are far preferable to the algebraic algorithm described in the Appendix. The latter is hopelessly inefficient because it is too general: it makes no use of the peculiar structure of B λ K , given by Eq. (3). Let us introduce more explicit notations and replace the composite index K by its individual components. Moreover, let us use the term "vector" with the meaning "set of components" if no confusion may arise. For example, if there are two observers, the Farkas vector F K may be written as F mµ . Likewise, for each hidden variable label λ, the vector B λ K can be written as B λ mµ . Such a notation is sometimes useful, as in Eqs. (12) and (13) below. Moreover, it leads to a graphical method with considerable intuitive appeal: each one of these vectors is represented by a rectangular array, where rows are labelled by Alice's Latin indices, and columns by Bob's Greek indices. (The generalization to N observers is obvious: each vector becomes an N-dimensional array.) The stucture of the B λ K arrays is clear. For each λ, the array looks like the diagram in Fig. 1, with +1 at each node of the pattern, and zeros everywhere else. With these notations for B λ mµ , it is easy to construct some Farkas vectors. They can be represented by rectangular patterns as in Fig. 3 and 4, with black cells and gray cells corresponding to components F K whose values are −1 and +1, respectively (if color printing were readily available, I would have used red and green cells with an obvious meaning, as in traffic lights). Any empty cell stands for a component F K = 0. Other values, if needed, would have to be explicitly written at the appropriate location in each pattern.
The construction of nontrivial Farkas vectors will be discussed in the next section. As a preliminary step, some "trivial" ones are mentioned below, because they are necessary for future use. Fig. 3 are denoted as Z K . They have components

Farkas vectors like those in
filling a complete line in one sector, and filling the continuation of the same line, in one other sector. Obviously, any overlap of a λ-pattern with such a Farkas vector will include one negative cell and one positive cell, so that We thus expect the experimental data to fulfill Indeed, this equation is always satisfied. This can be seen as follows. The left hand side of (15) consists of sums of coincidence probabilities where the summation indices γ and c take all the values in any one of the sectors. One sum appears with negative signs, as in Eq. (12), and one with positive signs, as in (13). The sums p n and p µ are single detector probabilities which can be measured by Alice and Bob, far away from each other. It is known fact that probabilities measured by one observer do not depend on the choice of experiments performed by other, distant observers (if it were such a dependence, it could be used for instantaneous signaling at arbitrary distances, contrary to relativity theory and to common experience). Therefore the sums in Eq. (16) have to be the same, irrespective of the sector that was chosen to evaluate them, and Eq. (15) is always satisfied by the experimental data. It follows that if F K is a Farkas vector, then G K = F K + aZ K (for any real a) also is a Farkas vector. These two vectors are physically equivalent. If P K F K ≥ 0 is experimentally satisfied (or violated), so is P K G K ≥ 0, and vice versa. In the rest of this article, we shall therefore consider only equivalence classes of Farkas vectors, defined modulo arbitrary linear combinations of the various Z K .
The existence of null vectors complicates the definition of extreme rays in the set of Farkas vectors. Since both Z and −Z are Farkas vectors, the notion of a convex combination becomes ambiguous. Together with each ray, we have to consider its entire equivalence class: an extreme ray can then be defined as one that cannot be obtained by convex combinations of rays taken from other equivalence classes. A different definition of extremality will be given in the Appendix, where we shall work in the subspace spanned by the Boolean vectors B λ . A Euclidean metric will be introduced in K-space, and we shall construct Farkas vectors that are orthogonal to all the Z vectors.

CONSTRUCTION OF FARKAS VECTORS
Farkas vectors can be classified as those having no negative component (these vectors are trivial and useless), or negative components in a single sector, as those in Fig. 3 or 4, and so on. It is easily seen that it is not necessary to consider the possibility of negative components in more than one sector. Indeed, if such a situation happens, it is always possible to concentrate all the negative components into a single sector by adding appropriate null Farkas vectors Z K . Therefore we shall assume that only one sector has negative components. Moreover, we can assume that it has only negative or null components, because any positive component in that sector, combined with positive components in the other ones, would never lead to a contradiction with Eq. (11), since each λ-pattern touches each sector only once. It will be shown in the Appendix that Farkas vectors can be chosen in such a way that all their components are integers.
Let us first consider the simplest case: two observers, two alternative setups for each one of them (so that each array of B λ mµ has four sectors), and two outcomes, or sets of outcomes, for each test (i.e., each sector has four cells). The various outcomes will now be labelled by symbols such as m and m ′ . The latter means "not m" and may include the null outcome (no detection).
There are 64 Farkas vectors like the one drawn in Fig. 4, since each one of the 16 squares can be chosen as the black one (−1), and then any one of the four squares in the opposite sector can be made gray (+1). The two other gray squares in the remaining sectors then have fixed locations: each one is in the same row or column as the black square, and none is in the same row nor column as the other gray squares. This structure guarantees that if any Boolean pattern (as in Fig. 1) overlaps with the negative component, it must also overlap with either one or two positive components (so that the sum is 0 or 1). Moreover, no Boolean pattern overlaps with two positive components without a compensating −1.
For the vector represented in Fig. 4, we thus obtain from Eq. (11) This result is equivalent to the Clauser-Horne inequality [4]. Indeed, by adding and subtracting (p nβ + p aµ ), we obtain, by virtue of Eq. (16), which is the CH inequality [4]. The more familiar CHSH inequality [2] can easily be derived from it, but the converse is not true, unless all detectors have perfect efficiency (that is, no events are undetected). Note that primed indices, which include the "no detection" outcome, are absent from Eq. (18). It is only the lower limit in the above inequalities that is relevant to Farkas's lemma. This is an important feature of the CH inequality, because detectors do not measure probabilities-there just count events. To obtain probabilites, we have to divide these counts by the total number of quantum systems that are tested, and that number is never known (it can only be estimated theoretically). It is therefore important that the lack of knowledge of that number does not affect the lower limit of the CH inequality.
The Farkas vector depicted in Fig. 4 is not the only one for the 2 × 2 case. Another one is shown in Fig. 5. However, the latter is easily seen to be equivalent to a trivial Farkas vector without negative elements, and it is therefore irrelevant.

More than two detectors
If Alice or Bob have more than two distinct outcomes in an experimental setup, the number of λ-patterns increases, and so does the number of Farkas vectors. An obvious consistency requirement is that, if all Bell inequalities are satisfied for a given set of detectors, and if the outputs of several of these detectors are merged, as if they were a single detector, then the new Bell inequalities for the simplified data analysis are still satisfied. Conversely, if some Bell inequality is violated in a setup that includes a coarse grained detector, and if the latter is subdivided into several detectors with higher resolution, there will still be, in the new setup, at least one Bell inequality which is violated.
Both consistency requirements are manifestly fulfilled by Farkas vectors of the type depicted in Fig. 6. In each experimental setup, the various detectors may be grouped into two sets in all possible ways. If Alice's two tests have A 1 and A 2 distinct outcomes, and if Bob's two tests have B 1 and B 2 outcomes, there are different Farkas vectors that can be constructed by this method. Each one generates a generalized CH inequality. Is this set of Farkas vectors complete? It is plausible, but I have no formal proof, that any other Farkas vector is equal to a convex combination of those constructed by the above method, plus any trivial vectors having only positive components, plus any linear combination of the irrelevant vectors Z K . In other words, all the extreme points of the convex set of Farkas vectors are included among those constructed as in Fig. 6. Note in particular that it is useless to introduce complete lines of negative elements: these can be eliminated by adding suitably chosen null vectors Z K , as illustrated in Fig. 7.

More than two alternative tests
If Alice or Bob have more than two different experimental setups to choose from, each λ-pattern has more than four sectors, and therefore some Farkas vectors may have nonvanishing components in more than four sectors. For instance, if Alice and Bob can choose from 3 setups, there are 9 sectors in each diagram, as seen in Fig. 8. Any λ-pattern B λ mµ indicates 9 coincidences, located at the intersections of any 3 rows and 3 columns.
As an example, the diagram on the left hand side of Fig. 8 represents a Farkas vector which produces a "chained" CH inequality [11]. This is indeed a Farkas vector, because if a λ-pattern overlaps with the black square (−1) , it has to overlap with at least one gray square (+1), so that the sum is never negative (this is easily seen by direct inspection of the figure). However, it is also easily seen that this Farkas vector can be decomposed into a sum of two simpler Farkas vectors, each one involving only four sectors. This decomposition is like the algebraic identity and it can be extended to longer chains, in the same way.
Here, we may be tempted to speculate that any Farkas vector spread over more than four sectors can be decomposed into a sum of Farkas vectors involving four sectors only. Namely, if a Bell inequality involving the results of more than four incompatible experiments is violated, then there is another Bell inequality, involving only four of these experiments, which is also violated. Unfortunately, there are counterexamples, namely sets of P K that invalidate this conjecture [12,13]. It happens that these counterexamples are incompatible with quantum mechanical probabilities for spin-1 2 particles [14], but counterexamples also exist for genuine quantum probabilities in higher dimensional Hilbert spaces [15]. Anyway, the present study is not about the values of quantum mechanical probabilities, but about general structural relations among observable probabilities deriving from local objective variables.
It would be useful to have an efficient algorithm for constructing all the Farkas vectors for any number of sectors. We know that this can be done in such a way that one of the sectors has no positive elements, and all the others have no negative elements. I have not yet been able to find such an algorithm, and at this time I can only say that the construction of Farkas vectors is a simple combinatorial problem, amenable to a computer search if the number of sectors is not too large, and if the values of the components F K are restricted to small integers. Note that any optimization [16] of the experiments testing the CH or CHSH inequalities is equivalent to having an infinite number of sectors, but considering only Farkas vector that lie in four sectors.

More than two observers
A three-dimensional pattern of hidden variables, for measurements performed on three correlated subsystems, was illustrated in Fig. 2. In such a case, Farkas vectors are also represented by three-dimensional arrays, as for example in Fig. 9. Each cubic element corresponds to a coincidence of three detectors, and each cubic sector, separated from other sectors by thick lines, represents a complete experimental setup. The simplest null vectors Z correspond to a line of cubes (not to a slab of cubes). Each component Z K refers to a specified coincidence of detections by two of the observers, irrespective of the result found by the third observer. By the same argument as before, it is possible to transfer all the negative elements of a Farkas vector into one of the 3-dimensional sectors, so that the other sectors have only positive or null elements.
The obvious generalization of the Farkas diagram for the CH inequality (Fig. 4) is the cubic array shown in Fig. 9. Note that only one slab of that array is used: the negative element (shown as a black cube) is always compensated by at least one of the positive elements (the gray cubes) in the same slab. This means that the third observer does not need several incompatible experimental setups. (Still, on Fig. 9, eight sectors have been drawn, indicating that the third observer has a choice between two alternative setups, but actually his second setup is never used.) The data analysis for the Farkas vector of Fig. 9 considers only those cases where the third observer gets a particular outcome (namely, the outcome corresponding to the first slab in the cubic array). If he gets any other outcome, the two other observers discard their parts of the composite quantum system (without testing them), and the three observers proceed with the next trio of entangled particles.
As a simple example, borrowed from quantum theory, consider the 3-particle state where x j and y j are two orthogonal states of the j-th particle. A Hadamard transform, gives Let the first observer test whether the state of his particle is u 1 . If the answer is affirmative, the resulting (renormalized) state of the two other particles is This is a maximally entangled state, violating the CH inequality. Similar results are obtained if any one of the observers elects to test his particle for the state u j , or for the orthogonal state v j . When the test succeeds, the particles of two other observers are maximally entangled. We see here the advantage of the CH inequality (17). It is only the left hand side of that inequality (0 ≤ . . . ) that is needed for Farkas's lemma, and that side is not affected if all the probabilities that appear in it are renormalized by the same factor (namely, they are divided by the probability that the preliminary test was successful). All these considerations are readily generalized to N observers (N > 3). Only two of the observers need to have access to alternative setups. All the other ones just have to select one particular outcome of a fixed test. How to best choose that test, for example how to orient the detection apparatus of each observer, depends on the theoretical model that is under consideration (in the preceding example, if an observer would test for states x or y, instead of u or v, the resulting state of the two other particles would not be entangled). However, finding optimal tests is not the subject of the present article. Here I assume that the various tests have been specified, and the only problem is how to analyze the resulting data.
The above method may be contrasted with those of other authors [17][18][19] who sought to generalize the CHSH inequality [2]. In all these generalizations, an exponentially large number of tests (∼ 2 N ) are performed. Violations of the generalized CHSH inequalities can also be exponentially large, but their detection is subject to an exponentially large noise [20]. The method proposed here is clearly preferable. However, as in earlier cases, I must acknowledge that I have no formal proof that the above construction, together with all its variants obtainable by permuting the various detectors, includes all the extreme points of the convex set of Farkas vectors. Namely, it still remains to be formally proved that if all the CH inequalities constructed by the above method are satisfied for a given composite system and a given set of detectors, then there is no way of combining the data of the same detectors so that a Bell inequality is violated.

SEQUENTIAL TESTS AND QUANTUM DISTILLATION
Quantum mechanics was first mentioned above in Eq. (21). Its relationship to classical mechanics is fairly well understood for systems with continuous variables. However, the Bell inequalities involve only classical logic for Boolean variables, and the relation of these inequalities with quantum mechanics ought to be clarified.
There is one property that is well known: if a quantum state is factorable, namely ρ = ρ ′ ⊗ ρ ′′ where ρ ′ and ρ ′′ refer to Alice's and Bob's particles, respectively, then the CH inequality (18) is always satisfied. This is easily proved as follows. First, we note that in such a case the coincidence probabilities also factor, e.g., p aµ = p a p µ . Let j = 1, . . . , N be a label indicating the j-th experimental run. Define a j = 1 or 0 if the detector labelled a is excited or is not excited, respectively, in the j-th run; and let there be similar notations for the other detectors. Now consider four numbers, a j , n j , β j , µ j , each one 0 or 1. It is easily verified, by direct inspection, that Averaging this expression over all runs, the inequality (18) readily follows. More generally, the CH inequality is satisfied by any convex combination of factorable states, with c i > 0 and i c i = 1. Such a state is called separable. On the other hand, there are demonstrably inseparable states that do not violate any Bell inequality [21,22]. Thus, although Bell inequalities guarantee the possibility of introducing local objective variables (for the results of the tests under consideration), they do not guarantee quantum separability. A simple necessary condition for separability can be obtained as follows [22]. Given the density matrix ρ in Eq. (26), consider the partly transposed matrix whereρ ′′ i denotes the transposed matrix of ρ ′′ i (that is, its complex conjugate). This is a legal density matrix for Bob's subsystem, so that σ is a valid density matrix for the composite system. Consider now an arbitrary ρ whose matrix elements ρ mµ,nν are given (Latin indices refer to Alice's basis, Greek indices to Bob's). We can likewise define a partly transposed matrix σ mµ,nν = ρ mν,nµ .
We have just seen that if ρ is separable as in Eq. (26), then σ is a legal density matrix.
In particular all its eigenvalues are non-negative. Thus, if we happen to find that σ has a negative eigenvalue, this means that ρ is not separable.
The following proposition will now be proved: If a state ρ satisfies (violates) a Bell inequality, then the partly transposed σ satisfies (violates) the same Bell inequality.
Proof: The Bell inequality (11), combined with the quantum mechanical rule for computing probabilities, implies that where A K and B K denote projection operators, corresponding to the detectors of Alice and Bob that are involved in a coincidence of type K. Explicitly, and therefore, by Eq. (28), Exchanging the indices µ and ν, we obtain Comparison with Eq. (30) shows that the projection operator B K has been replaced by its transposeB K ≡ B * K , which is also a projection operator, corresponding to another type of detector (the one sensitive to the time-reversed state of Bob's subsystem [23]). This concludes the proof of the above proposition. Note that the latter is valid even if σ has a negative eigenvalue and is not a legal density matrix. We thus see how tenuous the relationship is between quantum separability and Bell's inequalities.
Similar properties hold if there are more than two observers. Partial transpositions are defined with respect to any one of them, or to any subset of them. A necessary (but not a sufficient) condition for quantum separability is that all these partly transposed density matrices have non-negative eigenvalues.
The weakness of Bell's inequalities as a condition for quantum separability is due to the fact that the only use made of the density matrix ρ is for computing the probabilities of the outcomes of tests performed on subsystems of a composite system, following a specific preparation of the latter. An experimental verification of these inequalities necessitates observing many such composite systems, all prepared in the same way. However, if many systems are actually available, we may also test them collectively, for example two by two, or three by three, etc., rather than one by one. If we do that, we are using, instead of ρ (the density matrix of a single system), a new density matrix, which is ρ ⊗ ρ, or ρ ⊗ ρ ⊗ ρ, in a higher dimensional space. We may then find that there are some density matrices ρ that satisfy all Bell's inequalities when each system is tested individually, but for which ρ ⊗ ρ, or ρ ⊗ ρ ⊗ ρ, etc., violate some new Bell inequality, because the collective tests require new experimental setups, and the number of dimensions of Hilbert space increases [24]. This property leads to the notion of quantum distillation [25][26][27].
The essence of quantum distillation lies in the reduction of the effective number of dimensions of Hilbert space by the selection of a suitable subensemble out of the original quantum ensemble. The resulting composite systems have lower dimension (e.g., they may be pairs of spin-1 2 particles in a singlet state). It is then easier to display a violation of Bell's inequality. The distillation process involves only local operations by the distant observers and classical communication between them, but no transfer of quantum systems (recall that Bell inequalities are fundamentally classical). An example was given in Sect. 3.3: there were three observers, one of them performed a test, and the two other observers retained their subsystems for further use if, and only if, that test was successful. An even simpler example was constructed by Popescu [28] who showed how to exhibit the hidden nonlocality of a pair of spin-2 systems by selecting a subensemble whose Hilbert space had effectively two dimensions, instead of five. More generally, distillation involves taking several entangled pairs (or trios, etc.), letting the particles held by each observer interact in an appropriate way, testing a subset of them at each location, and retaining only the samples that passed all these tests.
Note that in the above scenario the observers have to follow a definite protocol. They have no free choice between different experimental setups. It is only after the distillation process has been brought to completion that the observers (or a subset of them) have to consider alternative setups in order to formulate Bell inequalities. The distillation protocol with two observers follows a sequential method which has many similarities with the procedure that was specified in Sect. 3.3 for three or more observers. We can in fact replace Alice and Bob by several distinct observers, one for each stage of the distillation (let us call them Alice I, Alice II, etc., and Bob I, Bob II, . . . ). We can then imagine multidimensional diagrams generalizing Fig. 9, with one axis for each member of the dynasties of Alice and Bob. The assumption of locality (among different Alices) is replaced by the assumption that the result of a test performed by Alice I does not depend on the choice of the tests that will eventually be performed by the following Alices (in particular, by the last one, who will examine the validity of a Bell inequality). It is only the last step that involves counterfactual definiteness; there is nothing counterfactual in all the preliminary ones.
The reduction of the dimensionality of Hilbert space is due to the factorization of the states obtained at each distillation stage. For example, ψ 123 in Eq. (21) becomes where ψ ′ 23 is given by Eq. (24). From this point on, we can safely ignore particle 1, and consider only 2 and 3; hence the reduction of the number of dimensions.
Note that there exist inseparable quantum states that cannot be distilled into singlets. In particular, quantum states ρ whose partial transpose σ has no negative eigenvalue have that property [29]. Thus, if the preceding conjectures are correct, it follows that these peculiar inseparable quantum states violate no Bell inequality, and therefore, owing to Farkas's lemma, their statistical properties are compatible with the existence of local objective variables.

CRITERIA FOR LOCAL OBJECTIVE VARIABLES
The purpose of this work was to produce a complete set of Bell inequalities, from which any other Bell inequality can be obtained as a convex combination. A graphical method was devised, giving a large number of Bell inequalities (of the Clauser-Horne type). The question is whether that set of inequalities is complete. During the course of this investigation, some conjectures naturally arose. They are illustrated by Figs. 6, 8, and 9. Expressed in plain words, Fig. 6 says that if an observer has several detectors, not just one detector as required for formulating the CH inequality, then that observer has to consider each possible subset of these detectors as if it were a single detector, for the purpose of computing the probabilities that appear in the CH inequality. This conjecture appears quite plausible. Finding a formal proof is proposed as a challenge to mathematical physicists who are better experts than me in convex analysis.
Another conjecture, illustrated by Fig. 8, was that if an observer has more than two alternative setups, it is sufficient to consider them pairwise in order to write Bell inequalities. Although this claim appeared to be plausible, there are counterexamples [30], and a simple algorithm still has to be found for the construction of Farkas vectors involving more than four sectors in a nontrivial way.
Still another plausible conjecture ( Fig. 9) is that if there are N > 2 observers, only two of them have to consider alternative setups. The (N − 2) other ones perform a single test, which decides whether all the observers proceed with their parts of the composite system, or they discard these parts and turn to examine another composite system. However, I have no proof of this conjecture: it may well be that there are inseparable quantum states that cannot be distilled, and yet these states violate a Bell inequality which requires combining data from more than two observers.
The above discussion suggests that the partial transposition criterion [22] is a necessary and sufficient condition for the compatibility of local objective variables with experimental results, irrespective of whether or not the composite system is separable from the point of view of quantum theory. This would be an interesting link between classical and quantum physics.
It thus seems that there are three different levels of nonlocality in physics. There are separable quantum systems whose statistical properties can be mimicked by local objective variables; there are inseparable quantum systems, which are incompatible with local hidden variables (either when they are tested singly, or collectively, or when they are distilled); and there also is an intermediate level: inseparable systems with positive partial transposition, which cannot be prepared by local quantum operations and classical communication, but whose statistical properties, once they have been prepared, do not conflict with local objective variables.

ACKNOWLEDGMENTS
It is a pleasure to dedicate this article to Danny Greenberger, on the occasion of his 65th birthday. I am grateful to Louis Michel for patiently educating me on the geometry of convex polytopes, and to Tal Mor for suggesting that the Horodecki states [29] might obey every Bell inequality. I also received helpful advice from Micha l, Pawe l, and Ryszard Horodecki, from David Mermin, and from Abner Shimony. This work was supported by the Gerard Swope Fund and the Fund for Encouragement of Research.

APPENDIX: ALGEBRAIC CONSTRUCTION OF FARKAS VECTORS
Recall that the vectors B λ (with components B λ K ) are the extreme points of a convex cone. They span a linear space of dimension N D (that is, only N D of these vectors are linearly independent). Note that N D < N K , where N K , given by Eq. (1), is the number of dimensions of the basis used to represent these vectors (each basis element corresponds to a detection coincidence). The complementary subspace, of dimension N K − N D , is spanned by the null vectors Z K that were defined in Eq. (14). (In this Appendix, I am using a Cartesian scalar product, and there is no reason to distinguish upper and lower K indices.) For example, if there are two observers, and each one has two alternative experiments, with A i and B j distinct outcomes, respectively, there are linearly independent null vectors, that will be denoted as Z σ , with σ = 1, . . . , N Z . It follows that More generally, if Alice and Bob have S A and S B alternative setups, then Similar formulas can be found for the case of more than two observers. Obviously, the vector is in the interior of the cone whose edges are the vectors B λ . The question is whether the vector P, whose components are the detection probabilities P K , also is in the interior. Consider a hypersurface element formed by a subset of N D − 1 different B λ . The vectors C and P are on the same side of that hypersurface if the oriented volumes formed by them and by the subset {B λ } have the same sign. In order to have a simple algebraic criterion for this, it is convenient to add N Z dimensions. Consider therefore the hypersurface element of dimension N K − 1 formed by the N D − 1 vectors of {B λ } and the N Z vectors Z σ (recall that these are two orthogonal subspaces). We can then write two determinants of order N K by taking these N K − 1 vectors together with P or with C. Namely, the K-th row or column of these determinants is The question is whether these determinants have the same sign or, in other words, whether their product is positive. Since the product of two determinants is equal to the determinant of the product of their matrices, let us multiply the matrices. Let K be considered as a column index in the first term in (38), and as a row index in the second one, so that the matrix product involves a sum over the index K. Recall that where the last equality is Eq. (15) in the present notations. Then the product of the two above determinants factorizes as det P · C · · · P · B µ · · · . . . . . . . . . . . .
In the first determinant in (40), the indices λ and µ denote rows and columns, respectively. The second determinant in (40) is always positive (this is a generalization of the Schwarz inequality, easily proved by noting that the matrix of that determinant is a sum of positive matrices). Therefore the requirement that C and P lie on the same side of the hyperplane formed by {B λ } implies that the first determinant in (40) is positive. Expanding that determinant from its first row, we obtain an inequality which can be written as Note that all the terms appearing in (40) are integers, therefore the coefficients of P K in Eq. (41) are also integers. However, the G K defined above are not, in general, the components of a Farkas vector if the subset {B λ } is chosen arbitrarily. This subset is relevant only if it forms a face of the convex cone. Namely the subset {B λ } must be chosen in such a way that any B κ that does not belong to it lies on the same side as C. This condition can be verified by replacing P in the first determinant in (40) by each one of the B κ : ∀κ det B κ · C · · · B κ · B µ · · · . . . . . . . . . . . .
If this inequality holds for all the B κ that do not belong to {B λ } (which is the same subset as {B µ }, of course), then this subset defines a face of the convex cone (subsets that do not satisfy this condition are hyperplanes interior to the cone). It is only for these faces that the vectors G K , as defined above, are Farkas vectors. The set of Farkas vectors obtained in this way is manifestly complete. It may however be overcomplete, because some of these vectors may not be extremal. Note that It is enough to include in that sum the ν that do not belong to the set of µ that appears in Eq. (42), because we can always subtract from the first column all the other ones, without changing the value of the determinant. Finally, we note that the symmetric tensor A λµ = (δ bc + δ rs + δ uv ) (δ αβ + δ ρτ ).
In particular, A λλ = 6, which is the number of sectors in the diagram corresponding to Eq. (3). It is not difficult to write a computer program that tests the signs of all these determinants. Their absolute values are not needed until we have found a face. Only then we have to compute the subdeterminants that give the components G K for Eq. (41). The only difficulty here is that the number of subsets {B λ } that have to be examined, to decide whether they are faces of the convex cone, increases exponentially as N λ N D −1 . The problem is known to be NP-complete [31]. It is likely that progress can be done by using the symmetries of the set of B λ K . This will be a subject for future research.
FIG. 1. Alice has a choice of three tests, whose outcomes label the vertical axis. Bob has a choice of two tests (horizontal axis). Each one of the six sectors thus represents a possible joint experiment. A definite value of the hidden variable λ determines the outcomes of all these experiments, as shown by the pattern of dotted lines. Each node in that pattern represents a coincidence, labelled by an index K.
FIG. 2. Same as Fig. 1, with three observers. The axes are labelled by the various results that can be obtained by each one of them. Each value of λ determines on each face a pattern similar to the one in Fig. 1. The intersections of all the planes formed by these patterns are the detection coincidences that correspond to that value of λ.