Module Type NSubProp (Import N : NAxiomsMiniSig').
Include NMulOrderProp N.
(* This could be proved by adding m to both sides. Then the proof would use add_sub_assoc and sub_0_le, which is proven below. *)
(** Sub and order *)
(** Unfortunately, we do not have [n < m + p -> n - p < m]. For instance [1<0+2] but not [1-2<0]. *)
(** Unfortunately, we do not have [n <= m - p -> n + p <= m]. For instance [0<=1-2] but not [2+0<=1]. *)
(** Sub and mul *)
(** Alternative definitions of [<=] and [<] based on [+] *)
Definition le_alt n m := exists p, p + n == m.
Definition lt_alt n m := exists p, S p + n == m.
Instance le_alt_wd : Proper (eq==>eq==>iff) le_alt.
Instance lt_alt_wd : Proper (eq==>eq==>iff) lt_alt.
(** With these alternative definition, the dichotomy:  [forall n m, n <= m \/ m <= n]  becomes:  [forall n m, (exists p, p + n == m) \/ (exists p, p + m == n)]  We will need this in the proof of induction principle for integers constructed as pairs of natural numbers. This formula can be proved from know properties of [<=]. However, it can also be done directly. *)

Theorem add_dichotomy :
forall n m, (exists p, p + n == m) \/ (exists p, p + m == n).