On May 16, 3:10 pm, tvn <[email protected]> wrote:
> So Is it possible to force x to be in the theory of Integer so that solving
> for 2*x == 1 will return Not Possible or something similar  ?  

If you formulate the problem as finding the integer roots of an
integer polynomial, you get what you probably want:

sage: P.<x>=ZZ[]
sage: (2*x-1).roots(ZZ)
[]
sage: (2*x-1).roots(QQ)
[(1/2, 1)]

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to