sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.08k stars 394 forks source link

`sage.numerical.interactive_simplex_method`: improve support for base fields other than `QQ` and `RDF` #37865

Open mkoeppe opened 2 weeks ago

mkoeppe commented 2 weeks ago

We remove the ad-hoc conversion of data to RDF in InteractiveLPProblem.feasible_set. This is outdated and problematic:

We also make the printing code in _latex_product more robust:

Rebased version of:

Author: @mkoeppe, @ComboProblem

Resolves #31312.

:memo: Checklist

:hourglass: Dependencies

github-actions[bot] commented 2 weeks ago

Documentation preview for this PR (built with commit 998ccd42fb43c839f3fc4ef8b26659fb33c86616; changes) is ready! :tada: This preview will update shortly after each push to this PR.

mkoeppe commented 3 days ago

@ComboProblem I've copied in the ticket description from the old ticket https://github.com/sagemath/sage/issues/31312. Part of what it's promising:

  • recognizing trivial coefficients (0, 1) is switched to comparing text instead of comparing elements - in order to support fields such as SR where == is magic

Could you add a test that uses an LP with coefficients from SR (for example, constant symbolic expressions such as pi or log(2) or sqrt(5))