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.
(* Unital *)
Instance sumAlg_unital:
@UnitalSeparationAlgebra _ nat_geR sum_Join.
(*Residual*)
Instance sumAlg_residual:
@ResidualSeparationAlgebra _ nat_geR sum_Join.
(** *Minimum Algebra on Positive integers*)
Record natPlus: Type:=
natp { nat_p:> nat;
is_pos: 0 < nat_p}.
Inductive sump_Join: natPlus -> natPlus -> natPlus -> Prop:=
|sump_j (x y z:natPlus): x + y = z -> sump_Join x y z.
Definition lep (n m:natPlus):= n <= m.

Lemma lep_preorder: RelationClasses.PreOrder lep.