aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith
diff options
context:
space:
mode:
authorGravatar Pierre Boutillier <pierre.boutillier@pps.univ-paris-diderot.fr>2014-09-08 17:35:50 +0200
committerGravatar Pierre Boutillier <pierre.boutillier@ens-lyon.org>2014-10-01 23:24:36 +0200
commitb9cbf680f13927340720d1d0f4938dcc6cd65d1f (patch)
tree7cc258ea9458122d4e333f6cfa7af8a792242824 /theories/ZArith
parentf640bcbe834cef3559118a093f1a905cacdccc2f (diff)
eta contractions
Diffstat (limited to 'theories/ZArith')
-rw-r--r--theories/ZArith/Zpower.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/theories/ZArith/Zpower.v b/theories/ZArith/Zpower.v
index 485935502..2d0b9926a 100644
--- a/theories/ZArith/Zpower.v
+++ b/theories/ZArith/Zpower.v
@@ -25,7 +25,7 @@ Local Open Scope Z_scope.
(** [Zpower_nat z n] is the n-th power of [z] when [n] is an unary
integer (type [nat]) and [z] a signed integer (type [Z]) *)
-Definition Zpower_nat (z:Z)(n:nat) := Nat.iter n (Z.mul z) 1.
+Definition Zpower_nat (z:Z) := nat_rect _ 1 (fun _ => Z.mul z).
Lemma Zpower_nat_0_r z : Zpower_nat z 0 = 1.
Proof. reflexivity. Qed.
@@ -255,7 +255,7 @@ Section power_div_with_rest.
Proof.
rewrite Pos2Nat.inj_iter, two_power_pos_nat.
induction (Pos.to_nat p); simpl; trivial.
- destruct (Nat.iter _ _ _) as ((q,r),d).
+ destruct (nat_rect _ _ _ _) as ((q,r),d).
unfold Zdiv_rest_aux. rewrite two_power_nat_S; now f_equal.
Qed.