-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Milestone
Description
The logic in the hack to allow linear functions like x_0 <= x_1 <= x_2
is wrong: currently, when doing x <= y
, it first converts x
and y
to the correct parent and then it checks for a chained comparison. This is wrong: it should check for a chained comparison on the input of the __richcmp__
function before converting.
One consequence is that the following does not work as expected:
sage: p.<x> = MixedIntegerLinearProgram()
sage: from sage.numerical.linear_functions import LinearFunctionsParent
sage: LF = LinearFunctionsParent(QQ)
sage: 3 <= x[0] <= LF(4)
x_0 <= 4
CC: @vbraun
Component: linear programming
Author: Jeroen Demeyer
Branch/Commit: 4606309
Reviewer: Marc Mezzarobba
Issue created by migration from https://trac.sagemath.org/ticket/24423