Remark var_names_app:
forall vars1 vars2, var_names (vars1 ++ vars2) = var_names vars1 ++ var_names vars2.
Remark filter_app:
forall (A: Type) (f: A -> bool) l1 l2,
List.filter f (l1 ++ l2) = List.filter f l1 ++ List.filter f l2.
Remark filter_charact:
forall (A: Type) (f: A -> bool) x l,
In x (List.filter f l) <-> In x l /\ f x = true.
Remark filter_norepet:
forall (A: Type) (f: A -> bool) l,
list_norepet l -> list_norepet (List.filter f l).
Remark filter_map:
forall (A B: Type) (f: A -> B) (pa: A -> bool) (pb: B -> bool),
(forall a, pb (f a) = pa a) ->
forall l, List.map f (List.filter pa l) = List.filter pb (List.map f l).

Theorem match_envs_alloc_variables:
forall cenv m vars e m' temps j tm,
alloc_variables ge empty_env m vars e m' ->
list_norepet (var_names vars) ->
Mem.inject j m tm ->
(forall id ty, In (id, ty) vars -> VSet.mem id cenv = true ->
exists chunk, access_mode ty = By_value chunk) ->
(forall id, VSet.mem id cenv = true -> In id (var_names vars)) ->
exists j', exists te, exists tm',
alloc_variables tge empty_env tm (remove_lifted cenv vars) te tm'
/\ match_envs j' cenv e (create_undef_temps temps) m' (Mem.nextblock m) (Mem.nextblock m')
te (create_undef_temps (add_lifted cenv vars temps)) (Mem.nextblock tm) (Mem.nextblock tm')
/\ Mem.inject j' m' tm'
/\ inject_incr j j'
/\ (forall b, Mem.valid_block m b -> j' b = j b)
/\ (forall b b' delta, j' b = Some(b', delta) -> Mem.valid_block tm b' -> j' b = j b)
/\ (forall id ty, In (id, ty) vars -> VSet.mem id cenv = false -> exists b, te!id = Some(b, ty)).