Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic methods work inconsistently on relational expressions #21862

Open
eviatarbach opened this issue Nov 11, 2016 · 1 comment
Open

Symbolic methods work inconsistently on relational expressions #21862

eviatarbach opened this issue Nov 11, 2016 · 1 comment

Comments

@eviatarbach
Copy link

Symbolic methods on relational expressions (equalities and inequalities) work inconsistently. Some of them directly apply to both sides, some don't do anything at all, and some behave unexpectedly.

For example, collect does nothing (same with inequalities):

sage: var('y')
y
sage: eq = x^2 + x*y + 3*x == 0
sage: eq.collect(x)
x^2 + x*y + 3*x == 0
sage: eq.lhs().collect(x)
x^2 + x*(y + 3)

limit behaves differently with different arguments, and it's not at all clear what it's doing:

sage: eq = exp(-x) == x
sage: eq.limit(x=0)
0
sage: eq.limit(x=2)
e^(-2) == 2

factor takes equalities and returns a non-relational expression:

sage: (x^2 + x == 0).factor()
(x + 1)*x

and doesn't work at all with inequalities:

sage: (x^2 + x > 0).factor()
ValueError: Unable to represent as a polynomial

Even more strange:

sage: (x == 3).exp()
e^(x == 3)

Component: symbolics

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

@eviatarbach eviatarbach added this to the sage-7.5 milestone Nov 11, 2016
@rwst
Copy link

rwst commented Dec 4, 2016

comment:1

See also #7660 (EDIT: and #11651).

@mkoeppe mkoeppe removed this from the sage-7.5 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants