Commit df735505 authored by Adam Chlipala's avatar Adam Chlipala

Fix a typo in new recursion combinators example

parent e56b9f3a
......@@ -780,7 +780,11 @@ Fixpoint plus_recursive (n : nat) : nat -> nat :=
end.
Definition plus_rec : nat -> nat -> nat :=
nat_rec (fun _ : nat => nat -> nat) (fun _ => O) (fun _ r m => S (r m)).
nat_rec (fun _ : nat => nat -> nat) (fun m => m) (fun _ r m => S (r m)).
Theorem plus_equivalent : plus_recursive = plus_rec.
reflexivity.
Qed.
(** Going even further down the rabbit hole, [nat_rect] itself is not even a primitive. It is a functional program that we can write manually. *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment