(***********************************)
(* Separation Algebra Generators   *)
(***********************************)
Section trivialSA.
Context {worlds: Type}.
Definition trivial_Join: Join worlds:=  (fun a b c => False).
Definition trivial_SA: @SeparationAlgebra worlds trivial_Join.
(* Trivial algebra is upwards closed *)
(* Trivial is NOT downwards closed *)
Definition trivial_uSA {R: Relation worlds}:
@UpwardsClosedSeparationAlgebra worlds R (trivial_Join).
(*Increasing*)
Definition trivial_incrSA: @IncreasingSeparationAlgebra
worlds eq trivial_Join.
(*Trivial is NOT necessarily unital*)
(*Trivial is NOT necessarily residual*)
End trivialSA.
Section unitSA.
Definition unit_Join: Join unit:=  (fun _ _ _ => True).
Definition unit_SA: @SeparationAlgebra unit unit_Join.
(* Unit algebra is upwards closed *)
Definition unit_uSA:
@UpwardsClosedSeparationAlgebra unit eq unit_Join.
(* Unit algebra is downwards closed *)
Definition unit_dSA:
@DownwardsClosedSeparationAlgebra unit eq unit_Join.
(*Increasing*)
Instance unit_incrSA:
@IncreasingSeparationAlgebra unit eq unit_Join.
Instance unit_residual:
@ResidualSeparationAlgebra unit eq unit_Join.
Definition unit_unital:
@UnitalSeparationAlgebra unit eq unit_Join.
End unitSA.
Section equivSA.
Context {worlds: Type}.
Definition equiv_Join: Join worlds:=  (fun a b c => a = c /\ b = c).
Definition equiv_SA: @SeparationAlgebra worlds equiv_Join.
(* Identity algebra is upwards closed *)
(* Identity is NOT downwards closed *)
Definition identity_uSA {R: Relation worlds}:
@UpwardsClosedSeparationAlgebra worlds R equiv_Join.
Definition equiv_incrSA: @IncreasingSeparationAlgebra
worlds eq equiv_Join.
Definition ikiM_uSA {R: Relation worlds} {po_R: PreOrder Krelation} {ikiM: IdentityKripkeIntuitionisticModel worlds} {J: Join worlds}: UpwardsClosedSeparationAlgebra worlds.
Definition ikiM_dSA {R: Relation worlds} {po_R: PreOrder Krelation} {ikiM: IdentityKripkeIntuitionisticModel worlds} {J: Join worlds}: DownwardsClosedSeparationAlgebra worlds.
(*Identity is NOT necessarily increasing*)
(*Identity is NOT necessarily unital*)
(*Identity is NOT necessarily residual*)
End equivSA.
Section optionSA.
Context (worlds: Type).
Inductive option_join {J: Join worlds}: option worlds -> option worlds -> option worlds -> Prop :=
| None_None_join: option_join None None None
| None_Some_join: forall a, option_join None (Some a) (Some a)
| Some_None_join: forall a, option_join (Some a) None (Some a)
| Some_Some_join: forall a b c, join a b c -> option_join (Some a) (Some b) (Some c).
Definition option_Join {SA: Join worlds}: Join (option worlds):=
(@option_join SA).
Definition option_SA
{J: Join worlds}
{SA: SeparationAlgebra worlds}:
@SeparationAlgebra (option worlds) (option_Join).

Lemma option_disj_incr_None
{R: Relation worlds}
{po_R: PreOrder Krelation}
{J: Join worlds}
{SA: SeparationAlgebra worlds}:
@increasing (option worlds) (option00_relation Krelation) option_Join None.