This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The copyright holder grants you permission to redistribute this document freely as a verbatim copy. Furthermore, the copyright holder permits you to develop any derived work from this document provided that the following conditions are met. a) The derived work acknowledges the fact that it is derived from this document, and maintains a prominent reference in the work to the original source. b) The fact that the derived work is not the original OpenMath document is stated prominently in the derived work. Moreover if both this document and the derived work are Content Dictionaries then the derived work must include a different CDName element, chosen so that it cannot be confused with any works adopted by the OpenMath Society. In particular, if there is a Content Dictionary Group whose name is, for example, `math' containing Content Dictionaries named `math1', `math2' etc., then you should not name a derived Content Dictionary `mathN' where N is an integer. However you are free to name it `private_mathN' or some such. This is because the names `mathN' may be used by the OpenMath Society for future extensions. c) The derived work is distributed under terms that allow the compilation of derived works, but keep paragraphs a) and b) intact. The simplest way to do this is to distribute the derived work under the OpenMath license, but this is not a requirement. If you have questions about this license please contact the OpenMath society at http://www.openmath.org. poly http://www.openmath.org/cd http://www.openmath.org/cd/poly.ocd 2017-12-31 2004-03-30 experimental 5 1 Author: OpenMath Consortium SourceURL: https://github.com/OpenMath/CDs This CD contains generic operators to deal with various forms of polynomials. The arithmetic operators from arith1 etc. are valid on these polynomials: there is also the operator "power" from this CD, which creates formal powers. More specific operations for Distributed Multivariate Polynomials can be found in polyd.ocd, and for Recursive polynomials in polyr.ocd. Original OpenMath v1.1 Poly 1997 Update to Current Format 1999-07-07 DPC Move the names of rings to setname.ocd 1999-11-09 JHD Split into poly{,d,r} 1999-11-14 JHD Updated following Abbott/Strotmann/Davenport at Dagstuhl October 2001 JHD Definition of some constructors power application Takes a polynomial and a (non-negative) integer and produces a formal power. Although OpenMath does not specify operational semantics, the idea here is that these powers are not evaluated. We note that the power from arith1 would suggest the expanded form. 2 factored application The constructor for a factorization. Its arguments are formal powers (see previous operator), where the polynomials are supposed to be irreducible (except possibly for a content from the ground ring). Note that "factored" is not a call to factorise something, rather a statement that we know a factorisation. 2 2 1 2 1 squarefreed application The constructor for a square-free factorization. Its arguments should have the structure of the above "factored", where the polynomials should be square-free. Note that this is not necessarily a minimal square-free decomposition: some exponents can occur more than once. Again, this is a statement that we have a square-free factorisation, rather than a request to compute one. 2 2 4 1 partially_factored application The constructor for a factorization. Its arguments are formal powers (see operator above), where nothing in particular is assumed about the polynomials (they may or may not be irreducible, or relatively prime). 3 2 1 2 1 Definition of operations expand application Converts a factored or squarefreed form into the expanded polynomial over the same ring, so that factored(recursive) -> recursive, etc. 2 2 1 2 1 4 -4 2 degree application The total degree of its argument. The value returned is a non-negative integer. We note that the degree of 0 is undefined. Note that this operation takes no account of any weights that have been defined: see weighted_degree in polyd. degree(x^n)=n degree_wrt application The degree with respect to a variable (the second argument). We note that the degree of 0 is undefined. degreeWrt(x^ny^m,x)=n leading_coefficient application The leading coefficient with respect to a variable (the second argument). We note that the leading coefficient of 0 is undefined. coefficient application The coefficient with respect to a list of variables (the second argument) raised to a list of powers (the third argument). Zero if no such term is present. Not all variables need be specified. coefficient_ring application The coefficient ring. evaluate application Evaluation of a polynomial at a value or vector of values. factor application The decomposition of its argument into irreducible factors. A program that can compute the factorization is required to return a "factored" object - see above. It is currently an open question whether powers of 1 can be omitted. 4 -4 2 2 2 1 2 1 squarefree application The square-free decomposition of its argument. A program that can compute the factorization is required to return a "squarefreed" object. 4 -4 2 2 2 4 1 gcd application The n-ary greatest common divisor of its polynomial arguments. This is unique up to units. lcm application The least common multiple of its polynomial arguments. This is unique up to units, but the choice must be compatible with that made for gcd: see the CMP/FMP. for all x,y lcm(x,y) = (x*y)/gcd(x,y) discriminant application Function taking two arguments, it represents the discriminant of a polynomial, which is the first argument, with respect to the given variable which is the second argument. discriminant(p,x)=resultant(p,diff(p,x),x)/leading_coefficient(p,x) resultant application Function taking three arguments, it represents the resultant of two polynomials, which are the first two arguments, with respect to the given variable which is the third argument. if for all f,g in R[x] | if there exists an a in R s.t. f(a) = g(a) = 0 then resultant(f,g,x) = 0 We note that the polynomials utilised in the following FMP are recursive in nature, however the resultant symbol may be used also on dense polynomials. convert application Conversion between polynomial rings. The first argument is a polynomial and the second is a polynomial ring. This represents the conversion of the given polynomial as an element of the given ring. A program that can compute the conversion is required to return a polynomial in the given ring.