arith1 http://www.openmath.org/cd/arith1.ocd 2003-04-01 official 2001-03-12 2 0 alg1 fns1 integer1 interval1 linalg2 logic1 quant1 relation1 set1 setname1 transc1 This CD defines symbols for common arithmetic functions. lcm The symbol to represent the n-ary function to return the least common multiple of its arguments. lcm(a,b) = a*b/gcd(a,b) for all integers a,b | There does not exist a c>0 such that c/a is an Integer and c/b is an Integer and lcm(a,b) > c. 0 gcd The symbol to represent the n-ary function to return the gcd (greatest common divisor) of its arguments. for all integers a,b | There does not exist a c such that a/c is an Integer and b/c is an Integer and c > gcd(a,b). Note that this implies that gcd(a,b) > 0 gcd(6,9) = 3 6 9 3 plus The symbol representing an n-ary commutative function plus. for all a,b | a + b = b + a unary_minus This symbol denotes unary minus, i.e. the additive inverse. for all a | a + (-a) = 0 minus The symbol representing a binary minus function. This is equivalent to adding the additive inverse. for all a,b | a - b = a + (-b) times The symbol representing an n-ary multiplication function. 1 2 3 4 5 6 7 8 19 20 43 50 for all a,b | a * 0 = 0 and a * b = a * (b - 1) + a for all a,b,c | a*(b+c) = a*b + a*c divide This symbol represents a (binary) division function denoting the first argument right-divided by the second, i.e. divide(a,b)=a*inverse(b). It is the inverse of the multiplication function defined by the symbol times in this CD. whenever not(a=0) then a/a = 1 power This symbol represents a power function. The first argument is raised to the power of the second argument. When the second argument is not an integer, powering is defined in terms of exponentials and logarithms for the complex and real numbers. This operator can represent general powering. x\in C implies x^a = exp(a ln x) if n is an integer then x^0 = 1, x^n = x * x^(n-1) 0 1 1 2 3 4 3 37 54 81 118 abs A unary operator which represents the absolute value of its argument. The argument should be numerically valued. In the complex case this is often referred to as the modulus. for all x,y | abs(x) + abs(y) >= abs(x+y) root A binary operator which represents its first argument "lowered" to its n'th root where n is the second argument. This is the inverse of the operation represented by the power symbol defined in this CD. Care should be taken as to the precise meaning of this operator, in particular which root is represented, however it is here to represent the general notion of taking n'th roots. As inferred by the signature relevant to this symbol, the function represented by this symbol is the single valued function, the specific root returned is the one indicated by the first CMP. Note also that the converse of the second CMP is not valid in general. x\in C implies root(x,n) = exp(ln(x)/n) for all a,n | power(root(a,n),n) = a (if the root exists!) sum An operator taking two arguments, the first being the range of summation, e.g. an integral interval, the second being the function to be summed. Note that the sum may be over an infinite interval. This represents the summation of the reciprocals of all the integers between 1 and 10 inclusive. 1 10 1 product An operator taking two arguments, the first being the range of multiplication e.g. an integral interval, the second being the function to be multiplied. Note that the product may be over an infinite interval. This represents the statement that the factorial of n is equal to the product of all the integers between 1 and n inclusive. 1