(** The "smash" sepalg generator is the direct composition of lift and lower.  In previous versions of MSL (v0.3 and earlier) this was called "lift" and was constructed directly *)
Section SA_SMASH.
Variable T : Type.
Variable J_T: Join T.
Variable PA_T : Perm_alg T.
Definition smashed : Type := option (lifted J_T).
Definition Perm_smash :  Perm_alg smashed  := Perm_lower (lifted J_T).
Definition Sep_smash : Sep_alg smashed := Sep_lower (lifted J_T).

Lemma smash_inv: forall a b c : smashed,
join a b c ->
(a = None /\ b = c) + (a = c /\ b = None) +
({a' : lifted J_T & {b' : lifted J_T & {c' : lifted J_T | a = Some a' /\ b = Some b' /\ c = Some c' /\
join (lifted_obj a') (lifted_obj b') (lifted_obj c')}}}).