Wolfram Alpha:

```Bell's Theorem
---------------

Let N be the number of objects.

N(A not B) + N(B not C) ≥ N(A not C)

This is generaly written as:

N(A ~B) + N(B ~C) ≥ N(A ~C)

Therefore,

N(1 + 2) + N(4 + 7) ≥ N(1 + 4)

Consider electrons 1 and 2 in the singlet state (1/√2)(|ud> - |du>.
Consider 3 possible orientations 0°, 45° and 90°

(z)
0°   45°
|   /
|  /
| /
-------- 90° (x)

If the electrons are entangled we can view the spin of 1 always
being the opposite of 2 and vice versa.  Thus, if electron 1 is in
the up state then this is the same as saying that 2 is in the down
state and vice versa.

Returning to the above Venn diagram, we can define.

A is 1 up along 0°

B is 1 up along 45°  ~B is 2 up along 45°

C is 1 up along 90°  ~C is 2 up along 90°

Substituting into Bell's theorem gives

N(1 up 0° 2 up 45° ) + N(1 up 45° 2 up 90°) ≥ N(1 up 0° 2 up 90°)

We can easily equate N with a probability (i.e. P = n/NTotal).
In order tocompute these probabilities it is helpful to introduce
the concept of PROJECTION OPERATORS.

Projection Operators
--------------------

A projection operator projects a vector onto a sub space.  Consider
the following:

The vector, u, is defined in 3D space.  We want to find the linear
operator that returns the projection of this vector onto the subspace
with the orthonormal basis of {x,y}.

- -         - -
| 1 |       | 0 |
x = | 0 |   y = | 1 |
| 0 |       | 0 |
- -         - -

The projection operator that projects u onto the x-y plane is

Pxy = Σ|n><n| where n are the subspace basis vectors.
n
So,

Pxy = |x><x| + |y><y|

- -  -     -     - -  -     -
| 1 || 1 0 0 | + | 0 || 0 1 0 |
= | 0 | -     -    | 1 | -     -
| 0 |            | 0 |
- -              - -
-     -     -     -
| 1 0 0 | + | 0 0 0 |
= | 0 0 0 |   | 0 1 0 |
| 0 0 0 |   | 0 0 0 |
-     -     -     -

-     -
| 1 0 0 |
= | 0 1 0 |
| 0 0 0 |
-     -
- -
So clearly, if have a vector | x | then the projection onto
| y |
| z |
- -
the x-y plane is

-     -   - -     - -
| 1 0 0 | | x |   | x |
| 0 1 0 | | y | = | y | as expected
| 0 0 0 | | z |   | 0 |
-     -   - -     - -

If the space and subspace are the same, the projection operator
is the unitary matrix, I, and the vector returned is just the
original vector.

<b| => (b1* b2* b3)
-  -
|a> = | a1 |
| a2 |
| a3 |
-  -
-  -  -          -      -               -
|a><b| = | a1 || b1* b2* b3* | =  |a1b1* a1b2* a1b3* |
| a2 | -          -      |a2b1* a2b2* a2b3* |
| a3 |                   |a3b1* a3b2* a3b3* |
-  -                    -               -

Thus,
-     -
|n><n| = | 1 0 0 |  where n is a basis vector of unit length
| 0 1 0 |
| 0 0 1 |
-     -

|ψ> = Σan|n> where n are mutually orthogonal unit basis vectors
n

<m|ψ> = Σan<m|n>     ...  <m|n> = δij
n

= am

|ψ> = Σ<m|ψ>|n>
n

First the bra vector dots into the state, giving the coefficient
of |n> in the state, then it is multiplied by the unit vector |n>
turning it back into a vector, with the right length to be a
projection.

We can write the above as,

|ψ> = Σ|n><m|ψ>
n

An operator maps one vector into another vector, so this is an
operator.

Finally we can rewrite as

Σ|n><n| = I when m = n and 0 otherwise.
n

The projection operators for spin can be written in terms of
the σ matrices as follows:

-   -      -   -     -   -
P+z = (I + σz)/2 = | 1  0 | + | 1  0 | = | 1 0 |
| 0  1 |   | 0 -1 |   | 0 0 |
-   -      -   -     -   -
-   -      -   -     -   -
P-z = (I - σz)/2 = | 1  0 | - | 1  0 | = | 0 0 |
| 0  1 |   | 0 -1 |   | 0 1 |
-   -      -   -     -   -
-   -      -   -     -       -
P+x = (I + σx)/2 = | 1  0 | + | 0  1 | = | 1/2 1/2 |
| 0  1 |   | 1  0 |   | 1/2 1/2 |
-   -      -   -     -       -
-   -      -   -     -         -
P-x = (I - σx)/2 = | 1  0 | - | 0  1 | = |  1/2 -1/2 |
| 0  1 |   | 1  0 |   | -1/2  1/2 |
-   -      -   -     -         -
-   -      -   -     -        -
P+y = (I + σy)/2 = | 1  0 | + | 0 -i | = | 1/2 -i/2 |
| 0  1 |   | i  0 |   | i/2  1/2 |
-   -      -   -     -        -
-   -      -   -     -         -
P-y = (I - σy)/2 = | 1  0 | - | 0 -i | = |  1/2  i/2 |
| 0  1 |   | i  0 |   | -i/2  1/2 |
-   -      -   -     -         -

The projection operators provide an alternate way of calculating
the probability associated with a particular state.  Consider:
-  -
<ψ|P+z|ψ> where ψ = | α |
| β |
-  -

Expanding we get:
-   -  - -
[α* β*]| 1 0 || α | = α*α
| 0 0 || β |
-   -  - -

This is the probability associated with the +z direction.

(1 up 0° 2 up 45°).

<singlet state|(σz/2 + 1)(τ.n/2  + 1/2)|singlet state>

Where σ operates only on electron 1 and τ only operates on electron 2.
τ.n = τx/√2 +  τz/√2

<singlet state|(σz/2 + 1/2)((τx + τz)/2√2  + 1/2)|singlet state>

Likewise, compute the probability P(B ~C) (1 up 45° 2 up 90°).

<singlet state|((σx + σz)/2√2  + 1/2)(τx/2 + 1/2)|singlet state>

and for P(A ~C) (1 up 0° 2 up 90°).

<singlet state|(σz/2 + 1/2)(τx/2 + 1/2)|singlet state>

The math to figure this out is somewhat tedious and will be
skipped in the interest of brevity.  What we find is:

P(A ~B) ~ 0.075

P(B ~C) ~ 0.075

P(B ~C) ~ 0.25

So this is a clear violation of Bell's Theorem!  A consequence of this
is that the hidden variables theory that says that each particle carries
with it all of the required information at the time of separation,  and
nothing needs to be transmitted from one particle to the other at the
time of measurement, cannot be true.```