sagemath/sage

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

comment:1

Wrong result on 9.5.rc1.

comment:2

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:

4d094d6Trac #33159: add special case to solve_right() for symbolic systems.

Author: Michael Orlitzky

Commit: 4d094d6

Reviewer: Daniel Krenn

Changed commit from 4d094d6 to 0abe6bd

comment:6

Thank you for your patch and for doing this so fast. This looks almost good to me.

  1. I've added a small easy patch myself to handle subrings of the symbolic ring as well.
  2. 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:

585dbcdTrac #33159: handle subrings of SR as well
0abe6bdTrac #33159: comment examples producing wrong output
comment:7

Replying to @dkrenn:

Thank you for your patch and for doing this so fast. This looks almost good to me.

  1. I've added a small easy patch myself to handle subrings of the symbolic ring as well.
  2. 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.

comment:8

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)).

comment:9

Thank you for resolving this.

slel commented
comment:10

Setting milestone to 9.6 now that 9.5 is out.

Changed branch from u/dkrenn/ticket/33159 to 0abe6bd

Changed commit from 0abe6bd to none

comment:12

Follow-up in #33392