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 state_equiv_refl : forall s, state_equiv s s.