Definition get_val_equiv_single_exception k (s s' : state) : Prop :=
forall k', k' <> k -> get_val k' s = get_val k' s'.
Definition get_val_equiv_double_exception k1 k2 (s s' : state) : Prop :=
forall k', k' <> k1 -> k' <> k2 -> get_val k' s = get_val k' s'.
Definition near_stable {X} (m : Poram X) k : Prop :=
forall s, well_formed s -> poram_lift (state_equiv s) (get_val_equiv_single_exception k s) triv m.

Lemma write_near_stable k v : near_stable (write k v) k.