[sage-support] systems of inequalities over the integers

2010-05-03 Thread Diego Ruano
Hi, I would like to compute the solution of systems of inequalities over the integers. I have used the command solve, but the solution is over the complex numbers. Something like: i, j = var('i,j') sol=solve([2*i+9*j= - 0, -5*i-7*j=-5, 3*i-2*j= -6], i,j) sol [[i == (-54/31), j == (12/31)], [i

Re: [sage-support] systems of inequalities over the integers

2010-05-03 Thread David Joyner
I think Sage calls Maxima and Maxima is getting i (your variable) and I (sqrt(-1)) mixed up. I guess this is a bug, but it might be known already. Anyway, using x's and y's might be safer: sage: x,y = var('x,y') sage: ineqs = [2*x+9*y= - 0, -5*x-7*y=-5, 3*x-2*y= -6] sage: solve_ineq(ineqs,[x,y])

Re: [sage-support] systems of inequalities over the integers

2010-05-03 Thread Burcin Erocal
On Mon, 3 May 2010 10:18:42 -0400 David Joyner wdjoy...@gmail.com wrote: I think Sage calls Maxima and Maxima is getting i (your variable) and I (sqrt(-1)) mixed up. I guess this is a bug, but it might be known already. It's reported here: http://trac.sagemath.org/sage_trac/ticket/6882 I'm

Re: [sage-support] systems of inequalities over the integers

2010-05-03 Thread Diego Ruano
Thank you David for your answer. What about getting a solution over the integers? David Joyner wrote: I think Sage calls Maxima and Maxima is getting i (your variable) and I (sqrt(-1)) mixed up. I guess this is a bug, but it might be known already. Anyway, using x's and y's might be safer:

Re: [sage-support] systems of inequalities over the integers

2010-05-03 Thread David Joyner
On Mon, May 3, 2010 at 12:50 PM, Diego Ruano dru...@gmail.com wrote: Thank you David for your answer. What about getting a solution over the integers? I'm sure of the best way. You could just write your own little function that checks the conditions for each (i,j) in a big rectangle. Also,

Re: [sage-support] systems of inequalities over the integers

2010-05-03 Thread David Joyner
On Mon, May 3, 2010 at 1:21 PM, David Joyner wdjoy...@gmail.com wrote: On Mon, May 3, 2010 at 12:50 PM, Diego Ruano dru...@gmail.com wrote: Thank you David for your answer. What about getting a solution over the integers? I'm sure of the best way. You could just write your own To correct