Fundamental theorem of equivalence relations