Programmer Manual

The code is spread over more than twenty modules. The directed acyclic graph shows the dependencies of the first seven modules:

version
   |
   +----------------------------> solutions
   |                                  |
   +--> dimension                     |
   |        |                         |
   +--------+--> polynomials          |
   |        |         |               |
   +------------------+--> volumes    |
   |        |         |       |       |
   +--------+---------+-------+-------+--> solver
   |        |                                |
   +--------+--------------------------------+--> examples

At the root is the version module. If version.py works, then the interfacing with libPHCpack works. Four other modules are needed for the blackbox solver.

In addition to functions, each module has test functions, starting with test_. Each test function returns the number of failed tests. The main() of each module runs all tests.

the version module

The PHCpack version string is retrieved via this module, along with some utility functions for the basic type conversions.

Tests the retrieval of the version string of the PHCpack library, using ctypes, in a platform independent manner. The function getPHCmod() returns the library module for the three supported platforms. The functions int4a2str() and str2int4a() convert integer arrays to strings and string to integer arrays, using the ctypes string buffer type. The function int4a2nbr() converts a list of integers to the string buffer representation of the 32-bit integer array version.

version.get_phcfun(vrblvl=0)

Returns phcpy.phc, or if that not works, returns get_phcfun_fromlib()

version.get_phcfun_fromlib(vrblvl=0)

Returns the proper function according to the platform. For the correct execution, the file libPHCpack, with the extension .so, .dylib, or .dll must be present.

version.int4a2nbr(data, vrblvl=0)

Given in data is a Python list of integers, returns the encoding in a ctypes string buffer, for conversion into an 32-bit integer array. If vrblvl > 0, then results of intermediate steps are shown, otherwise the function remains silent.

version.int4a2str(data, vrblvl=0)

Given in data is an integer array stored as a ctypes string buffer, returns the string which represent the data. The ‘4a’ refers to the 4-byte (or 32-bit) integer array. If vrblvl > 0, then results of intermediate steps are printed, otherwise, the function remains silent.

version.main()

Prints the version string and runs two tests.

version.nbr2int4a(data, vrblvl=0)

Given in data is a 32-bit integer array, in a ctypes string buffer. Returns the list of python integers.

version.str2int4a(data, vrblvl=0)

Given in data is a string, stored as a Python string, returns the 32-bit integer array representation, stored as a ctypes string buffer. If vrblvl > 0, then results of intermediate steps are printed, otherwise, the function remains silent.

version.test_byte_strings(vrblvl=0)

Tests the conversion of a string into a string buffer and then backwards.

version.test_integer_encodings(vrblvl=0)

Tests the encoding of a list of integers as a ctypes string buffer.

version.version_string(vrblvl=0)

Returns the version string of PHCpack. If vrblvl > 0, then the conversions between strings and integer arrays are verified via the ctypes string buffer types.

a blackbox solver for isolated solutions

The three most essential modules to solve polynomial systems are the solver module, which exports the blackbox solver, the polynomials module, to define the input, and the solutions module, to parse the computed solutions.

functions in the module dimension

In addition to the number of polynomials in the system, the dimension module controls some other important numbers for each run: the seed of the random number generators and the number of available cores.

Exports the dimension of the system of polynomials. Setting the dimension allocates memory to store polynomials.

dimension.get_core_count(vrblvl=0)

Returns the number of available cores.

dimension.get_double_dimension(vrblvl=0)

Returns the number of polynomials in double precision.

dimension.get_double_double_dimension(vrblvl=0)

Returns the number of polynomials in double double precision.

dimension.get_double_double_laurent_dimension(vrblvl=0)

Returns the number of Laurent polynomials in double double precision.

dimension.get_double_laurent_dimension(vrblvl=0)

Returns the number of Laurent polynomials in double precision.

dimension.get_quad_double_dimension(vrblvl=0)

Returns the number of polynomials in quad double precision.

dimension.get_quad_double_laurent_dimension(vrblvl=0)

Returns the number of Laurent polynomials in quad double precision.

dimension.get_seed(vrblvl=0)

Returns the seed used to generate random numbers.

dimension.main()

Runs tests on set/get dimension and set/get seed.

dimension.set_double_dimension(dim, vrblvl=0)

Sets the number of polynomials in double precision to the value of the first parameter dim.

dimension.set_double_double_dimension(dim, vrblvl=0)

Sets the number of polynomials in double double precision to the value of the first parameter dim.

dimension.set_double_double_laurent_dimension(dim, vrblvl=0)

Sets the number of Laurent polynomials in double double precision to the value of the first parameter dim.

dimension.set_double_laurent_dimension(dim, vrblvl=0)

Sets the number of Laurent polynomials in double precision to the value of the first parameter dim.

dimension.set_quad_double_dimension(dim, vrblvl=0)

Sets the number of polynomials in quad double precision to the value of the first parameter dim.

dimension.set_quad_double_laurent_dimension(dim, vrblvl=0)

Sets the number of Laurent polynomials in quad double precision to the value of the first parameter dim.

dimension.set_seed(seed, vrblvl=0)

Sets the seed for the random number generators to seed.

dimension.test_core_count(vrblvl=0)

Tests if the number of available cores is positive. The verbose level is defined by vrblvl.

dimension.test_dimension(vrblvl=0)

Tests setting and getting the dimension. The verbose level is defined by vrblvl.

dimension.test_double_dimension(vrblvl=0)

Tests setting and getting the dimension for systems in double precision. The verbose level is defined by vrblvl.

dimension.test_double_double_dimension(vrblvl=0)

Tests setting and getting the dimension for systems in double double precision. The verbose level is defined by vrblvl.

dimension.test_double_double_laurent_dimension(vrblvl=0)

Tests setting and getting the dimension for Laurent systems in double double precision. The verbose level is defined by vrblvl.

dimension.test_double_laurent_dimension(vrblvl=0)

Tests setting and getting the dimension for Laurent systems in double precision. The verbose level is defined by vrblvl.

dimension.test_quad_double_dimension(vrblvl=0)

Tests setting and getting the dimension for systems in quad double precision. The verbose level is defined by vrblvl.

dimension.test_quad_double_laurent_dimension(vrblvl=0)

Tests setting and getting the dimension for Laurent systems in quad double precision. The verbose level is defined by vrblvl.

dimension.test_seed(vrblvl=0)

Tests the setting and getting of the seed. The verbose level is defined by vrblvl.

functions in the module polynomials

The module polynomials exports the definition of a class to represent systems of polynomials.

Exports the definition of polynomial systems, in double, double double, and quad double precision. Also polynomials with negative exponents, the so-called Laurent polynomials, are supported.

polynomials.check_semicolons(pols, vrblvl=0)

Counts the number of semicolons and writes a warning if the number of semicolons in pols does not match len(pols). This warning may prevent unwanted concatenation, e.g., as in pols = [‘x^2 + 4*y^2 - 4;’ ‘2*y^2 - x;’] where the omitted comma results in one polynomial in two variables.

polynomials.clear_double_double_laurent_system(vrblvl=0)

Clears the Laurent system set in double double precision.

polynomials.clear_double_double_syspool(vrblvl=0)

Clears the systems pool in double double precision.

polynomials.clear_double_double_system(vrblvl=0)

Clears the system set in double double precision.

polynomials.clear_double_laurent_system(vrblvl=0)

Clears the Laurent system set in double precision.

polynomials.clear_double_syspool(vrblvl=0)

Clears the systems pool in double precision.

polynomials.clear_double_system(vrblvl=0)

Clears the system set in double precision.

polynomials.clear_quad_double_laurent_system(vrblvl=0)

Clears the Laurent system set in quad double precision.

polynomials.clear_quad_double_syspool(vrblvl=0)

Clears the systems pool in quad double precision.

polynomials.clear_quad_double_system(vrblvl=0)

Clears the system set in quad double precision.

polynomials.clear_symbol_table(vrblvl=0)

Clears the table of symbols used to represent polynomials.

polynomials.copy_from_double_double_syspool(idx, vrblvl=0)

Copies the system in double double precision at position idx in the systems pool to the defined system in double double precision.

polynomials.copy_from_double_syspool(idx, vrblvl=0)

Copies the system in double precision at position idx in the systems pool to the defined system in double precision.

polynomials.copy_from_quad_double_syspool(idx, vrblvl=0)

Copies the system in quad double precision at position idx in the systems pool to the defined system in quad double precision.

polynomials.copy_to_double_double_syspool(idx, vrblvl=0)

Copies the system set in double double precision to position idx in the systems pool.

polynomials.copy_to_double_syspool(idx, vrblvl=0)

Copies the system set in double precision to position idx in the systems pool.

polynomials.copy_to_quad_double_syspool(idx, vrblvl=0)

Copies the system set in quad double precision to position idx in the systems pool.

polynomials.degree_of_double_polynomial(idx, vrblvl=0)

Returns the degree of the polynomial with double precision coefficients stored at position idx.

polynomials.get_double_double_laurent_polynomial(idx, vrblvl=0)

Returns the string representation of the Laurent polynomial in double double precision, at index idx.

polynomials.get_double_double_laurent_system(vrblvl=0)

Returns the string representation of the Laurent polynomials in double double precision.

polynomials.get_double_double_number_laurent_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a Laurent system in double double precision.

polynomials.get_double_double_number_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a polynomial system in double double precision.

polynomials.get_double_double_polynomial(idx, vrblvl=0)

Returns the string representation of the polynomial in double double precision, at index idx.

polynomials.get_double_double_system(vrblvl=0)

Returns the string representation of the polynomials in double double precision.

polynomials.get_double_laurent_polynomial(idx, vrblvl=0)

Returns the string representation of the Laurent polynomial in double precision, at index idx.

polynomials.get_double_laurent_system(vrblvl=0)

Returns the string representation of the Laurent polynomials in double precision.

polynomials.get_double_number_laurent_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a Laurent system in double precision.

polynomials.get_double_number_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a polynomial system in double precision.

polynomials.get_double_polynomial(idx, vrblvl=0)

Returns the string representation of the polynomial in double precision, at index idx.

polynomials.get_double_system(vrblvl=0)

Returns the string representation of the polynomials in double precision.

polynomials.get_quad_double_laurent_polynomial(idx, vrblvl=0)

Returns the string representation of the Laurent polynomial in quad double precision, at index idx.

polynomials.get_quad_double_laurent_system(vrblvl=0)

Returns the string representation of the Laurent polynomials in quad double precision.

polynomials.get_quad_double_number_laurent_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a Laurent system in quad double precision.

polynomials.get_quad_double_number_terms(equ, vrblvl=0)

Returns the number of terms in the equation with index equ, set as a polynomial system in quad double precision.

polynomials.get_quad_double_polynomial(idx, vrblvl=0)

Returns the string representation of the polynomial in quad double precision, at index idx.

polynomials.get_quad_double_system(vrblvl=0)

Returns the string representation of the polynomials in quad double precision.

polynomials.initialize_double_double_syspool(dim, vrblvl=0)

Initialize the systems pool in double double precision with dim.

polynomials.initialize_double_syspool(dim, vrblvl=0)

Initialize the systems pool in double precision with dim.

polynomials.initialize_quad_double_syspool(dim, vrblvl=0)

Initialize the systems pool in quad double precision with dim.

polynomials.is_square(pols, vrblvl=0)

Given in the list pols are string representations of Laurent polynomials. A system is square if it has as many unknowns as equations. Returns True if the system is square, False otherwise.

polynomials.main()

Runs tests on the set/get polynomials.

polynomials.number_of_symbols(pols, vrblvl=0)

Returns the number of symbols that appear as variables in the polynomials, givein in the list of strings pols. Useful to determine whether a system is square or not.

polynomials.set_double_double_laurent_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in double double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_double_double_laurent_system(nvr, pols, vrblvl=0)

Sets the laurent system defines by the strings in pols, in double double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_double_double_laurent_polynomial.

polynomials.set_double_double_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in double double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_double_double_system(nvr, pols, vrblvl=0)

Sets the system defines by the strings in pols, in double double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_double_double_polynomial.

polynomials.set_double_laurent_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_double_laurent_system(nvr, pols, vrblvl=0)

Sets the laurent system defines by the strings in pols, in double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_double_laurent_polynomial.

polynomials.set_double_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_double_system(nvr, pols, vrblvl=0)

Sets the system defines by the strings in pols, in double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_double_polynomial.

polynomials.set_quad_double_laurent_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in quad double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_quad_double_laurent_system(nvr, pols, vrblvl=0)

Sets the laurent system defines by the strings in pols, in quad double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_quad_double_polynomial.

polynomials.set_quad_double_polynomial(idx, nvr, pol, vrblvl=0)

Sets the polynomial by the string pol, in quad double precision, with a number of variables no more than nvr, at index idx. The index starts at one, not at zero. This function does not set the dimension, which must be set to a value at least idx.

polynomials.set_quad_double_system(nvr, pols, vrblvl=0)

Sets the system defines by the strings in pols, in quad double precision, with a number of variables no more than nvr. The dimension of the system is set to len(pols). Returns the sum of the return values of set_quad_double_polynomial.

polynomials.size_double_double_syspool(vrblvl=0)

Returns the size of the systems pool in double double precision.

polynomials.size_double_syspool(vrblvl=0)

Returns the size of the systems pool in double precision.

polynomials.size_quad_double_syspool(vrblvl=0)

Returns the size of the systems pool in quad double precision.

polynomials.string_of_symbols(maxlen=100, vrblvl=0)

Returns the list of all symbols (as strings), defined when storing polynomials. The maxlen on entry equals the maximum number of characters in the symbol string, that is: the sequence of all string representations of the symbols, separated by one space.

polynomials.test_degree_of_double_polynomial(vrblvl=0)

Tests the degree of a polynomial in double precision.

polynomials.test_double_double_laurent_polynomial(vrblvl=0)

Tests the setting and getting of a Laurent polynomial, in double double precision. The verbose level is given by vrblvl.

polynomials.test_double_double_laurent_system(vrblvl=0)

Tests the setting and getting of a laurent system, in double double precision. The verbose level is given by vrblvl.

polynomials.test_double_double_number_laurent_terms(vrblvl=0)

Tests the number of terms in a Laurent system set in double double precision.

polynomials.test_double_double_number_terms(vrblvl=0)

Tests the number of terms in a polynomial system set in double double precision.

polynomials.test_double_double_polynomial(vrblvl=0)

Tests the setting and getting of a polynomial, in double double precision. The verbose level is given by vrblvl.

polynomials.test_double_double_syspool(vrblvl=0)

Tests the systems pool in double double precision. The verbose level is given by vrblvl.

polynomials.test_double_double_system(vrblvl=0)

Tests the setting and getting of a system, in double double precision. The verbose level is given by vrblvl.

polynomials.test_double_laurent_polynomial(vrblvl=0)

Tests the setting and getting of a Laurent polynomial, in double precision. The verbose level is given by vrblvl.

polynomials.test_double_laurent_system(vrblvl=0)

Tests the setting and getting of a laurent system, in double precision. The verbose level is given by vrblvl.

polynomials.test_double_number_laurent_terms(vrblvl=0)

Tests the number of terms in a Laurent system set in double precision.

polynomials.test_double_number_terms(vrblvl=0)

Tests the number of terms in a polynomial system set in double precision.

polynomials.test_double_polynomial(vrblvl=0)

Tests the setting and getting of a polynomial, in double precision. The verbose level is given by vrblvl.

polynomials.test_double_syspool(vrblvl=0)

Tests the systems pool in double precision. The verbose level is given by vrblvl.

polynomials.test_double_system(vrblvl=0)

Tests the setting and getting of a system, in double precision. The verbose level is given by vrblvl.

polynomials.test_is_square(vrblvl=0)

Tests on catching an omitted comma between the polynomials.

polynomials.test_quad_double_laurent_polynomial(vrblvl=0)

Tests the setting and getting of a Laurent polynomial, in quad double precision. The verbose level is given by vrblvl.

polynomials.test_quad_double_laurent_system(vrblvl=0)

Tests the setting and getting of a laurent system, in quad double precision. The verbose level is given by vrblvl.

polynomials.test_quad_double_number_laurent_terms(vrblvl=0)

Tests the number of terms in a Laurent system set in quad double precision.

polynomials.test_quad_double_number_terms(vrblvl=0)

Tests the number of terms in a polynomial system set in quad double precision.

polynomials.test_quad_double_polynomial(vrblvl=0)

Tests the setting and getting of a polynomial, in quad double precision. The verbose level is given by vrblvl.

polynomials.test_quad_double_syspool(vrblvl=0)

Tests the systems pool in quad double precision. The verbose level is given by vrblvl.

polynomials.test_quad_double_system(vrblvl=0)

Tests the setting and getting of a system, in quad double precision. The verbose level is given by vrblvl.

functions in the module solutions

The documentation strings of the functions exported by the module solutions are listed below.

Exports functions on solutions.

class solutions.DoubleSolution(sol)

Wraps the functions on solution strings.

coordinates()

Returns the values of the coordinates of the solution, as a tuple of variable names and corresponding values.

diagnostics()

Returns the numerical diagnostics.

dictionary()

Returns the dictionary format of the solution.

multiplicity()

Returns the multiplicity.

numerals()

Returns the numerical values of the coordinates.

timevalue()

Returns the value of the continuation parameter.

variables()

Returns the variable names of the coordinates.

solutions.append_double_double_solution_string(nvr, sol, vrblvl=0)

Appends the string in sol to the solutions in double double precision, where the number of variables equals nvr.

solutions.append_double_solution_string(nvr, sol, vrblvl=0)

Appends the string in sol to the solutions in double precision, where the number of variables equals nvr.

solutions.append_quad_double_solution_string(nvr, sol, vrblvl=0)

Appends the string in sol to the solutions in quad double precision, where the number of variables equals nvr.

solutions.clear_double_double_solutions(vrblvl=0)

Clears the solutions defined in double double precision.

solutions.clear_double_solutions(vrblvl=0)

Clears the solutions defined in double precision.

solutions.clear_quad_double_solutions(vrblvl=0)

Clears the solutions defined in quad double precision.

solutions.condition_tables(sols, vrblvl=0)

The input in sols is a list of PHCpack string solutions. A condition table is triplet of three frequency tables, computed from the diagnostics (err, rco, res) of each solution. The i-th entry in each frequency table counts the number of doubles x which floor(-log10(x)) mapped to the index i. Small numbers are mapped to the right of the table, large numbers are mapped to the left of the table.

solutions.coordinates(sol, vrblvl=0)

Returns the coordinates of the solution in the PHCpack solution string sol, as a tuple of two lists: (names, values). The list names contains the strings of the variable names. The list values contains the complex values for the coordinates of the solution. The entries in the list names correspond to the entries in the list values.

solutions.diagnostics(sol, vrblvl=0)

Extracts the diagnostics (err, rco, res) from the PHCpack string solution in sol and returns a triplet of three floats.

solutions.endmultiplicity(sol, vrblvl=0)

Returns the value of t at the end and the multiplicity as (t,m) for the PHCpack solution string sol.

solutions.evaluate(pols, dsol, vrblvl=0)

Evaluates a list of polynomials given as string in pols at the solution in dictionary format in dsol.

solutions.evaluate_polynomial(pol, dsol, vrblvl=0)

Evaluates the polynomial pol at the solution dictionary dsol by string substitution.

solutions.filter_real(sols, tol, oper, vrblvl=0)

Filters the real solutions in sols. The input parameters are

  1. sols is a list of solution strings in PHCpack format,

  2. tol is the tolerance on the absolute value of the imaginary parts of the coordinates of the solution.

  3. oper is either ‘select’ or ‘remove’

    if oper == ‘select’ then solutions that are considered real are selected and in the list on return,

    if oper == ‘remove’ then solutions that are considered real are in the list on return.

solutions.filter_regular(sols, tol, oper, vrblvl=0)

Filters solutions in sols for the estimate of the inverse of the condition number. The input parameters are

  1. sols is a list of solution strings in PHCpack format,

  2. tol is the tolerance on the value for the estimate rco for the inverse of the condition number to decide whether a solution is singular (if rco < tol) or not.

  3. oper is either ‘select’ or ‘remove’

    if oper == ‘select’ then solutions with value rco > tol are selected and in the list on return,

    if oper == ‘remove’ then solutions with value rco <= tol are in the list on return.

solutions.filter_vanishing(sols, tol, vrblvl=0)

Returns the list of solutions in sols that have a residual less than or equal to the given tolerance in tol.

solutions.filter_zero_coordinates(sols, varname, tol, oper, vrblvl=0)

Filters the solutions in sols for variables that have a value less than the tolerance. The input parameters are

  1. sols is a list of solution strings in PHCpack format,

  2. varname is a string with the name of the variable,

  3. tol is the tolerance to decide whether a complex number equals zero or not, and

  4. oper is either ‘select’ or ‘remove’

    if oper == ‘select’ then solutions with value for the variable v that is less than tol are selected and in the list on return,

    if oper == ‘remove’ then solutions with value for the variable v that is less than tol are removed and not in the list on return.

solutions.formdictlist(sols, precision='d', vrblvl=0)

Given in sols is a list of strings. Each string in sols represents a solution, in the PHCpack format. On return is the list of dictionaries. Each dictionary in the list of return stores each solution of the list sols in the dictionary format. By default, the precision of the coordinates is assumed to be double float (‘d’ on input). If the precision is not ‘d’, then the coordinates of the solution are returned as Python complex number string representations.

solutions.get_double_double_solutions(vrblvl=0)

Returns the solution strings in double double precision.

solutions.get_double_solutions(vrblvl=0)

Returns the solution strings in double precision.

solutions.get_next_double_double_solution(idx, vrblvl=0)

Returns the string representation of the next solution in double double precision, at the index idx. The vrblvl is the verbose level.

solutions.get_next_double_solution(idx, vrblvl=0)

Returns the string representation of the next solution in double precision, at the index idx. The vrblvl is the verbose level.

solutions.get_next_quad_double_solution(idx, vrblvl=0)

Returns the string representation of the next solution in quad double precision, at the index idx. The vrblvl is the verbose level.

solutions.get_quad_double_solutions(vrblvl=0)

Returns the solution strings in quad double precision.

solutions.is_real(sol, tol, vrblvl=0)

Returns True if the solution in sol is real with respect to the given tolerance tol: if the absolute value of the imaginary part of all coordinates are less than tol.

solutions.is_vanishing(sol, tol, vrblvl=0)

Given in sol is a solution string and tol is the tolerance on the residual. Returns True if the residual of sol is less than or equal to tol. Returns False otherwise.

solutions.main()

Runs some tests on solutions.

solutions.make_solution(names, values, err=0.0, rco=1.0, res=0.0, tval=0, multiplicity=1, vrblvl=0)

Makes the string representation in PHCpack format with in names a list of strings for the variables names and in values a list of (complex) values for the coordinates. For example:

s = make_solution([‘x’,’y’],[(1+2j), 3])

returns the string s to represent the solution with coordinates (1+2j) and 3 for the variables x and y. The imaginary unit is the Python j instead of i. Other arguments for this function are

  1. err is the magnitude of an update, or the forward error,

  2. rco is the estimate for the inverse condition number,

  3. res is the value of the residual, or backward error,

  4. tval is the value for the continuation parameter t,

  5. multiplicity is the multiplicity of the solution.

For those above arguments, default values are provided. Applying the function coordinates on the result of make_solution returns the tuple of arguments given on input to make_solution().

solutions.map_double(freqtab, nbr, vrblvl=0)

On input in freqtab is a list of integer numbers and nbr is a double. The list freqtab represents a frequency table of magnitudes. The magnitude of the double nbr is mapped into the frequency table. The counter in freqtab that will be updated is at position floor(-log10(nbr))

solutions.move_double_double_solution_cursor(idx, vrblvl=0)

Moves the cursor to the next solution, following the index, in double double precision.

solutions.move_double_solution_cursor(idx, vrblvl=0)

Moves the cursor to the next solution, following the index, in double precision.

solutions.move_quad_double_solution_cursor(idx, vrblvl=0)

Moves the cursor to the next solution, following the index, in quad double precision.

solutions.number_double_double_solutions(vrblvl=0)

Returns the number of solutions in double double precision. The vrblvl is the verbose level.

solutions.number_double_solutions(vrblvl=0)

Returns the number of solutions in double precision. The vrblvl is the verbose level.

solutions.number_quad_double_solutions(vrblvl=0)

Returns the number of solutions in quad double precision. The vrblvl is the verbose level.

solutions.numerals(dsol, vrblvl=0)

Given the dictionary format of a solution dsol, returns the list of numeric values of the variables in the solution.

solutions.set_double_double_solutions(nvr, sols, vrblvl=0)

Sets the solutions in double double precision, with the strings in sols, where the number of variables equals nvr.

solutions.set_double_solutions(nvr, sols, vrblvl=0)

Sets the solutions in double precision, with the strings in sols, where the number of variables equals nvr.

solutions.set_quad_double_solutions(nvr, sols, vrblvl=0)

Sets the solutions in quad double precision, with the strings in sols, where the number of variables equals nvr.

solutions.str2complex(scn, vrblvl=0)

The string scn contains a complex number, the real and imaginary part separated by spaces. On return is the Python complex number.

solutions.string_complex(scn, vrblvl=0)

The string scn contains a complex number, the real and imaginary part separated by spaces. On return is the string representation of a complex number, in Python format. The use of this function is for when the coordinates are calculated in higher precision.

solutions.string_coordinates(sol, vrblvl=0)

Returns the coordinates of the solution in the PHCpack solution string sol, as a tuple of two lists: (names, values). For each name in names there is a value in values. The list names contains the strings of the variable names. The list values contains the values of the coordinates, represented as strings. This function is useful for when the coordinates are computed in higher precision.

solutions.strsol2dict(sol, precision='d', vrblvl=0)

Converts the solution in the string sol into a dictionary format. By default, the precision of the coordinates is assumed to be double float (‘d’ on input). If the precision is not ‘d’, then the coordinates of the solution are returned as Python complex number string representations.

solutions.test_double_functions(vrblvl=0)

Generates a random trinomial system, solves it, converts the solutions, and then sums the multiplicities. The verbose level is given by vrblvl.

solutions.test_double_solution_class(vrblvl=0)

Tests the methods in the class DoubleSolution. The verbose level is given by vrblvl.

solutions.variables(dsol, vrblvl=0)

Given the dictionary format of a solution in dsol, returns the list of variables.

solutions.verify(pols, sols, vrblvl=0)

Verifies whether the solutions in sols satisfy the polynomials of the system in pols. Returns the sum of the absolute values of the residuals in all polynomials.

solutions.write_double_double_solutions(vrblvl=0)

Writes the solutions stored in double double precision.

solutions.write_double_solutions(vrblvl=0)

Writes the solutions stored in double precision.

solutions.write_quad_double_solutions(vrblvl=0)

Writes the solutions stored in quad double precision.

functions in the module volumes

The mixed volume of the tuple of Newton polytopes of a polynomial systems is a generically sharp root count on the number of isolated solutions with nonzero coordinates. For all affine solutions (also counting solutions with zero coordinates), the stable mixed volume provides a generically sharp root count.

Exports functions to compute mixed volumes and stable mixed volumes. The mixed volume of a polynomial system is a generically sharp upper bound on the number of isolated solutions with nonzero coordinates. Stable mixed volumes count solutions with zero coordinates as well. Polyhedral homotopies solve random coefficient systems, tracking exactly as many paths as the mixed volume.

volumes.are_cells_stable(vrblvl=0)

Returns True if stable mixed cells were computed, returns False otherwise.

volumes.cell_mixed_volume(idx, vrblvl=0)

Returns the mixed volume of cell with index idx.

volumes.clear_cells(vrblvl=0)

Clears the computed mixed cells.

volumes.compute_mixed_volume(demics=True, vrblvl=0)

Returns the mixed volume of the polynomial system, set in double precision. The demics flag indicates if dynamic enumeration as implemented by the software DEMiCs will be used, otherwise MixedVol is called. The verbose level is given by vrblvl.

volumes.compute_stable_mixed_volume(demics=True, vrblvl=0)

Returns the mixed and the stable mixed volume of the polynomial system set in double precision. The demics flag indicates if dynamic enumeration as implemented by the software DEMiCs will be used, otherwise MixedVol is called. The verbose level is given by vrblvl.

volumes.double_double_polyhedral_homotopies(vrblvl=0)

Runs the polyhedral homotopies and returns a random coefficient system, in double double precision arithmetic, based on the mixed volume computation

volumes.double_double_random_coefficient_system(vrblvl=0)

Makes a random coefficient system using the type of mixture and the supports used to compute the mixed volume. Sets the system in double double precision.

volumes.double_double_solve_start_system(idx, vrblvl=0)

Solves the start system corresponding to the cell with index idx, using double double precision arithmetic. Returns the number of solutions found, which must equal the mixed volume of the cell.

volumes.double_double_track_path(cellidx, pathidx, vrblvl=0)

Tracks path with index pathidx defined by cell with index cellidx. Prior to calling this function, the start system corresponding to the cell must have been solved, in double double precision.

volumes.double_polyhedral_homotopies(vrblvl=0)

Runs the polyhedral homotopies and returns a random coefficient system, in double precision arithmetic, based on the mixed volume computation

volumes.double_random_coefficient_system(vrblvl=0)

Makes a random coefficient system using the type of mixture and the supports used to compute the mixed volume. Sets the system in double precision.

volumes.double_solve_start_system(idx, vrblvl=0)

Solves the start system corresponding to the cell with index idx, using double precision arithmetic. Returns the number of solutions found, which must equal the mixed volume of the cell.

volumes.double_track_path(cellidx, pathidx, vrblvl=0)

Tracks path with index pathidx defined by cell with index cellidx. Prior to calling this function, the start system corresponding to the cell must have been solved, in double precision.

volumes.main()

Runs tests on mixed volumes and stable mixed volumes.

volumes.make_random_coefficient_system(pols, demics=True, precision='d', vrblvl=0)

For a polynomial system in the list pols with as many equations as unknowns, computes the mixed volume (by default by DEMiCs) and runs the polyhedral homotopies to solve a random coefficient system in double, double double, or quad double precision, if the precision flag is set to ‘d’, ‘dd’, or ‘qd’ respectively. Returns a tuple with the mixed volume, random coefficient system, and the solutions of the random coefficient system.

volumes.mixed_volume(pols, demics=True, vrblvl=0)

Returns the mixed volume of the polynomial system in the list pols. The polynomial system must have as many equations as unknowns. The demics flag indicates if dynamic enumeration as implemented by the software DEMiCs will be used, otherwise MixedVol is called. The verbose level is given by vrblvl.

volumes.number_of_cells(vrblvl=0)

Returns the number of cells computed by the mixed_volume function.

volumes.number_of_original_cells(vrblvl=0)

Returns the number of original cells, the cells without artificial origin, computed by the mixed_volume function.

volumes.number_of_stable_cells(vrblvl=0)

Returns the number of stable cells computed by the mixed_volume function.

volumes.quad_double_polyhedral_homotopies(vrblvl=0)

Runs the polyhedral homotopies and returns a random coefficient system, in quad double precision arithmetic, based on the mixed volume computation

volumes.quad_double_random_coefficient_system(vrblvl=0)

Makes a random coefficient system using the type of mixture and the supports used to compute the mixed volume. Sets the system in quad double precision.

volumes.quad_double_solve_start_system(idx, vrblvl=0)

Solves the start system corresponding to the cell with index idx, using quad double precision arithmetic. Returns the number of solutions found, which must equal the mixed volume of the cell.

volumes.quad_double_track_path(cellidx, pathidx, vrblvl=0)

Tracks path with index pathidx defined by cell with index cellidx. Prior to calling this function, the start system corresponding to the cell must have been solved, in quad double precision.

volumes.set_double_coefficient_system(vrblvl=0)

Sets the constructed random coefficient system to the system in double precision.

volumes.set_double_double_coefficient_system(vrblvl=0)

Sets the constructed random coefficient system to the system in double double precision.

volumes.set_double_double_polyhedral_homotopy(vrblvl=0)

Sets the polyhedral homotopy in double double precision based on the lifted supports used to compute the mixed volume. Initializes the data to store the solutions.

volumes.set_double_double_start_solution(cellidx, solidx, vrblvl=0)

Sets the start solution of index solidx, with cell with index cellidx, to the solutions in double double precision.

volumes.set_double_polyhedral_homotopy(vrblvl=0)

Sets the polyhedral homotopy in double precision based on the lifted supports used to compute the mixed volume. Initializes the data to store the solutions.

volumes.set_double_start_solution(cellidx, solidx, vrblvl=0)

Sets the start solution of index solidx, with cell with index cellidx, to the solutions in double precision.

volumes.set_quad_double_coefficient_system(vrblvl=0)

Sets the constructed random coefficient system to the system in quad double precision.

volumes.set_quad_double_polyhedral_homotopy(vrblvl=0)

Sets the polyhedral homotopy in quad double precision based on the lifted supports used to compute the mixed volume. Initializes the data to store the solutions.

volumes.set_quad_double_start_solution(cellidx, solidx, vrblvl=0)

Sets the start solution of index solidx, with cell with index cellidx, to the solutions in quad double precision.

volumes.stable_mixed_volume(pols, demics=True, vrblvl=0)

Returns the mixed and the stable mixed volume of the polynomial system in the list pols. The polynomial system must have as many equations as unknowns. The demics flag indicates if dynamic enumeration as implemented by the software DEMiCs will be used, otherwise MixedVol is called. The verbose level is given by vrblvl.

volumes.test_double_double_polyhedral_homotopies(vrblvl=0)

Test the polyhedral homotopies in double double precision to compute and solve a random coefficient system. The verbose level is given by vrblvl.

volumes.test_double_polyhedral_homotopies(vrblvl=0)

Test the polyhedral homotopies in double precision to compute and solve a random coefficient system. The verbose level is given by vrblvl.

volumes.test_make_random_coefficient_system(vrblvl=0)

Test the making of a random coefficient system. The verbose level is given by vrblvl.

volumes.test_mixed_volume(vrblvl=0)

Computes the mixed volume of a simple example. The verbose level is given by vrblvl.

volumes.test_quad_double_polyhedral_homotopies(vrblvl=0)

Test the polyhedral homotopies in quad double precision to compute and solve a random coefficient system. The verbose level is given by vrblvl.

volumes.test_stable_mixed_volume(vrblvl=0)

Computes the stable mixed volume of a simple example. The verbose level is given by vrblvl.

functions in the module solver

The documentation strings of the functions exported by the module solver of the package phcpy are listed below.

Exports the blackbox solver for isolated solutions of square systems, in double, double double, and quad double precision. Also Laurent systems are accepted on input.

solver.main()

Runs tests on the blackbox solver.

solver.random_trinomials(vrblvl=0)

Returns a system of two trinomials equations for testing. A trinomial consists of three monomials in two variables. Exponents are uniform between 0 and 5 and coefficients are on the complex unit circle.

solver.real_random_trinomials(sys, vrblvl=0)

On input in sys are two random trinonials with complex coefficients, in the format what random_trinomials() returns. On return is a list of two real random trinomials with the same monomial structure but with random real coefficients in [-1,+1].

solver.solve(pols, tasks=0, mvfocus=0, precision='d', checkin=True, dictionary_output=False, vrblvl=0)

Calls the blackbox solver to compute all isolated solutions. To compute all solutions, also all positive dimensional solution sets, with a numerical irreducible decomposition, see phcpy.decomposition. On input in pols is a list of strings. The number of tasks for multithreading is given by tasks. The default zero value for tasks indicates no multithreading. If the mvfocus option is set to one, then only mixed volumes and polyhedral homotopies will be applied in the solver, and no degree bounds will be computed, as is already the case when the input system is genuinely laurent and has negative exponents. Three levels of precision are supported:

d: standard double precision (1.1e-15 or 2^(-53)),

dd: double double precision (4.9e-32 or 2^(-104)),

qd: quad double precision (1.2e-63 or 2^(-209)).

If checkin (by default), the input pols is checked for being square. If dictionary_output, then on return is a list of dictionaries, else the returned list is a list of strings. If vrblvl is larger than 0, then the names of the procedures called in the running of the blackbox solver will be listed.

solver.solve_checkin(pols, msg, vrblvl=0)

Checks whether the system defined by the list of strings in pols is square. If so, True is returned. Otherwise, the error message in the string msg is printed to help the user.

solver.solve_double_double_laurent_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the laurent system stored in double double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.solve_double_double_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the system stored in double double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.solve_double_laurent_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the laurent system stored in double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.solve_double_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the system stored in double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.solve_quad_double_laurent_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the laurent system stored in quad double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.solve_quad_double_system(nbtasks=0, mvfocus=0, vrblvl=0)

Solves the system stored in quad double precision, where nbtasks equals the number of tasks, no multitasking if zero, mvfocus equals zero by default and all root counts are computed, otherwise, the focus is on mixed volumes and polyhedral homotopies, and vrblvl is the verbose level.

solver.test_double_double_laurent_solve(vrblvl=0)

Solves a simple laurent system in double double precision. The verbose level is given by vrblvl.

solver.test_double_double_solve(vrblvl=0)

Solves a simple system in double double precision. The verbose level is given by vrblvl.

solver.test_double_laurent_solve(vrblvl=0)

Solves a simple laurent system in double precision. The verbose level is given by vrblvl.

solver.test_double_solve(vrblvl=0)

Solves a simple system in double precision. The verbose level is given by vrblvl.

solver.test_quad_double_laurent_solve(vrblvl=0)

Solves a simple laurent system in quad double precision. The verbose level is given by vrblvl.

solver.test_quad_double_solve(vrblvl=0)

Solves a simple system in quad double precision. The verbose level is given by vrblvl.

solver.test_solve(vrblvl=0)

Tests the solve function on a simple system.

solver.test_trinomial_solve(vrblvl=0)

Generates a random trinomial system and solves it. The verbose level is given by vrblvl.

functions in the module examples

To demonstrate the capabilities of the solver and the relevance of polynomial systems to various fields of science and engineering, several examples from the literature are provided by the examples module.

This module offers functions to returns the lists of polynomial strings of some well known examples. The test solves all systems and tests on the number of solutions. Running the tests can take some time.

examples.binomials()

A binomial system is a polynomial system where every equation has exactly two monomials with nonzero coefficient. A pure dimensional binomial system can be solved quickly. The example below has negative exponents.

examples.cyclic7()

The cyclic 7-roots problem is a standard benchmark problem for polynomial system solvers. Reference: Backelin, J. and Froeberg, R.: How we proved that there are exactly 924 cyclic 7-roots, Proceedings of ISSAC-91, pp 103-111, ACM, New York, 1991.

examples.fbrfive4()

Four-bar linkage through five points, 4-dimensional version. Reference: Charles W. Wampler: Isotropic coordinates, circularity and Bezout numbers: planar kinematics from a new perspective. Publication R&D-8188, General Motors Corporation, Research and Development Center. Proceedings of the 1996 ASME Design Engineering Technical Conference, Irvine, California August 18-22, 1996. CD-ROM edited by McCarthy, J.M., American society of mechanical engineers.

examples.game4two()

Totally mixed Nash equilibria for 4 players with two pure strategies. See the paper by Andrew McLennan on The maximal generic number of pure Nash equilibria, Journal of Economic Theory, Vol 72, pages 408-410, 1997. Another reference is the paper by Richard D. McKelvey and Andrew McLennan: on The maximal number of regular totally mixed Nash equilibria, Journal of Economic Theory, Volume 72, pages 411-425, 1997. For more on equilibria, see David M. Kreps and Robert Wilson: Sequential Equibria, Econometrica, Vol 50, No 4, pages 863-894,1982.

examples.katsura6()

A problem of magnetism in physics, see for examples the paper by S. Katsura, in New Trends in Magnetism, edited by M.D. Coutinho-Filho and S.M. Resende, World Scientific, 1990. It became part of the PoSSo test suite, Shigotoshi Katsura: “Users posing problems to PoSSo”, in the PoSSo Newsletter, no. 2, July 1994, edited by L. Gonzalez-Vega and T. Recio. See also the paper by W. Boege, R. Gebauer, and H. Kredel: Some examples for solving systems of algebraic equations by calculating Groebner bases, J. Symbolic Computation, 2:83-98, 1986. The system can be written for any dimension.

examples.main()

Solves the systems and checks on their number of solutions.

examples.noon3()

A neural network modeled by an adaptive Lotka-Volterra system. See the paper by Karin Gatermann on Symbolic solution of polynomial equation systems with symmetry, Proceedings of ISSAC-90, pages 112-119, ACM New York, 1990. The system belongs to a family of problems of V.W. Noonburg: A neural network modeled by an adaptive Lotka-Volterra system, SIAM J. Appl. Math., Vol. 49, No. 6, 1779-1792, 1989.

examples.rps10()

RPS Serial Chains for 10 positions on a circular hyperboloid. From the paper of Hai-Jun Su and J. Michael McCarthy: Kinematics Synthesis of RPS Serial Chains, In Proceedings of the ASME Design Engineering Technical Conferences (CDROM). Paper DETC03/DAC-48813. Chicago, IL, Sept.02-06, 2003.

examples.sevenbar()

Returns the list of strings which represent Laurent polynomials for a special sevenbar mechanism that has isolated solutions and a cubic curve. A reference for the general case is the paper by Carlo Innocenti: Polynomial solution to the position analysis of the 7-line Assur kinematic chain with one quaternary link, in Mech. Mach. Theory, Vol. 30, No. 8, pages 1295-1303, 1995. The special case was introduced in the paper with title: Numerical decomposition of the solution sets of polynomial systems into irreducible components, SIAM J. Numer. Anal. 38(6):2022-2046, 2001, by Andrew Sommese, Jan Verschelde, and Charles Wampler.

examples.solve_binomials()

Runs the test on solving the binomials example. Checks that the number of solutions equals 20. Returns 0 if if the test passed, 1 if the test failed.

examples.solve_cyclic7()

Runs the test on solving the cyclic 7-roots problem. Checks that the number of solutions equals 924. Returns 0 if the test passed, 1 if the test failed.

examples.solve_fbrfive4()

Runs the test on solving a generic 4-bar problem. Checks that the number of solutions equals 36. Returns 0 if the test passed, 1 if the test failed.

examples.solve_game4two()

Runs the test on solving a Nash equilibrium problem. Checks that the number of solutions equals 9. Returns 0 if the test passed, 1 if the test failed.

examples.solve_katsura6()

Runs the test on solving the katsura6 problem. Checks that the number of solutions equals 64. Returns 0 if the test passed, 1 if the test failed.

examples.solve_noon3()

Test on solving the noon3 system. Checks that the number of solutions equals 21. Returns 0 if the test passed, 1 if the test failed.

examples.solve_rps10()

Test on solving a mechanical design problem. Checks that the number of solutions equals 1024. Returns 0 if the test passed, 1 if the test failed.

examples.solve_sevenbar()

Test on solving the sevenbar problem. Checks that the degree of the curve is one and that there are six isolated solutions.

examples.solve_stewgou40()

Test on solving a fully reall Stewart-Gough platform. Checks that the number of solutions equals 40. Returns 0 if the test passed, 1 if the test failed.

examples.solve_sysd1()

Runs the test on solving the benchmark problem D1. Checks that the number of solutions equals 48. Returns 0 if the test passed, 1 if the test failed.

examples.solve_tangents()

Test on solving the tangents to 4 spheres problem. Checks that the number of solutions equals 6. Returns 0 if the test passed, 1 if the test failed.

examples.stewgou40()

Stewart-Gough platform with 40 real postures. From the paper of Peter Dietmaier: The Stewart-Gough platform of general geometry can have 40 real postures, pages 1-10, in Advances in Robot Kinematics: Analysis and Control, edited by Jadran Lenarcic and Manfred L. Husty, Kluwer Academic Publishers, Dordrecht, 1998.

examples.sysd1()

A sparse system, know as benchmark D1 of the paper by H. Hong and V. Stahl: Safe Starting Regions by Fixed Points and Tightening, Computing 53(3-4): 322-335, 1995.

examples.tangents()

Three lines tangent to four given spheres, each with multiplicity 4. Originally formulated as a polynomial system by Cassiano Durand. Thorsten Teobald came up with the positioning of the centers of the spheres, each with radius 0.5 at the vertices of a tethrahedron. See the paper by Frank Sottile: From Enumerative Geometry to Solving Systems of Polynomial Equations”. In “Computations in Algebraic Geometry with Macaulay 2”, edited by David Eisenbud, Daniel R. Grayson, Michael Stillman, and Bernd Sturmfels, Volume 8 of Algorithms and Computation in Mathematics, pages 101-129, Springer-Verlag, 2002. Another reference is the paper by Frank Sottile and Thorsten Theobald: Lines tangents to 2n - 2 spheres in R^n. Trans. Amer. Math. Soc. 354:4815-4829, 2002.

functions in the module families

Polynomial system are often defined for any dimension that is: for any number of equations and number of variables. Such families of polynomial systems are important benchmark systems, for example: the cyclic n-roots system.

The module families contains scripts to generate polynomial systems for any dimension.

families.adjacent_minors(rows, cols)

Returns all adjacent 2-by-2 minors of a general matrix of dimensions rows by cols. This system originated in a paper on lattice walks and primary decomposition, written by P. Diaconis, D. Eisenbud, and B. Sturmfels, published by Birkhauser in 1998 in Mathematical Essays in Honor of Gian-Carlo Rota, edited by B. E. Sagan and R. P. Stanley, volume 161 of Progress in Mathematics, pages 173–193. See also the paper by S. Hosten and J. Shapiro on Primary decomposition of lattice basis ideals, published in 2000 in the Journal of Symbolic Computation, volume 29, pages 625-639.

families.chandra(dim, par=0.51234)

Generates the equations of the Chandrasekhar H-equation for the given dimension dim and parameter par. The name of the problem stems from the 1960 Dover publication Radiative Transfer by S. Chandrasekhar. The problem was used as an illustration in the paper by C.T. Kelley on Solution of the Chandrasekhar H-equation by Newton’s method, published in J. Math. Phys. 21, pages 1625-1628, 1980. It featured in the paper by Jorge J. More on A collection of nonlinear model problems, published in volume 26 of the Lectures in Applied Mathematics, pages 723-762, AMS 1990 and in the paper by Laureano Gonzalez-Vega on Some examples on problem solving by using the symbolic viewpoint when dealing with polynomial systems of equations, published in Computer Algebra in Science and Engineering, pages 102-116, World Scientific, 1995.

families.cyclic(dim)

Returns a list of string representing the polynomials of the cyclic n-roots system. This system entered the computer algebra literature in a technical report by J. Davenport on Looking at a set of equations, published in 1987 as Bath Computer Science Technical Report 87-06. Another technical report by J. Backelin in 1989 has the title Square multiples n give infinitely many cyclic n-roots, publised as Reports, Matematiska Institutionen 8, Stockholms universitet. Another interesting preprint is written by U. Haagerup, available at http://www.math.ku.dk/~haagerup, on cyclic p-roots of prime length p and related complex Hadamard matrices.

families.firsteqs(dim)

Returns the list of equations defining the relations between the S[i,j] and the r[i,j] variables, for all i < j, for i from 1 to dim-1. Since the S[i,j] variables occur linearly, with these equations we can rewrite S[i,j] in terms of the corresponding r[i,j] variables. The elimination of the S[i,j] comes at the expense of high degrees in the r[i,j] variables of the remaining equations.

families.generic_nash_system(nbplayers)

Returns a list of strings representing polynomials that define totally mixed Nash equilibria for a number of players equals to nbplayers with two pure strategies. The problem setup is generic in the sense that the utilities are uniformly generated positive floats in [0,1]. For n players, the n-homogeneous Bezout number provides a generically exact count on the number of equilibria, see the paper by Richard D. McKelvey and Andrew McLennan on the maximal number of regular totally mixed Nash equilibria, published in the Journal of Economic Theory, volume 72, pages 411-425, 1997.

families.indeterminate_matrix(rows, cols)

Returns a list of lists with as many lists as the value of rows. Each rows has as many indeterminates as the value of cols. The lists of lists contains the data for a matrix of dimension rows by cols of variables.

families.katsura(dim)

Returns the list of strings to represent the system of Katsura. The system originated in a paper by S. Katsura on Spin glass problem by the method of integral equation of the effective field, published in 1990 by World Scientific in the volume New Trends in Magnetism, edited by M. D. Coutinho-Filho and S. M. Resende, pages 110-121. The note by S. Katsura on Users posing problems to PoSSo appeared in 1994 in the second number of the PoSSo Newsletter, edited by L. Gonzalez-Vega and T. Recio.

families.katsura_variable(var, dim)

Returns the variable U(var, dim) for use in the function katsura.

families.nash(nbplayers, player)

Returns the string representation of one equation for a player to compute the totally mixed Nash equibria for nbplayers with two pure strategies, with random positive utilities.

families.nbodyeqs(dim, mas)

The central configurations of the n-body problem can be defined via the Albouy-Chenciner equations, by A. Albouy and A. Chenciner: Le probleme des n corps et les distances mutuelles. Inv. Math. 131, 151-184, 1998; and the paper by M. Hampton and R. Moeckel on Finiteness of relative equilibria of the four-body problem. Inv. Math. 163, 289-312, 2006. Returns a list of strings, representing the central configurations for the n-body problem, where n = dim and with masses in the list mas. We require that len(mas) == dim.

families.noon(dim, parameter=1.1)

Returns the list of strings to represent the system of Noonburg. The system originates in a paper by V. W. Noonburg on a neural network modeled by an adaptive Lotka-Volterra system, published in 1989 in volume 49 of SIAM Journal on Applied Mathematics, pages 1779-1792. It appeared also in a paper by K. Gatermann entitled Symbolic solution of polynomial equation systems with symmetry, published by ACM in 1990 in the proceedings of ISSAC-90, pages 112-119.

families.pieri_problem(mdim, pdim, real=True)

Returns a system that expresses the intersection of pdim-planes with mdim*pdim general mdim-planes in (mdim+pdim)-space. When real is True, the generated mdim-planes are osculating a rational normal curve and all solutions are expected to be real. If real is False, then random complex planes are generated. For reality of solutions of polynomial systems, see the book by Frank Sottile: Real Solutions to Equations from Geometry, volume 57 of University Lecture Series, AMS, 2011.

families.poleqs(dim, masses)

Returns the list of polynomial equations for the central configurations, for as many masses as the dimension dim.

families.recpol(nbplayers, player, ind, acc)

Recursive generation of one polynomial, called by the function nash below.

families.strvar(name, i, j)

Returns the string representation for the variable with the given name and indices i and j, i != j. Swaps the values for i and j if i > j.

families.test()

Writes particular instances of the systems in the families.

homotopy methods and path tracking algorithms

A homotopy method constructs a start system for an artificial parameter homotopy. Solution paths start at the known solutions of the start system and end at the solutions of the system that has to be solved, called the target system.

Path tracking algorithms compute approximations for the points on the solution paths, using predictor-corrector methods. The step size control can be done either aposteriori, based on the performance of the corrector; or apriori, using a predictor which estimates the distance to the nearest path and the convergence radius of the power series expansions of the solution curves. For natural parameter homotopies, arc length parameter continuation with aposteriori step size control is available.

functions in the module homotopies

A polynomial homotopy is a family of polynomial systems with one parameter. In an artificial parameter homotopy, there is a start and a target system. There is only one system in a natural parameter homotopy, where one variable plays the role of the parameter in the homotopy. The module homotopies exports several functions to set start and target functions in a homotopy. There are 36 copy functions:

copy_{double, double_double, quad_double}

_{laurent_system, system, solutions} _{from, into}_{start, target}

which take no input arguments (other than the verbose level), and have no return arguments (other than the return value of the call). Those copy functions are auxiliary to the set functions to define the homotopies.

homotopies.clear_double_double_homotopy(vrblvl=0)

Clears the homotopy set in double double precision.

homotopies.clear_double_double_laurent_homotopy(vrblvl=0)

Clears the Laurent homotopy set in double double precision.

homotopies.clear_double_homotopy(vrblvl=0)

Clears the homotopy set in double precision.

homotopies.clear_double_laurent_homotopy(vrblvl=0)

Clears the homotopy set in double precision.

homotopies.clear_quad_double_homotopy(vrblvl=0)

Clears the homotopy set in quad double precision.

homotopies.clear_quad_double_laurent_homotopy(vrblvl=0)

Clears the Laurent homotopy set in quad double precision.

homotopies.copy_double_double_laurent_system_from_start(vrblvl=0)

Copies the start Laurent system set in an artificial-parameter homotopy in double double precision into the Laurent system in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_laurent_system_from_target(vrblvl=0)

Copies the target Laurent system set in an artificial-parameter homotopy in double double precision into the Laurent system in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_laurent_system_into_start(vrblvl=0)

Copies the Laurent system set in double double precision to the start in an artificial-parameter homotopy in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_laurent_system_into_target(vrblvl=0)

Copies the system set in double double precision to the target in an artificial-parameter homotopy in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_solutions_from_start(vrblvl=0)

Copies the start solutions in an artificial-parameter homotopy in double double precision to the solutions in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_solutions_from_target(vrblvl=0)

Copies the target solutions in an artificial-parameter homotopy in double precision to the solutions in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_solutions_into_start(vrblvl=0)

Copies the solutions set in double double precision to the start solutions in an artificial-parameter homotopy in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_solutions_into_target(vrblvl=0)

Copies the solutions set in double double precision to the target solutions in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_system_from_start(vrblvl=0)

Copies the start system set in an artificial-parameter homotopy in double double precision into the system in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_system_from_target(vrblvl=0)

Copies the target system set in an artificial-parameter homotopy in double double precision into the system in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_system_into_start(vrblvl=0)

Copies the system set in double double precision to the start in an artificial-parameter homotopy in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_double_system_into_target(vrblvl=0)

Copies the system set in double double precision to the target in an artificial-parameter homotopy in double double precision. The verbose level is given by vrblvl.

homotopies.copy_double_laurent_system_from_start(vrblvl=0)

Copies the start Laurent system set in an artificial-parameter homotopy in double precision into the Laurent system in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_laurent_system_from_target(vrblvl=0)

Copies the target Laurent system set in an artificial-parameter homotopy in double precision into the Laurent system in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_laurent_system_into_start(vrblvl=0)

Copies the Laurent system set in double precision to the start system in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_laurent_system_into_target(vrblvl=0)

Copies the Laurent system set in double precision to the target in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_solutions_from_start(vrblvl=0)

Copies the start solutions in an artificial-parameter homotopy in double precision to the solutions in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_solutions_from_target(vrblvl=0)

Copies the target solutions in an artificial-parameter homotopy in double precision to the solutions in double precision.

homotopies.copy_double_solutions_into_start(vrblvl=0)

Copies the solutions set in double precision to the start solutions in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_solutions_into_target(vrblvl=0)

Copies the solutions set in double precision to the target solutions in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_system_from_start(vrblvl=0)

Copies the start system set in an artificial-parameter homotopy in double precision into the system in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_system_from_target(vrblvl=0)

Copies the target system set in an artificial-parameter homotopy in double precision into the system in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_system_into_start(vrblvl=0)

Copies the system set in double precision to the start system in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_double_system_into_target(vrblvl=0)

Copies the system set in double precision to the target in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_laurent_system_from_start(vrblvl=0)

Copies the start Laurent system set in an artificial-parameter homotopy in quad double precision into the Laurent system in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_laurent_system_from_target(vrblvl=0)

Copies the target Laurent system set in an artificial-parameter homotopy in quad double precision into the Laurent system in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_laurent_system_into_start(vrblvl=0)

Copies the Laurent system set in quad double precision to the start in an artificial-parameter homotopy in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_laurent_system_into_target(vrblvl=0)

Copies the Laurent system set in quad double precision to the target system in an artificial-parameter homotopy in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_solutions_from_start(vrblvl=0)

Copies the start solutions in an artificial-parameter homotopy in quad double precision to the solutions in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_solutions_from_target(vrblvl=0)

Copies the target solutions in an artificial-parameter homotopy in quad double precision to the solutions in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_solutions_into_start(vrblvl=0)

Copies the solutions set in quad double precision to the start solutions in an artificial-parameter homotopy in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_solutions_into_target(vrblvl=0)

Copies the solutions set in quad double precision to the target solutions in an artificial-parameter homotopy in double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_system_from_start(vrblvl=0)

Copies the start system set in an artificial-parameter homotopy in quad double precision into the system in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_system_from_target(vrblvl=0)

Copies the target system set in an artificial-parameter homotopy in quad double precision into the system in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_system_into_start(vrblvl=0)

Copies the system set in quad double precision to the start in an artificial-parameter homotopy in quad double precision. The verbose level is given by vrblvl.

homotopies.copy_quad_double_system_into_target(vrblvl=0)

Copies the system set in quad double precision to the target system in an artificial-parameter homotopy in quad double precision. The verbose level is given by vrblvl.

homotopies.example_start_system(vrblvl=0)

Returns an example of a start system.

homotopies.example_target_system(vrblvl=0)

Returns an example of a target system.

homotopies.get_double_double_target_solutions(vrblvl=0)

Returns the list of target solutions computed in double double precision.

homotopies.get_double_target_solutions(vrblvl=0)

Returns the list of target solutions computed in double precision.

homotopies.get_quad_double_target_solutions(vrblvl=0)

Returns the list of target solutions computed in quad double precision.

homotopies.main()

Runs some tests.

homotopies.set_double_double_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start system are set in double double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the homotopy is returned.

homotopies.set_double_double_laurent_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start Laurent system are set in double double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the Laurent homotopy is returned.

homotopies.set_double_double_laurent_start_system(pols, vrblvl=0)

Sets the start Laurent system in an artificial parameter homotopy in double double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_double_laurent_target_system(pols, vrblvl=0)

Sets the target Laurent system in an artificial parameter homotopy in double double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_double_start_solutions(nvr, sols, vrblvl=0)

Sets the start solutions in an artificial parameter homotopy in double double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_double_double_start_system(pols, vrblvl=0)

Sets the start system in an artificial parameter homotopy in double double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_double_target_solutions(nvr, sols, vrblvl=0)

Sets the target solutions in an artificial parameter homotopy in double double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_double_double_target_system(pols, vrblvl=0)

Sets the target system in an artificial parameter homotopy in double double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start system are set in double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the homotopy is returned.

homotopies.set_double_laurent_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start Laurent system are set in double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the Laurent homotopy is returned.

homotopies.set_double_laurent_start_system(pols, vrblvl=0)

Sets the start Laurent system in an artificial parameter homotopy in double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_laurent_target_system(pols, vrblvl=0)

Sets the target Laurent system in an artificial parameter homotopy in double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_start_solutions(nvr, sols, vrblvl=0)

Sets the start solutions in an artificial parameter homotopy in double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_double_start_system(pols, vrblvl=0)

Sets the start system in an artificial parameter homotopy in double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_double_target_solutions(nvr, sols, vrblvl=0)

Sets the target solutions in an artificial parameter homotopy in double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_double_target_system(pols, vrblvl=0)

Sets the target system in an artificial parameter homotopy in double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_quad_double_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start system are set in quad double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the homotopy is returned.

homotopies.set_quad_double_laurent_homotopy(gamma=0, pwt=2, vrblvl=0)

After the target and start Laurent system are set in quad double precision, the homotopy is constructed with either a random gamma constant, or with the given complex value of gamma. The power of the continuation parameter is given by pwt. The gamma used to make the Laurent homotopy is returned.

homotopies.set_quad_double_laurent_start_system(pols, vrblvl=0)

Sets the start Laurent system in an artificial parameter homotopy in quad double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_quad_double_laurent_target_system(pols, vrblvl=0)

Sets the target Laurent system in an artificial parameter homotopy in quad double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_quad_double_start_solutions(nvr, sols, vrblvl=0)

Sets the start solutions in an artificial parameter homotopy in quad double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_quad_double_start_system(pols, vrblvl=0)

Sets the start system in an artificial parameter homotopy in quad double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.set_quad_double_target_solutions(nvr, sols, vrblvl=0)

Sets the target solutions in an artificial parameter homotopy in quad double precision to the list of solutions in sols, where the number of variables in nvr must match the dimension of the start system. The verbose level is given by vrblvl.

homotopies.set_quad_double_target_system(pols, vrblvl=0)

Sets the target system in an artificial parameter homotopy in quad double precision to the list of polynomials in pols, which is assumed to be square. The verbose level is given by vrblvl.

homotopies.test_double_double_laurent_start_system(vrblvl=0)

Tests the definition of a start system in double double precision, set as Laurent system.

homotopies.test_double_double_laurent_target_system(vrblvl=0)

Tests the definition of a target system in double double precision, set as Laurent system.

homotopies.test_double_double_start_system(vrblvl=0)

Tests the definition of a start system in double double precision.

homotopies.test_double_double_target_system(vrblvl=0)

Tests the definition of a target system in double double precision.

homotopies.test_double_laurent_start_system(vrblvl=0)

Tests the definition of a start system in double precision, set as a Laurent system.

homotopies.test_double_laurent_target_system(vrblvl=0)

Tests the definition of a target system in double precision, set as Laurent system.

homotopies.test_double_start_system(vrblvl=0)

Tests the definition of a start system in double precision.

homotopies.test_double_target_system(vrblvl=0)

Tests the definition of a target system in double precision.

homotopies.test_quad_double_laurent_start_system(vrblvl=0)

Tests the definition of a start system in quad double precision, set as Laurent system.

homotopies.test_quad_double_laurent_target_system(vrblvl=0)

Tests the definition of a target system in quad double precision, set as Laurent system.

homotopies.test_quad_double_start_system(vrblvl=0)

Tests the definition of a start system in quad double precision.

homotopies.test_quad_double_target_system(vrblvl=0)

Tests the definition of a target system in quad double precision.

functions in the module starters

A an artificial parameter homotopy is a family of polynomial systems which connects a given target system to a start system. The module starters exports several functions to construct start systems. Analoguous to the culinary starters, start systems may be viewed as systems that are easier to solve (or digest) than general systems.

starters.linear_product_root_count(pols, checkin=True, vrblvl=0)

Given in pols a list of string representations of polynomials, returns a linear-product root count based on a supporting set structure of the polynomials in pols. This root count is an upper bound for the number of isolated solutions.

starters.m_homogeneous_bezout_number(pols, vrblvl=0)

Given in pols a list of string representations of polynomials, in as many variables as the elements in the list, this function applies a heuristic to generate a partition of the set of unknowns to exploit the product structure of the system. On return are the m-homogeneous Bezout number and the partition of the set of unknowns. If the partition equals the entire set of unknowns, then the 1-homogeneous Bezout number equals the total degree of the system.

starters.m_homogeneous_start_system(pols, partition, checkin=True, vrblvl=0)

For an m-homogeneous Bezout number of a polynomial system defined by a partition of the set of unknowns, one can define a linear-product system that has exactly as many regular solutions as the Bezount number. This linear-product system can then be used as start system in a homotopy to compute all isolated solutions of any polynomial system with the same m-homogeneous structure. This function returns a linear-product start system with random coefficients and its solutions for the given polynomials in pols and the partition. If checkin, then the list pols is tested to see if pols defines a square polynomial system. If the input system is not square, then an error message is printed and None is returned.

starters.m_partition_bezout_number(pols, partition, vrblvl=0)

There are as many m-homogeneous Bezout numbers as there are partitions of the set of unknowns of a polynomial system. Given in pols the string representations of a polynomial system in as many variables as equations, and a string representation of a partition of the set of unknowns, this function returns the m-homogeneous Bezout number corresponding to the given partition.

starters.main()

Runs some tests.

starters.random_linear_product_system(pols, checkin=True, tosolve=True, vrblvl=0)

Given in pols a list of string representations of polynomials, returns a random linear-product system based on a supporting set structure and its solutions as well (if tosolve). If checkin, then the list pols is tested to see if pols defines a square polynomial system. If the input system is not square, then an error message is printed and None is returned.

starters.test_linear_product_root_count(vrblvl=0)

Tests the linear product root count.

starters.test_m_homogeneous_degree(vrblvl=0)

Tests m-homogeneous Bezout number.

starters.test_total_degree(vrblvl=0)

Tests the total degree and the start system.

starters.total_degree(pols, vrblvl=0)

Given in pols a list of string representations of polynomials, returns the product of the degrees of the polynomials, the so-called total degree which bounds the number of isolated solutions of the polynomial system. The system is assumed to be square. The value of the verbose level is given by vrblvl.

starters.total_degree_start_system(pols, checkin=True, vrblvl=0)

Returns the system and solutions of the total degree start system for the polynomials represented by the strings in the list pols. If checkin, then the list pols is tested to see if pols defines a square polynomial system. If the input system is not square, then an error message is printed and None is returned.

functions in the module trackers

The module trackers offers functions to track paths starting at the known solutions of a start system and leading to the desired solutions of a target system, with aposteriori step size control algorithms. An aposteriori step size control algorithm determines the step size based on the performance of the corrector. For small problems, the default values of the parameters and tolerances for predictor and corrector suffice, otherwise they must be tuned. Reruns of paths must happen with the same value of the gamma constant.

trackers.autotune_parameters(difficulty_level, digits_of_precision, vrblvl=0)

Tunes the parameters given the difficulty level of the homotopy and the digits of working precision. The verbose level is given by vrblvl.

trackers.clear_double_double_laurent_track_data(vrblvl=0)

Clears the data allocated for path tracking in double double precision with an artificial parameter Laurent homotopy.

trackers.clear_double_double_track_data(vrblvl=0)

Clears the data allocated for path tracking in double double precision with an artificial parameter homotopy.

trackers.clear_double_laurent_track_data(vrblvl=0)

Clears the data allocated for path tracking in double precision with an artificial parameter Laurent homotopy.

trackers.clear_double_track_data(vrblvl=0)

Clears the data allocated for path tracking in double precision with an artificial parameter homotopy.

trackers.clear_quad_double_laurent_track_data(vrblvl=0)

Clears the data allocated for path tracking in quad double precision with an artificial parameter Laurent homotopy.

trackers.clear_quad_double_track_data(vrblvl=0)

Clears the data allocated for path tracking in quad double precision with an artificial parameter homotopy.

trackers.do_double_double_laurent_track(tasks=0, vrblvl=0)

Calls the path trackers in double double precision with a number of tasks equal to tasks (no multithreading if zero), for a homotopy of Laurent polynomial sysetms. The verbose level is given by vrblvl.

trackers.do_double_double_track(tasks=0, vrblvl=0)

Calls the path trackers in double double precision with a number of tasks equal to tasks (no multithreading if zero). The verbose level is given by vrblvl.

trackers.do_double_laurent_track(tasks=0, vrblvl=0)

Calls the path trackers in double precision with a number of tasks equal to tasks (no multithreading if zero), for a homotopy of Laurent polynomial systems. The verbose level is given by vrblvl.

trackers.do_double_track(tasks=0, vrblvl=0)

Calls the path trackers in double precision with a number of tasks equal to tasks (no multithreading if zero). The verbose level is given by vrblvl.

trackers.do_quad_double_laurent_track(tasks=0, vrblvl=0)

Calls the path trackers in quad double precision with a number of tasks equal to tasks (no multithreading if zero), for a homotopy of Laurent polynomial systems. The verbose level is given by vrblvl.

trackers.do_quad_double_track(tasks=0, vrblvl=0)

Calls the path trackers in quad double precision with a number of tasks equal to tasks (no multithreading if zero). The verbose level is given by vrblvl.

trackers.double_double_laurent_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Tracks paths in double double precision, for Laurent systems. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: tasks=0 does not work …

trackers.double_double_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Tracks paths in double double precision. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: tasks=0 does not work …

trackers.double_laurent_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Track paths in double precision, for Laurent systems. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths.

trackers.double_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Track paths in double precision. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths.

trackers.get_condition_level(vrblvl=0)

Returns the level of difficulty. The verbose level is given by vrblvl.

trackers.get_parameter_value(idx, vrblvl=0)

Returns the value of the parameter with index idx. The verbose level is given by vrblvl.

trackers.initialize_double_double_solution(nvr, sol, vrblvl=0)

A double double precision path tracker with a generator is initialized with a start solution sol in a number of variables equal to the value of nvr.

trackers.initialize_double_double_tracker(target, start, fixedgamma=True, regamma=0.0, imgamma=0.0, vrblvl=0)

Initializes a path tracker with a generator for a target and start system given in double double precision. If fixedgamma, then gamma will be a fixed default value, otherwise, a random complex constant for gamma is generated, but only if regamma and imgamma are both equal to 0.0. If not fixedgamma and moreover: regamma and imgamma are not both zero, then the complex number with real part in regamma and imaginary part in imgamma will be the gamma constant.

trackers.initialize_double_solution(nvr, sol, vrblvl=0)

A double precision path tracker with a generator is initialized with a start solution sol in a number of variables equal to the value of nvr.

trackers.initialize_double_tracker(target, start, fixedgamma=True, regamma=0.0, imgamma=0.0, vrblvl=0)

Initializes a path tracker with a generator for a target and start system given in standard double precision. If fixedgamma, then gamma will be a fixed default value, otherwise, a random complex constant for gamma is generated, but only if regamma and imgamma are both equal to 0.0. If not fixedgamma and moreover: regamma and imgamma are not both zero, then the complex number with real part in regamma and imaginary part in imgamma will be the gamma constant.

trackers.initialize_quad_double_solution(nvr, sol, vrblvl=0)

A quad double precision path tracker with a generator is initialized with a start solution sol in a number of variables equal to the value of nvr.

trackers.initialize_quad_double_tracker(target, start, fixedgamma=True, regamma=0.0, imgamma=0.0, vrblvl=0)

Initializes a path tracker with a generator for a target and start system given in quad double precision. If fixedgamma, then gamma will be a fixed default value, otherwise, a random complex constant for gamma is generated, but only if regamma and imgamma are both equal to 0.0. If not fixedgamma and moreover: regamma and imgamma are not both zero, then the complex number with real part in regamma and imaginary part in imgamma will be the gamma constant.

trackers.interactive_tune(vrblvl=0)

Interactive tuning of the parameters. The verbose level is given by vrblvl.

trackers.main()

Runs some tests on tuning and tracking.

trackers.next_double_double_solution(vrblvl=0)

Returns the next solution on a path tracked with double double precision arithmetic, provided the functions initialize_double_double_tracker() and initialize_double_double_solution() have been executed properly.

trackers.next_double_solution(vrblvl=0)

Returns the next solution on a path tracked with double precision arithmetic, provided the functions initialize_double_tracker() and initialize_double_solution() have been executed properly.

trackers.next_quad_double_solution(vrblvl=0)

Returns the next solution on a path tracked with quad double precision arithmetic, provided the functions initialize_quad_double_tracker() and initialize_quad_double_solution() have been executed properly.

trackers.quad_double_laurent_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Tracks paths in quad double precision, for Laurent systems. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: tasks=0 does not work …

trackers.quad_double_track(target, start, startsols, gamma=0, pwt=2, tasks=0, vrblvl=0)

Tracks paths in quad double precision. On input are a target system, a start system with solutions, optionally: a (random) gamma constant and the number of tasks. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. By default, a random gamma constant is generated, otherwise gamma must be a nonzero complex constant. The pwt is the power of t in the homotopy. Changing the default of pwt can only be done if a nonzero complex value for gamma is provided as well. The number of tasks in the multithreading is defined by tasks. The default zero value for tasks indicates no multithreading. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: tasks=0 does not work …

trackers.set_condition_level(level, vrblvl=0)

Sets the parameter that represents the difficulty level of the homotopy to the value of level. The default level equals zero, higher values lead to smaller tolerances. On return is the failure code, which is zero if all went well.

trackers.set_parameter_value(idx, value, vrblvl=0)

Sets the parameter with index idx to the given value. The verbose level is given by vrblvl.

trackers.show_parameters(vrblvl=0)

Displays the current values of the continuation parameters. The verbose level is given by vrblvl.

trackers.test_double_double_laurent_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, set as Laurent system in double double precision.

trackers.test_double_double_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, in double double precision.

trackers.test_double_laurent_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, set as Laurent system in double precision.

trackers.test_double_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, in double precision.

trackers.test_next_double_double_track(vrblvl=0)

Tests the step-by-step tracking on the mickey mouse example of two quadrics, in double double precision.

trackers.test_next_double_track(vrblvl=0)

Tests the step-by-step tracking on the mickey mouse example of two quadrics, in double precision.

trackers.test_next_quad_double_track(vrblvl=0)

Tests the step-by-step tracking on the mickey mouse example of two quadrics, in quad double precision.

trackers.test_quad_double_laurent_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, set as Laurent system in quad double precision.

trackers.test_quad_double_track(vrblvl=0)

Tests tracking the mickey mouse example of two quadrics, in quad double precision.

trackers.test_tuning(vrblvl=0)

Runs some tests on tuning the parameters.

trackers.test_write_parameters(vrblvl=0)

Tests the writing of the parameters.

trackers.write_parameters(vrblvl=0)

Writes the parameters with repeated calls to get_parameter_value(), as the show_parameters() does not work in a Jupyter notebook.

functions in the module tropisms

The module tropisms exports functions to manage numerically computed tropisms in double, double double, or quad double precision, in a polyhedral end game with aposteriori step size control.

tropisms.clear_double_double_tropisms(vrblvl=0)

Clears the tropisms in double double precision.

tropisms.clear_double_tropisms(vrblvl=0)

Clears the tropisms in double precision.

tropisms.clear_quad_double_tropisms(vrblvl=0)

Clears the tropisms in quad double precision.

tropisms.double_double_initialize_tropisms(nbt, dim, wnd, dirs, errs, vrblvl=0)

Initializes the tropisms, given in double double precision, along with estimates for their winding numbers and errors. On entry are the following five parameters:

nbt: the number of direction vectors;

dim: the number of coordinates in each vector;

wnd: a list of integer values for the winding numbers, as many as nbt;

dirs: a list of lists of doubles with the coordinates of the directions, each inner list has dim doubles and nbt vectors are given;

errs: a list of nbt doubles.

tropisms.double_double_tropisms_dimension(vrblvl=0)

Returns the dimension of tropisms in double double precision.

tropisms.double_double_tropisms_number(vrblvl=0)

Returns the number of tropisms in double double precision.

tropisms.double_initialize_tropisms(nbt, dim, wnd, dirs, errs, vrblvl=0)

Initializes the tropisms, given in double precision, along with estimates for their winding numbers and errors. On entry are the following five parameters:

nbt: the number of direction vectors;

dim: the number of coordinates in each vector;

wnd: a list of integer values for the winding numbers, as many as nbt;

dirs: a list of lists of doubles with the coordinates of the directions, each inner list has dim doubles and nbt vectors are given;

errs: a list of nbt doubles.

tropisms.double_tropisms_dimension(vrblvl=0)

Returns the dimension of tropisms in double precision.

tropisms.double_tropisms_number(vrblvl=0)

Returns the number of tropisms in double precision.

tropisms.get_double_double_tropisms(nbt, dim, vrblvl=0)

Given on input the number of tropisms in nbt and the dimension in dim, returns a tuple of three lists: the winding numbers, coordinates of the direction vectors, and the errors; in double double precision.

tropisms.get_double_tropisms(nbt, dim, vrblvl=0)

Given on input the number of tropisms in nbt and the dimension in dim, returns a tuple of three lists: the winding numbers, coordinates of the direction vectors, and the errors; in double precision.

tropisms.get_quad_double_tropisms(nbt, dim, vrblvl=0)

Given on input the number of tropisms in nbt and the dimension in dim, returns a tuple of three lists: the winding numbers, coordinates of the direction vectors, and the errors; in quad double precision.

tropisms.main()

Runs some tests.

tropisms.quad_double_initialize_tropisms(nbt, dim, wnd, dirs, errs, vrblvl=0)

Initializes the tropisms, given in quad double precision, along with estimates for their winding numbers and errors. On entry are the following five parameters:

nbt: the number of direction vectors;

dim: the number of coordinates in each vector;

wnd: a list of integer values for the winding numbers, as many as nbt;

dirs: a list of lists of doubles with the coordinates of the directions, each inner list has dim doubles and nbt vectors are given;

errs: a list of nbt doubles.

tropisms.quad_double_tropisms_dimension(vrblvl=0)

Returns the dimension of tropisms in quad double precision.

tropisms.quad_double_tropisms_number(vrblvl=0)

Returns the number of tropisms in quad double precision.

tropisms.test_double_double_endgame(vrblvl=0)

Tests the numerical computation of a tropism, in double double precision.

tropisms.test_double_double_tropisms_data(vrblvl=0)

Tests tropisms data in double double precision.

tropisms.test_double_endgame(vrblvl=0)

Tests the numerical computation of a tropism, in double precision.

tropisms.test_double_tropisms_data(vrblvl=0)

Tests tropisms data in double precision.

tropisms.test_quad_double_endgame(vrblvl=0)

Tests the numerical computation of a tropism, in quad double precision.

tropisms.test_quad_double_tropisms_data(vrblvl=0)

Tests tropisms data in quad double precision.

functions in the module sweepers

The module sweepers exports the definition of sweep homotopies and the tracking of solution paths defined by sweep homotopies. A sweep homotopy is a polynomial system where some of the variables are considered as parameters. Given solutions for some parameters and new values for the parameters, we can track the solution paths starting at the given solutions and ending at the new solutions for the new values of the parameters. The sweep is controlled by a convex linear combination between the list of start and target values for the parameters. We distinguish between a complex and a real sweep. In a complex sweep, with a randomly generated gamma we avoid singularities along the solution paths, in a complex convex combination between the start and target values for the parameters. This complex sweep is applicable only when the parameter space is convex. In a real sweep, arc-length parameter continuation is applied. The algorithms applied in this module are described in the paper by Kathy Piret and Jan Verschelde: Sweeping Algebraic Curves for Singular Solutions. Journal of Computational and Applied Mathematics, volume 234, number 4, pages 1228-1237, 2010.

sweepers.double_complex_sweep(pols, sols, nvar, pars, start, target, vrblvl=0)

For the polynomials in the list of strings pols and the solutions in sols for the values in the list start, a sweep through the parameter space will be performed in double precision to the target values of the parameters in the list target. The number of variables in the polynomials and the solutions must be the same and be equal to the value of nvar. The list of symbols in pars contains the names of the variables in the polynomials pols that serve as parameters. The size of the lists pars, start, and target must be same.

sweepers.double_complex_sweep_run(gchoice, regamma, imgamma, vrblvl=0)

Starts the trackers in a complex convex parameter homotopy, in double precision, where the indices to the parameters, start and target values are already defined, and the systems and solution are set in double precision. The input parameter gchoice is 0, 1, or 2, for respectively a randomly generated gamma (0), or no gamma (1), or a user given gamma with real and imaginary parts in regamma and imgamma. With a random gamma, this is known as cheater’s homotopy.

sweepers.double_double_complex_sweep(pols, sols, nvar, pars, start, target, vrblvl=0)

For the polynomials in the list of strings pols and the solutions in sols for the values in the list start, a sweep through the parameter space will be performed in double double precision to the target values of the parameters in the list target. The number of variables in the polynomials and the solutions must be the same and be equal to the value of nvar. The list of symbols in pars contains the names of the variables in the polynomials pols that serve as parameters. The size of the lists pars, start, and target must be same.

sweepers.double_double_complex_sweep_run(gchoice, regamma, imgamma, vrblvl=0)

Starts the trackers in a complex convex parameter homotopy, in double double precision, where the indices to the parameters, start and target values are already defined, and the systems and solution are set in double double precision. The input parameter gchoice is 0, 1, or 2, for respectively a randomly generated gamma (0), or no gamma (1), or a user given gamma with real and imaginary parts in regamma and imgamma. With a random gamma, this is known as cheater’s homotopy.

sweepers.double_double_real_sweep(pols, sols, par='s', start=0.0, target=1.0, vrblvl=0)

A real sweep homotopy is a family of n equations in n+1 variables, where one of the variables is the artificial parameter s which moves from 0.0 to 1.0. The last equation can then be of the form

(1 - s)*(lambda - L[0]) + s*(lambda - L[1]) = 0 so that,

at s = 0, the natural parameter lambda has the value L[0], and

at s = 1, the natural parameter lambda has the value L[1].

Thus: as s moves from 0 to 1, lambda goes from L[0] to L[1].

All solutions in the list sols must have then the value L[0] for the variable lambda. The sweep stops when the target value for s is reached or when a singular solution is encountered. Computations happen in double double precision.

sweepers.double_double_real_sweep_run(vrblvl=0)

Starts a sweep with a natural parameter in a family of n equations in n+1 variables, where the last variable is the artificial parameter s that moves the one natural parameter from a start to target value. The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), where A is the natural parameter, going from the start value v[0] to the target value v[1], already set in double double precision. Also set before calling the function are the homotopy and the start solutions, where every solution has the value v[0] for the A variable. The sweep stops when s reaches the value v[1], or when a singularity is encountered on the path.

sweepers.double_real_sweep(pols, sols, par='s', start=0.0, target=1.0, vrblvl=0)

A real sweep homotopy is a family of n equations in n+1 variables, where one of the variables is the artificial parameter s which moves from 0.0 to 1.0. The last equation can then be of the form

(1 - s)*(lambda - L[0]) + s*(lambda - L[1]) = 0 so that,

at s = 0, the natural parameter lambda has the value L[0], and

at s = 1, the natural parameter lambda has the value L[1].

Thus: as s moves from 0 to 1, lambda goes from L[0] to L[1].

All solutions in the list sols must have then the value L[0] for the variable lambda. The sweep stops when the target value for s is reached or when a singular solution is encountered. Computations happen in double precision.

sweepers.double_real_sweep_run(vrblvl=0)

Starts a sweep with a natural parameter in a family of n equations in n+1 variables, where the last variable is the artificial parameter s that moves the one natural parameter from a start to target value. The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), where A is the natural parameter, going from the start value v[0] to the target value v[1], already set in double precision. Also set before calling the function are the homotopy and the start solutions, where every solution has the value v[0] for the A variable. The sweep stops when s reaches the value v[1], or when a singularity is encountered on the path.

sweepers.main()

Runs some tests.

sweepers.quad_double_complex_sweep(pols, sols, nvar, pars, start, target, vrblvl=0)

For the polynomials in the list of strings pols and the solutions in sols for the values in the list start, a sweep through the parameter space will be performed in double double precision to the target values of the parameters in the list target. The number of variables in the polynomials and the solutions must be the same and be equal to the value of nvar. The list of symbols in pars contains the names of the variables in the polynomials pols that serve as parameters. The size of the lists pars, start, and target must be same.

sweepers.quad_double_complex_sweep_run(gchoice, regamma, imgamma, vrblvl=0)

Starts the trackers in a complex convex parameter homotopy, in quad double precision, where the indices to the parameters, start and target values are already defined, and the systems and solution are set in double double precision. The input parameter gchoice is 0, 1, or 2, for respectively a randomly generated gamma (0), or no gamma (1), or a user given gamma with real and imaginary parts in regamma and imgamma. With a random gamma, this is known as cheater’s homotopy.

sweepers.quad_double_real_sweep(pols, sols, par='s', start=0.0, target=1.0, vrblvl=0)

A real sweep homotopy is a family of n equations in n+1 variables, where one of the variables is the artificial parameter s which moves from 0.0 to 1.0. The last equation can then be of the form

(1 - s)*(lambda - L[0]) + s*(lambda - L[1]) = 0 so that,

at s = 0, the natural parameter lambda has the value L[0], and

at s = 1, the natural parameter lambda has the value L[1].

Thus: as s moves from 0 to 1, lambda goes from L[0] to L[1].

All solutions in the list sols must have then the value L[0] for the variable lambda. The sweep stops when the target value for s is reached or when a singular solution is encountered. Computations happen in quad double precision.

sweepers.quad_double_real_sweep_run(vrblvl=0)

Starts a sweep with a natural parameter in a family of n equations in n+1 variables, where the last variable is the artificial parameter s that moves the one natural parameter from a start to target value. The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), where A is the natural parameter, going from the start value v[0] to the target value v[1], already set in quad double precision. Also set before calling the function are the homotopy and the start solutions, where every solution has the value v[0] for the A variable. The sweep stops when s reaches the value v[1], or when a singularity is encountered on the path.

sweepers.set_double_double_start(start, vrblvl=0)

Sets the values of all parameters to start, which contains the consecutive values of all real and imaginary parts of the start values of all parameters, in double double precision. The length of start must be twice the size of the start in double precision.

sweepers.set_double_double_target(target, vrblvl=0)

Sets the values of all parameters to target, which contains the consecutive values of all real and imaginary parts of the target values of all parameters, in double double precision. The length of start must be twice the size of the start in double precision.

sweepers.set_double_start(start, vrblvl=0)

Sets the values of all parameters to start, which contains the consecutive values of all real and imaginary parts of the start values of all parameters, in double precision.

sweepers.set_double_target(target, vrblvl=0)

Sets the values of all parameters to target, which contains the consecutive values of all real and imaginary parts of the target values of all parameters, in double precision.

sweepers.set_parameter_names(neq, nvr, pars, vrblvl=0)

Defines which variables serve as parameters, by providing the names of the parameters in the list pars. The number of equations is given in neq and the number of variables is in nvr.

sweepers.set_quad_double_start(start, vrblvl=0)

Sets the values of all parameters to start, which contains the consecutive values of all real and imaginary parts of the start values of all parameters, in quad double precision. The length of start must be four times the size of the start in double precision.

sweepers.set_quad_double_target(target, vrblvl=0)

Sets the values of all parameters to target, which contains the consecutive values of all real and imaginary parts of the target values of all parameters, in double double precision. The length of start must be four times the size of the start in double precision.

sweepers.test_double_complex_sweep(vrblvl=0)

Runs a complex sweep on two points on the unit circle. Although we start at two points with real coordinates and we end at two points that have nonzero imaginary parts, the sweep does not encounter a singularity because of the random complex gamma constant.

sweepers.test_double_double_complex_sweep(vrblvl=0)

Runs a complex sweep on two points on the unit circle, in double double precision. Although we start at two points with real coordinates and we end at two points that have nonzero imaginary parts, the sweep does not encounter a singularity because of the random complex gamma constant.

sweepers.test_double_double_real_sweep(vrblvl=0)

Runs a real sweep on two points on the unit circle: (1,0), (-1,0), moving the second coordinate from 0 to 2. The sweep will stop at the quadratic turning point: (0,1). We can also run the sweep starting at two complex points: (2*j, sqrt(5)) and (-2*j, sqrt(5)), moving the second coordinate from sqrt(5) to 0. This sweep will also stop at (0,1).

sweepers.test_double_real_sweep(vrblvl=0)

Runs a real sweep on two points on the unit circle: (1,0), (-1,0), moving the second coordinate from 0 to 2. The sweep will stop at the quadratic turning point: (0,1). We can also run the sweep starting at two complex points: (2*j, sqrt(5)) and (-2*j, sqrt(5)), moving the second coordinate from sqrt(5) to 0. This sweep will also stop at (0,1).

sweepers.test_quad_double_complex_sweep(vrblvl=0)

Runs a complex sweep on two points on the unit circle, in quad double precision. Although we start at two points with real coordinates and we end at two points that have nonzero imaginary parts, the sweep does not encounter a singularity because of the random complex gamma constant.

sweepers.test_quad_double_real_sweep(vrblvl=0)

Runs a real sweep on two points on the unit circle: (1,0), (-1,0), moving the second coordinate from 0 to 2. The sweep will stop at the quadratic turning point: (0,1). We can also run the sweep starting at two complex points: (2*j, sqrt(5)) and (-2*j, sqrt(5)), moving the second coordinate from sqrt(5) to 0. This sweep will also stop at (0,1).

functions in the module series

Exports functions to compute series of solution curves defined by polynomial homotopies using Newton’s method.

series.checkin_newton_at_series(nbsym, lser, idx)

Given in nbsym the number of symbols in the polynomial system, in lser the list of leading terms in the series and in idx the index of the parameter, returns True if nbsym = len(lser) if idx == 0, or otherwise if nbsym = len(lser) + 1 if idx != 0. An error message is written and False is returned if the above conditions are not satisfied.

series.double_double_newton_at_point(pols, sols, idx=1, maxdeg=4, nbr=4, vrblvl=0)

Computes series in double double precision for the polynomials in pols, where the leading coefficients are the solutions in sols. On entry are the following five parameters:

pols: a list of string representations of polynomials,

sols: a list of regular solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

vrblvl: the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.double_double_newton_at_series(pols, lser, idx=1, maxdeg=4, nbr=4, checkin=True, vrblvl=0)

Computes series in double double precision for the polynomials in pols, where the leading terms are given in the list lser. On entry are the following five parameters:

pols: a list of string representations of polynomials,

lser: a list of polynomials in the series parameter (e.g.: t), for use as start terms in Newton’s method,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

checkin: checks whether the number of symbols in pols matches the length of the list lser if idx == 0, or is one less than the length of the list lser if idx != 0. If the conditions are not satisfied, then an error message is printed and lser is returned.

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.double_double_pade_approximants(pols, sols, idx=1, numdeg=2, dendeg=2, nbr=4, vrblvl=0)

Computes Pade approximants based on the series in double double precision for the polynomials in pols, where the leading coefficients of the series are the solutions in sols. On entry are the following seven parameters:

pols: a list of string representations of polynomials,

sols: a list of solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

numdeg: the degree of the numerator,

dendeg: the degree of the denominator,

nbr: number of steps with Newton’s method,

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.double_newton_at_point(pols, sols, idx=1, maxdeg=4, nbr=4, vrblvl=0)

Computes series in double precision for the polynomials in pols, where the leading coefficients are the solutions in sols. On entry are the following five parameters:

pols: a list of string representations of polynomials,

sols: a list of regular solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

vrblvl: the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.double_newton_at_series(pols, lser, idx=1, maxdeg=4, nbr=4, checkin=True, vrblvl=0)

Computes series in double precision for the polynomials in pols, where the leading terms are given in the list lser. On entry are the following five parameters:

pols: a list of string representations of polynomials,

lser: a list of polynomials in the series parameter (e.g.: t), for use as start terms in Newton’s method,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

checkin: checks whether the number of symbols in pols matches the length of the list lser if idx == 0, or is one less than the length of the list lser if idx != 0. If the conditions are not satisfied, then an error message is printed and lser is returned.

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.double_pade_approximants(pols, sols, idx=1, numdeg=2, dendeg=2, nbr=4, vrblvl=0)

Computes Pade approximants based on the series in double precision for the polynomials in pols, where the leading coefficients of the series are the solutions in sols. On entry are the following seven parameters:

pols: a list of string representations of polynomials,

sols: a list of solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

numdeg: the degree of the numerator,

dendeg: the degree of the denominator,

nbr: number of steps with Newton’s method,

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.main()

Runs some tests on series developments.

series.make_fractions(pols)

Given a list of string representations for the numerator and denominator polynomials in its even and odd numbered indices, returns a list of string representations for the fractions.

series.quad_double_newton_at_point(pols, sols, idx=1, maxdeg=4, nbr=4, vrblvl=0)

Computes series in quad double precision for the polynomials in pols, where the leading coefficients are the solutions in sols. On entry are the following five parameters:

pols: a list of string representations of polynomials,

sols: a list of solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

vrblvl: the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.quad_double_newton_at_series(pols, lser, idx=1, maxdeg=4, nbr=4, checkin=True, vrblvl=0)

Computes series in quad double precision for the polynomials in pols, where the leading terms are given in the list lser. On entry are the following five parameters:

pols: a list of string representations of polynomials,

lser: a list of polynomials in the series parameter (e.g.: t), for use as start terms in Newton’s method,

idx: index of the series parameter, by default equals 1,

maxdeg: maximal degree of the series,

nbr: number of steps with Newton’s method,

checkin: checks whether the number of symbols in pols matches the length of the list lser if idx == 0, or is one less than the length of the list lser if idx != 0. If the conditions are not satisfied, then an error message is printed and lser is returned.

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.quad_double_pade_approximants(pols, sols, idx=1, numdeg=2, dendeg=2, nbr=4, vrblvl=0)

Computes Pade approximants based on the series in quad double precision for the polynomials in pols, where the leading coefficients of the series are the solutions in sols. On entry are the following seven parameters:

pols: a list of string representations of polynomials,

sols: a list of solutions of the polynomials in pols,

idx: index of the series parameter, by default equals 1,

numdeg: the degree of the numerator,

dendeg: the degree of the denominator,

nbr: number of steps with Newton’s method,

vrblvl: is the verbose level.

On return is a list of lists of strings. Each lists of strings represents the series solution for the variables in the list pols.

series.rational_forms(pols)

Given a list of lists of string representations for the numerators and denominators, returns the proper rational representations for the Pade approximants.

series.replace_symbol(pol, idx, vrblvl=0)

In the polynomial pol, replaces the first symbol by the symbol at place idx.

series.substitute_symbol(pols, idx, vrblvl=0)

Given in pols is a list of polynomials, replaces the first symbol by the symbol at place idx.

series.test_double_apollonius_at_series(vrblvl=0)

Tests Newton’s method starting at a series for the problem of Apollonius, in double precision. The parameter t is the fourth variable, whence we call Newton’s method with idx equal to four.

series.test_double_double_apollonius_at_series(vrblvl=0)

Tests Newton’s method starting at a series for the problem of Apollonius, in double double precision. The parameter t is the fourth variable, whence we call Newton’s method with idx equal to four.

series.test_double_double_pade(vrblvl=0)

The function f(z) = ((1 + 1/2*z)/(1 + 2*z))^(1/2) is a solution x(s) of (1-s)*(x^2 - 1) + s*(3*x^2 - 3/2) = 0 Tests the Pade approximants in double double precision.

series.test_double_double_viviani_at_point(vrblvl=0)

Returns the system which stores the Viviani curve, with some solutions intersected with a plane, in double double precision.

series.test_double_double_viviani_at_series(vrblvl=0)

Computes the power series expansion for the Viviani curve, from a natural parameter perspective, in double double precision.

series.test_double_pade(vrblvl=0)

The function f(z) = ((1 + 1/2*z)/(1 + 2*z))^(1/2) is a solution x(s) of (1-s)*(x^2 - 1) + s*(3*x^2 - 3/2) = 0 Tests the Pade approximants in double precision.

series.test_double_viviani_at_point(vrblvl=0)

Returns the system which stores the Viviani curve, with some solutions intersected with a plane, in double precision.

series.test_double_viviani_at_series(vrblvl=0)

Computes the power series expansion for the Viviani curve, from a natural parameter perspective, in double precision.

series.test_quad_double_apollonius_at_series(vrblvl=0)

Tests Newton’s method starting at a series for the problem of Apollonius, in quad double precision. The parameter t is the fourth variable, whence we call Newton’s method with idx equal to four.

series.test_quad_double_pade(vrblvl=0)

The function f(z) = ((1 + 1/2*z)/(1 + 2*z))^(1/2) is a solution x(s) of (1-s)*(x^2 - 1) + s*(3*x^2 - 3/2) = 0 Tests the Pade approximants in quad double precision.

series.test_quad_double_viviani_at_point(vrblvl=0)

Returns the system which stores the Viviani curve, with some solutions intersected with a plane, in quad double precision.

series.test_quad_double_viviani_at_series(vrblvl=0)

Computes the power series expansion for the Viviani curve, from a natural parameter perspective, in quad double precision.

functions in the module curves

The module curves exports functions to approximate algebraic space curves with rational expressions, also known as Pade approximants, for use in a path tracker with apriori step size control.

curves.clear_double_data(vrblvl=0)

Clears the data used by the tracker in double precision.

curves.clear_double_double_data(vrblvl=0)

Clears the data used by the tracker in double double precision.

curves.clear_quad_double_data(vrblvl=0)

Clears the data used by the tracker in quad double precision.

curves.double_closest_pole(vrblvl=0)

Returns a tuple with the real and imaginary part of the closest pole used in the predictor in double precision.

curves.double_double_closest_pole(vrblvl=0)

Returns a tuple with the real and imaginary part of the closest pole used in the predictor in double double precision.

curves.double_double_estimated_distance(vrblvl=0)

Returns the estimated distance to the closest solution computed by the tracker in double double precision.

curves.double_double_hessian_step(vrblvl=0)

Returns the Hessian step in the tracker in double double precision.

curves.double_double_pade_coefficients(idx, vrblvl=0)

Returns a tuple of lists with the coefficients of the Pade approximants computed by the predictor in double double precision. The first list in the tuple holds the coefficients of the numerator, the second list in the tuple holds the denominator coefficients. On entry in idx is the index of a variable. The double coefficients on return are the highest parts of the double doubles.

curves.double_double_pade_vector(dim, vrblvl=0)

Returns the list of all coefficients over all dim variables, computed by the predictor in double double precision.

curves.double_double_pole_radius(vrblvl=0)

Returns the smallest pole radius, used in the predictor in double double precision.

curves.double_double_pole_step(vrblvl=0)

Returns the pole step in the tracker in double double precision.

curves.double_double_poles(dim, vrblvl=0)

Returns a list of lists of all poles of the vector of length dim, computed by the predictor in double double precision. The doubles on return are the highest parts of the double doubles.

curves.double_double_predict_correct(vrblvl=0)

Performs one predictor and one corrector step on the set homotopy and the set solution, in double double precision. If vrblvl > 0, then extra output is written.

curves.double_double_series_coefficients(dim, vrblvl=0)

Returns a list of lists with the coefficients of the series computed by the predictor in double double precision. The double coefficients are the highest parts of the double doubles. On entry in dim is the number of variables.

curves.double_double_step_size(vrblvl=0)

Returns the step size in the tracker in double double precision.

curves.double_double_t_value(vrblvl=0)

Returns the current t value in the tracker in double double precision.

curves.double_double_track(target, start, startsols, filename='', mhom=0, partition=None, vrblvl=0)

Does path tracking in double double precision. On input are a target system, a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. The first optional argument is the filename for writing extra diagnostics during the tracking. By default mhom is zero and all happens in the original coordinates, if mhom equals one, then 1-homogeneous coordinates are used, and if mhom is two or higher, then multi-homogenization applies and partition contains the index representation of the partition of the set of variables. This index representation is a list of as many indices as the number of variables, defining which set of the partition each variables belongs to. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: for mhom > 0 to work, the target, start system and solution must be provided in homogeneneous coordinates.

curves.double_estimated_distance(vrblvl=0)

Returns the estimated distance to the closest solution computed by the tracker in double precision.

curves.double_hessian_step(vrblvl=0)

Returns the Hessian step in the tracker in double precision.

curves.double_pade_coefficients(idx, vrblvl=0)

Returns a tuple of lists with the coefficients of the Pade approximants computed by the predictor in double precision. The first list in the tuple holds the coefficients of the numerator, the second list in the tuple holds the denominator coefficients. On entry in idx is the index of a variable.

curves.double_pade_vector(dim, vrblvl=0)

Returns the list of all coefficients over all dim variables, computed by the predictor in double precision.

curves.double_pole_radius(vrblvl=0)

Returns the smallest pole radius, used in the predictor in double precision.

curves.double_pole_step(vrblvl=0)

Returns the pole step in the tracker in double precision.

curves.double_poles(dim, vrblvl=0)

Returns a list of lists of all poles of the vector of length dim, computed by the predictor in double precision.

curves.double_predict_correct(vrblvl=0)

Performs one predictor and one corrector step on the set homotopy and the set solution, in double precision. If vrblvl > 0, then extra output is written.

curves.double_series_coefficients(dim, vrblvl=0)

Returns a list of lists with the coefficients of the series computed by the predictor in double precision. On entry in dim is the number of variables.

curves.double_step_size(vrblvl=0)

Returns the step size in the tracker in double precision.

curves.double_t_value(vrblvl=0)

Returns the current t value in the tracker in double precision.

curves.double_track(target, start, startsols, filename='', mhom=0, partition=None, vrblvl=0)

Does path tracking in double precision. On input are a target system, a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. The first optional argument is the filename for writing extra diagnostics during the tracking. By default mhom is zero and all happens in the original coordinates, if mhom equals one, then 1-homogeneous coordinates are used, and if mhom is two or higher, then multi-homogenization applies and partition contains the index representation of the partition of the set of variables. This index representation is a list of as many indices as the number of variables, defining which set of the partition each variables belongs to. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: for mhom > 0 to work, the target, start system and solution must be provided in homogeneneous coordinates.

curves.get_corrector_residual_tolerance(vrblvl=0)

Returns the current tolerance on the corrector residual. The corrector stops if the residual of the current approximation drops below this tolerance.

curves.get_curvature_beta_factor(vrblvl=0)

Returns the current multiplication factor of the curvature bound. This curvature bound gives an upper bound on a safe step size. The step size is set by multiplication of the curvature bound with the beta factor.

curves.get_degree_of_denominator(vrblvl=0)

Returns the current value of the degree of the denominator of the Pade approximant, evaluated to predict the next solution on a path.

curves.get_degree_of_numerator(vrblvl=0)

Returns the current value of the degree of the numerator of the Pade approximant, evaluated to predict the next solution on a path.

curves.get_double_double_predicted_solution(vrblvl=0)

Returns the predicted solution on the path, in double double precision, which starts at the solution set with set_double_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_double_double_solution(vrblvl=0)

Returns the current solution on the path, in double double precision, which starts at the solution set with set_double_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_double_predicted_solution(vrblvl=0)

Returns the predicted solution on the path, in double precision, which starts at the solution set with set_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_double_solution(vrblvl=0)

Returns the current solution on the path, in double precision, which starts at the solution set with set_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_gamma_constant(vrblvl=0)

Returns the current value of the gamma constant in the homotopy. A random value for gamma will guarantee the absence of singular solutions along a path, as unlucky choices belong to an algebraic set. A tuple of two floats is returned, respectively with the real and imaginary parts of the complex value for the gamma constant.

curves.get_maximum_corrector_steps(vrblvl=0)

Returns the current value of the maximum number of corrector steps executed after the predictor stage.

curves.get_maximum_step_size(vrblvl=0)

Returns the current value of the maximum step size. The step size is the increment to the continuation parameter.

curves.get_maximum_steps_on_path(vrblvl=0)

Returns the current value of the maximum number of steps on a path. The path trackers abandons the tracking of a path once the number of steps reaches this maximum number.

curves.get_minimum_step_size(vrblvl=0)

Returns the current value of the minimum step size. The path tracking will stop if the step size is larger than the minimum step size and if the predictor residual is larger than the value for alpha, the tolerance on the predictor residual.

curves.get_parameter_value(idx, vrblvl=0)

Returns the value of the parameter with index idx, where idx is an integer in 1, 2, .., 12. The verbose level is given by vrblvl.

curves.get_pole_radius_beta_factor(vrblvl=0)

Returns the current multiplication factor of the smallest pole radius. The smallest radius of the poles of the Pade approximant gives an upper bound on a safe step size. The step size is set by multiplication of the smallest pole radius with the beta factor.

curves.get_predictor_residual_alpha(vrblvl=0)

Returns the current tolerance on the residual of the predictor. This alpha parameter controls the accuracy of the tracking. As long as the residual of the evaluated predicted solution is larger than alpha, the step size is cut in half.

curves.get_quad_double_predicted_solution(vrblvl=0)

Returns the predicted solution on the path, in quad double precision, which starts at the solution set with set_quad_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_quad_double_solution(vrblvl=0)

Returns the current solution on the path, in quad double precision, which starts at the solution set with set_quad_double_solution(). If vrblvl > 0, then extra output is written.

curves.get_zero_series_coefficient_tolerance(vrblvl=0)

Returns the current tolerance on the series coefficient to be zero. A coefficient in a power series will be considered as zero if its absolute value drops below this tolerance.

curves.initialize_double_artificial_homotopy(target, start, homogeneous=False, vrblvl=0)

Initializes the homotopy with the target and start system for a step-by-step run of the series-Pade tracker, in double precision. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.initialize_double_double_artificial_homotopy(target, start, homogeneous=False, vrblvl=0)

Initializes the homotopy with the target and start system for a step-by-step run of the series-Pade tracker, in double double precision. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.initialize_double_double_parameter_homotopy(hom, idx, vrblvl=0)

Initializes the homotopy with the polynomials in hom for a step-by-step run of the series-Pade tracker, in double double precision. The value idx gives the index of the continuation parameter and is the index of one of the variables in the homotopy hom. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.initialize_double_parameter_homotopy(hom, idx, vrblvl=0)

Initializes the homotopy with the polynomials in hom for a step-by-step run of the series-Pade tracker, in double precision. The value idx gives the index of the continuation parameter and is the index of one of the variables in the homotopy hom. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.initialize_quad_double_artificial_homotopy(target, start, homogeneous=False, vrblvl=0)

Initializes the homotopy with the target and start system for a step-by-step run of the series-Pade tracker, in quad double precision. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.initialize_quad_double_parameter_homotopy(hom, idx, vrblvl=0)

Initializes the homotopy with the polynomials in hom for a step-by-step run of the series-Pade tracker, in quad double precision. The value idx gives the index of the continuation parameter and is the index of one of the variables in the homotopy hom. If vrblvl > 0, then extra output is written. Returns the failure code of the homotopy initializer.

curves.main()

Runs some tests on tuning and tracking.

curves.next_double_double_loop(hom, idx, sols, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in double double precision. On input is a natural parameter homotopy with solutions. The hom is a list of strings representing the polynomials of the natural parameter homotopy. The idx is the index of the variable in hom which is the continuation parameter. The sols is a list of strings representing start solutions. The start solutions do not contain the value of the continuation parameter, which is assumed to be equal to zero. Prompts before each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. On return are the string representations of the solutions computed at the end of the paths.

curves.next_double_double_track(target, start, sols, homogeneous=False, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in double double precision, for an artificial-parameter homotopy. On input are a target system and a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The sols is a list of strings representing start solutions. Prompts for each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. On return are the string representations of the solutions computed at the end of the paths.

curves.next_double_loop(hom, idx, sols, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in double precision. On input is a natural parameter homotopy with solutions. The hom is a list of strings representing the polynomials of the natural parameter homotopy. The idx is the index of the variable in hom which is the continuation parameter. The sols is a list of strings representing start solutions. The start solutions do not contain the value of the continuation parameter, which is assumed to be equal to zero. Prompts before each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. On return are the string representations of the solutions computed at the end of the paths.

curves.next_double_track(target, start, sols, homogeneous=False, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in double precision, for an artificial-parameter homotopy. On input are a target system and a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The sols is a list of strings representing start solutions. Prompts for each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. On return are the string representations of the solutions computed at the end of the paths.

curves.next_quad_double_loop(hom, idx, sols, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in quad double precision. On input is a natural parameter homotopy with solutions. The hom is a list of strings representing the polynomials of the natural parameter homotopy. The idx is the index of the variable in hom which is the continuation parameter. The sols is a list of strings representing start solutions. The start solutions do not contain the value of the continuation parameter, which is assumed to be equal to zero. Prompts before each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. On return are the string representations of the solutions computed at the end of the paths.

curves.next_quad_double_track(target, start, sols, homogeneous=False, interactive=False, vrblvl=0)

Runs the series-Pade tracker step by step in quad double precision, for an artificial-parameter homotopy. On input are a target system and a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The sols is a list of strings representing start solutions. Prompts for each predictor-corrector step, if interactive. If vrblvl > 0, then extra output is written. If homogeneous, then path tracking happens in projective space, otherwise the original affine coordinates are used. On return are the string representations of the solutions computed at the end of the paths.

curves.quad_double_closest_pole(vrblvl=0)

Returns a tuple with the real and imaginary part of the closest pole used in the predictor in quad double precision.

curves.quad_double_estimated_distance(vrblvl=0)

Returns the estimated distance to the closest solution computed by the tracker in quad double precision.

curves.quad_double_hessian_step(vrblvl=0)

Returns the Hessian step in the tracker in quad double precision.

curves.quad_double_pade_coefficients(idx, vrblvl=0)

Returns a tuple of lists with the coefficients of the Pade approximants computed by the predictor in quad double precision. The first list in the tuple holds the coefficients of the numerator, the second list in the tuple holds the denominator coefficients. On entry in idx is the index of a variable. The double coefficients on return are the highest parts of the quad doubles.

curves.quad_double_pade_vector(dim, vrblvl=0)

Returns the list of all coefficients over all dim variables, computed by the predictor in quad double precision.

curves.quad_double_pole_radius(vrblvl=0)

Returns the smallest pole radius, used in the predictor in quad double precision.

curves.quad_double_pole_step(vrblvl=0)

Returns the pole step in the tracker in quad double precision.

curves.quad_double_poles(dim, vrblvl=0)

Returns a list of lists of all poles of the vector of length dim, computed by the predictor in quad double precision. The doubles on return are the highest parts of the quad doubles.

curves.quad_double_predict_correct(vrblvl=0)

Performs one predictor and one corrector step on the set homotopy and the set solution, in quad double precision. If vrblvl > 0, then extra output is written.

curves.quad_double_series_coefficients(dim, vrblvl=0)

Returns a list of lists with the coefficients of the series computed by the predictor in quad double precision. The double coefficients are the highest parts of the quad doubles. On entry in dim is the number of variables.

curves.quad_double_step_size(vrblvl=0)

Returns the step size in the tracker in quad double precision.

curves.quad_double_t_value(vrblvl=0)

Returns the current t value in the tracker in quad double precision.

curves.quad_double_track(target, start, startsols, filename='', mhom=0, partition=None, vrblvl=0)

Does path tracking in quad double precision. On input are a target system, a start system with solutions. The target is a list of strings representing the polynomials of the target system (which has to be solved). The start is a list of strings representing the polynomials of the start system, with known solutions in sols. The startsols is a list of strings representing start solutions. The first optional argument is the filename for writing extra diagnostics during the tracking. By default mhom is zero and all happens in the original coordinates, if mhom equals one, then 1-homogeneous coordinates are used, and if mhom is two or higher, then multi-homogenization applies and partition contains the index representation of the partition of the set of variables. This index representation is a list of as many indices as the number of variables, defining which set of the partition each variables belongs to. On return is a tuple, with first the gamma used in the homotopy and then second, the string representations of the solutions computed at the end of the paths. Note: for mhom > 0 to work, the target, start system and solution must be provided in homogeneneous coordinates.

curves.reset_parameters(precision=0, vrblvl=0)

Resets the homotopy continuation parameters for the step-by-step path trackers, using the value of the precision, 0 for double, 1 for double double, or 2 for quad double.

curves.set_corrector_residual_tolerance(tol, vrblvl=0)

Sets the tolerance on the corrector residual to tol.

curves.set_curvature_beta_factor(beta, vrblvl=0)

Sets the curvature beta factor to the value of beta.

curves.set_default_parameters(vrblvl=0)

Sets the default values of the parameters. The verbose level is given by vrblvl.

curves.set_degree_of_denominator(deg, vrblvl=0)

Set the value of the degree of the denominator of the Pade approximant to deg. The verbose level is given by vrblvl.

curves.set_degree_of_numerator(deg, vrblvl=0)

Set the value of the degree of the numerator of the Pade approximant to deg. The verbose level is given by vrblvl.

curves.set_double_double_solution(nvr, sol, vrblvl=0)

Sets the start solution in sol for the step-by-step run of the series-Pade tracker, in double double precision. The number of variables is in nvr. If vrblvl > 0, then extra output is written.

curves.set_double_solution(nvr, sol, vrblvl=0)

Sets the start solution in sol for the step-by-step run of the series-Pade tracker, in double precision. The number of variables is in nvr. If vrblvl > 0, then extra output is written.

curves.set_gamma_constant(gamma, vrblvl=0)

Sets the gamma constant to the value of the complex number given by gamma. The verbose level is given by vrblvl.

curves.set_maximum_corrector_steps(maxsteps, vrblvl=0)

Sets the maximum corrector steps to maxsteps.

curves.set_maximum_step_size(maxstep, vrblvl=0)

Sets the maximum value of the step size to maxstep.

curves.set_maximum_steps_on_path(maxsteps, vrblvl=0)

Sets the maximum steps on the path to maxsteps.

curves.set_minimum_step_size(minstep, vrblvl=0)

Sets the minimum value of the step size to minstep.

curves.set_parameter_value(idx, value, vrblvl=0)

Sets the parameter with index idx to the given value. The verbose level is given by vrblvl.

curves.set_pole_radius_beta_factor(beta, vrblvl=0)

Sets the pole radius beta factor to the value of beta.

curves.set_predictor_residual_alpha(alpha, vrblvl=0)

Sets the tolerance on the residual of the predictor to alpha.

curves.set_quad_double_solution(nvr, sol, vrblvl=0)

Sets the start solution in sol for the step-by-step run of the series-Pade tracker, in quad double precision. The number of variables is in nvr. If vrblvl > 0, then extra output is written.

curves.set_zero_series_coefficient_tolerance(tol, vrblvl=0)

Sets the tolerance on the zero series coefficient to tol.

curves.symbolic_pade_approximant(cff)

Given in cff are the coefficients of numerator and denominator of a Pade approximant, given as a tuple of two lists. On return is the string representation of the Pade approximant, using ‘t’ as the variable.

curves.symbolic_pade_vector(cff)

Given in cff are the coefficients of numerator and denominator of a Pade vector, given as a list of tuples of two lists each. On return is the string representation of the Pade approximant, using ‘t’ as the variable.

curves.test_double_double_hyperbola(vrblvl=0)

Tests the step-by-step Pade tracker on a hyperbola, in double double precision.

curves.test_double_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, in double double precision.

curves.test_double_hyperbola(vrblvl=0)

Tests the step-by-step Pade tracker on a hyperbola, in double precision.

curves.test_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, in double precision.

curves.test_next_double_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, with a step-by-step tracker in double double precision.

curves.test_next_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, with a step-by-step tracker in double precision.

curves.test_next_quad_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, with a step-by-step tracker in quad double precision.

curves.test_quad_double_hyperbola(vrblvl=0)

Tests the step-by-step Pade tracker on a hyperbola, in quad double precision.

curves.test_quad_double_track(vrblvl=0)

Runs on the mickey mouse example of two quadrics, in quad double precision.

curves.test_tuning(vrblvl=0)

Tests the tuning of the parameters.

curves.write_parameters(vrblvl=0)

Writes the values of the homotopy continuation parameters.

functions in the module deflation

By random choices of complex constants in an artificial parameter homotopy, singularities along a path are avoided. At the end of solution paths, we may encounter isolated singular solutions. The method of deflation is often effective at accurately computing isolated singular solutions.

Deflation restores the quadratic convergence of Newton’s method at a singular, isolated solution.

deflation.double_deflate(pols, sols, maxitr=3, maxdef=3, tolerr=1e-08, tolres=1e-08, tolrnk=1e-06, vrblvl=0)

Applies deflation on the solutions sols of the system in pols, in double precision. The parameters are as follows:

maxitr: the maximum number of iterations per root,

maxdef: the maximum number of deflations per root,

tolerr: tolerance on the forward error on each root,

tolres: tolerance on the backward error on each root,

tolrnk: tolerance on the numerical rank of the Jacobian matrices.

deflation.double_double_deflate(pols, sols, maxitr=3, maxdef=3, tolerr=1e-08, tolres=1e-08, tolrnk=1e-06, vrblvl=0)

Applies deflation on the solutions sols of the system in pols, in double double precision. The parameters are as follows:

maxitr: the maximum number of iterations per root,

maxdef: the maximum number of deflations per root,

tolerr: tolerance on the forward error on each root,

tolres: tolerance on the backward error on each root,

tolrnk: tolerance on the numerical rank of the Jacobian matrices.

deflation.double_double_multiplicity(system, solution, order=5, tol=1e-08, vrblvl=0)

Computes the multiplicity structure in double double precision of an isolated solution (in the string solution) of a polynomial system (in the list system). The other parameters are

order: the maximum order of differentiation,

tol: tolerance on the numerical rank,

vrblvl: is the verbose level.

On return is the computed multiplicity.

deflation.double_double_newton_step(pols, sols, vrblvl=0)

Applies one Newton step to the sols of the pols, in double double precision.

deflation.double_multiplicity(system, solution, order=5, tol=1e-08, vrblvl=0)

Computes the multiplicity structure in double precision of an isolated solution (in the string solution) of a polynomial system (in the list system). The other parameters are

order: the maximum order of differentiation,

tol: tolerance on the numerical rank,

vrblvl: is the verbose level.

On return is the computed multiplicity.

deflation.double_newton_step(pols, sols, vrblvl=0)

Applies one Newton step to the sols of the pols, in double precision.

deflation.main()

Runs some tests.

deflation.quad_double_deflate(pols, sols, maxitr=3, maxdef=3, tolerr=1e-08, tolres=1e-08, tolrnk=1e-06, vrblvl=0)

Applies deflation on the solutions sols of the system in pols, in quad double precision. The parameters are as follows:

maxitr: the maximum number of iterations per root,

maxdef: the maximum number of deflations per root,

tolerr: tolerance on the forward error on each root,

tolres: tolerance on the backward error on each root,

tolrnk: tolerance on the numerical rank of the Jacobian matrices.

deflation.quad_double_multiplicity(system, solution, order=5, tol=1e-08, vrblvl=0)

Computes the multiplicity structure in quad double precision of an isolated solution (in the string solution) of a polynomial system (in the list system). The other parameters are

order: the maximum order of differentiation,

tol: tolerance on the numerical rank,

vrblvl: is the verbose level.

On return is the computed multiplicity.

deflation.quad_double_newton_step(pols, sols, vrblvl=0)

Applies one Newton step to the sols of the pols, in quad double precision.

deflation.test_double_deflate(vrblvl=0)

Tests deflation in double precision, on the ‘ojika1’ demonstration test system, in the paper by T. Ojika: “Modified deflation algorithm for the solution of singular problems. I. A system of nonlinear algebraic equations.” J. Math. Anal. Appl. 123, 199-221, 1987.

deflation.test_double_double_deflate(vrblvl=0)

Tests deflation in double double precision, on the ‘ojika1’ demonstration test system, in the paper by T. Ojika: “Modified deflation algorithm for the solution of singular problems. I. A system of nonlinear algebraic equations.” J. Math. Anal. Appl. 123, 199-221, 1987.

deflation.test_double_double_multiplicity(vrblvl=0)

Tests the multiplicity structure in double double precision.

deflation.test_double_double_newton_step(vrblvl=0)

Tests Newton’s method in double double precision.

deflation.test_double_multiplicity(vrblvl=0)

Tests the multiplicity structure in double precision.

deflation.test_double_newton_step(vrblvl=0)

Tests Newton’s method in double precision.

deflation.test_quad_double_deflate(vrblvl=0)

Tests deflation in quad double precision, on the ‘ojika1’ demonstration test system, in the paper by T. Ojika: “Modified deflation algorithm for the solution of singular problems. I. A system of nonlinear algebraic equations.” J. Math. Anal. Appl. 123, 199-221, 1987.

deflation.test_quad_double_multiplicity(vrblvl=0)

Tests the multiplicity structure in quad double precision.

deflation.test_quad_double_newton_step(vrblvl=0)

Tests Newton’s method in quad double precision.

homotopies for enumerative geometry

Homotopy methods to two types of problems in enumerative geometry are provided, applying Pieri and Littlewood-Richardson root counts.

functions in the module schubert

Numerical Schubert calculus defines homotopies for enumerative geometry.

schubert.double_littlewood_richardson_homotopies(ndim, kdim, brackets, verbose=True, vrfcnd=False, minrep=True, tosqr=False, outputfilename='', vrblvl=0)

In n-dimensional space we consider k-dimensional planes, subject to intersection conditions represented by brackets. The parameters ndim and kdim give values for n and k respectively. The parameter brackets is a list of brackets. A bracket is a list of as many natural numbers (in the range 1..*ndim*) as kdim. The Littlewood-Richardson homotopies compute k-planes that meet the flags at spaces of dimensions prescribed by the brackets, in standard double precision. Four options are passed as Booleans:

verbose: for adding extra output during computations,

vrfcnd: for extra diagnostic verification of Schubert conditions,

minrep: for a minimial representation of the problem formulation,

tosqr: to square the overdetermined systems.

On return is a 4-tuple. The first item of the tuple is the formal root count, sharp for general flags, then as second item the coordinates of the flags. The coordinates of the flags are stored row wise in a list of real and imaginary parts. The third and fourth item of the tuple on return are respectively the polynomial system that has been solved and its solutions. The length of the list of solution should match the root count.

schubert.main()

Runs some tests.

schubert.make_pieri_system(mdim, pdim, qdeg, planes, is_real=False, vrblvl=0)

Makes the polynomial system defined by the mdim-planes in the list planes.

schubert.pieri_localization_poset(mdim, pdim, qdeg=0, size=10240, vrblvl=0)

Returns the string representation of the localization poset used to compute the Pieri root count, for the number of pdim-plane producing maps of degree qdeg that meet mdim-planes at mdim*pdim + qdeg*(mdim+pdim) points. The size of the string representation is given on input in size.

schubert.pieri_root_count(mdim, pdim, qdeg=0, vrblvl=0)

Computes the number of pdim-plane producing maps of degree qdeg that meet mdim-planes at mdim*pdim + qdeg*(mdim+pdim) points.

schubert.random_complex_matrices(nbr, nbrows, nbcols)

Returns a list of matrix of length nbr, all of dimension nbrows by nbcols.

schubert.random_complex_matrix(nbrows, nbcols)

Returns a random nbrows-by-nbcols matrix with randomly generated complex coefficients on the unit circle, as a list of rows.

schubert.real_osculating_planes(mdim, pdim, qdeg=0, vrblvl=0)

Returns m*p + qdeg*(m+p) real m-planes osculating a rational normal curve. The value of the verbose level is given by vrblvl.

schubert.resolve_schubert_conditions(ndim, kdim, brackets, vrblvl=0)

In n-dimensional space we consider k-dimensional planes, subject to intersection conditions represented by brackets. The brackets is a list of brackets. A bracket is a list of as many natural numbers (in the range 1..*ndim*) as kdim. On return is the formal root count, which is sharp for general flags. and the coordinates of the flags, stored row wise in a list of real and imaginary parts.

schubert.run_pieri_homotopies(mdim, pdim, qdeg, planes, vrblvl=0, *pts)

Computes the number of pdim-plane producing maps of degree qdeg that meet mdim-planes at mdim*pdim + qdeq*(mdim+pdim) points. For qdeg = 0, there are no interpolation points in pts. The planes and pts are assumed to be complex.

schubert.test_littlewood_richardson_homotopies(vrblvl=0)

Performs a test on the Littlewood-Richardson homotopies.

schubert.test_littlewood_richardson_rule(vrblvl=0)

Tests the Littlewood-Richardson rule.

schubert.test_pieri_count(vrblvl=0)

Tests the Pieri root count.

schubert.test_pieri_curves(vrblvl=0)

Computes all line producing curves that meet given lines in 3-space, at given interpolation points, computed with Pieri homotopies.

schubert.test_pieri_homotopies(vrblvl=0)

Tests running the Pieri homotopies on the four lines problem.

schubert.test_pieri_problem(vrblvl=0)

Tests the making of a Pieri problem.

numerical irreducible decomposition

The second blackbox solver computes a numerical irreducible decomposition of the solution set of a polynomial system.

functions in the module sets

This module exports routines of PHCpack to manipulate positive dimensional solution sets of polynomial systems.

A numerical data structure to represent a pure dimensional solution set is a witness set, which consists of two parts:

  1. the original polynomial system, augmented with as many random linear equations as the dimension of the set; and

  2. isolated solutions of the augmented system, as many as the degree of the solution set.

The solutions of the augmented system are called witness points and are generic points on the algebraic set.

The embed functions add slack variables and random hyperplanes. The number of slack variables equals the number of random hyperplanes, which in turn equals the dimension of the solution set. The drop functions remove the added slack variables from the polynomials and the coordinates of the solutions. Given a witness set and a point, a homotopy membership determines whether the point belongs to the solution set represented by the witness set.

sets.double_double_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing polynomials in nvr variables, with coefficients in double double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then extra information is printed.

sets.double_double_hypersurface_set(nvr, hpol, vrblvl=0)

Given in hpol the string representation of a polynomial in nvar variables (ending with a semicolon), on return is an embedded system and its solutions which represents a witness set for hpol. The number of solutions on return should equal the degree of the polynomial in hpol.

sets.double_double_laurent_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing Laurent polynomials in nvr variables, with coefficients in double double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then the names of the procedures called in the running of the blackbox solver will be listed.

sets.double_double_laurent_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedded Laurent system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in double double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.double_double_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedding polynomial system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in double double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.double_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing polynomials in nvr variables, with coefficients in double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then extra information is printed.

sets.double_hypersurface_set(nvr, hpol, vrblvl=0)

Given in hpol the string representation of a polynomial in nvar variables (ending with a semicolon), on return is an embedded system and its solutions which represents a witness set for hpol. The number of solutions on return should equal the degree of the polynomial in hpol.

sets.double_laurent_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing Laurent polynomials in nvr variables, with coefficients in double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then the names of the procedures called in the running of the blackbox solver will be listed.

sets.double_laurent_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedded Laurent system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.double_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedding polynomial system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.drop_coordinate_from_double_double_solutions(sols, nvr, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list sols of strings that represent solutions in nvr variables, in double double precision.

sets.drop_coordinate_from_double_solutions(sols, nvr, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list sols of strings that represent solutions in nvr variables, in double precision.

sets.drop_coordinate_from_quad_double_solutions(sols, nvr, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list sols of strings that represent solutions in nvr variables, in quad double precision.

sets.drop_variable_from_double_double_laurent_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent Laurent polynomials in several variables, with coefficients in double double precision. The system in pols must be square.

sets.drop_variable_from_double_double_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent polynomials in several variables, with coefficients in double double precision. The system in pols must be square.

sets.drop_variable_from_double_laurent_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent Laurent polynomials in several variables, with coefficients in double precision. The system in pols must be square.

sets.drop_variable_from_double_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent polynomials in several variables, with coefficients in double precision. The system in pols must be square.

sets.drop_variable_from_quad_double_laurent_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent Laurent polynomials in several variables, with coefficients in quad double precision. The system in pols must be square.

sets.drop_variable_from_quad_double_polynomials(pols, svar, vrblvl=0)

Removes the variable with symbol in the string svar from the list pols of strings that represent polynomials in several variables, with coefficients in quad double precision. The system in pols must be square.

sets.drop_variable_from_table(name, vrblvl=0)

Drops a variable with the given name from the symbol table. The verbose level is given by the value of vrblvl.

sets.main()

Runs some tests.

sets.quad_double_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing polynomials in nvr variables, with coefficients in quad double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then extra information is printed.

sets.quad_double_hypersurface_set(nvr, hpol, vrblvl=0)

Given in hpol the string representation of a polynomial in nvar variables (ending with a semicolon), on return is an embedded system and its solutions which represents a witness set for hpol. The number of solutions on return should equal the degree of the polynomial in hpol.

sets.quad_double_laurent_embed(nvr, topdim, pols, vrblvl=0)

Given in pols a list of strings representing Laurent polynomials in nvr variables, with coefficients in quad double precision, this function returns an embedding of pols of dimension topdim. The topdim is the top dimension which equals the expected highest dimension of a component of the solution set of the system of polynomials. If vrblvl is larger than 0, then the names of the procedures called in the running of the blackbox solver will be listed.

sets.quad_double_laurent_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedded Laurent system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in quad double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.quad_double_membertest(wsys, gpts, dim, point, evatol=1e-06, memtol=1e-06, tasks=0, vrblvl=0)

Applies the homotopy membership test for a point to belong to a witness set of dimension dim, given by an embedding polynomial system in wsys, with corresponding generic points in gpts. The coordinates of the test point are given in the list point, as a list of doubles, with the real and imaginary part of each coordinate of the point. By default, verbose is True. The number of threads is given in tasks. If tasks is zero, then no multithreading is applied in the homotopy membership test. Calculations happen in quad double precision. The default values for the evaluation (evatol) and the membership (memtol) allow for singular values at the end points of the paths in the homotopy membership test.

sets.set_double_double_laurent_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of Laurent polynomials in pols and its list of solutions in sols. The coefficients in the Laurent polynomials and the coordinates of the solutions will be parsed and stored in double double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.set_double_double_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of polynomials in pols and its list of solutions in sols. The coefficients in the polynomials and the coordinates of the solutions will be parsed and stored in double double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.set_double_laurent_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of Laurent polynomials in pols and its list of solutions in sols. The coefficients in the Laurent polynomials and the coordinates of the solutions will be parsed and stored in double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.set_double_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of polynomials in pols and its list of solutions in sols. The coefficients in the polynomials and the coordinates of the solutions will be parsed and stored in double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.set_quad_double_laurent_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of Laurent polynomials in pols and its list of solutions in sols. The coefficients in the Laurent polynomials and the coordinates of the solutions will be parsed and stored in quad double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.set_quad_double_witness_set(nvr, dim, pols, sols, vrblvl=0)

Given in nvr is the total number of variables in the list of polynomials in pols and its list of solutions in sols. The coefficients in the polynomials and the coordinates of the solutions will be parsed and stored in quad double precision. The parameter dim equals the number of slack variables used in the embedding of pols and sols. This dim also equals the dimension of the solution set represented by the witness set given by the lists pols and sols. The symbols for the slack variables are swapped to the end of the symbol table in both the polynomials and the solutions.

sets.test_double_double_drop(vrblvl=0)

Tests the removal of a slack variable in double double precision.

sets.test_double_double_hypersurface_set(vrblvl=0)

Tests the construction of a witness set of a hypersurface in double double precision.

sets.test_double_double_laurent_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic defined as a laurent system in double double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

sets.test_double_double_member(vrblvl=0)

Tests the membership in double double precision.

sets.test_double_double_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic in double double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

sets.test_double_drop(vrblvl=0)

Tests the removal of a slack variable in double precision.

sets.test_double_hypersurface_set(vrblvl=0)

Tests the construction of a witness set of a hypersurface in double precision.

sets.test_double_laurent_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic defined as a laurent system in double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

sets.test_double_member(vrblvl=0)

Tests the membership in double precision.

sets.test_double_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic in double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

sets.test_quad_double_drop(vrblvl=0)

Tests the removal of a slack variable in quad double precision.

sets.test_quad_double_hypersurface_set(vrblvl=0)

Tests the construction of a witness set of a hypersurface in quad double precision.

sets.test_quad_double_laurent_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic defined as a laurent system in quad double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

sets.test_quad_double_member(vrblvl=0)

Tests the membership in quad double precision.

sets.test_quad_double_twisted(vrblvl=0)

Tests the computation of a witness set for the twisted cubic in quad double precision. As the degree of the twisted cubic is three, the number of witness points must equal three as well.

functions in the module cascades

A cascade homotopy removes one hyperplane from an embedded system, taking the solutions with nonzero slack variables to solutions on lower dimensional components of the solution set of the original system.

cascades.double_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of polynomials in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. The tolerance tol is used to split filter the solutions. Computations happen in double precision. If vrblvl > 0, then extra output is written.

cascades.double_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.double_double_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of polynomials in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. Computations happen in double double precision. The tolerance tol is used to split filter the solutions. If vrblvl > 0, then extra output is written.

cascades.double_double_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with double double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.double_double_laurent_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of Laurent system in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. The tolerance tol is used to split filter the solutions. Computations happen in double double precision. If vrblvl > 0, then extra output is written.

cascades.double_double_laurent_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded Laurent polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with double double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.double_double_laurent_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the Laurent polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in double double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.double_double_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in double double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.double_laurent_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of Laurent system in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. The tolerance tol is used to split filter the solutions. Computations happen in double precision. If vrblvl > 0, then extra output is written.

cascades.double_laurent_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded Laurent polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.double_laurent_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the Laurent polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.double_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.main()

Runs some tests.

cascades.quad_double_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of polynomials in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. Computations happen in quad double precision. The tolerance tol is used to split filter the solutions. If vrblvl > 0, then extra output is written.

cascades.quad_double_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with quad double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.quad_double_laurent_cascade_filter(dim, embpols, nonsols, tol, tasks=0, vrblvl=0)

Runs one step in the cascade homotopy defined by the embedding of Laurent system in embpols, starting at the solutions in nonsols, removing the last hyperplane from embpols at dimension dim. The tolerance tol is used to split filter the solutions. Computations happen in quad double precision. If vrblvl > 0, then extra output is written.

cascades.quad_double_laurent_cascade_step(dim, embsys, esols, tasks=0, vrblvl=0)

Given in embsys an embedded Laurent polynomial system and solutions with nonzero slack variables in esols, does one step in the homotopy cascade, with quad double precision arithmetic. The dimension of the solution set represented by embsys and esols is the value of dim. The number of tasks in multithreaded path tracking is given by tasks. The default zero value of tasks indicates no multithreading. The list on return contains witness points on lower dimensional solution components.

cascades.quad_double_laurent_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the Laurent polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in quad double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.quad_double_top_cascade(nvr, dim, pols, tol=1e-06, tasks=0, vrblvl=0)

Constructs an embedding of the polynomials in pols, with the number of variables in pols equal to nvr, where dim is the top dimension of the solution set. Applies the blackbox solver to the embedded system to compute in quad double precision the generic points and the nonsolutions for use in the cascade. Returns a tuple with three items:

  1. the embedded system,

  2. the solutions with zero last coordinate w.r.t. tol,

  3. the solutions with nonzero last coordinate w.r.t. tol.

The three parameters on input are

  1. tol is the tolerance to decide whether a number is zero or not, used to split the solution list of the embedded system;

  2. tasks is the number of tasks, 0 if no multitasking,

  3. if vrblvl > 0, then extra output is written.

cascades.set_double_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy in double precision, called as a function in the double cascade step. The verbose level is given by vrblvl.

cascades.set_double_double_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy in double double precision, called as a function in the double double cascade step. The verbose level is given by vrblvl.

cascades.set_double_double_laurent_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy for Laurent systems in double double precision, called as a function in the double double cascade step. The verbose level is given by vrblvl.

cascades.set_double_laurent_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy for Laurent systems in double precision, called as a function in the double cascade step. The verbose level is given by vrblvl.

cascades.set_quad_double_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy in quad double precision, called as a function in the quad double cascade step. The verbose level is given by vrblvl.

cascades.set_quad_double_laurent_cascade_homotopy(vrblvl=0)

Defines the cascade homotopy for Laurent systems in quad double precision, called as a function in the quad double cascade step. The verbose level is given by vrblvl.

cascades.split_filter(sols, dim, tol, vrblvl=0)

Given in sols is a list of solutions of dimension dim, which contain a variable with name ‘zz’ + str(dim), which is the name of the last slack variable. The tolerance tol is used to split the list of solution in two. On return is a tuple of two lists of solutions (possibly empty). The first list of solutions has the last slack variable equal to zero (with respect to the tolerance tol) and the last slack variable of each solution in the second list has a magnitude larger than *tol. If vrblvl is nonzero, then the length of each solution list is printed.

cascades.test_double_cascade(vrblvl=0)

Tests one cascade step in double precision. In the top embedding we first find the 2-dimensional solution set x = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

cascades.test_double_double_cascade(vrblvl=0)

Tests one cascade step in double double precision. In the top embedding we first find the 2-dimensional solution set x = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

cascades.test_double_double_laurent_cascade(vrblvl=0)

Tests one cascade step on a Laurent system, in double double precision. In the top embedding we first find the 2-dimensional solution set x^-1 = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

cascades.test_double_laurent_cascade(vrblvl=0)

Tests one cascade step on a Laurent system, in double precision. In the top embedding we first find the 2-dimensional solution set x^-1 = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

cascades.test_quad_double_cascade(vrblvl=0)

Tests one cascade step in quad double precision. In the top embedding we first find the 2-dimensional solution set x = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

cascades.test_quad_double_laurent_cascade(vrblvl=0)

Tests one cascade step on a Laurent system, in quad double precision. In the top embedding we first find the 2-dimensional solution set x^-1 = 1. In the cascade step we compute the candidate witness points on the twisted cubic.

functions in the module diagonal

Given two witness sets for two pure dimensional solution sets, a diagonal homotopy computes a sets of witness sets for all components of the intersection of the two pure dimensional solution sets.

diagonal.bottom_diagonal_dimension(kdm, dim1, dim2)

Returns the lowest dimension of the solution when intersecting two systems of dimensions dim1 and dim2 in dimension kdm.

diagonal.diagonal_symbols_doubler(nbr, dim, symbols, vrblvl=0)

Doubles the number of symbols in the symbol table to enable the writing of the target system to string properly when starting the cascade of a diagonal homotopy in extrinsic coordinates. On input are nbr, the ambient dimension = #variables before the embedding, dim is the number of slack variables, or the dimension of the first set, and in symbols are the symbols for the first witness set. This function takes the symbols in s and combines those symbols with those in the current symbol table for the second witness set stored in the standard systems container. On return, the symbol table contains then all symbols to write the top system in the cascade to start the diagonal homotopy.

diagonal.double_collapse_diagonal(ksl, dim, vrblvl=0)

Eliminates the extrinsic diagonal for the system and solutions in double precision. The number of slack variables in the current embedding is ksl, and dim is the number of slack variables to add to the final embedding.

diagonal.double_diagonal_cascade_solutions(dim1, dim2, vrblvl=0)

Defines the start solutions in the cascade to start the diagonal homotopy to intersect a set of dimension dim1 with another set of dimension dim2, in double precision. For this to work, double_diagonal_homotopy must have been executed successfully.

diagonal.double_diagonal_homotopy(dim1, sys1, esols1, dim2, sys2, esols2, vrblvl=0)

Defines a diagonal homotopy to intersect the witness sets defined by (sys1, esols1) and (sys2, esols2), respectively of dimensions dim1 and dim2. The systems sys1 and sys2 are assumed to be square and with as many slack variables as the dimension of the solution sets. The data is stored in double precision.

diagonal.double_diagonal_solve(dim, dm1, sys1, sols1, dm2, sys2, sols2, tasks=0, vrblvl=0)

Runs the diagonal homotopies in double precision to intersect two witness sets stored in (sys1, sols1) and (sys2, sols2), of respective dimensions dm1 and dm2. The ambient dimension equals dim. Multitasking is available, and is activated by the tasks parameter. Returns the last system in the cascade and its solutions.

diagonal.double_double_collapse_diagonal(ksl, dim, vrblvl=0)

Eliminates the extrinsic diagonal for the system and solutions in double double precision. The number of slack variables in the current embedding is ksl, and dim is the number of slack variables to add to the final embedding.

diagonal.double_double_diagonal_cascade_solutions(dim1, dim2, vrblvl=0)

Defines the start solutions in the cascade to start the diagonal homotopy to intersect a set of dimension dim1 with another set of dimension dim2, in double double precision. For this to work, double_double_diagonal_homotopy must have been executed successfully.

diagonal.double_double_diagonal_homotopy(dim1, sys1, esols1, dim2, sys2, esols2, vrblvl=0)

Defines a diagonal homotopy to intersect the witness sets defined by (sys1, esols1) and (sys2, esols2), respectively of dimensions dim1 and dim2. The systems sys1 and sys2 are assumed to be square and with as many slack variables as the dimension of the solution sets. The data is stored in double double precision.

diagonal.double_double_diagonal_solve(dim, dm1, sys1, sols1, dm2, sys2, sols2, tasks=0, vrblvl=0)

Runs the diagonal homotopies in double double precision to intersect two witness sets stored in (sys1, sols1) and (sys2, sols2), of respective dimensions dm1 and dm2. The ambient dimension equals dim. Multitasking is available, and is activated by the tasks parameter. Returns the last system in the cascade and its solutions.

diagonal.double_double_start_diagonal_cascade(gamma=0, tasks=0, vrblvl=0)

Does the path tracking to start a diagonal cascade in double double precision. For this to work, the double_double_diagonal_homotopy and double_double_diagonal_cascade_solutions must be executed successfully. If gamma equals 0 on input, then a random gamma constant is generated, otherwise, the given complex gamma will be used in the homotopy. Multitasking is available, and activated by the tasks parameter. Returns the target (system and its corresponding) solutions.

diagonal.double_start_diagonal_cascade(gamma=0, tasks=0, vrblvl=0)

Does the path tracking to start a diagonal cascade in double precision. For this to work, the functions double_diagonal_homotopy and double_diagonal_cascade_solutions must be executed successfully. If gamma equals 0 on input, then a random gamma constant is generated, otherwise, the given complex gamma will be used in the homotopy. Multitasking is available, and activated by the tasks parameter. Returns the target (system and its corresponding) solutions.

diagonal.extrinsic_top_diagonal_dimension(ambdim1, ambdim2, setdim1, setdim2, vrblvl=0)

Returns the dimension of the start and target system to start the extrinsic cascade to intersect two witness sets, respectively of dimensions setdim1 and setdim2, with ambient dimensions respectively equal to ambdim1 and ambdim2.

diagonal.main()

Runs some tests.

diagonal.quad_double_collapse_diagonal(ksl, dim, vrblvl=0)

Eliminates the extrinsic diagonal for the system and solutions in quad double precision. The number of slack variables in the current embedding is ksl, and dim is the number of slack variables to add to the final embedding.

diagonal.quad_double_diagonal_cascade_solutions(dim1, dim2, vrblvl=0)

Defines the start solutions in the cascade to start the diagonal homotopy to intersect a set of dimension dim1 with another set of dimension dim2, in quad double precision. For this to work, quad_double_diagonal_homotopy must have been executed successfully.

diagonal.quad_double_diagonal_homotopy(dim1, sys1, esols1, dim2, sys2, esols2, vrblvl=0)

Defines a diagonal homotopy to intersect the witness sets defined by (sys1, esols1) and (sys2, esols2), respectively of dimensions dim1 and dim2. The systems sys1 and sys2 are assumed to be square and with as many slack variables as the dimension of the solution sets. The data is stored in quad double precision.

diagonal.quad_double_diagonal_solve(dim, dm1, sys1, sols1, dm2, sys2, sols2, tasks=0, vrblvl=0)

Runs the diagonal homotopies in quad double precision to intersect two witness sets stored in (sys1, sols1) and (sys2, sols2), of respective dimensions dm1 and dm2. The ambient dimension equals dim. Multitasking is available, and is activated by the tasks parameter. Returns the last system in the cascade and its solutions.

diagonal.quad_double_start_diagonal_cascade(gamma=0, tasks=0, vrblvl=0)

Does the path tracking to start a diagonal cascade in quad double precision. For this to work, the quad_double_diagonal_homotopy and quad_double_diagonal_cascade_solutions must be executed successfully. If gamma equals 0 on input, then a random gamma constant is generated, otherwise, the given complex gamma will be used in the homotopy. Multitasking is available, and activated by the tasks parameter. Returns the target (system and its corresponding) solutions.

diagonal.set_double_diagonal_homotopy(dim1, dim2, vrblvl=0)

Defines a diagonal homotopy to intersect two solution sets of dimensions dim1 and dim2 respectively, where dim1 >= dim2. The systems that define the witness sets must have been set already in double precision before the call to this function.

diagonal.set_double_double_diagonal_homotopy(dim1, dim2, vrblvl=0)

Defines a diagonal homotopy to intersect two solution sets of dimensions dim1 and dim2 respectively, where dim1 >= dim2. The systems that define the witness sets must have been set already in double double precision before the call to this function.

diagonal.set_quad_double_diagonal_homotopy(dim1, dim2, vrblvl=0)

Defines a diagonal homotopy to intersect two solution sets of dimensions dim1 and dim2 respectively, where dim1 >= dim2. The systems that define the witness sets must have been set already in quad double precision before the call to this function.

diagonal.test_double_diagonal_homotopy(vrblvl=0)

Tests the diagonal homotopy in double precision.

diagonal.test_double_double_diagonal_homotopy(vrblvl=0)

Tests the diagonal homotopy in double double precision.

diagonal.test_double_double_hypersurface_intersection(vrblvl=0)

Tests the intersection of a cylinder and a sphere, in double double precision.

diagonal.test_double_hypersurface_intersection(vrblvl=0)

Tests the intersection of a cylinder and a sphere, in double precision.

diagonal.test_quad_double_diagonal_homotopy(vrblvl=0)

Tests the diagonal homotopy in quad double precision.

diagonal.test_quad_double_hypersurface_intersection(vrblvl=0)

Tests the intersection of a cylinder and a sphere, in quad double precision.

diagonal.top_diagonal_dimension(kdm, dim1, dim2)

Returns the number of slack variables at the top in the cascade of diagonal homotopies to intersect two sets of dimension dim1 and dim2, where dim1 >= dim2 and kdm is the dimension before the embedding. Typically, kdm is the number of equations in the first witness set minus dim1.

functions in the module factor

Given a witness set representation of a pure dimensional solution set, the functions in this module separate the generic points in the witness set according to the irreducible components of the solution set.

factor.copy_double_double_laurent_witness_set(vrblvl=0)

Copies the witness set from the sampler to the laurent system set in double double precision.

factor.copy_double_double_witness_set(vrblvl=0)

Copies the witness set from the sampler to the system set in double double precision.

factor.copy_double_laurent_witness_set(vrblvl=0)

Copies the witness set from the sampler to the laurent system set in double precision.

factor.copy_double_witness_set(vrblvl=0)

Copies the witness set from the sampler to the system set in double precision.

factor.copy_quad_double_laurent_witness_set(vrblvl=0)

Copies the witness set from the sampler to the laurent system set in quad double precision.

factor.copy_quad_double_witness_set(vrblvl=0)

Copies the witness set from the sampler to the system set in quad double precision.

factor.double_assign_labels(nvr, vrblvl=0)

Assigns a unique label to the multiplicity field for each solution set in double precision.

factor.double_decomposition(deg, vrblvl=0)

Returns the decomposition as a list of labels of witness points on the components, computed in double precision.

factor.double_double_assign_labels(nvr, vrblvl=0)

Assigns a unique label to the multiplicity field for each solution set in double double precision.

factor.double_double_decomposition(deg, vrblvl=0)

Returns the decomposition as a list of labels of witness points on the components, computed in double double precision.

factor.double_double_factor_count(vrblvl=0)

Returns the number of factors computed in double double precision.

factor.double_double_loop_permutation(deg, vrblvl=0)

Returns the permutation using the solution most recently computed, for a set of degree deg, after a loop in double double precision.

factor.double_double_monodromy_breakup(embsys, esols, dim, islaurent=False, verbose=False, nbloops=20, vrblvl=0)

Applies the monodromy breakup algorithm in double double precision to factor the dim-dimensional algebraic set represented by the embedded system embsys and its solutions esols. If the embedded polynomial system is a laurent system, then islaurent must be True. If verbose is False, then no output is written. The value of nbloops equals the maximum number of loops.

factor.double_double_trace_grid_diagnostics(vrblvl=0)

Returns the maximal error on the samples in the trace grid and the minimal distance between the samples in the trace grid, computed in double double precision.

factor.double_double_trace_sum_difference(labels, vrblvl=0)

Returns the difference between the actual sum at the samples defined by the labels to the generic points of a factor and the trace sum, in double double precision.

factor.double_double_trace_test(vrblvl=0)

Runs the trace test on the decompostion in double double precision, returns True if certified, otherwise returns False.

factor.double_double_witness_points(idx, deg, vrblvl=0)

Given an index idx of an irreducible component, computed in double double precision, returns the labels of the witness points that span the component. The input deg is the upper bound on the degree of a factor. The degree of the factor is the length of the returned list.

factor.double_double_witness_sample(vrblvl=0)

Computes a new witness set for a new set of slices, in double double precision.

factor.double_double_witness_track(islaurent=False, vrblvl=0)

Tracks as many paths as set in double double precision, as many as the size of the witness set. If the system is laurent, then islaurent must be True.

factor.double_factor_count(vrblvl=0)

Returns the number of factors computed in double precision.

factor.double_loop_permutation(deg, vrblvl=0)

Returns the permutation using the solution most recently computed, for a set of degree deg, after a loop in double precision.

factor.double_monodromy_breakup(embsys, esols, dim, islaurent=False, verbose=False, nbloops=20, vrblvl=0)

Applies the monodromy breakup algorithm in double precision to factor the dim-dimensional algebraic set represented by the embedded system embsys and its solutions esols. If the embedded polynomial system is a laurent system, then islaurent must be True. If verbose is False, then no output is written. The value of nbloops equals the maximum number of loops.

factor.double_trace_grid_diagnostics(vrblvl=0)

Returns the maximal error on the samples in the trace grid and the minimal distance between the samples in the trace grid, computed in double precision.

factor.double_trace_sum_difference(labels, vrblvl=0)

Returns the difference between the actual sum at the samples defined by the labels to the generic points of a factor and the trace sum, in double precision.

factor.double_trace_test(vrblvl=0)

Runs the trace test on the decompostion in double precision, returns True if certified, otherwise returns False.

factor.double_witness_points(idx, deg, vrblvl=0)

Given an index idx of an irreducible component, computed in double precision, returns the labels of the witness points that span the component. The input deg is the upper bound on the degree of a factor. The degree of the factor is the length of the returned list.

factor.double_witness_sample(vrblvl=0)

Computes a new witness set for a new set of slices, in double precision.

factor.double_witness_track(islaurent=False, vrblvl=0)

Tracks as many paths as set in double precision, as many as the size of the witness set. If the system is laurent, then islaurent must be True.

factor.initialize_double_double_laurent_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, for a laurent system set in double double precision.

factor.initialize_double_double_monodromy(nbloops, deg, dim, vrblvl=0)

Initializes to run nbloops monodromy loops to factor a positive dimension solution set of dimension dim and of degree deg in double double precision.

factor.initialize_double_double_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, set in double double precision.

factor.initialize_double_laurent_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, for a laurent system set in double precision.

factor.initialize_double_monodromy(nbloops, deg, dim, vrblvl=0)

Initializes to run nbloops monodromy loops to factor a positive dimension solution set of dimension dim and of degree deg in double precision.

factor.initialize_double_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, set in double precision.

factor.initialize_quad_double_laurent_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, for a laurent system set in quad double precision.

factor.initialize_quad_double_monodromy(nbloops, deg, dim, vrblvl=0)

Initializes to run nbloops monodromy loops to factor a positive dimension solution set of dimension dim and of degree deg in double double precision.

factor.initialize_quad_double_sampler(dim, vrblvl=0)

Initializes the sampling machine with a witness set, set in quad double precision.

factor.main()

Runs some tests.

factor.new_double_double_slices(dim, nvr, vrblvl=0)

Generates dim random hyperplanes in double double precision where nvr is the number of variables.

factor.new_double_slices(dim, nvr, vrblvl=0)

Generates dim random hyperplanes in double precision where nvr is the number of variables.

factor.new_quad_double_slices(dim, nvr, vrblvl=0)

Generates dim random hyperplanes in quad double precision where nvr is the number of variables.

factor.preset_double_double_solutions(vrblvl=0)

Initializes the start solutions for monodromy loops to the solutions set in double double precision.

factor.preset_double_solutions(vrblvl=0)

Initializes the start solutions for monodromy loops to the solutions set in double precision.

factor.preset_quad_double_solutions(vrblvl=0)

Initializes the start solutions for monodromy loops to the solutions set in quad double precision.

factor.quad_double_assign_labels(nvr, vrblvl=0)

Assigns a unique label to the multiplicity field for each solution set in quad double precision.

factor.quad_double_decomposition(deg, vrblvl=0)

Returns the decomposition as a list of labels of witness points on the components, computed in quad double precision.

factor.quad_double_factor_count(vrblvl=0)

Returns the number of factors computed in quad double precision.

factor.quad_double_loop_permutation(deg, vrblvl=0)

Returns the permutation using the solution most recently computed, for a set of degree deg, after a loop in quad double precision.

factor.quad_double_monodromy_breakup(embsys, esols, dim, islaurent=False, verbose=False, nbloops=20, vrblvl=0)

Applies the monodromy breakup algorithm in quad double precision to factor the dim-dimensional algebraic set represented by the embedded system embsys and its solutions esols. If the embedded polynomial system is a laurent system, then islaurent must be True. If verbose is False, then no output is written. The value of nbloops equals the maximum number of loops.

factor.quad_double_trace_grid_diagnostics(vrblvl=0)

Returns the maximal error on the samples in the trace grid and the minimal distance between the samples in the trace grid, computed in quad double precision.

factor.quad_double_trace_sum_difference(labels, vrblvl=0)

Returns the difference between the actual sum at the samples defined by the labels to the generic points of a factor and the trace sum, in quad double precision.

factor.quad_double_trace_test(vrblvl=0)

Runs the trace test on the decompostion in quad double precision, returns True if certified, otherwise returns False.

factor.quad_double_witness_points(idx, deg, vrblvl=0)

Given an index idx of an irreducible component, computed in quad double precision, returns the labels of the witness points that span the component. The input deg is the upper bound on the degree of a factor. The degree of the factor is the length of the returned list.

factor.quad_double_witness_sample(vrblvl=0)

Computes a new witness set for a new set of slices, in quad double precision.

factor.quad_double_witness_track(islaurent=False, vrblvl=0)

Tracks as many paths as set in quad double precision, as many as the size of the witness set. If the system is laurent, then islaurent must be True.

factor.reset_double_double_solutions(vrblvl=0)

Resets the start solutions for monodromy loops in double double precision to the solutions used to initialize the start solutions with.

factor.reset_double_solutions(vrblvl=0)

Resets the start solutions for monodromy loops in double precision to the solutions used to initialize the start solutions with.

factor.reset_quad_double_solutions(vrblvl=0)

Resets the start solutions for monodromy loops in quad double precision to the solutions used to initialize the start solutions with.

factor.set_double_double_gammas(dim, vrblvl=0)

Sets the gamma constants in double_double precision for the sampler in the monodromy loops. Generates as many random complex constants as dim.

factor.set_double_double_slice(equ, idx, cff, vrblvl=0)

Sets the coefficients of slicing equation with index equ at position idx to the value in double double precision: (cff[0], cff[1]) + (cff[2], cff[3])*complex(0, 1).

factor.set_double_double_trace(first, vrblvl=0)

Sets the constant coefficient of the first slice, for use in the linear trace test in double double precision. The integer first indicates if it is the first time or not.

factor.set_double_double_verbose(verbose=True, vrblvl=0)

Sets the state of the monodromy algorithm in double double precision to verbose if vrblvl > 0, otherwise it is set to remain mute.

factor.set_double_gammas(dim, vrblvl=0)

Sets the gamma constants in double precision for the sampler in the monodromy loops. Generates as many random complex constants as dim.

factor.set_double_slice(equ, idx, cff, vrblvl=0)

Sets the coefficients of slicing equation with index equ at position idx to the value in double precision: cff[0] + cff[1]*complex(0, 1).

factor.set_double_trace(first, vrblvl=0)

Sets the constant coefficient of the first slice, for use in the linear trace test in double precision. The integer first indicates if it is the first time or not.

factor.set_double_verbose(verbose=True, vrblvl=0)

Sets the state of the monodromy algorithm in double precision to verbose if vrblvl > 0, otherwise it is set to remain mute.

factor.set_quad_double_gammas(dim, vrblvl=0)

Sets the gamma constants in quad_double precision for the sampler in the monodromy loops. Generates as many random complex constants as dim.

factor.set_quad_double_slice(equ, idx, cff, vrblvl=0)

Sets the coefficients of slicing equation with index equ at position idx to the value in quad double precision: (cff[0], cff[1], cff[2], cff[3]) + (cff[4], cff[5], cff[6], cff[7])*complex(0, 1).

factor.set_quad_double_trace(first, vrblvl=0)

Sets the constant coefficient of the first slice, for use in the linear trace test in quad double precision. The integer first indicates if it is the first time or not.

factor.set_quad_double_verbose(verbose=True, vrblvl=0)

Sets the state of the monodromy algorithm in quad double precision to verbose if vrblvl > 0, otherwise it is set to remain mute.

factor.swap_double_double_slices(vrblvl=0)

Swaps the slices with new ones to turn back in one monodromy loop in double double precision.

factor.swap_double_slices(vrblvl=0)

Swaps the slices with new ones to turn back in one monodromy loop in double precision.

factor.swap_quad_double_slices(vrblvl=0)

Swaps the slices with new ones to turn back in one monodromy loop in quad double precision.

factor.test_double_assign_labels(vrblvl=0)

Tests the assigning of labels for solutions set in double precision.

factor.test_double_double_assign_labels(vrblvl=0)

Tests the assigning of labels for solutions set in double double precision.

factor.test_double_double_monodromy(vrblvl=0)

Tests the monodromy breakup in double double precision.

factor.test_double_monodromy(vrblvl=0)

Tests the monodromy breakup in double precision.

factor.test_quad_double_assign_labels(vrblvl=0)

Tests the assigning of labels for solutions set in quad double precision.

factor.test_quad_double_monodromy(vrblvl=0)

Tests the monodromy breakup in quad double precision.

factor.update_double_decomposition(deg, perm, vrblvl=0)

Updates the decomposition with a permutation of deg elements computed in double precision. Returns the tuple with the previous and the new number of factors.

factor.update_double_double_decomposition(deg, perm, vrblvl=0)

Updates the decomposition with a permutation of deg elements computed in double double precision. Returns the tuple with the previous and the new number of factors.

factor.update_quad_double_decomposition(deg, perm, vrblvl=0)

Updates the decomposition with a permutation of deg elements computed in quad double precision. Returns the tuple with the previous and the new number of factors.

factor.write_factorization(deco)

Writes the decomposition in deco.

functions in the module decomposition

Exports functions to compute a numerical irreducible decomposition.

decomposition.copy_double_double_laurent_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the Laurent polynomials and the solutions in double double precision.

decomposition.copy_double_double_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the polynomials and the solutions in double double precision.

decomposition.copy_double_laurent_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the Laurent polynomials and the solutions in double precision.

decomposition.copy_double_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the polynomials and the solutions in double precision.

decomposition.copy_quad_double_laurent_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the Laurent polynomials and the solutions in quad double precision.

decomposition.copy_quad_double_witset(dim, vrblvl=0)

Copies the witness set at dimension dim to the polynomials and the solutions in quad double precision.

decomposition.double_double_laurent_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the Laurent system in pols in double double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.double_double_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the polynomial system in pols in double double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.double_laurent_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the Laurent system in pols in double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.double_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the polynomial system in pols in double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.get_factors(size, vrblvl=0)

Returns the string representation of the irreducible factors, given in size is the number of characters in the string.

decomposition.main()

Runs some tests. Because of the sensitivity on tolerances, the seed of the random number generators are set.

decomposition.quad_double_laurent_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the Laurent system in pols in quad double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.quad_double_solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, verbose=True, vrblvl=0)

Runs the cascades of homotopies on the polynomial system in pols in quad double precision. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.solve(pols, topdim=- 1, filtsols=True, factor=True, tasks=0, precision='d', verbose=True, vrblvl=0)

Computes an irreducible decomposition of the polynomials in pols. The default top dimension topdim is the number of variables in pols minus one. The other parameters are (1) filtsols, to filter the spurious solutions, (2) factor, to factor the positive dimensional components, (3) tasks, is the number of tasks (0 for no multithreading), (4) is the precision, by default double, (5) verbose, to write extra information during the decomposition. The list on return contains a witness set for every dimension. If factor, then the last element in the list on return is the string representation of the irreducible factors. The verbose level is given by vrblvl.

decomposition.test_double_double_laurent_solve(vrblvl=0)

Runs a test on solving a Laurent system in double double precision.

decomposition.test_double_double_solve(vrblvl=0)

Runs a test on solving in double double precision.

decomposition.test_double_laurent_solve(vrblvl=0)

Runs a test on solving a Laurent system in double precision.

decomposition.test_double_solve(vrblvl=0)

Runs a test on solving in double precision.

decomposition.test_quad_double_laurent_solve(vrblvl=0)

Runs a test on solving a Laurent system in quad double precision.

decomposition.test_quad_double_solve(vrblvl=0)

Runs a test on solving in quad double precision.

decomposition.test_solve(vrblvl=0)

Runs a test on the wrapper solve.

decomposition.write_decomposition(deco, vrblvl=0)

Writes the decomposition in deco.

functions in the module binomials

A binomial system is a polynomial system with exactly two monomials with nonzero coefficient in every equation. Binomials systems can be solved much more efficiently than other polynomial systems. The positive dimensional solution sets of binomial systems are monomial maps.

binomials.coefficients_double_map(dim, idx, nvr, vrblvl=0)

Returns the complex coefficients of a map of dimension dim, of index idx, in nvr variables, in double precision.

binomials.degree_double_map(dim, idx, vrblvl=0)

Returns the degree of map with index idx (starting at one), of dimension dim, in double precision.

binomials.double_map_top_dimension(vrblvl=0)

Returns the top dimension of the solution maps, in double precision.

binomials.double_solve(nvr, pols, puretopdim=False, vrblvl=0)

If the polynomial system in pols in number of variables nvr is a binomial system, then the solution maps are returned. When the flag puretopdim is True, then the solver will only look for the solution sets of the expected top dimension, which will lead to a faster execution.

binomials.double_string_map(dim, nvr, cff, exp, vrblvl=0)

Returns the string representation of a map of dimension dim, in nvr variables, with double complex coefficients in cff, and exponents in exp.

binomials.exponents_double_map(dim, idx, nvr, vrblvl=0)

Returns the exponents of a map of dimension dim, of index idx, in nvr variables, in double precision.

binomials.is_binomial_system(vrblvl=0)

Returns True if the system stored as a Laurent system in double precision is a binomial system, return False otherwise. The verbose level is given by the value of vrblvl.

binomials.main()

Runs some tests.

binomials.number_double_maps(dim, vrblvl=0)

Returns the number of maps of dimension dim, in double precision.

binomials.test_double_solve(vrblvl=0)

Tests on solving a binomial system.

binomials.test_is_binomial_system(vrblvl=0)

Tests on the binomial system test.