Skip to content

Sage silently accepts symbolic expressions with two comparison operators #24726

@sagetrac-tmonteil

Description

@sagetrac-tmonteil

See the following example:

sage: 0 <= x <= 1/2
0 <= x

This should raise an error. Note that it can create confusion when used in assumptions:

sage: assume(0 <= x <= 1/2)
sage: bool(x <= 1/2)
False

This has been reported on this ask question.

CC: @rwst @slel

Component: symbolics

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions