From b9cbf680f13927340720d1d0f4938dcc6cd65d1f Mon Sep 17 00:00:00 2001 From: Pierre Boutillier Date: Mon, 8 Sep 2014 17:35:50 +0200 Subject: eta contractions --- theories/ZArith/Zpower.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'theories/ZArith') 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. -- cgit v1.2.3