Skip to content

Commit 70e4687

Browse files
committed
Add test for rational division and try with coefficients in GF(5)
1 parent 0ab036a commit 70e4687

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sage/combinat/key_polynomial.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,18 @@ class KeyPolynomialBasis(CombinatorialFreeModule):
220220
sage: k = KeyPolynomialBasis(QQ)
221221
sage: k([3,0,1,2])
222222
k[3, 0, 1, 2]
223+
sage: k([3,0,1,2])/2
224+
1/2*k[3, 0, 1, 2]
223225
sage: R = k.polynomial_ring(); R
224226
Infinite polynomial ring in z over Rational Field
225227
228+
sage: K = KeyPolynomialBasis(GF(5)); K
229+
Key polynomial basis over Finite Field of size 5
230+
sage: 2*K([3,0,1,2])
231+
2*k[3, 0, 1, 2]
232+
sage: 5*(K([3,0,1,2]) + K([3,1,1]))
233+
0
234+
226235
We can expand them in the standard monomial basis::
227236
228237
sage: k([3,0,1,2]).expand()

0 commit comments

Comments
 (0)