Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong 0th symbolic power of a matrix #25520

Open
sagetrac-tmonteil mannequin opened this issue Jun 6, 2018 · 1 comment
Open

Wrong 0th symbolic power of a matrix #25520

sagetrac-tmonteil mannequin opened this issue Jun 6, 2018 · 1 comment

Comments

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Jun 6, 2018

From this ask question, the symbolic power of a matrix gives a result that is correct when restricted to positive integers, but wrong on 0:

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]

CC: @mforets @slel

Component: symbolics

Issue created by migration from https://trac.sagemath.org/ticket/25520

@sagetrac-tmonteil sagetrac-tmonteil mannequin added this to the sage-8.3 milestone Jun 6, 2018
@nbruin
Copy link
Contributor

nbruin commented Jun 6, 2018

comment:1

This is not really something we can do anything about, I expect. It's just a consequence of

sage: (0^x).simplify()
0

which is wrong for x=0.

@mkoeppe mkoeppe removed this from the sage-8.3 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants