(** ** Memories equal up to alpha-renaming *)
From mathcomp.ssreflect Require Import ssreflect ssrbool ssrnat ssrfun eqtype seq fintype finfun.
Set Implicit Arguments.
(*NOTE: because of redefinition of [val], these imports must appear after Ssreflect eqtype.*)
(** ** Block renamings*)
Module Renamings.
Definition memren := block -> option block.
Definition ren_incr f1 f2 :=
forall (b b' : block),
f1 b = Some b' -> f2 b = Some b'.
Definition ren_separated (f f' : memren) m1 m2 :=
forall (b1 b2 : block),
f b1 = None ->
f' b1 = Some b2 ->
~ Mem.valid_block m1 b1 /\ ~ Mem.valid_block m2 b2.
Definition ren_domain_incr (f1 f2: memren) :=
forall b,
f1 b -> f2 b.
(** Defining the domain of a renaming with respect to a memory*)
Definition domain_memren (f: memren) m :=
forall b, Mem.valid_block m b <-> isSome (f b).

Lemma ren_incr_refl:
forall f,
ren_incr f f.