OpenMath Content Dictionary: polyslp

Canonical URL:
http://www.openmath.org/cd/polyslp.ocd
CD Base:
http://www.openmath.org/cd
CD File:
polyslp.ocd
CD as XML Encoded OpenMath:
polyslp.omcd
Defines:
const_node, depth, inp_node, left_ref, length, monte_carlo_eq, node_selector, op_node, poly_ring_SLP, polynomial_SLP, prog_body, quotient, return_node, right_ref, slp_degree
Date:
2004-03-30
Version:
3 (Revision 2)
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 operators to deal with polynomials and more precisely polynomials held in Straight Line Program representation.

    Definition of data-structure constructors
  

polynomial_SLP

Role:
application
Description:

The constructor of Polynomials built with Straight Line Program representation. The first argument is the polynomial ring containing the polynomial built with poly_ring_SLP, The second argument is the program body built with prog_body.

Example:
The polynomial x^2 + y^2, which may be represented as the Straight Line Program : line 1 : InputNode x line 2 : InputNode y line 3 : OperationNode times line 1, line 1 line 4 : OperationNode times line 2, line 2 line 5 : OperationNode plus line 3, line 4 > may be encoded as :
polynomial_SLP ( poly_ring_SLP ( Z , x , y ) , prog_body ( inp_node ( x ) , inp_node ( y ) , op_node ( times , 1 , 1 ) , op_node ( times , 2 , 2 ) , return ( op_node ( plus , 3 , 4 ) ) ) )
Signatures:
sts


[Next: prog_body] [Last: poly_ring_SLP] [Top]

prog_body

Role:
application
Description:

The constructor of the body of the straight line program the arguments represent straight line instructions, as constructed by the following three constructors, op_node, inp_node and const_node, possibly wrapped in the return symbol (from the opnode CD). The order is taken to be the order in which they appear.

Signatures:
sts


[Next: op_node] [Previous: polynomial_SLP] [Top]

op_node

Role:
application
Description:

This constructor takes three arguments. The first argument is a symbol from opnode, meant to specify whether the node is a plus, minus times or divide node, the second and third arguments are integers, which are the numbers of the lines which are the arguments of the operation

Signatures:
sts


[Next: inp_node] [Previous: prog_body] [Top]

inp_node

Role:
application
Description:

This constructor takes one argument, which is a variable. The return value is intended to represent an input node.

Signatures:
sts


[Next: const_node] [Previous: op_node] [Top]

const_node

Role:
application
Description:

This constructor takes one argument, which is a value from the coefficient ring. It is intended to represent a constant node.

Signatures:
sts


[Next: length] [Previous: inp_node] [Top]
    Definition of some functions which are specific to slps
  

length

Role:
application
Description:

A unary function taking an slp as argument and returning the length of this slp.

Signatures:
sts


[Next: depth] [Previous: const_node] [Top]

depth

Role:
application
Description:

A unary function taking an slp as argument and returning the greatest depth of any leaf node, that is the length of the longest contiguous path to any leaf node.

Signatures:
sts


[Next: slp_degree] [Previous: length] [Top]

slp_degree

Role:
application
Description:

A unary function taking an slp as argument and returning the apparent multiplicative degree of the slp, without performing any cancellation.

Commented Mathematical property (CMP):
The slp_degree of the polynomial x >= degree(x)
Formal Mathematical property (FMP):
slp_degree ( x ) degree ( x )
Example:
slpDegree(convert(x^2)@poly_ring_SLP - convert(x^2)@poly_ring_SLP) = 2
polynomial_SLP ( poly_ring_SLP ( Z , x ) , prog_body ( inp_node ( x ) , op_node ( times , 1 , 1 ) , return ( op_node ( minus , 2 , 2 ) ) ) ) = 2
Signatures:
sts


[Next: return_node] [Previous: depth] [Top]

return_node

Role:
application
Description:

Takes an slp as the argument, and returns the return node of the slp.

Signatures:
sts


[Next: node_selector] [Previous: slp_degree] [Top]

node_selector

Role:
application
Description:

Takes an slp as the first argument, the second argument is the position of the required node. Returns the node of the slp at this position.

Signatures:
sts


[Next: left_ref] [Previous: return_node] [Top]

left_ref

Role:
application
Description:

Takes as argument a node of an slp. Returns the value of the left hand pointer of the node.

Signatures:
sts


[Next: right_ref] [Previous: node_selector] [Top]

right_ref

Role:
application
Description:

Takes as argument a node of an slp. Returns the value of the right hand pointer of the node.

Signatures:
sts


[Next: quotient] [Previous: left_ref] [Top]
    Definition of some functions which are very useful for slps
  

quotient

Role:
application
Description:

A quotient function for polynomials represented by slps. It is a requirement that this is an exact division.

Signatures:
sts


[Next: monte_carlo_eq] [Previous: right_ref] [Top]

monte_carlo_eq

Role:
application
Description:

This is a Monte-Carlo equality test, it takes three arguments, the first two are slps representing polynomials, the third argument is the maximum probability of incorrectness that is required of the equality test. (Monte-Carlo equality tests are very important for slps as they offer the only tractable method of solving the equality problem in many cases)

Signatures:
sts


[Next: poly_ring_SLP] [Previous: quotient] [Top]

poly_ring_SLP

Role:
application
Description:

The constructor of the polynomial ring. The first argument is a ring, (the ring of the coefficients), the rest are the variables, in any order.

Example:
An example to represent a polynomial ring over the integers, with the two variables x,y. viz. Z[x,y]
poly_ring_SLP ( Z , x , y )
Signatures:
sts


[First: polynomial_SLP] [Previous: monte_carlo_eq] [Top]