Please explain the basis of Bell inequalities. Bell inequalities are a set of mathematical inequalities that provide a way to test whether the predictions of quantum mechanics are consistent with local realism. Local realism is the idea that physical properties exist independently of measurement and that these properties can influence the outcomes of measurements, but cannot be influenced by measurements that are performed far away. The Bell inequalities were first proposed by physicist John Bell in 1964 as a way to test whether the predictions of quantum mechanics were consistent with local realism. Bell showed that if local realism is true, then certain statistical correlations between the results of measurements performed on two entangled particles should not exceed a certain limit. These correlations are expressed as the probabilities of obtaining particular outcomes in a series of measurements. The Bell inequalities compare the probabilities predicted by local realism with those predicted by quantum mechanics. If the probabilities predicted by quantum mechanics violate the Bell inequalities, then local realism must be abandoned. The violation of the Bell inequalities has been observed in numerous experiments, demonstrating that quantum mechanics is fundamentally different from classical physics and that local realism cannot be upheld in the quantum world. This has important implications for our understanding of the nature of reality and for the development of technologies such as quantum cryptography and quantum computing.