src/HOL/Hoare/Arith2.thy
author nipkow
Fri, 17 Nov 1995 09:04:10 +0100
changeset 1335 5e1c0540f285
child 1374 5e407f2a3323
permissions -rw-r--r--
New directory. Hoare logic according to Mike Gordon.

(*  Title: 	HOL/Hoare/Arith2.thy
    ID:         $Id$
    Author: 	Norbert Galm
    Copyright   1995 TUM

More arithmetic.
*)

Arith2 = Arith +

consts
  divides :: "[nat, nat] => bool"			(infixl 70)
  cd	  :: "[nat, nat, nat] => bool"
  gcd	  :: "[nat, nat] => nat"

  pow	  :: "[nat, nat] => nat"			(infixl 75)
  fac	  :: "nat => nat"

defs
  divides_def	"x divides n == 0<n & 0<x & (n mod x) = 0"
  cd_def	"cd x m n  == x divides m & x divides n"
  gcd_def	"gcd m n     == @x.(cd x m n) & (!y.(cd y m n) --> y<=x)"

  pow_def	"m pow n     == nat_rec n (Suc 0) (%u v.m*v)"
  fac_def	"fac m       == nat_rec m (Suc 0) (%u v.(Suc u)*v)"

end