Ask Your Question

po's profile - activity

2024-07-10 09:47:43 +0100 marked best answer List of all invariant factors (finite abelian groups)

I'm looking for a Sagemath builtin function giving the list of all the possible invariant factors of an abelian group with given finite order (say n)?

In Sagemath terminology, invariant factor is known as elementary divisor

For instance, if n = 48, it should return something like this:

[[2, 2, 2, 6], [2, 2, 12], [2, 24], [4, 12], [48]]

Or perhaps the list of all the possible elementary divisors in the proper sense.

This is not group theory but more or less combinatorics or counting.

2024-07-10 09:47:39 +0100 commented answer List of all invariant factors (finite abelian groups)

Thanks for this code, it handles efficiently groups of order 2**50 (for instance), there are Partitions(50).cardinality(

2024-07-07 22:35:18 +0100 received badge  Editor (source)
2024-07-07 22:35:18 +0100 edited question List of all invariant factors (finite abelian groups)

List of all invariant factors (finite abelian groups) I'm looking for a Sagemath builtin function giving the list of all

2024-07-07 22:34:25 +0100 asked a question List of all invariant factors (finite abelian groups)

List of all invariant factors (finite abelian groups) I'm looking for a Sagemath builtin function giving the list of all

2022-11-03 10:18:53 +0100 commented question conda-forge install SageMath 9.7 fails

Thanks. I opened an issue

2022-10-25 17:01:40 +0100 asked a question conda-forge install SageMath 9.7 fails

conda-forge install SageMath 9.7 fails I tried to install SageMath 9.7 from conda-forge (my OS is Ubuntu 18.04) followin

2022-10-23 22:17:46 +0100 marked best answer `repr` applied on a matrix

Typically, the repr function returns a string that can be executed and yield the same value as the object. In sageMath, this is not the case for a matrix : repr has the same behaviour as the str function has and str applied to a matrix returns a "nice" representation of it:

M=matrix([[1, 1],[1, 1]])

print(repr(M)==str(M)) 
print(M)

printing

True
[1 1]
[1 1]

This is not the behaviour I was expecting. To compare with Numpy:

from numpy import array

M = array([[1, 1], [1, 1]])

print(repr(M))
print()
print(M)

outpouting

array([[1, 1],
       [1, 1]])

[[1 1]
 [1 1]]

Do I need to write my own repr function when applied to a matrix?

2022-10-23 22:17:46 +0100 received badge  Scholar (source)
2022-10-22 12:05:00 +0100 asked a question `repr` applied on a matrix

`repr` applied on a matrix Typically, the repr function returns a string that can be executed and yield the same value a

2021-06-16 16:26:24 +0100 received badge  Supporter (source)
2021-06-16 11:05:27 +0100 commented question assume causes a solving failure

Emmanuel, thanks for your detailed examination.

2021-06-11 13:30:39 +0100 received badge  Nice Question (source)
2021-06-10 21:29:21 +0100 received badge  Student (source)
2021-06-10 12:56:13 +0100 asked a question assume causes a solving failure

assume causes a solving failure This code var("a b") assume(a, "real") equation=[a+b==0] s=solve(equation, a, b) print(