Bell’s Theorems: 
The operational perspective and the importance of (non)contextuality

Mike Ulrey,  Retired (Boeing)

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

ABSTRACT

Mathematica’s capabilities are used to unravel some of the semantic confusion surrounding Bell’s theorem(s). One goal is to unpack the terms “locality”, “determinism”, “realism”, and “contextuality” by separating their everyday usage from their mathematical representations. In the context of a version of the EPRB experiment, an operational (i.e. statistical) modeling framework is proposed to compare the statistical predictions of quantum mechanics to most of the classical alternatives in one simple, common scheme. Although not a completely new idea, the approach here seems to have some intuitive advantages compared to the existing literature. It is shown that the traditional “hidden variables” approach can be replaced by simple convex combinations of conditional probability vectors. The progression of Bell’s thinking in three particular papers can be encapsulated neatly by the statement of set inclusion of operational model instances: Remote Context Independence+Outcome Determinisim ⊂Factorizable⊂Noncontextual.
Noncontextuality emerges naturally as the most general “classical” notion that blocks replication of at least some quantum mechanical predictions. Several interesting plots comparing sets of correlations of the all of the main model types are shown, which go well beyond the standard polytopes that represent the Bell-CHSH inequalities.

Nobel Prize winners October 2022

The Nobel Prize committee said: “The 2022 physics laureates’ development of experimental tools has laid the foundation for a new era of quantum technology.” Read the article

John Clauser                 Anton Zeilinger          Alain Aspect

Overview

Question: Does quantum mechanics (QM) admit a “classical” (“local hidden variables”) explanation?

Context: The EPRB (Einstein-Podolsky-Rosen-Bohm) experiment.

2 observers (Alice and Bob), 2 measurements per observer, 2 outcomes per measurement.

Historical approach is “bottom-up”:

Start with certain "classical" assumptions, and derive an inequality that QM does not satisfy, at least not always.

Our approach is “top-down”:

Start with a completely “generic” model that includes both QM and several “classical alternatives” as special cases, then

Show that the classical alternatives cannot replicate (at least some) QM statistical predictions.

“The Role of (Non) Contextuality in Bell’s Theorems from the Perspective of an Operational Modeling Framework”, International Journal of Quantum Foundations, Vol. 8, Issue 2, Mar, 2022.  https://ijqf.org/archives/6491    and   https://doi.org/10.48550/arXiv.2001.09756

Outputs:

A complete hierarchical “tree” showing where all the “classical” alternatives stand with respect to QM.

3D plots of correlations that confirm major results.

Alternative characterization of “hidden variables”--

Convex combinations of outcome deterministic conditional probability vectors.

The concepts of outcome predictability and measurement predictability.

Constructive proof that faster-than-light communication is impossible (in the EPRB experimental context).

A Brief History of Bell’s Theorem

The photon polarization version of the  EPRB experiment  (Einstein-Podolsky-Rosen-Bohm)

The source emits a pair of entangled photons -- one to Alice (left) and one to Bob (right).

(2,2,2) -Bell scenario: 2 observers (Alice and Bob), 2 measurement choices per observer, and 2 possible outcomes (±1) per measurement.

The “coincidence monitor” counts the numbers of occurrences (SuperPlus[N]) of same outcomes (++) or (--) and   (SuperMinus[N]) of different outcomes (+-) or (-+), for each of the four detector setting pairs.

Data processing and computation of the correlation estimates (Subscript[(OverHat[c]), k])

Alice and Bob each have two measurement settings --(a,a') and (b,b'), respectively.

Each measurement has two outcomes (±1).

Possible joint outcomes are (++) or (--) (same) and  (+-) or (-+) (different).

Let (Subscript[N, k]^(+))= number of “sames” (++ or --) for kth detector-setting, k=1,2,3,4.

Let (Subscript[N, k]^(-))= number of “differents” (+- or -+) for kth detector-setting, k=1,2,3,4.

Compute correlation estimates (Subscript[(OverHat[c]), k])=(((Subscript[N, k]^(+))-(Subscript[N, k]^(-)))/((Subscript[N, k]^(+))+(Subscript[N, k]^(-)))).

Note this makes sense: For example,

If we always get (++) or (--), then (Subscript[N, k]^(-))=0, so the correlation estimate (Subscript[(OverHat[c]), k])=((Subscript[N, k]^(+))/(Subscript[N, k]^(+)))=1.

If we always get (+-) or (-+),  then (Subscript[N, k]^(+))=0, so the correlation estimate (Subscript[(OverHat[c]), k])=((-(Subscript[N, k]^(-)))/(Subscript[N, k]^(-)))=-1.

And if we get the same number of “matches” as “mismatches”, so (Subscript[N, k]^(+))=(Subscript[N, k]^(-)), then the correlation estimate is (Subscript[(OverHat[c]), k])=(0/((Subscript[N, k]^(+))+(Subscript[N, k]^(-))))=0.

s-functions and the Bell-CHSH inequalities

The s-functions are simple linear functions of the correlations:

(Subscript[s, 1])=-(Subscript[c, 1])+(Subscript[c, 2])+(Subscript[c, 3])+(Subscript[c, 4])

(Subscript[s, 2])=   (Subscript[c, 1])-(Subscript[c, 2])+(Subscript[c, 3])+(Subscript[c, 4])

(Subscript[s, 3])=   (Subscript[c, 1])+(Subscript[c, 2])-(Subscript[c, 3])+(Subscript[c, 4])

(Subscript[s, 4])=   (Subscript[c, 1])+(Subscript[c, 2])+(Subscript[c, 3])-(Subscript[c, 4])

The CHSH inequalities*: -2≤(Subscript[s, 1]),(Subscript[s, 2]),(Subscript[s, 3]),(Subscript[s, 4])≤+2.

*Clauser, Horne, Shimony, Holt (1969): Generalized Bell inequalities.

“Classical” assumptions say “these must be satisfied”.

Quantum mechanics says “not always!”.

The Clauser, Aspect, and Zeilinger experiments (and many others) have demonstrated that at least one inequality is violated in certain experimental situations, thus eliminating certain classical “hidden variable” explanations.

The QM model type -- Statistical predictions

Denote Alice and Bob’s joint conditional probabilities by P(A=s,B=t|(Subscript[M, A])=u,(Subscript[M, B])=v), where

Joint outcome (A,B)=(s,t)=(±1,±1),

Joint measurement choice ((Subscript[M, A]),(Subscript[M, B]))=(u,v)=(1 or 2, 1 or 2).

Row[{qmModelCondTable,Invisible[xxx],Text@Style["⟸Compare⟹",Red,Large],Invisible[xxx],condProbSymbolicTab,Invisible[xxxxxx],qmCandSTable}]//TraditionalForm

Note that it is possible for a CHSH inequality to be violated (QM s-functions table, last row), since -2(Sqrt[2])<-2 and 2(Sqrt[2])>2.

-2(Sqrt[2]) and 2(Sqrt[2]) are called the Tsirelson bounds.

These obtain because the measurement difference angles satisfy a linear constraint such as (Subscript[θ, 1])=(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4]).

If the (Subscript[θ, k])’s were independent, the s-functions would take values in [-4,4]. But since we have constrained them according to (Subscript[θ, 1])=(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4]), they are restricted to the interval [-2(Sqrt[2]),2(Sqrt[2])].

Example of a “model instance”

Assign specific numeric values to the parameters of any model type to get a model instance of that type.

For example, for the QM model type, assign ---

(Subscript[θ, 1])=67.5°,(Subscript[θ, 2])=22.5°,(Subscript[θ, 3])=22.5°(Subscript[θ, 4])=22.5°

This can be thought of as corresponding to a specific experimental setup for the EPRB experiment.

qmMaxDevTable//TraditionalForm

Correlations = (1/2)(Sqrt[2])(-1,1,1,1) and s-functions = (2(Sqrt[2]),0,0,0).

This is the infamous QM model instance, one of whose s-functions maximally violates a CHSH inequality: (Subscript[s, 1])=2(Sqrt[2])>2 .

The Generic model type

Completely general conditional probabilities (Subscript[γ, k])=P(A=s,B=t|(Subscript[M, A])=u,(Subscript[M, B ])=v).

(Subscript[γ, k])≥0 for all k and all rows sum to 1: ((Subscript[γ, 1])+(Subscript[γ, 2])+(Subscript[γ, 3])+(Subscript[γ, 4]))  =  ((Subscript[γ, 5])+(Subscript[γ, 6])+(Subscript[γ, 7])+(Subscript[γ, 8]) ) =
((Subscript[γ, 9])+(Subscript[γ, 10])+(Subscript[γ, 11])+(Subscript[γ, 12]) ) =  ((Subscript[γ, 13])+(Subscript[γ, 14])+(Subscript[γ, 15])+(Subscript[γ, 16]) ) =1.

Row[{operationalModelCondTable,Invisible[xxx],Text@Style["⟸Compare⟹",Red,Large],Invisible[xxx],condProbSymbolicTab,,Invisible[xxxxxx],genericCandSTable}]//TraditionalForm

Note that it is possible for a CHSH inequality to be violated.

In fact it is even possible to exceed a Tsirelson bound (±2(Sqrt[2]))

Note: QM s-functions do not exceed the Tsirelson bound.

Definitions related to locality and determinism

Remote context independence (RCI) : “Alice’s outcome probability does not depend on Bob’s measurement choice, and vice-versa”. 
-- For a given s  and  u, P(s|u,v)=P(s|u,v') for all possible v,v', and
--  For a given t  and  v, P(t|u,v)=P(t|u',v),  for all possible u,u'.                                                                         --  In this case, we define P(s|u)=P(s|u,v) (for any v) and 		--  P(t|v)=P(t|u,v) (for any u), respectively.

Remote outcome independence (ROI) : “Alice and Bob’s outcomes are conditionally independent given their measurement choices”.
P(s,t|u,v) = P(s|u,v)×P(t|u,v)      for all s,t=±1 and u,v=1 or 2.

Factorizability (or factorization condition) (FC) : “Alice and Bob’s joint outcome probability, given their joint measurement, is the product of their individual outcome probabilities, given their individual measurements.”                                                                                                                                                                                  P(s,t|u,v)=P(s|u) × P(t|v)  for all s,t=±1 and u,v=1 or 2.

Theorem:  FC⇔RCI+ROI

Noncontextual (NC): “The measurement process consists of definite, pre-existing values just waiting to be observed.”

Note: In the literature, this would be a combination of “value definiteness” and “non-contextuality” (see for example the Stanford Encyclopedia, Ref. 22). For the purposes of this presentation (and my paper, Ref. 27), I will use “noncontextuality” in a stronger sense of including pre-existing value definiteness. In any case, it will be defined mathematically by the operational model table to be shown below.

Outcome determinism (OD) : “ Given a joint measurement choice (context), exactly one of  Alice and Bob’s joint outcome probabilities is 1,  and the rest are 0”.
That is, a given joint measurement choice (u,v),   P(s,t|u,v) = 1 for exactly one pair (s,t), and 0 otherwise.

Theorems: RCI+OD⇒NC  &  Factorizability⇒NC

The outcome deterministic (OD) model instances (or type)

There are 256 OD model instances: 4 ways to place one 1 in each of 4 rows: (4^4)=256.

All 256 are perfectly correlated  (±1) and satisfy remote outcome independence (ROI).

16 satisfy RCI

112 satisfy all 8 CHSH inequalities but not RCI

128 not only violate a CHSH inequality, but also exceed a Tsirelson bound (±2(Sqrt[2])).

The 16 RCI + OD model instances are special

There are 256 OD model instances, but only 16 satisfy RCI.

In order to save space, the conditional probabilities P(A=s,B=t|(Subscript[M, A])=u,(Subscript[M, B])=v) are listed in columns instead of a four-row table. The different colors differentiate the separate contexts.

Row[{rciODTable,odCandSTable}]//TraditionalForm

These 16 RCI+OD model instances satisfy all of the CHSH inequalities.

In fact, they achieve lower or upper bounds (-2 or +2) exactly.

Noncontextual model type

Given any probability mass function (pmf) ρ=((Subscript[ρ, 1]),(Subscript[ρ, 2]),...,(Subscript[ρ, 16])), that is, all (Subscript[ρ, k])≥0 and ∑(Subscript[ρ, k ])=1.

This guarantees that each row in the following table sums to 1, by construction.

Row[{ncModelCondTable,preDetCandSTable}]//TraditionalForm

Theorem: All NC model instances satisfy all of the CHSH inequalities.

Proof: The (Subscript[ρ, k])’s form a pmf, so all of the s-functions are between -2 and +2.

Factorizable model type

For the table that follows, define:

(Subscript[α, 1])≐P(A=-1|(Subscript[M, A])=1)   and   (Subscript[β, 1])≐P(B=-1|(Subscript[M, B])=1)

(Subscript[a, 2])≐P(A=-1|(Subscript[M, A])=2)  and   (Subscript[β, 2])≐P(B=-1|(Subscript[M, B])=2)

(Subscript[α, 3])≐P(A=1|(Subscript[M, A])=1)     and    (Subscript[β, 3])≐P(B=1|(Subscript[M, B])=1)

(Subscript[α, 4])≐P(A=1|(Subscript[M, A])=2)     and    (Subscript[β, 4])≐P(B=1|(Subscript[M, B])=2).

Therefore (Subscript[α, 1])+(Subscript[α, 3])=1and(Subscript[α, 2])+(Subscript[α, 4])=1 and (Subscript[β, 1])+(Subscript[β, 3])=1and(Subscript[β, 2])+(Subscript[β, 4])=1, hence all rows sum to 1.

Row[{factorizableModelCondTable,blCandSTable}]//TraditionalForm

All factorizable model instances satisfy all of the CHSH inequalities, due to the following theorem:

Theorem: Every factorizable model instance is also noncontextual.

Proof: Write (({{(Subscript[ρ, 1])}, {(Subscript[ρ, 2])}, {(Subscript[ρ, 3])}, {(Subscript[ρ, 4])}, {(Subscript[ρ, 5])}, {(Subscript[ρ, 6])}, {(Subscript[ρ, 7])}, {(Subscript[ρ, 8])}, {(Subscript[ρ, 9])}, {(Subscript[ρ, 10])}, {(Subscript[ρ, 11])}, {(Subscript[ρ, 12])}, {(Subscript[ρ, 13])}, {(Subscript[ρ, 14])}, {(Subscript[ρ, 15])}, {(Subscript[ρ, 16])}}))=(({{(Subscript[α, 1])(Subscript[α, 2])(Subscript[β, 1])(Subscript[β, 2])}, {(Subscript[α, 1])(Subscript[α, 4])(Subscript[β, 1])(Subscript[β, 2])}, {(Subscript[α, 2])(Subscript[α, 3])(Subscript[β, 1])(Subscript[β, 2])}, {(Subscript[α, 3])(Subscript[α, 4])(Subscript[β, 1])(Subscript[β, 2])}, {(Subscript[α, 1])(Subscript[α, 2])(Subscript[β, 1])(Subscript[β, 4])}, {(Subscript[α, 1])(Subscript[α, 4])(Subscript[β, 1])(Subscript[β, 4])}, {(Subscript[α, 2])(Subscript[α, 3])(Subscript[β, 1])(Subscript[β, 4])}, {(Subscript[α, 3])(Subscript[α, 4])(Subscript[β, 1])(Subscript[β, 4])}, {(Subscript[α, 1])(Subscript[α, 2])(Subscript[β, 2])(Subscript[β, 3])}, {(Subscript[α, 1])(Subscript[α, 4])(Subscript[β, 2])(Subscript[β, 3])}, {(Subscript[α, 2])(Subscript[α, 3])(Subscript[β, 2])(Subscript[β, 3])}, {(Subscript[α, 3])(Subscript[α, 4])(Subscript[β, 2])(Subscript[β, 3])}, {(Subscript[α, 1])(Subscript[α, 2])(Subscript[β, 3])(Subscript[β, 4])}, {(Subscript[α, 1])(Subscript[α, 4])(Subscript[β, 3])(Subscript[β, 4])}, {(Subscript[α, 2])(Subscript[α, 3])(Subscript[β, 3])(Subscript[β, 4])}, {(Subscript[α, 3])(Subscript[α, 4])(Subscript[β, 3])(Subscript[β, 4])}})).

Then use (Subscript[α, 1])+(Subscript[α, 3])=1and(Subscript[α, 2])+(Subscript[α, 4])=1 and (Subscript[β, 1])+(Subscript[β, 3])=1and(Subscript[β, 2])+(Subscript[β, 4])=1 to show that the (Subscript[ρ, k])'s form a pmf, and if you substitute these for the 16 noncontextual model conditional probabilities and simplify, you get the 16 factorizable model conditional probabilities. (See my paper for details.)

Trivial correlations and s-functions

All of its correlations and s-functions are 0. 
This the reason for the name “trivial”.
Obviously all 8 CHSH inequalities are satisfied.

{trivialModelCondTable,trivialCandSTable}//TraditionalForm

The main operational model types in one table

The four rows of each of the previous tables are concatenated into a single column 16-vector.

Each measurement context (u,v)=(1,1),(1,2),(2,1),or (2,2) constitutes a separate probability space, differentiated by color.

modelsOperAllTable

In every column, entries in the same context (of the same color) sum to 1 .

Generic: (Subscript[γ, k])≥0 &  (∑_1^4)(Subscript[γ, k])=(∑_5^8)(Subscript[γ, k])=(∑_9^12)(Subscript[γ, k])=(∑_13^16)(Subscript[γ, k])=1.

QM: Trig identity.

Noncontextual: (Subscript[ρ, k])≥0 &(∑_1^16)(Subscript[ρ, k])=1.

Factorizable: (Subscript[α, k]),(Subscript[β, k])≥0 &  (Subscript[α, 1])+(Subscript[α, 3])=(Subscript[α, 2])+(Subscript[α, 4])=(Subscript[β, 1])+(Subscript[β, 3])=(Subscript[β, 2])+(Subscript[β, 4])=1.

OD and Trivial: Obvious.

Hierarchy of model types

Each box contains a set of model instances. Arrows indicate set inclusion.

modelsGraphPlotNew

This diagram is valid in the context of an EPRB experiment, that is, a (2,2,2)-Bell-type scenario.

2 observers, 2 measurements per observer, 2 outcomes per measurement.

Model instances and their relationships

The following Venn diagram reveals some relationships that may not be obvious from the preceding tree hierarchy of model types.

Note that some QM model instances  are contextual and some are noncontextual.

The RCI+OD model instances are the building blocks for all noncontextual model instances (including the factorizable ones), via convex combinations.

This is equivalent to saying that every noncontextual model instance can be expressed as a local, (outcome) deterministic “hidden variables” model.

The only model instance that is both QM and factorizable is the trivial one (all correlations are 0 --  not very interesting!)

The Three Theorems of John Bell

A “hidden variables” model cannot replicate at least some of the statistical predictions of QM if it is based on either:

Remote Context Independence and Outcome Determinism(RCI+OD). 	“On the Einstein, Podolsky, Rosen Paradox” (1964)

Factorizability (or the Factorization Condition (FC)). 			“The Theory of Local Beables” (1976)

Non-contextuality (NC) . 						“On the Problem of Hidden Variables in Quantum Mechanics” (1966)

Correlation Plots and Bell’s Three Theorems

Plots of the correlations ((Subscript[c, 2]),(Subscript[c, 3]),(Subscript[c, 4])) given that (Subscript[c, 1])=-1, -(1/2),0,(1/2), 1 from left to right:

(Subscript[c, 1])=        	        -1 ,                    -(1/2),                      0,                       (1/2),                      1

Convex hull of 16 RCI+Outcome model instances  = 
noncontextual model instances

Theorem: The convex hull of the 16 RCI+OD model instances = The set of all NC model instances.

Proof: Let ((Subscript[ρ, 1]),(Subscript[ρ, 2]),...,(Subscript[ρ, 16])) be the parameters of and arbitrary NC model instance.

Let ((Subscript[e, 1]),(Subscript[e, 2]),...,(Subscript[e, 16])) be the columns of the RCI+OD table, i.e., (Subscript[e, k]) is the kth RCI+OD model instance (k=1,2...,16).

Then it is easy to show that the the NC conditional probabilities (({{(Subscript[ρ, 1])+(Subscript[ρ, 2])+(Subscript[ρ, 5])+(Subscript[ρ, 6])}, {(Subscript[ρ, 9])+(Subscript[ρ, 10])+(Subscript[ρ, 13])+(Subscript[ρ, 14])}, {(Subscript[ρ, 3])+(Subscript[ρ, 4])+(Subscript[ρ, 7])+(Subscript[ρ, 8])}, {..........}, {(Subscript[ρ, 2])+(Subscript[ρ, 4])+(Subscript[ρ, 10])+(Subscript[ρ, 12])}, {(Subscript[ρ, 6])+(Subscript[ρ, 8])+(Subscript[ρ, 14])+(Subscript[ρ, 16])}}))=(Subscript[ρ, 1 ])(Subscript[e, 1])+(Subscript[ρ, 2])(Subscript[e, 2])+(Subscript[ρ, 3])(Subscript[e, 3])+...(Subscript[ρ, 15])(Subscript[e, 15])+(Subscript[ρ, 16])(Subscript[e, 16]).

Since ((Subscript[ρ, 1]),(Subscript[ρ, 2]),...,(Subscript[ρ, 16])) is a pmf, the column vector on the left is in the convex hull of ((Subscript[e, 1]),(Subscript[e, 2]),...,(Subscript[e, 16])), the 16 RCI+OD model instances.

The 16 points on the boundary represent the RCI+OD model instances.

There are NC model instances that are not factorizable model instances! (See my paper for the examples.)

This figure is just a schematic representation, of course.

It is actually a polytope in a 9-dimensional subspace of 16-dimensional Euclidean space.

Taking convex combinations of OD model instances is an intuitive, natural alternative to the standard “hidden variables” approach to so-called “no-go” theorem proofs.

Convex hull of all 256 outcome deterministic (OD) model instances = all generic model instances

Theorem: Any generic model instance (including all QM model instances) can be written as a convex combination of outcome deterministic model instances. (See my paper for the proof.)

However, in the contextual cases, these cannot be local, in the sense of remote context independence (RCI).

This is equivalent to saying there are some QM model instances whose statistical predictions cannot be reproduced by any local (RCI), outcome deterministic hidden variables model.

This figure is just a schematic representation, of course. It is actually a polytope in a 13-dimensional subspace of 16-dimensional Euclidean space.

QM model instance that is also noncontextual

Consider the QM model instance with parameters (Subscript[θ, 1])=135°,(Subscript[θ, 2])=0°,(Subscript[θ, 3])=90(Subscript[°θ, 4])=45° .

NC parameters: (Subscript[ρ, k])=(1/4) for k=2,8,9,15 and (Subscript[ρ, k])=0 otherwise.

Row[{qmModelCondTable/.{(Subscript[θ, 1])->135°,(Subscript[θ, 2])->0°,(Subscript[θ, 3])->90°,(Subscript[θ, 4])->45°},Text@Style["  =  ",Red],displayODQM4 }]//TraditionalForm

The QM model instance (on the left) is equal to the convex combination of the four OD model instances (on the right) via the weights ((1/4),(1/4),(1/4),(1/4)).

Correlations = (0,1,-1,0) and s-functions = (0,-2,2,0).

So all CHSH inequalities are satisfied (-2≤(Subscript[s, 1]), (Subscript[s, 2]),(Subscript[s, 3 ,])(Subscript[s, 4])≤2).

This convex combination of 4 RCI+OD model instances can be turned into a “local deterministic hidden variables” model (Λ,ℱ,μ):

Λ={(Subscript[λ, 1]),(Subscript[λ, 2]),...,(Subscript[λ, 4])} = sample space of hidden variables,

ℱ=(2^Λ) = σ-algebra of events,

μ({(Subscript[λ, k])})=(Subscript[w, k]) for k=1,2,3,4 (extend μ to ℱ in the natural way to get the full probability measure).

Then whenever the “hidden variable” (Subscript[λ, k]) obtains, the conditional probabilities that determine the experimental outcome are given by the kth OD model instance.

For each k, this happens 100 (Subscript[w, k])%=25 % of the time, which makes the observed statistics approximate those of the QM model instance, in the long run, over many trials.

In other words, this particular QM model instance has a local, deterministic hidden variables model representation.

QM model instance that is also contextual

The infamous QM model instance with parameters (Subscript[θ, 1])=67.5°,(Subscript[θ, 2])=22.5°,(Subscript[θ, 3])=22.5°(Subscript[θ, 4])=22.5°.

Row[{qmMaxDevTable,Text@Style["=   ",Red,36],displayODQM13}]//TraditionalForm

The QM model instance in the first table is equal to the convex combination of the 13 OD model instances in the second table, via the indicated 13 weights (Subscript[w, k]), which form a pmf.

Correlations = (1/2)(Sqrt[2])(-1,1,1,1) and s-functions = (2(Sqrt[2]),0,0,0).

One CHSH inequality is (maximally) violated. Hence it is cannot be noncontextual.

Therefore we call it contextual.

The convex combination of OD model instances can be turned into a “deterministic hidden variables” model (Λ,ℱ,μ) (but not local!):

Λ={(Subscript[λ, 1]),(Subscript[λ, 2]),...,(Subscript[λ, 13])} = sample space of hidden variables,

ℱ=(2^Λ) = σ-algebra of events,

μ({(Subscript[λ, k])})=(Subscript[w, k]) for k=1,2,3,...,13 (extend μ to ℱ in the natural way to get the full probability measure).

Then whenever the “hidden variable” (Subscript[λ, k]) obtains, the conditional probabilities that determine the experimental outcome are given by the kth OD model instance.

For each k, this happens 100 (Subscript[w, k])% of the time, which makes the observed statistics approximate those of the QM model instance, in the long run, over many trials.

This is therefore a perfectly legitimate outcome deterministic (OD) hidden variables model for this QM model instance, but it is not local, since none of the 13 OD model instances are local. That is, none of them satisfy RCI (hence cannot be factorizable, either).

A Fable and Conclusions

Suppose Alice and Bob ask their friend Eve to try and fool them into thinking that they are receiving data from an EPRB experiment.

At each iteration of the “experiment”, Eve sends out four numbers ((Subscript[A, 1]),(Subscript[A, 2]),(Subscript[B, 1]),(Subscript[B, 2]))  that each take the value -1 or +1. We will call these the “statistical observables” (from one of A. Fine’s 1982 papers).

If Alice chooses her first measurement, she gets the outcome A=(Subscript[A, 1]). If she chooses her second measurement, she gets the outcome A=(Subscript[A, 2]). Similarly for Bob wrt his measurement choices and outcomes.

In order for Eve to be successful, she must choose an appropriate joint pmf ρ=((Subscript[ρ, 1]),(Subscript[ρ, 2]),...,(Subscript[ρ, 16])) on the 16 possible value combinations  ((Subscript[A, 1]),(Subscript[A, 2]),(Subscript[B, 1]),(Subscript[B, 2])). See table on the left.

This must be chosen in advance of the experiment and stays the same throughout the experiment.

Row[{brHVTable,preArrangedBlackBox}]//TraditionalForm

The diagram on the right shows the resulting operational view of this situation, where (Subscript[P, SO])((Subscript[A, u])=s,(Subscript[B, v])=t) indicates the “statistical observable” marginal probabilities, based on the pmf ρ.

The four tables below show these marginal probabilities, one table for each “compatible” pair ((Subscript[A, 1]),(Subscript[B, 1])), ((Subscript[A, 1]),(Subscript[B, 2])), ((Subscript[A, 2]),(Subscript[B, 1])), ((Subscript[A, 2]),(Subscript[B, 2])).

brHVMarginalsTable

Note that, if these double marginal probabilities are viewed as double conditional probabilities (given the context), they are exactly the noncontextual ones.

Therefore, this strategy will work if the experimental setup corresponds to a noncontextual model instance. But it will not work if the resulting model instance is contextual.

Note that the joint pmf ρ effectively encodes the set of possible correlations in advance of any measurement.

Final conclusion: In a QM world, in which the behavior can be contextual, it is not always possible to fake the results in a way that ignores future measurements.

This sounds an awful lot like Bohr’s position in his debates with Einstein.

Thank you. Questions?

Backup slides

Outcome Predictability (OP)

There are 16 model types that allow Alice to predict Bob’s outcome given only her local measurement choice and outcome.

predOutcomeTable//TraditionalForm

However only 4 OP model instances can also be QM.

opQMTable//TraditionalForm

The measurement difference angle parameters (Subscript[θ, k]) for each of them are, respectively,

(Subscript[θ, 1])=0°,(Subscript[θ, 2])=0°,(Subscript[θ, 3])=0°,(Subscript[θ, 4])=0°,

(Subscript[θ, 1])=0°,(Subscript[θ, 2])=0°,(Subscript[θ, 3])=90°,(Subscript[θ, 4])=-90°,

(Subscript[θ, 1])=90°,(Subscript[θ, 2])=90°,(Subscript[θ, 3])=0°,(Subscript[θ, 4])=0°,

(Subscript[θ, 1])=270°,(Subscript[θ, 2])=90°,(Subscript[θ, 3])=90°,(Subscript[θ, 4])=90°,

Measurement Predictability (MP)

There are only 4 model types that allow Alice to predict Bob’s measurement given only her local measurement choice and outcome.

predMeasTable//TraditionalForm

There are no QM model instances that are also measurement predictable. This confirms the fact that, in the context of the EPRB experiment, it is impossible Bob to send information to Alice, via his measurement choice.

Predictability summary table.

predSummaryTable//TraditionalForm

Bell-Kochen-Specker

Kochen and Specker (Ref .’s 16 and 17) showed that quantum mechanics is inconsistent with the simultaneous assumptions of value definiteness, noncontextuality, and that there is a one-to-one correspondence between the properties of a quantum system and the projection operators in the system’s Hilbert space.

Their proof was constructive (by counterexample) and not statistical.

Therefore it is unlike Bell’s proof that noncontextuality leads to a contradiction involving “dispersion free” states (zero uncertainty).

Nevertheless, these have sometimes been tied together as the “BKS” theorem.

Note also that Bell remarks specifically in his paper (Ref.  2) that he felt the assumption of “noncontextuality” was unjustified. (In typical Bell humor: “That  so much follows from such apparently innocent assumptions leads us to question their innocence.”)

David Bohm and Bohmian Mechanics

From “The Quantum Physics Lady” 
http://www.quantumphysicslady.org/glossary/bohmian-interpretation-of-quantum-mechanics/#:~:text=The%20Bohmian%20Interpretation%20is%20explicitly,experimental%20phenomenon%20of%20quantum%20mechanics.

Selected quotes from John Bell with comments

“Bohmian mechanics makes explicit the most dramatic feature of quantum theory: quantum nonlocality….

“It should be emphasized that the nonlocality of Bohmian mechanics derives solely from the nonlocality… built into the structure of standard quantum theory. This nonlocality originates from a wave function on configuration space, an abstraction which, roughly speaking, combines—or binds—distant particles into a single irreducible reality. As Bell has stressed,

‘That the guiding wave, in the general case, propagates not in ordinary three-space but in a multidimensional-configuration space is the origin of the notorious ‘nonlocality’ of quantum mechanics. It is a merit of the de Broglie-Bohm version to bring this out so explicitly that it cannot be ignored.’ (See Ref. 1 below)

Due to its explicit non-locality, the Bohmian Interpretation is able to explain the mechanism of entanglement in a way that the Copenhagen Interpretation cannot. Entanglement seems to require influences that travel faster than light. That would violate the speed limit for matter and energy assumed in Special Relativity. In contrast, the Bohmian Interpretation posits that two entangled particles act in a coordinated manner, regardless of distance, because they are part of the same thing.

This fits the mystics’ view that “we are all one.” But it doesn’t fit the view of many physicists. David Bohm was very engaged by the idea of holism, a concept important in Buddhism as well as other Eastern religions. It’s also important in New Age philosophies. His book Wholeness and the Implicate Order, as well as some of his other writings, explore the implications of quantum physics for issues of locality and holism.

John S. Bell. “Speakable and Unspeakable in Quantum Mechanics”: Collected Papers on Quantum Philosophy, Cambridge University Press, 1987.
https://doi.org/10.1017/CBO9780511815676

Some other links related to Bohm:

Video: “A Problem with Bohmian Mechanics,” Looking Glass Universe channel, Youtube, Published Feb. 10, 2014; https://www.youtube.com/watch?v=Qz4CHI_W-TA&t=60s

”Bohmian Mechanics” Stanford Encyclopedia of Philosophy First published Fri Oct 26, 2001; substantive revision Mon Mar 27, 2017 https://plato.stanford.edu/entries/qm-bohm/

Ballentine and and the Statistical Ensemble Interpretation

Ballentine’s proposal for a way around the problem that EPR exposed, namely that QM does not provide a complete explanation of certain phenomena, is to differentiate between the following two views, and adopt the second:

A pure state provides a complete and exhaustive description of an individual system.

A pure state (and hence also a general state) provides a description of certain statistical properties of an ensemble of similarly prepared systems, but need not provide a complete description of an individual system. (See Ref.  20)

Correlation plots of the main model types

Plots of the correlations ((Subscript[c, 2]),(Subscript[c, 3]),(Subscript[c, 4])) given that (Subscript[c, 1])=-1, -(1/2),0,(1/2), 1 from left to right:

(Subscript[c, 1])=                  -1 ,          -(1/2),            0,              (1/2),              1

References

John S. Bell. “On the Einstein, Podolsky, Rosen Paradox”, Physics Vol. 1, No. 3, pp. 195-290, 1964. (Reproduced in [9].)
https://dx.doi.org/10.1103/PhysicsPhysiqueFizika.1.195

John S. Bell. “On the Problem of Hidden Variables in Quantum Mechanics”, Review of Modern Physics 38, 1966 (Reproduced in [9].)
https://dx.doi.org/10.1103/RevModPhys.38.447

John S. Bell. “The Theory of Local Beables”, Epistemological Letters 9, 1976; Dialectia 39 1985. (Reproduced in [9].)
https://doi.org/10.1142/9789812386540_0008

John S. Bell. “Bertlmann's Socks and the Nature of Reality”, Journal de Physique Colloques C2 Supplement 3, 1981. (Reproduced in [9].)
https://doi.org/10.1142/9789812795854_0085

John S. Bell, “EPR correlations and EPW distributions”, New Techniques and Ideas in Quantum Measurement Theory, D. M. Greenberger,ed., Ann.
New York Acad. Sci vol 480, 1986. (Reproduced in [9].)
https://doi.org/10.1111/j.1749-6632.1986.tb12429.x

John S. Bell. “Introduction to the Hidden Variable Question”, Proceedings of the International School of Physics ‘Enrico Fermi’, course II: Foundations
of Quantum Mechanics, Academic 171-81. New York, 1971. (Reproduced in [9].)
https://doi.org/10.1142/9789812795854_0074

John S. Bell. “La nouvelle cuisine”, Between Science and Technology , A Sarmeljin, P. Kroes, ed., Elsevier/North-Holland 1990. (Reproduced in
[9].)
https://doi.org/10.1142/9789812386540_0022

John S. Bell and M. Nauenberg, “The moral aspects of quantum mechanics”, Preludes in Theoretical Physics { In Honor of V.F. Weisskopf, de Shalit
A, Feshbach H and van Hove L eds. Amsterdam: North Holland, 1966. (Reproduced in [9].)
https://doi.org/10.1142/9789812386540_0003

John S. Bell. “Speakable and Unspeakable in Quantum Mechanics”: Collected Papers on Quantum Philosophy, Cambridge University Press, 1987.
https://doi.org/10.1017/CBO9780511815676

John S. Bell. “John S. Bell on the Foundations of Quantum Mechanics”, M. Bell, K. Gottfried, M. Veltman, eds., World Scientific, Singapore, 2001.
https://doi.org/10.1142/4757

S. Abramsky, A. Brandenburger. “The sheaf-theoretic structure of non-locality and contextuality”, IOP Publishing and Deutsche Physikalische Gesellschaft,
New Journal of Physics, Volume 13, November 2011.
https://dx.doi.org/10.1088/1367-2630/13/11/113036

Arthur Fine. “Hidden Variables, Joint Probability, and the Bell Inequalities”, Phys. Rev. Lett. 48, 291, February 1982.
https://doi.org/10.1103/PhysRevLett.48.291

J.F. Clauser, M.A. Horne, A. Shimony, R.A. Holt. “Proposed experiment to test local hidden-variable theories”, Phys.Rev. Lett., 23 (15): 880--4, Bibcode:1969PhRvL..23..880C, doi:10.1103/PhysRevLett.23.880), 1969.
https://doi.org/10.1103/PhysRevLett.23.880

Alain Aspect. “Bell’s Theorem: The Naive View of an Experimentalist”, Quantum [Un]speakables -- From Bell to Quantum information”, edited by R. A. Bertlmann and A. Zeilinger, Springer, 2002.
https://dx.doi.org/10.1007/978-3-662-05032-3_9

N.D. Mermin. “Hidden variables and the two theorems of John Bell”, Rev. Mod. Phys., 65, 803{815, 1993.
https://doi.org/10.1103/RevModPhys.65.803

S. Kochen, E. Specker. “The Problem of Hidden Variables in Quantum Mechanics”, Journal of Mathematics and Mechanics, 17: 59{87, 1967.
http://dx.doi.org/10.1512/iumj.1968.17.17004

C. Held. “The Kochen-Specker Theorem”, The Stanford Encyclopedia of Philosophy, Edward N. Zalta (ed.), Spring 2018 Edition.
https://plato.stanford.edu/archives/spr2018/entries/kochen-specker/

A. Tavakoli, N. Gisin. “The Platonic solids and fundamental tests of quantum mechanics”, Quantum, Vol. 4, 293, July 2020.
https://doi.org/10.22331/q-2020-07-09-293

D. Bohm, “A Suggested Interpretation of the Quantum Theory in Terms of  ‘Hidden’  Variables I and II”, Physical Review, Vol. 85, No. 2 and No. 3 , Jan 15, 1952.           https://doi.org/10.1103/PhysRev.85.166

L.E. Ballentine, “The Statistical Interpretation of Quantum Mechanics”, Reviews of Modern Physics, Vol. 42, No. 4, October 1970. https://doi.org/10.1103/RevModPhys.42.358

Mojtaba Ghadimi, Michael J. W. Hall, and Howard M. Wiseman. “Nonlocality in Bell’s theorem, in Bohm’s theory, and in Many Interacting Worlds theorising”, 
https://doi.org/10.48550/arXiv.1807.01568

Wayne Myrvold,, Marco Genovese, and Abner Shimony, “Bell’s Theorem”, The Stanford Encyclopedia of Philosophy (Fall 2020 Edition), Edward N. Zalta (ed.), https://plato.stanford.edu/entries/bell-theorem/

Travis Norsen, “Against Realism”, [quant-ph] arXiv:0607057v2 16 Nov 2006. 
https://doi.org/10.1007/s10701-007-9104-1

Travis Norsen, “Bell Locality and the Nonlocal Character of Nature”,   Foundations of   Physics Letters, 19, 633-655, 2006.                                                                                                                                                                                          https://doi.org/10.1007/s10702-006-1055-9

Shan Gao & Mary Bell (ed.’s), “Quantum Nonlocality and Reality -- 50 Years of Bell’s Theorems”, Cambridge University Press, 2016.

Ben Schumacher and Michael Westmoreland, “Quantum Processes, Systems, and Information”, Cambridge University Press, 2010.

M. L. Ulrey, “The Role of (Non) Contextuality in Bell’s Theorems from the Perspective of an Operational Modeling Framework”, International Journal of Quantum Foundations, Vol. 8, Issue 2, Mar, 2022.  https://ijqf.org/archives/6491    and   https://doi.org/10.48550/arXiv.2001.09756

Initialization

For plots of convex hull of deterministic pmf’s and/or conditional probability vectors.

{rp16,cp16}={RegularPolygon[16],CirclePoints[16]};
{rp256,cp256}={RegularPolygon[256],CirclePoints[256]};

sumOfRandomReals[min_,sum_,numberOfSummands_,numberOfTuples_]:=Differences[#]&/@(Append[#,sum]&/@(Prepend[#,min]&/@(Sort[#]&/@RandomReal[{min,sum},{numberOfTuples,numberOfSummands-1}])))

Probability calculus.

expectations[outcomesAndProbs_]:=
Total[Table[outcomesAndProbs[[k,1]]*outcomesAndProbs[[k,2]],{k,1,Length[outcomesAndProbs]}]];
sMatrix={{-1,1,1,1},{1,-1,1,1},{1,1,-1,1},{1,1,1,-1}};
s1Function[outcomesAndProbs_]:={1,-1,1,1}.expectations[outcomesAndProbs];

(*marginalSelect[outcomesAndProbs_,indices_]:=Module[{},
SortBy[Table[{outcomesAndProbs[[k,1,indices]],outcomesAndProbs[[k,2]]},{k,1,Length[outcomesAndProbs]}],First]
];*)
columnSelect[outcomesAndProbs_,indices_]:=Module[{},
Table[{outcomesAndProbs[[k,1,indices]],outcomesAndProbs[[k,2]]},{k,1,Length[outcomesAndProbs]}]
];
marginalize[outcomesAndProbs_,indices_]:=Module[{select,sort,gather},
select=columnSelect[outcomesAndProbs,indices];
sort=SortBy[select,First];
gather=GatherBy[sort,First];
Table[{gather[[k,1,1]],Total[gather[[k,All,2]]]},{k,1,Length[gather]}]
];
marginalizeFull[pmf_,select_]:=Module[{pos,probsNew},
pos=Table[Flatten[Position[pmf[[All,1,select]],pmf[[k,1,select]]]],{k,1,Length[pmf]}];
probsNew=Table[Total[pmf[[pos[[j]],2]]],{j,1,Length[pos]}];
Table[{pmf[[k,1]],probsNew[[k]]},{k,1,Length[pmf]}]
];

probability[pmf_,outcomes_]:=Module[{pos},pos=Flatten[Table[Position[pmf[[All,1]],outcomes[[k]]],{k,1,Length[outcomes]}]];
Total[pmf[[pos,2]]]];

The conditionalize and “full” conditionalize routine.

The “full” version makes a table of all submitted pmf’s the same (maximum) size so as to make for easy comparisons. The tradeoff for this convenience is that some of the conditional pmf’s will have repeated, redundant entries.  
Revised to accommodate zero denominators in the conditional probability calculations -- bypass if the pmf16 is symbolic instead of numeric.

(*Revised to accomodate zero denominators in the conditional probability calculation -- bypass if the pmf16 is symbolic instead of numeric.*)conditionalize[outcomesAndProbs_,conditioned_,conditional_]:=Module[{indicesAll,marginAll,marginRight,gather,indicesLeft,indicesRight,denom},
indicesLeft=Sort[conditioned];
indicesRight=Sort[conditional];
indicesAll=Join[indicesLeft,indicesRight];
marginAll=marginalize[outcomesAndProbs,indicesAll];
marginRight=marginalize[outcomesAndProbs,indicesRight];
(*Notice this next statement ASSUMES that the conditioning variables are in the final -Length[indicesRight] positions!!*)
(*SortBy[*)Table[denom=(marginRight[[Position[marginRight[[All,1]],marginAll[[k,1,-Length[indicesRight];;-1]]][[1]],2]][[1]]);{marginAll[[k,1]],If[NumericQ[denom],If[denom≠0,marginAll[[k,2]]/denom,0],marginAll[[k,2]]/denom]//Simplify},{k,1,Length[marginAll]}
](*,First]*)];

conditionalizeFull[pmf_,conditioned_,conditional_]:=Module[{condAll,numer,denom},
condAll=Sort[Join[conditioned,conditional]];
numer=marginalizeFull[pmf,condAll][[All,2]];
denom=marginalizeFull[pmf,conditional][[All,2]];
Table[{pmf[[k,1]],If[!NumericQ[denom[[k]]],numer[[k]]/denom[[k]],If[denom[[k]]≠0,numer[[k]]/denom[[k]],"Undefined"]]},{k,1,Length[pmf]}]
];

(*Like conditionalizeFull, except it creates a "full" list of conditioned outcomes16 and probs to "match" the original full list. This, way it is easier to make comparison tables to check for FC, LC, RCI, ROI, etc. that can be interpreted easily, rather than requiring the reader to check corresponding entries in two different tables that don't have the same number of entries.*)
synchronizePMFs[pmf_,conditioned_,conditions_]:=Module[{lstcs,lstms,lstcond,lstMatch,lstNewProbs,indices},
indices=Join[conditioned,conditions];
lstcs=columnSelect[pmf,indices][[All,1]];
lstcond=conditionalizeFull[pmf,conditioned,conditions];
lstMatch=#[[1]]->#[[2]]&/@lstcond;
lstNewProbs=lstcs/.lstMatch;
Table[{lstcs[[k]],lstNewProbs[[k]]},{k,1,Length[lstcs]}]
];

entropy[pmf_]:=Module[{probs},probs=Table[If[NumericQ[pmf[[k]]],If[pmf[[k]]!=0,-pmf[[k]]Log[pmf[[k]]],0],-pmf[[k]]Log[pmf[[k]]]],{k,1,Length[pmf]}];Total[probs]];

Independence check utilities

Check the independence of two marginal or conditional pmf’s against their combination. pmf1 and pmf2 are the two components of the combination pmf3. The two smaller ones are independent if it can be shown that for every combination of probability inputs from them, their product is the probability of the associated outcome obtained by joining together the outcomes16 from the two smaller (space,pmf16)’s. The ‘perm’ argument is a permutation (indicated for example by Cycles[{{2,3]]]) which re-orders the outcomes16 of the pmf16 products to align with the ordering of the combined pmf16. For example, if we want to check (A,(Subscript[M, A])) and (B,(Subscript[M, B])) as being independent, then the combined pmf16 is in the order (A,(Subscript[M, A]),B,(Subscript[M, B])), but we need it to be in the order  (A,B, (Subscript[M, A]),(Subscript[M, B])) --  so we need to re-order  (for example) a Join[{-1,1},{-1,-1}]= {-1,1,-1,-1} by transposing the middle two elements (Cycles[{{2,3}}]) to present {-1,-1,1,-1} to the probability calculator comparison instead, i.e., in the order (A,B, (Subscript[M, A]),(Subscript[M, B])).

independenceCheck[pmf1_,pmf2_,pmf3_,perm_]:=Module[{outcome,outcomes1,outcomes2,outcomes3,prob,probs1,probs2,probs3,pos},
outcomes1=pmf1[[All,1]];
outcomes2=pmf2[[All,1]];
outcomes3=pmf3[[All,1]];
probs1=pmf1[[All,2]];
probs2=pmf2[[All,2]];
probs3=pmf3[[All,2]];

Table[
outcome=Permute[Join[outcomes1[[i]],outcomes2[[j]]],perm];
pos=Position[outcomes3,outcome][[1,1]];
prob=pmf3[[pos,2]];
probability[pmf1,{outcomes1[[i]]}]*probability[pmf2,{outcomes2[[j]]}]==prob,{i,1,Length[outcomes1]},{j,1,Length[outcomes2]}]
];

Basics for model construction

tuples2=Tuples[{-1,1},2];
tuples2Measure=Tuples[{1,2},2];
tuples4Operational=Flatten[Table[Table[Join[tuples2[[i]],tuples2Measure[[j]]],{i,1,Length[tuples2]}],{j,1,Length[tuples2Measure]}],1];
tmp4=Tuples[{-1,1},4];
outcomes16=tuples4=Flatten[Table[tmp4[[4k+j]],{j,1,4},{k,0,3}],1];
tuples4Repeat=Flatten[Table[ConstantArray[tuples4[[k]],4],{k,1,Length[tuples4]}],1];
pmf16=Array[(Subscript[π, #])&,16];
probabilitySpace16=Table[{outcomes16[[k]],pmf16[[k]]},{k,1,16}];

Basic notation for model descriptions

cMat turns a pmf into a set of correlations,

γ16=Array[(Subscript[γ, #])&,16];
ρ16=Array[(Subscript[ρ, #])&,16];
αβvars={(Subscript[α, 1]),(Subscript[α, 2]),(Subscript[α, 3]),(Subscript[α, 4]),(Subscript[β, 1]),(Subscript[β, 2]),(Subscript[β, 3]),(Subscript[β, 4])};
λ4=Array[(Subscript[λ, #])&,4];
λ12=Array[(Subscript[λ, #])&,12];
λ16=Array[(Subscript[λ, #])&,16];
κ7=Array[(Subscript[κ, #])&,7];
π4=Array[(Subscript[π, #])&,4];
π13=Array[(Subscript[π, #])&,13];
λ256=Array[(Subscript[λ, #])&,256];
λ2560=Table[(Subscript[λ, k])->0,{k,1,Length[λ256]}];

γ16Repeat=Flatten[Table[ConstantArray[(Subscript[γ, k]),4],{k,1,16}]];
ρ16Repeat=Flatten[Table[ConstantArray[(Subscript[ρ, k]),4],{k,1,16}]];
λ16Repeat=Flatten[Table[ConstantArray[(Subscript[λ, k]),4],{k,1,16}]];
η16=Array[(Subscript[η, #])&,16];

γ0={(Subscript[γ, 1])->0,(Subscript[γ, 2])->0,(Subscript[γ, 3])->0,(Subscript[γ, 4])->0,(Subscript[γ, 5])->0,(Subscript[γ, 6])->0,(Subscript[γ, 7])->0,(Subscript[γ, 8])->0,(Subscript[γ, 9])->0,(Subscript[γ, 10])->0,(Subscript[γ, 11])->0,(Subscript[γ, 12])->0,(Subscript[γ, 13])->0,(Subscript[γ, 14])->0,(Subscript[γ, 15])->0,(Subscript[γ, 16])->0};
ρ0={(Subscript[ρ, 1])->0,(Subscript[ρ, 2])->0,(Subscript[ρ, 3])->0,(Subscript[ρ, 4])->0,(Subscript[ρ, 5])->0,(Subscript[ρ, 6])->0,(Subscript[ρ, 7])->0,(Subscript[ρ, 8])->0,(Subscript[ρ, 9])->0,(Subscript[ρ, 10])->0,(Subscript[ρ, 11])->0,(Subscript[ρ, 12])->0,(Subscript[ρ, 13])->0,(Subscript[ρ, 14])->0,(Subscript[ρ, 15])->0,(Subscript[ρ, 16])->0};

ρ16CondsNonNeg=And@@(#≥0&/@ρ16);
ρ16CondsSum1=Total[ρ16]==1;
ρ16SubsSum1={(Subscript[ρ, 1])+(Subscript[ρ, 2])+(Subscript[ρ, 3])+(Subscript[ρ, 4])+(Subscript[ρ, 5])+(Subscript[ρ, 6])+(Subscript[ρ, 7])+(Subscript[ρ, 8])+(Subscript[ρ, 9])+(Subscript[ρ, 10])+(Subscript[ρ, 11])+(Subscript[ρ, 12])+(Subscript[ρ, 13])+(Subscript[ρ, 14])+(Subscript[ρ, 15])+(Subscript[ρ, 16])->1};
ρ16SubsUniform=Table[(Subscript[ρ, k])->1/16,{k,1,16}];

sBell={{-1,1,1,1},{1,-1,1,1},{1,1,-1,1},{1,1,1,-1}};
cMat={{1,-1,-1,1,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,1,-1,-1,1,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,1,-1,-1,1,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1}};

constraintMatQM={
{1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0},
{0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0},
{0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0},
{0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0},
{1,1,0,0,1,1,0,0,0,0,-1,-1,0,0,-1,-1},
{1,0,1,0,1,0,1,0,0,-1,0,-1,0,-1,0,-1},
{1,1,0,0,0,0,-1,-1,1,1,0,0,0,0,-1,-1},
{1,0,1,0,0,-1,0,-1,1,0,1,0,0,-1,0,-1},
{0,0,1,1,0,0,1,1,-1,-1,0,0,-1,-1,0,0},
{0,1,0,1,0,1,0,1,-1,0,-1,0,-1,0,-1,0},
{0,0,1,1,-1,-1,0,0,0,0,1,1,-1,-1,0,0},
{0,1,0,1,-1,0,-1,0,0,1,0,1,-1,0,-1,0},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
};
constraintMatQMFirst=constraintMatQM[[1;;4]];
constraintMatQMLast=constraintMatQM[[5;;-1]];
ptsw4New={{w,w,1,1},{w,-1,-w,1},{w,1,w,1},{w,-w,-1,1},{w,w,-1,-1},{w,1,-w,-1},{w,-1,w,-1},{w,-w,1,-1},{w,-1,1,-w},{w,1,1,w},{w,1,-1,-w},{w,-1,-1,w}};

Detector settings

detectorProbLabels={11,12,21,22};
detectorProbs=Table[(Subscript[δ, detectorProbLabels[[k]]]),{k,1,Length[detectorProbLabels]}];
δ16=Table[ConstantArray[detectorProbs[[k]],4],{k,1,4}]//Flatten;
δ64=Flatten[Table[δ16,{k,1,4}]];

Assumptions (constraints) and substitution lists.

αβAssumptions=(Subscript[α, 1])≥0&&(Subscript[α, 2])≥0&&(Subscript[α, 3])≥0&&(Subscript[α, 4])≥0&&(Subscript[β, 1])≥0&&(Subscript[β, 2])≥0&&(Subscript[β, 3])≥0&&(Subscript[β, 4])≥0&&(Subscript[α, 1])+(Subscript[α, 3])==1&&(Subscript[α, 2])+(Subscript[α, 4])==1&&(Subscript[β, 1])+(Subscript[β, 3])==1&&(Subscript[β, 2])+(Subscript[β, 4])==1;
δAssumptions=And@@Table[detectorProbs[[k]]>0,{k,1,Length[detectorProbs]}]&&Total[detectorProbs]==1;
ρAssumptions=(Subscript[ρ, 1])≥0&&(Subscript[ρ, 2])≥0&&(Subscript[ρ, 3])≥0&&(Subscript[ρ, 4])≥0&&(Subscript[ρ, 5])≥0&&(Subscript[ρ, 6])≥0&&(Subscript[ρ, 7])≥0&&(Subscript[ρ, 8])≥0&&(Subscript[ρ, 9])≥0&&(Subscript[ρ, 10])≥0&&(Subscript[ρ, 11])≥0&&(Subscript[ρ, 12])≥0&&(Subscript[ρ, 13])≥0&&(Subscript[ρ, 14])≥0&&(Subscript[ρ, 15])≥0&&(Subscript[ρ, 16])≥0&&Total[ρ16]==1;
(*γAssumptions=(Subscript[γ, 1])≥0&&(Subscript[γ, 2])≥0&&(Subscript[γ, 3])≥0&&(Subscript[γ, 4])≥0&&(Subscript[γ, 5])≥0&&(Subscript[γ, 6])≥0&&(Subscript[γ, 7])≥0&&(Subscript[γ, 8])≥0&&(Subscript[γ, 9])≥0&&(Subscript[γ, 10])≥0&&(Subscript[γ, 11])≥0&&(Subscript[γ, 12])≥0&&(Subscript[γ, 13])≥0&&(Subscript[γ, 14])≥0&&(Subscript[γ, 15])≥0&&(Subscript[γ, 16])≥0&&Total[γ16]==1;*)
γAssumptions=And@@Table[γ16[[k]]≥0,{k,1,Length[γ16]}]&&(Subscript[γ, 1])+(Subscript[γ, 2])+(Subscript[γ, 3])+(Subscript[γ, 4])==1&&(Subscript[γ, 5])+(Subscript[γ, 6])+(Subscript[γ, 7])+(Subscript[γ, 8])==1&&(Subscript[γ, 9])+(Subscript[γ, 10])+(Subscript[γ, 11])+(Subscript[γ, 12])==1&&(Subscript[γ, 13])+(Subscript[γ, 14])+(Subscript[γ, 15])+(Subscript[γ, 16])==1;
λ256Assumptions=And@@Table[(Subscript[λ, k])≥0,{k,1,Length[λ256]}]&&Total[λ256]==1;
π13Assumptions=And@@Table[(Subscript[π, k])≥0,{k,1,Length[π13]}]&&Total[π13]==1;

γsubs={(Subscript[γ, 1])+(Subscript[γ, 2])+(Subscript[γ, 3])+(Subscript[γ, 4])->1,(Subscript[γ, 5])+(Subscript[γ, 6])+(Subscript[γ, 7])+(Subscript[γ, 8])->1,(Subscript[γ, 9])+(Subscript[γ, 10])+(Subscript[γ, 11])+(Subscript[γ, 12])->1,(Subscript[γ, 13])+(Subscript[γ, 14])+(Subscript[γ, 15])+(Subscript[γ, 16])->1};
subsθSum={(Subscript[θ, 1])->(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4])};
subsθMinimal={(Subscript[θ, 1])->135 Degree,(Subscript[θ, 2])->45 Degree,(Subscript[θ, 3])->45 Degree, (Subscript[θ, 4])->45 Degree};
subsθInfamous={(Subscript[θ, 1])->67.5 Degree,(Subscript[θ, 2])->22.5 Degree,(Subscript[θ, 3])->22.5 Degree, (Subscript[θ, 4])->22.5 Degree};

subsρMinimal={(Subscript[ρ, 1])->1/16,(Subscript[ρ, 2])->1/16,(Subscript[ρ, 3])->1/16,(Subscript[ρ, 4])->1/16,(Subscript[ρ, 5])->1/16,(Subscript[ρ, 6])->1/16,(Subscript[ρ, 7])->1/16,(Subscript[ρ, 8])->1/16,(Subscript[ρ, 9])->1/16,(Subscript[ρ, 10])->1/16,(Subscript[ρ, 11])->1/16,(Subscript[ρ, 12])->1/16,(Subscript[ρ, 13])->1/16,(Subscript[ρ, 14])->1/16,(Subscript[ρ, 15])->1/16,(Subscript[ρ, 16])->1/16};
subsγMinimal={(Subscript[γ, 1])->1/4,(Subscript[γ, 2])->1/4,(Subscript[γ, 3])->1/4,(Subscript[γ, 4])->1/4,(Subscript[γ, 5])->1/4,(Subscript[γ, 6])->1/4,(Subscript[γ, 7])->1/4,(Subscript[γ, 8])->1/4,(Subscript[γ, 9])->1/4,(Subscript[γ, 10])->1/4,(Subscript[γ, 11])->1/4,(Subscript[γ, 12])->1/4,(Subscript[γ, 13])->1/4,(Subscript[γ, 14])->1/4,(Subscript[γ, 15])->1/4,(Subscript[γ, 16])->1/4};
subsγ4={(Subscript[γ, 1])->1/4,(Subscript[γ, 2])->1/4,(Subscript[γ, 3])->1/4,(Subscript[γ, 4])->1/4,(Subscript[γ, 5])->0,(Subscript[γ, 6])->0,(Subscript[γ, 7])->0,(Subscript[γ, 8])->0,(Subscript[γ, 9])->0,(Subscript[γ, 10])->0,(Subscript[γ, 11])->0,(Subscript[γ, 12])->0,(Subscript[γ, 13])->0,(Subscript[γ, 14])->0,(Subscript[γ, 15])->0,(Subscript[γ, 16])->0};
subsρ4={(Subscript[ρ, 1])->1/4,(Subscript[ρ, 2])->1/4,(Subscript[ρ, 3])->1/4,(Subscript[ρ, 4])->1/4,(Subscript[ρ, 5])->0,(Subscript[ρ, 6])->0,(Subscript[ρ, 7])->0,(Subscript[ρ, 8])->0,(Subscript[ρ, 9])->0,(Subscript[ρ, 10])->0,(Subscript[ρ, 11])->0,(Subscript[ρ, 12])->0,(Subscript[ρ, 13])->0,(Subscript[ρ, 14])->0,(Subscript[ρ, 15])->0,(Subscript[ρ, 16])->0};

subsαβUniform={(Subscript[α, 1])->1/2,(Subscript[α, 3])->1/2,(Subscript[α, 2])->1/2,(Subscript[α, 4])->1/2,(Subscript[β, 1])->1/2,(Subscript[β, 3])->1/2,(Subscript[β, 2])->1/2,(Subscript[β, 4])->1/2};
subsBL1={(Subscript[α, 1])->.1,(Subscript[α, 2])->.6,(Subscript[α, 3])->.9,(Subscript[α, 4])->.4,(Subscript[β, 1])->.3,(Subscript[β, 2])->.5,(Subscript[β, 3])->.7,(Subscript[β, 4])->.5};
subsBL2={(Subscript[α, 1])->1,(Subscript[α, 2])->1,(Subscript[α, 3])->0,(Subscript[α, 4])->0,(Subscript[β, 1])->1,(Subscript[β, 2])->0,(Subscript[β, 3])->0,(Subscript[β, 4])->1};
subs16=Subsets[Range[16]];

More substitution lists. These help “clean up” certain pmf displays to get rid of unnecessary minus signs and  expressions in the form 1-x-y-... and -1+x+y+... and 1-(Subscript[α, 1]) and 1-(Subscript[β, 2]). etc.

ρSubs={1-(Subscript[ρ, 9])-(Subscript[ρ, 10])-(Subscript[ρ, 11])-(Subscript[ρ, 12])-(Subscript[ρ, 13])-(Subscript[ρ, 14])-(Subscript[ρ, 15])-(Subscript[ρ, 16])->Total[ρ16[[{1,2,3,4,5,6,7,8}]]],1-(Subscript[ρ, 5])-(Subscript[ρ, 6])-(Subscript[ρ, 7])-(Subscript[ρ, 8])-(Subscript[ρ, 13])-(Subscript[ρ, 14])-(Subscript[ρ, 15])-(Subscript[ρ, 16])->Total[ρ16[[{1,2,3,4,9,10,11,12}]]],1-(Subscript[ρ, 3])-(Subscript[ρ, 4])-(Subscript[ρ, 7])-(Subscript[ρ, 8])-(Subscript[ρ, 11])-(Subscript[ρ, 12])-(Subscript[ρ, 15])-(Subscript[ρ, 16])->Total[ρ16[[{1,2,5,6,9,10,13,14}]]],1-(Subscript[ρ, 2])-(Subscript[ρ, 4])-(Subscript[ρ, 6])-(Subscript[ρ, 8])-(Subscript[ρ, 10])-(Subscript[ρ, 12])-(Subscript[ρ, 14])-(Subscript[ρ, 16])->Total[ρ16[[{1,3,5,7,9,11,13,15}]]]};

γSubs1={1-(Subscript[γ, 3])-(Subscript[γ, 4])->(Subscript[γ, 1])+(Subscript[γ, 2]),1-(Subscript[γ, 7])-(Subscript[γ, 8])->(Subscript[γ, 5])+(Subscript[γ, 6]),1-(Subscript[γ, 11])-(Subscript[γ, 12])->(Subscript[γ, 9])+(Subscript[γ, 10]),1-(Subscript[γ, 15])-(Subscript[γ, 16])->(Subscript[γ, 13])+(Subscript[γ, 14])};
γSubs2={1-(Subscript[γ, 2])-(Subscript[γ, 4])->(Subscript[γ, 1])+(Subscript[γ, 3]),1-(Subscript[γ, 6])-(Subscript[γ, 8])->(Subscript[γ, 5])+(Subscript[γ, 7]),1-(Subscript[γ, 10])-(Subscript[γ, 12])->(Subscript[γ, 9])+(Subscript[γ, 11]),1-(Subscript[γ, 14])-(Subscript[γ, 16])->(Subscript[γ, 13])+(Subscript[γ, 15])};
γSubs3={-1+(Subscript[γ, 11])+(Subscript[γ, 12])->-(Subscript[γ, 9])-(Subscript[γ, 10]),-1+(Subscript[γ, 15])+(Subscript[γ, 16])->-(Subscript[γ, 13])-(Subscript[γ, 14]),-1+(Subscript[γ, 6])+(Subscript[γ, 8])->-(Subscript[γ, 5])-(Subscript[γ, 7]),-1+(Subscript[γ, 14])+(Subscript[γ, 16])->-(Subscript[γ, 15])-(Subscript[γ, 13])};

δSubs1={(Subscript[δ, 11])+(Subscript[δ, 12])-1->-(Subscript[δ, 21])-(Subscript[δ, 22]),(Subscript[δ, 22])+(Subscript[δ, 12])-1->-(Subscript[δ, 11])-(Subscript[δ, 21]),(Subscript[δ, 22])+(Subscript[δ, 12])-1->-(Subscript[δ, 11])-(Subscript[δ, 21])};
δSubs2={-1+(Subscript[δ, 22])+(Subscript[δ, 12])->-(Subscript[δ, 21])-(Subscript[δ, 11]),-1+(Subscript[δ, 22])+(Subscript[δ, 21])->-(Subscript[δ, 11])-(Subscript[δ, 12]),-1+(Subscript[δ, 21])+(Subscript[δ, 22])->-(Subscript[δ, 11])-(Subscript[δ, 12])};
αβSubs1={1-(Subscript[α, 3])->(Subscript[α, 1]),1-(Subscript[α, 4])->(Subscript[α, 2]),1-(Subscript[β, 3])->(Subscript[β, 1]),1-(Subscript[β, 4])->(Subscript[β, 2]),-1+(Subscript[α, 3])->-(Subscript[α, 1]),-1+(Subscript[α, 4])->-(Subscript[α, 2]),-1+(Subscript[β, 3])->-(Subscript[β, 1]),-1+(Subscript[β, 4])->-(Subscript[β, 2])};
αβSubs2={-1+2(Subscript[α, 3])->(Subscript[α, 3])-(Subscript[α, 1]),-1+2(Subscript[β, 3])->(Subscript[β, 3])-(Subscript[β, 1]),-1+2(Subscript[α, 4])->(Subscript[α, 4])-(Subscript[α, 2]),-1+2(Subscript[β, 4])->(Subscript[β, 4])-(Subscript[β, 2])};
αβδSubs={-1+(Subscript[α, 3])->-(Subscript[α, 1]),-1+(Subscript[β, 3])->-(Subscript[β, 1]),-1+(Subscript[α, 4])->-(Subscript[α, 2]),-1+(Subscript[β, 4])->-(Subscript[β, 2]),-1+(Subscript[δ, 22])+(Subscript[δ, 11])+(Subscript[δ, 12])->-(Subscript[δ, 21])};

Model definitions

Generic or maximal

pmfMaximal=Table[{tuples4Operational[[k]],(Subscript[γ, k])δ16[[k]]},{k,1,Length[tuples4Operational]}];
condMaximal=γ16;

correlationsMaximal=cMat.condMaximal;
sMaximal=sMatrix.correlationsMaximal;

QM

θvars={(Subscript[θ, 1]),(Subscript[θ, 2]),(Subscript[θ, 3]),(Subscript[θ, 4])};
θAssumptions=(Subscript[θ, 1])==(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4]);
θsubs={(Subscript[θ, 1])->(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4])};
condQM={(1/2) ((Cos[(Subscript[θ, 1])])^2) ,(1/2) ((Sin[(Subscript[θ, 1])])^2) ,(1/2) ((Sin[(Subscript[θ, 1])])^2) ,(1/2) ((Cos[(Subscript[θ, 1])])^2) ,(1/2) ((Cos[(Subscript[θ, 2])])^2) ,(1/2) ((Sin[(Subscript[θ, 2])])^2) ,(1/2) ((Sin[(Subscript[θ, 2])])^2) ,(1/2) ((Cos[(Subscript[θ, 2])])^2) ,(1/2) ((Cos[(Subscript[θ, 3])])^2) ,(1/2) ((Sin[(Subscript[θ, 3])])^2) ,(1/2) ((Sin[(Subscript[θ, 3])])^2) ,(1/2) ((Cos[(Subscript[θ, 3])])^2) ,(1/2) ((Cos[(Subscript[θ, 4])])^2) ,(1/2) ((Sin[(Subscript[θ, 4])])^2) ,(1/2) ((Sin[(Subscript[θ, 4])])^2) ,(1/2) ((Cos[(Subscript[θ, 4])])^2)};
qmProbs=condQM*δ16;
constraintsQM=constraintMatQM.condQM//Simplify;
(*qmProbsRepeated=Flatten[Table[Table[qmProbs[[k]],{j,1,4}],{k,1,Length[qmProbs]}]];*)

pmfQM=Table[{tuples4Operational[[k]],qmProbs[[k]]},{k,1,Length[tuples4Operational]}];

correlationsQM=cMat.condQM//Simplify;
sQM=sBell.correlationsQM//Simplify;

Non-contextual

pmfHVBR=Table[{tuples4[[k]],(Subscript[ρ, k])},{k,1,Length[tuples4]}];
pmfHVBRBasis=Table[pmfHVBR/.{(Subscript[ρ, k])->1}/.ρ0,{k,1,Length[ρ16]}];

marginPMFHV=Flatten[marginalize[pmfHVBR,#]&/@{{1,3},{1,4},{2,3},{2,4}},1];
bellRealProbs=Table[marginPMFHV[[k,2]]*δ16[[k]],{k,1,Length[δ16]}];
(*bellRealProbs={(Subscript[ρ, 1])+(Subscript[ρ, 2])+(Subscript[ρ, 5])+(Subscript[ρ, 6]),(Subscript[ρ, 9])+(Subscript[ρ, 10])+(Subscript[ρ, 13])+(Subscript[ρ, 14]),(Subscript[ρ, 3])+(Subscript[ρ, 4])+(Subscript[ρ, 7])+(Subscript[ρ, 8]),(Subscript[ρ, 11])+(Subscript[ρ, 12])+(Subscript[ρ, 15])+(Subscript[ρ, 16]),(Subscript[ρ, 1])+(Subscript[ρ, 2])+(Subscript[ρ, 9])+(Subscript[ρ, 10]),(Subscript[ρ, 5])+(Subscript[ρ, 6])+(Subscript[ρ, 13])+(Subscript[ρ, 14]),(Subscript[ρ, 3])+(Subscript[ρ, 4])+(Subscript[ρ, 11])+(Subscript[ρ, 12]),(Subscript[ρ, 7])+(Subscript[ρ, 8])+(Subscript[ρ, 15])+(Subscript[ρ, 16]),(Subscript[ρ, 1])+(Subscript[ρ, 3])+(Subscript[ρ, 5])+(Subscript[ρ, 7]),(Subscript[ρ, 9])+(Subscript[ρ, 11])+(Subscript[ρ, 13])+(Subscript[ρ, 15]),(Subscript[ρ, 2])+(Subscript[ρ, 4])+(Subscript[ρ, 6])+(Subscript[ρ, 8]),(Subscript[ρ, 10])+(Subscript[ρ, 12])+(Subscript[ρ, 14])+(Subscript[ρ, 16]),(Subscript[ρ, 1])+(Subscript[ρ, 3])+(Subscript[ρ, 9])+(Subscript[ρ, 11]),(Subscript[ρ, 5])+(Subscript[ρ, 7])+(Subscript[ρ, 13])+(Subscript[ρ, 15]),(Subscript[ρ, 2])+(Subscript[ρ, 4])+(Subscript[ρ, 10])+(Subscript[ρ, 12]),(Subscript[ρ, 6])+(Subscript[ρ, 8])+(Subscript[ρ, 14])+(Subscript[ρ, 16])}*δ16;*)
pmfBellReal=Table[{tuples4Operational[[k]],bellRealProbs[[k]]},{k,1,Length[tuples4Operational]}];
pmfBellRealHV=Table[{tuples4[[k]],ρ16[[k]]},{k,1,Length[tuples4]}];
brHVTable=Assuming[γAssumptions,Simplify[displayPMF[pmfBellRealHV,{"s","s'","t","t'","P((Subscript[A, 1])=s,(Subscript[A, 2])=s',(Subscript[B, 1])=t,(Subscript[B, 2])=t')"}]]]//TraditionalForm;
brHVMarginalsTable=Row[Simplify[{displayPMF[marginalize[pmfBellRealHV,{1,3}],{"s","t","P((Subscript[A, 1])=s,(Subscript[B, 1])=t)"}],Invisible[xxxxx],displayPMF[marginalize[pmfBellRealHV,{1,4}],{"s","t'","P((Subscript[A, 1])=s,(Subscript[B, 2])=t')"}],
displayPMF[marginalize[pmfBellRealHV,{2,3}],{"s'","t","P((Subscript[A, 2])=s',(Subscript[B, 1])=t)"}],
Invisible[xxxxx],displayPMF[marginalize[pmfBellRealHV,{2,4}],{"s'","t'","P((Subscript[A, 2])=s',(Subscript[B, 2])=t')"}]}]]//TraditionalForm;

condBR=pmfBellReal[[All,2]]/δ16;
rciODColumns=Transpose[Table[condBR/.{(Subscript[ρ, k])->1}/.ρ0,{k,1,Length[ρ16]}]];
correlationsBellReal=cMat.condBR;
sFunsBellReal=sBell.correlationsBellReal//Simplify;

Factorizable or Bell local

pmfHVBLProbs=Table[{Switch[tuples4[[k,1]],-1,(Subscript[α, 1]),1,(Subscript[α, 3])],Switch[tuples4[[k,2]],-1,(Subscript[α, 2]),1,(Subscript[α, 4])],Switch[tuples4[[k,3]],-1,(Subscript[β, 1]),1,(Subscript[β, 3])],Switch[tuples4[[k,4]],-1,(Subscript[β, 2]),1,(Subscript[β, 4])]},{k,1,Length[tuples4]}];
pmfHVBL=Table[{tuples4[[k]],Times@@pmfHVBLProbs[[k]]},{k,1,Length[tuples4]}];

(*marginPMFHVBL=Flatten[marginalize[pmfHVBL,#]&/@{{1,3},{1,4},{2,3},{2,4}},1];
bellLocalProbs=Table[marginPMFHVBL[[k,2]]*δ16[[k]],{k,1,Length[δ16]}];*)
αβρSubs=Table[(Subscript[ρ, k])->pmfHVBL[[All,2]][[k]],{k,1,Length[ρ16]}];
bellLocalProbs=Assuming[αβAssumptions,Simplify[condBR/.αβρSubs]]/.αβSubs1;
pmfBellLocal=Assuming[αβAssumptions,FullSimplify[Table[{tuples4Operational[[k]],bellLocalProbs[[k]]*δ16[[k]]},{k,1,Length[tuples4Operational]}]]];

condBL=Assuming[αβAssumptions,Simplify[pmfBellLocal[[All,2]]/δ16]];
correlationsBellLocal=cMat.condBL//Simplify;
sBellLocal=sBell.correlationsBellLocal//Simplify;

Minimal model

condMinimal=ConstantArray[1/4,16];
pmfMinimal=Table[{tuples4Operational[[k]],condMinimal[[k]]*δ16[[k]]},{k,1,Length[tuples4Operational]}];

Minimal model correlations and s-functions

correlationsMinimal=cMat.condMinimal//Simplify;
sMinimal=sMatrix.correlationsMinimal//Simplify;

Display utilities and display tables

Display utility for pmf’s that recognizes the ordering of the r.v.’s (e.g. in a call to ‘marginalize’ or ‘conditionalize’) The resulting outcomes16 have been re-ordered to respect the marginalization or conditionalization specifications.

“conditionalDisplay” produces three separate conditional displays (A|(Subscript[M, A])), (B|(Subscript[M, B])), and ((A,(Subscript[M, A]))|(B,(Subscript[M, B]))) plus an “independenceCheck” to give some intuition to any claim of Bell locality. Note the ordering of outcomes16 may be different in the different displays.

“conditionalDisplay2” produces a single display of three separate conditional  distributions all related to the same underlying pmf16. It may be something like  ((A,(Subscript[M, A]))|(B,(Subscript[M, B]))) and (A|(Subscript[M, A])), (B|(Subscript[M, B])), but can be more complicated, although the last two are intended to be “sub-conditionals” wrt to the first one. The important difference between this one and the original is that the ordering is respected throughout, in fact, it has to be, since they are all displayed together with a single common outcome space of ±1-tuples on the left of the display.

displayPMF[pmf16_,header_]:=Module[{},
Grid[Prepend[Table[Join[ If[ListQ[pmf16[[k,1]]],pmf16[[k,1]],{pmf16[[k,1]]}],{pmf16[[k,2]]}],{k,1,Length[pmf16]}],header],Frame->All]
];
conditionalDisplay[pmf16_,perm_,sortBy_,condLeft1_,condRight1_,condLeft2_,condRight2_,subs_,header1_,header2_,header3_]:=Module[{pmf1,pmf2,pmf3,condLeft,condRight},
pmf1=pmf16/.subs;
pmf2=conditionalizeFull[pmf1,Sort[Join[condLeft1,condLeft2]],Sort[Join[condRight1,condRight2]]];
pmf3=SortBy[Table[{Permute[pmf2[[k,1]],perm],pmf2[[k,2]]},{k,1,Length[pmf2]}],#[[1,sortBy]]&];
{displayPMF[conditionalizeFull[pmf1,Sort[condLeft1],Sort[condRight1]],header1],displayPMF[conditionalizeFull[pmf1,Sort[condLeft2],Sort[condRight2]],header2],displayPMF[pmf3,header3],
independenceCheck[conditionalizeFull[pmf1,condLeft1,condRight1],conditionalizeFull[pmf1,condLeft2,condRight2],conditionalizeFull[pmf1,Sort[Join[condLeft1,condLeft2]],Sort[Join[condRight1,condRight2]]],perm]//MatrixForm}];

Display function to utilize the new “full” conditionalize”

displayPMFFull[pmfList_,header_]:=Module[{},
Grid[Prepend[Table[Join[ pmfList[[1,k,1]],{pmfList[[1,k,2]]},Table[pmfList[[j,k,2]],{j,2,Length[pmfList]}]],{k,1,Length[ pmfList[[1]]]}],header],Frame->All]
];

rowColorsAll=Join[Table[j->LightRed,{j,2,5}],Table[j->LightBlue,{j,6,9}],Table[j->LightGreen,{j,10,13}],Table[j->LightOrange,{j,14,17}]];modelsOperAllTable=Grid[(*Prepend[*)Prepend[Append[Table[Join[tuples4Operational[[k]],{condMaximal[[k]]},{condQM[[k]]},{condBR[[k]]},{condBL[[k]]},{condMinimal[[k]] },Table[condBR[[k]]/.{(Subscript[ρ, j])->1}/.ρ0,{j,1,Length[ρ16]}]],{k,1,16}],{"Constraints",SpanFromLeft,SpanFromLeft,SpanFromLeft,"(Subscript[γ, k])≥0 & \n(∑_1^4)(Subscript[γ, k])=\n(∑_5^8)(Subscript[γ, k])=\n(∑_9^12)(Subscript[γ, k])=\n(∑_13^16)(Subscript[γ, k])=1","(Subscript[θ, 1])=(Subscript[θ, 2])+(Subscript[θ, 3])+(Subscript[θ, 4])","(Subscript[ρ, k])≥0 \n& \n(∑_(k = 1)^16) (Subscript[ρ, k])=1","(Subscript[α, k])≥0, \n(Subscript[β, k])≥0, \n(Subscript[α, 1])+(Subscript[α, 3])=\n(Subscript[α, 2])+(Subscript[α, 4])=\n(Subscript[β, 1])+(Subscript[β, 3])=\n(Subscript[β, 2])+(Subscript[β, 4])=1","NA","0's and 1's only; \nExactly one 1 for each \nof the 4 measurement \nsetting pairs (u,v)= \n(1,1),(1,2),(2,1),(2,2); \nAlso satisfies RCI",SpanFromLeft}],{"s","t","u","v","Generic","QM","Noncontextual","Factorizable","Trivial","RCI+Outcome Deterministic \n16 different model instances",SpanFromLeft}],(*{Text@Style["Conditional probabilities of results (s,t) given measurement choices (u,v) \nfor six different model types -- all columns sum to 4 (except col's s,t,u,v)",Blue,36],SpanFromLeft}],*)Background->{None,rowColorsAll},Frame->All]/.αβδSubs//TraditionalForm;

pmfQMTable=Grid[Prepend[Table[Join[pmfQM[[k,1]],{pmfQM[[k,2]]}],{k,1,Length[pmfQM]}],Text@Style[#,Bold,Blue]&/@{"A","B","(Subscript[M, A])","(Subscript[M, B])","P(A,B,(Subscript[M, A]),(Subscript[M, B]))"}],Frame->All];
pmfQMBellTable=Grid[Prepend[SortBy[Table[Join[pmfQM[[k,1]],{pmfQM[[k,2]]},{pmfBellReal[[k,2]]}],{k,1,Length[pmfQM]}],#[[{3,4}]]&],Text@Style[#,Bold,Blue]&/@{"A","B","(Subscript[M, A])","(Subscript[M, B])","QM P(A,B,(Subscript[M, A]),(Subscript[M, B]))","Bell real P(A,B,(Subscript[M, A]),(Subscript[M, B]))"}],Frame->All];
pmfBellLocalTable=displayPMF[pmfBellLocal,{"A","B","(Subscript[M, A])","(Subscript[M, B])","P(A,B,(Subscript[M, A]),(Subscript[M, B]))"}];
pmfBellRealTable=displayPMF[pmfBellReal,{"A","B","(Subscript[M, A])","(Subscript[M, B])","P(A,B,(Subscript[M, A]),(Subscript[M, B]))"}];
pmfHVBLDisplayTable=displayPMF[pmfHVBL,{"(Subscript[A, 1])","(Subscript[A, 2])","(Subscript[B, 1])","(Subscript[B, 2])","P((Subscript[A, 1]),(Subscript[A, 2]),(Subscript[B, 1]),(Subscript[B, 2]))"}];
pmfHVBRDisplayTable=displayPMF[pmfHVBR,{"(Subscript[A, 1])","(Subscript[A, 2])","(Subscript[B, 1])","(Subscript[B, 2])","P((Subscript[A, 1]),(Subscript[A, 2]),(Subscript[B, 1]),(Subscript[B, 2]))"}];
pmfMinimalTable=Grid[Prepend[Table[Join[pmfMinimal[[k,1]],{pmfMinimal[[k,2]]}],{k,1,Length[pmfMinimal]}],{"A","B","(Subscript[M, A])","(Subscript[M, B])","Minimal pmf"}],Frame->All];

Model relationship plots

vennGeneric=Show[Graphics[{EdgeForm[Thin],Cyan,Opacity[0.5],Ellipsoid[{0,1},{1,1.5}],Green,Opacity[0.3],Disk[{0,-1},1.8],Blue,Opacity[0.2],Disk[{0,-1},0.8],Purple,Opacity[0.3],Disk[{0.5,-0.75},0.2],Red,Opacity[0.05],EdgeForm[Thick],Rectangle[{-3,-3},{3,3}],Opacity[2],PointSize[Large],Point[{0,-0.4}],Arrow[{{-1.8,-0.4},{0,-0.4}}],Arrow[{{1.8,-0.7},{0.65,-0.7}}]},ImageSize->350],Epilog->{Inset[Text@Style["QM",16],{0,1.3}],Inset[Text@Style["Noncontextual",16],{0,-2.2}],Inset[Text@Style["Factorizable \n(Bell Local)",16],{0,-1.2}],Inset[Text@Style["RCI + OD",16],{2.4,-0.7}],Inset[Text@Style["Generic",16],{-1.8,2.5}],Inset[Text@Style["Trivial",16],{-2.2,-0.4}](*,Inset["OD",{0.5,-0.75}]*)},ImageSize->Large];
vennDeterminism=Show[Graphics[{Purple,Opacity[0.3],Disk[{0,0},2.7],Green,Opacity[0.3],Disk[{0.5,0.5},2.0],Blue,Opacity[0.2],Disk[{1.2,1.2},1],Red,Opacity[0.1],EdgeForm[Thick],Rectangle[{-3,-3},{3,3}],Opacity[2]}],Epilog->{Inset[Text@Style["OD+RCI \n(16 instances)",16],{1.4,1.2}],Inset[Text@Style["OD satisifes CHSH \nbut not RCI \n(112 instances)",16],{-0.5,0.3}],Inset[Text@Style["OD violates \nCHSH \n(128 instances)",16],{-1.4,-1.2}],Inset[Text@Style["Perfect Correlation",16],{-2.0,2.8}],Inset[Text@Style["Outcome Determinism \nAll satisfy ROI \n(256 Instances)",16],{0.0,2.2}]},ImageSize->Large];

modelsGraphPlotNew=LayeredGraphPlot[{"1. Trivial"->"2.  Quantum \nMechanics",
"1. Trivial"->"3.  Local causality",
"3.  Local causality"->"5.  Factorizable \n(Bell local)",

"5.  Factorizable \n(Bell local)"->"8. Noncontextual",
"5.  Factorizable \n(Bell local)"->"13.  Remote Outcome \nIndependence",
"8. Noncontextual"->"12.  Remote Context \nIndependence",
(*"3.  Local causality"->"13.  Remote Outcome \nIndependence",*)
"4.  Outcome determinism  \n+RCI"->"6.  Outcome determinism  \n+CHSH",
"4.  Outcome determinism  \n+RCI"->"5.  Factorizable \n(Bell local)",
"6.  Outcome determinism  \n+CHSH"->"9.  Outcome determinism",
"9.  Outcome determinism"->"14.  Perfectly \nCorrelated",
"9.  Outcome determinism"->"13.  Remote Outcome \nIndependence",
"7.  Outcome+ \nMeasurement  Predictable"->"9.  Outcome determinism",

"7.  Outcome+ \nMeasurement  Predictable"->"11.  Outcome \nPredictable",
"7.  Outcome+ \nMeasurement  Predictable"->"10.  Measurement \nPredictable \n(FTL Signaling)",

"2.  Quantum \nMechanics"->"12.  Remote Context \nIndependence",
"12.  Remote Context \nIndependence"->"15.  Generic",
"13.  Remote Outcome \nIndependence"->"15.  Generic",
"14.  Perfectly \nCorrelated"->"15.  Generic",
"10.  Measurement \nPredictable \n(FTL Signaling)"->"15.  Generic",
"11.  Outcome \nPredictable"->"15.  Generic"},Bottom,VertexShapeFunction->(Text[Framed[Style[#2,16, Black],Background->LightYellow],#1]&) ,VertexStyle->{"5.  Factorizable \n(Bell local)"->Red,"8. Noncontextual"->Red,"1. Trivial"->Red,"9.  Outcome determinism"->Green,"4.  Outcome determinism  \n+RCI"->Red,"3.  Local causality"->Red,"6.  Outcome determinism  \n+CHSH"->Red,"14.  Perfectly \nCorrelated"->Green,"12.  Remote Context \nIndependence"->Green,"15.  Generic"->Green,"11.  Outcome \nPredictable"->Green,"10.  Measurement \nPredictable \n(FTL Signaling)"->Green,"7.  Outcome+ \nMeasurement  Predictable"->Green,"13.  Remote Outcome \nIndependence"->Green},AspectRatio->3/4,PerformanceGoal->"Quality",ImageSize->1000];

Outcome determinism as the generator of both non-contextual model instances (those that satisfy RCI) and ALL generic model instances (including QMvia the set of all 256 model instances

rciODCVH=Graphics[{Green,Opacity[0.3],rp16,Opacity[0.8],Gray,Opacity[0.3],Disk[{0,0},1/3],Blue,Thin,Opacity[1.0],Arrow[{{-0.20,0.78},{0.2,0.98}}],Red,Opacity[1.0],PointSize[Medium],Point[cp16](*,Blue,Point[{1/3,1/2}],Purple,Point[{0,1/10}]*)},Epilog->{Inset[Text@Style["Factorizable",16,Black,Bold],{0,0}],Inset[Text@Style["Noncontextual",16,Black,Bold],{1/3,9/16}],Inset[Text@Style["RCI + OD",16,Black,Bold],{-7/16,26/32}]},ImageSize->350];

odGenericCVH=Graphics[{EdgeForm[Thin],Cyan,Opacity[0.5],Ellipsoid[{0,0.1},{.2,.3}],Green,Opacity[0.3],rp256,Opacity[0.8],Gray,Opacity[0.3],Disk[{0,-0.3},1/3],Red,Opacity[1.0],PointSize[Small],Point[cp256],Blue,Thin,Arrow[{{-0.22,0.78},{-0.15,1.0}}]},Epilog->{Inset[Text@Style["Noncontextual",16,Black,Bold],{0,-0.3}],Inset[Text@Style["QM",16,Black,Bold],{0,0.2}],Inset[Text@Style["Generic",16,Black,Bold],{1/3,11/16}],Inset[Text@Style["Outcome \nDeterministic",16,Black,Bold],{-7/16,26/32}]},ImageSize->350];

Tables for hidden and operational variable models

Tables of equivalent hidden variable and operational variable representations of a stochastic hidden variable model. Each entry in the table shows the corresponding probability. 
Each row in the operational (empirical) table represents a (measurement) context. That is the detector settings are constant across each row. That is, the operational (empirical) model is contextual (in the measurement sense).
For example P((Subscript[A, 2])=-1,(Subscript[B, 1])=-1)=P(A=-1,B=-1|(Subscript[M, A])=2,(Subscript[M, B])=-1)=(Subscript[γ, 3]).

operationalModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condMaximal[[1;;4]],condMaximal[[5;;8]],condMaximal[[9;;12]],condMaximal[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Generic",Blue],SpanFromLeft}],Frame->All];qmModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condQM[[1;;4]],condQM[[5;;8]],condQM[[9;;12]],condQM[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Quantum Mechanics",Blue],SpanFromLeft}],Frame->All]//TraditionalForm;
qmTableKey=Grid[{{Text@Style["Meaning of symbols",Red],SpanFromLeft},Text@Style[#,Blue]&/@{"Item","Definition","Values"},{"(s,t)","Joint outcome","(±1,±1)"},{"(u,v)", "Joint measurement \nchoice","(1,1), (1,2),\n(2,1),(2,2)"},{"The 16 table entries \n(1/2)(cos^2)(Subscript[θ, k]) and (1/2)(sin^2)(Subscript[θ, k])","Conditional probabilities \nP(s,t|u,v) of outcomes (s,t) \ngiven measurement \nchoices (u,v)","∈[0,1]"},{(Subscript[θ, k]),"Difference between Alice \nand Bob's measurement angles","∈[0,180°)"}},Frame->All];
qmTableLabel="Quantum Mechanics Model Instance";
qmMaxDevTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condQM[[1;;4]],condQM[[5;;8]],condQM[[9;;12]],condQM[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Quantum Mechanics Model Instance",Blue],SpanFromLeft}],Frame->All]/.subsθInfamous;
ncModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condBR[[1;;4]],condBR[[5;;8]],condBR[[9;;12]],condBR[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Non-contextual",Blue],SpanFromLeft}],Frame->All];
odModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condBR[[1;;4]]/.{(Subscript[ρ, 1])->1}/.ρ0,condBR[[5;;8]]/.{(Subscript[ρ, 1])->1}/.ρ0,condBR[[9;;12]]/.{(Subscript[ρ, 1])->1}/.ρ0,condBR[[13;;16]]/.{(Subscript[ρ, 1])->1}/.ρ0}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Outcome Deterministic",Blue],SpanFromLeft}],Frame->All]//TraditionalForm;
trivialModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condMinimal[[1;;4]],condMinimal[[5;;8]],condMinimal[[9;;12]],condMinimal[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Trivial",Blue],SpanFromLeft}],Frame->All];
factorizableModelCondTable=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condBL[[1;;4]],condBL[[5;;8]],condBL[[9;;12]],condBL[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Factorizable",Blue],SpanFromLeft}],Frame->All];
rowColorsRCIOD=Join[Table[j->LightRed,{j,3,6}],Table[j->LightBlue,{j,7,10}],Table[j->LightGreen,{j,11,14}],Table[j->LightOrange,{j,15,18}]];
rciODTable=Grid[Prepend[Prepend[Table[Join[tuples4Operational[[k]],Table[condBR[[k]]/.{(Subscript[ρ, j])->1}/.ρ0,{j,1,Length[ρ16]}]],{k,1,16}],Join[{"s","t","u","v"},Range[16]]],{"","","","","RCI+OD Model Instances (16)",SpanFromLeft}],ItemSize->1.5,Background->{None,rowColorsRCIOD},Frame->True,Dividers->{{1,2,3,4,5},{1,2,3}}]/.αβδSubs//TraditionalForm;

{{operationalModelCondTable,qmModelCondTable},{ncModelCondTable},{factorizableModelCondTable,odModelCondTable,trivialModelCondTable}}//TraditionalForm;
condProbSymbolic=Table["P("<>ToString[s]<>","<>ToString[t]<>"|"<>ToString[u]<>","<>ToString[v]<>")",{u,{1,2}},{v,{1,2}},{s,{-1,1}},{t,{-1,1}}]//Flatten;
condProbSymbolicTab=Grid[Prepend[Prepend[Transpose[Prepend[Transpose[{{"(-1,-1)","(-1,1)","(1,-1)","(1,1)"},condProbSymbolic[[1;;4]],condProbSymbolic[[5;;8]],condProbSymbolic[[9;;12]],condProbSymbolic[[13;;16]]}],{"(u,v)","(1,1)","(1,2)","(2,1)","(2,2)"}]],{"Context","Outcome (s,t)",SpanFromLeft}],{Text@Style["Conditional Probabilities P(s,t|u,v)",Blue],SpanFromLeft}],Frame->All];

Hidden variable displays

preArrangedBlackBox=Show[Graphics[{EdgeForm[Thin],LightYellow,Opacity[0.5],Rectangle[{-2,-1},{2,1}],Blue,Thick,Arrow[{{-3,-1/2},{-2,-1/2}}],Arrow[{{2,-1/2},{3,-1/2}}],Arrow[{{1,-2},{1,-1}}],Purple,Arrow[{{-3,1/2},{-2,1/2}}],Arrow[{{2,1/2},{3,1/2}}],Arrow[{{-1,-2},{-1,-1}}]}],Epilog->{Inset[Text@Style["\!\(\*Cell[TextData[Cell[BoxData[FormBox[RowBox[{
SubscriptBox["P", "SO"], "(", RowBox[{RowBox[{
SubscriptBox["A", "u"], "=", "s"}], ",", " ", RowBox[{
SubscriptBox["B", "v"], "=", "t"}]}], ")"}], TraditionalForm]],ExpressionUUID->"459ff043-3579-42fa-805e-2307d7df7b6d"]],ExpressionUUID->"5f06a37e-eb66-496c-80d9-dc0a00f56268"]\)",12],{0,0}],Inset["Alice: u",{-1.4,-1.5}],Inset["Bob: v",{1.4,-1.5}],Inset["Alice \n((Subscript[A, 1]),(Subscript[A, 2]))",{-2.5,0.8}],Inset["((Subscript[B, 1]),(Subscript[B, 2])) \nBob",{-2.5,-0.8}],Inset["Alice: (Subscript[A, u])=s",{2.5,0.7}],Inset["Bob: (Subscript[B, v])=t",{2.5,-0.7}],Inset["Programmed \ninputs",{-2.5,0.0}],Inset["Outcomes",{2.5,0.0}],Inset["Measurement choices",{0.0,-1.5}]},ImageSize->600];

Correlation tables

sFunLabels={"(Subscript[s, 1])","(Subscript[s, 2])","(Subscript[s, 3])","(Subscript[s, 4])"};
corrLabels={"(Subscript[c, 1])","(Subscript[c, 2])","(Subscript[c, 3])","(Subscript[c, 4])"};

genericCorrTable=Grid[Prepend[Table[Join[{corrLabels[[k]]},{correlationsMaximal[[k]]//Simplify}],{k,1,4}],{"",Text@Style["Generic correlations",Blue]}],Frame->All];
preDetCorrTable=Grid[Prepend[Table[Join[{corrLabels[[k]]},{correlationsBellReal[[k]]//Simplify}],{k,1,4}],{"",Text@Style["Noncontextual correlations",Blue]}],Frame->All];
qmCorrTable=Grid[Prepend[Table[Join[{corrLabels[[k]]},{correlationsQM[[k]]//Simplify}],{k,1,4}],{"",Text@Style["QM correlations",Blue]}],Frame->All];
blCorrTable=Grid[Prepend[Table[Join[{corrLabels[[k]]},{correlationsBellLocal[[k]]}],{k,1,4}],{"","Factorizable correlations"}],Frame->All]/.αβSubs2;
trivialCorrTable=Grid[Prepend[Table[Join[{corrLabels[[k]]},{correlationsMinimal[[k]]//Simplify}],{k,1,4}],{"","Trivial correlations"}],Frame->All];
tab1=Prepend[Table[Table[(correlationsBellReal/.{(Subscript[ρ, j])->1}/.ρ0)[[k]],{k,1,4}],{j,1,16}],{"(Subscript[c, 1])","(Subscript[c, 2])","(Subscript[c, 3])","(Subscript[c, 4])"}];
tab2=Transpose[tab1];
odCorrTable=Grid[Prepend[Prepend[tab2,Join[{""},Range[16]]],{"",Text@Style["RCI+OD correlations (16)",Blue],SpanFromLeft}],Frame->All];

genericSFunsTable=Grid[Prepend[Append[Table[Join[{sFunLabels[[k]]},{(sBell.correlationsMaximal)[[k]]//Simplify}],{k,1,4}],{"Min and Max","-4 and +4"}],{"",Text@Style["Generic s-functions",Blue]}],Frame->All];
preDetSFunsTable=Grid[Prepend[Append[Table[Join[{sFunLabels[[k]]},{(sBell.correlationsBellReal)[[k]]//Simplify}],{k,1,4}],{"Min and Max","-2 and +2"}],{"",Text@Style["Noncontextual s-functions",Blue]}],Frame->All];
qmSFunsTable=Grid[Prepend[Append[Table[Join[{sFunLabels[[k]]},{(sBell.correlationsQM)[[k]]//Simplify}],{k,1,4}],{"Min and Max","-2(Sqrt[2]) and +2(Sqrt[2])"}],{"",Text@Style["QM s-functions",Blue]}],Frame->All];
blSFunsTable=Grid[Prepend[Append[Table[Join[{sFunLabels[[k]]},{(sBell.correlationsBellLocal)[[k]]}],{k,1,4}],{"Min and Max","-2 and +2"}],{"","Factorizable s-functions"}],Frame->All]/.αβSubs2;
trivialSFunsTable=Grid[Prepend[Append[Table[Join[{sFunLabels[[k]]},{(sBell.correlationsMinimal)[[k]]//Simplify}],{k,1,4}],{"Min and Max","0 and 0"}],{"","Trivial s-functions"}],Frame->All];
tab1=Prepend[Table[Table[(sBell.correlationsBellReal/.{(Subscript[ρ, j])->1}/.ρ0)[[k]],{k,1,4}],{j,1,16}],{"(Subscript[s, 1])","(Subscript[s, 2])","(Subscript[s, 3])","(Subscript[s, 4])"}];
tab2=Transpose[tab1];
odSFunTable=Grid[Append[Prepend[Prepend[tab2,Join[{""},Range[16]]],{"",Text@Style["RCI+OD s-functions (16)",Blue],SpanFromLeft}],{"Min and Max","-2 and +2",SpanFromLeft}],Frame->All];

genericCandSTable=Row[{genericCorrTable,genericSFunsTable},Invisible[xxxxx]]//TraditionalForm;
qmCandSTable=Row[{qmCorrTable,qmSFunsTable},Invisible[xxxxx]]//TraditionalForm;
preDetCandSTable=Column[{preDetCorrTable,preDetSFunsTable},Spacings->2]//TraditionalForm;
blCandSTable=Row[{blCorrTable,blSFunsTable//FullSimplify},Invisible[xxxxx]]//TraditionalForm;
trivialCandSTable=Row[{trivialCorrTable,trivialSFunsTable},Invisible[xxxxx]]//TraditionalForm;
odCandSTable=Row[{odCorrTable,odSFunTable},Invisible[xxxxx]]//TraditionalForm;

Noncontextual and textual QM model instances via convex combinations of OD model instances

The definitions and routines for this section were originally developed in the notebook “Determinate Models v2”.
 I should revisit that notebook for future work -- I forgot that I had developed some insight intoOD model instances that are also projections, with the goal of reformulating Kochen-Specker.

Deterministic model instances -- classification into subsets according to their properties. subsDeterminate contains the substitution lists for ALL 256 OD model instances (relative to pmfMaximal or condMaximal). 
The index lists point to those substitution lists within subsDeterminate which have the named property. For example
indicesPD -- Predetermined substitution lists
indicesRCI  -- RCI substitution lists 
indicesFC -- Bell local substitution lists
indicesROI -- ROI substitution lists
indicesCHSH --  Substitution lists for OD model instances that satisfy CHSH
indicesPDnotRCI -- Predetermined but not RCI
indicesPDnotFC -- Predetermined but not Bell local
indicesRCIandROI -- OD Model instances satisfy both ROI and RCI
indicesCHSHnotPD -- OD model instance satisfy CHSH but are NOT predetermined
indicesCHSHnotFC -- OD model instance satisfy CHSH but are NOT Bell local
indicesODnotCHSH -- OD model instance that do NOTsatisfy CHSH

Outcome Determinism definitions.

ss1={1,2,3,4};ss2={5,6,7,8};ss3={9,10,11,12};ss4={13,14,15,16};
ssDeterminate=Tuples[{ss1,ss2,ss3,ss4}];
subsDeterminate=Table[Join[Table[(Subscript[γ, j])->1,{j,ssDeterminate[[k]]}],Table[(Subscript[γ, j])->0,{j,Complement[Range[16],ssDeterminate[[k]]]}]],{k,1,Length[ssDeterminate]}];

All 256 OD model instances and associated substitution list.

indicesODAll=Range[Length[subsDeterminate]];
subsODAll=subsDeterminate[[indicesODAll]];
(*condListODAll=determinateAll=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODAll}];*)
condListODAll=determinateAll=Table[condMaximal/.subsODAll[[k]],{k,indicesODAll}];
basisFull=Transpose[condListODAll];

All OD model instances that are also PD and associated substitution list. 16 of them.

indicesODPD=Flatten[Position[condListODAll,#]&/@(condBR/.#&/@Table[Join[{(Subscript[ρ, k])->1},Table[(Subscript[ρ, j])->0,{j,Complement[Range[16],{k}]}]],{k,1,16}])];
subsODPD=subsDeterminate[[indicesODPD]];
condListODPD=determinateODPD=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODPD}];

Define the matR matrix which turns a pmf ρ into a Bell real pmf. Two sanity checks:
1. R (ρ^T)=condBR, and
2. R=rciODColumns.
Check!!

tmpB=Assuming[ρAssumptions&&δAssumptions,Simplify[conditionalizeFull[pmfBellReal,{1,2},{3,4}][[All,2]]]];
ind=Partition[Flatten[Table[Position[ρ16,#]&/@Table[tmpB[[k,j]],{j,1,4}],{k,1,Length[tmpB]}]],4];
matR=Table[Normal[SparseArray[ind[[k]]->{1,1,1,1},16]],{k,1,Length[ind]}];
matR.ρ16==condBR;
matR==rciODColumns;

Check that the columns of matR are indeed the 16 PD model instances. Check!
Note however that although matR and Transpose[condListODPD] have the SAME list of columns, they are in a different order.
matR was chosen to correspond to substituting (Subscript[ρ, k])->1 and all other (Subscript[ρ, j])->0 for k=1,2,...,16. 
On the other hand, these 16 RCI+OD model instances do not appear in that order in the list of all 256 OD model instances.

{Transpose[condListODPD]//MatrixForm,matR//MatrixForm,ContainsExactly[Transpose[condListODPD],matR]};

All OD model instances that are also RCI and associated substitution list. 16 of them -- same as the PD ones.

indicesODRCI=Position[Table[{Assuming[γAssumptions&&δAssumptions,conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1},{3,4}][[All,2]]==conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1},{3}][[All,2]]],Assuming[γAssumptions&&δAssumptions,conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{2},{3,4}][[All,2]]==conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{2},{4}][[All,2]]]},{k,indicesODAll}],{True,True}]//Flatten;
subsODRCI=subsDeterminate[[indicesODRCI]];
condListODRCI=determinateODRCI=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODRCI}];

All OD model instances that are also Bell local (FC) and associated substitution list. 16 of them. Exactly the same as the RCI and PD ones.

indicesODFC=Position[Table[Assuming[γAssumptions&&δAssumptions,conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1,2},{3,4}][[All,2]]==conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1},{3}][[All,2]]*conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{2},{4}][[All,2]]],{k,indicesODAll}],True]//Flatten;
subsODFC=subsDeterminate[[indicesODFC]];
condListODFC=determinateODFC=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODFC}];

Note that the RCI OD model instances are also exactly the factorizable ones, FC OD.

indicesODRCI==indicesODFC;

All OD model instances that are also ROI and associated substitution list. All 256 of them. Every OD model instance is also ROI.

indicesODROI=Position[Table[Assuming[γAssumptions&&δAssumptions,conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1,2},{3,4}][[All,2]]==conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{1},{3,4}][[All,2]]*conditionalizeFull[pmfMaximal/.subsDeterminate[[k]],{2},{3,4}][[All,2]]],{k,indicesODAll}],True]//Flatten;
subsODROI=subsDeterminate[[indicesODROI]];
condListODROI=determinateODROI=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODROI}];

Note that ALL OD model instances are also ROI. This is the reason that the 16 RCI OD model instances are also FC, since FC <--> RCI +ROI. But again, note these are NOT the same as the 16 OD PD model instances.

All OD model instances that are also PD and RCI and associated substitution list. 16 of them.

indicesODPDRCI=Intersection[indicesODPD,indicesODRCI];
subsODPDRCI=subsDeterminate[[indicesODPDRCI]];
condListODPDRCI=determinateODPDRCI=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODPDRCI}];

All OD model instances that are also PD and FC and associated substitution list.

indicesODPDFC=Intersection[indicesODPD,indicesODFC];
subsODPDFC=subsDeterminate[[indicesODPDFC]];
condListODPDFC=determinateODPDFC=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODPDFC}];

Identify indices for OD model instances one of whose s-functions exceeds a Tsirelson bound

determinatesFnctnIndexNot1=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{4,0,0,0}]//Flatten;
determinatesFnctnIndexNot2=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,4,0,0}]//Flatten;
determinatesFnctnIndexNot3=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,0,4,0}]//Flatten;
determinatesFnctnIndexNot4=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,0,0,4}]//Flatten;
determinatesFnctnIndexNot5=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{-4,0,0,0}]//Flatten;
determinatesFnctnIndexNot6=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,-4,0,0}]//Flatten;
determinatesFnctnIndexNot7=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,0,-4,0}]//Flatten;
determinatesFnctnIndexNot8=Position[(sBell.correlationsMaximal)/.#&/@subsDeterminate,{0,0,0,-4}]//Flatten;

indicesODNotTsirelson=Sort[Join[determinatesFnctnIndexNot1,determinatesFnctnIndexNot2,determinatesFnctnIndexNot3,determinatesFnctnIndexNot4,determinatesFnctnIndexNot5,determinatesFnctnIndexNot6,determinatesFnctnIndexNot7,determinatesFnctnIndexNot8]];
determinateODNotTsirelson=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODNotTsirelson}];
(*{determinateODNotTsirelson[[1;;5]]//MatrixForm,Length[indicesODNotTsirelson]}*)

Identify indices for OD model instances that satisfy CHSH. There are 128 of them. They are the complement of the ones which exceed the Tsirelson bound of course.

tmpList=(sBell.correlationsMaximal)/.#&/@subsDeterminate;
truthTableCHSH=Table[And@@Table[-2≤tmpList[[k,j]]≤2,{j,1,4}],{k,indicesODAll}];
indicesODCHSH=Position[truthTableCHSH,True]//Flatten;
Length[%];
subsODCHSH=subsDeterminate[[indicesODCHSH]];
condListODCHSH=Table[condMaximal/.subsDeterminate[[k]],{k,indicesODCHSH}];

Sanity check of the complementarity of those which satisfy CHSH and those which exceed a Tsirelson bound. Check!
Furthermore, the set of OD model instance that are noncontextual is a proper subset of all of the OD model instances that satisfy CHSH. Check!

indicesODPD;
indicesODCHSH==Complement[indicesODAll,indicesODNotTsirelson];
SubsetQ[indicesODCHSH,indicesODPD];
Length[indicesODPD]<Length[indicesODCHSH];

Intersections of the OD model instances that satisfy CHSH with those that are PD, FC, RCI. All the same as expected.

{Intersection[indicesODCHSH,indicesODPD],Intersection[indicesODCHSH,indicesODFC],Intersection[indicesODCHSH,indicesODRCI]};
Length[#]&/@%;
ContainsExactly@@#&/@{{Intersection[indicesODCHSH,indicesODPD],indicesODPD},{Intersection[indicesODCHSH,indicesODFC],indicesODFC},{Intersection[indicesODCHSH,indicesODRCI],indicesODRCI}};

The infamous “maximally deviant” QM example expressed as a convex combination of OD model instances

We actually get a solution here. This is actually a very special case in that
-- (Subscript[θ, 2])=90°-(Subscript[θ, 1])
-- (Subscript[θ, 2])=(Subscript[θ, 3])=(Subscript[θ, 4])
The general case for QM has too many differences in the condQM entries to find any convex combination of OD model instances that can match it.
But this special case is different. Kind of ironic that the example that violates CHSH the most is a “nice” convex combination of OD model instances.

qmExample1=condQM/.{(Subscript[θ, 1])->67.5°,(Subscript[θ, 2])->22.5°,(Subscript[θ, 3])->22.5°,(Subscript[θ, 4])->22.5°};
basisSubs1=FindInstance[λ256Assumptions&&basisFull.λ256==qmExample1,λ256][[1]];
(*λ256/.basisSubs1*)

Find the indices of the “basis” OD model instances to take the convex combination of. Also compute the corresponding coefficients of these 13 “basis” vectors.

posqmODIndices=Complement[Range[256],Flatten[Position[λ256/.basisSubs1,0.]]];
posqmODIndicesHold=posqmODIndices;
coefficientsSymbolic=λ256[[posqmODIndices]];
coefficientsNumeric=λ256[[posqmODIndices]]/.basisSubs1;
basisReduced=Transpose[condListODAll[[posqmODIndices]]];
(*{%//MatrixForm,%%//MatrixForm,qmExample1//MatrixForm}*)

This is where we figure out the coefficients for the contextual QM example

See notebook “Determinate Models v2” for more details. Had to do some guesswork here because (Subscript[π, 7]) and (Subscript[π, 8]) were not very “obvious”.

(*{basisReduced.π13//MatrixForm,condQM//MatrixForm,
basisReduced.coefficientsNumeric//MatrixForm,qmExample1//MatrixForm}*)

Finally the symbolic weights for the contextual QM example are given in odQMSubsSymbolic, all in terms of (Subscript[θ, 1]) (which in this case is 67.5°. This is given in Eq. 32 in the paper following Table 16.

odQMSubsSymbolic={(Subscript[π, 1])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 2])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 3])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 4])->1/12((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 5])->1/12((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 6])->1/12((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 7])->1/2((Sin[(Subscript[θ, 1])])^2)-1/4((Cos[(Subscript[θ, 1])])^2),(Subscript[π, 8])->1/2((Sin[(Subscript[θ, 1])])^2)-5/6((Cos[(Subscript[θ, 1])])^2),(Subscript[π, 9])->1/3((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 10])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 11])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 12 ])->1/6((Sin[(Subscript[θ, 2])])^2),(Subscript[π, 13])->1/2((Cos[(Subscript[θ, 1])])^2)};
(*odQMSubsSymbolic=odQMSubsSymbolic/.{(Subscript[θ, 2])->π/2-(Subscript[θ, 1])}//Simplify*)
odQMSubs=odQMSubsSymbolic/.{(Subscript[θ, 2])->22.5°,(Subscript[θ, 1])->67.5°};

Table for Contextual QM example

tab1C=Append[tuples4Operational,{"Weights",SpanFromLeft,SpanFromLeft,SpanFromLeft}];
tab2C=Append[basisReduced,π13];

tabODQM13=Grid[Prepend[Table[Join[tab1C[[k]],tab2C[[k]]],{k,1,Length[tab1]}],Text@Style[#,Blue]&/@{"s","t","u","v","1","2","3","4","5","6","7","8","9","10","11","12","13"}],Alignment->Right,Dividers->{{1->True,3->True,5->True,-1->True},{1->True,2->True,-2->True,-1->True}}]//TraditionalForm;

tabODQM13wWeigts=Table[Join[{(Subscript[w, k])},{(π13/.odQMSubsSymbolic)[[k]]/.{(Subscript[θ, 2])->(π/2)-(Subscript[θ, 1])}//Simplify},Transpose[basisReduced][[k]]],{k,1,Length[π13]}]//Simplify;
displayODQM13=Grid[Prepend[Prepend[tabODQM13wWeigts,{Text@Style["Weights",Blue,22],SpanFromLeft,Text@Style["None of them satisfy RCI \n(they are 'nonlocal')",Blue,22],SpanFromLeft}],{Text@Style["Convex Combination of 13 OD Model Instances",Blue],SpanFromLeft}],Frame->All]/.{(Subscript[θ, 1])->"67.5°",2(Subscript[θ, 1])->"2 ×67.5°"}//TraditionalForm;
Total[π13/.odQMSubsSymbolic]//Simplify;  (*Check total*)
π13[[{7,8}]]/.odQMSubsSymbolic/.{(Subscript[θ, 1])->67.5°} ; (*Check that (Subscript[π, 7]) and (Subscript[π, 8]) are non-negative*)

A noncontextual QM example expressed as a convex combination of OD model instances

This is a simple example with (Subscript[θ, 1])=135°,(Subscript[θ, 2])=0°,(Subscript[θ, 3])=90°,(Subscript[θ, 4])=45°. It can be found in Table 14 of the paper.

qmExample2=condQM/.{(Subscript[θ, 1])->135°,(Subscript[θ, 2])->0°,(Subscript[θ, 3])->90°,(Subscript[θ, 4])->45°};
basisSubs2=FindInstance[λ256Assumptions&&basisFull.λ256==qmExample2,λ256][[1]];
λ256/.basisSubs2;

Find the indices of the “basis” OD model instances to take the convex combination of. Also compute the corresponding coefficients of these 4 “basis” vectors. Obviously  (Subscript[π, k])=(1/4) for k=1,2,3,4. And obviously this is a pmf. And obviously the resulting QM conditional probs sum to 4.

posqmODIndices2=Complement[Range[256],Flatten[Position[λ256/.basisSubs2,0]]];
posqmODIndicesHold2=posqmODIndices2;
coefficientsSymbolic2=λ256[[posqmODIndices2]];
coefficientsNumeric2=λ256[[posqmODIndices2]]/.basisSubs2;
basisReduced2=Transpose[condListODAll[[posqmODIndices2]]];
(*{%//MatrixForm,%%//MatrixForm,qmExample2//MatrixForm}*)

Sanity check: Correlations and s-functions. Check!

(*cMat.basisReduced2.π4/.{(Subscript[π, 1])->1/4,(Subscript[π, 2])->1/4,(Subscript[π, 3])->1/4,(Subscript[π, 4])->1/4}
sBell.%
cMat.qmExample2
sBell.%*)

Table for Noncontextual QM example

tab1NC=Append[tuples4Operational,{"Weights",SpanFromLeft,SpanFromLeft,SpanFromLeft}];
tab2NC=Append[basisReduced2,coefficientsNumeric2];

tableQMNC=Grid[Prepend[Table[Join[tab1NC[[k]],tab2NC[[k]]],{k,1,Length[tab1]}],Text@Style[#,Blue]&/@{"s","t","u","v","1","2","3","4"}],Alignment->Right,Dividers->{{1->True,3->True,5->True,-1->True},{1->True,2->True,-2->True,-1->True}}]//TraditionalForm;

tabODQM4wWeigts=Table[Join[{(Subscript[w, k])},{coefficientsNumeric2[[k]]},Transpose[basisReduced2][[k]]],{k,1,Length[π4]}];
displayODQM4=Grid[Prepend[Prepend[tabODQM4wWeigts,{Text@Style["Weights",Blue,22],SpanFromLeft,Text@Style["4 RCI+OD model instances",Blue,22],SpanFromLeft}],{Text@Style["Convex combination of 4 OD instances",Blue],SpanFromLeft}],ItemSize->{1->2,2->2},Frame->All]//TraditionalForm;

Predictability

Updated derivation of OP and MP pmf “pattern” tables

It is convenient to refer to this table in the discussion that follows.

For MP choose either (1,2) or (5,6)  and either (3,4) or (7,8)  and  either (9,10) and (13,14)  and either  (11,12) or (15,16) (to be 0 that is).
For OP choose either (1,5) or (2,6)  and either (3,7) or (4,8)  and  either (9,13) and (10,14)  and either  (11,15) or (12,16) (to be 0 that is).

mpPairs={{{1,2},{5,6}},{{3,4},{7,8}},{{9,10},{13,14}},{{11,12},{15,16}}};
opPairs={{{1,5},{2,6}},{{3,7},{4,8}},{{9,13},{10,14}},{{11,15},{12,16}}};

mpZeroIndices=Flatten[#]&/@Tuples[mpPairs];
opZeroIndices=Flatten[#]&/@Tuples[opPairs];

mpZeroSubs=Table[Table[(Subscript[γ, mpZeroIndices[[k,i]]])->0,{i,1,Length[mpZeroIndices[[k]]]}],{k,1,Length[mpZeroIndices]}];
opZeroSubs=Table[Table[(Subscript[γ, opZeroIndices[[k,i]]])->0,{i,1,Length[opZeroIndices[[k]]]}],{k,1,Length[opZeroIndices]}];

The set of all POTENTIAL measurement predictable patterns and the set of all outcome predictable patterns

Note that not all of the 16 MP patterns are legal, that is not all of them satisfy the contextual-sum-to-1-in-each-block-of-four-condition. For example, int the MP (first) table below, columns 1,2,3,4,5,8,9,12,13,14,15, and 16 are “illegal”. That leaves just 4 legitimate patterns. Which is just what I got before.
Bottom line: 4 MP patterns and 16 OP patterns, just like before.

mpCond=Reverse[Table[γ16/.mpZeroSubs[[i]],{i,1,Length[mpZeroSubs]}]];
opCond=Reverse[Table[γ16/.opZeroSubs[[i]],{i,1,Length[opZeroSubs]}]];
{Transpose[mpCond]//MatrixForm,Transpose[opCond]//MatrixForm};

Remove mpCond examples that do NOT satisfy the measurement constraints.
This turns out to be instances 1,2,3,4,5,8,9,12,13,14,15, and 16 from mpCond, leaving instances 6,7,10, and 11 as legitimate MP model instances.

lstmp=Table[Total[Table[mpCond[[k,j]],{j,#}]]&/@{Range[1,4],Range[5,8],Range[9,12],Range[13,16]},{k,1,Length[mpCond]}];
MemberQ[#,0]&/@lstmp;
Position[%,False]//Flatten;
mpCondReduced=mpCond[[%]];

Display tables of the outcome predictable (OP) and measurement predictable (MP) model instances (or types if you will).

predOutcomeTable=Grid[Prepend[Table[Join[tuples4Operational[[k]],Transpose[opCond][[k]]],{k,1,Length[tuples4Operational]}],Text@Style[#,(*Bold,*)Blue]&/@Join[{"s","t","u","v"},Range[16]]],Frame->All];
predMeasTable=Grid[Prepend[Table[Join[tuples4Operational[[k]],Transpose[mpCondReduced][[k]]],{k,1,Length[tuples4Operational]}],Join[Text@Style[#,(*Bold,*)Blue]&/@Join[{"s","t","u","v"},Range[4]]]],Frame->All];
predSummaryTable=Grid[Prepend[Table[Join[tuples4Operational[[k]],Transpose[Join[opCond,mpCondReduced]][[k]]],{k,1,Length[tuples4Operational]}],Join[Text@Style[#,(*Bold,*)Blue]&/@{"s","t","u","v","Outcome predictable"},Table[SpanFromLeft,{k,1,15}],Text@Style[#,(*Bold,*)Blue]&/@{"Measurement \npredictable"},Table[SpanFromLeft,{k,1,3}]]],Frame->All];
opQMTable=Grid[Prepend[Table[Join[tuples4Operational[[k]],Transpose[opCond[[{6,7,10,11}]]][[k]]],{k,1,Length[tuples4Operational]}],Text@Style[#,(*Bold,*)Blue]&/@Join[{"s","t","u","v"},Range[4]]],Frame->All]/.Table[(Subscript[γ, k])->1/2,{k,1,Length[γ16]}];