aboutsummaryrefslogtreecommitdiff
path: root/theories/Numbers/Integer/Binary
diff options
context:
space:
mode:
authoremakarov2007-11-14 19:47:46 +0000
committeremakarov2007-11-14 19:47:46 +0000
commit87bfa992d0373cd1bfeb046f5a3fc38775837e83 (patch)
tree5a222411c15652daf51a6405e2334a44a9c95bea /theories/Numbers/Integer/Binary
parentd04ad26f4bb424581db2bbadef715fef491243b3 (diff)
Update on Numbers; renamed ZOrder.v to ZLt to remove clash with ZArith/Zorder on MacOS.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10323 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Numbers/Integer/Binary')
-rw-r--r--theories/Numbers/Integer/Binary/ZBinary.v29
1 files changed, 23 insertions, 6 deletions
diff --git a/theories/Numbers/Integer/Binary/ZBinary.v b/theories/Numbers/Integer/Binary/ZBinary.v
index 3c680ec918..96e01a731c 100644
--- a/theories/Numbers/Integer/Binary/ZBinary.v
+++ b/theories/Numbers/Integer/Binary/ZBinary.v
@@ -100,14 +100,14 @@ intros; rewrite <- Zsucc_succ'; rewrite <- Zpred_pred';
apply Zminus_succ_r.
Qed.
-Theorem NZtimes_0_r : forall n : Z, n * 0 = 0.
+Theorem NZtimes_0_l : forall n : Z, 0 * n = 0.
Proof.
-exact Zmult_0_r.
+reflexivity.
Qed.
-Theorem NZtimes_succ_r : forall n m : Z, n * (NZsucc m) = n * m + n.
+Theorem NZtimes_succ_l : forall n m : Z, (NZsucc n) * m = n * m + m.
Proof.
-intros; rewrite <- Zsucc_succ'; apply Zmult_succ_r.
+intros; rewrite <- Zsucc_succ'; apply Zmult_succ_l.
Qed.
End NZAxiomsMod.
@@ -137,7 +137,7 @@ Proof.
congruence.
Qed.
-Theorem NZle_lt_or_eq : forall n m : Z, n <= m <-> n < m \/ n = m.
+Theorem NZlt_eq_cases : forall n m : Z, n <= m <-> n < m \/ n = m.
Proof.
intros n m; split. apply Zle_lt_or_eq.
intro H; destruct H as [H | H]. now apply Zlt_le_weak. rewrite H; apply Zle_refl.
@@ -148,7 +148,7 @@ Proof.
exact Zlt_irrefl.
Qed.
-Theorem NZlt_succ_le : forall n m : Z, n < (NZsucc m) <-> n <= m.
+Theorem NZlt_succ_r : forall n m : Z, n < (NZsucc m) <-> n <= m.
Proof.
intros; unfold NZsucc; rewrite <- Zsucc_succ'; split;
[apply Zlt_succ_le | apply Zle_lt_succ].
@@ -215,6 +215,23 @@ End ZBinAxiomsMod.
Module Export ZBinTimesOrderPropMod := ZTimesOrderPropFunct ZBinAxiomsMod.
+(** Z forms a ring *)
+
+(*Lemma Zring : ring_theory 0 1 NZplus NZtimes NZminus Zopp NZeq.
+Proof.
+constructor.
+exact Zplus_0_l.
+exact Zplus_comm.
+exact Zplus_assoc.
+exact Ztimes_1_l.
+exact Ztimes_comm.
+exact Ztimes_assoc.
+exact Ztimes_plus_distr_r.
+intros; now rewrite Zplus_opp_minus.
+exact Zplus_opp_r.
+Qed.
+
+Add Ring ZR : Zring.*)