Is the Bell's paper on the EPR paradox coherent? I tried to read the Bell's paper on the EPR paradox but i rapidly stepped on difficulties : 
$$A(\vec{a}, \lambda) = \pm 1 ,\ B(\vec{b}, \lambda) = \pm 1 \tag{1}$$
So we identify $A$ with particle 1 and $B$ with particle 2, $\vec{a}$ and $\vec{b}$ are detectors, $\lambda$ a variable, and the functions can take the values $\pm 1$, all right.
And here it comes :
$$P(\vec{a}, \vec{b}) = \int d\lambda\rho(\lambda)A(\vec{a}, \lambda)B(\vec{b}, \lambda) \tag{2}$$
Wait, according to equation (1) the expression under the integral makes sudden jumps ! Are we really integrating a discontinuous function* ? One could argue that an integral is an infinite sum in disguise, but it wouldn't satisfy me because $\lambda$ being a natural variable has an infinite amount of precision and therefore must be real, not discret. 
Maybe the product $A(\vec{a}, \lambda)B(\vec{b}, \lambda)$ is constant or outstide the integral, but what would be the point of the equation ? Except integrating a probability distribution $\rho(\lambda)$ equal to 1. In fact, why do we need $\rho(\lambda)$ since $\lambda$ is already processed inside the functions $A$ and $B$ ?
We didn't know that the ingtegral was impossible so let's do it, and move on to the demonstration. By equations (1) and (2) we assumed that the measures of A and B were independents, obeying to $\lambda$ or equivalently $P(\vec{a}, \vec{b})$ not a function of $AB(\vec{a}, \vec{b}, \lambda)$. The next assumption is made with :
$$P(\vec{a}, \vec{b}) = -\int d\lambda\rho(\lambda)A(\vec{a}, \lambda)A(\vec{b}, \lambda) \tag{14}$$
This equation now states that for any $\vec{a}, \vec{b}$ and $\lambda : A = -B$. Consider a first experiment $P(\vec{a}, \vec{b})$, following equation (14) the average measure on detector $\vec{a}$ is $X$ and $-X$ on $\vec{b}$. Then, for a second experiment $P(\vec{a}, \vec{c})$ we may expect a different result on detector $\vec{c}$, let's say $Y$, assuming $\vec{c}$ different from $\vec{b}$. But how on detector $\vec{a}$ the result can be equal to $-Y$ according to (14) and simultaneously remain as X according to (1)+(2) ?
Does the conclusion** still hold ?
*the term discontinuous function is maybe inaccurate or wrong 
**In a theory in which parameters are added to quantum mechanics to determine the results of individual measurements, without changing the statistical predictions, there must be a mechanism whereby the setting of one measuring device can influence the reading of another instrument, however remote. Moreover, the signal involved must propagate instantaneously, so that such a theory could not be Lorentz invariant.
 A: It seems to me that you're uncomfortable with taking the integral of a discontinuous function. I guess this is just a reflex that one could instinctively import from differentiating. In fact, you integrated a discontinuous function in primary school when calculating the area of a rectangle. The function
$$f(x)=\begin{cases} a \quad x\in[0,b]\\ 0 \quad\textrm{otherwise}
\end{cases} $$
is just a rectangle and is discontinuous in $0$ and $b$, the area under the curve is the area of the rectangle, which is $ab$, and the function is clearly integrable and 
$$\int dx f(x)=\int_0^b dx\,a=ab. $$
now this is a stupid example, but it's just to illustrate that continuity and integrability don't have much to do with each other, and as a matter of fact piecewise constant functions are clearly integrable on compact intervals, the value of the integral is just the sum of the areas of the rectangles. By extension, piecewise continuous functions are integrable and the area is the sum of the integrals in each interval where the function is continuous. The only issue remaining is that here we are not integrating on a compact interval but on the whole real line, so we should verify that the integral converges, but $A(\lambda),B(\lambda)\leq 1$ for all $\lambda$, hence
$$ \int d\lambda p(\lambda)A(\lambda)B(\lambda)\leq\int d\lambda p(\lambda)=1$$.
None of this is particularly rigorous calculus-wise, but I guess the proofs are in any calculus book.
A: The integral is referred to any fixed possible probabilty measure so, for instance, it also includes the case of a sum on a discrete set of numbers and continuity an other regularity issues are irrelevant here. It would be better to replace  $d\lambda$ with $d\mu(\lambda)$. The result however  uses only the requirements that the measure is non-negative and the total measure is $1$ it does not matter how to indicate the sum/integration. 
The presence of that probability measure tries to  describe in a classical way (within this hidden variable approach) the reason why the values of observables "fluctuate": it is due to the fluctuation of the value if the hidden variable $\lambda$. The idea is that fluctuations of values of observables in QM should have a nature similar to somo of the classical variables of classical statistical mechanics. The fundamental difference with the standard assumption of QM is that here the probability measure has an epistemic nature instead of ontic.
A: To be fair, you're right that the assumptions $A(a,\lambda) = \pm 1$ and $B(b,\lambda) = \pm 1$ can cause issues if you aren't careful.  When performing the integral, there's an intermediate step like the following:
$$
P(a, b) - P(a, c) = -\int{p(\lambda)[A(a,\lambda)A(b, \lambda) - A(a,\lambda)A(c, \lambda)]d\lambda}
$$
Notice how the factor in the integrand on the right is always either $0$, or $\pm2$?  In fact, the only places where it isn't zero is when $A(b, \lambda) = -A(c,\lambda)$.  Everywhere else it must be 0, since these functions only take values of $\pm1$.
Now consider the set of $\lambda$ where this factor is non-zero.  Either this set has measure zero, and the integral is just zero, or this set has non-zero area.  But if two complex functions are ever equal on a measurable subset of the complex plane, then uniqueness of complex extensions says that equality must hold everywhere.  Here, it says that if $A(b,\lambda) = -A(c, \lambda)$ sometimes, then $A(b,\lambda) = -A(c,\lambda)$ everywhere.  Of course, this would violate the assumption that $c$ is a different unit vector than $a$ and $b$, which is necessary to complete the proof.
The problem comes from thinking that $A(a,\lambda)$ is a continuous function.  It clearly isn't, by construction, and that means it can't be represented as the real part of a complex analytic function.  That makes it different from any other "probability function" typically used in Quantum Mechanics, which I suspect is why your intuition is triggering an alert.  Just because no continuous physical system could ever give you a function that only returns $\pm1$, doesn't mean you don't have to theoretically consider a system that might.
If you want another place in this theorem where your mathematical spider sense should be tingling, look at what it claims is the "classical" behavior for two particles.  The average of the product of two random variables is never equal to an average over the product of their probability functions, yet somehow that's where the theorem starts.  You aren't the only one who thinks that Bell is mathematically incoherent.
A: Let's assume that the integral (2) can be split by a finite or infinite sum of integrals, and in each interval $A(\vec{a}, \lambda)B(\vec{b}, \lambda)$ is constant ($ +1$ or $-1$).
[a, b] + ]b, c] + ]c, d]... 
or equivalently : [a, b] + [b+$d\lambda$, c] + [c+$d\lambda$, d]...
but not : [a, b] + [b, c] + [c, d]...
because there is an inifity of ways to obtain a measurement.
For illustration without $\rho$ and omitting B : 
$$\begin{align}\int_aA(\lambda)d\lambda &= \int_a^bA(\lambda)d\lambda + \int_{b+d\lambda}^c A(\lambda)d\lambda + \int_{c+d\lambda}^d A(\lambda)d\lambda...\\
&=(b-a)*(+1) + (c-b-d\lambda)*(-1) + (d-c-d\lambda)*(+1)...\\ \end{align}
$$ 
a, b, c, d are real values and the $d\lambda$'s will cancel, so the integral has a real value.
Now with $\rho$ we will have : 
$$ \int_aA(\lambda)d\lambda = \int_a^b\rho(\lambda)d\lambda - \int_{b+d\lambda}^c \rho(\lambda)d\lambda + \int_{c+d\lambda}^d \rho(\lambda)d\lambda...$$
I don't see how to get rid of the $d\lambda$'s at the boundaries, so i guess we can just ignore them.
