src/HOL/Power.thy
changeset 3390 0c7625196d95
child 4628 0c7e97836e3c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/Power.thy	Tue Jun 03 10:56:04 1997 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +(*  Title:      HOL/Power.thy
     1.5 +    ID:         $Id$
     1.6 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     1.7 +    Copyright   1997  University of Cambridge
     1.8 +
     1.9 +The (overloaded) exponentiation operator, ^ :: [nat,nat]=>nat
    1.10 +Also binomial coefficents
    1.11 +*)
    1.12 +
    1.13 +Power = Divides + 
    1.14 +consts
    1.15 +  binomial :: "[nat,nat] => nat"      ("'(_ choose _')" [50,50])
    1.16 +
    1.17 +primrec "op ^" nat
    1.18 +  "p ^ 0 = 1"
    1.19 +  "p ^ (Suc n) = (p::nat) * (p ^ n)"
    1.20 +  
    1.21 +primrec "binomial" nat
    1.22 +  binomial_0   "(0     choose k) = (if k = 0 then 1 else 0)"
    1.23 +
    1.24 +  binomial_Suc "(Suc n choose k) =
    1.25 +                (if k = 0 then 1 else (n choose pred k) + (n choose k))"
    1.26 +
    1.27 +end
    1.28 +