src/HOL/Hoare/Arith2.thy
author paulson
Mon, 23 Sep 1996 18:18:18 +0200
changeset 2010 0a22b9d63a18
parent 1824 44254696843a
child 3372 6e472c8f0011
permissions -rw-r--r--
Simplification of definition of synth

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

More arithmetic.
*)

Arith2 = Arith +

constdefs
  divides :: [nat, nat] => bool                             (infixl 70)
  "x divides n == 0<n & 0<x & (n mod x) = 0"

  cd      :: [nat, nat, nat] => bool
  "cd x m n  == x divides m & x divides n"

  gcd     :: [nat, nat] => nat
  "gcd m n     == @x.(cd x m n) & (!y.(cd y m n) --> y<=x)"

  pow     :: [nat, nat] => nat                              (infixl 75)
  "m pow n     == nat_rec (Suc 0) (%u v.m*v) n"

  fac     :: nat => nat
  "fac m       == nat_rec (Suc 0) (%u v.(Suc u)*v) m"

end