aboutsummaryrefslogtreecommitdiff
path: root/theories/Numbers/Integer/SpecViaZ
diff options
context:
space:
mode:
authorletouzey2010-12-09 14:15:19 +0000
committerletouzey2010-12-09 14:15:19 +0000
commit7c95ca8997a3b561679fc90995d608dbb1da996e (patch)
tree562e41df4be2b93323bdfc638bf9ea0eaf6e7d28 /theories/Numbers/Integer/SpecViaZ
parent76b901471bfdc69a9e0af1300dd4bcaad1e0a17c (diff)
ZArith: for uniformity, Zdiv2 becomes Zquot2 while Zdiv2' becomes Zdiv2
Now we have: - Zdiv and Zdiv2 : round toward bottom, no easy sign rule, remainder of a/2 is 0 or 1, operations related with two's-complement Zshiftr. - Zquot and Zquot2 : round toward zero, Zquot2 (-a) = - Zquot2 a, remainder of a/2 is 0 or Zsgn a. Ok, I'm introducing an incompatibility here, but I think coherence is really desirable. Anyway, people using Zdiv on positive numbers only shouldn't even notice the change. Otherwise, it's just a matter of sed -e "s/div2/quot2/g". git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13695 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Numbers/Integer/SpecViaZ')
-rw-r--r--theories/Numbers/Integer/SpecViaZ/ZSig.v2
-rw-r--r--theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v2
2 files changed, 2 insertions, 2 deletions
diff --git a/theories/Numbers/Integer/SpecViaZ/ZSig.v b/theories/Numbers/Integer/SpecViaZ/ZSig.v
index c339154499..788ca8e560 100644
--- a/theories/Numbers/Integer/SpecViaZ/ZSig.v
+++ b/theories/Numbers/Integer/SpecViaZ/ZSig.v
@@ -109,7 +109,7 @@ Module Type ZType.
Parameter spec_lor: forall x y, [lor x y] = Zor [x] [y].
Parameter spec_ldiff: forall x y, [ldiff x y] = Zdiff [x] [y].
Parameter spec_lxor: forall x y, [lxor x y] = Zxor [x] [y].
- Parameter spec_div2: forall x, [div2 x] = Zdiv2' [x].
+ Parameter spec_div2: forall x, [div2 x] = Zdiv2 [x].
End ZType.
diff --git a/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
index f8fa842836..8c1e7b4fa1 100644
--- a/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
+++ b/theories/Numbers/Integer/SpecViaZ/ZSigZAxioms.v
@@ -471,7 +471,7 @@ Qed.
Lemma div2_spec : forall a, div2 a == shiftr a 1.
Proof.
- intros a. zify. now apply Zdiv2'_spec.
+ intros a. zify. now apply Zdiv2_spec.
Qed.
End ZTypeIsZAxioms.