Section SA_LOWER.
Variable A : Type.
Variable Pj_A: Join A.
Variable PA_A : Perm_alg A.
Inductive lower_join: option A -> option A -> option A -> Prop :=
| lower_None1: forall a, lower_join None a a
| lower_None2: forall a, lower_join a None a
| lower_Some: forall a1 a2 a3,  join a1 a2 a3 ->
lower_join (Some a1) (Some a2) (Some a3).
Instance Join_lower: Join (option A) := lower_join.
Instance Perm_lower: @Perm_alg (option A) Join_lower.
Instance Sep_lower: @Sep_alg _ Join_lower.
Instance Disj_lower {psa_A: Pos_alg A}{DA: Disj_alg A}: @Disj_alg _ Join_lower.
End SA_LOWER.
Arguments Perm_lower _ {Pj_A}{PA_A}.
Arguments Sep_lower _ {Pj_A}.
Arguments Sing_lower _ {Pj_A}.
Arguments Canc_lower _ [Pj_A][psa_A][CA] _ _ _ _ _ _.
Arguments Disj_lower _ [Pj_A][PA_A][psa_A][DA] _ _ _.
Existing Instance Join_lower.  (* Must not be inside a Section *)
Existing Instance Perm_lower.
Existing Instance Sep_lower.
Existing Instance Sing_lower.
Existing Instance Canc_lower.
Existing Instance Disj_lower.
(* General facts about lowering *)
Hint Resolve @None_unit : core.
Hint Resolve @None_identity : core.

Lemma lower_inv: forall {A}{JA: Join A} {PA: Perm_alg A} {psa_A: Pos_alg A} (a b c : option A),
join a b c ->
(a = None /\ b = c) + (a = c /\ b = None) +
({a' : A & {b' : A & {c' : A | a = Some a' /\ b = Some b' /\ c = Some c' /\
join a' b' c'}}}).