Section nat_algs.
Definition nat_leR: Relation nat := le.
Definition nat_geR: Relation nat := ge.
Instance po_nat_leR: PreOrder (@Krelation _ nat_leR) := Nat.le_preorder.
Instance po_nat_geR: PreOrder (@Krelation _ nat_geR).
Definition indexAlg: @SeparationAlgebra nat equiv_Join.
(* Increasing*)
Instance IndexAlg_increasing:
@IncreasingSeparationAlgebra _ nat_geR equiv_Join.
(* Residual*)
Instance IndexAlg_residual:
@ResidualSeparationAlgebra _ nat_geR equiv_Join.
(* Unital *)
Instance IndexAlg_unital:
@UnitalSeparationAlgebra _ nat_geR equiv_Join.
(* Minimum Algebra *)
Inductive min_Join: nat -> nat -> nat -> Prop:=
| min_j x y z: z <= x -> z <= y -> min_Join x y z.
Definition minAlg: @SeparationAlgebra nat min_Join.
(* upwards-closed *)
Instance minAlg_uSA:
@UpwardsClosedSeparationAlgebra _ nat_geR min_Join.
(* downwards-closed *)
Instance minAlg_dSA:
@DownwardsClosedSeparationAlgebra _ nat_geR min_Join.
(* Increasing *)
Instance minAlg_increasing:
@IncreasingSeparationAlgebra _ nat_geR min_Join.
(*Residual*)
Instance minAlg_residual:
@ResidualSeparationAlgebra _ nat_geR min_Join.
(* Unital *)
Instance minAlg_unital:
@UnitalSeparationAlgebra _ nat_geR min_Join.
(** *Sum Algebra on NAT*)
Inductive sum_Join: nat -> nat -> nat -> Prop:=
|sum_j x y z: x + y = z -> sum_Join x y z.
Definition sumAlg: @SeparationAlgebra _ sum_Join.
(* upwards-closed*)
Instance sumAlg_uSA:
@UpwardsClosedSeparationAlgebra _ nat_geR sum_Join.
(* downwards-closed*)
Instance sumAlg_dSA:
@DownwardsClosedSeparationAlgebra _ nat_geR sum_Join.

Lemma sumAlg_zero_decreasing_only:
forall x,
@increasing nat nat_geR sum_Join x -> x = 0.