Skip to content

Conversation

@Himanshu21035
Copy link

Description

Fixes #40355

This PR clarifies the documentation for IntegerLattice.shortest_vector() to explicitly state that it returns exact solutions to the Shortest Vector Problem (SVP) by default, addressing confusion about whether the method provides exact or approximate results.

Changes Made

  • Added a .. NOTE:: section explaining that both 'pari' and 'fplll' algorithms compute exact SVP solutions by default
  • Documented that 'pari' uses PARI's qfminim() function for exact computation
  • Documented that 'fplll' uses fpylll's enumeration-based SVP solver by default
  • Clarified that 'fplll' behavior can be modified via *args and **kwds parameters
  • Added explicit comparison with approximate_closest_vector() method to highlight the exactness vs speed trade-off
  • Updated INPUT/OUTPUT sections to be more explicit about algorithm choices

Testing

This is a documentation-only change with no modifications to code logic. All existing doctests remain unchanged and should continue to pass.


📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes. (N/A - documentation only)
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

None

Add detailed notes on shortest_vector method's algorithms and behavior.

Clarify that both 'pari' and 'fplll' algorithms compute exact
solutions by default, unlike approximate_closest_vector().

Addresses issue sagemath#40355 where the documentation didn't specify
whether the method returns exact or approximate solutions.
@cxzhong
Copy link
Contributor

cxzhong commented Dec 6, 2025

@roed314 @saraedum workflows please

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.

IntegerLattice.shortest_vector documentation not clear

2 participants