system eqs + eq with abs() then solve() kills the Kernel

asked 2021-08-02 10:28:54 +0200

ortollj gravatar image

updated 2023-01-09 23:59:55 +0200

tmonteil gravatar image

Hi

W10 ,SageMath 9.2

if I uncomment line 3 below, it kills the Kernel.

varL=var('a,b,c,d',domain='real')
eqL=[a == -d, b*c == 0, a*(b + c) == 0]
#eqL.append((abs(a)+abs(b)+abs(c))!=0)
show("so we need : \t ",eqL)
S=solve(eqL,varL)
show(S)
edit retag flag offensive close merge delete

Comments

Interesting. The problem indeed arises from the inequality.

  • The system of three equations has three solutions, found by all available algorithms
  • None of thesealgorithm can solve the full system :
    • algorithm="sympy" raises a NotImplementedError: inequality has more than one symbol of interest.
    • The other algorithms start eating memory at high speed ; interrupting them (C-c C-c) gives a segmentation fault (Debian testing, Sagemath 9.4.rc0).
Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-08-02 13:51:31 +0200 )edit

FWIW, Mathematica is sort-of-able to solve the full system :

sage: mathematica.Reduce(eqL, varL)                                             
((Re[a] < 0 && b == 0 && c == 0) || (Re[a] == 0 && 
   ((Im[a] < 0 && b == 0 && c == 0) || (Im[a] == 0 && b == 0 && 
     (Re[c] < 0 || (Re[c] == 0 && (Im[c] < 0 || Im[c] > 0)) || Re[c] > 0)) || 
    (Im[a] > 0 && b == 0 && c == 0))) || (Re[a] > 0 && b == 0 && c == 0) || 
  (a == 0 && (Re[b] < 0 || (Re[b] == 0 && (Im[b] < 0 || Im[b] > 0)) || 
    Re[b] > 0) && c == 0)) && d == -a

Smells (reeks) as a bug.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-08-02 13:55:32 +0200 )edit
1

This is now Trac#32325.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2021-08-02 14:15:03 +0200 )edit