Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq Development Team       *)
(*  v      *   INRIA, CNRS and contributors - Copyright 1999-2018       *)
(* <O___,, *       (see CREDITS file for the list of authors)           *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(*                      Evgeny Makarov, INRIA, 2007                     *)
(************************************************************************)

Require Export ZMul.

Module ZOrderProp (Import Z : ZAxiomsMiniSig').
Include ZMulProp Z.
Instances of earlier theorems for m == 0

forall n : t, n ~= 0 <-> n < 0 \/ 0 < n

forall n : t, n ~= 0 <-> n < 0 \/ 0 < n
intro; apply lt_gt_cases. Qed.

forall n : t, n <= 0 \/ 0 < n

forall n : t, n <= 0 \/ 0 < n
intro; apply le_gt_cases. Qed.

forall n : t, n < 0 \/ 0 <= n

forall n : t, n < 0 \/ 0 <= n
intro; apply lt_ge_cases. Qed.

forall n : t, n <= 0 \/ 0 <= n

forall n : t, n <= 0 \/ 0 <= n
intro; apply le_ge_cases. Qed. Ltac zinduct n := induction_maker n ltac:(apply order_induction_0).
Theorems that are either not valid on N or have different proofs on N and Z

forall n : t, P n < n

forall n : t, P n < n
intro n; rewrite <- (succ_pred n) at 2; apply lt_succ_diag_r. Qed.

forall n : t, P n <= n

forall n : t, P n <= n
intro; apply lt_le_incl; apply lt_pred_l. Qed.

forall n m : t, n < m <-> n <= P m

forall n m : t, n < m <-> n <= P m
n, m:t

n < S (P m) <-> n <= P m
apply lt_succ_r. Qed.

forall n : t, ~ n <= P n

forall n : t, ~ n <= P n
intro; rewrite <- lt_le_pred; apply lt_irrefl. Qed.

forall n m : t, P n < m <-> n <= m

forall n m : t, P n < m <-> n <= m
n, m:t

P n < m <-> S (P n) <= m
symmetry; apply le_succ_l. Qed.

forall n m : t, n < m -> P n < m

forall n m : t, n < m -> P n < m
intros; apply lt_pred_le; now apply lt_le_incl. Qed.

forall n m : t, n <= m -> P n <= m

forall n m : t, n <= m -> P n <= m
intros; apply lt_le_incl; now apply lt_pred_le. Qed.

forall n m : t, n < P m -> n < m

forall n m : t, n < P m -> n < m
intros n m H; apply lt_trans with (P m); [assumption | apply lt_pred_l]. Qed.

forall n m : t, n <= P m -> n <= m

forall n m : t, n <= P m -> n <= m
intros; apply lt_le_incl; now apply lt_le_pred. Qed.

forall n m : t, n < m <-> P n < P m

forall n m : t, n < m <-> P n < P m
intros; rewrite lt_le_pred; symmetry; apply lt_pred_le. Qed.

forall n m : t, n <= m <-> P n <= P m

forall n m : t, n <= m <-> P n <= P m
intros; rewrite <- lt_pred_le; now rewrite lt_le_pred. Qed.

forall n m : t, S n < m <-> n < P m

forall n m : t, S n < m <-> n < P m
intros n m; now rewrite (pred_lt_mono (S n) m), pred_succ. Qed.

forall n m : t, S n <= m <-> n <= P m

forall n m : t, S n <= m <-> n <= P m
intros n m; now rewrite (pred_le_mono (S n) m), pred_succ. Qed.

forall n m : t, P n < m <-> n < S m

forall n m : t, P n < m <-> n < S m
intros; rewrite lt_pred_le; symmetry; apply lt_succ_r. Qed.

forall n m : t, P n <= m <-> n <= S m

forall n m : t, P n <= m <-> n <= S m
intros n m; now rewrite (pred_le_mono n (S m)), pred_succ. Qed.

forall n : t, P n ~= n

forall n : t, P n ~= n
intro; apply lt_neq; apply lt_pred_l. Qed.

forall n m : t, n < m -> m < 0 -> n < -1

forall n m : t, n < m -> m < 0 -> n < -1
n, m:t
H1:n < m
H2:m < 0

n < -1
n, m:t
H1:n < m
H2:m <= P 0

n < -1
n, m:t
H1:n < m
H2:m <= -1

n < -1
n, m:t
H1:n < m
H2:m <= P 0
P 0 == -1
n, m:t
H1:n < m
H2:m <= P 0

P 0 == -1
n, m:t
H1:n < m
H2:m <= P 0

- P 0 == 1
now rewrite one_succ, opp_pred, opp_0. Qed. End ZOrderProp.