diff --git a/.github/workflows/Runtests.yml b/.github/workflows/Runtests.yml index 861eb583..a8cc1175 100644 --- a/.github/workflows/Runtests.yml +++ b/.github/workflows/Runtests.yml @@ -9,12 +9,14 @@ jobs: julia-arch: [x64] os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.julia-version }} - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest + with: + depwarn: error - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v3 with: diff --git a/benchmark/CI-scripts/run_benchmarks.jl b/benchmark/CI-scripts/run_benchmarks.jl index bfd7dd16..807faa54 100644 --- a/benchmark/CI-scripts/run_benchmarks.jl +++ b/benchmark/CI-scripts/run_benchmarks.jl @@ -8,11 +8,11 @@ import Nemo suite = [] -function compute_gb(system, trials=7) +function compute_gb(system, trials=7; kws...) times = [] for _ in 1:trials GC.gc() - time = @elapsed groebner(system) + time = @elapsed groebner(system; kws...) push!(times, time) end minimum(times) @@ -91,6 +91,17 @@ push!( ) ) ) +push!( + suite, + ( + problem_name="groebner, threaded, AA, GF(2^31-1), cyclic 8", + result=compute_gb( + Groebner.cyclicn(8, ordering=:degrevlex, ground=GF(2^31 - 1)), + 5, + threaded=:yes + ) + ) +) function learn_and_apply(system) times = [] diff --git a/benchmark/CI-scripts/runtests.jl b/benchmark/CI-scripts/runtests.jl index 1a6bedd6..b815f88f 100644 --- a/benchmark/CI-scripts/runtests.jl +++ b/benchmark/CI-scripts/runtests.jl @@ -14,12 +14,18 @@ const IGNORE_SMALL_ABSOLUTE_DEVIATION = 1e-3 # Run benchmarks on the latest stable version of Groebner.jl dir_stable = (@__DIR__) * "/run-on-stable" @info "Benchmarking Groebner.jl, stable" dir_stable -@time run(`julia --project=$dir_stable $dir_stable/run_benchmarks.jl`, wait=true) +@time run( + `julia --threads=$(nthreads()) --project=$dir_stable $dir_stable/run_benchmarks.jl`, + wait=true +) # Run benchmarks on the nightly version of Groebner.jl dir_nightly = (@__DIR__) * "/run-on-nightly" @info "Benchmarking Groebner.jl, nightly" dir_nightly -@time run(`julia --project=$dir_nightly $dir_nightly/run_benchmarks.jl`, wait=true) +@time run( + `julia --threads=$(nthreads()) --project=$dir_nightly $dir_nightly/run_benchmarks.jl`, + wait=true +) # Compare results function compare() diff --git a/experimental/constprop.jl b/experimental/constprop.jl index 04b6ef6a..0e57d6e0 100644 --- a/experimental/constprop.jl +++ b/experimental/constprop.jl @@ -1,22 +1,15 @@ module Foo -vanish_enabled() = true - -macro vanish(expr) - m = __module__ - quote - if !$m.vanish_enabled() - $(esc(expr)) - else - nothing - end - end +macro unreachable() + :(@assert false) end -function critical_loop(x) - for i in eachindex(x) - @vanish println(x[i]) - x[i] = x[i]^2 +function do_stuff(x) + if x > 0 + x^2 + else + @unreachable + x end end diff --git a/experimental/examples/threaded-apply.jl b/experimental/examples/threaded-apply.jl index 33151024..9d563864 100644 --- a/experimental/examples/threaded-apply.jl +++ b/experimental/examples/threaded-apply.jl @@ -1,9 +1,12 @@ using AbstractAlgebra, Primes, Base.Threads using BenchmarkTools -# using Groebner +using Groebner + +@info "Using $(nthreads()) Julia threads" # Computes the bases of the given system modulo different primes function compute_bases(system, batch_size::Int) + @assert iszero(batch_size % 4) prime = 2^30 + 3 Zp = GF(prime) @@ -27,11 +30,12 @@ end # Same as the above, but uses multi-threading function compute_bases_threaded(system, batch_size::Int) + @assert iszero(batch_size % 4) prime = 2^30 + 3 Zp = GF(prime) system_zp = map(f -> map_coefficients(c -> Zp(c), f), system) - trace, _ = Groebner.groebner_learn(system_zp) + trace, _ = Groebner.groebner_learn(system_zp, threaded=:yes) bases = Vector{typeof(system_zp)}(undef, batch_size) buffer_traces = map(_ -> deepcopy(trace), 1:nthreads()) @@ -40,8 +44,7 @@ function compute_bases_threaded(system, batch_size::Int) buffer_systems_zp = map(zp -> map(f -> map_coefficients(c -> zp(c), f), system), buffer_zp) - # :static guarantees that threadid() is constant within one iteraton - Base.Threads.@threads :static for j in 1:batch_size + Base.Threads.@threads for j in 1:batch_size t_id = threadid() system_zp = buffer_systems_zp[j] @@ -58,11 +61,12 @@ end # Same as the above, but also uses batch size 4 function compute_bases_threaded_batched(system, batch_size::Int) + @assert iszero(batch_size % 4) prime = 2^30 + 3 Zp = GF(prime) system_zp = map(f -> map_coefficients(c -> Zp(c), f), system) - trace, _ = Groebner.groebner_learn(system_zp) + trace, _ = Groebner.groebner_learn(system_zp, threaded=:yes) bases = Vector{typeof(system_zp)}(undef, batch_size) buffer_traces = map(_ -> deepcopy(trace), 1:nthreads()) @@ -71,8 +75,7 @@ function compute_bases_threaded_batched(system, batch_size::Int) buffer_systems_zp = map(zp -> map(f -> map_coefficients(c -> zp(c), f), system), buffer_zp) - # :static guarantees that threadid() is constant within one iteraton - Base.Threads.@threads :static for j in 1:4:batch_size + Base.Threads.@threads for j in 1:4:batch_size t_id = threadid() system_zp = ( @@ -94,19 +97,11 @@ function compute_bases_threaded_batched(system, batch_size::Int) return bases end -system = Groebner.katsuran(10, ground=ZZ, ordering=:degrevlex) +system = Groebner.noonn(7, ground=ZZ, ordering=:degrevlex) begin - GC.gc() - @time bases_1 = compute_bases(system, 2^5) - GC.gc() - @time bases_2 = compute_bases_threaded(system, 2^5) - GC.gc() - @time bases_3 = compute_bases_threaded_batched(system, 2^5) + n = 2^8 + @time bases_1 = compute_bases(system, n) + @time bases_2 = compute_bases_threaded(system, n) + @time bases_3 = compute_bases_threaded_batched(system, n) @assert all(bases_1 .== bases_2) && all(bases_2 .== bases_3) end; - -GC.gc() -@profview compute_bases_threaded_batched(system, 2^8); - -# @btime compute_bases($system, 5, 8); -# @btime compute_bases_threaded($system, 5, 8); diff --git a/src/Groebner.jl b/src/Groebner.jl index c207f05b..b76f629b 100644 --- a/src/Groebner.jl +++ b/src/Groebner.jl @@ -101,10 +101,14 @@ import TimerOutputs const _threaded = Ref(true) function __init__() + _threaded[] = !(get(ENV, "GROEBNER_NO_THREADED", "") == "1") + # Setup the global logger - update_logger(loglevel=Logging.Info) + _groebner_log_lock[] = ReentrantLock() + logger_update(loglevel=Logging.Info) - _threaded[] = !(get(ENV, "GROEBNER_NO_THREADED", "") == "1") + # Setup performance counters + _groebner_timer_lock[] = ReentrantLock() nothing end @@ -121,7 +125,7 @@ include("utils/timeit.jl") # Provides the macro `@stat` for collecting statistics include("utils/statistics.jl") -# include("utils/versioninfo.jl") +include("utils/versioninfo.jl") # Minimalistic plotting with Unicode include("utils/plots.jl") diff --git a/src/arithmetic/Zp.jl b/src/arithmetic/Zp.jl index 58745f4e..7f9f72cf 100644 --- a/src/arithmetic/Zp.jl +++ b/src/arithmetic/Zp.jl @@ -8,7 +8,7 @@ # the coefficient. Generally, AccumType should be picked so that the result of # a + b*c # is representable exactly in AccumType for feasible a,b,c of type CoeffType. -# One common example is AccumType = UInt64 and CoeffType = UInt32 +# One example is AccumType = UInt64 and CoeffType = UInt32 with prime moduli abstract type AbstractArithmetic{AccumType, CoeffType} end # All implementations of arithmetic in Zp are a subtype of this. @@ -115,7 +115,7 @@ end # a modulo p (addition specialization) function mod_p(a::T, mod::SpecializedArithmeticZp{T, C, true}) where {T, C} x = _mul_high(a, mod.multiplier) - x = convert(T, convert(T, (convert(T, a - x) >>> 1)) + x) + x = convert(T, convert(T, (convert(T, a - x) >>> UInt8(1))) + x) a - (x >>> mod.shift) * mod.divisor end # a modulo p (no addition specialization) @@ -176,7 +176,7 @@ end # a modulo p (addition specialization) function mod_p(a::A, mod::DelayedArithmeticZp{A, T, true}) where {A, T} x = _mul_high(a, mod.multiplier) - x = convert(A, convert(A, (convert(A, a - x) >>> 1)) + x) + x = convert(A, convert(A, (convert(A, a - x) >>> UInt8(1))) + x) a - (x >>> mod.shift) * mod.divisor end # a modulo p (no addition specialization) diff --git a/src/f4/basis.jl b/src/f4/basis.jl index 31c08e1a..e18eb1ac 100644 --- a/src/f4/basis.jl +++ b/src/f4/basis.jl @@ -8,7 +8,7 @@ ### # Pairset and Basis -# Pairset is a list of critical pairs (SPairs). +# Pairset is a list of critical pairs (CriticalPair). # Basis is a structure that stores a list of polynomials. Each polynomial is # represented with a sorted vector of monomials and a vector of coefficients. @@ -19,7 +19,7 @@ ### # Pairset -# S-pair{Degree}, or, a pair of polynomials, +# CriticalPair, or, a pair of polynomials, struct CriticalPair{Degree} # First polynomial given by its index in the basis array poly1::Int32 @@ -67,6 +67,41 @@ function pairset_resize_lcms_if_needed!(ps::Pairset, nfilled::Int) nothing end +function pairset_find_smallest_degree_pair(ps::Pairset) + @invariant ps.load > 0 && length(ps.pairs) > 0 + pairs = ps.pairs + pair_idx, pair_min_deg = 1, pairs[1].deg + @inbounds for i in 1:(ps.load) + if pairs[i].deg <= pair_min_deg + pair_min_deg = pairs[i].deg + pair_idx = i + end + end + pair_idx, pair_min_deg +end + +function pairset_partition_by_degree!(ps::Pairset) + @invariant ps.load > 0 + _, pair_min_deg = pairset_find_smallest_degree_pair(ps) + + pairs = ps.pairs + i, j = 0, ps.load + 1 + @inbounds while true + i += 1 + j -= 1 + while i <= ps.load && pairs[i].deg == pair_min_deg + i += 1 + end + while j > 1 && pairs[j].deg > pair_min_deg + j -= 1 + end + i >= j && break + pairs[i], pairs[j] = pairs[j], pairs[i] + end + + i - 1 +end + ### # Basis diff --git a/src/f4/f4.jl b/src/f4/f4.jl index 7115407a..eafda901 100644 --- a/src/f4/f4.jl +++ b/src/f4/f4.jl @@ -385,14 +385,16 @@ end # Returns N, the number of critical pairs of the smallest degree. # Sorts the critical pairs so that the first N pairs are the smallest. function pairset_lowest_degree_pairs!(pairset::Pairset) - sort_pairset_by_degree!(pairset, 1, pairset.load - 1) - ps = pairset.pairs - @inbounds min_deg = ps[1].deg - min_idx = 1 - @inbounds while min_idx < pairset.load && ps[min_idx + 1].deg == min_deg - min_idx += 1 + cnt = if true + n_lowest_degree_pairs = pairset_partition_by_degree!(pairset) + n_lowest_degree_pairs + else + sort_pairset_by_degree!(pairset, 1, pairset.load - 1) + pair_idx, _ = pairset_find_smallest_degree_pair(pairset) + pair_idx end - min_idx + @invariant cnt > 0 + cnt end # Returns N, the number of critical pairs of the smallest sugar. @@ -468,7 +470,8 @@ end end end npairs = min(npairs, maxpairs) - @assert npairs > 0 + @invariant npairs > 0 + ps = pairset.pairs deg = ps[1].deg @@ -512,8 +515,6 @@ function f4_add_critical_pairs_to_matrix!( ht::MonomialHashtable, symbol_ht::MonomialHashtable ) - - # matrix_reinitialize!(matrix, npairs) pairs = pairset.pairs uprows = matrix.upper_rows diff --git a/src/f4/matrix.jl b/src/f4/matrix.jl index ec5a4e7d..5ace98e9 100644 --- a/src/f4/matrix.jl +++ b/src/f4/matrix.jl @@ -253,7 +253,7 @@ function matrix_resize_lower_part!(matrix::MacaulayMatrix, size::Int) resize!(matrix.lower_to_mult, size) end -# Refresh and partially initialize the matrix +# statistics_refresh and partially initialize the matrix function matrix_reinitialize!(matrix::MacaulayMatrix, size::Int) new_size = size * 2 matrix_resize_upper_part!(matrix, new_size) diff --git a/src/fglm/kbase.jl b/src/fglm/kbase.jl index b17397c9..b9357d70 100644 --- a/src/fglm/kbase.jl +++ b/src/fglm/kbase.jl @@ -20,7 +20,7 @@ function _kbase(polynomials, kws) ring, _ = set_monomial_ordering!(ring, var_to_index, monoms, coeffs, params) m, c = kbase_f4(ring, monoms, coeffs, params) res = convert_to_output(ring, polynomials, m, c, params) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) res end diff --git a/src/groebner/groebner.jl b/src/groebner/groebner.jl index 477fb2d6..ab54cfbb 100644 --- a/src/groebner/groebner.jl +++ b/src/groebner/groebner.jl @@ -63,7 +63,7 @@ function _groebner(polynomials, kws::KeywordsHandler, representation) # Convert result back to the representation of input basis = convert_to_output(ring, polynomials, gbmonoms, gbcoeffs, params) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) print_statistics(params.statistics) basis diff --git a/src/groebner/isgroebner.jl b/src/groebner/isgroebner.jl index 99374e86..53355d24 100644 --- a/src/groebner/isgroebner.jl +++ b/src/groebner/isgroebner.jl @@ -15,7 +15,7 @@ function _isgroebner(polynomials, kws::KeywordsHandler) params = AlgorithmParameters(ring, polynomial_repr, kws) ring, _ = set_monomial_ordering!(ring, var_to_index, monoms, coeffs, params) res = _isgroebner(ring, monoms, coeffs, params) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) res end diff --git a/src/groebner/learn-apply.jl b/src/groebner/learn-apply.jl index a9343824..af138dba 100644 --- a/src/groebner/learn-apply.jl +++ b/src/groebner/learn-apply.jl @@ -64,7 +64,7 @@ function _groebner_learn(polynomials, kws, representation) Terms: $(term_sorting_permutations) Polynomials: $(trace.input_permutation)""" - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) print_statistics(params.statistics) WrappedTraceF4(trace), @@ -117,10 +117,10 @@ function _groebner_apply!( ring, gb_monoms, gb_coeffs = dehomogenize_generators!(ring, gb_monoms, gb_coeffs, params) end - # @print_performance_counters + # @performance_counters_print !flag && return (flag, polynomials) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) print_statistics(params.statistics) flag, convert_to_output(ring, polynomials, gb_monoms, gb_coeffs, params) @@ -151,12 +151,12 @@ function _groebner_apply!( ring, gb_monoms, gb_coeffs = dehomogenize_generators!(ring, gb_monoms, gb_coeffs, params) end - # @print_performance_counters + # @performance_counters_print !flag && return flag, batch gb_coeffs_unpacked = unpack_composite_coefficients(gb_coeffs) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) print_statistics(params.statistics) flag, diff --git a/src/groebner/normalform.jl b/src/groebner/normalform.jl index 22735047..31a59988 100644 --- a/src/groebner/normalform.jl +++ b/src/groebner/normalform.jl @@ -63,7 +63,7 @@ function _normalform(polynomials, to_be_reduced, kws::KeywordsHandler) coeffs_reduced = coeffs_to_be_reduced # TODO: remove `to_be_reduced` from arguments here res = convert_to_output(ring, to_be_reduced, monoms_reduced, coeffs_reduced, params) - print_performance_counters(params.statistics) + performance_counters_print(params.statistics) res end diff --git a/src/input-output/AbstractAlgebra.jl b/src/input-output/AbstractAlgebra.jl index d55d0716..f652e6cb 100644 --- a/src/input-output/AbstractAlgebra.jl +++ b/src/input-output/AbstractAlgebra.jl @@ -117,7 +117,7 @@ end function extract_coeffs_ff( representation::PolynomialRepresentation, ring::PolyRing, - poly::Union{AbstractAlgebra.Generic.Poly, AbstractAlgebra.PolyElem} + poly::Union{AbstractAlgebra.Generic.Poly, AbstractAlgebra.PolyRingElem} ) AbstractAlgebra.iszero(poly) && (return zero_coeffs(representation.coefftype, ring)) reverse( @@ -133,7 +133,7 @@ end function extract_coeffs_qq( representation, ring::PolyRing, - poly::Union{AbstractAlgebra.Generic.Poly, AbstractAlgebra.PolyElem} + poly::Union{AbstractAlgebra.Generic.Poly, AbstractAlgebra.PolyRingElem} ) AbstractAlgebra.iszero(poly) && (return zero_coeffs(representation.coefftype, ring)) reverse( @@ -455,7 +455,7 @@ function extract_monoms( representation::PolynomialRepresentation, ring::PolyRing, poly::P -) where {P <: AbstractAlgebra.Generic.PolyElem} +) where {P <: AbstractAlgebra.Generic.PolyRingElem} exps = Vector{representation.monomtype}(undef, 0) @inbounds while !AbstractAlgebra.iszero(poly) push!( diff --git a/src/monomials/packedtuples.jl b/src/monomials/packedtuples.jl index 4cbc7c95..fd4b64ba 100644 --- a/src/monomials/packedtuples.jl +++ b/src/monomials/packedtuples.jl @@ -321,7 +321,6 @@ function monom_isless( ord::Ord ) where {T, B, Ord <: AbstractInternalOrdering} # TODO: Perhaps this should error - @unreachable s = div(sizeof(T), sizeof(B)) - 1 tmp1, tmp2 = Vector{T}(undef, s), Vector{T}(undef, s) a = monom_construct_from_vector(ExponentVector{T}, monom_to_vector!(tmp1, ea)) @@ -333,7 +332,6 @@ function monom_isless( eb::PackedTuple2{T, B}, ord::Ord ) where {T, B, Ord <: AbstractInternalOrdering} - @unreachable s = 2 * div(sizeof(T), sizeof(B)) - 1 tmp1, tmp2 = Vector{T}(undef, s), Vector{T}(undef, s) a = monom_construct_from_vector(ExponentVector{T}, monom_to_vector!(tmp1, ea)) @@ -345,7 +343,6 @@ function monom_isless( eb::PackedTuple3{T, B}, ord::Ord ) where {T, B, Ord <: AbstractInternalOrdering} - @unreachable s = 3 * div(sizeof(T), sizeof(B)) - 1 tmp1, tmp2 = Vector{T}(undef, s), Vector{T}(undef, s) a = monom_construct_from_vector(ExponentVector{T}, monom_to_vector!(tmp1, ea)) diff --git a/src/monomials/sparsevector.jl b/src/monomials/sparsevector.jl index 51afe5a0..cc0f7ef0 100644 --- a/src/monomials/sparsevector.jl +++ b/src/monomials/sparsevector.jl @@ -201,7 +201,6 @@ function monom_isless( eb::SparseExponentVector{T, I, N}, ord ) where {T, I, N} - @unreachable tmp1, tmp2 = Vector{T}(undef, N), Vector{T}(undef, N) a = monom_construct_from_vector(ExponentVector{T}, monom_to_vector!(tmp1, ea)) b = monom_construct_from_vector(ExponentVector{T}, monom_to_vector!(tmp2, eb)) diff --git a/src/utils/invariants.jl b/src/utils/invariants.jl index 831bcc00..af67d53a 100644 --- a/src/utils/invariants.jl +++ b/src/utils/invariants.jl @@ -1,7 +1,6 @@ # This file is a part of Groebner.jl. License is GNU GPL v2. -# Custom assertions for Groebner. -# Provides the @invariant macro +# Custom assertions for Groebner. Provides the @invariant macro. """ @invariant expr @@ -20,8 +19,7 @@ long as the code is compiled with `invariants_enabled() = false`. ``` """ macro invariant(arg) - # NOTE: This formulation of @invariant does not propagate the error source - # path out of the macro + # NOTE: does not propagate the error source path expr = quote if $(@__MODULE__).invariants_enabled() @assert $arg @@ -33,7 +31,7 @@ macro invariant(arg) end macro unreachable() - @invariant false + :(@invariant false) end # Invokes undefined behavior in LLVM. diff --git a/src/utils/keywords.jl b/src/utils/keywords.jl index 030c8b3c..2728f20a 100644 --- a/src/utils/keywords.jl +++ b/src/utils/keywords.jl @@ -217,14 +217,14 @@ struct KeywordsHandler{Ord} end function setup_logging(keywords::KeywordsHandler) - update_logger(loglevel=keywords.loglevel) + logger_update(loglevel=keywords.loglevel) nothing end function setup_statistics(keywords::KeywordsHandler) if keywords.loglevel <= 0 - refresh_performance_counters() - refresh_statistics() + performance_counters_refresh() + statistics_refresh() end nothing end diff --git a/src/utils/logging.jl b/src/utils/logging.jl index f6bfdc71..b90c4d5a 100644 --- a/src/utils/logging.jl +++ b/src/utils/logging.jl @@ -6,8 +6,6 @@ # message to console. The macro @log wraps Logging.@logmsg from the standard # library. -# Logging is disabled on all threads except the one with threadid() == 1. - """ @log expr @log level=N expr @@ -27,6 +25,8 @@ macro log end ### # Some aux. definitions +const _groebner_log_lock = Ref{ReentrantLock}(ReentrantLock()) + function meta_formatter_groebner end @static if VERSION >= v"1.7.0" @@ -104,14 +104,24 @@ end const _groebner_logger = Ref{GroebnerLogger}(GroebnerLogger()) # Updates the global logging parameters in the Groebner module. -function update_logger(; loglevel=nothing) +function logger_update(; loglevel=nothing) # Do nothing if logging is disabled !logging_enabled() && return nothing - # Do nothing if run from a worker thread + # Do nothing if nothing is being updated + loglevel === nothing && return nothing + # Do nothing if run from a worker thread. + # NOTE: this does not always do what is intended. It is still correct, since + # we lock the logger anyway. threadid() != 1 && return nothing - if loglevel !== nothing - _groebner_logger[] = Groebner.GroebnerLogger(stderr, Logging.LogLevel(loglevel)) + + new_logger = Groebner.GroebnerLogger(stderr, Logging.LogLevel(loglevel)) + lock(_groebner_log_lock[]) + try + _groebner_logger[] = new_logger + finally + unlock(_groebner_log_lock[]) end + nothing end @@ -147,10 +157,8 @@ macro log(args...) level, msgs = log_macro_pruneargs(file, line, args) esc(:( if $(@__MODULE__).logging_enabled() - if threadid() == 1 - with_logger($(@__MODULE__)._groebner_logger[]) do - @logmsg LogLevel($level) $(msgs...) _file = $file _line = $line - end + with_logger($(@__MODULE__)._groebner_logger[]) do + @logmsg LogLevel($level) $(msgs...) _file = $file _line = $line end else nothing diff --git a/src/utils/statistics.jl b/src/utils/statistics.jl index 46eee74d..4d635d7b 100644 --- a/src/utils/statistics.jl +++ b/src/utils/statistics.jl @@ -78,7 +78,7 @@ function update_statistic!( nothing end -function refresh_statistics!(stat::GroebnerStatistics) +function statistics_refresh!(stat::GroebnerStatistics) stat.stopwatch_start = time_ns() empty!(stat.F4_stats) nothing @@ -119,10 +119,10 @@ function update_statistic(file, line, args, key, value) update_statistic!(_groebner_statistics, file, line, args, key, value) end -function refresh_statistics() +function statistics_refresh() !statistics_enabled() && return nothing threadid() != 1 && return nothing - refresh_statistics!(_groebner_statistics) + statistics_refresh!(_groebner_statistics) nothing end diff --git a/src/utils/test_systems.jl b/src/utils/test_systems.jl index a2a52bc7..cdda71b7 100644 --- a/src/utils/test_systems.jl +++ b/src/utils/test_systems.jl @@ -5,11 +5,9 @@ #! format: off # Syntax formatting is off in this file. -# The cyclic-n system -# -# Göran Björck and Ralf Fröberg: -# `A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic n-roots', -# in J. Symbolic Computation (1991) 12, pp 329–336. +# Göran Björck and Ralf Fröberg: `A faster way to count the solutions of +# inhomogeneous systems of algebraic equations, with applications to cyclic +# n-roots', in J. Symbolic Computation (1991) 12, pp 329–336. function cyclicn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) _, z = np.polynomial_ring(ground, ["z$i" for i in 1:n], ordering=ordering) [ @@ -20,8 +18,7 @@ function cyclicn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end -# The root-n system -# (not to be confused with cyclic-n system)!! +# Not to be confused with cyclic-n !! function rootn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) _, xs = np.polynomial_ring(ground, ["x$i" for i in 1:n], ordering=ordering) ans = [sum(map(prod, Combinatorics.combinations(xs, i))) for i in 1:n] @@ -29,14 +26,11 @@ function rootn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ans end -# The reimer-n system function reimern(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) _, xs = np.polynomial_ring(ground, ["x$i" for i in 1:n], ordering=ordering) [sum((-1)^(i + 1) * 2 * xs[i]^j for i in 1:n) - 1 for j in 2:(n + 1)] end -# The katsura-n system -# # S. Katsura, W. Fukuda, S. Inawashiro, N.M. Fujiki and R. Gebauer, # Cell Biophysics, Vol 11, pages 309–319, 1987. function katsuran(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) @@ -50,8 +44,6 @@ function katsuran(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end -# The noon-n system -# function noonn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) without(x, k) = x[1:end .!= k] @@ -64,8 +56,9 @@ function noonn(n; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) fs end -# The henrion-5 system -# +### +# Henrion + # Source: # https://gitlab.lip6.fr/eder/msolve-examples/-/raw/master/zero-dimensional/henrion5.ms function henrion5(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) @@ -103,8 +96,6 @@ function henrion5(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end -# The henrion-6 system -# # Source: # https://gitlab.lip6.fr/eder/msolve-examples/-/raw/master/zero-dimensional/henrion6.ms function henrion6(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) @@ -173,8 +164,6 @@ function henrion6(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end -# The henrion-7 system -# # Source: # https://gitlab.lip6.fr/eder/msolve-examples/-/raw/master/zero-dimensional/henrion7.ms function henrion7(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) @@ -310,24 +299,48 @@ function henrion7(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end +# Source: +# https://gitlab.lip6.fr/eder/msolve-examples/-/raw/master/zero-dimensional/henrion8.ms function henrion8(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) _, (f1, f2, f3, f4, f5, f6, f7, f8) = np.polynomial_ring( ground, ["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8"], - ordering=ordering) - [ - ground(2)*f1*f2*f3*f4*f5*f6*f7*f8-ground(69850115960625), - ground(8)*f7*f6*f5*f4*f3*f1*f2+ground(15)//ground(8)*f2*f3*f4*f5*f6*f7*f8+ground(15)//ground(2)*f1*f2*f3*f4*f5*f7*f8+ground(55)//ground(8)*f1*f2*f3*f4*f6*f7*f8+ground(6)*f1*f2*f3*f5*f6*f7*f8+ground(39)//ground(8)*f1*f2*f4*f5*f6*f7*f8+ground(7)//ground(2)*f1*f3*f4*f5*f6*f7*f8+ground(63)//ground(8)*f1*f2*f3*f4*f5*f6*f8-ground(32870642805000), - -ground(3654447799500)+ground(27)//ground(2)*f1*f2*f4*f5*f6*f8+ground(45)//ground(4)*f1*f3*f4*f5*f6*f8+ground(27)//ground(4)*f2*f3*f4*f5*f6*f8+ground(7)//ground(4)*f3*f4*f5*f6*f7*f8+ground(12)*f1*f2*f3*f4*f5*f7+ground(15)*f1*f2*f3*f4*f6*f7+ground(16)*f1*f2*f3*f5*f6*f7+ground(15)*f1*f2*f4*f5*f6*f7+ground(12)*f1*f3*f4*f5*f6*f7+ground(25)//ground(4)*f1*f2*f3*f4*f7*f8+ground(10)*f1*f2*f3*f5*f7*f8+ground(11)//ground(2)*f1*f2*f3*f6*f7*f8+ground(45)//ground(4)*f1*f2*f4*f5*f7*f8+ground(33)//ground(4)*f1*f2*f4*f6*f7*f8+ground(9)//ground(2)*f1*f2*f5*f6*f7*f8+ground(10)*f1*f3*f4*f5*f7*f8+ground(33)//ground(4)*f1*f3*f4*f6*f7*f8+ground(6)*f1*f3*f5*f6*f7*f8+ground(13)//ground(4)*f1*f4*f5*f6*f7*f8+ground(25)//ground(4)*f2*f3*f4*f5*f7*f8+ground(11)//ground(2)*f2*f3*f4*f6*f7*f8+ground(9)//ground(2)*f2*f3*f5*f6*f7*f8+ground(13)//ground(4)*f2*f4*f5*f6*f7*f8+ground(27)//ground(4)*f1*f2*f3*f4*f5*f8+ground(45)//ground(4)*f1*f2*f3*f4*f6*f8+ground(27)//ground(2)*f1*f2*f3*f5*f6*f8+ground(7)*f6*f5*f4*f3*f1*f2+ground(7)*f2*f3*f4*f5*f6*f7, - -ground(163221399000)+ground(6)*f5*f4*f3*f1*f2+ground(6)*f2*f3*f4*f5*f6+ground(6)*f3*f4*f5*f6*f7+ground(10)*f1*f2*f3*f4*f6+ground(12)*f1*f2*f3*f5*f6+ground(12)*f1*f2*f4*f5*f6+ground(10)*f1*f3*f4*f5*f6+ground(13)//ground(8)*f4*f5*f6*f7*f8+ground(10)*f1*f2*f3*f4*f7+ground(16)*f1*f2*f3*f5*f7+ground(12)*f1*f2*f3*f6*f7+ground(18)*f1*f2*f4*f5*f7+ground(18)*f1*f2*f4*f6*f7+ground(12)*f1*f2*f5*f6*f7+ground(16)*f1*f3*f4*f5*f7+ground(18)*f1*f3*f4*f6*f7+ground(16)*f1*f3*f5*f6*f7+ground(10)*f1*f4*f5*f6*f7+ground(10)*f2*f3*f4*f5*f7+ground(12)*f2*f3*f4*f6*f7+ground(12)*f2*f3*f5*f6*f7+ground(10)*f2*f4*f5*f6*f7+ground(5)*f1*f2*f3*f7*f8+ground(15)//ground(2)*f1*f2*f4*f7*f8+ground(15)//ground(2)*f1*f2*f5*f7*f8+ground(33)//ground(8)*f1*f2*f6*f7*f8+ground(15)//ground(2)*f1*f3*f4*f7*f8+ground(10)*f1*f3*f5*f7*f8+ground(11)//ground(2)*f1*f3*f6*f7*f8+ground(15)//ground(2)*f1*f4*f5*f7*f8+ground(11)//ground(2)*f1*f4*f6*f7*f8+ground(3)*f1*f5*f6*f7*f8+ground(5)*f2*f3*f4*f7*f8+ground(15)//ground(2)*f2*f3*f5*f7*f8+ground(33)//ground(8)*f2*f3*f6*f7*f8+ground(15)//ground(2)*f2*f4*f5*f7*f8+ground(11)//ground(2)*f2*f4*f6*f7*f8+ground(3)*f2*f5*f6*f7*f8+ground(5)*f3*f4*f5*f7*f8+ground(33)//ground(8)*f3*f4*f6*f7*f8+ground(3)*f3*f5*f6*f7*f8+ground(45)//ground(8)*f1*f2*f3*f4*f8+ground(9)*f1*f2*f3*f5*f8+ground(9)*f1*f2*f3*f6*f8+ground(81)//ground(8)*f1*f2*f4*f5*f8+ground(27)//ground(2)*f1*f2*f4*f6*f8+ground(81)//ground(8)*f1*f2*f5*f6*f8+ground(9)*f1*f3*f4*f5*f8+ground(27)//ground(2)*f1*f3*f4*f6*f8+ground(27)//ground(2)*f1*f3*f5*f6*f8+ground(9)*f1*f4*f5*f6*f8+ground(45)//ground(8)*f2*f3*f4*f5*f8+ground(9)*f2*f3*f4*f6*f8+ground(81)//ground(8)*f2*f3*f5*f6*f8+ground(9)*f2*f4*f5*f6*f8+ground(45)//ground(8)*f3*f4*f5*f6*f8, - -ground(3562995798)+ground(5)*f4*f3*f1*f2+ground(5)*f2*f3*f4*f5+ground(5)*f3*f4*f5*f6+ground(8)*f1*f2*f3*f5+ground(9)*f1*f2*f4*f5+ground(8)*f1*f3*f4*f5+ground(5)*f4*f5*f6*f7+ground(8)*f1*f2*f3*f6+ground(12)*f1*f2*f4*f6+ground(9)*f1*f2*f5*f6+ground(12)*f1*f3*f4*f6+ground(12)*f1*f3*f5*f6+ground(8)*f1*f4*f5*f6+ground(8)*f2*f3*f4*f6+ground(9)*f2*f3*f5*f6+ground(8)*f2*f4*f5*f6+ground(3)//ground(2)*f5*f6*f7*f8+ground(8)*f1*f2*f3*f7+ground(12)*f1*f2*f4*f7+ground(12)*f1*f2*f5*f7+ground(9)*f1*f2*f6*f7+ground(12)*f1*f3*f4*f7+ground(16)*f1*f3*f5*f7+ground(12)*f1*f3*f6*f7+ground(12)*f1*f4*f5*f7+ground(12)*f1*f4*f6*f7+ground(8)*f1*f5*f6*f7+ground(8)*f2*f3*f4*f7+ground(12)*f2*f3*f5*f7+ground(9)*f2*f3*f6*f7+ground(12)*f2*f4*f5*f7+ground(12)*f2*f4*f6*f7+ground(8)*f2*f5*f6*f7+ground(8)*f3*f4*f5*f7+ground(9)*f3*f4*f6*f7+ground(8)*f3*f5*f6*f7+ground(15)//ground(4)*f1*f2*f7*f8+ground(5)*f1*f3*f7*f8+ground(5)*f1*f4*f7*f8+ground(5)*f1*f5*f7*f8+ground(11)//ground(4)*f1*f6*f7*f8+ground(15)//ground(4)*f2*f3*f7*f8+ground(5)*f2*f4*f7*f8+ground(5)*f2*f5*f7*f8+ground(11)//ground(4)*f2*f6*f7*f8+ground(15)//ground(4)*f3*f4*f7*f8+ground(5)*f3*f5*f7*f8+ground(11)//ground(4)*f3*f6*f7*f8+ground(15)//ground(4)*f4*f5*f7*f8+ground(11)//ground(4)*f4*f6*f7*f8+ground(9)//ground(2)*f1*f2*f3*f8+ground(27)//ground(4)*f1*f2*f4*f8+ground(27)//ground(4)*f1*f2*f5*f8+ground(27)//ground(4)*f1*f2*f6*f8+ground(27)//ground(4)*f1*f3*f4*f8+ground(9)*f1*f3*f5*f8+ground(9)*f1*f3*f6*f8+ground(27)//ground(4)*f1*f4*f5*f8+ground(9)*f1*f4*f6*f8+ground(27)//ground(4)*f1*f5*f6*f8+ground(9)//ground(2)*f2*f3*f4*f8+ground(27)//ground(4)*f2*f3*f5*f8+ground(27)//ground(4)*f2*f3*f6*f8+ground(27)//ground(4)*f2*f4*f5*f8+ground(9)*f2*f4*f6*f8+ground(27)//ground(4)*f2*f5*f6*f8+ground(9)//ground(2)*f3*f4*f5*f8+ground(27)//ground(4)*f3*f4*f6*f8+ground(27)//ground(4)*f3*f5*f6*f8+ground(9)//ground(2)*f4*f5*f6*f8, - -ground(41268600)+ground(4)*f2*f3*f4+ground(6)*f3*f4*f1+ground(4)*f3*f4*f5+ground(6)*f1*f2*f4+ground(6)*f4*f5*f2+ground(6)*f4*f5*f1+ground(4)*f4*f5*f6+ground(6)*f1*f2*f5+ground(8)*f1*f3*f5+ground(6)*f2*f3*f5+ground(6)*f5*f6*f3+ground(6)*f5*f6*f2+ground(6)*f5*f6*f1+ground(4)*f5*f6*f7+ground(6)*f1*f2*f6+ground(8)*f1*f3*f6+ground(8)*f1*f4*f6+ground(6)*f2*f3*f6+ground(8)*f2*f4*f6+ground(6)*f3*f4*f6+ground(6)*f6*f7*f4+ground(6)*f6*f7*f3+ground(6)*f6*f7*f2+ground(6)*f6*f7*f1+ground(11)//ground(8)*f6*f7*f8+ground(6)*f1*f2*f7+ground(8)*f1*f3*f7+ground(8)*f1*f4*f7+ground(8)*f1*f5*f7+ground(6)*f2*f3*f7+ground(8)*f2*f4*f7+ground(8)*f2*f5*f7+ground(6)*f3*f4*f7+ground(8)*f3*f5*f7+ground(6)*f4*f5*f7+ground(5)//ground(2)*f7*f8*f5+ground(5)//ground(2)*f7*f8*f4+ground(5)//ground(2)*f7*f8*f3+ground(5)//ground(2)*f7*f8*f2+ground(5)//ground(2)*f7*f8*f1+ground(27)//ground(8)*f1*f2*f8+ground(9)//ground(2)*f1*f3*f8+ground(9)//ground(2)*f1*f4*f8+ground(9)//ground(2)*f1*f5*f8+ground(9)//ground(2)*f1*f6*f8+ground(27)//ground(8)*f2*f3*f8+ground(9)//ground(2)*f2*f4*f8+ground(9)//ground(2)*f2*f5*f8+ground(9)//ground(2)*f2*f6*f8+ground(27)//ground(8)*f3*f4*f8+ground(9)//ground(2)*f3*f5*f8+ground(9)//ground(2)*f3*f6*f8+ground(27)//ground(8)*f4*f5*f8+ground(9)//ground(2)*f4*f6*f8+ground(27)//ground(8)*f5*f6*f8+ground(4)*f3*f1*f2, - -ground(257068)+ground(3)*f1*f2+ground(3)*f2*f3+ground(4)*f3*f1+ground(3)*f3*f4+ground(4)*f4*f2+ground(4)*f4*f1+ground(3)*f4*f5+ground(4)*f5*f3+ground(4)*f5*f2+ground(4)*f5*f1+ground(3)*f5*f6+ground(4)*f6*f4+ground(4)*f6*f3+ground(4)*f6*f2+ground(4)*f6*f1+ground(3)*f6*f7+ground(4)*f7*f5+ground(4)*f7*f4+ground(4)*f7*f3+ground(4)*f7*f2+ground(4)*f7*f1+ground(5)//ground(4)*f7*f8+ground(9)//ground(4)*f8*f6+ground(9)//ground(4)*f8*f5+ground(9)//ground(4)*f8*f4+ground(9)//ground(4)*f8*f3+ground(9)//ground(4)*f8*f2+ground(9)//ground(4)*f8*f1,ground(9)//ground(8)*f8+ground(2)*f7+ground(2)*f6+ground(2)*f5+ground(2)*f4+ground(2)*f3+ground(2)*f2+ground(2)*f1-ground(808) - ] + ordering=ordering + ) + [ + ground(2)*f1*f2*f3*f4*f5*f6*f7*f8-ground(69850115960625), + ground(8)*f7*f6*f5*f4*f3*f1*f2+ground(15)//ground(8)*f2*f3*f4*f5*f6*f7*f8+ground(15)//ground(2)*f1*f2*f3*f4*f5*f7*f8+ground(55)//ground(8)*f1*f2*f3*f4*f6*f7*f8+ground(6)*f1*f2*f3*f5*f6*f7*f8+ground(39)//ground(8)*f1*f2*f4*f5*f6*f7*f8+ground(7)//ground(2)*f1*f3*f4*f5*f6*f7*f8+ground(63)//ground(8)*f1*f2*f3*f4*f5*f6*f8-ground(32870642805000), + -ground(3654447799500)+ground(27)//ground(2)*f1*f2*f4*f5*f6*f8+ground(45)//ground(4)*f1*f3*f4*f5*f6*f8+ground(27)//ground(4)*f2*f3*f4*f5*f6*f8+ground(7)//ground(4)*f3*f4*f5*f6*f7*f8+ground(12)*f1*f2*f3*f4*f5*f7+ground(15)*f1*f2*f3*f4*f6*f7+ground(16)*f1*f2*f3*f5*f6*f7+ground(15)*f1*f2*f4*f5*f6*f7+ground(12)*f1*f3*f4*f5*f6*f7+ground(25)//ground(4)*f1*f2*f3*f4*f7*f8+ground(10)*f1*f2*f3*f5*f7*f8+ground(11)//ground(2)*f1*f2*f3*f6*f7*f8+ground(45)//ground(4)*f1*f2*f4*f5*f7*f8+ground(33)//ground(4)*f1*f2*f4*f6*f7*f8+ground(9)//ground(2)*f1*f2*f5*f6*f7*f8+ground(10)*f1*f3*f4*f5*f7*f8+ground(33)//ground(4)*f1*f3*f4*f6*f7*f8+ground(6)*f1*f3*f5*f6*f7*f8+ground(13)//ground(4)*f1*f4*f5*f6*f7*f8+ground(25)//ground(4)*f2*f3*f4*f5*f7*f8+ground(11)//ground(2)*f2*f3*f4*f6*f7*f8+ground(9)//ground(2)*f2*f3*f5*f6*f7*f8+ground(13)//ground(4)*f2*f4*f5*f6*f7*f8+ground(27)//ground(4)*f1*f2*f3*f4*f5*f8+ground(45)//ground(4)*f1*f2*f3*f4*f6*f8+ground(27)//ground(2)*f1*f2*f3*f5*f6*f8+ground(7)*f6*f5*f4*f3*f1*f2+ground(7)*f2*f3*f4*f5*f6*f7, + -ground(163221399000)+ground(6)*f5*f4*f3*f1*f2+ground(6)*f2*f3*f4*f5*f6+ground(6)*f3*f4*f5*f6*f7+ground(10)*f1*f2*f3*f4*f6+ground(12)*f1*f2*f3*f5*f6+ground(12)*f1*f2*f4*f5*f6+ground(10)*f1*f3*f4*f5*f6+ground(13)//ground(8)*f4*f5*f6*f7*f8+ground(10)*f1*f2*f3*f4*f7+ground(16)*f1*f2*f3*f5*f7+ground(12)*f1*f2*f3*f6*f7+ground(18)*f1*f2*f4*f5*f7+ground(18)*f1*f2*f4*f6*f7+ground(12)*f1*f2*f5*f6*f7+ground(16)*f1*f3*f4*f5*f7+ground(18)*f1*f3*f4*f6*f7+ground(16)*f1*f3*f5*f6*f7+ground(10)*f1*f4*f5*f6*f7+ground(10)*f2*f3*f4*f5*f7+ground(12)*f2*f3*f4*f6*f7+ground(12)*f2*f3*f5*f6*f7+ground(10)*f2*f4*f5*f6*f7+ground(5)*f1*f2*f3*f7*f8+ground(15)//ground(2)*f1*f2*f4*f7*f8+ground(15)//ground(2)*f1*f2*f5*f7*f8+ground(33)//ground(8)*f1*f2*f6*f7*f8+ground(15)//ground(2)*f1*f3*f4*f7*f8+ground(10)*f1*f3*f5*f7*f8+ground(11)//ground(2)*f1*f3*f6*f7*f8+ground(15)//ground(2)*f1*f4*f5*f7*f8+ground(11)//ground(2)*f1*f4*f6*f7*f8+ground(3)*f1*f5*f6*f7*f8+ground(5)*f2*f3*f4*f7*f8+ground(15)//ground(2)*f2*f3*f5*f7*f8+ground(33)//ground(8)*f2*f3*f6*f7*f8+ground(15)//ground(2)*f2*f4*f5*f7*f8+ground(11)//ground(2)*f2*f4*f6*f7*f8+ground(3)*f2*f5*f6*f7*f8+ground(5)*f3*f4*f5*f7*f8+ground(33)//ground(8)*f3*f4*f6*f7*f8+ground(3)*f3*f5*f6*f7*f8+ground(45)//ground(8)*f1*f2*f3*f4*f8+ground(9)*f1*f2*f3*f5*f8+ground(9)*f1*f2*f3*f6*f8+ground(81)//ground(8)*f1*f2*f4*f5*f8+ground(27)//ground(2)*f1*f2*f4*f6*f8+ground(81)//ground(8)*f1*f2*f5*f6*f8+ground(9)*f1*f3*f4*f5*f8+ground(27)//ground(2)*f1*f3*f4*f6*f8+ground(27)//ground(2)*f1*f3*f5*f6*f8+ground(9)*f1*f4*f5*f6*f8+ground(45)//ground(8)*f2*f3*f4*f5*f8+ground(9)*f2*f3*f4*f6*f8+ground(81)//ground(8)*f2*f3*f5*f6*f8+ground(9)*f2*f4*f5*f6*f8+ground(45)//ground(8)*f3*f4*f5*f6*f8, + -ground(3562995798)+ground(5)*f4*f3*f1*f2+ground(5)*f2*f3*f4*f5+ground(5)*f3*f4*f5*f6+ground(8)*f1*f2*f3*f5+ground(9)*f1*f2*f4*f5+ground(8)*f1*f3*f4*f5+ground(5)*f4*f5*f6*f7+ground(8)*f1*f2*f3*f6+ground(12)*f1*f2*f4*f6+ground(9)*f1*f2*f5*f6+ground(12)*f1*f3*f4*f6+ground(12)*f1*f3*f5*f6+ground(8)*f1*f4*f5*f6+ground(8)*f2*f3*f4*f6+ground(9)*f2*f3*f5*f6+ground(8)*f2*f4*f5*f6+ground(3)//ground(2)*f5*f6*f7*f8+ground(8)*f1*f2*f3*f7+ground(12)*f1*f2*f4*f7+ground(12)*f1*f2*f5*f7+ground(9)*f1*f2*f6*f7+ground(12)*f1*f3*f4*f7+ground(16)*f1*f3*f5*f7+ground(12)*f1*f3*f6*f7+ground(12)*f1*f4*f5*f7+ground(12)*f1*f4*f6*f7+ground(8)*f1*f5*f6*f7+ground(8)*f2*f3*f4*f7+ground(12)*f2*f3*f5*f7+ground(9)*f2*f3*f6*f7+ground(12)*f2*f4*f5*f7+ground(12)*f2*f4*f6*f7+ground(8)*f2*f5*f6*f7+ground(8)*f3*f4*f5*f7+ground(9)*f3*f4*f6*f7+ground(8)*f3*f5*f6*f7+ground(15)//ground(4)*f1*f2*f7*f8+ground(5)*f1*f3*f7*f8+ground(5)*f1*f4*f7*f8+ground(5)*f1*f5*f7*f8+ground(11)//ground(4)*f1*f6*f7*f8+ground(15)//ground(4)*f2*f3*f7*f8+ground(5)*f2*f4*f7*f8+ground(5)*f2*f5*f7*f8+ground(11)//ground(4)*f2*f6*f7*f8+ground(15)//ground(4)*f3*f4*f7*f8+ground(5)*f3*f5*f7*f8+ground(11)//ground(4)*f3*f6*f7*f8+ground(15)//ground(4)*f4*f5*f7*f8+ground(11)//ground(4)*f4*f6*f7*f8+ground(9)//ground(2)*f1*f2*f3*f8+ground(27)//ground(4)*f1*f2*f4*f8+ground(27)//ground(4)*f1*f2*f5*f8+ground(27)//ground(4)*f1*f2*f6*f8+ground(27)//ground(4)*f1*f3*f4*f8+ground(9)*f1*f3*f5*f8+ground(9)*f1*f3*f6*f8+ground(27)//ground(4)*f1*f4*f5*f8+ground(9)*f1*f4*f6*f8+ground(27)//ground(4)*f1*f5*f6*f8+ground(9)//ground(2)*f2*f3*f4*f8+ground(27)//ground(4)*f2*f3*f5*f8+ground(27)//ground(4)*f2*f3*f6*f8+ground(27)//ground(4)*f2*f4*f5*f8+ground(9)*f2*f4*f6*f8+ground(27)//ground(4)*f2*f5*f6*f8+ground(9)//ground(2)*f3*f4*f5*f8+ground(27)//ground(4)*f3*f4*f6*f8+ground(27)//ground(4)*f3*f5*f6*f8+ground(9)//ground(2)*f4*f5*f6*f8, + -ground(41268600)+ground(4)*f2*f3*f4+ground(6)*f3*f4*f1+ground(4)*f3*f4*f5+ground(6)*f1*f2*f4+ground(6)*f4*f5*f2+ground(6)*f4*f5*f1+ground(4)*f4*f5*f6+ground(6)*f1*f2*f5+ground(8)*f1*f3*f5+ground(6)*f2*f3*f5+ground(6)*f5*f6*f3+ground(6)*f5*f6*f2+ground(6)*f5*f6*f1+ground(4)*f5*f6*f7+ground(6)*f1*f2*f6+ground(8)*f1*f3*f6+ground(8)*f1*f4*f6+ground(6)*f2*f3*f6+ground(8)*f2*f4*f6+ground(6)*f3*f4*f6+ground(6)*f6*f7*f4+ground(6)*f6*f7*f3+ground(6)*f6*f7*f2+ground(6)*f6*f7*f1+ground(11)//ground(8)*f6*f7*f8+ground(6)*f1*f2*f7+ground(8)*f1*f3*f7+ground(8)*f1*f4*f7+ground(8)*f1*f5*f7+ground(6)*f2*f3*f7+ground(8)*f2*f4*f7+ground(8)*f2*f5*f7+ground(6)*f3*f4*f7+ground(8)*f3*f5*f7+ground(6)*f4*f5*f7+ground(5)//ground(2)*f7*f8*f5+ground(5)//ground(2)*f7*f8*f4+ground(5)//ground(2)*f7*f8*f3+ground(5)//ground(2)*f7*f8*f2+ground(5)//ground(2)*f7*f8*f1+ground(27)//ground(8)*f1*f2*f8+ground(9)//ground(2)*f1*f3*f8+ground(9)//ground(2)*f1*f4*f8+ground(9)//ground(2)*f1*f5*f8+ground(9)//ground(2)*f1*f6*f8+ground(27)//ground(8)*f2*f3*f8+ground(9)//ground(2)*f2*f4*f8+ground(9)//ground(2)*f2*f5*f8+ground(9)//ground(2)*f2*f6*f8+ground(27)//ground(8)*f3*f4*f8+ground(9)//ground(2)*f3*f5*f8+ground(9)//ground(2)*f3*f6*f8+ground(27)//ground(8)*f4*f5*f8+ground(9)//ground(2)*f4*f6*f8+ground(27)//ground(8)*f5*f6*f8+ground(4)*f3*f1*f2, + -ground(257068)+ground(3)*f1*f2+ground(3)*f2*f3+ground(4)*f3*f1+ground(3)*f3*f4+ground(4)*f4*f2+ground(4)*f4*f1+ground(3)*f4*f5+ground(4)*f5*f3+ground(4)*f5*f2+ground(4)*f5*f1+ground(3)*f5*f6+ground(4)*f6*f4+ground(4)*f6*f3+ground(4)*f6*f2+ground(4)*f6*f1+ground(3)*f6*f7+ground(4)*f7*f5+ground(4)*f7*f4+ground(4)*f7*f3+ground(4)*f7*f2+ground(4)*f7*f1+ground(5)//ground(4)*f7*f8+ground(9)//ground(4)*f8*f6+ground(9)//ground(4)*f8*f5+ground(9)//ground(4)*f8*f4+ground(9)//ground(4)*f8*f3+ground(9)//ground(4)*f8*f2+ground(9)//ground(4)*f8*f1,ground(9)//ground(8)*f8+ground(2)*f7+ground(2)*f6+ground(2)*f5+ground(2)*f4+ground(2)*f3+ground(2)*f2+ground(2)*f1-ground(808) + ] end -# -# Eco-n systems +# Source: +# https://gitlab.lip6.fr/eder/msolve-examples/-/raw/master/zero-dimensional/henrion9.ms +function henrion9(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) + _, (f1, f2, f3, f4, f5, f6, f7, f8, f9) = np.polynomial_ring( + ground, + ["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9"], + ordering=ordering + ) + [ + 2*f1*f2*f3*f4*f5*f6*f7*f8*f9-22561587455281875, + 9*f8*f7*f6*f5*f4*f3*f1*f2+17//ground(9)*f2*f3*f4*f5*f6*f7*f8*f9+77//ground(9)*f1*f2*f3*f4*f5*f6*f8*f9+8*f1*f2*f3*f4*f5*f7*f8*f9+65//ground(9)*f1*f2*f3*f4*f6*f7*f8*f9+56//ground(9)*f1*f2*f3*f5*f6*f7*f8*f9+5*f1*f2*f4*f5*f6*f7*f8*f9+32//ground(9)*f1*f3*f4*f5*f6*f7*f8*f9+80//ground(9)*f1*f2*f3*f4*f5*f6*f7*f9-10687067741975625, + -1213257282043500+44//ground(3)*f1*f2*f3*f5*f6*f8*f9+32//ground(3)*f1*f2*f3*f5*f7*f8*f9+52//ground(9)*f1*f2*f3*f6*f7*f8*f9+44//ground(3)*f1*f2*f4*f5*f6*f8*f9+12*f1*f2*f4*f5*f7*f8*f9+26//ground(3)*f1*f2*f4*f6*f7*f8*f9+14//ground(3)*f1*f2*f5*f6*f7*f8*f9+110//ground(9)*f1*f3*f4*f5*f6*f8*f9+32//ground(3)*f1*f3*f4*f5*f7*f8*f9+26//ground(3)*f1*f3*f4*f6*f7*f8*f9+56//ground(9)*f1*f3*f5*f6*f7*f8*f9+10//ground(3)*f1*f4*f5*f6*f7*f8*f9+22//ground(3)*f2*f3*f4*f5*f6*f8*f9+20//ground(3)*f2*f3*f4*f5*f7*f8*f9+52//ground(9)*f2*f3*f4*f6*f7*f8*f9+14//ground(3)*f2*f3*f5*f6*f7*f8*f9+10//ground(3)*f2*f4*f5*f6*f7*f8*f9+70//ground(9)*f1*f2*f3*f4*f5*f6*f9+40//ground(3)*f1*f2*f3*f4*f5*f7*f9+50//ground(3)*f1*f2*f3*f4*f6*f7*f9+160//ground(9)*f1*f2*f3*f5*f6*f7*f9+50//ground(3)*f1*f2*f4*f5*f6*f7*f9+40//ground(3)*f1*f3*f4*f5*f6*f7*f9+70//ground(9)*f2*f3*f4*f5*f6*f7*f9+8*f7*f6*f5*f4*f3*f1*f2+8*f2*f3*f4*f5*f6*f7*f8+16//ground(9)*f3*f4*f5*f6*f7*f8*f9+14*f1*f2*f3*f4*f5*f6*f8+18*f1*f2*f3*f4*f5*f7*f8+20*f1*f2*f3*f4*f6*f7*f8+20*f1*f2*f3*f5*f6*f7*f8+18*f1*f2*f4*f5*f6*f7*f8+14*f1*f3*f4*f5*f6*f7*f8+22//ground(3)*f1*f2*f3*f4*f5*f8*f9+110//ground(9)*f1*f2*f3*f4*f6*f8*f9+20//ground(3)*f1*f2*f3*f4*f7*f8*f9, + -56374959676500+52//ground(9)*f1*f3*f6*f7*f8*f9+100//ground(9)*f1*f4*f5*f6*f7*f9+88//ground(9)*f1*f4*f5*f6*f8*f9+8*f1*f4*f5*f7*f8*f9+52//ground(9)*f1*f4*f6*f7*f8*f9+28//ground(9)*f1*f5*f6*f7*f8*f9+20//ground(3)*f2*f3*f4*f5*f6*f9+100//ground(9)*f2*f3*f4*f5*f7*f9+55//ground(9)*f2*f3*f4*f5*f8*f9+40//ground(3)*f2*f3*f4*f6*f7*f9+88//ground(9)*f2*f3*f4*f6*f8*f9+16//ground(3)*f2*f3*f4*f7*f8*f9+40//ground(3)*f2*f3*f5*f6*f7*f9+11*f2*f3*f5*f6*f8*f9+8*f2*f3*f5*f7*f8*f9+13//ground(3)*f2*f3*f6*f7*f8*f9+100//ground(9)*f2*f4*f5*f6*f7*f9+88//ground(9)*f2*f4*f5*f6*f8*f9+8*f2*f4*f5*f7*f8*f9+52//ground(9)*f2*f4*f6*f7*f8*f9+28//ground(9)*f2*f5*f6*f7*f8*f9+20//ground(3)*f3*f4*f5*f6*f7*f9+55//ground(9)*f3*f4*f5*f6*f8*f9+16//ground(3)*f3*f4*f5*f7*f8*f9+13//ground(3)*f3*f4*f6*f7*f8*f9+28//ground(9)*f3*f5*f6*f7*f8*f9+20*f1*f3*f4*f5*f6*f8+24*f1*f3*f4*f5*f7*f8+24*f1*f3*f4*f6*f7*f8+20*f1*f3*f5*f6*f7*f8+12*f1*f4*f5*f6*f7*f8+12*f2*f3*f4*f5*f6*f8+15*f2*f3*f4*f5*f7*f8+16*f2*f3*f4*f6*f7*f8+15*f2*f3*f5*f6*f7*f8+12*f2*f4*f5*f6*f7*f8+20//ground(3)*f1*f2*f3*f4*f5*f9+100//ground(9)*f1*f2*f3*f4*f6*f9+100//ground(9)*f1*f2*f3*f4*f7*f9+55//ground(9)*f1*f2*f3*f4*f8*f9+40//ground(3)*f1*f2*f3*f5*f6*f9+160//ground(9)*f1*f2*f3*f5*f7*f9+88//ground(9)*f1*f2*f3*f5*f8*f9+40//ground(3)*f1*f2*f3*f6*f7*f9+88//ground(9)*f1*f2*f3*f6*f8*f9+16//ground(3)*f1*f2*f3*f7*f8*f9+40//ground(3)*f1*f2*f4*f5*f6*f9+20*f1*f2*f4*f5*f7*f9+11*f1*f2*f4*f5*f8*f9+20*f1*f2*f4*f6*f7*f9+44//ground(3)*f1*f2*f4*f6*f8*f9+8*f1*f2*f4*f7*f8*f9+40//ground(3)*f1*f2*f5*f6*f7*f9+11*f1*f2*f5*f6*f8*f9+8*f1*f2*f5*f7*f8*f9+13//ground(3)*f1*f2*f6*f7*f8*f9+100//ground(9)*f1*f3*f4*f5*f6*f9+160//ground(9)*f1*f3*f4*f5*f7*f9+88//ground(9)*f1*f3*f4*f5*f8*f9+20*f1*f3*f4*f6*f7*f9+44//ground(3)*f1*f3*f4*f6*f8*f9+8*f1*f3*f4*f7*f8*f9+160//ground(9)*f1*f3*f5*f6*f7*f9+44//ground(3)*f1*f3*f5*f6*f8*f9+32//ground(3)*f1*f3*f5*f7*f8*f9+7*f3*f4*f5*f6*f7*f8+12*f1*f2*f3*f4*f5*f7+15*f1*f2*f3*f4*f6*f7+16*f1*f2*f3*f5*f6*f7+15*f1*f2*f4*f5*f6*f7+12*f1*f3*f4*f5*f6*f7+5//ground(3)*f4*f5*f6*f7*f8*f9+12*f1*f2*f3*f4*f5*f8+20*f1*f2*f3*f4*f6*f8+15*f1*f2*f3*f4*f7*f8+24*f1*f2*f3*f5*f6*f8+24*f1*f2*f3*f5*f7*f8+16*f1*f2*f3*f6*f7*f8+24*f1*f2*f4*f5*f6*f8+27*f1*f2*f4*f5*f7*f8+24*f1*f2*f4*f6*f7*f8+15*f1*f2*f5*f6*f7*f8+7*f6*f5*f4*f3*f1*f2+7*f2*f3*f4*f5*f6*f7, + -1314069041754+6*f5*f4*f3*f1*f2+6*f2*f3*f4*f5*f6+6*f3*f4*f5*f6*f7+10*f1*f2*f3*f4*f6+12*f1*f2*f3*f5*f6+12*f1*f2*f4*f5*f6+10*f1*f3*f4*f5*f6+6*f4*f5*f6*f7*f8+10*f1*f2*f3*f4*f7+16*f1*f2*f3*f5*f7+12*f1*f2*f3*f6*f7+18*f1*f2*f4*f5*f7+18*f1*f2*f4*f6*f7+12*f1*f2*f5*f6*f7+16*f1*f3*f4*f5*f7+18*f1*f3*f4*f6*f7+16*f1*f3*f5*f6*f7+10*f1*f4*f5*f6*f7+10*f2*f3*f4*f5*f7+12*f2*f3*f4*f6*f7+12*f2*f3*f5*f6*f7+10*f2*f4*f5*f6*f7+14//ground(9)*f5*f6*f7*f8*f9+10*f1*f2*f3*f4*f8+16*f1*f2*f3*f5*f8+16*f1*f2*f3*f6*f8+12*f1*f2*f3*f7*f8+18*f1*f2*f4*f5*f8+24*f1*f2*f4*f6*f8+18*f1*f2*f4*f7*f8+18*f1*f2*f5*f6*f8+18*f1*f2*f5*f7*f8+12*f1*f2*f6*f7*f8+16*f1*f3*f4*f5*f8+24*f1*f3*f4*f6*f8+18*f1*f3*f4*f7*f8+24*f1*f3*f5*f6*f8+24*f1*f3*f5*f7*f8+16*f1*f3*f6*f7*f8+16*f1*f4*f5*f6*f8+18*f1*f4*f5*f7*f8+16*f1*f4*f6*f7*f8+10*f1*f5*f6*f7*f8+10*f2*f3*f4*f5*f8+16*f2*f3*f4*f6*f8+12*f2*f3*f4*f7*f8+18*f2*f3*f5*f6*f8+18*f2*f3*f5*f7*f8+12*f2*f3*f6*f7*f8+16*f2*f4*f5*f6*f8+18*f2*f4*f5*f7*f8+16*f2*f4*f6*f7*f8+10*f2*f5*f6*f7*f8+10*f3*f4*f5*f6*f8+12*f3*f4*f5*f7*f8+12*f3*f4*f6*f7*f8+10*f3*f5*f6*f7*f8+50//ground(9)*f1*f2*f3*f4*f9+80//ground(9)*f1*f2*f3*f5*f9+80//ground(9)*f1*f2*f3*f6*f9+80//ground(9)*f1*f2*f3*f7*f9+44//ground(9)*f1*f2*f3*f8*f9+10*f1*f2*f4*f5*f9+40//ground(3)*f1*f2*f4*f6*f9+40//ground(3)*f1*f2*f4*f7*f9+22//ground(3)*f1*f2*f4*f8*f9+10*f1*f2*f5*f6*f9+40//ground(3)*f1*f2*f5*f7*f9+22//ground(3)*f1*f2*f5*f8*f9+10*f1*f2*f6*f7*f9+22//ground(3)*f1*f2*f6*f8*f9+4*f1*f2*f7*f8*f9+80//ground(9)*f1*f3*f4*f5*f9+40//ground(3)*f1*f3*f4*f6*f9+40//ground(3)*f1*f3*f4*f7*f9+22//ground(3)*f1*f3*f4*f8*f9+40//ground(3)*f1*f3*f5*f6*f9+160//ground(9)*f1*f3*f5*f7*f9+88//ground(9)*f1*f3*f5*f8*f9+40//ground(3)*f1*f3*f6*f7*f9+88//ground(9)*f1*f3*f6*f8*f9+16//ground(3)*f1*f3*f7*f8*f9+80//ground(9)*f1*f4*f5*f6*f9+40//ground(3)*f1*f4*f5*f7*f9+22//ground(3)*f1*f4*f5*f8*f9+40//ground(3)*f1*f4*f6*f7*f9+88//ground(9)*f1*f4*f6*f8*f9+16//ground(3)*f1*f4*f7*f8*f9+80//ground(9)*f1*f5*f6*f7*f9+22//ground(3)*f1*f5*f6*f8*f9+16//ground(3)*f1*f5*f7*f8*f9+26//ground(9)*f1*f6*f7*f8*f9+50//ground(9)*f2*f3*f4*f5*f9+80//ground(9)*f2*f3*f4*f6*f9+80//ground(9)*f2*f3*f4*f7*f9+44//ground(9)*f2*f3*f4*f8*f9+10*f2*f3*f5*f6*f9+40//ground(3)*f2*f3*f5*f7*f9+22//ground(3)*f2*f3*f5*f8*f9+10*f2*f3*f6*f7*f9+22//ground(3)*f2*f3*f6*f8*f9+4*f2*f3*f7*f8*f9+80//ground(9)*f2*f4*f5*f6*f9+40//ground(3)*f2*f4*f5*f7*f9+22//ground(3)*f2*f4*f5*f8*f9+40//ground(3)*f2*f4*f6*f7*f9+88//ground(9)*f2*f4*f6*f8*f9+16//ground(3)*f2*f4*f7*f8*f9+80//ground(9)*f2*f5*f6*f7*f9+22//ground(3)*f2*f5*f6*f8*f9+16//ground(3)*f2*f5*f7*f8*f9+26//ground(9)*f2*f6*f7*f8*f9+50//ground(9)*f3*f4*f5*f6*f9+80//ground(9)*f3*f4*f5*f7*f9+44//ground(9)*f3*f4*f5*f8*f9+10*f3*f4*f6*f7*f9+22//ground(3)*f3*f4*f6*f8*f9+4*f3*f4*f7*f8*f9+80//ground(9)*f3*f5*f6*f7*f9+22//ground(3)*f3*f5*f6*f8*f9+16//ground(3)*f3*f5*f7*f8*f9+26//ground(9)*f3*f6*f7*f8*f9+50//ground(9)*f4*f5*f6*f7*f9+44//ground(9)*f4*f5*f6*f8*f9+4*f4*f5*f7*f8*f9+26//ground(9)*f4*f6*f7*f8*f9, + -16892753598+5*f4*f3*f1*f2+5*f2*f3*f4*f5+5*f3*f4*f5*f6+8*f1*f2*f3*f5+9*f1*f2*f4*f5+8*f1*f3*f4*f5+5*f4*f5*f6*f7+8*f1*f2*f3*f6+12*f1*f2*f4*f6+9*f1*f2*f5*f6+12*f1*f3*f4*f6+12*f1*f3*f5*f6+8*f1*f4*f5*f6+8*f2*f3*f4*f6+9*f2*f3*f5*f6+8*f2*f4*f5*f6+5*f5*f6*f7*f8+8*f1*f2*f3*f7+12*f1*f2*f4*f7+12*f1*f2*f5*f7+9*f1*f2*f6*f7+12*f1*f3*f4*f7+16*f1*f3*f5*f7+12*f1*f3*f6*f7+12*f1*f4*f5*f7+12*f1*f4*f6*f7+8*f1*f5*f6*f7+8*f2*f3*f4*f7+12*f2*f3*f5*f7+9*f2*f3*f6*f7+12*f2*f4*f5*f7+12*f2*f4*f6*f7+8*f2*f5*f6*f7+8*f3*f4*f5*f7+9*f3*f4*f6*f7+8*f3*f5*f6*f7+13//ground(9)*f6*f7*f8*f9+8*f1*f2*f3*f8+12*f1*f2*f4*f8+12*f1*f2*f5*f8+12*f1*f2*f6*f8+9*f1*f2*f7*f8+12*f1*f3*f4*f8+16*f1*f3*f5*f8+16*f1*f3*f6*f8+12*f1*f3*f7*f8+12*f1*f4*f5*f8+16*f1*f4*f6*f8+12*f1*f4*f7*f8+12*f1*f5*f6*f8+12*f1*f5*f7*f8+8*f1*f6*f7*f8+8*f2*f3*f4*f8+12*f2*f3*f5*f8+12*f2*f3*f6*f8+9*f2*f3*f7*f8+12*f2*f4*f5*f8+16*f2*f4*f6*f8+12*f2*f4*f7*f8+12*f2*f5*f6*f8+12*f2*f5*f7*f8+8*f2*f6*f7*f8+8*f3*f4*f5*f8+12*f3*f4*f6*f8+9*f3*f4*f7*f8+12*f3*f5*f6*f8+12*f3*f5*f7*f8+8*f3*f6*f7*f8+8*f4*f5*f6*f8+9*f4*f5*f7*f8+8*f4*f6*f7*f8+40//ground(9)*f1*f2*f3*f9+20//ground(3)*f1*f2*f4*f9+20//ground(3)*f1*f2*f5*f9+20//ground(3)*f1*f2*f6*f9+20//ground(3)*f1*f2*f7*f9+11//ground(3)*f1*f2*f8*f9+20//ground(3)*f1*f3*f4*f9+80//ground(9)*f1*f3*f5*f9+80//ground(9)*f1*f3*f6*f9+80//ground(9)*f1*f3*f7*f9+44//ground(9)*f1*f3*f8*f9+20//ground(3)*f1*f4*f5*f9+80//ground(9)*f1*f4*f6*f9+80//ground(9)*f1*f4*f7*f9+44//ground(9)*f1*f4*f8*f9+20//ground(3)*f1*f5*f6*f9+80//ground(9)*f1*f5*f7*f9+44//ground(9)*f1*f5*f8*f9+20//ground(3)*f1*f6*f7*f9+44//ground(9)*f1*f6*f8*f9+8//ground(3)*f1*f7*f8*f9+40//ground(9)*f2*f3*f4*f9+20//ground(3)*f2*f3*f5*f9+20//ground(3)*f2*f3*f6*f9+20//ground(3)*f2*f3*f7*f9+11//ground(3)*f2*f3*f8*f9+20//ground(3)*f2*f4*f5*f9+80//ground(9)*f2*f4*f6*f9+80//ground(9)*f2*f4*f7*f9+44//ground(9)*f2*f4*f8*f9+20//ground(3)*f2*f5*f6*f9+80//ground(9)*f2*f5*f7*f9+44//ground(9)*f2*f5*f8*f9+20//ground(3)*f2*f6*f7*f9+44//ground(9)*f2*f6*f8*f9+8//ground(3)*f2*f7*f8*f9+40//ground(9)*f3*f4*f5*f9+20//ground(3)*f3*f4*f6*f9+20//ground(3)*f3*f4*f7*f9+11//ground(3)*f3*f4*f8*f9+20//ground(3)*f3*f5*f6*f9+80//ground(9)*f3*f5*f7*f9+44//ground(9)*f3*f5*f8*f9+20//ground(3)*f3*f6*f7*f9+44//ground(9)*f3*f6*f8*f9+8//ground(3)*f3*f7*f8*f9+40//ground(9)*f4*f5*f6*f9+20//ground(3)*f4*f5*f7*f9+11//ground(3)*f4*f5*f8*f9+20//ground(3)*f4*f6*f7*f9+44//ground(9)*f4*f6*f8*f9+8//ground(3)*f4*f7*f8*f9+40//ground(9)*f5*f6*f7*f9+11//ground(3)*f5*f6*f8*f9+8//ground(3)*f5*f7*f8*f9, + -124301564+4*f3*f1*f2+4*f2*f3*f4+6*f3*f4*f1+4*f3*f4*f5+6*f1*f2*f4+6*f4*f5*f2+6*f4*f5*f1+4*f4*f5*f6+6*f1*f2*f5+8*f1*f3*f5+6*f2*f3*f5+6*f5*f6*f3+6*f5*f6*f2+6*f5*f6*f1+4*f5*f6*f7+6*f1*f2*f6+8*f1*f3*f6+8*f1*f4*f6+6*f2*f3*f6+8*f2*f4*f6+6*f3*f4*f6+6*f6*f7*f4+6*f6*f7*f3+6*f6*f7*f2+6*f6*f7*f1+4*f6*f7*f8+6*f1*f2*f7+8*f1*f3*f7+8*f1*f4*f7+8*f1*f5*f7+6*f2*f3*f7+8*f2*f4*f7+8*f2*f5*f7+6*f3*f4*f7+8*f3*f5*f7+6*f4*f5*f7+6*f7*f8*f5+6*f7*f8*f4+6*f7*f8*f3+6*f7*f8*f2+6*f7*f8*f1+4//ground(3)*f7*f8*f9+6*f1*f2*f8+8*f1*f3*f8+8*f1*f4*f8+8*f1*f5*f8+8*f1*f6*f8+6*f2*f3*f8+8*f2*f4*f8+8*f2*f5*f8+8*f2*f6*f8+6*f3*f4*f8+8*f3*f5*f8+8*f3*f6*f8+6*f4*f5*f8+8*f4*f6*f8+6*f5*f6*f8+22//ground(9)*f8*f9*f6+22//ground(9)*f8*f9*f5+22//ground(9)*f8*f9*f4+22//ground(9)*f8*f9*f3+22//ground(9)*f8*f9*f2+22//ground(9)*f8*f9*f1+10//ground(3)*f1*f2*f9+40//ground(9)*f1*f3*f9+40//ground(9)*f1*f4*f9+40//ground(9)*f1*f5*f9+40//ground(9)*f1*f6*f9+40//ground(9)*f1*f7*f9+10//ground(3)*f2*f3*f9+40//ground(9)*f2*f4*f9+40//ground(9)*f2*f5*f9+40//ground(9)*f2*f6*f9+40//ground(9)*f2*f7*f9+10//ground(3)*f3*f4*f9+40//ground(9)*f3*f5*f9+40//ground(9)*f3*f6*f9+40//ground(9)*f3*f7*f9+10//ground(3)*f4*f5*f9+40//ground(9)*f4*f6*f9+40//ground(9)*f4*f7*f9+10//ground(3)*f5*f6*f9+40//ground(9)*f5*f7*f9+10//ground(3)*f6*f7*f9, + -518052+3*f1*f2+3*f2*f3+4*f3*f1+3*f3*f4+4*f4*f2+4*f4*f1+3*f4*f5+4*f5*f3+4*f5*f2+4*f5*f1+3*f5*f6+4*f6*f4+4*f6*f3+4*f6*f2+4*f6*f1+3*f6*f7+4*f7*f5+4*f7*f4+4*f7*f3+4*f7*f2+4*f7*f1+3*f7*f8+4*f8*f6+4*f8*f5+4*f8*f4+4*f8*f3+4*f8*f2+4*f8*f1+11//ground(9)*f8*f9+20//ground(9)*f9*f7+20//ground(9)*f9*f6+20//ground(9)*f9*f5+20//ground(9)*f9*f4+20//ground(9)*f9*f3+20//ground(9)*f9*f2+20//ground(9)*f9*f1, + 10//ground(9)*f9+2*f8+2*f7+2*f6+2*f5+2*f4+2*f3+2*f2+2*f1-1131 + ] +end + +### +# Eco function eco5(; np=AbstractAlgebra, ground=np.GF(2^31 - 1), ordering=:lex) _, (x1, x2, x3, x4, x5) = @@ -604,11 +617,76 @@ function eco14(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) x0*x12*x13+x11*x13-12, x12*x13-13, x0+x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12+1 -] + ] +end + +function eco15(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) + _, (x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14) = np.polynomial_ring(ground, ["x$i" for i in 1:15], ordering=ordering) + [ + x0*x1*x14+x1*x2*x14+x2*x3*x14+x3*x4*x14+x4*x5*x14+x5*x6*x14+x6*x7*x14+x7*x8*x14+x8*x9*x14+x9*x10*x14+x10*x11*x14+x11*x12*x14+x12*x13*x14+x0*x14-1, + x0*x2*x14+x1*x3*x14+x2*x4*x14+x3*x5*x14+x4*x6*x14+x5*x7*x14+x6*x8*x14+x7*x9*x14+x8*x10*x14+x9*x11*x14+x10*x12*x14+x11*x13*x14+x1*x14-2, + x0*x3*x14+x1*x4*x14+x2*x5*x14+x3*x6*x14+x4*x7*x14+x5*x8*x14+x6*x9*x14+x7*x10*x14+x8*x11*x14+x9*x12*x14+x10*x13*x14+x2*x14-3, + x0*x4*x14+x1*x5*x14+x2*x6*x14+x3*x7*x14+x4*x8*x14+x5*x9*x14+x6*x10*x14+x7*x11*x14+x8*x12*x14+x9*x13*x14+x3*x14-4, + x0*x5*x14+x1*x6*x14+x2*x7*x14+x3*x8*x14+x4*x9*x14+x5*x10*x14+x6*x11*x14+x7*x12*x14+x8*x13*x14+x4*x14-5, + x0*x6*x14+x1*x7*x14+x2*x8*x14+x3*x9*x14+x4*x10*x14+x5*x11*x14+x6*x12*x14+x7*x13*x14+x5*x14-6, + x0*x7*x14+x1*x8*x14+x2*x9*x14+x3*x10*x14+x4*x11*x14+x5*x12*x14+x6*x13*x14+x6*x14-7, + x0*x8*x14+x1*x9*x14+x2*x10*x14+x3*x11*x14+x4*x12*x14+x5*x13*x14+x7*x14-8, + x0*x9*x14+x1*x10*x14+x2*x11*x14+x3*x12*x14+x4*x13*x14+x8*x14-9, + x0*x10*x14+x1*x11*x14+x2*x12*x14+x3*x13*x14+x9*x14-10, + x0*x11*x14+x1*x12*x14+x2*x13*x14+x10*x14-11, + x0*x12*x14+x1*x13*x14+x11*x14-12, + x0*x13*x14+x12*x14-13, + x13*x14-14, + x0+x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12+x13+1 + ] +end + +# Source: +# https://github.com/JuliaHomotopyContinuation/PolynomialTestSystems.jl/blob/master/src/rps10.jl +function rps10(; tol=0, np=AbstractAlgebra, ground=np.QQ, ordering=:lex) + _, (g1, g2, g3, p1, p2, p3, q0, q1, q2, q3) = np.polynomial_ring(ground, ["g1", "g2", "g3", "p1", "p2", "p3", "q0", "q1", "q2", "q3",], ordering=ordering) + equations = [ + -rationalize(BigInt, rationalize(BigInt, 0.1279703687075118, tol=tol), tol=tol)*g1^2 - rationalize(BigInt, rationalize(BigInt, 0.48596123125526264, tol=tol), tol=tol)*g1*g2 + rationalize(BigInt, 0.30699556370717496, tol=tol)*g2^2 + rationalize(BigInt, 0.3778977698527674, tol=tol)*g1*g3 - rationalize(BigInt, 0.23404544076569642, tol=tol)*g2*g3 + rationalize(BigInt, 0.01563626178508072, tol=tol)*g3^2 + rationalize(BigInt, 0.327228678790004, tol=tol)*g1^2*p1 + rationalize(BigInt, 0.8426829275672494, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.6075645757034159, tol=tol)*g2^2*p1 - rationalize(BigInt, 1.1371405598667543, tol=tol)*g1*g3*p1 + rationalize(BigInt, 0.229293271620915, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.21948911177437957, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.2075154964282774, tol=tol)*g1^2*p1^2 - rationalize(BigInt, 0.37702968479068544, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.16688906819159421, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 0.7986954318323025, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.866826144775651, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.37440456461987165, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 1.5614616440131446, tol=tol)*g1^2*p2 - rationalize(BigInt, 1.7388380675822595, tol=tol)*g1*g2*p2 + rationalize(BigInt, 0.06790915713070725, tol=tol)*g2^2*p2 - rationalize(BigInt, 0.4309121044684771, tol=tol)*g1*g3*p2 + rationalize(BigInt, 0.9086272006283425, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.2764931751394603, tol=tol)*g3^2*p2 - rationalize(BigInt, 1.8163349832174116, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 0.9167144057621401, tol=tol)*g1*g2*p1*p2 + rationalize(BigInt, 1.0203368504488892, tol=tol)*g2^2*p1*p2 - rationalize(BigInt, 0.23194646823111892, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.539670777307627, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.7959981327685224, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.08717268867521591, tol=tol)*g1^2*p2^2 + rationalize(BigInt, 0.9504154644263471, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.48206756571420756, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.065062423127697, tol=tol)*g1*g3*p2^2 + rationalize(BigInt, 0.1209952909274163, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.3948948770389917, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.289766299873838, tol=tol)*g1^2*p3 - rationalize(BigInt, 1.2778927965251532, tol=tol)*g1*g2*p3 + rationalize(BigInt, 0.9087896778886251, tol=tol)*g2^2*p3 - rationalize(BigInt, 0.5812612591154215, tol=tol)*g1*g3*p3 - rationalize(BigInt, 0.7595904624983555, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.5084892760496751, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.3268802641947883, tol=tol)*g1^2*p1*p3 + rationalize(BigInt, 0.657630238424344, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 1.1093919363972093, tol=tol)*g2^2*p1*p3 + rationalize(BigInt, 0.4551393419480071, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 1.8553852513069364, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 0.7825116722024211, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.5810469298461638, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 1.1557382363783264, tol=tol)*g1*g2*p2*p3 - rationalize(BigInt, 0.11367961187637783, tol=tol)*g2^2*p2*p3 + rationalize(BigInt, 1.7077140933509898, tol=tol)*g1*g3*p2*p3 - rationalize(BigInt, 0.36547942767108677, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 0.4673673179697859, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.12034280775306151, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.5733857796356615, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.6489566339058018, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.2663669912953945, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 0.9878214357030672, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.7692994416588633, tol=tol)*g3^2*p3^2 - rationalize(BigInt, 0.19466145678474384, tol=tol)*q0 - rationalize(BigInt, 0.7153041427190404, tol=tol)*p1*q0 - rationalize(BigInt, 1.3528776260043915, tol=tol)*p2*q0 - rationalize(BigInt, 1.7070452538121381, tol=tol)*p3*q0 - rationalize(BigInt, 1.0516635822669562, tol=tol)*q1 + rationalize(BigInt, 1.2244185478631853, tol=tol)*p1*q1 - rationalize(BigInt, 0.05844567698552443, tol=tol)*p2*q1 - rationalize(BigInt, 0.37706149953585283, tol=tol)*p3*q1 + rationalize(BigInt, 0.580102254517945, tol=tol)*q2 + rationalize(BigInt, 1.2898860704586343, tol=tol)*p1*q2 - rationalize(BigInt, 0.6655948497180294, tol=tol)*p2*q2 + rationalize(BigInt, 0.697758704890495, tol=tol)*p3*q2 - rationalize(BigInt, 0.042921436747585445, tol=tol)*q3 + rationalize(BigInt, 0.5172073855756967, tol=tol)*p1*q3 + rationalize(BigInt, 0.6917094054122289, tol=tol)*p2*q3 - rationalize(BigInt, 1.4579672250860476, tol=tol)*p3*q3, + rationalize(BigInt, 0.16011034303688113, tol=tol)*g1^2 - rationalize(BigInt, 0.9005468824403076, tol=tol)*g1*g2 - rationalize(BigInt, 0.3519015838689263, tol=tol)*g2^2 + rationalize(BigInt, 0.5202586158306898, tol=tol)*g1*g3 + rationalize(BigInt, 0.908682123022068, tol=tol)*g2*g3 - rationalize(BigInt, 0.4464562170645777, tol=tol)*g3^2 - rationalize(BigInt, 0.13844524415679324, tol=tol)*g1^2*p1 + rationalize(BigInt, 1.5568085644333742, tol=tol)*g1*g2*p1 + rationalize(BigInt, 1.6863862382239232, tol=tol)*g2^2*p1 - rationalize(BigInt, 1.7409458121154344, tol=tol)*g1*g3*p1 - rationalize(BigInt, 0.13872356093602894, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.5159047084859331, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.2741643484200128, tol=tol)*g1^2*p1^2 - rationalize(BigInt, 0.34212012775550327, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.07542436599114127, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 0.37458987278720324, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.4782561996467687, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.3495887144111541, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 0.41377445473869573, tol=tol)*g1^2*p2 - rationalize(BigInt, 1.5789383736211624, tol=tol)*g1*g2*p2 + rationalize(BigInt, 1.268319517294935, tol=tol)*g2^2*p2 + rationalize(BigInt, 0.6163793667190677, tol=tol)*g1*g3*p2 - rationalize(BigInt, 0.43374574206406646, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.2061458017243186, tol=tol)*g3^2*p2 + rationalize(BigInt, 0.14555549639831628, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 1.1674745895517964, tol=tol)*g1*g2*p1*p2 - rationalize(BigInt, 0.9428064489876502, tol=tol)*g2^2*p1*p2 + rationalize(BigInt, 0.0024916775818734295, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.5291621555283466, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.7972509525893339, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.1807885464109201, tol=tol)*g1^2*p2^2 + rationalize(BigInt, 0.9404541869824675, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.5780030515551372, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.0257418447585547, tol=tol)*g1*g3*p2^2 + rationalize(BigInt, 0.09251778173989315, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.39721450514421713, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.40272988912109214, tol=tol)*g1^2*p3 - rationalize(BigInt, 0.8272484673958682, tol=tol)*g1*g2*p3 + rationalize(BigInt, 1.057139636924469, tol=tol)*g2^2*p3 - rationalize(BigInt, 0.12353226665002319, tol=tol)*g1*g3*p3 - rationalize(BigInt, 2.5741855761862396, tol=tol)*g2*g3*p3 + rationalize(BigInt, 1.560474007685759, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.6150996832616941, tol=tol)*g1^2*p1*p3 + rationalize(BigInt, 0.09937192239106099, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 0.8226042775491553, tol=tol)*g2^2*p1*p3 + rationalize(BigInt, 0.4732438203631739, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 1.6946050580334677, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 0.20750459428746135, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.7556396990592089, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 1.412614951501404, tol=tol)*g1*g2*p2*p3 - rationalize(BigInt, 0.09676545515565128, tol=tol)*g2^2*p2*p3 - rationalize(BigInt, 0.9781576342585658, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 2.5006617995144724, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 0.6588742439035575, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.09337580200909272, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.5983340592269643, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.6534274175462785, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.6511519719713513, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 0.5707739813866619, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.7468032195553712, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 0.6382474578966228, tol=tol)*q0 - rationalize(BigInt, 1.032036285581197, tol=tol)*p1*q0 - rationalize(BigInt, 1.4759481703093122, tol=tol)*p2*q0 - rationalize(BigInt, 3.0203435337313205, tol=tol)*p3*q0 - rationalize(BigInt, 0.22812438675350769, tol=tol)*q1 - rationalize(BigInt, 0.2157590670168509, tol=tol)*p1*q1 - rationalize(BigInt, 0.1270558344695696, tol=tol)*p2*q1 - rationalize(BigInt, 0.5148593639524484, tol=tol)*p3*q1 + rationalize(BigInt, 1.3667793800860086, tol=tol)*q2 - rationalize(BigInt, 0.06171123442924746, tol=tol)*p1*q2 - rationalize(BigInt, 0.7314954155886625, tol=tol)*p2*q2 + rationalize(BigInt, 0.7189348075213543, tol=tol)*p3*q2 - rationalize(BigInt, 0.902118536026858, tol=tol)*q3 + rationalize(BigInt, 0.43214823742186254, tol=tol)*p1*q3 + rationalize(BigInt, 0.6677624868260497, tol=tol)*p2*q3 + rationalize(BigInt, 0.5162571144422815, tol=tol)*p3*q3, + rationalize(BigInt, 0.20816475809219404, tol=tol)*g1^2 - rationalize(BigInt, 0.44624795696445435, tol=tol)*g1*g2 + rationalize(BigInt, 0.1573457781818856, tol=tol)*g2^2 + rationalize(BigInt, 0.2432511536576595, tol=tol)*g1*g3 - rationalize(BigInt, 0.4587424991969163, tol=tol)*g2*g3 - rationalize(BigInt, 0.048748564896809544, tol=tol)*g3^2 - rationalize(BigInt, 0.542424299098038, tol=tol)*g1^2*p1 + rationalize(BigInt, 0.412606879197033, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.026228493490255755, tol=tol)*g2^2*p1 - rationalize(BigInt, 0.7135454436169615, tol=tol)*g1*g3*p1 + rationalize(BigInt, 0.38566725023570736, tol=tol)*g2*g3*p1 + rationalize(BigInt, 0.06641935708182738, tol=tol)*g3^2*p1 + rationalize(BigInt, 0.1946156279601214, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 1.0726514255671113, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.29746151974577967, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 0.3474150051655493, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 1.5662794253637933, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.10284589178565828, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 0.8655281158446179, tol=tol)*g1^2*p2 - rationalize(BigInt, 1.4227007533612923, tol=tol)*g1*g2*p2 - rationalize(BigInt, 0.3561608986253729, tol=tol)*g2^2*p2 - rationalize(BigInt, 0.7002053827479838, tol=tol)*g1*g3*p2 + rationalize(BigInt, 0.1451263721376322, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.4446427929457582, tol=tol)*g3^2*p2 - rationalize(BigInt, 0.35089234105147404, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 1.8637325747105546, tol=tol)*g1*g2*p1*p2 - rationalize(BigInt, 0.7643910878410862, tol=tol)*g2^2*p1*p2 + rationalize(BigInt, 0.7421389633104346, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.8043890896223826, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 1.1152834288925604, tol=tol)*g3^2*p1*p2 - rationalize(BigInt, 0.05058692105297476, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.8545531093164939, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.25045809562785276, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.482438556873845, tol=tol)*g1*g3*p2^2 - rationalize(BigInt, 0.2760311985894717, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.30104501668082756, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.41615153726461007, tol=tol)*g1^2*p3 - rationalize(BigInt, 1.6031132124173149, tol=tol)*g1*g2*p3 + rationalize(BigInt, 1.1652768530802575, tol=tol)*g2^2*p3 + rationalize(BigInt, 0.1236694347662175, tol=tol)*g1*g3*p3 - rationalize(BigInt, 0.033510271732486586, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.6625023868605743, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.06941899872446193, tol=tol)*g1^2*p1*p3 - rationalize(BigInt, 0.5612725019588681, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 1.4835363108262836, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 0.8310204341509994, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 1.3650887611787323, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 1.4141173121018216, tol=tol)*g3^2*p1*p3 - rationalize(BigInt, 0.2915853970368523, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 1.2521117933146961, tol=tol)*g1*g2*p2*p3 + rationalize(BigInt, 0.38706376702247, tol=tol)*g2^2*p2*p3 + rationalize(BigInt, 1.2309129178715645, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 2.001338697637118, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 0.09547836998561768, tol=tol)*g3^2*p2*p3 - rationalize(BigInt, 0.14402870690714664, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.2180983162506176, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.5479196153736324, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 1.1350235517082958, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 1.2902482267743214, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.40389090846648584, tol=tol)*g3^2*p3^2 - rationalize(BigInt, 0.31676197137727014, tol=tol)*q0 + rationalize(BigInt, 0.44977644852595483, tol=tol)*p1*q0 - rationalize(BigInt, 0.06472442427348668, tol=tol)*p2*q0 - rationalize(BigInt, 2.2439307772054415, tol=tol)*p3*q0 - rationalize(BigInt, 0.5547165223690258, tol=tol)*q1 + rationalize(BigInt, 0.23831878651082344, tol=tol)*p1*q1 + rationalize(BigInt, 0.031977776730485255, tol=tol)*p2*q1 + rationalize(BigInt, 0.16687455406564522, tol=tol)*p3*q1 + rationalize(BigInt, 0.9423377906275198, tol=tol)*q2 + rationalize(BigInt, 1.376589178886685, tol=tol)*p1*q2 + rationalize(BigInt, 0.5306523901876015, tol=tol)*p2*q2 + rationalize(BigInt, 0.4754891181933043, tol=tol)*p3*q2 + rationalize(BigInt, 0.09673230093655334, tol=tol)*q3 + rationalize(BigInt, 0.0892904130224598, tol=tol)*p1*q3 + rationalize(BigInt, 0.943551163213123, tol=tol)*p2*q3 - rationalize(BigInt, 1.2527250130712726, tol=tol)*p3*q3, + -rationalize(BigInt, 0.04095049824628835, tol=tol)*g1^2 + rationalize(BigInt, 0.043116025511842154, tol=tol)*g1*g2 + rationalize(BigInt, 0.003940499198786224, tol=tol)*g2^2 + rationalize(BigInt, 0.7629770334036455, tol=tol)*g1*g3 - rationalize(BigInt, 0.8492350760146794, tol=tol)*g2*g3 - rationalize(BigInt, 0.2784174783424625, tol=tol)*g3^2 + rationalize(BigInt, 0.4281444292173086, tol=tol)*g1^2*p1 - rationalize(BigInt, 0.8828960936117035, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.5676682886279524, tol=tol)*g2^2*p1 - rationalize(BigInt, 1.3924527881029736, tol=tol)*g1*g3*p1 - rationalize(BigInt, 0.08671339002537767, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.7256104095984146, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.5422313181564682, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 0.4871946471731439, tol=tol)*g1*g2*p1^2 + rationalize(BigInt, 0.33193585698170985, tol=tol)*g2^2*p1^2 - rationalize(BigInt, 0.10273772900088107, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.6624874115365778, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.21029546117475836, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 1.1356911567255628, tol=tol)*g1^2*p2 - rationalize(BigInt, 1.222100685178249, tol=tol)*g1*g2*p2 - rationalize(BigInt, 0.09334002143332033, tol=tol)*g2^2*p2 - rationalize(BigInt, 1.6524959396527132, tol=tol)*g1*g3*p2 + rationalize(BigInt, 1.5569725124184146, tol=tol)*g2*g3*p2 + rationalize(BigInt, 0.7669386068453008, tol=tol)*g3^2*p2 - rationalize(BigInt, 1.5587675264538823, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 1.1317581527003464, tol=tol)*g1*g2*p1*p2 + rationalize(BigInt, 0.01829080736739283, tol=tol)*g2^2*p1*p2 + rationalize(BigInt, 1.0020439814840232, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.7984049760283556, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 1.5404767190864894, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.4331904808414006, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.1389285705830233, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.012183710127155694, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 0.23769385136664706, tol=tol)*g1*g3*p2^2 + rationalize(BigInt, 0.24382837068218804, tol=tol)*g2*g3*p2^2 - rationalize(BigInt, 0.4210067707142449, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.21198555697618326, tol=tol)*g1^2*p3 - rationalize(BigInt, 0.01647709154129892, tol=tol)*g1*g2*p3 - rationalize(BigInt, 0.18945218115272705, tol=tol)*g2^2*p3 + rationalize(BigInt, 0.77528301920843, tol=tol)*g1*g3*p3 - rationalize(BigInt, 2.0514046696465, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.10432028494512646, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.1676311045685404, tol=tol)*g1^2*p1*p3 - rationalize(BigInt, 1.325546381572095, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 0.8078478514339609, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 0.9669176278885212, tol=tol)*g1*g3*p1*p3 - rationalize(BigInt, 0.36872926793739896, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 0.6402167468654205, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.6297207100844667, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 2.067771321161895, tol=tol)*g1*g2*p2*p3 - rationalize(BigInt, 0.17862819697751522, tol=tol)*g2^2*p2*p3 + rationalize(BigInt, 0.020391323549034297, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 2.777563669744398, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 0.45109251310695153, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.10904083731506761, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.3482660765901206, tol=tol)*g1*g2*p3^2 - rationalize(BigInt, 0.31975214685455416, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.34043158036752813, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 0.9063157822187657, tol=tol)*g2*g3*p3^2 + rationalize(BigInt, 0.21071130953948652, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 0.31542747738996463, tol=tol)*q0 - rationalize(BigInt, 0.27020230824684643, tol=tol)*p1*q0 - rationalize(BigInt, 1.8092897421375431, tol=tol)*p2*q0 - rationalize(BigInt, 0.12685366076858268, tol=tol)*p3*q0 - rationalize(BigInt, 0.9721054060313574, tol=tol)*q1 + rationalize(BigInt, 1.4332583965298273, tol=tol)*p1*q1 - rationalize(BigInt, 0.3658292969614953, tol=tol)*p2*q1 - rationalize(BigInt, 0.458292808629767, tol=tol)*p3*q1 + rationalize(BigInt, 1.1057480001700448, tol=tol)*q2 + rationalize(BigInt, 0.649216154064302, tol=tol)*p1*q2 + rationalize(BigInt, 0.1435470147844548, tol=tol)*p2*q2 + rationalize(BigInt, 1.8049686045262234, tol=tol)*p3*q2 + rationalize(BigInt, 0.3619641675513017, tol=tol)*q3 + rationalize(BigInt, 1.0386298649000567, tol=tol)*p1*q3 - rationalize(BigInt, 0.2739870731830222, tol=tol)*p2*q3 - rationalize(BigInt, 0.38992289294835114, tol=tol)*p3*q3, + -rationalize(BigInt, 0.41615764608945516, tol=tol)*g1^2 - rationalize(BigInt, 1.2331171001793817, tol=tol)*g1*g2 + rationalize(BigInt, 0.10423594498637195, tol=tol)*g2^2 + rationalize(BigInt, 0.4451741240918564, tol=tol)*g1*g3 - rationalize(BigInt, 0.0807794759847403, tol=tol)*g2*g3 + rationalize(BigInt, 0.015584822151867354, tol=tol)*g3^2 + rationalize(BigInt, 0.5169791211840113, tol=tol)*g1^2*p1 - rationalize(BigInt, 0.3281633186673521, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.10768082059655043, tol=tol)*g2^2*p1 - rationalize(BigInt, 1.78387184821123, tol=tol)*g1*g3*p1 + rationalize(BigInt, 0.1962385955438586, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.0932755727182936, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.12307658314371513, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 1.3649915585405705, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.01641144275933561, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 1.282522294958988, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.13118389677242223, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.13948802590305073, tol=tol)*g3^2*p1^2 - rationalize(BigInt, 0.4784260518169776, tol=tol)*g1^2*p2 - rationalize(BigInt, 2.092134198423298, tol=tol)*g1*g2*p2 - rationalize(BigInt, 0.2652478875380973, tol=tol)*g2^2*p2 - rationalize(BigInt, 0.9322070346912057, tol=tol)*g1*g3*p2 + rationalize(BigInt, 0.28229645793462466, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.07438003692790207, tol=tol)*g3^2*p2 + rationalize(BigInt, 0.1376969425780227, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 1.3462021315216954, tol=tol)*g1*g2*p1*p2 - rationalize(BigInt, 0.35831006800801096, tol=tol)*g2^2*p1*p2 - rationalize(BigInt, 0.3236078908735904, tol=tol)*g1*g3*p1*p2 - rationalize(BigInt, 0.23312973570099904, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.2206131254299883, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.03212463900566726, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.543299069419884, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.1081313237618179, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.8348908578280814, tol=tol)*g1*g3*p2^2 - rationalize(BigInt, 0.3379484782876818, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.07600668475615065, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.6002572265406737, tol=tol)*g1^2*p3 + rationalize(BigInt, 0.1802055521069689, tol=tol)*g1*g2*p3 + rationalize(BigInt, 1.5644331744196656, tol=tol)*g2^2*p3 - rationalize(BigInt, 0.5267676534246675, tol=tol)*g1*g3*p3 - rationalize(BigInt, 1.676157338774887, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.4008307913692461, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.5875157312206984, tol=tol)*g1^2*p1*p3 - rationalize(BigInt, 0.26794777918572443, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 1.8161766879761405, tol=tol)*g2^2*p1*p3 + rationalize(BigInt, 0.08217873131336825, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 0.41625228622759664, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 1.228660956755442, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.801736157469905, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 0.06119905069237429, tol=tol)*g1*g2*p2*p3 + rationalize(BigInt, 0.5320140756032581, tol=tol)*g2^2*p2*p3 - rationalize(BigInt, 0.5120321678148483, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 1.3994959245799465, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 1.3337502330731632, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.09095194413804787, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.8216924891206866, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.12454276652115351, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.5523685628690934, tol=tol)*g1*g3*p3^2 + rationalize(BigInt, 0.20676458151525956, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.2154947106592014, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 0.29633687895121585, tol=tol)*q0 - rationalize(BigInt, 0.5313843690622682, tol=tol)*p1*q0 + rationalize(BigInt, 0.8180539762829769, tol=tol)*p2*q0 - rationalize(BigInt, 2.5655211923295855, tol=tol)*p3*q0 - rationalize(BigInt, 1.2602089223582702, tol=tol)*q1 + rationalize(BigInt, 1.1609512634985952, tol=tol)*p1*q1 - rationalize(BigInt, 1.5289512288758575, tol=tol)*p2*q1 - rationalize(BigInt, 0.17424561505966216, tol=tol)*p3*q1 + rationalize(BigInt, 0.10364901876603111, tol=tol)*q2 - rationalize(BigInt, 0.013973408764994696, tol=tol)*p1*q2 - rationalize(BigInt, 0.30080374272031296, tol=tol)*p2*q2 + rationalize(BigInt, 1.5473286276087392, tol=tol)*p3*q2 - rationalize(BigInt, 0.04276145686338927, tol=tol)*q3 + rationalize(BigInt, 0.12497482938060817, tol=tol)*p1*q3 + rationalize(BigInt, 0.06337974500071619, tol=tol)*p2*q3 - rationalize(BigInt, 1.1223229062458282, tol=tol)*p3*q3, + rationalize(BigInt, 0.0995239208560676, tol=tol)*g1^2 - rationalize(BigInt, 0.4069835646127759, tol=tol)*g1*g2 + rationalize(BigInt, 0.2822661867004282, tol=tol)*g2^2 + rationalize(BigInt, 0.8451107786883508, tol=tol)*g1*g3 - rationalize(BigInt, 0.5316708978452792, tol=tol)*g2*g3 - rationalize(BigInt, 0.8798108963881374, tol=tol)*g3^2 - rationalize(BigInt, 0.08841286657967666, tol=tol)*g1^2*p1 - rationalize(BigInt, 0.5437440767827946, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.8310187547943032, tol=tol)*g2^2*p1 - rationalize(BigInt, 2.300828301805621, tol=tol)*g1*g3*p1 + rationalize(BigInt, 1.7576212044508612, tol=tol)*g2*g3*p1 + rationalize(BigInt, 0.8123567734335738, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.06820768665581543, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 1.3043060864108098, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.009054065062096384, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 1.3077574118576432, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.06768474224643237, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.07726175171791182, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 0.21964796928975452, tol=tol)*g1^2*p2 - rationalize(BigInt, 0.7213869971382741, tol=tol)*g1*g2*p2 + rationalize(BigInt, 0.06428880062023586, tol=tol)*g2^2*p2 + rationalize(BigInt, 0.6769693907722261, tol=tol)*g1*g3*p2 + rationalize(BigInt, 1.0938889186830445, tol=tol)*g2*g3*p2 + rationalize(BigInt, 1.033778176369894, tol=tol)*g3^2*p2 + rationalize(BigInt, 0.04579106142198317, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 1.6136177673887118, tol=tol)*g1*g2*p1*p2 - rationalize(BigInt, 0.08313705215573315, tol=tol)*g2^2*p1*p2 - rationalize(BigInt, 0.3180870028357637, tol=tol)*g1*g3*p1*p2 - rationalize(BigInt, 0.1323253404673372, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.03734599073374998, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.06270407236710761, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.19162792586107563, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.009068232422623026, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.9648502282295741, tol=tol)*g1*g3*p2^2 - rationalize(BigInt, 0.09696983966017489, tol=tol)*g2*g3*p2^2 - rationalize(BigInt, 0.053635839944484585, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.09136896607569936, tol=tol)*g1^2*p3 - rationalize(BigInt, 1.5831271499881143, tol=tol)*g1*g2*p3 + rationalize(BigInt, 1.1586203238882382, tol=tol)*g2^2*p3 + rationalize(BigInt, 1.561944037084699, tol=tol)*g1*g3*p3 + rationalize(BigInt, 0.5373765622781439, tol=tol)*g2*g3*p3 - rationalize(BigInt, 0.7510078085771675, tol=tol)*g3^2*p3 + rationalize(BigInt, 0.03313601431114031, tol=tol)*g1^2*p1*p3 + rationalize(BigInt, 0.999575794109116, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 0.0005673645755714211, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 1.8768450822200746, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 0.15574381848783894, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 0.03370337888671173, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.040671941002624216, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 2.5271478321380254, tol=tol)*g1*g2*p2*p3 - rationalize(BigInt, 0.11221443152128503, tol=tol)*g2^2*p2*p3 + rationalize(BigInt, 0.5426249873354888, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 0.01844664972668835, tol=tol)*g2*g3*p2*p3 + rationalize(BigInt, 0.07154249051866082, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.005503614288707821, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 1.1126781605497342, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.01812229748471941, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.657092816371931, tol=tol)*g1*g3*p3^2 + rationalize(BigInt, 0.029285097413742515, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.02362591177342723, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 0.49802078883164164, tol=tol)*q0 - rationalize(BigInt, 1.5549626616482004, tol=tol)*p1*q0 - rationalize(BigInt, 1.3177149462798845, tol=tol)*p2*q0 - rationalize(BigInt, 0.49898148138677, tol=tol)*p3*q0 - rationalize(BigInt, 0.12338824573791841, tol=tol)*q1 - rationalize(BigInt, 0.06111510706623446, tol=tol)*p1*q1 - rationalize(BigInt, 0.04157014428073322, tol=tol)*p2*q1 - rationalize(BigInt, 0.007996832327295606, tol=tol)*p3*q1 + rationalize(BigInt, 0.3953545453627241, tol=tol)*q2 + rationalize(BigInt, 1.168253359907005, tol=tol)*p1*q2 + rationalize(BigInt, 0.1289788318383644, tol=tol)*p2*q2 + rationalize(BigInt, 1.6166074402033737, tol=tol)*p3*q2 - rationalize(BigInt, 1.1634376524391858, tol=tol)*q3 + rationalize(BigInt, 1.1753697910765462, tol=tol)*p1*q3 + rationalize(BigInt, 1.303746265623441, tol=tol)*p2*q3 - rationalize(BigInt, 0.9550529463247988, tol=tol)*p3*q3, + -rationalize(BigInt, 0.43946259392041137, tol=tol)*g1^2 - rationalize(BigInt, 0.2794194400312886, tol=tol)*g1*g2 + rationalize(BigInt, 0.28633513817241923, tol=tol)*g2^2 + rationalize(BigInt, 0.4837842932289669, tol=tol)*g1*g3 - rationalize(BigInt, 0.2789447622513483, tol=tol)*g2*g3 + rationalize(BigInt, 0.00840391192868436, tol=tol)*g3^2 - rationalize(BigInt, 1.5744202005495247, tol=tol)*g1^2*p1 - rationalize(BigInt, 0.2861663506179279, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.7386941869051702, tol=tol)*g2^2*p1 + rationalize(BigInt, 0.5331769017373268, tol=tol)*g1*g3*p1 + rationalize(BigInt, 0.3754313238644043, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.49557272342979514, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.1697121445535322, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 0.17649121044520624, tol=tol)*g1*g2*p1^2 + rationalize(BigInt, 0.230772384999563, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 1.5487222154552227, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 1.1549190062177301, tol=tol)*g2*g3*p1^2 - rationalize(BigInt, 0.061060240446030825, tol=tol)*g3^2*p1^2 + rationalize(BigInt, 0.3428887153466959, tol=tol)*g1^2*p2 - rationalize(BigInt, 2.0520172954900926, tol=tol)*g1*g2*p2 + rationalize(BigInt, 0.2548434377395737, tol=tol)*g2^2*p2 - rationalize(BigInt, 1.1661156986017325, tol=tol)*g1*g3*p2 + rationalize(BigInt, 1.1418016311188108, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.03717326023724154, tol=tol)*g3^2*p2 - rationalize(BigInt, 1.1298456541690676, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 2.0395244570443807, tol=tol)*g1*g2*p1*p2 - rationalize(BigInt, 0.46158802071478294, tol=tol)*g2^2*p1*p2 - rationalize(BigInt, 0.7937227851031279, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 1.3925863980743391, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 1.5914336748838505, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.5461657368466324, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.40076456254394, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.5789448963236655, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 1.2606913391501393, tol=tol)*g1*g3*p2^2 - rationalize(BigInt, 0.8839870841626388, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.03277915947703309, tol=tol)*g3^2*p2^2 - rationalize(BigInt, 0.8186969313136523, tol=tol)*g1^2*p3 - rationalize(BigInt, 0.02925076747851844, tol=tol)*g1*g2*p3 + rationalize(BigInt, 0.7392135200738452, tol=tol)*g2^2*p3 + rationalize(BigInt, 0.12848993732517067, tol=tol)*g1*g3*p3 - rationalize(BigInt, 0.9246721961161062, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.34711806557393554, tol=tol)*g3^2*p3 - rationalize(BigInt, 1.3114980542204153, tol=tol)*g1^2*p1*p3 + rationalize(BigInt, 0.7458693987541652, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 1.309443056027262, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 0.5609050703954811, tol=tol)*g1*g3*p1*p3 - rationalize(BigInt, 0.560863866588139, tol=tol)*g2*g3*p1*p3 + rationalize(BigInt, 0.0020549981931533984, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.21040044489655793, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 2.094674294769259, tol=tol)*g1*g2*p2*p3 + rationalize(BigInt, 0.9014935747766074, tol=tol)*g2^2*p2*p3 - rationalize(BigInt, 0.7741828342315165, tol=tol)*g1*g3*p2*p3 + rationalize(BigInt, 1.0179705141740856, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 1.1118940196731655, tol=tol)*g3^2*p2*p3 - rationalize(BigInt, 0.37645359229310016, tol=tol)*g1^2*p3^2 + rationalize(BigInt, 0.22427335209873375, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.34817251132410243, tol=tol)*g2^2*p3^2 - rationalize(BigInt, 0.2880308763050832, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 0.27093192205509137, tol=tol)*g2*g3*p3^2 + rationalize(BigInt, 0.028281080968997733, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 0.14472354381930777, tol=tol)*q0 + rationalize(BigInt, 1.3312987370741496, tol=tol)*p1*q0 - rationalize(BigInt, 0.560558892849028, tol=tol)*p2*q0 - rationalize(BigInt, 0.26763465433412853, tol=tol)*p3*q0 + rationalize(BigInt, 0.34474968158768826, tol=tol)*q1 + rationalize(BigInt, 1.1967487089081013, tol=tol)*p1*q1 - rationalize(BigInt, 0.5416788729536276, tol=tol)*p2*q1 + rationalize(BigInt, 0.35732161373948407, tol=tol)*p3*q1 + rationalize(BigInt, 0.4086834090152563, tol=tol)*q2 + rationalize(BigInt, 0.9057045158335053, tol=tol)*p1*q2 + rationalize(BigInt, 0.790785041402257, tol=tol)*p2*q2 + rationalize(BigInt, 0.25330644272284614, tol=tol)*p3*q2 - rationalize(BigInt, 0.3854162586341408, tol=tol)*q3 - rationalize(BigInt, 0.04738889206888738, tol=tol)*p1*q3 + rationalize(BigInt, 1.2360880142692436, tol=tol)*p2*q3 - rationalize(BigInt, 0.03146357181747231, tol=tol)*p3*q3, + -rationalize(BigInt, 0.3364985136694329, tol=tol)*g1^2 - rationalize(BigInt, 0.6220713377668979, tol=tol)*g1*g2 + rationalize(BigInt, 0.30253663989085705, tol=tol)*g2^2 + rationalize(BigInt, 0.09691241616903694, tol=tol)*g1*g3 - rationalize(BigInt, 0.23475287081412524, tol=tol)*g2*g3 + rationalize(BigInt, 0.03759204880218851, tol=tol)*g3^2 - rationalize(BigInt, 1.0655428995245861, tol=tol)*g1^2*p1 + rationalize(BigInt, 1.2015525036653503, tol=tol)*g1*g2*p1 + rationalize(BigInt, 0.7601103825805371, tol=tol)*g2^2*p1 - rationalize(BigInt, 0.19738187400246698, tol=tol)*g1*g3*p1 + rationalize(BigInt, 0.6151569823342218, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.19896444557080828, tol=tol)*g3^2*p1 + rationalize(BigInt, 0.12867336914719074, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 1.2422164684570598, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.32698199621342966, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 0.988903111633841, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 0.015998020944011523, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.19830862706623895, tol=tol)*g3^2*p1^2 - rationalize(BigInt, 0.36506543203523656, tol=tol)*g1^2*p2 - rationalize(BigInt, 1.8191248166962, tol=tol)*g1*g2*p2 - rationalize(BigInt, 0.04702353062492582, tol=tol)*g2^2*p2 + rationalize(BigInt, 0.22650992191881464, tol=tol)*g1*g3*p2 + rationalize(BigInt, 0.6757394159618821, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.20784006514510822, tol=tol)*g3^2*p2 - rationalize(BigInt, 1.3823450011564475, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 0.10921823662847378, tol=tol)*g1*g2*p1*p2 + rationalize(BigInt, 0.9411204746791397, tol=tol)*g2^2*p1*p2 + rationalize(BigInt, 0.6416176172245012, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.6050178988297725, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.4412245264773078, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.06735301456610396, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 0.8585408362609629, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.3090762258515019, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 0.4001418483728859, tol=tol)*g1*g3*p2^2 + rationalize(BigInt, 0.4779675484647562, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.24172321128539795, tol=tol)*g3^2*p2^2 - rationalize(BigInt, 0.5137007261636957, tol=tol)*g1^2*p3 - rationalize(BigInt, 0.9820327320175907, tol=tol)*g1*g2*p3 + rationalize(BigInt, 0.926095293449879, tol=tol)*g2^2*p3 - rationalize(BigInt, 0.7003487284409724, tol=tol)*g1*g3*p3 - rationalize(BigInt, 0.9430374895060032, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.08868217302851986, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.8028419556001375, tol=tol)*g1^2*p1*p3 + rationalize(BigInt, 1.4979362188623169, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 0.6798639272820932, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 1.0625669164194511, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 1.6499737530190743, tol=tol)*g2*g3*p1*p3 + rationalize(BigInt, 0.12297802831804432, tol=tol)*g3^2*p1*p3 - rationalize(BigInt, 0.2829951083769471, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 1.67180387717421, tol=tol)*g1*g2*p2*p3 + rationalize(BigInt, 0.22862840829725906, tol=tol)*g2^2*p2*p3 - rationalize(BigInt, 0.45573353517584536, tol=tol)*g1*g3*p2*p3 - rationalize(BigInt, 0.030399560249614144, tol=tol)*g2*g3*p2*p3 + rationalize(BigInt, 0.05436670007968804, tol=tol)*g3^2*p2*p3 - rationalize(BigInt, 0.1960263837132947, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.3836756321960968, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.6360582220649316, tol=tol)*g2^2*p3^2 - rationalize(BigInt, 0.5887612632609552, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 0.49396556940876774, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.4400318383516369, tol=tol)*g3^2*p3^2 - rationalize(BigInt, 0.0036301750236126602, tol=tol)*q0 + rationalize(BigInt, 0.5043969625148573, tol=tol)*p1*q0 + rationalize(BigInt, 0.6199290278052706, tol=tol)*p2*q0 - rationalize(BigInt, 0.5010767403147031, tol=tol)*p3*q0 + rationalize(BigInt, 0.27845755063810307, tol=tol)*q1 + rationalize(BigInt, 0.9141858220671707, tol=tol)*p1*q1 - rationalize(BigInt, 0.04474642022970836, tol=tol)*p2*q1 + rationalize(BigInt, 0.21510107355697375, tol=tol)*p3*q1 + rationalize(BigInt, 0.6261152163591358, tol=tol)*q2 - rationalize(BigInt, 0.23441023070199246, tol=tol)*p1*q2 + rationalize(BigInt, 0.5860551333365724, tol=tol)*p2*q2 + rationalize(BigInt, 0.6514610848268766, tol=tol)*p3*q2 - rationalize(BigInt, 0.1414398428437503, tol=tol)*q3 + rationalize(BigInt, 0.18837597417330545, tol=tol)*p1*q3 + rationalize(BigInt, 0.23529746996939166, tol=tol)*p2*q3 + rationalize(BigInt, 0.34502969365002717, tol=tol)*p3*q3, + -rationalize(BigInt, 0.4997153826800627, tol=tol)*g1^2 + rationalize(BigInt, 1.1379854833548109, tol=tol)*g1*g2 - rationalize(BigInt, 0.6474309248194395, tol=tol)*g2^2 + rationalize(BigInt, 0.5441177673182162, tol=tol)*g1*g3 - rationalize(BigInt, 0.6356209362624222, tol=tol)*g2*g3 - rationalize(BigInt, 0.00249167421336129, tol=tol)*g3^2 - rationalize(BigInt, 1.5544041627556424, tol=tol)*g1^2*p1 + rationalize(BigInt, 2.3739950333676623, tol=tol)*g1*g2*p1 - rationalize(BigInt, 0.626498203472872, tol=tol)*g2^2*p1 - rationalize(BigInt, 1.251167893581656, tol=tol)*g1*g3*p1 + rationalize(BigInt, 1.014528145879352, tol=tol)*g2*g3*p1 - rationalize(BigInt, 0.07360314669929015, tol=tol)*g3^2*p1 - rationalize(BigInt, 0.11700211538167525, tol=tol)*g1^2*p1^2 + rationalize(BigInt, 1.4292168664824174, tol=tol)*g1*g2*p1^2 - rationalize(BigInt, 0.08561887506760898, tol=tol)*g2^2*p1^2 + rationalize(BigInt, 0.11756149787203274, tol=tol)*g1*g3*p1^2 + rationalize(BigInt, 1.2753331275027957, tol=tol)*g2*g3*p1^2 + rationalize(BigInt, 0.20262099044928422, tol=tol)*g3^2*p1^2 - rationalize(BigInt, 0.5322121916934887, tol=tol)*g1^2*p2 - rationalize(BigInt, 0.5705836762208184, tol=tol)*g1*g2*p2 + rationalize(BigInt, 1.338552997747994, tol=tol)*g2^2*p2 + rationalize(BigInt, 0.1626686039427204, tol=tol)*g1*g3*p2 + rationalize(BigInt, 0.8255938648528275, tol=tol)*g2*g3*p2 - rationalize(BigInt, 0.2877403739032339, tol=tol)*g3^2*p2 - rationalize(BigInt, 1.7484788356484942, tol=tol)*g1^2*p1*p2 - rationalize(BigInt, 0.7462669895235802, tol=tol)*g1*g2*p1*p2 + rationalize(BigInt, 0.9024930142580471, tol=tol)*g2^2*p1*p2 - rationalize(BigInt, 0.836428661723292, tol=tol)*g1*g3*p1*p2 + rationalize(BigInt, 0.10315211869079574, tol=tol)*g2*g3*p1*p2 + rationalize(BigInt, 0.8459858213904471, tol=tol)*g3^2*p1*p2 + rationalize(BigInt, 0.0524174914208927, tol=tol)*g1^2*p2^2 - rationalize(BigInt, 1.0349080883999526, tol=tol)*g1*g2*p2^2 - rationalize(BigInt, 0.4456138068634661, tol=tol)*g2^2*p2^2 - rationalize(BigInt, 0.8702119648626987, tol=tol)*g1*g3*p2^2 + rationalize(BigInt, 0.1347633798985455, tol=tol)*g2*g3*p2^2 + rationalize(BigInt, 0.3931963154425734, tol=tol)*g3^2*p2^2 + rationalize(BigInt, 0.7263228121576023, tol=tol)*g1^2*p3 - rationalize(BigInt, 2.2210658961930227, tol=tol)*g1*g2*p3 + rationalize(BigInt, 1.6108892968930464, tol=tol)*g2^2*p3 - rationalize(BigInt, 1.0504867050871953, tol=tol)*g1*g3*p3 + rationalize(BigInt, 1.0659099359741329, tol=tol)*g2*g3*p3 + rationalize(BigInt, 0.5672833993063003, tol=tol)*g3^2*p3 - rationalize(BigInt, 0.06811413086649659, tol=tol)*g1^2*p1*p3 - rationalize(BigInt, 0.31001429706461026, tol=tol)*g1*g2*p1*p3 + rationalize(BigInt, 1.4153449120254278, tol=tol)*g2^2*p1*p3 - rationalize(BigInt, 1.8526453839326555, tol=tol)*g1*g3*p1*p3 + rationalize(BigInt, 1.3321822393355465, tol=tol)*g2*g3*p1*p3 - rationalize(BigInt, 1.3472307811589312, tol=tol)*g3^2*p1*p3 + rationalize(BigInt, 0.8918357940981352, tol=tol)*g1^2*p2*p3 - rationalize(BigInt, 1.500420306224534, tol=tol)*g1*g2*p2*p3 - rationalize(BigInt, 0.43633002867072346, tol=tol)*g2^2*p2*p3 - rationalize(BigInt, 1.087845994748532, tol=tol)*g1*g3*p2*p3 - rationalize(BigInt, 0.15102803926606495, tol=tol)*g2*g3*p2*p3 - rationalize(BigInt, 0.4555057654274117, tol=tol)*g3^2*p2*p3 + rationalize(BigInt, 0.06458462396078254, tol=tol)*g1^2*p3^2 - rationalize(BigInt, 0.39430877808246473, tol=tol)*g1*g2*p3^2 + rationalize(BigInt, 0.5312326819310751, tol=tol)*g2^2*p3^2 + rationalize(BigInt, 0.752650466990666, tol=tol)*g1*g3*p3^2 - rationalize(BigInt, 1.4100965074013412, tol=tol)*g2*g3*p3^2 - rationalize(BigInt, 0.5958173058918577, tol=tol)*g3^2*p3^2 + rationalize(BigInt, 1.1496379817128635, tol=tol)*q0 + rationalize(BigInt, 2.2545055129278047, tol=tol)*p1*q0 - rationalize(BigInt, 0.5186004321512713, tol=tol)*p2*q0 - rationalize(BigInt, 2.904495508356949, tol=tol)*p3*q0 + rationalize(BigInt, 0.3811371457709, tol=tol)*q1 + rationalize(BigInt, 1.1561384774363503, tol=tol)*p1*q1 - rationalize(BigInt, 0.03459051968276095, tol=tol)*p2*q1 - rationalize(BigInt, 0.5860104174434722, tol=tol)*p3*q1 - rationalize(BigInt, 0.42262305475993184, tol=tol)*q2 - rationalize(BigInt, 0.06960283700014054, tol=tol)*p1*q2 + rationalize(BigInt, 0.6975228406191866, tol=tol)*p2*q2 + rationalize(BigInt, 1.1761445768437886, tol=tol)*p3*q2 - rationalize(BigInt, 0.4132504788764938, tol=tol)*q3 + rationalize(BigInt, 1.0477095469315294, tol=tol)*p1*q3 + rationalize(BigInt, 0.5581768684334514, tol=tol)*p2*q3 + rationalize(BigInt, 0.4360576481532085, tol=tol)*p3*q3, + -1. + rationalize(BigInt, 0.9336143308746049, tol=tol)*g1 + rationalize(BigInt, 1.1781580271766483, tol=tol)*g2 + rationalize(BigInt, 0.551650235747964, tol=tol)*g3 + ] + equations +end + +# Source: +# https://github.com/JuliaHomotopyContinuation/PolynomialTestSystems.jl/blob/master/src/systems.jl +function chandran(n; tol=0, np=AbstractAlgebra, ground=np.QQ, ordering=:lex) + _, H = np.polynomial_ring(ground, ["H$i" for i in 1:n], ordering=ordering) + c = rationalize(BigInt, 0.51234, tol=tol) + c = ground(numerator(c)) // ground(denominator(c)) + eqs = [(2n*H[i] - c*H[i]*(1 + sum(ground(i) // (j+i) * H[j] for j=1:(n-1))) - 2n) for i=1:n] + eqs +end + +# Source: +# https://github.com/JuliaHomotopyContinuation/PolynomialTestSystems.jl/blob/master/src/systems.jl +function boon(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) + _, (s1, g1, s2, g2, C1, C2) = np.polynomial_ring(ground, ["s1", "g1", "s2", "g2", "C1", "C2"], ordering=ordering) + eqs = [ + s1^2+g1^2 - 1, + s2^2+g2^2 - 1, + C1*g1^3+C2*g2^3 - ground(12)//10, + C1*s1^3+C2*s2^3 - ground(12)//10, + C1*g1^2*s1+C2*g2^2*s2 - ground(7)//10, + C1*g1*s1^2+C2*g2*s2^2 - ground(7)//10 + ] + eqs end ### -# Some other tiny systems +# Some other examples function ku10(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) _, (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = @@ -744,6 +822,9 @@ function ojika4_d1R2_d2R5(; np=AbstractAlgebra, ground=np.QQ, ordering=:lex) ] end +### +# Random generation + # generate a random polynomial system with: # . `nvariables` variables, # . monomial exponents in range `exps`, diff --git a/src/utils/timeit.jl b/src/utils/timeit.jl index e2610292..2f93b915 100644 --- a/src/utils/timeit.jl +++ b/src/utils/timeit.jl @@ -14,13 +14,13 @@ # code, since they do not affect performance when inactive. const _groebner_timer = TimerOutputs.TimerOutput() +const _groebner_timer_lock = Ref{ReentrantLock}(ReentrantLock()) @noinline __throw_timeit_error() = throw(ArgumentError(""" Invalid usage of macro @timeit in Groebner.jl. Use it as: @timeit label expr @timeit function foo() ... end""")) -# TODO: @timeit macro is broken in combination with Base.Threads.@threads.. """ @timeit label expr @timeit function foo() ... end @@ -53,6 +53,7 @@ end ``` NOTE: `@timeit` cannot wrap code blocks that contain `@label` or `@goto`. +NOTE: `@timeit` is broken in combination with `Base.Threads.@threads`. """ macro timeit(args...) if isempty(args) || length(args) > 2 @@ -96,14 +97,25 @@ function _timeit_expr(m, label, expr) end end -function refresh_performance_counters() +function performance_counters_refresh() + # Do nothing if counters are disabled !performance_counters_enabled() && return nothing + # Do nothing if run from a worker thread. + # NOTE: this does not always do what is intended. It is still correct, since + # we lock the timer anyway. threadid() != 1 && return nothing - TimerOutputs.reset_timer!(_groebner_timer) + + lock(_groebner_timer_lock[]) + try + TimerOutputs.reset_timer!(_groebner_timer) + finally + unlock(_groebner_timer_lock[]) + end + nothing end -function print_performance_counters(statistics) +function performance_counters_print(statistics) (statistics in (:no, :stats)) && return nothing if statistics in (:timings, :all) && !performance_counters_enabled() @log level = 1_000 """ diff --git a/src/utils/versioninfo.jl b/src/utils/versioninfo.jl index f4d0c717..4c0322cf 100644 --- a/src/utils/versioninfo.jl +++ b/src/utils/versioninfo.jl @@ -2,9 +2,7 @@ # Adapted from Nemo.jl # The license is Simplified "2-clause" BSD License -# https://github.com/Nemocas/Nemo.jl/blob/master/LICENSE.md - -# NOTE: Currently not used +# https://github.com/Nemocas/Nemo.jl/blob/master/LICENSE.md import Pkg import LibGit2 @@ -14,7 +12,7 @@ const Groebner_uuid = Base.UUID("0b43b601-686d-58a3-8a1c-6623616c7cd4") deps = Pkg.dependencies() if !haskey(deps, Groebner_uuid) - version() = "building" + version() = "build" else ver = deps[Groebner_uuid] if occursin("/dev/", ver.source) @@ -42,11 +40,12 @@ function versioninfo() println() println("Switches:") - println(" invariants_enabled = $(invariants_enabled())") - println(" logging_enabled = $(logging_enabled())") + println(" invariants_enabled = $(invariants_enabled())") + println(" logging_enabled = $(logging_enabled())") + println(" performance_counters_enabled = $(performance_counters_enabled())") println("Environment:") println(" GROEBNER_NO_THREADED = $(get(ENV, "GROEBNER_NO_THREADED", "0"))") - return nothing + nothing end diff --git a/test/input-output/Nemo.jl b/test/input-output/Nemo.jl index 3526a520..122977e7 100644 --- a/test/input-output/Nemo.jl +++ b/test/input-output/Nemo.jl @@ -16,7 +16,7 @@ import Primes end @testset "Nemo.jl, input-output" begin - R, (x, y) = Nemo.GF(Nemo.fmpz(Primes.nextprime(BigInt(2)^100)))["x", "y"] + R, (x, y) = Nemo.GF(Nemo.ZZRingElem(Primes.nextprime(BigInt(2)^100)))["x", "y"] @test_throws DomainError Groebner.groebner([x, y]) R, (x, y) = Nemo.GF(2, 2)["x", "y"] diff --git a/test/runtests.jl b/test/runtests.jl index cd23d002..bcfe8e3a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,12 +3,12 @@ using TestSetExtensions using AbstractAlgebra using Random -using Groebner +# using Groebner # Check invariants during testing. # NOTE: it's good to turn this on! Groebner.invariants_enabled() = true -Groebner.update_logger(loglevel=0) +Groebner.logger_update(loglevel=0) # Taken from JuMP/test/solvers.jl function try_import(name::Symbol) @@ -26,6 +26,8 @@ end ⊂(xs, ys) = all(in(ys), xs) ≂(xs, ys) = ⊂(xs, ys) && ⊂(ys, xs) +Groebner.versioninfo() + @time @testset "All tests" verbose = true begin # Different implementations of a monomial @includetests ["monoms/exponentvector", "monoms/packedtuples", "monoms/sparsevector"]