Ask Your Question

ScreenName's profile - activity

2021-05-15 15:26:08 +0200 received badge  Popular Question (source)
2018-10-07 23:28:37 +0200 received badge  Scholar (source)
2018-10-07 07:36:06 +0200 received badge  Supporter (source)
2018-10-07 07:03:05 +0200 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 07:02:50 +0200 received badge  Editor (source)
2018-10-06 12:58:04 +0200 received badge  Student (source)
2018-10-06 12:56:11 +0200 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).