OpenMath Content Dictionary: poly
Canonical URL:
http://www.openmath.org/cd/poly.ocd
CD Base:
http://www.openmath.org/cd
CD File:
poly.ocd
CD as XML Encoded OpenMath:
poly.omcd
Defines:
coefficient , coefficient_ring , convert , degree , degree_wrt , discriminant , evaluate , expand , factor , factored , gcd , lcm , leading_coefficient , partially_factored , power , resultant , squarefree , squarefreed
Date:
2004-03-30
Version:
5
(Revision 1)
Review Date:
2017-12-31
Status:
experimental
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 .
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
Role:
application
Description:
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.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
</math>
Prefix
Popcorn
poly.power($x, 2)
Rendered Presentation MathML
Signatures:
sts
Role:
application
Description:
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.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="factored" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="poly">factored</csymbol>
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">plus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
</apply>
</math>
Prefix
Popcorn
poly.factored(poly.power($x, 2), poly.power($x + 2, 1), poly.power($x - 2, 1))
Rendered Presentation MathML
factored
(
power
(
x
,
2
)
,
power
(
x
+
2
,
1
)
,
power
(
x
-
2
,
1
)
)
Signatures:
sts
Role:
application
Description:
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.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="squarefreed" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 4 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="poly">squarefreed</csymbol>
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">4</cn>
</apply>
<cn type="integer">1</cn>
</apply>
</apply>
</math>
Prefix
Popcorn
poly.squarefreed(poly.power($x, 2), poly.power($x ^ 2 - 4, 1))
Rendered Presentation MathML
squarefreed
(
power
(
x
,
2
)
,
power
(
x
2
-
4
,
1
)
)
Signatures:
sts
Role:
application
Description:
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).
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="partially_factored" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 3 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="poly">partially_factored</csymbol>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">3</cn></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
</apply>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
</apply>
</math>
Prefix
Popcorn
poly.partially_factored(poly.power($x ^ 3 + $x ^ 2, 1), poly.power($x - 2, 1))
Rendered Presentation MathML
partially_factored
(
power
(
x
3
+
x
2
,
1
)
,
power
(
x
-
2
,
1
)
)
Signatures:
sts
Definition of operations
Role:
application
Description:
Converts a factored or squarefreed form into the expanded
polynomial over the same ring, so that factored(recursive)
-> recursive, etc.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="expand" cd="poly"/>
<OMA>
<OMS name="factored" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 4 </OMI>
</OMA>
<OMA>
<OMS name="times" cd="arith1"/>
<OMI> -4 </OMI>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">expand</csymbol>
<apply><csymbol cd="poly">factored</csymbol>
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">plus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
</apply>
</apply>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">4</cn></apply>
<apply><csymbol cd="arith1">times</csymbol>
<cn type="integer">-4</cn>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
expand
(
factored
(
power
(
x , 2 )
,
power
(
plus
(
x , 2 )
, 1 )
,
power
(
minus
(
x , 2 )
, 1 )
)
)
,
plus
(
power
(
x , 4 )
,
times
( -4 ,
power
(
x , 2 )
)
)
)
Popcorn
poly.expand(poly.factored(poly.power($x, 2), poly.power($x + 2, 1), poly.power($x - 2, 1))) = $x ^ 4 + -4 * $x ^ 2
Rendered Presentation MathML
expand
(
factored
(
power
(
x
,
2
)
,
power
(
x
+
2
,
1
)
,
power
(
x
-
2
,
1
)
)
)
=
x
4
-
4
x
2
Signatures:
sts
Role:
application
Description:
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.
Commented Mathematical property (CMP):
degree(x^n)=n
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="degree" cd="poly"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMV name="n"/>
</OMA>
</OMA>
<OMV name="n"/>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">degree</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><ci>n</ci></apply>
</apply>
<ci>n</ci>
</apply>
</math>
Prefix
Popcorn
poly.degree($x ^ $n) = $n
Rendered Presentation MathML
Signatures:
sts
Role:
application
Description:
The degree with respect to a variable (the second
argument). We note that the degree of 0 is undefined.
Commented Mathematical property (CMP):
degreeWrt(x^ny^m,x)=n
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="degree_wrt" cd="poly"/>
<OMA>
<OMS name="times" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMV name="n"/>
</OMA>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="y"/>
<OMV name="m"/>
</OMA>
</OMA>
<OMV name="x"/>
</OMA>
<OMV name="n"/>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">degree_wrt</csymbol>
<apply><csymbol cd="arith1">times</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><ci>n</ci></apply>
<apply><csymbol cd="arith1">power</csymbol><ci>y</ci><ci>m</ci></apply>
</apply>
<ci>x</ci>
</apply>
<ci>n</ci>
</apply>
</math>
Prefix
Popcorn
poly.degree_wrt($x ^ $n * $y ^ $m, $x) = $n
Rendered Presentation MathML
degree_wrt
(
x
n
y
m
,
x
)
=
n
Signatures:
sts
Role:
application
Description:
The leading coefficient with respect to a variable (the second
argument). We note that the leading coefficient of 0 is undefined.
Signatures:
sts
Role:
application
Description:
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.
Signatures:
sts
Role:
application
Description:
The coefficient ring.
Signatures:
sts
Role:
application
Description:
Evaluation of a polynomial at a value or vector of values.
Signatures:
sts
Role:
application
Description:
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.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="factor" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 4 </OMI>
</OMA>
<OMA>
<OMS name="times" cd="arith1"/>
<OMI> -4 </OMI>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS name="factored" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">factor</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">4</cn></apply>
<apply><csymbol cd="arith1">times</csymbol>
<cn type="integer">-4</cn>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
</apply>
<apply><csymbol cd="poly">factored</csymbol>
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">plus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">1</cn>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
factor
(
plus
(
power
(
x , 4 )
,
times
( -4 ,
power
(
x , 2 )
)
)
)
,
factored
(
power
(
x , 2 )
,
power
(
plus
(
x , 2 )
, 1 )
,
power
(
minus
(
x , 2 )
, 1 )
)
)
Popcorn
poly.factor($x ^ 4 + -4 * $x ^ 2) = poly.factored(poly.power($x, 2), poly.power($x + 2, 1), poly.power($x - 2, 1))
Rendered Presentation MathML
factor
(
x
4
-
4
x
2
)
=
factored
(
power
(
x
,
2
)
,
power
(
x
+
2
,
1
)
,
power
(
x
-
2
,
1
)
)
Signatures:
sts
Role:
application
Description:
The square-free decomposition of its argument. A program that can
compute the factorization is required to return a "squarefreed"
object.
Example:
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="squarefree" cd="poly"/>
<OMA>
<OMS name="plus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 4 </OMI>
</OMA>
<OMA>
<OMS name="times" cd="arith1"/>
<OMI> -4 </OMI>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS name="squarefreed" cd="poly"/>
<OMA>
<OMS name="power" cd="poly"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS name="power" cd="poly"/>
<OMA>
<OMS name="minus" cd="arith1"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMI> 2 </OMI>
</OMA>
<OMI> 4 </OMI>
</OMA>
<OMI> 1 </OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">squarefree</csymbol>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">4</cn></apply>
<apply><csymbol cd="arith1">times</csymbol>
<cn type="integer">-4</cn>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
</apply>
</apply>
</apply>
<apply><csymbol cd="poly">squarefreed</csymbol>
<apply><csymbol cd="poly">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<apply><csymbol cd="poly">power</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>x</ci><cn type="integer">2</cn></apply>
<cn type="integer">4</cn>
</apply>
<cn type="integer">1</cn>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
squarefree
(
plus
(
power
(
x , 4 )
,
times
( -4 ,
power
(
x , 2 )
)
)
)
,
squarefreed
(
power
(
x , 2 )
,
power
(
minus
(
power
(
x , 2 )
, 4 )
, 1 )
)
)
Popcorn
poly.squarefree($x ^ 4 + -4 * $x ^ 2) = poly.squarefreed(poly.power($x, 2), poly.power($x ^ 2 - 4, 1))
Rendered Presentation MathML
squarefree
(
x
4
-
4
x
2
)
=
squarefreed
(
power
(
x
,
2
)
,
power
(
x
2
-
4
,
1
)
)
Signatures:
sts
Role:
application
Description:
The n-ary greatest common divisor of its polynomial arguments.
This is unique up to units.
Signatures:
sts
Role:
application
Description:
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.
Commented Mathematical property (CMP):
for all x,y lcm(x,y) = (x*y)/gcd(x,y)
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="x"/>
<OMV name="y"/>
</OMBVAR>
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="lcm" cd="poly"/>
<OMV name="x"/>
<OMV name="y"/>
</OMA>
<OMA>
<OMS name="divide" cd="arith1"/>
<OMA>
<OMS name="times" cd="arith1"/>
<OMV name="x"/>
<OMV name="y"/>
</OMA>
<OMA>
<OMS name="gcd" cd="poly"/>
<OMV name="x"/>
<OMV name="y"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci>x</ci></bvar>
<bvar><ci>y</ci></bvar>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">lcm</csymbol><ci>x</ci><ci>y</ci></apply>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="arith1">times</csymbol><ci>x</ci><ci>y</ci></apply>
<apply><csymbol cd="poly">gcd</csymbol><ci>x</ci><ci>y</ci></apply>
</apply>
</apply>
</bind>
</math>
Prefix
Popcorn
quant1.forall[$x, $y -> poly.lcm($x, $y) = ($x * $y) / poly.gcd($x, $y)]
Rendered Presentation MathML
∀
x
,
y
.
lcm
(
x
,
y
)
=
x
y
gcd
(
x
,
y
)
Signatures:
sts
Role:
application
Description:
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.
Commented Mathematical property (CMP):
discriminant(p,x)=resultant(p,diff(p,x),x)/leading_coefficient(p,x)
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="discriminant" cd="poly"/>
<OMV name="p"/>
<OMV name="x"/>
</OMA>
<OMA>
<OMS name="divide" cd="arith1"/>
<OMA>
<OMS name="resultant" cd="poly"/>
<OMV name="p"/>
<OMA>
<OMS name="diff" cd="calculus1"/>
<OMBIND>
<OMS name="lambda" cd="fns1"/>
<OMBVAR>
<OMV name="x"/>
</OMBVAR>
<OMV name="p"/>
</OMBIND>
</OMA>
<OMV name="x"/>
</OMA>
<OMA>
<OMS name="leading_coefficient" cd="poly"/>
<OMV name="p"/>
<OMV name="x"/>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">discriminant</csymbol><ci>p</ci><ci>x</ci></apply>
<apply><csymbol cd="arith1">divide</csymbol>
<apply><csymbol cd="poly">resultant</csymbol>
<ci>p</ci>
<apply><csymbol cd="calculus1">diff</csymbol>
<bind><csymbol cd="fns1">lambda</csymbol><bvar><ci>x</ci></bvar><ci>p</ci></bind>
</apply>
<ci>x</ci>
</apply>
<apply><csymbol cd="poly">leading_coefficient</csymbol><ci>p</ci><ci>x</ci></apply>
</apply>
</apply>
</math>
Prefix
Popcorn
poly.discriminant($p, $x) = poly.resultant($p, calculus1.diff(fns1.lambda[$x -> $p]), $x) / poly.leading_coefficient($p, $x)
Rendered Presentation MathML
discriminant
(
p
,
x
)
=
resultant
(
p
,
d
d
x
(
p
)
,
x
)
leading_coefficient
(
p
,
x
)
Signatures:
sts
Role:
application
Description:
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.
Commented Mathematical property (CMP):
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.
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS name="forall" cd="quant1"/>
<OMBVAR>
<OMV name="f"/>
<OMV name="g"/>
</OMBVAR>
<OMA>
<OMS name="implies" cd="logic1"/>
<OMA>
<OMS name="and" cd="logic1"/>
<OMA>
<OMS name="in" cd="set1"/>
<OMV name="f"/>
<OMA>
<OMS name="polynomial_ring_r" cd="polyr"/>
<OMV name="R"/>
<OMV name="x"/>
</OMA>
</OMA>
<OMA>
<OMS name="in" cd="set1"/>
<OMV name="g"/>
<OMA>
<OMS name="polynomial_ring_r" cd="polyr"/>
<OMV name="R"/>
<OMV name="x"/>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS name="implies" cd="logic1"/>
<OMBIND>
<OMS name="exists" cd="quant1"/>
<OMBVAR>
<OMV name="a"/>
</OMBVAR>
<OMA>
<OMS name="and" cd="logic1"/>
<OMA>
<OMS name="in" cd="set1"/>
<OMV name="a"/>
<OMV name="R"/>
</OMA>
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMV name="f"/>
<OMV name="a"/>
</OMA>
<OMS name="zero" cd="alg1"/>
</OMA>
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMV name="g"/>
<OMV name="a"/>
</OMA>
<OMS name="zero" cd="alg1"/>
</OMA>
</OMA>
</OMBIND>
<OMA>
<OMS name="eq" cd="relation1"/>
<OMA>
<OMS name="resultant" cd="poly"/>
<OMV name="f"/>
<OMV name="g"/>
<OMV name="x"/>
</OMA>
<OMS name="zero" cd="alg1"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci>f</ci></bvar>
<bvar><ci>g</ci></bvar>
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="set1">in</csymbol>
<ci>f</ci>
<apply><csymbol cd="polyr">polynomial_ring_r</csymbol><ci>R</ci><ci>x</ci></apply>
</apply>
<apply><csymbol cd="set1">in</csymbol>
<ci>g</ci>
<apply><csymbol cd="polyr">polynomial_ring_r</csymbol><ci>R</ci><ci>x</ci></apply>
</apply>
</apply>
<apply><csymbol cd="logic1">implies</csymbol>
<bind><csymbol cd="quant1">exists</csymbol>
<bvar><ci>a</ci></bvar>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="set1">in</csymbol><ci>a</ci><ci>R</ci></apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><ci>f</ci><ci>a</ci></apply>
<csymbol cd="alg1">zero</csymbol>
</apply>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><ci>g</ci><ci>a</ci></apply>
<csymbol cd="alg1">zero</csymbol>
</apply>
</apply>
</bind>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="poly">resultant</csymbol><ci>f</ci><ci>g</ci><ci>x</ci></apply>
<csymbol cd="alg1">zero</csymbol>
</apply>
</apply>
</apply>
</bind>
</math>
Prefix
forall
[
f
g
] .
(
implies
(
and
(
in
(
f ,
polynomial_ring_r
(
R ,
x )
)
,
in
(
g ,
polynomial_ring_r
(
R ,
x )
)
)
,
implies
(
exists
[
a
] .
(
and
(
in
(
a ,
R )
,
eq
(
f
(
a )
,
zero )
,
eq
(
g
(
a )
,
zero )
)
)
,
eq
(
resultant
(
f ,
g ,
x )
,
zero )
)
)
)
Popcorn
quant1.forall[$f, $g -> set1.in($f, polyr.polynomial_ring_r($R, $x)) and set1.in($g, polyr.polynomial_ring_r($R, $x)) ==> quant1.exists[$a -> set1.in($a, $R) and $f($a) = alg1.zero and $g($a) = alg1.zero] ==> poly.resultant($f, $g, $x) = alg1.zero]
Rendered Presentation MathML
∀
f
,
g
.
f
∈
polynomial_ring_r
(
R
,
x
)
∧
g
∈
polynomial_ring_r
(
R
,
x
)
⇒
∃
a
.
a
∈
R
∧
f
(
a
)
=
0
∧
g
(
a
)
=
0
⇒
resultant
(
f
,
g
,
x
)
=
0
Signatures:
sts
Role:
application
Description:
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.
Signatures:
sts