doc-src/Tutorial/Misc/Fib.thy
author wenzelm
Sat, 14 Nov 1998 13:23:49 +0100
changeset 5860 ed11c9890852
parent 5377 efb799c5ed3c
permissions -rw-r--r--
added read_nat;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5377
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     1
Fib = WF_Rel +
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     2
consts fib  :: nat => nat
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     3
recdef fib "measure(%n. n)"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     4
    "fib 0 = 0"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     5
    "fib 1 = 1"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     6
    "fib (Suc(Suc x)) = fib x + fib (Suc x)"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     7
end