CoCoA:Monic

From ApCoCoAWiki

Monic

divide polynomials by their leading coefficients

Description

In the first form, this function returns F divided by its leading

coefficient (see <ttref>LC</ttref>) or, if F is zero, it returns zero.

In its second form, it returns the list obtained by applying the first

form of Monic to each of the components of L.

Example

  Use R ::= Q[x,y];
  L := [4x^5-y^2,3x-2y^4];
  Monic(L);
[x^5 - 1/4y^2, y^4 - 3/2x]
-------------------------------
  Use R ::= Z[x,y];
-- WARNING: Coeffs are not in a field
-- GBasis-related computations could fail to terminate or be wrong
-------------------------------

-------------------------------
  L := [4x^5-y^2,3x-2y^4];
Monic(L);  -- can't invert coefficients over Z

-------------------------------
ERROR: Cannot divide
CONTEXT: Cond(Type(X) = LIST, [Monic(A)|A IN X], IsZero(X), X, X / LC(X))
-------------------------------
  Use R ::= Z/(5)[x,y];
  F := 2x^2+4y^3;
  Monic(F);
y^3 - 2x^2
-------------------------------

Syntax

Monic(F:POLY):POLY
Monic(L:LIST of POLY):LIST of POLY

LC

   <type>list</type>
   <type>polynomial</type>