Ask Your Question

ScreenName's profile - activity

2018-10-07 16:28:37 -0500 received badge  Scholar (source)
2018-10-07 00:36:06 -0500 received badge  Supporter (source)
2018-10-07 00:03:05 -0500 commented answer Characteristic polynomial of symbolic matrix of size 7

I added information in the original post. I tried to install the 8.4 beta7 version but it failed.

2018-10-07 00:02:50 -0500 received badge  Editor (source)
2018-10-06 05:58:04 -0500 received badge  Student (source)
2018-10-06 05:56:11 -0500 asked a question Characteristic polynomial of symbolic matrix of size 7

There is a problem when computing the characteristic polynomial of a matrix of size greater than 7 containing a large number of symbolic variables.

a = SR.var('a', 100)
M = identity_matrix(SR, 7)
for i in range(7):
  for j in range(7):
    M[i,j] = a[i*7+j]
print(M.charpoly().degree()) # prints 5

The value it should print is 7. Over $\mathbb{Z}[a_0,a_1,\dots]$, the result is correct.

I use Sage 8.3 (Release Date: 2018-08-03), installed from the official repository of Archlinux. The bug is present both in command line and with sage file.sage (if I copy and paste the code above).