document state inversion