1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: Gt.v 9245 2006-10-17 12:53:34Z notin $ i*)
11
(** Theorems about [gt] in [nat]. [gt] is defined in [Init/Peano.v] as:
13
Definition gt (n m:nat) := m < n.
20
Open Local Scope nat_scope.
22
Implicit Types m n p : nat.
24
(** * Order and successor *)
26
Theorem gt_Sn_O : forall n, S n > 0.
30
Hint Resolve gt_Sn_O: arith v62.
32
Theorem gt_Sn_n : forall n, S n > n.
36
Hint Resolve gt_Sn_n: arith v62.
38
Theorem gt_n_S : forall n m, n > m -> S n > S m.
42
Hint Resolve gt_n_S: arith v62.
44
Lemma gt_S_n : forall n m, S m > S n -> m > n.
48
Hint Immediate gt_S_n: arith v62.
50
Theorem gt_S : forall n m, S n > m -> n > m \/ m = n.
52
intros n m H; unfold gt in |- *; apply le_lt_or_eq; auto with arith.
55
Lemma gt_pred : forall n m, m > S n -> pred m > n.
59
Hint Immediate gt_pred: arith v62.
61
(** * Irreflexivity *)
63
Lemma gt_irrefl : forall n, ~ n > n.
65
Hint Resolve gt_irrefl: arith v62.
69
Lemma gt_asym : forall n m, n > m -> ~ m > n.
70
Proof fun n m => lt_asym m n.
72
Hint Resolve gt_asym: arith v62.
74
(** * Relating strict and large orders *)
76
Lemma le_not_gt : forall n m, n <= m -> ~ n > m.
78
Hint Resolve le_not_gt: arith v62.
80
Lemma gt_not_le : forall n m, n > m -> ~ n <= m.
85
Hint Resolve gt_not_le: arith v62.
87
Theorem le_S_gt : forall n m, S n <= m -> m > n.
91
Hint Immediate le_S_gt: arith v62.
93
Lemma gt_S_le : forall n m, S m > n -> n <= m.
95
intros n p; exact (lt_n_Sm_le n p).
97
Hint Immediate gt_S_le: arith v62.
99
Lemma gt_le_S : forall n m, m > n -> S n <= m.
103
Hint Resolve gt_le_S: arith v62.
105
Lemma le_gt_S : forall n m, n <= m -> S m > n.
109
Hint Resolve le_gt_S: arith v62.
111
(** * Transitivity *)
113
Theorem le_gt_trans : forall n m p, m <= n -> m > p -> n > p.
115
red in |- *; intros; apply lt_le_trans with m; auto with arith.
118
Theorem gt_le_trans : forall n m p, n > m -> p <= m -> n > p.
120
red in |- *; intros; apply le_lt_trans with m; auto with arith.
123
Lemma gt_trans : forall n m p, n > m -> m > p -> n > p.
125
red in |- *; intros n m p H1 H2.
126
apply lt_trans with m; auto with arith.
129
Theorem gt_trans_S : forall n m p, S n > m -> m > p -> n > p.
131
red in |- *; intros; apply lt_le_trans with m; auto with arith.
134
Hint Resolve gt_trans_S le_gt_trans gt_le_trans: arith v62.
136
(** * Comparison to 0 *)
138
Theorem gt_O_eq : forall n, n > 0 \/ 0 = n.
140
intro n; apply gt_S; auto with arith.
143
(** * Simplification and compatibility *)
145
Lemma plus_gt_reg_l : forall n m p, p + n > p + m -> n > m.
147
red in |- *; intros n m p H; apply plus_lt_reg_l with p; auto with arith.
150
Lemma plus_gt_compat_l : forall n m p, n > m -> p + n > p + m.
154
Hint Resolve plus_gt_compat_l: arith v62.
b'\\ No newline at end of file'