Module BarebonesLogic <: VERISTAR_LOGIC.
Definition loc := loc.
Instance Join_loc : Join loc := @Join_equiv _.
Instance Perm_loc : Perm_alg loc := _.
Instance Sep_loc : Sep_alg loc := _.
Instance Canc_loc : Canc_alg loc := _.
Instance Join_nat : Join nat := @Join_discrete _.
Instance Pos_nat : @Pos_alg nat (@Join_discrete _) := @psa_discrete _.
Instance Canc_nat : @Canc_alg nat Join_nat.
unfold Canc_alg; intros ? ? ? ? H; inv H.
Qed.
Definition val := val.
Instance Join_val : Join val := Join_lower Join_nat.
Instance Perm_val : Perm_alg val := _.
Instance Sep_val : Sep_alg val := _.
Instance Canc_val : Canc_alg val := @Canc_lower _ _ _ Canc_nat.
repeat intro. inv H; auto. Qed.
Hint Resolve identity_None.
Definition val2loc (v: val) : option loc :=
match v with Some (S n) => Some (S n) | _ => None end.
Definition nil_val : val := Some O.

Lemma nil_not_loc: val2loc nil_val = None.