# ApCoCoA-1:Weyl.WSPoly

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 This article is about a function from ApCoCoA-1.

## Weyl.WSPoly

Computes the S-polynomial of two Weyl polynomials.

### Syntax

```Weyl.WSPoly(F:POLY,G:POLY):POLY
```

### Description

Computes the S-polynomial of F and G.

• @param F A Weyl polynomial in normal form.

• @param G A Weyl polynomial in normal form.

• @result The S-polynomial of F and G.

Note: All polynomials that are not in normal form should be first converted into normal form using Weyl.WNormalForm, otherwise you may get unexpected results.

#### Example

```W3::=ZZ/(7)[x[1..3],d[1..3]];
Use W3;
F1:=-d^3d^5d^5+x^5;
F2:=-3xd^5d^5+xd^3;
F3:=-2d^4d^5-xd^7+x^3d^5;
Weyl.WSPoly(F1,F2);
xd^6 - 3x^6
-------------------------------
Weyl.WSPoly(F2,F3);
-3xxd^7d^5 + 3xx^3d^10 + 3xx^2d^9 - 2xxd^8 - 2xd^7 - 2xd^7
-------------------------------
Weyl.WSPoly(F1,F3);
-xd^7d^5 + x^3d^10 + x^2d^9 - 3xd^8 - 3d^7 - 2x^5d
-------------------------------
Weyl.WSPoly(F3,F1);
xd^7d^5 - x^3d^10 - x^2d^9 + 3xd^8 + 3d^7 + 2x^5d
-------------------------------
```