Improvement in solveset for inequalities #19978
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References to other Issues or PRs
Fixes #19977
Brief description of what is fixed or changed
The inequality
atan(log(x)) > 0
in the domainInterval.open(0, oo)
is not properly solved bysolveset
, whichreturns
ConditionSet
instead ofInterval.Open(1, oo)
. This is due mainly to line 643 (and line 666) ofinequalities.py
.Indeed
valid(start)
in such situation returnsNotImplementedError
and so the execution ofsolve_univariate_inequality
stops.In such case
start
is equal to0
, which is outside the domain; so it is useless to addstart
tosol_sets
.Incidentally this change produces some failures in
test_inequalities.py
, due to periodicity issue.Indeed in such cases,
solve_univariate_inequality
checks the periodicity (which ispi
or2pi
) and at lines 513-514 defines a new domain accordingly. The new domain is left closed and right open.So if one respects this choice, then we need to eliminate the rightmost point in the solution.
Other comments
Release Notes