11@doc Markdown. doc"""
22 rational_curve_parametrization(I::Ideal{T} where T <: MPolyRingElem, <keyword arguments>)
33
4- Given an ideal `I` with solution set X being of dimension 1 over the complex numbers, return
5- a rational curve parametrization of the one-dimensional irreducible components of X.
4+ Given a **radical** ideal `I` with solution set X being of dimension 1 over the complex numbers,
5+ return a rational curve parametrization of the one-dimensional irreducible components of X.
66
77In the output, the variables `x`,`y` of the parametrization correspond to the last two
88entries of the `vars` attribute, in that order.
@@ -76,10 +76,12 @@ function rational_curve_parametrization(
7676 while any (is_divisible_by .(val, Ref (lucky_prime)))
7777 val = rand (- bif_bound: bif_bound, 2 )
7878 end
79- Fnew = vcat (F, val[1 ]* gens (R)[N- 1 ] + val[2 ])
80- new_lucky_prime = _generate_lucky_primes (Fnew, one (ZZ)<< 30 , one (ZZ)<< 31 - 1 , 1 ) |> first
81- local INEW = Ideal (change_base_ring .(Ref (GF (new_lucky_prime)), Fnew))
82- @assert (dimension (INEW) == 0 && hilbert_degree (INEW) == DEG, " The curve is not in generic position" )
79+ for ivar in [N- 1 , N]
80+ Fnew = vcat (F, val[1 ]* gens (R)[ivar] + val[2 ])
81+ new_lucky_prime = _generate_lucky_primes (Fnew, one (ZZ)<< 30 , one (ZZ)<< 31 - 1 , 1 ) |> first
82+ local INEW = Ideal (change_base_ring .(Ref (GF (new_lucky_prime)), Fnew))
83+ @assert (dimension (INEW) == 0 && hilbert_degree (INEW) == DEG, " The curve is not in generic position" )
84+ end
8385 end end
8486
8587 # Compute DEG+2 evaluations of x in the param (whose total deg is bounded by DEG)
@@ -91,7 +93,7 @@ function rational_curve_parametrization(
9193 lc = nothing
9294 while length (free_ind) > 0
9395 if i > 2 * (DEG+ 2 )
94- error (" Too many bad specializations: permute variables or use_lfs=true" )
96+ error (" Too many bad specializations. Check radicality, else permute variables or use_lfs=true" )
9597 end
9698 # Evaluation of the generator at values x s.t. 0 <= |x|-i <= length(free_ind)/2
9799 # plus one point at -(length(free_ind)+1)/2 if the length if odd.
0 commit comments