Ask Your Question
0

All Ideals of Ring

asked 2014-11-17 08:54:16 +0100

Babgen gravatar image

For given group G, by G.subgroups(), we can list all subgroups. now my question is :

Is there something for subgroups() for finding all left ideals of a given ring. For instance, k = GF(5); M = MatrixSpace(k,2,2) How can I have all left ideals?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-28 20:37:57 +0100

mmarco gravatar image

There is not a single command to achieve that, but in this particular case you can do the following:

sage: k = GF(5)
sage: M = MatrixSpace(k,2,2)
sage: units = [m for m in M if m.is_invertible()]
sage: nonunits = [m for m in M if not m.is_invertible()]
sage: len(units)
480
sage: len(nonunits)
145

Since every ideal must be generated by some nonunits, but also changing a generator by a unit times it does not change the ideal, let's check how many essentially distinct generators can we have:

sage: associated = []
sage: for m in nonunits:
....:     if not True in [a*m in associated for a in units]:
....:         associated.append(m)
....:         
sage: associated
[
[0 0]  [1 0]  [0 1]  [1 1]  [2 1]  [1 2]  [4 1]
[0 0], [0 0], [0 0], [0 0], [0 0], [0 0], [0 0]
]

That is, you only want to check for subsets of that set as possible generators of your ideals. But it is clear that two of those elements actually generate the other four, so you just need to check for ideals generated by up to two generators.

You have the trivial ideal, the other 6 principal ideals generated by the other elements in associated, and the only thing you need to check is if the ideal generated by two of them is the total one. It is easy to see that it is, but in case you don't notice at first sight you can just check it directly:

sage: for (a,b) in Tuples(units,2):
....:     if (a*associated[1] + b*associated[2]).is_invertible():
....:         print a
....:         print b
....:         break
....:     
[0 1]
[1 0]
[1 0]
[0 1]

There you are: only six nontrivial ideals, that happen to be principal.

edit flag offensive delete link more

Comments

Nice. Note that instead of True in [a*m in associated for a in units], you can use the more pythonic any([a*m in associated for a in units]).

tmonteil gravatar imagetmonteil ( 2014-11-29 03:34:23 +0100 )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: 2014-11-17 08:54:16 +0100

Seen: 690 times

Last updated: Nov 28 '14