@@ -4098,12 +4098,12 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4098
4098
4099
4099
sage: ring. <x> = GF( 7) []
4100
4100
sage: mat = matrix( [[x*(x-1)*(x-2), (x-2)*(x-3)*(x-4), (x-4)*(x-5)*(x-6) ]])
4101
- sage: print ( mat)
4101
+ sage: mat
4102
4102
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6 ]
4103
- sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; print ( rcomp)
4103
+ sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; rcomp
4104
4104
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2 ]
4105
4105
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x ]
4106
- sage: basis = mat. stack( rcomp) ; print ( basis)
4106
+ sage: basis = mat. stack( rcomp) ; basis
4107
4107
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6 ]
4108
4108
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2 ]
4109
4109
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x ]
@@ -4116,7 +4116,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4116
4116
sage: mat = matrix( ring, 2, 3, \
4117
4117
[[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4 ], \
4118
4118
[5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3 ]])
4119
- sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; print ( rcomp)
4119
+ sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; rcomp
4120
4120
[ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x ]
4121
4121
sage: mat. stack( rcomp) . determinant( )
4122
4122
3
@@ -4133,9 +4133,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4133
4133
[x + 3 0 ]
4134
4134
[ 0 0 ]
4135
4135
[ 0 0 ]
4136
- sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; print ( rcomp)
4136
+ sage: rcomp = mat. _basis_completion_via_reversed_approx( ) ; rcomp
4137
4137
[x + 1 2*x ]
4138
- sage: ccomp = mat. transpose( ) . _basis_completion_via_reversed_approx( ) . transpose( ) ; print ( ccomp)
4138
+ sage: ccomp = mat. transpose( ) . _basis_completion_via_reversed_approx( ) . transpose( ) ; ccomp
4139
4139
[3*x + 1 4*x + 4 ]
4140
4140
[ 2*x 5*x + 1 ]
4141
4141
[ 6*x x ]
@@ -4282,9 +4282,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4282
4282
- ``row_wise`` -- ( optional, default: ``True``) boolean, if ``True`` then
4283
4283
compute a row-wise completion, else compute a column-wise completion.
4284
4284
4285
- - ``algorithm`` -- ( optional, default: ``approximant``) selects the
4285
+ - ``algorithm`` -- ( optional, default: ``" approximant" ``) selects the
4286
4286
approach for computing the completion; currently supported:
4287
- ``approximant`` and ``smith``.
4287
+ ``" approximant" `` and ``" smith" ``.
4288
4288
4289
4289
OUTPUT: a matrix over the same base ring as the input matrix, which forms a
4290
4290
completion as defined above.
@@ -4307,12 +4307,12 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4307
4307
4308
4308
sage: ring. <x> = GF( 7) []
4309
4309
sage: mat = matrix( [[x*(x-1)*(x-2), (x-2)*(x-3)*(x-4), (x-4)*(x-5)*(x-6) ]])
4310
- sage: print ( mat)
4310
+ sage: mat
4311
4311
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6 ]
4312
- sage: rcomp = mat. basis_completion( ) ; print ( rcomp)
4312
+ sage: rcomp = mat. basis_completion( ) ; rcomp
4313
4313
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2 ]
4314
4314
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x ]
4315
- sage: basis = mat. stack( rcomp) ; print ( basis)
4315
+ sage: basis = mat. stack( rcomp) ; basis
4316
4316
[ x^3 + 4*x^2 + 2*x x^3 + 5*x^2 + 5*x + 4 x^3 + 6*x^2 + 4*x + 6 ]
4317
4317
[ 5*x^2 + 4*x + 1 5*x^2 + 2*x 5*x^2 ]
4318
4318
[ 2*x^3 + 4*x^2 2*x^3 + 6*x^2 + 2*x + 1 2*x^3 + x^2 + 3*x ]
@@ -4326,11 +4326,11 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4326
4326
sage: mat = matrix( ring, 2, 3, \
4327
4327
[[x^2 + 5*x + 5, 3*x^2 + x + 3, 4*x^2 + 5*x + 4 ], \
4328
4328
[5*x^2 + 4*x, 3*x^2 + 4*x + 5, 5*x^2 + 5*x + 3 ]])
4329
- sage: rcomp = mat. basis_completion( ) ; print ( rcomp)
4329
+ sage: rcomp = mat. basis_completion( ) ; rcomp
4330
4330
[ 2*x^2 + 1 4*x^2 + 3*x 2*x^2 + 3*x ]
4331
4331
sage: mat. stack( rcomp) . determinant( )
4332
4332
3
4333
- sage: print ( mat. basis_completion( row_wise=False) )
4333
+ sage: mat. basis_completion( row_wise=False)
4334
4334
[]
4335
4335
4336
4336
The following matrix has rank 1 and its nonzero Smith factor is `x+ 3`.
@@ -4345,9 +4345,9 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4345
4345
[x + 3 0 ]
4346
4346
[ 0 0 ]
4347
4347
[ 0 0 ]
4348
- sage: rcomp = mat. basis_completion( ) ; print ( rcomp)
4348
+ sage: rcomp = mat. basis_completion( ) ; rcomp
4349
4349
[x + 1 2*x ]
4350
- sage: ccomp = mat. basis_completion( row_wise=False) ; print ( ccomp)
4350
+ sage: ccomp = mat. basis_completion( row_wise=False) ; ccomp
4351
4351
[3*x + 1 4*x + 4 ]
4352
4352
[ 2*x 5*x + 1 ]
4353
4353
[ 6*x x ]
@@ -4506,7 +4506,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense):
4506
4506
False
4507
4507
4508
4508
sage: zero_mat = matrix( ring, 2, 2)
4509
- sage: comp = zero_mat. basis_completion( ) ; print ( comp)
4509
+ sage: comp = zero_mat. basis_completion( ) ; comp
4510
4510
[1 0 ]
4511
4511
[0 1 ]
4512
4512
sage: comp. _is_basis_completion( zero_mat, row_wise=True)
0 commit comments