Bell's inequality theorem, along with experimental evidence, shows that we cannot have both realism and locality. While I don't fully understand it, Leggett's inequality takes this a step further and shows that we can't even have non-local realism theories. Apparently there are some hidden variable theories that get around this by having measurements be contextual. I've heard there are even inequalities telling us how much quantum mechanics does or doesn't require contextuality, but I had trouble finding information on this.
This is all confusing to me, and it would be helpful if someone could explain precisely (mathematically?) what is meant by: realism, locality (I assume I understand this one), and contextuality.
What combinations of realism, locality, and contextuality can we rule out using inequality theorems (assuming we have experimental data)?