ApCoCoA-1:Weyl.WeylMul

From ApCoCoAWiki
Revision as of 17:14, 2 October 2020 by AndraschkoBot (talk | contribs) (hm.)

Weyl.WeylMul

Computes the product F*G of two Weyl polynomials, F and G, in normal form.

Syntax

Weyl.WeylMul(F:POLY,G:POLY):POLY

Description

Warning: This function is too slow for working with polynomials in large degree and large or zero characteristic.

Use Weyl.WMul instead for faster calculations.

This method multiplies F and G and returns F*G as a Weyl polynomial in normal form.

  • @param F A Weyl polynomial.

  • @param G A Weyl polynomial.

  • @result The product F*G as a Weyl polynomial in normal form.

Example

A1::=QQ[x,d];	--Define appropriate ring
Use A1;
F:=x; G:=d;
Weyl.WeylMul(F,G);
xd
-------------------------------
Weyl.WeylMul(G,F);
xd + 1
-------------------------------
Weyl.WeylMul(Weyl.WeylMul(G,F)-2G,F^3+G);
x^4d - 2x^3d + 4x^3 + xd^2 - 6x^2 - 2d^2 + d
-------------------------------
-- If you want to multiply Weyl polynomials that are not in normal form say for
-- example F=d^2x^3-2dx^2+7 and G=2d^3x-5xd+3, then first convert them into normal
-- form before multiplication.
-------------------------------
F:=Weyl.WNormalForm([[d^2,x^3],[-2d,x^2],[7]]);
F;
x^3d^2 + 4x^2d + 2x + 7
-------------------------------
G:=Weyl.WNormalForm([[2d^3,x],[-5x,d],[3]]);
G;
2xd^3 - 5xd + 6d^2 + 3
-------------------------------
Weyl.WeylMul(F,G);
2x^4d^5 - 5x^4d^3 + 18x^3d^4 - 27x^3d^2 + 36x^2d^3 + 14xd^3 - 18x^2d + 12xd^2 - 35xd + 42d^2 + 6x + 21
-------------------------------
Weyl.WeylMul(G,F);
2x^4d^5 - 5x^4d^3 + 32x^3d^4 - 32x^3d^2 + 148x^2d^3 + 14xd^3 - 38x^2d + 216xd^2 - 35xd + 42d^2 - 4x + 72d + 21
-------------------------------
Weyl.WeylMul(Weyl.WNormalForm([[d^2,x^3],[-2d,x^2],[7]]),Weyl.WNormalForm([[2d^3,x],[-5x,d],[3]]));
2x^4d^5 - 5x^4d^3 + 18x^3d^4 - 27x^3d^2 + 36x^2d^3 + 14xd^3 - 18x^2d + 12xd^2 - 35xd + 42d^2 + 6x + 21
-------------------------------

See also

Weyl.WNormalForm

Weyl.WMul

Weyl.WMult