aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/NArith/Nnat.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/NArith/Nnat.v')
-rw-r--r--theories/NArith/Nnat.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/theories/NArith/Nnat.v b/theories/NArith/Nnat.v
index 1b7e2f241..346169e7f 100644
--- a/theories/NArith/Nnat.v
+++ b/theories/NArith/Nnat.v
@@ -113,7 +113,7 @@ Proof.
Qed.
Lemma inj_iter a {A} (f:A->A) (x:A) :
- N.iter a f x = nat_iter (N.to_nat a) f x.
+ N.iter a f x = nat_rect (fun _ => A) x (fun _ => f) (N.to_nat a).
Proof.
destruct a as [|a]. trivial. apply Pos2Nat.inj_iter.
Qed.
@@ -194,7 +194,7 @@ Lemma inj_max n n' :
Proof. nat2N. Qed.
Lemma inj_iter n {A} (f:A->A) (x:A) :
- nat_iter n f x = N.iter (N.of_nat n) f x.
+ nat_rect (fun _ => A) x (fun _ => f) n = N.iter (N.of_nat n) f x.
Proof. now rewrite N2Nat.inj_iter, !id. Qed.
End Nat2N.