%------------------------------------------------------------------------------ % Generalized Root function % % Author: David Lester, Manchester University & NIA % % Version 1.0 19/08/08 Initial version (DRL) % % (We can take nth-roots of negative numbers provided n is odd. % I could believe that the type-constraints make this unusable; % feedback appreciated.) %------------------------------------------------------------------------------
root: THEORY
BEGIN
IMPORTING reals@sign,
nn_root
x,y,z: VAR real
epsilon,
delta: VAR posreal
pm,pn: VAR posnat
nx: VAR nnreal
root(x:real,pn:{pm | x >= 0 OR odd?(pm)}):real = nn_root(abs(x),pn)*sign(x)
root_expt: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x^pn,pn) = x
expt_root: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn)^pn = x
root_is_0: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn) = 0 IFF x = 0
root_pos: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn) > 0 IFF x > 0
root_neg: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn) < 0 IFF x < 0
root_gt1: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn) > 1 IFF x > 1
root_lt1: LEMMAFORALL (x:real,pn:{pm | x >= 0 OR odd?(pm)}):
root(x,pn) < 1 IFF x < 1
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.