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) *)
(************************************************************************)
Strict order on natural numbers.
This file is mostly OBSOLETE now, see module PeanoNat.Nat instead.
lt is defined in library Init/Peano.v as:
Definition lt (n m:nat) := S n <= m. Infix "<" := lt : nat_scope.
Require Import PeanoNat. Local Open Scope nat_scope.
Notation lt_irrefl := Nat.lt_irrefl (only parsing). (* ~ x < x *) Hint Resolve lt_irrefl: arith.
n, m:natn < m -> S n <= mapply Nat.le_succ_l. Qed.n, m:natn < m -> S n <= mn, m:natn < S m -> n <= mapply Nat.lt_succ_r. Qed.n, m:natn < S m -> n <= mn, m:natn <= m -> n < S mapply Nat.lt_succ_r. Qed. Hint Immediate lt_le_S: arith. Hint Immediate lt_n_Sm_le: arith. Hint Immediate le_lt_n_Sm: arith.n, m:natn <= m -> n < S mn, m:natn <= m -> ~ m < napply Nat.le_ngt. Qed.n, m:natn <= m -> ~ m < nn, m:natn < m -> ~ m <= napply Nat.lt_nge. Qed. Hint Immediate le_not_lt lt_not_le: arith.n, m:natn < m -> ~ m <= n
Notation lt_asym := Nat.lt_asymm (only parsing). (* n<m -> ~m<n *)
Notation lt_0_Sn := Nat.lt_0_succ (only parsing). (* 0 < S n *) Notation lt_n_0 := Nat.nlt_0_r (only parsing). (* ~ n < 0 *)n:nat0 <> n -> 0 < nn:nat0 <> n -> 0 < nnow apply Nat.neq_0_lt_0, Nat.neq_sym. Qed.n:natH:0 <> n0 < nn:nat0 < n -> 0 <> nn:nat0 < n -> 0 <> nnow apply Nat.neq_sym, Nat.neq_0_lt_0. Qed. Hint Resolve lt_0_Sn lt_n_0 : arith. Hint Immediate neq_0_lt lt_0_neq: arith.n:natH:0 < n0 <> n
Notation lt_n_Sn := Nat.lt_succ_diag_r (only parsing). (* n < S n *) Notation lt_S := Nat.lt_lt_succ_r (only parsing). (* n < m -> n < S m *)n, m:natn < m -> S n < S mapply Nat.succ_lt_mono. Qed.n, m:natn < m -> S n < S mn, m:natS n < S m -> n < mapply Nat.succ_lt_mono. Qed. Hint Resolve lt_n_Sn lt_S lt_n_S : arith. Hint Immediate lt_S_n : arith.n, m:natS n < S m -> n < m
n, m:natm < n -> n = S (Init.Nat.pred n)n, m:natm < n -> n = S (Init.Nat.pred n)n, m:natH:m < nn = S (Init.Nat.pred n)now apply Nat.lt_succ_pred with m. Qed.n, m:natH:m < nS (Init.Nat.pred n) = nn:nat0 < n -> n = S (Init.Nat.pred n)apply S_pred. Qed.n:nat0 < n -> n = S (Init.Nat.pred n)n, m:natS n < m -> n < Init.Nat.pred mapply Nat.lt_succ_lt_pred. Qed.n, m:natS n < m -> n < Init.Nat.pred mn:nat0 < n -> Init.Nat.pred n < nn:nat0 < n -> Init.Nat.pred n < nnow apply Nat.lt_pred_l, Nat.neq_0_lt_0. Qed. Hint Immediate lt_pred: arith. Hint Resolve lt_pred_n_n: arith.n:natH:0 < nInit.Nat.pred n < n
Notation lt_trans := Nat.lt_trans (only parsing). Notation lt_le_trans := Nat.lt_le_trans (only parsing). Notation le_lt_trans := Nat.le_lt_trans (only parsing). Hint Resolve lt_trans lt_le_trans le_lt_trans: arith.
Notation le_lt_or_eq_iff := Nat.lt_eq_cases (only parsing).n, m:natn <= m -> n < m \/ n = mapply Nat.lt_eq_cases. Qed. Notation lt_le_weak := Nat.lt_le_incl (only parsing). Hint Immediate lt_le_weak: arith.n, m:natn <= m -> n < m \/ n = m
Notation le_or_lt := Nat.le_gt_cases (only parsing). (* n <= m \/ m < n *)n, m:natn <> m -> n < m \/ m < napply Nat.lt_gt_cases. Qed. (* begin hide *) Notation lt_O_Sn := lt_0_Sn (only parsing). Notation neq_O_lt := neq_0_lt (only parsing). Notation lt_O_neq := lt_0_neq (only parsing). Notation lt_n_O := lt_n_0 (only parsing). (* end hide *)n, m:natn <> m -> n < m \/ m < n
For compatibility, we "Require" the same files as before
Require Import Le.