Since Spν and Suν are Euclidean, we can work with canonical forms and modules over these rings. We consider Spν first.
The row-echelon form of a matrix over Spν has pivot entries which are polynomials of the form ud + ∑j=0d - 1 bjujqquad(where)qquad v(bj) + ν j >ν d for j in the sum, so that the Weierstrass degree is d and the Gauss valuation is dν.
The Hermite form additionally assures that the other entries in the columns with pivots are polynomials of smaller degree, via taking Quotrem. This can be made unique via suitable choices, and so provides a way of testing equality of modules.
The Smith form is computed by creating a matrix of pivots corresponding to a Hermite on the matrix and then a Hermite on the transpose. One also demands recursive divisibility of the resulting diagonal terms.
Over Suν the picture is the same, except that pivot entries of the echelon form are all CanonicalElements, with similar changes thereon. E.g., the Hermite form will have elements of smaller valuation above the pivots.
Given an Spν of Sνu ring and a (nonnegative) number of rows and columns, construct the matrix space.
Different ways of obtaining the zero matrix or identity matrix (if applicable) of a matrix ring.
Various ways of obtaining an SpMat or SuMat. The first takes a sequence of sequences of SpElements or SuElements, the second takes a row and column count and a sequence of SpElements or SuElements, and the third takes a sequence of SpVecs or SuVecs.
Returns a sequence of sequences of the Gauss valuations of the elements of a matrix. Since these can be ExtendedReals, the valuations themselves are put in an array rather than a matrix.
Returns a sequence of sequences of the Weierstrass degrees of the elements of a matrix. Since these can be ExtendedReals, the valuations themselves are put in an array rather than a matrix.
Returns a matrix (defined over the underlying power or Laurent series ring) which has the leading term of each element.
Returns a matrix (defined over the underlying power or Laurent series ring) which has the Weierstrass term of each element.
Returns whether every element in the matrix is nearly zero.
Transform: BoolElt Default: false
Returns the (row) echelon form E, and (if desired) the transform T such that E=TM.
Transform: BoolElt Default: false
Returns the Hermite form H, and (if desired) the transform T such that H=TM.
Returns the Smith form S, and (if desired) the transforms P, Q such that S=PMQ.
Return the kernel or image of an Spν or Suν matrix as a module space. The Image also has a Transform parameter that gives the inclusion.
> S<u> := SpRing (pAdicField (3, 20), 1/2); // slope 1/2 > M := SpMatrix (2, 3, [ S | u^2/3,u/3^2,0, u^3,3^2*u,3*u ]); > E, T := EchelonForm (M : Transform); assert E eq T*M; > LeadingTerms (E); [(3^-1 + O(3^19))*$.1^2 (3^-2 + O(3^18))*$.1 O($.1^20)] [O($.1^20) (3^2 + O(3^18))*$.1 (3 + O(3^21))*$.1] > WeierstrassTerms (E); // not the same [(3^-1 + O(3^19))*$.1^2 (3^-2 + O(3^18))*$.1 O($.1^20)] [O($.1^20) -(3^-1 + O(3^19))*$.1^2 (3 + O(3^21))*$.1]
> S<u> := SpRing (pAdicField (5, 10), 3/2); // slope 3/2 > M := SpMatrix (3,5,[S|5^3,u,u^2/5,0,0, 0,0,25,u^3/25,3*5, 0,0,0,0,5^2]); > H, T := HermiteForm (M : Transform); assert H eq T*M; > WeierstrassTerms(H); [5^3 + O(5^13) $.1 O($.1^20) -(5^-5 + O(5^5))*$.1^5 O($.1^20)] [O($.1^20) O($.1^20) 5^2 + O(5^9) (5^-2 + O(5^8))*$.1^3 O($.1^20)] [O($.1^20) O($.1^20) O($.1^20) O($.1^20) 5^2 + O(5^12)] > X, P, Q := SmithForm (M : Transform); assert P*M*Q eq X; > WeierstrassTerms(X); // note that 5^3 divides 5^2 in this ring! [5^3 + O(5^13) O($.1^20) O($.1^20) O($.1^20) O($.1^20)] [O($.1^20) 5^2 + O(5^9) O($.1^20) O($.1^20) O($.1^20)] [O($.1^20) O($.1^20) 5^2 + O(5^12) O($.1^20) O($.1^20)]
> S<u> := SuRing (pAdicField (5, 15), 2/3); // slope 2/3 > M := SuMatrix (2, 3, [ S | 5^2/u,0,u^2, u,5*u^2,5^3/u^2 ]); > E, T := EchelonForm (M : Transform); assert E eq T*M; > LeadingTerms (E); [$.1 (5 + O(5^16))*$.1^2 (5^3 + O(5^18))*$.1^-2] [O($.1^20) 5^3 + O(5^15) (5^5 + O(5^20))*$.1^-4] > WeierstrassTerms (E); // not the same, in lower right [$.1 (5 + O(5^16))*$.1^2 (5^3 + O(5^18))*$.1^-2] [O($.1^20) 5^3 + O(5^15) -$.1^2]
> A := [S | 25/u,u,u^2/5,0,0, 0,0,25,125/u^2,50*u, 0,0,0,0,5*u^2]; > M := SuMatrix (3, 5, A); > H, T := HermiteForm (M : Transform); assert H eq T*M; > W := WeierstrassTerms(H); W; [$.1^2 (5^-2 + O(5^13))*$.1^4 (5^-3 + O(5^12))*$.1^5 O($.1^20) O($.1^20)] [O($.1^20) O($.1^20) 5^2 + O(5^17) (5^3 + O(5^18))*$.1^-2 O($.1^20)] [O($.1^20) O($.1^20) O($.1^20) O($.1^20) (5 + O(5^16))*$.1^2] > assert CanonicalElement (S, 4/3) eq S!W[1,1]; > assert CanonicalElement (S, 2) eq S!W[2,3]; > assert CanonicalElement (S, 7/3) eq S!W[3,5]; > X, P, Q := SmithForm (M : Transform); assert X eq P*M*Q; > WeierstrassTerms(X); [(5^-1 + O(5^14))*$.1^2 O($.1^20) O($.1^20) O($.1^20) O($.1^20)] [O($.1^20) (5 + O(5^16))*$.1 O($.1^20) O($.1^20) O($.1^20)] [O($.1^20) O($.1^20) (5 + O(5^16))*$.1^2 O($.1^20) O($.1^20)]
These are implemented as "vectors" over Sνp or Sνu.
Given an Sνp or Sνu ring and a nonnegative integer, construct the module of that degree.
Given an Sνp or Sνu matrix, construct the associated module space. This always computes the Hermite form to use as the basis.
Given a sequence of SpVecs or SuVecs, construct the module space generated by them. Again this always computes the Hermite form for the basis.
Given a module space, return the (full) ambient space of dimension equal to the degree.
The Parent of an SpVec or SuVec is always its Ambient space.
Return the zero vector of a module space.
Given a sequence of Sνp or Sνu elements, construct the vector of them.
Given a module space, return a basis as a sequence of vectors.
Given a module space, return a basis as a matrix.
The dimension and degree of a module space.
The leading term of each element in an SpVec or SuVec.
The Weierstrass term of each element in an SpVec or SuVec.
Returns a sequence of sequences of the Gauss valuations of the elements of a matrix. Since these can be ExtendedReals, the valuations themselves are put in an array rather than a vector.
Returns a sequence of sequences of the Weierstrass degrees of the elements of a vector. Since these can be ExtendedReals, the valuations themselves are put in an array rather than a vector.
Return whether an SpVec or SuVec is weakly zero.
The sum and intersection of two module spaces. The use of DirectSum requires the summands to be disjoint.
The transformation of a module space by a matrix. The basis of the reuslting space will be given in Hermite form.
Determines whether xM=v is solvable, and it so returns such an x. The second version takes an a sequence of vectors, and the third takes a matrix (and also includes the kernel as a third return value).
Determines whether A is a subspace of B, and if so gives an inclusion map. Equality can be determined via symmetric inclusion, or alternatively via the Hermite form (which should be unique) of the basis matrix.
Here are some basic examples of usage for modules.
> S<u> := SpRing (pAdicField (5, 25), 1/2); // slope 1/2 > A := SpSpace (S, 3); > A.1; [ 1 + O(5^25) + O(u^20), O(u^20), O(u^20) ] > M := SpMatrix (2, 3, [ S | 5*u,5,u^2, 1/5,u^3,u ]); > B := SpSpace (M); assert Dimension(B) eq 2; > LeadingTerms(BasisMatrix(B)); [5^-1 + O(5^24) O($.1^20) $.1] [O($.1^20) -5 + O(5^26) (24 + O(5^25))*$.1^2] > B eq SpSpace (VerticalJoin (M, M)); // also gives inclusion true > A meet B eq B; true > Image(M) eq B; // by definition true > IsConsistent (M, A.1); false > IsConsistent (M, B.1); true > SpSpace([B.1]) + SpSpace([B.2]) eq B; true > SpSpace([B.1]) + SpSpace([u * B.2]) eq B; // u does not invert false > SpSpace([1/5 * B.1]) + SpSpace([5 * B.2]) eq B; true > sub<B|[B.1+B.2]> + sub<B|[B.2-B.1]> eq sub<B|[B.1,B.2]>; true
Here is an example over Sνp with a nontrivial kernel.
> S<u> := SpRing (pAdicField (7, 30), 1); // slope 1 > M := SpMatrix(3,5,[S|1,0,u,u^2,u, u^2/7,0,1,0,0, 0,0,1,0,u^4/7^2]); > ROWS := Rows(M); > V := u * ROWS[1] + u^2/7 * ROWS[3]; // create a kernel > MAT := SpMatrix(ROWS cat [Universe(ROWS)|V]); // 4 x 5 > Dimension (SpSpace (MAT)); // 3 3 > K := Kernel (MAT); K; SpSpace of degree 4, dimension 1 over Sp-slope ring of slope 1 given by Power series ring in $.1 over pAdicField(7, 30) Basis given by: [ (-1 + O(7^30))*u + O(u^21), O(u^21), (-7^-1 + O(7^29))*u^2 + O(u^21), 1 + O(7^30) + O(u^21) ] > KK := Kernel(BasisMatrix(K)); KK; SpSpace of degree 1, dimension 0 over Sp-slope ring of slope 1 given by Power series ring in $.1 over pAdicField(7, 30) > assert ZeroVector(Ambient(KK)) in KK;
Here is an example over Sνu.
> S<u> := SuRing (pAdicField (7, 20), 5/4); // slope 5/4 > A := SuSpace (S, 3); > B := SuSpace ([A.1, A.3]); // dimension 2 > SuSpace([B.1]) + SuSpace([7^5/u^4 * B.2]) eq B; // slope 5/4 true > Basis(sub<A|[A.1+A.3]>)[1] in B; true > M := SuMatrix (2, 3, [S | 7^2/u,7,5*7*u, 7,u^3,u^2 ]); > V := SuSpace(M); > I := V meet B; assert Dimension(I) eq 1; > v := Basis(I)[1]; assert v in I; > WeierstrassTerms(v); (7 + O(7^21) O($.1^20) $.1^2) > WeierstrassDegrees(v); [ 0, -Infinity, 2 ] > I + B eq B; assert v in B; true > J := VerticalJoin (M, M); > SetSeed(1); // ensure example works > JJ := (SuMatrixSpace(S,4,4)!RandomSLnZ(4,8,16)) * J; > assert Dimension(Kernel(JJ)) eq 2; > assert Dimension(Image(JJ)) eq 2;
Note that the final commands, with the dimension of the kernel/image of the given space, can sometimes fail for various reasons involving precision loss.