diff --git a/src/sage/features/fes.py b/src/sage/features/fes.py deleted file mode 100644 index 50a2eba97c3..00000000000 --- a/src/sage/features/fes.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- -r""" -Features for testing the presence of ``fes`` -""" - -from . import CythonFeature, PythonModule -from .join_feature import JoinFeature - - -TEST_CODE = """ -# distutils: libraries=fes - -from libc.stdint cimport uint64_t -cdef extern from "": - ctypedef int (*solution_callback_t)(void *, uint64_t) - void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose) - -solutions = 0 - -class InternalState: - verbose = False - sols = [] - max_sols = 0 - -cdef int report_solution(void *_state, uint64_t i): - global solutions - solutions += 1 - return 0 - -sig_on() -cdef int ***coeffs = sig_calloc(1, sizeof(int **)) -coeffs[0] = sig_calloc(3, sizeof(int *)) -coeffs[0][0] = sig_calloc(1, sizeof(int)) -coeffs[0][1] = sig_calloc(2, sizeof(int)) -coeffs[0][2] = sig_calloc(1, sizeof(int)) -coeffs[0][2][0] = 1 # x*y = 0 -internal_state = InternalState() - -exhaustive_search_wrapper(2, 1, 2, coeffs, report_solution, internal_state, 0) - -sig_free(coeffs[0][2]) -sig_free(coeffs[0][1]) -sig_free(coeffs[0][0]) -sig_free(coeffs[0]) -sig_free(coeffs) -sig_off() - -if solutions != 3: - raise AssertionError("libFES did not find three solutions for x*y = 0") -""" - - -class LibFESLibrary(CythonFeature): - r""" - A :class:`~sage.features.Feature` which describes whether the FES library - is present and functional. - - EXAMPLES:: - - sage: from sage.features.fes import LibFESLibrary - sage: LibFESLibrary().require() # optional - fes - """ - def __init__(self): - r""" - TESTS:: - - sage: from sage.features.fes import LibFESLibrary - sage: isinstance(LibFESLibrary(), LibFESLibrary) - True - """ - CythonFeature.__init__(self, "LibFES", test_code=TEST_CODE, spkg="fes", - url="http://www.lifl.fr/~bouillag/fes/") - - -class LibFES(JoinFeature): - r""" - A :class:`~sage.features.Feature` which describes whether the :mod:`sage.libs.fes` - module has been enabled for this build of Sage and is functional. - - EXAMPLES:: - - sage: from sage.features.fes import LibFES - sage: LibFES().require() # optional - fes - """ - def __init__(self): - r""" - TESTS:: - - sage: from sage.features.fes import LibFES - sage: isinstance(LibFES(), LibFES) - True - """ - JoinFeature.__init__(self, 'fes', - [PythonModule("sage.libs.fes")], - spkg="fes", - url="http://www.lifl.fr/~bouillag/fes/") diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/rings/polynomial/multi_polynomial_sequence.py index e7d6f7e0207..632704d46ad 100644 --- a/src/sage/rings/polynomial/multi_polynomial_sequence.py +++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py @@ -1466,13 +1466,7 @@ def solve(self, algorithm='polybori', n=1, eliminate_linear_variables=True, ver S = PolynomialSequence( R_solving, [ R_solving(f) for f in T] ) if S != []: - if algorithm == "exhaustive_search": - from sage.features.fes import LibFES - LibFES().require() - from sage.libs.fes import exhaustive_search - solutions = exhaustive_search(S, max_sols=n, verbose=verbose, **kwds) - - elif algorithm == "polybori": + if algorithm == "polybori": I = S.ideal() if verbose: I.groebner_basis(full_prot=True, **kwds)