What is the difference between realism in locality, and counterfactual definiteness?
I disagree with Danu. This is a serious question being considered by theoretical physicists involved with the foundations of quantum mechanics.
Counterfactual definiteness is an epistemological property that essentially allows you to ask what-if questions about experiments. For example, in a forensic analysis of a car crash, it might be important to know "Had the driver been going the speed limit, would the accident have happened?" or something of that nature. In essense, as per its name, a theory that possesses counterfactual definiteness allows you to use the information from an actual experiment to determine what would have happened had you changed X or Y about the setup.
Realism is a metaphysical property of a theory, which says that the objects of the theory actually exist in the world. This is in contrast to instrumentalism which says that theories are merely useful tools for predicting results, but we shouldn't take their objects too seriously. As a common example, lets take electricity: does an electron exist? A realist would say yes, and go on to define its properties and experiments that support those properties. An instrumentalist would say no, that the electron is a useful concept that we attach to a particular phenomena, but it has no independent existance. The key difference is in attitude: instrumentalists see theory as the development of ever more pragmatic tools of prediction, while realists see theory as as a series of ever more accurate representations of reality, with each "paradigm shift" (per Kuhn) providing a more nuanced picture.
This is a profound question at the heart of science. Indeed no little effort has been devoted to trying to understand whether the mathematics of quantum mechanics are simply a contrivance or reflect reality. Surprisingly, Bell discovered an experimental method to answer the question and the result is that quantum weirdness is an intrinsic aspect of nature. God does play dice and determinism cannot be rescued by hidden variables, which do not apparently exist.
Realism is the belief that nature exists independent of anyone's conscious thought or knowledge or observation. A falling tree in a deserted forest still makes a racket. The moon is still there when no one is looking.
But in physics, we need more precise definitions. So to rephrase realism, we postulate that material objects exist independently and also have definite properties which can be measured [in quantum mechanics any individual property can in principle be determined to any arbitrary precision]. And more than that, these properties have only one value at any given place and time and that fact is independent of whether or not we measure them. Thus even though we don't measure them, they have the single precise value they would have had, if we did measure them. This is CFD.
We go through this mental torture because the equations of quantum mechanics and the experimental verification of Bell say exactly the opposite. That is to say generalized realism is still assumed to be correct but CFD is explicitly refuted. The devil is in the details.
The light from distant stars dims in proportion to the inverse square of the distance as the electromagnetic radiation spreads out along the surface of an expanding sphere. But photons emitted have exactly the same energy at any distance [hv, where v is the frequency]. We understand the expanding sphere is the wavefunction which is related to the probability of finding a photon. The photon exists EVERYWHERE on the sphere until it is measured. So at greater distances we still get constant energy photons, which are detected by single atoms at discrete points, just fewer of them.
The results of shooting electrons at two slits in only predicable is we assume the electron exists simultaneously at many locations at the same time [like ripples on a pond after dropping in a pebble]. A single electron goes through both slits and the single electron, existing at many locations at the same time, repels/interferes with its many selves. But when the position is finally measured [as a point of light on a fluorescent screen], the electron is always at a particular point. Indeed, electrons are never measured to be more than point particles but unless we assume they are waves [many simultaneous locations] before that, our predictions don't match experimental results.
And the details are not philosophy but SCIENCE.