  In this paper we study an application of an information distance between two
measurements to the problem of non-contextuality and local realism. We
postulate the triangle principle which states that any information distance is
well defined on any pair of measurements, even if the two measurements cannot
be jointly performed. As a consequence, the triangle inequality for this
distance is obeyed for any three measurements. This simple principle is valid
in any classical realistic theory, however it does not hold in quantum theory.
It allows us to re-derive in an astonishingly simple way a large class of
non-contextuality and local realistic inequalities via multiple applications of
the triangle inequality. We also show that this principle can be applied to
derive monogamy relations. The triangle principle is different than the
assumption of non-contextuality and local realism, which is defined as a lack
of existence of a joined probability distribution giving rise to all measurable
data. Therefore, we show that one can design Bell-Kochen-Specker tests using a
different principle.
