Definition po_natPlus_R: PreOrder (@Krelation _ natPlus_R) :=
lep_preorder.
Definition sumpAlg: @SeparationAlgebra _ sump_Join.
(* it is NOT upwards-closed*)
Instance sumpAlg_uSA:
@UpwardsClosedSeparationAlgebra _ natPlus_R sump_Join.
(*it is NOT Residual*)
Instance sumpAlg_residual:
@ResidualSeparationAlgebra _ natPlus_R sump_Join.
(* upwards-closed*)
Instance suminvAlg_uSA:
@UpwardsClosedSeparationAlgebra _ nat_leR sum_Join.
(* downwards-closed*)
Instance suminvAlg_dSA:
@DownwardsClosedSeparationAlgebra _ nat_leR sum_Join.
(*Residual*)
Instance suminvAlg_increasing:
@IncreasingSeparationAlgebra _ nat_leR sum_Join.
(*Residual*)
Instance suminvAlg_residual:
@ResidualSeparationAlgebra _ nat_leR sum_Join.
(* Unital *)
Instance suminvAlg_unital:
@UnitalSeparationAlgebra _ nat_leR sum_Join.
End nat_algs.
(***********************************)
(* ALGEBRAS ON RATIONALS           *)
(***********************************)
(*Require Import Coq.Reals.Rdefinitions.*)
(*Q overloads <= !*)
(** *Minimum Algebra on Positive rationals*)
(* Record QPlus: Type:= qp { q_p:> Q; qis_pos: (0 < q_p)}.   Inductive sumqp_Join: QPlus -> QPlus -> QPlus -> Prop:= |sumqp_j (x y z:QPlus): (x + y) = z -> sumqp_Join x y z.  Definition leqp (n m:QPlus):= (n <= m). Lemma leqp_preorder: RelationClasses.PreOrder leqp.  Definition QPlus_kiM: KripkeIntuitionisticModel QPlus:= Build_KripkeIntuitionisticModel _ _ leqp_preorder.  Definition qpAlg: @SeparationAlgebra _ sumqp_Join.  (* it is NOT upwards-closed*)
Instance sumqpAlg_dSA:
@UpwardsClosedSeparationAlgebra _ sumqp_Join QPlus_kiM.
(*it is NOT Residual*)
Instance sumpAlg_residual:
@ResidualSeparationAlgebra _ natPlus_kiM sump_Join.
(*Downwards-closed*)
Instance discHeap_dSA:
@DownwardsClosedSeparationAlgebra Heap discHeap_R Heap_Join.

(* Specifications: *)
(*Empty heap is increasing element*)
Lemma discHeap_empty_increasing:
@increasing Heap discHeap_R Heap_Join (fun _ => None).