Opened 6 years ago

Last modified 6 years ago

#18695 closed defect

setting domain=integer on var has no effect with solve — at Initial Version

Reported by: rws Owned by:
Priority: major Milestone: sage-6.9
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

While this works as expected:

sage: n = var('n')
sage: assume(n, 'integer')
sage: solve([n^2 == 3],n)
[]

this does not:

sage: forget()
sage: n = var('n', domain='integer')
sage: solve([n^2 == 3],n)
[n == -sqrt(3), n == sqrt(3)]

So, either solve should also look at the variable domain, or better, let's propagate domain settings to the assumption list.

Change History (0)

Note: See TracTickets for help on using tickets.