src/HOL/ex/Fib.thy
author wenzelm
Thu, 22 Apr 1999 13:04:23 +0200
changeset 6481 dbf2d9b3d6c8
parent 4809 595f905cc348
child 8658 3cf533397c5a
permissions -rw-r--r--
recdef requires theory Recdef;

(*  Title:      ex/Fib
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1997  University of Cambridge

The Fibonacci function.  Demonstrates the use of recdef.
*)

Fib = Divides + Primes +

consts fib  :: "nat => nat"
recdef fib "less_than"
    "fib 0 = 0"
    "fib 1 = 1"
    "fib (Suc(Suc x)) = (fib x + fib (Suc x))"

end