Text this: Theory of oxidation/reduction-induced valence transformations of metal ion dopants in oxide crystals mediated by oxide-vacancy diffusion