(** The option separation algebra.  The bool sepalg is isomorphic
     to the option sepalg applied to units. *)

 Instance Perm_option (T : Type)  : @Perm_alg (option T) (@Join_lower T (@Join_discrete T)) :=
    @Perm_lower T  (@Join_discrete T) (Perm_discrete T).Instance Sep_option (T: Type) : @Sep_alg (option T) (@Join_lower T (@Join_discrete T)) :=
    @Sep_lower T  (@Join_discrete T) .(** Often, once we have a Pos_alg, we want to product it with regular
    sepalgs to produce another Pos_alg, before lowering the product. *)

Instance Pos_prod
        (A: Type) {J_A: Join A} {Pos_A: Pos_alg A}
        (B: Type) {J_B: Join B}{PA_B: Perm_alg B}: 
        Pos_alg (A*B).Definition finMap (f:A -> Rng) : Prop :=
    exists l, forall a:A, ~In a l -> f a = None.

Lemma finMap_join : forall x y z, @join _ (Join_fun A _ Join_Rng) x y z -> finMap x -> finMap y -> finMap z.