Ask Your Question
0

Compute facts about modules

asked 2023-10-20 14:23:13 +0200

anonymous user

Anonymous

I am new to programming in general but in my project, I am required to work with a finite set ๐‘†={๐ด_1,...,๐ด_๐‘›} of ๐‘šร—๐‘› matrices over a finite ring ๐‘… , and the submodule ๐‘€ they generate. To be more specific, I would like to compute facts such as: Maximal lin. indep. set of columns for each matrix, maximal lin. indep. subset of ๐‘† , minimal generating set of ๐‘€ , span of S, length of ๐‘€ and a composition series if it exists, and free rank of largest free submodule of ๐‘€ (or possibly the set of all submodules/free submodules of ๐‘€ , which is finite since ๐‘… and ๐‘† are finite). However, while browsing through the documentation in the Sage website, I found very little in terms of commands that compute the above facts for suitable ๐‘… , could someone point out a package or set of commands that compute (some of) the above stuff? I apologize in advance if the question violates forum rules.

edit retag flag offensive close merge delete

Comments

Homework ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2023-10-21 10:13:14 +0200 )edit

It is not homework, I recently started a project where I will have to compute invariants like this all the time

ExtraJoker gravatar imageExtraJoker ( 2023-10-21 21:28:09 +0200 )edit

Can you please specify what sorts of finite rings you will be working over?

John Palmieri gravatar imageJohn Palmieri ( 2023-10-22 00:37:57 +0200 )edit

I sincerely apologize for the late reply, but I'll be working with the ring Z/nZ, for possibly composite n, a Galois ring GR(p,n,r), or a suitable extension of the latter two.

ExtraJoker gravatar imageExtraJoker ( 2023-10-23 10:32:45 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-10-21 23:59:16 +0200

Max Alekseyev gravatar image

updated 2023-10-22 00:03:39 +0200

Check out this Sage Quick Reference: Linear Algebra

For example, for "Maximal lin. indep. set of columns for each matrix" you can use

A.pivot_rows() indices of rows spanning row space

just transpose the matrix below applying it: A.T.pivot_rows()

The same method can be used for "maximal lin. indep. subset of ๐‘†" - just flatten each given matrix and consider them as row-vectors.

edit flag offensive delete link more

Comments

This doesn't work for me over a ring like Z/8, which I think is what the poster has in mind.

John Palmieri gravatar imageJohn Palmieri ( 2023-10-22 00:37:42 +0200 )edit

It's hard to understand what they really want without an example.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-10-22 01:23:45 +0200 )edit

See https://math.stackexchange.com/questi... โ€” same question before it appeared here.

John Palmieri gravatar imageJohn Palmieri ( 2023-10-22 02:11:02 +0200 )edit

Dear Max Alekseyev, I apologize for the late reply. For example, given a matrix with rows {a,b,c},{d,e,f},{g,h,i},{j,k,l} (he ring Z/nZ, for possibly composite n, a Galois ring GR(p,n,r), or a suitable extension of the latter two), I would like to compute the minimal generating set of vectors for its row or column space, the maximal independent set of rows etc. Or, given a set of matrices, possibly compute linear dependence between them etc. I had the same idea as you, to flatten the matrix before doing computations, but I do not know how to implement it in the case of the rings in question.

ExtraJoker gravatar imageExtraJoker ( 2023-10-23 10:58:26 +0200 )edit

Flattening matrix M into a vector can be done via vector(M.list()). There still may an issue that linear algebra is poorly implemented over rings in Sage. For rings like $Z/nZ$, we may consider a workaround working with the integer lattice spanned by the original basis together with the columns of $n$ times the identity matrix.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-10-23 22:39:39 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-10-20 14:23:13 +0200

Seen: 175 times

Last updated: Oct 22 '23