@@ -15,6 +15,8 @@ At the moment the underlying algorithm is based on variants of Faugère's F4 Alg
1515
1616# Arguments
1717- `I::Ideal{T} where T <: MPolyRingElem`: input generators.
18+ - `eliminate::Int=0`: size of first block of variables to be eliminated.
19+ - `intersect::Bool=true`: compute the `eliminate`-th elimination ideal.
1820- `initial_hts::Int=17`: initial hash table size `log_2`.
1921- `nr_thrds::Int=1`: number of threads for parallel linear algebra.
2022- `max_nr_pairs::Int=0`: maximal number of pairs per matrix, only bounded by minimal degree if `0`.
@@ -40,6 +42,7 @@ julia> eliminate(I, 2)
4042function eliminate (
4143 I:: Ideal{T} where T <: MPolyRingElem ,
4244 eliminate:: Int ;
45+ intersect:: Bool = true ,
4346 initial_hts:: Int = 17 ,
4447 nr_thrds:: Int = 1 ,
4548 max_nr_pairs:: Int = 0 ,
@@ -50,9 +53,9 @@ function eliminate(
5053 if eliminate <= 0
5154 error (" Number of variables to be eliminated is <= 0." )
5255 else
53- return groebner_basis (I, initial_hts= initial_hts, nr_thrds= nr_thrds,
56+ return groebner_basis (I, initial_hts= initial_hts,nr_thrds= nr_thrds,
5457 max_nr_pairs= max_nr_pairs, la_option= la_option,
55- eliminate= eliminate,
58+ eliminate= eliminate, intersect = intersect,
5659 complete_reduction= complete_reduction,
5760 info_level= info_level)
5861 end
@@ -73,6 +76,7 @@ At the moment the underlying algorithm is based on variants of Faugère's F4 Alg
7376- `max_nr_pairs::Int=0`: maximal number of pairs per matrix, only bounded by minimal degree if `0`.
7477- `la_option::Int=2`: linear algebra option: exact sparse-dense (`1`), exact sparse (`2`, default), probabilistic sparse-dense (`42`), probabilistic sparse(`44`).
7578- `eliminate::Int=0`: size of first block of variables to be eliminated.
79+ - `intersect::Bool=true`: compute the `eliminate`-th elimination ideal.
7680- `complete_reduction::Bool=true`: compute a reduced Gröbner basis for `I`
7781- `info_level::Int=0`: info level printout: off (`0`, default), summary (`1`), detailed (`2`).
7882
@@ -105,14 +109,15 @@ function groebner_basis(
105109 max_nr_pairs:: Int = 0 ,
106110 la_option:: Int = 2 ,
107111 eliminate:: Int = 0 ,
112+ intersect:: Bool = true ,
108113 complete_reduction:: Bool = true ,
109114 info_level:: Int = 0
110115 )
111116
112117 return get! (I. gb, eliminate) do
113118 _core_groebner_basis (I, initial_hts = initial_hts, nr_thrds = nr_thrds,
114119 max_nr_pairs = max_nr_pairs, la_option = la_option,
115- eliminate = eliminate,
120+ eliminate = eliminate, intersect = intersect,
116121 complete_reduction = complete_reduction,
117122 info_level = info_level)
118123 end
@@ -125,6 +130,7 @@ function _core_groebner_basis(
125130 max_nr_pairs:: Int = 0 ,
126131 la_option:: Int = 2 ,
127132 eliminate:: Int = 0 ,
133+ intersect:: Bool = true ,
128134 complete_reduction:: Bool = true ,
129135 info_level:: Int = 0
130136 )
@@ -170,9 +176,13 @@ function _core_groebner_basis(
170176 ptr = reinterpret (Ptr{Int32}, gb_cf[])
171177 jl_cf = Base. unsafe_wrap (Array, ptr, nr_terms)
172178
173- basis = _convert_finite_field_array_to_abstract_algebra (
174- jl_ld, jl_len, jl_cf, jl_exp, R, eliminate)
175-
179+ if intersect == true
180+ basis = _convert_finite_field_array_to_abstract_algebra (
181+ jl_ld, jl_len, jl_cf, jl_exp, R, eliminate)
182+ else
183+ basis = _convert_finite_field_array_to_abstract_algebra (
184+ jl_ld, jl_len, jl_cf, jl_exp, R, 0 )
185+ end
176186
177187 ccall ((:free_f4_julia_result_data , libneogb), Nothing ,
178188 (Ptr{Nothing}, Ptr{Ptr{Cint}}, Ptr{Ptr{Cint}},
0 commit comments