Definition latest_read (h : hist) v :=
  (* initial condition *)
  ((forall t r w, h t = Some (AE r w) -> w = Empty -> r = Empty) /\ v = vint 1) \/
  v <> Empty /\ exists n, h n = Some (AE v Empty) /\
  forall t r w, h t = Some (AE r w) -> w = Empty -> r <> Empty -> (t <= n)%nat.

Lemma prev_taken_cons : forall r w h, prev_taken (AE r w :: h) = if eq_dec w Empty then prev_taken h else fst (find_read h (vint 1)).