Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004
FF=IntegerModRing(5) PolFF=PolynomialRing(FF,'x'); PolFF
Univariate Polynomial Ring in x over Ring of integers modulo 5
A=random_matrix(PolFF,3,3); A
[ x^2 + x + 3 4*x^2 + x + 1 4*x^2 + 1] [4*x^2 + x + 3 2*x^2 + 2*x 3*x^2 + x + 2] [ x^2 + x + 3 x^2 + x + 3 3*x^2 + 3*x]
A.smith_form()
([ 1 0 0] [ 0 1 0] [ 0 0 2*x^5 + 2*x^3 + x + 2], [ 3*x + 3 3*x + 4 0] [ 4*x^2 + 2*x + 2 x^2 + x + 3 2*x^2 + 2*x] [ x^6 + x^5 + 2*x^4 + x^3 + 3*x + 1 4*x^6 + x^5 + 4*x^4 + 4*x^3 + 4*x^2 + 3 3*x^6 + 2*x^5 + 4*x^4 + x^3 + 3*x^2 + 2*x + 1], [ 1 x^5 + x^4 + x^3 + 4 2*x^6 + x^5 + x^4 + 3*x^2 + x + 2] [ 0 3*x^2 + 4*x + 1 x^3 + 3*x + 2] [ 0 3 x + 2])
F=GF(7) PolF = PolynomialRing(F,'x')
f=PolF.random_element(); f
6*x + 4
S = PolF.quotient(1+x*f, 'a'); S
Univariate Quotient Polynomial Ring in a over Finite Field of size 7 with modulus x^2 + 3*x + 6
S.random_element()
5*a + 4
A=random_matrix(S,3,3); A
[5*a + 6 2 6*a + 1] [ 5*a 5*a 4*a + 4] [ 3 3*a + 5 3*a + 3]
A.smith_form()
( [1 0 0] [6*a + 1 0 0] [ 1 2*a + 5 3*a + 6] [0 1 0] [5*a + 4 5 0] [ 0 1 6*a + 2] [0 0 1], [5*a + 3 5*a + 5 a + 3], [ 0 0 1] )