aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith/BinInt.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-11-01 01:49:08 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-11-01 01:49:08 +0000
commitaa0fa131bb0c5f8239644faf7a5a3069a337bb2f (patch)
tree8faa2278655ec472d0f2c72d931b81a7d31c24ff /theories/ZArith/BinInt.v
parent14071a88408b2a678c8129aebf90e669eee007ee (diff)
In agreement with Laurent Thery, start migration of auxiliary results
present in Ints. For the moment, mainly: - Q parts go in QArith - Some of the Zdivide & Zgcd stuff go in Znumtheory More to come ... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10281 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/ZArith/BinInt.v')
-rw-r--r--theories/ZArith/BinInt.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/theories/ZArith/BinInt.v b/theories/ZArith/BinInt.v
index 0d67f2115..4e8373f60 100644
--- a/theories/ZArith/BinInt.v
+++ b/theories/ZArith/BinInt.v
@@ -739,6 +739,16 @@ Proof.
reflexivity.
Qed.
+Lemma Zpos_minus_morphism : forall a b:positive, Pcompare a b Eq = Lt ->
+ Zpos (b-a) = Zpos b - Zpos a.
+Proof.
+ intros.
+ simpl.
+ change Eq with (CompOpp Eq).
+ rewrite <- Pcompare_antisym.
+ rewrite H; simpl; auto.
+Qed.
+
(** ** Misc redundant properties *)
Lemma Zeq_minus : forall n m:Z, n = m -> n - m = Z0.