~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to theories/Arith/Gt.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
(************************************************************************)
 
8
 
 
9
(*i $Id: Gt.v 9245 2006-10-17 12:53:34Z notin $ i*)
 
10
 
 
11
(** Theorems about [gt] in [nat]. [gt] is defined in [Init/Peano.v] as:
 
12
<<
 
13
Definition gt (n m:nat) := m < n.
 
14
>>
 
15
*)
 
16
 
 
17
Require Import Le.
 
18
Require Import Lt.
 
19
Require Import Plus.
 
20
Open Local Scope nat_scope.
 
21
 
 
22
Implicit Types m n p : nat.
 
23
 
 
24
(** * Order and successor *)
 
25
 
 
26
Theorem gt_Sn_O : forall n, S n > 0.
 
27
Proof.
 
28
  auto with arith.
 
29
Qed.
 
30
Hint Resolve gt_Sn_O: arith v62.
 
31
 
 
32
Theorem gt_Sn_n : forall n, S n > n.
 
33
Proof.
 
34
  auto with arith.
 
35
Qed.
 
36
Hint Resolve gt_Sn_n: arith v62.
 
37
 
 
38
Theorem gt_n_S : forall n m, n > m -> S n > S m.
 
39
Proof.
 
40
  auto with arith.
 
41
Qed.
 
42
Hint Resolve gt_n_S: arith v62.
 
43
 
 
44
Lemma gt_S_n : forall n m, S m > S n -> m > n.
 
45
Proof.
 
46
  auto with arith.
 
47
Qed.
 
48
Hint Immediate gt_S_n: arith v62.
 
49
 
 
50
Theorem gt_S : forall n m, S n > m -> n > m \/ m = n.
 
51
Proof.
 
52
  intros n m H; unfold gt in |- *; apply le_lt_or_eq; auto with arith.
 
53
Qed.
 
54
 
 
55
Lemma gt_pred : forall n m, m > S n -> pred m > n.
 
56
Proof.
 
57
  auto with arith.
 
58
Qed.
 
59
Hint Immediate gt_pred: arith v62.
 
60
 
 
61
(** * Irreflexivity *)
 
62
 
 
63
Lemma gt_irrefl : forall n, ~ n > n.
 
64
Proof lt_irrefl.
 
65
Hint Resolve gt_irrefl: arith v62.
 
66
 
 
67
(** * Asymmetry *)
 
68
 
 
69
Lemma gt_asym : forall n m, n > m -> ~ m > n.
 
70
Proof fun n m => lt_asym m n.
 
71
 
 
72
Hint Resolve gt_asym: arith v62.
 
73
 
 
74
(** * Relating strict and large orders *)
 
75
 
 
76
Lemma le_not_gt : forall n m, n <= m -> ~ n > m.
 
77
Proof le_not_lt.
 
78
Hint Resolve le_not_gt: arith v62.
 
79
 
 
80
Lemma gt_not_le : forall n m, n > m -> ~ n <= m.
 
81
Proof.
 
82
auto with arith.
 
83
Qed.
 
84
 
 
85
Hint Resolve gt_not_le: arith v62.
 
86
 
 
87
Theorem le_S_gt : forall n m, S n <= m -> m > n.
 
88
Proof.
 
89
  auto with arith.
 
90
Qed.
 
91
Hint Immediate le_S_gt: arith v62.
 
92
 
 
93
Lemma gt_S_le : forall n m, S m > n -> n <= m.
 
94
Proof.
 
95
  intros n p; exact (lt_n_Sm_le n p).
 
96
Qed.
 
97
Hint Immediate gt_S_le: arith v62.
 
98
 
 
99
Lemma gt_le_S : forall n m, m > n -> S n <= m.
 
100
Proof.
 
101
  auto with arith.
 
102
Qed.
 
103
Hint Resolve gt_le_S: arith v62.
 
104
 
 
105
Lemma le_gt_S : forall n m, n <= m -> S m > n.
 
106
Proof.
 
107
  auto with arith.
 
108
Qed.
 
109
Hint Resolve le_gt_S: arith v62.
 
110
 
 
111
(** * Transitivity *)
 
112
 
 
113
Theorem le_gt_trans : forall n m p, m <= n -> m > p -> n > p.
 
114
Proof.
 
115
  red in |- *; intros; apply lt_le_trans with m; auto with arith.
 
116
Qed.
 
117
 
 
118
Theorem gt_le_trans : forall n m p, n > m -> p <= m -> n > p.
 
119
Proof.
 
120
  red in |- *; intros; apply le_lt_trans with m; auto with arith.
 
121
Qed.
 
122
 
 
123
Lemma gt_trans : forall n m p, n > m -> m > p -> n > p.
 
124
Proof.
 
125
  red in |- *; intros n m p H1 H2.
 
126
  apply lt_trans with m; auto with arith.
 
127
Qed.
 
128
 
 
129
Theorem gt_trans_S : forall n m p, S n > m -> m > p -> n > p.
 
130
Proof.
 
131
  red in |- *; intros; apply lt_le_trans with m; auto with arith.
 
132
Qed.
 
133
 
 
134
Hint Resolve gt_trans_S le_gt_trans gt_le_trans: arith v62.
 
135
 
 
136
(** * Comparison to 0 *)
 
137
 
 
138
Theorem gt_O_eq : forall n, n > 0 \/ 0 = n.
 
139
Proof.
 
140
  intro n; apply gt_S; auto with arith.
 
141
Qed.
 
142
 
 
143
(** * Simplification and compatibility *)
 
144
 
 
145
Lemma plus_gt_reg_l : forall n m p, p + n > p + m -> n > m.
 
146
Proof.
 
147
  red in |- *; intros n m p H; apply plus_lt_reg_l with p; auto with arith.
 
148
Qed.
 
149
 
 
150
Lemma plus_gt_compat_l : forall n m p, n > m -> p + n > p + m.
 
151
Proof.
 
152
  auto with arith.
 
153
Qed.
 
154
Hint Resolve plus_gt_compat_l: arith v62.
 
 
b'\\ No newline at end of file'