wrong result solving equation system with symbolic matrix
Closed this issue · 17 comments
We get
sage: Matrix(SR, [[1, 1]]).solve_left(vector(SR, [2, 3]))
(2)
which is wrong. This works for matrices over QQ as we can see by
sage: Matrix([[1, 1]]).solve_left(vector([2, 3]))
ValueError: matrix equation has no solutions
CC: @mwageringel
Component: symbolics
Author: Michael Orlitzky
Branch: 0abe6bd
Reviewer: Daniel Krenn
Issue created by migration from https://trac.sagemath.org/ticket/33159
Wrong result on 9.5.rc1.
This is essentially #29729. Work stalled there because we don't have a solution for ball fields, but I think I can move my commit for SR to this ticket to fix this issue.
New commits:
4d094d6 | Trac #33159: add special case to solve_right() for symbolic systems. |
Author: Michael Orlitzky
Branch: u/mjo/ticket/33159
Reviewer: Daniel Krenn
Changed branch from u/mjo/ticket/33159 to u/dkrenn/ticket/33159
Thank you for your patch and for doing this so fast. This looks almost good to me.
- I've added a small easy patch myself to handle subrings of the symbolic ring as well.
- I commented on the examples where no check is performed, so that it clearly states that the result is wrong in this case.
Everything else is fine for me. Patchbot not yet done. Please cross-review my changes.
New commits:
585dbcd | Trac #33159: handle subrings of SR as well |
0abe6bd | Trac #33159: comment examples producing wrong output |
Replying to @dkrenn:
Thank you for your patch and for doing this so fast. This looks almost good to me.
- I've added a small easy patch myself to handle subrings of the symbolic ring as well.
- I commented on the examples where no check is performed, so that it clearly states that the result is wrong in this case.
Both good ideas, thanks.
Set to positive_review as everyone is happy and the patchbot as well (the failing of the docbuild plugin seems to be an issue of that particular patchbot (which was cleanly restarted a moment ago)).
Thank you for resolving this.
Setting milestone to 9.6 now that 9.5 is out.
Changed branch from u/dkrenn/ticket/33159 to 0abe6bd