aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith/BinIntDef.v
diff options
context:
space:
mode:
authorGravatar Pierre Boutillier <pierre.boutillier@ens-lyon.org>2014-04-25 16:17:15 +0200
committerGravatar Pierre Boutillier <pierre.boutillier@ens-lyon.org>2014-05-02 11:05:19 +0200
commit1432318faa4cb6a50eca2c7a371b43b3b9969666 (patch)
tree694d6a8266ec1aad5f0439cfb0a3fa41fb8fd270 /theories/ZArith/BinIntDef.v
parentc3e091756e0030e29e231ca1d7c3bd12ded55760 (diff)
Pos.iter arguments in a better order for cbn.
Diffstat (limited to 'theories/ZArith/BinIntDef.v')
-rw-r--r--theories/ZArith/BinIntDef.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/theories/ZArith/BinIntDef.v b/theories/ZArith/BinIntDef.v
index 958ce2ef7..4e7fdcdff 100644
--- a/theories/ZArith/BinIntDef.v
+++ b/theories/ZArith/BinIntDef.v
@@ -126,7 +126,7 @@ Infix "*" := mul : Z_scope.
(** ** Power function *)
-Definition pow_pos (z:Z) (n:positive) := Pos.iter n (mul z) 1.
+Definition pow_pos (z:Z) := Pos.iter (mul z) 1.
Definition pow x y :=
match y with
@@ -306,7 +306,7 @@ Definition to_pos (z:Z) : positive :=
Definition iter (n:Z) {A} (f:A -> A) (x:A) :=
match n with
- | pos p => Pos.iter p f x
+ | pos p => Pos.iter f x p
| _ => x
end.
@@ -568,8 +568,8 @@ Definition testbit a n :=
Definition shiftl a n :=
match n with
| 0 => a
- | pos p => Pos.iter p (mul 2) a
- | neg p => Pos.iter p div2 a
+ | pos p => Pos.iter (mul 2) a p
+ | neg p => Pos.iter div2 a p
end.
Definition shiftr a n := shiftl a (-n).