src/HOL/ex/Fib.thy
author wenzelm
Sat, 01 Apr 2000 20:22:46 +0200
changeset 8658 3cf533397c5a
parent 6481 dbf2d9b3d6c8
permissions -rw-r--r--
proper naming of fib equations;

(*  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"
  zero    "fib 0 = 0"
  one     "fib 1 = 1"
  Suc_Suc "fib (Suc (Suc x)) = fib x + fib (Suc x)"

end