Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Ackermann-function/Coq/ackermann-function-2.coq
Normal file
13
Task/Ackermann-function/Coq/ackermann-function-2.coq
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Require Import Utf8.
|
||||
|
||||
Section FOLD.
|
||||
Context {A : Type} (f : A → A) (a : A).
|
||||
Fixpoint fold (n : nat) : A :=
|
||||
match n with
|
||||
| O => a
|
||||
| S k => f (fold k)
|
||||
end.
|
||||
End FOLD.
|
||||
|
||||
Definition ackermann : nat → nat → nat :=
|
||||
fold (λ g, fold g (g (S O))) S.
|
||||
Loading…
Add table
Add a link
Reference in a new issue