diff --git a/src/sage/modules/free_module_integer.py b/src/sage/modules/free_module_integer.py index 1200942e30c..ffa929c4bf4 100644 --- a/src/sage/modules/free_module_integer.py +++ b/src/sage/modules/free_module_integer.py @@ -535,6 +535,25 @@ def shortest_vector(self, update_reduced_basis=True, algorithm='fplll', *args, * r""" Return a shortest vector. + .. NOTE:: + + This method attempts to find an **exact** solution to the + Shortest Vector Problem (SVP) for both algorithms. However: + + - The ``'pari'`` algorithm uses PARI's ``qfminim()`` function + which computes exact solutions but may be slow for large + dimensions. + + - The ``'fplll'`` algorithm uses fpylll's SVP solver which by + default uses enumeration to find exact solutions. The behavior + can be modified by passing additional parameters through + ``*args`` and ``**kwds`` (e.g., ``pruning=True`` for + approximate solutions). + + Unlike :meth:`approximate_closest_vector`, this method + prioritizes exactness over speed, which may result in long + computation times for high-dimensional lattices. + INPUT: - ``update_reduced_basis`` -- boolean (default: ``True``); set this @@ -547,7 +566,9 @@ def shortest_vector(self, update_reduced_basis=True, algorithm='fplll', *args, * - ``**kwds`` -- passed through to underlying implementation - OUTPUT: a shortest nonzero vector for this lattice + OUTPUT: + A shortest nonzero vector for this lattice (exact solution to + SVP with default parameters). EXAMPLES::