Skip to content

Replay gfan interface history - #4466

Draft
antonleykin wants to merge 37 commits into
Macaulay2:developmentfrom
antonleykin:replay-gfanInterface-history
Draft

Replay gfan interface history#4466
antonleykin wants to merge 37 commits into
Macaulay2:developmentfrom
antonleykin:replay-gfanInterface-history

Conversation

@antonleykin

Copy link
Copy Markdown
Contributor

Summary

This PR brings the Tropical branch's work on gfanInterface.m2 (developed
during the 2026 Warwick workshop, building on 2023 workshop code) into
development. The full per-commit history is preserved: the changes are
replayed as 37 linear commits on top of development, with no unrelated-history
merge or disconnected root.

Changes to gfanInterface

  • gfanTropicalPrevariety — reworked method with two new options:
    • "matrixoutput" => Boolean — exposes gfan's --matrixoutput flag; each
      half-open cone is returned as an ambient dimension plus three matrices
      (nonstrict inequalities, equations, strict inequalities).
    • "halfopenrestrictions" — passes gfan's --halfopenrestrictions, letting
      the computation be restricted to a supplied list of half-open cones.
    • Fixes to max cones and to gfanParsePolyhedralFan.
  • p-adic support — adds gfanPadicInitialIdeal and wires up the
    gfan _padic command (code originally written in the 2023 workshop
    development branch).
  • Mixed volume — corrected gfan _mixedvolume handling.
  • MarkedPolynomialList — implemented == for marked polynomial lists.
  • Documentation & tests — new/updated docs for gfanTropicalPrevariety
    (including "matrixoutput" and "halfopenrestrictions" examples), plus
    numerous test fixes (homogeneity space, fan product, mixed volume).

Net change: +514 / −239 in M2/Macaulay2/packages/gfanInterface.m2.

Checklist (per the M2 PR guide)

  • Targets the development branch (not stable).
  • Keywords => {"Interfaces"} present in the package header.
  • DebuggingMode not enabled in newPackage (defaults to false).
  • Existing distributed package — no =distributed-packages change needed.

Contributors

@antonleykin
Diane Maclagan (github id info lost in commits) @dmaclagan ?
@GabrielRiffoJ
@VictoriaSchleis

GabrielRiffoJ and others added 30 commits June 29, 2026 14:07
@d-torrance

Copy link
Copy Markdown
Member

As I recall, gfanTropicalPrevariety requires gfan 0.8, right?

This is an issue on legacy systems since gfan doesn't compile unless you have a relatively modern gcc (or even on modern systems with clang).

What's the preferred path forward?

  • Check for the gfan version and do something sensible (either raise an error and skip the tests/used cached documentation or maybe just implement the algorithm in M2). Also remove the version check in the autotools build or change it from an error to a warning.
  • Work on getting gfan to compile on these legacy systems before the November release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants