CoCoA:MapDown

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MapDown

convert a constant polynomial to a number

Description

This function converts a constant polynomial to the equivalent

coefficient. If the argument is not a constant polynomial, an error

is signalled.

Example

  Use Q[x,y,z];
  Type((x+1)^2 - x*(x+2));    -- value is seen as a polynomial
POLY
-------------------------------
  MapDown((x+1)^2 - x*(x+2)); -- attempt to map down to the coeff ring
1
-------------------------------
  Type(It);                   -- value is now simply a coefficient
RAT
-------------------------------
  MapDown((x+1)^2 - x^2);     -- 2*x + 1 is not a coefficient
ERROR: Cannot MapDown non-const poly
CONTEXT: Error(<quotes>Cannot MapDown non-const poly</quotes>)
-------------------------------

Syntax

MapDown(F:POLY):RAT or ZMOD
   <type>polynomial</type>