From a61494c8c430477da8a4b3367a8ac5d492bf83c1 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 3 Mar 2017 10:20:48 +0100 Subject: Relying on BinInt.Z.Pos2Z for proofs of a few lemmas in Zorder. --- theories/ZArith/BinInt.v | 3 +++ theories/ZArith/Zorder.v | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'theories/ZArith') 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. -- cgit v1.2.3