diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2017-03-03 10:20:48 +0100 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2017-03-03 10:45:03 +0100 |
commit | a61494c8c430477da8a4b3367a8ac5d492bf83c1 (patch) | |
tree | 4f34d8fa426cb188a67372323e8466fe1a0a153f /theories/ZArith | |
parent | 655401f6c5ca27ffddc231d89062041b163ae285 (diff) |
Relying on BinInt.Z.Pos2Z for proofs of a few lemmas in Zorder.
Diffstat (limited to 'theories/ZArith')
-rw-r--r-- | theories/ZArith/BinInt.v | 3 | ||||
-rw-r--r-- | theories/ZArith/Zorder.v | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/theories/ZArith/BinInt.v b/theories/ZArith/BinInt.v index 711047e52..d09337484 100644 --- a/theories/ZArith/BinInt.v +++ b/theories/ZArith/BinInt.v @@ -1393,6 +1393,9 @@ Proof. reflexivity. Qed. Lemma pos_is_nonneg p : 0 <= Z.pos p. Proof. easy. Qed. +Lemma neg_le_pos p q : Zneg p <= Zpos q. +Proof. easy. Qed. + Lemma neg_xO p : Z.neg p~0 = 2 * Z.neg p. Proof. reflexivity. Qed. diff --git a/theories/ZArith/Zorder.v b/theories/ZArith/Zorder.v index 73dee0cf2..18915216a 100644 --- a/theories/ZArith/Zorder.v +++ b/theories/ZArith/Zorder.v @@ -339,7 +339,7 @@ Notation Zle_0_1 := Z.le_0_1 (compat "8.3"). Lemma Zle_neg_pos : forall p q:positive, Zneg p <= Zpos q. Proof. - easy. + exact Pos2Z.neg_le_pos. Qed. Lemma Zgt_pos_0 : forall p:positive, Zpos p > 0. @@ -350,12 +350,12 @@ Qed. (* weaker but useful (in [Z.pow] for instance) *) Lemma Zle_0_pos : forall p:positive, 0 <= Zpos p. Proof. - easy. + exact Pos2Z.pos_is_nonneg. Qed. Lemma Zlt_neg_0 : forall p:positive, Zneg p < 0. Proof. - easy. + exact Pos2Z.neg_is_neg. Qed. Lemma Zle_0_nat : forall n:nat, 0 <= Z.of_nat n. |