Corollary prev_taken_In : forall h, prev_taken h = vint 1 \/ In (AE (prev_taken h) Empty) h.

Lemma take_read : forall h v, apply_hist (vint 0) (rev h) = Some v -> prev_taken h = if eq_dec v Empty then snd (last_two_reads h) else fst (last_two_reads h).