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.

(* Specifications: *)
Lemma write_near_stable k v : near_stable (write k v) k.
Lemma state_equiv_sym : forall s s',
state_equiv s s' -> state_equiv s' s.
Lemma state_equiv_refl : forall s,
state_equiv s s.
Lemma state_equiv_trans : forall s1 s2 s3,
state_equiv s1 s2 ->
state_equiv s2 s3 ->
state_equiv s1 s3.