(* Lemma match_env_same_blocks: forall j e te, match_env j e te -> blocks_of_env te = Clight.blocks_of_env e. *)

(* Specifications: *)
Lemma match_env_same_blocks: forall j e te
(ENV: match_env j e te),
list_forall2
(fun (i_x : positive * (block * type)) (i_y : positive * (block * Z)) =>
fst i_x = fst i_y /\
j (fst (snd i_x)) = Some (fst (snd i_y), 0) /\
snd (snd i_y) = sizeof (snd (snd i_x)))
(PTree.elements e) (PTree.elements te).
Lemma match_env_free_blocks_parallel_inject:
forall e te m m' j tm
(ENV: match_env j e te)
(INJ: Mem.inject j m tm)
(FL: Mem.free_list m (Clight.blocks_of_env e) = Some m'),
exists tm', Mem.free_list tm (blocks_of_env te) = Some tm' /\
Mem.inject j m' tm'.
Lemma freelist_freelist_inject: forall m1 m1' j m2 e
(FL1: Mem.free_list m1 (Clight.blocks_of_env e) = Some m1')
(INJ : Mem.inject j m1 m2)
te (MENV : match_env j e te)
m2'
(FL2 : Mem.free_list m2 (blocks_of_env te) = Some m2'),
Mem.inject j m1' m2'.
Lemma FreelistEffect_PropagateLeft: forall
m e m'
(FL : Mem.free_list m (Clight.blocks_of_env e) = Some m')
mu m2 (SMV : sm_valid mu m m2) (WD: SM_wd mu)
te (MENV: match_env (restrict (as_inj mu) (vis mu)) e te)
b2 ofs
(EFF : FreelistEffect m2 (blocks_of_env te) b2 ofs = true)
(LB: locBlocksTgt mu b2 = false),
exists b1 delta,
foreign_of mu b1 = Some (b2, delta) /\
FreelistEffect m (Clight.blocks_of_env e) b1 (ofs - delta) = true /\
Mem.perm m b1 (ofs - delta) Max Nonempty.
Lemma match_env_empty: forall j,
match_env j Clight.empty_env Csharpminor.empty_env.