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

« back to all changes in this revision

Viewing changes to contrib/micromega/OrderedRing.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
(*                      Evgeny Makarov, INRIA, 2007                     *)
 
9
(************************************************************************)
 
10
 
 
11
Require Import Setoid.
 
12
Require Import Ring.
 
13
 
 
14
(** Generic properties of ordered rings on a setoid equality *)
 
15
 
 
16
Set Implicit Arguments.
 
17
 
 
18
Module Import OrderedRingSyntax.
 
19
Export RingSyntax.
 
20
 
 
21
Reserved Notation "x ~= y" (at level 70, no associativity).
 
22
Reserved Notation "x [=] y" (at level 70, no associativity).
 
23
Reserved Notation "x [~=] y" (at level 70, no associativity).
 
24
Reserved Notation "x [<] y" (at level 70, no associativity).
 
25
Reserved Notation "x [<=] y" (at level 70, no associativity).
 
26
End OrderedRingSyntax.
 
27
 
 
28
Section DEFINITIONS.
 
29
 
 
30
Variable R : Type.
 
31
Variable (rO rI : R) (rplus rtimes rminus: R -> R -> R) (ropp : R -> R).
 
32
Variable req rle rlt : R -> R -> Prop.
 
33
Notation "0" := rO.
 
34
Notation "1" := rI.
 
35
Notation "x + y" := (rplus x y).
 
36
Notation "x * y " := (rtimes x y).
 
37
Notation "x - y " := (rminus x y).
 
38
Notation "- x" := (ropp x).
 
39
Notation "x == y" := (req x y).
 
40
Notation "x ~= y" := (~ req x y).
 
41
Notation "x <= y" := (rle x y).
 
42
Notation "x < y" := (rlt x y).
 
43
 
 
44
Record SOR : Type := mk_SOR_theory {
 
45
  SORsetoid : Setoid_Theory R req;
 
46
  SORplus_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> x1 + y1 == x2 + y2;
 
47
  SORtimes_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> x1 * y1 == x2 * y2;
 
48
  SORopp_wd : forall x1 x2, x1 == x2 ->  -x1 == -x2;
 
49
  SORle_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> (x1 <= y1 <-> x2 <= y2);
 
50
  SORlt_wd : forall x1 x2, x1 == x2 -> forall y1 y2, y1 == y2 -> (x1 < y1 <-> x2 < y2);
 
51
  SORrt : ring_theory rO rI rplus rtimes rminus ropp req;
 
52
  SORle_refl : forall n : R, n <= n;
 
53
  SORle_antisymm : forall n m : R, n <= m -> m <= n -> n == m;
 
54
  SORle_trans : forall n m p : R, n <= m -> m <= p -> n <= p;
 
55
  SORlt_le_neq : forall n m : R, n < m <-> n <= m /\ n ~= m;
 
56
  SORlt_trichotomy : forall n m : R,  n < m \/ n == m \/ m < n;
 
57
  SORplus_le_mono_l : forall n m p : R, n <= m -> p + n <= p + m;
 
58
  SORtimes_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n * m;
 
59
  SORneq_0_1 : 0 ~= 1
 
60
}.
 
61
 
 
62
(* We cannot use Relation_Definitions.order.ord_antisym and
 
63
Relations_1.Antisymmetric because they refer to Leibniz equality *)
 
64
 
 
65
End DEFINITIONS.
 
66
 
 
67
Section STRICT_ORDERED_RING.
 
68
 
 
69
Variable R : Type.
 
70
Variable (rO rI : R) (rplus rtimes rminus: R -> R -> R) (ropp : R -> R).
 
71
Variable req rle rlt : R -> R -> Prop.
 
72
 
 
73
Variable sor : SOR rO rI rplus rtimes rminus ropp req rle rlt.
 
74
 
 
75
Notation "0" := rO.
 
76
Notation "1" := rI.
 
77
Notation "x + y" := (rplus x y).
 
78
Notation "x * y " := (rtimes x y).
 
79
Notation "x - y " := (rminus x y).
 
80
Notation "- x" := (ropp x).
 
81
Notation "x == y" := (req x y).
 
82
Notation "x ~= y" := (~ req x y).
 
83
Notation "x <= y" := (rle x y).
 
84
Notation "x < y" := (rlt x y).
 
85
 
 
86
 
 
87
Add Relation R req
 
88
  reflexivity proved by sor.(SORsetoid).(@Equivalence_Reflexive _ _ )
 
89
  symmetry proved by sor.(SORsetoid).(@Equivalence_Symmetric _ _ )
 
90
  transitivity proved by sor.(SORsetoid).(@Equivalence_Transitive _ _ )
 
91
as sor_setoid.
 
92
 
 
93
 
 
94
Add Morphism rplus with signature req ==> req ==> req as rplus_morph.
 
95
Proof.
 
96
exact sor.(SORplus_wd).
 
97
Qed.
 
98
Add Morphism rtimes with signature req ==> req ==> req as rtimes_morph.
 
99
Proof.
 
100
exact sor.(SORtimes_wd).
 
101
Qed.
 
102
Add Morphism ropp with signature req ==> req as ropp_morph.
 
103
Proof.
 
104
exact sor.(SORopp_wd).
 
105
Qed.
 
106
Add Morphism rle with signature req ==> req ==> iff as rle_morph.
 
107
Proof.
 
108
exact sor.(SORle_wd).
 
109
Qed.
 
110
Add Morphism rlt with signature req ==> req ==> iff as rlt_morph.
 
111
Proof.
 
112
exact sor.(SORlt_wd).
 
113
Qed.
 
114
 
 
115
Add Ring SOR : sor.(SORrt).
 
116
 
 
117
Add Morphism rminus with signature req ==> req ==> req as rminus_morph.
 
118
Proof.
 
119
intros x1 x2 H1 y1 y2 H2.
 
120
rewrite (sor.(SORrt).(Rsub_def) x1 y1).
 
121
rewrite (sor.(SORrt).(Rsub_def) x2 y2).
 
122
rewrite H1; now rewrite H2.
 
123
Qed.
 
124
 
 
125
Theorem Rneq_symm : forall n m : R, n ~= m -> m ~= n.
 
126
Proof.
 
127
intros n m H1 H2; rewrite H2 in H1; now apply H1.
 
128
Qed.
 
129
 
 
130
(* Propeties of plus, minus and opp *)
 
131
 
 
132
Theorem Rplus_0_l : forall n : R, 0 + n == n.
 
133
Proof.
 
134
intro; ring.
 
135
Qed.
 
136
 
 
137
Theorem Rplus_0_r : forall n : R, n + 0 == n.
 
138
Proof.
 
139
intro; ring.
 
140
Qed.
 
141
 
 
142
Theorem Rtimes_0_r : forall n : R, n * 0 == 0.
 
143
Proof.
 
144
intro; ring.
 
145
Qed.
 
146
 
 
147
Theorem Rplus_comm : forall n m : R, n + m == m + n.
 
148
Proof.
 
149
intros; ring.
 
150
Qed.
 
151
 
 
152
Theorem Rtimes_0_l : forall n : R, 0 * n == 0.
 
153
Proof.
 
154
intro; ring.
 
155
Qed.
 
156
 
 
157
Theorem Rtimes_comm : forall n m : R, n * m == m * n.
 
158
Proof.
 
159
intros; ring.
 
160
Qed.
 
161
 
 
162
Theorem Rminus_eq_0 : forall n m : R, n - m == 0 <-> n == m.
 
163
Proof.
 
164
intros n m.
 
165
split; intro H. setoid_replace n with ((n - m) + m) by ring. rewrite H. 
 
166
now rewrite Rplus_0_l.
 
167
rewrite H; ring.
 
168
Qed.
 
169
 
 
170
Theorem Rplus_cancel_l : forall n m p : R, p + n == p + m <-> n == m.
 
171
Proof.
 
172
intros n m p; split; intro H.
 
173
setoid_replace n with (- p + (p + n)) by ring.
 
174
setoid_replace m with (- p + (p + m)) by ring. now rewrite H.
 
175
now rewrite H.
 
176
Qed.
 
177
 
 
178
(* Relations *)
 
179
 
 
180
Theorem Rle_refl : forall n : R, n <= n.
 
181
Proof sor.(SORle_refl).
 
182
 
 
183
Theorem Rle_antisymm : forall n m : R, n <= m -> m <= n -> n == m.
 
184
Proof sor.(SORle_antisymm).
 
185
 
 
186
Theorem Rle_trans : forall n m p : R, n <= m -> m <= p -> n <= p.
 
187
Proof sor.(SORle_trans).
 
188
 
 
189
Theorem Rlt_trichotomy : forall n m : R,  n < m \/ n == m \/ m < n.
 
190
Proof sor.(SORlt_trichotomy).
 
191
 
 
192
Theorem Rlt_le_neq : forall n m : R, n < m <-> n <= m /\ n ~= m.
 
193
Proof sor.(SORlt_le_neq).
 
194
 
 
195
Theorem Rneq_0_1 : 0 ~= 1.
 
196
Proof sor.(SORneq_0_1).
 
197
 
 
198
Theorem Req_em : forall n m : R, n == m \/ n ~= m.
 
199
Proof.
 
200
intros n m. destruct (Rlt_trichotomy n m) as [H | [H | H]]; try rewrite Rlt_le_neq in H.
 
201
right; now destruct H.
 
202
now left.
 
203
right; apply Rneq_symm; now destruct H.
 
204
Qed.
 
205
 
 
206
Theorem Req_dne : forall n m : R, ~ ~ n == m <-> n == m.
 
207
Proof.
 
208
intros n m; destruct (Req_em n m) as [H | H].
 
209
split; auto.
 
210
split. intro H1; false_hyp H H1. auto.
 
211
Qed.
 
212
 
 
213
Theorem Rle_lt_eq : forall n m : R, n <= m <-> n < m \/ n == m.
 
214
Proof.
 
215
intros n m; rewrite Rlt_le_neq.
 
216
split; [intro H | intros [[H1 H2] | H]].
 
217
destruct (Req_em n m) as [H1 | H1]. now right. left; now split.
 
218
assumption.
 
219
rewrite H; apply Rle_refl.
 
220
Qed.
 
221
 
 
222
Ltac le_less := rewrite Rle_lt_eq; left; try assumption.
 
223
Ltac le_equal := rewrite Rle_lt_eq; right; try reflexivity; try assumption.
 
224
Ltac le_elim H := rewrite Rle_lt_eq in H; destruct H as [H | H].
 
225
 
 
226
Theorem Rlt_trans : forall n m p : R, n < m -> m < p -> n < p.
 
227
Proof.
 
228
intros n m p; repeat rewrite Rlt_le_neq; intros [H1 H2] [H3 H4]; split.
 
229
now apply Rle_trans with m.
 
230
intro H. rewrite H in H1. pose proof (Rle_antisymm H3 H1). now apply H4.
 
231
Qed.
 
232
 
 
233
Theorem Rle_lt_trans : forall n m p : R, n <= m -> m < p -> n < p.
 
234
Proof.
 
235
intros n m p H1 H2; le_elim H1.
 
236
now apply Rlt_trans with (m := m). now rewrite H1.
 
237
Qed.
 
238
 
 
239
Theorem Rlt_le_trans : forall n m p : R, n < m -> m <= p -> n < p.
 
240
Proof.
 
241
intros n m p H1 H2; le_elim H2.
 
242
now apply Rlt_trans with (m := m). now rewrite <- H2.
 
243
Qed.
 
244
 
 
245
Theorem Rle_gt_cases : forall n m : R, n <= m \/ m < n.
 
246
Proof.
 
247
intros n m; destruct (Rlt_trichotomy n m) as [H | [H | H]].
 
248
left; now le_less. left; now le_equal. now right.
 
249
Qed.
 
250
 
 
251
Theorem Rlt_neq : forall n m : R, n < m -> n ~= m.
 
252
Proof.
 
253
intros n m; rewrite Rlt_le_neq; now intros [_ H].
 
254
Qed.
 
255
 
 
256
Theorem Rle_ngt : forall n m : R, n <= m <-> ~ m < n.
 
257
Proof.
 
258
intros n m; split.
 
259
intros H H1; assert (H2 : n < n) by now apply Rle_lt_trans with m. now apply (Rlt_neq H2).
 
260
intro H. destruct (Rle_gt_cases n m) as [H1 | H1]. assumption. false_hyp H1 H.
 
261
Qed.
 
262
 
 
263
Theorem Rlt_nge : forall n m : R, n < m <-> ~ m <= n.
 
264
Proof.
 
265
intros n m; split.
 
266
intros H H1; assert (H2 : n < n) by now apply Rlt_le_trans with m. now apply (Rlt_neq H2).
 
267
intro H. destruct (Rle_gt_cases m n) as [H1 | H1]. false_hyp H1 H. assumption.
 
268
Qed.
 
269
 
 
270
(* Plus, minus and order *)
 
271
 
 
272
Theorem Rplus_le_mono_l : forall n m p : R, n <= m <-> p + n <= p + m.
 
273
Proof.
 
274
intros n m p; split.
 
275
apply sor.(SORplus_le_mono_l).
 
276
intro H. apply (sor.(SORplus_le_mono_l) (p + n) (p + m) (- p)) in H.
 
277
setoid_replace (- p + (p + n)) with n in H by ring.
 
278
setoid_replace (- p + (p + m)) with m in H by ring. assumption.
 
279
Qed.
 
280
 
 
281
Theorem Rplus_le_mono_r : forall n m p : R, n <= m <-> n + p <= m + p.
 
282
Proof.
 
283
intros n m p; rewrite (Rplus_comm n p); rewrite (Rplus_comm m p).
 
284
apply Rplus_le_mono_l.
 
285
Qed.
 
286
 
 
287
Theorem Rplus_lt_mono_l : forall n m p : R, n < m <-> p + n < p + m.
 
288
Proof.
 
289
intros n m p; do 2 rewrite Rlt_le_neq. rewrite Rplus_cancel_l.
 
290
now rewrite <- Rplus_le_mono_l.
 
291
Qed.
 
292
 
 
293
Theorem Rplus_lt_mono_r : forall n m p : R, n < m <-> n + p < m + p.
 
294
Proof.
 
295
intros n m p.
 
296
rewrite (Rplus_comm n p); rewrite (Rplus_comm m p); apply Rplus_lt_mono_l.
 
297
Qed.
 
298
 
 
299
Theorem Rplus_lt_mono : forall n m p q : R, n < m -> p < q -> n + p < m + q.
 
300
Proof.
 
301
intros n m p q H1 H2.
 
302
apply Rlt_trans with (m + p); [now apply -> Rplus_lt_mono_r | now apply -> Rplus_lt_mono_l].
 
303
Qed.
 
304
 
 
305
Theorem Rplus_le_mono : forall n m p q : R, n <= m -> p <= q -> n + p <= m + q.
 
306
Proof.
 
307
intros n m p q H1 H2.
 
308
apply Rle_trans with (m + p); [now apply -> Rplus_le_mono_r | now apply -> Rplus_le_mono_l].
 
309
Qed.
 
310
 
 
311
Theorem Rplus_lt_le_mono : forall n m p q : R, n < m -> p <= q -> n + p < m + q.
 
312
Proof.
 
313
intros n m p q H1 H2.
 
314
apply Rlt_le_trans with (m + p); [now apply -> Rplus_lt_mono_r | now apply -> Rplus_le_mono_l].
 
315
Qed.
 
316
 
 
317
Theorem Rplus_le_lt_mono : forall n m p q : R, n <= m -> p < q -> n + p < m + q.
 
318
Proof.
 
319
intros n m p q H1 H2.
 
320
apply Rle_lt_trans with (m + p); [now apply -> Rplus_le_mono_r | now apply -> Rplus_lt_mono_l].
 
321
Qed.
 
322
 
 
323
Theorem Rplus_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n + m.
 
324
Proof.
 
325
intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_lt_mono.
 
326
Qed.
 
327
 
 
328
Theorem Rplus_pos_nonneg : forall n m : R, 0 < n -> 0 <= m -> 0 < n + m.
 
329
Proof.
 
330
intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_lt_le_mono.
 
331
Qed.
 
332
 
 
333
Theorem Rplus_nonneg_pos : forall n m : R, 0 <= n -> 0 < m -> 0 < n + m.
 
334
Proof.
 
335
intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_le_lt_mono.
 
336
Qed.
 
337
 
 
338
Theorem Rplus_nonneg_nonneg : forall n m : R, 0 <= n -> 0 <= m -> 0 <= n + m.
 
339
Proof.
 
340
intros n m H1 H2. rewrite <- (Rplus_0_l 0). now apply Rplus_le_mono.
 
341
Qed.
 
342
 
 
343
Theorem Rle_le_minus : forall n m : R, n <= m <-> 0 <= m - n.
 
344
Proof.
 
345
intros n m. rewrite (@Rplus_le_mono_r n m (- n)).
 
346
setoid_replace (n + - n) with 0 by ring.
 
347
now setoid_replace (m + - n) with (m - n) by ring.
 
348
Qed.
 
349
 
 
350
Theorem Rlt_lt_minus : forall n m : R, n < m <-> 0 < m - n.
 
351
Proof.
 
352
intros n m. rewrite (@Rplus_lt_mono_r n m (- n)).
 
353
setoid_replace (n + - n) with 0 by ring.
 
354
now setoid_replace (m + - n) with (m - n) by ring.
 
355
Qed.
 
356
 
 
357
Theorem Ropp_lt_mono : forall n m : R, n < m <-> - m < - n.
 
358
Proof.
 
359
intros n m. split; intro H.
 
360
apply -> (@Rplus_lt_mono_l n m (- n - m)) in H.
 
361
setoid_replace (- n - m + n) with (- m) in H by ring.
 
362
now setoid_replace (- n - m + m) with (- n) in H by ring.
 
363
apply -> (@Rplus_lt_mono_l (- m) (- n) (n + m)) in H.
 
364
setoid_replace (n + m + - m) with n in H by ring.
 
365
now setoid_replace (n + m + - n) with m in H by ring.
 
366
Qed.
 
367
 
 
368
Theorem Ropp_pos_neg : forall n : R, 0 < - n <-> n < 0.
 
369
Proof.
 
370
intro n; rewrite (Ropp_lt_mono n 0). now setoid_replace (- 0) with 0 by ring.
 
371
Qed.
 
372
 
 
373
(* Times and order *)
 
374
 
 
375
Theorem Rtimes_pos_pos : forall n m : R, 0 < n -> 0 < m -> 0 < n * m.
 
376
Proof sor.(SORtimes_pos_pos).
 
377
 
 
378
Theorem Rtimes_nonneg_nonneg : forall n m : R, 0 <= n -> 0 <= m -> 0 <= n * m.
 
379
Proof.
 
380
intros n m H1 H2.
 
381
le_elim H1. le_elim H2.
 
382
le_less; now apply Rtimes_pos_pos.
 
383
rewrite <- H2; rewrite Rtimes_0_r; le_equal.
 
384
rewrite <- H1; rewrite Rtimes_0_l; le_equal.
 
385
Qed.
 
386
 
 
387
Theorem Rtimes_pos_neg : forall n m : R, 0 < n -> m < 0 -> n * m < 0.
 
388
Proof.
 
389
intros n m H1 H2. apply -> Ropp_pos_neg.
 
390
setoid_replace (- (n * m)) with (n * (- m)) by ring.
 
391
apply Rtimes_pos_pos. assumption. now apply <- Ropp_pos_neg.
 
392
Qed.
 
393
 
 
394
Theorem Rtimes_neg_neg : forall n m : R, n < 0 -> m < 0 -> 0 < n * m.
 
395
Proof.
 
396
intros n m H1 H2.
 
397
setoid_replace (n * m) with ((- n) * (- m)) by ring.
 
398
apply Rtimes_pos_pos; now apply <- Ropp_pos_neg.
 
399
Qed.
 
400
 
 
401
Theorem Rtimes_square_nonneg : forall n : R, 0 <= n * n.
 
402
Proof.
 
403
intro n; destruct (Rlt_trichotomy 0 n) as [H | [H | H]].
 
404
le_less; now apply Rtimes_pos_pos.
 
405
rewrite <- H, Rtimes_0_l; le_equal.
 
406
le_less; now apply Rtimes_neg_neg.
 
407
Qed.
 
408
 
 
409
Theorem Rtimes_neq_0 : forall n m : R, n ~= 0 /\ m ~= 0 -> n * m ~= 0.
 
410
Proof.
 
411
intros n m [H1 H2].
 
412
destruct (Rlt_trichotomy n 0) as [H3 | [H3 | H3]];
 
413
destruct (Rlt_trichotomy m 0) as [H4 | [H4 | H4]];
 
414
try (false_hyp H3 H1); try (false_hyp H4 H2).
 
415
apply Rneq_symm. apply Rlt_neq. now apply Rtimes_neg_neg.
 
416
apply Rlt_neq. rewrite Rtimes_comm. now apply Rtimes_pos_neg.
 
417
apply Rlt_neq. now apply Rtimes_pos_neg.
 
418
apply Rneq_symm. apply Rlt_neq. now apply Rtimes_pos_pos.
 
419
Qed.
 
420
 
 
421
(* The following theorems are used to build a morphism from Z to R and
 
422
prove its properties in ZCoeff.v. They are not used in RingMicromega.v. *)
 
423
 
 
424
(* Surprisingly, multilication is needed to prove the following theorem *)
 
425
 
 
426
Theorem Ropp_neg_pos : forall n : R, - n < 0 <-> 0 < n.
 
427
Proof.
 
428
intro n; setoid_replace n with (- - n) by ring. rewrite Ropp_pos_neg.
 
429
now setoid_replace (- - n) with n by ring.
 
430
Qed.
 
431
 
 
432
Theorem Rlt_0_1 : 0 < 1.
 
433
Proof.
 
434
apply <- Rlt_le_neq. split.
 
435
setoid_replace 1 with (1 * 1) by ring. apply Rtimes_square_nonneg.
 
436
apply Rneq_0_1.
 
437
Qed.
 
438
 
 
439
Theorem Rlt_succ_r : forall n : R, n < 1 + n.
 
440
Proof.
 
441
intro n. rewrite <- (Rplus_0_l n); setoid_replace (1 + (0 + n)) with (1 + n) by ring.
 
442
apply -> Rplus_lt_mono_r. apply Rlt_0_1.
 
443
Qed.
 
444
 
 
445
Theorem Rlt_lt_succ : forall n m : R, n < m -> n < 1 + m.
 
446
Proof.
 
447
intros n m H; apply Rlt_trans with m. assumption. apply Rlt_succ_r.
 
448
Qed.
 
449
 
 
450
(*Theorem Rtimes_lt_mono_pos_l : forall n m p : R, 0 < p -> n < m -> p * n < p * m.
 
451
Proof.
 
452
intros n m p H1 H2. apply <- Rlt_lt_minus.
 
453
setoid_replace (p * m - p * n) with (p * (m - n)) by ring.
 
454
apply Rtimes_pos_pos. assumption. now apply -> Rlt_lt_minus.
 
455
Qed.*)
 
456
 
 
457
End STRICT_ORDERED_RING.
 
458