Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Ackermann-function/Coq/ackermann-function-1.coq
Normal file
18
Task/Ackermann-function/Coq/ackermann-function-1.coq
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Fixpoint ack (m : nat) : nat -> nat :=
|
||||
fix ack_m (n : nat) : nat :=
|
||||
match m with
|
||||
| 0 => S n
|
||||
| S pm =>
|
||||
match n with
|
||||
| 0 => ack pm 1
|
||||
| S pn => ack pm (ack_m pn)
|
||||
end
|
||||
end.
|
||||
|
||||
|
||||
(*
|
||||
Example:
|
||||
A(3, 2) = 29
|
||||
*)
|
||||
|
||||
Eval compute in ack 3 2.
|
||||
Loading…
Add table
Add a link
Reference in a new issue