Difference between revisions of "ApCoCoA-1:Weyl.WeylMul"
From ApCoCoAWiki
(Change Wiki-category) |
|||
Line 1: | Line 1: | ||
<command> | <command> | ||
<title>Weyl.WeylMul</title> | <title>Weyl.WeylMul</title> | ||
− | <short_description>Computes the product F*G of Weyl polynomial F and G in normal form | + | <short_description>Computes the product F*G of Weyl polynomial F and G in normal form.</short_description> |
− | |||
− | |||
− | |||
<syntax> | <syntax> | ||
− | Weyl.WeylMul(F,G): | + | Weyl.WeylMul(F:POLY,G:POLY):POLY |
</syntax> | </syntax> | ||
<description> | <description> | ||
+ | <em>Warning</em> This function is too slow for working with polynomials in large degree and large/zero characteristic. | ||
+ | Use <ref>Weyl.WMul</ref> instead for faster calculations. | ||
+ | <par/> | ||
+ | This method multiplies F and G and returns F*G as a WeylPolynom in normal form. | ||
− | + | <itemize> | |
+ | <item>@param <em>F</em> A Weyl polynomial.</item> | ||
+ | <item>@param <em>G</em> A Weyl polynomial.</item> | ||
+ | <item>@result The product F*G as a Weyl polynomial in normal form.</item> | ||
+ | </itemize> | ||
<example> | <example> | ||
Line 27: | Line 32: | ||
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. | 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. | + | F:=Weyl.WNormalForm([[d^2,x^3],[-2d,x^2],[7]]); |
F; | F; | ||
x^3d^2 + 4x^2d + 2x + 7 | x^3d^2 + 4x^2d + 2x + 7 | ||
------------------------------- | ------------------------------- | ||
− | G:=Weyl. | + | G:=Weyl.WNormalForm([[2d^3,x],[-5x,d],[3]]); |
G; | G; | ||
2xd^3 - 5xd + 6d^2 + 3 | 2xd^3 - 5xd + 6d^2 + 3 | ||
Line 53: | Line 58: | ||
<types> | <types> | ||
<type>cocoaserver</type> | <type>cocoaserver</type> | ||
+ | <type>poly</type> | ||
</types> | </types> | ||
<key>weyl.weylmul</key> | <key>weyl.weylmul</key> | ||
+ | <key>weylmul</key> | ||
<wiki-category>Package_weyl</wiki-category> | <wiki-category>Package_weyl</wiki-category> | ||
</command> | </command> |
Revision as of 13:18, 23 April 2009
Weyl.WeylMul
Computes the product F*G of Weyl polynomial 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/zero characteristic.
Use Weyl.WMul instead for faster calculations.
This method multiplies F and G and returns F*G as a WeylPolynom 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.WeylNormalForm([[d^2,x^3],[-2d,x^2],[7]]),Weyl.WeylNormalForm([[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