Right. I just wanted to point out that knowing the correlation ##E(a,b)## isn't enough to conclude anything about locality. One must also assume a specific class of underlying models that explain how ##E(a,b)## comes about. This class of models is given by the introduction of some arbitrary variables ##\lambda## and the integral you mentioned. Bell concludes that any such model must be non-local. However, he can't conclude something about models that don't belong to this class. In QM, the function ##E(a,b)## isn't given by an integral over some variables ##\lambda##, but rather by the expectation value of a product of operators. One could conclude something about locality in general, if all models would belong to this class. However, QM is a counterexample that shows that Bell's class of models isn't completely general.

Your argument that QM can be considered as a counterexample relies on subjective idea that QM actually explains how ##E(a,b)## comes about.
But certainly there are a lot of people who would consider only spacetime events based model as an explanation of ##E(a,b)##.

More precisely, he concludes that any such model that can reproduce the predictions of QM must be non-local.

I think this depends on what interpretation of QM one adopts. According to the "shut up and calculate" interpretation, yes, QM does not belong to Bell's class of models. But in the de Broglie-Bohm interpretation, for example, it does--the hidden variables are the particle positions. But because the particle motions are affected by the quantum potential, they are nonlocal, so the function inside the integral over the hidden variables does not factorize, and the Bell inequalities are violated. In this interpretation, of course, the standard formalism of QM that uses operators and expectation values is not fundamental; it's emergent from the underlying model.

It has nothing to do with spacetime events. Bell's class of models doesn't mention spacetime events either and in QM, the detections are of course events in spacetime too. The question is only whether the detected values at each spacetime event arise as functions of a hidden variable or not.

Yes, you're right of course.

That's also correct, but most people (even Einstein) don't consider dBB to be a serious solution. It's toy model and it serves it purpose as such, but it has way more conceptual problems than it solves and it doesn't generalize to QFT, so it is essentially falsified already as long as the Bohmians don't fix it. My point is that there exist models that explain the correlations without introducing hidden variables and since such models exist, we know that Bell's class of models isn't the most general class. Hence, the violation of the inequality doesn't imply anything about locality unless we accept extra assumptions.

I posted a note about this a year or so ago. Here's the summary:

In a spin-1/2 anti-correlated EPR experiment, the joint probability that Alice will measure spin-up at angle [itex]\alpha[/itex] and Bob will measure spin-up at angle [itex]\beta[/itex] is given by:

(where the sum might be an integral, if [itex]\lambda[/itex] takes on continuous values). If there were such probability distributions, then there would be a straight-forward local explanation of the EPR result:

Each pair of particles has a corresponding "hidden variable" [itex]\lambda[/itex] selected according to the probability distribution [itex]P(\lambda)[/itex]

When Alice measures her particle, she gets spin-up with probability [itex]P(A|\alpha, \lambda)[/itex]

When Bob measures his particle, he gets spin-up with probability [itex]P(B|\beta, \lambda)[/itex]

These probabilities are independent.

Alas, Bell showed that there were no such probability distributions. Now, you can ask the analogous question about amplitudes:

Let [itex]\psi(A \hat B | \alpha, \beta)[/itex] be the amplitude (square-root of the probability, basically) that Alice and Bob will get spin-up at their respective angles. So [itex]\psi(A \hat B | \alpha, \beta) = \frac{1}{\sqrt{2}} sin(\frac{\beta - \alpha}{2})[/itex] (times a phase factor). Then the analogous question for amplitudes is:

Does there exist a parameter [itex]\lambda[/itex] and amplitudes [itex]\psi(\lambda), \psi(A | \alpha, \lambda), \psi(B | \beta, \lambda)[/itex] such that:

I don't know physically what it means that amplitudes, rather than probabilities factor, but it shows that quantum problems are often a lot simpler in terms of amplitudes.

In response to: @PeterDonis saying: More precisely, he [Bell] concludes that any such model that can reproduce the predictions of QM must be non-local.

You guys are far from alone on this.
So after looking at Bell's 1964 paper I thought that he showed: {Locality & hidden variables} is incompatible with the predictions of QM.
I would naively conclude that that any model that can reproduce the predictions of QM must not have both locality & hidden variables. And also this seems to me not the same as being non-local. For example, have locality but not hidden variables.

You're correct. "Such" in our sentences referred to hidden variables models, so we agree with you. No hidden variables model can be local, but other models can be.

##\overline{A\cap{B}}## implies ##\bar{A}\cup\bar{B}## but not ##\bar{A}\cap\bar{B}##. However, the situation here is somewhat more complex because the assumptions Bell made in his original paper do not exactly correspond to "hidden variables" and "locality"; they're closer to "the properties that a theory must have to 'complete' (in the EPR sense) QM".

@OCR at #70 is almost right. Only I don't consider what you said to be a fact.
Bell defines locality on the first page, gets (2) as a consequence, has hidden variables λ throughout his proof. Many others think he assumes hidden variables and locality.
As a simpleton, I look forward to an explanation I can understand as to why they are not assumed.

Trying to reproduce the correlation we could try the following reasoning :

The model is : $$C(a,b)=\int \underbrace{A(a,x)\cdot B(b,x)}_{AB(a,b,x)}dx$$
more generally :

$$AB(a,b,x)=g(A(a,x),B(b,x))$$

numerically an exhaustive search over the functions : $$g,A,B : \{0,1\}^2->\{0,1\}$$ since a,b can take 2 values and x too for the spin 1/2 case (we could remap the names of the two angles)

The total number of functions AB is $$2^{(2^3)}=256$$

The decomposition above gave 192 functions generated.

Hence i came to the paradox : even if in this way 75% of the functions can be generated , the quantum real function shall be in the remaining.

But then this also lead to the fact that the decomposition $$AB(a,b,x)=g(h(A(a,x),B(b,x)),A'(a,x))$$
Gives 256 over 256 functions (but seems physically akward or unacceptable)?

I would like to try functions thst can take 3 values but on my pc it will last weeks...