destruct rho.
unfold finite_idfun, finMap in *.
generalize f; intros [l ?].
exists l; simpl in *.
intros; unfold compose in *.
apply e; auto.
Qed.

(* Specifications: *)
Lemma env_ext: forall rho1 rho2, env_get rho1 = env_get rho2 -> rho1=rho2.
Lemma env_funct: forall rho1 rho2,
rho1 = rho2 -> forall id sh1 sh2 v1 v2, env_get rho1 id = Some(sh1, v1)
-> env_get rho2 id = Some(sh2, v2)
-> v1 = v2.
Lemma finite_idfun_empty: finite_idfun (fun _ => None).
Definition empty_env : env := mk_env _ finite_idfun_empty.
Lemma env_get_empty: forall id, env_get empty_env id = None.
Instance Join_env: Join env :=
fun (rho1 rho2 rho3: env) => join (env_get rho1) (env_get rho2) (env_get rho3).
Lemma Join_env_eq: Join_env = Join_fpm (Join_prod _ Join_pshare _ JA).
Instance Perm_env {PA: Perm_alg A}: @Perm_alg env Join_env.