Sage: Ticket #25520: Wrong 0th symbolic power of a matrix
https://trac.sagemath.org/ticket/25520
<p>
From <a class="ext-link" href="https://ask.sagemath.org/question/42532/more-problems-with-general-power-of-a-matrix/"><span class="icon"></span>this ask question</a>, the symbolic power of a matrix gives a result that is correct when restricted to positive integers, but wrong on 0:
</p>
<pre class="wiki">sage: A = matrix(QQbar,3,3,[[-2,-8,-12],[1,4,4],[0,0,1]])
sage: k = SR.var('k')
sage: B = A^k
sage: B
[ -2^k -4*2^k -4*2^k - 4]
[ 1/2*2^k 2*2^k 2*2^k]
[ 0 0 1]
sage: [B.subs(k=i) == A^i for i in range(20)]
[False,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True,
True]
sage: B.subs(k=0)
[ -1 -4 -8]
[1/2 2 2]
[ 0 0 1]
</pre>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/25520
Trac 1.1.6nbruinWed, 06 Jun 2018 20:50:00 GMT
https://trac.sagemath.org/ticket/25520#comment:1
https://trac.sagemath.org/ticket/25520#comment:1
<p>
This is not really something we can do anything about, I expect. It's just a consequence of
</p>
<pre class="wiki">sage: (0^x).simplify()
0
</pre><p>
which is wrong for <code>x=0</code>.
</p>
Ticket