ApCoCoA-1:SB.TermRepr

From ApCoCoAWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This article is about a function from ApCoCoA-1. If you are looking for the ApCoCoA-2 version of it, see Package sagbi/SB.FindLTRepr.

SB.TermRepr

Computes a representation of a term in other terms if it exists.

Syntax

SB.TermRepr(Term:POLY,TermList:LIST of POLY):LIST of INT
SB.TermRepr(Term:POLY,TermList:LIST of POLY,ReprType:INT):LIST of INT

Description

This functions tries to compute a term representation of the given term Term in terms of the list TermList. If it is not possible to get such a representation NULL will be returned. If a representation exists a list of integers will be returned which gives the exponents of the power product of the term in the other terms, e.g. for the term Term=x^2y and the list of terms TermList=[x,y] the function will return [2,1] as the representation.

With the optional parameter ReprType it is possible to choose between different ways of getting a possible representation.

  • @param Term A term in the current ring.

  • @param TermList A list of terms in the current ring.

  • @return A list of integers, which gives the representation, or NULL.

The following parameter is optional:

  • @param ReprType Either 0,1 or 2. With this parameter it is possible to choose between different ways of getting the representation: By ReprType=0 a toric ideal is used to compute the representation. This is also the default value. By ReprType=1 algebra homomorphisms are used, by ReprType=2 a system of diophantine equations is used to compute the representation.

Example

Use R::=QQ[x,y];

SB.TermRepr(x^2y^2,[x,y]);
SB.TermRepr(x^2y^2,[xy^2,x,y]);

-------------------------------------------------------
-- output:

[2, 2]
-------------------------------
[1, 1, 0]
-------------------------------
-- Done.
-------------------------------

Example

Use R::=QQ[x,y,z];

L:=[x^2y^4z^8,xy^3,z^5];
SB.TermRepr(xy^4z,L); -- for xy^4z no representation is existing
T:=L[1]^3L[3]^2; -- T = (x^2y^4z^8)^3 * (xy^3)^0 * (z^5)^2
T;
SB.TermRepr(T,L);

-------------------------------------------------------
-- output:

NULL
-------------------------------
x^6y^12z^34
-------------------------------
[3, 0, 2]
-------------------------------
-- Done.
-------------------------------