Definition t_lookup (m : total_map) x := 
  let (m, d) := m in
  match lookup m x with
  | Some v => v
  | None => d
  end.

Lemma t_update_shadow : forall (m: total_map) v1 v2 x, t_update (t_update m x v1) x v2 = t_update m x v2.