Skip to content

propagate the variable domain to the assumptions database #18695

Closed
@rwst

Description

@rwst

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.
Also:

sage: _ = var('n', domain='integer')
sage: n.is_integer()
False

Creating a non-complex var will invoke Maxima with this. I think this is acceptable for now. Alternatively, examine if assumptions can be done lazily, i.e., before any call to Maxima.

Depends on #18877

Component: symbolics

Author: Ralf Stephan

Branch/Commit: c142a5f

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/18695

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions