Homotopies and Systems
CertifiedHomotopyTracking.straight_line_homotopy — Function
straight_line_homotopy(F, G, x_vars; CCRing=AcbField(256), projective=false, gamma=nothing)
straight_line_homotopy(F, G, t; gamma=nothing)Construct the straight-line homotopy
\[H(x,t) = (1 - t) \gamma G(x) + t F(x).\]
It accepts vectors of symbolic expressions F and G and the variable vector x_vars. It compiles the homotopy and returns an SpecializedHomotopy for track_path.
Options
CCRing=AcbField(256): complex ball field used for parameter values and tracking.projective=false: homogenize and compile chart-based projective tracking.gamma=nothing: gamma-trick scalar. If omitted, a random complex scalar is used.
Example
@variables x y;
CC = AcbField(256);
F = [x^2 + 3y - 4, y^2 + 3];
G = [x^2 - 1, y^2 - 1];
H = straight_line_homotopy(F, G, [x, y]; CCRing=CC, gamma=CC(0.5, 0.5));
res = track_path(H, [CC(1), CC(-1)]);
solution(res)CertifiedHomotopyTracking.compile_homotopy — Function
compile_homotopy(H_eqs, x_vars, t_var; projective=false) -> CompiledHomotopyCompile an explicitly given symbolic homotopy H_eqs(x, t).
Use this when you have already written the homotopy equations yourself. The returned CompiledHomotopy can be passed directly to track_path or certify_posteriori. The tracking precision is inferred from the ACB field of the starting point.
Complex numeric coefficients in H_eqs are internally parameterized and stored as fixed constants, so expressions such as (1 + im) * (x^3 - 1) work.
Options
projective=false: homogenize inx_varsand compile coordinate-chart evaluators for projective tracking.
Example
@variables x y t;
gamma = 1 + im;
compiled = compile_homotopy([(1 - t) * gamma * (x^3 - 1) + t * (x^3 + 2y - 2),
(1 - t) * gamma * (y^2 - 1) + t * (y^2 + x - 2)],
[x, y], t);
CC = AcbField(256);
res = track_path(compiled, [CC(1), CC(1)])
success(res)
solution(res)CertifiedHomotopyTracking.compile_system — Function
compile_system(F_eqs, x_vars; projective=false, const_vars=Num[]) -> CompiledHomotopyCompile a static symbolic polynomial system F_eqs(x).
The result is used by variety_system and can also be evaluated through a SpecializedHomotopy with t = 0.
Options
projective=false: homogenize inx_varsand compile projective chart evaluators.const_vars=Num[]: symbolic constants that should be supplied as fixed ACB values when constructing theSpecializedHomotopy.
Example
@variables x y;
CC = AcbField(128);
compiled = compile_system([x^2 + y^2 - 1], [x, y]);
sys = SpecializedHomotopy(compiled, CC);
evaluate_H(sys, [CC(1), CC(0)], CC(0))CertifiedHomotopyTracking.compile_edge_homotopy — Function
compile_edge_homotopy(F_eqs, x_vars, p_vars; projective=false, const_vars=Num[]) -> CompiledHomotopyCompile a parameter homotopy for a system F_eqs(x, p).
The compiled homotopy represents the linear parameter path from p_start to p_end. Specialize it with make_edge_system, or pass it directly to solve_monodromy.
Complex numeric coefficients in F_eqs are internally parameterized and stored as fixed constants, so expressions such as (1 + 2im) * x^2 work.
Options
projective=false: homogenize inx_varsand use projective coordinate charts.const_vars=Num[]: symbolic constants that are not part of the moving parameter vectorp_vars.
Example
@variables x y p q;
CC = AcbField(256);
F = [p*x^2 + 3y - 4, y^2 + q];
compiled = compile_edge_homotopy(F, [x, y], [p, q]);
p0 = [CC(1), CC(-1)];
p1 = [CC(cis(0.3)), CC(cis(0.7))];
sys = make_edge_system(compiled, p0, p1);
res = track_path(sys, [CC(1), CC(1)])
success(res)CertifiedHomotopyTracking.make_edge_system — Function
make_edge_system(compiled, p_start, p_end, p_const=AcbFieldElem[]) -> SpecializedHomotopySpecialize a CompiledHomotopy, usually from compile_edge_homotopy, to the linear parameter path from p_start to p_end.
p_const supplies fixed constants declared through const_vars or introduced internally for complex numeric coefficients.
Example
@variables x y p q;
CC = AcbField(256);
F = [p*x^2 + 3y - 4, y^2 + q];
compiled = compile_edge_homotopy(F, [x, y], [p, q]);
sys = make_edge_system(compiled, [CC(1), CC(-1)], [CC(cis(0.3)), CC(cis(0.7))]);
res = track_path(sys, [CC(1), CC(1)])
success(res)CertifiedHomotopyTracking.SpecializedHomotopy — Type
SpecializedHomotopyTracking-ready homotopy used by track_path.
A SpecializedHomotopy combines a CompiledHomotopy, concrete start and target parameter values, fixed constants, an Arb/ACB precision, and projective chart state. It represents a homotopy ready for numerical evaluation.
Constructors:
SpecializedHomotopy(compiled, p_start, p_end, p_const=AcbFieldElem[]; source=compiled.source)
SpecializedHomotopy(compiled, CC::AcbField; source=compiled.source)Prefer higher-level constructors when possible:
straight_line_homotopyfor direct start-target homotopies.track_path(compiled, x_start)for direct homotopies fromcompile_homotopy.make_edge_systemfor parameter homotopies fromp_starttop_end.
CertifiedHomotopyTracking.CompiledHomotopy — Type
CompiledHomotopyCompiled evaluators for a homotopy or polynomial system.
Users usually obtain this from compile_homotopy, compile_system, or compile_edge_homotopy. Direct homotopies can be passed to track_path; parameter homotopies are specialized with make_edge_system before tracking.
Important fields:
func_H,func_Jx,func_dt: compiled evaluators forH,dH/dx, anddH/dt.projective_coordinates: whether homogeneous coordinates are used.projective_patch: whether chart evaluators are available.n_vars: number of compiled variables, including the homogenizing coordinate for projective systems.source: optionalHomotopySourceDatafor a posteriori certification.
CertifiedHomotopyTracking.HomotopySourceData — Type
HomotopySourceDataMetadata describing the symbolic source used to build a compiled homotopy.
This is stored in CompiledHomotopy and SpecializedHomotopy so that a posteriori certification can reconstruct a HomotopyContinuation.jl system. Most users do not construct this type directly.
Fields:
kind::direct,:edge, or:system.equations: symbolic equations after internal coefficient parameterization.variables: unknown variables.parameters: homotopy or system parameters.t_var: homotopy parameter for direct homotopies, ornothing.const_vars: symbolic constants treated as fixed parameters.projective: whether the source was compiled projectively.
CertifiedHomotopyTracking.evaluate_H — Function
evaluate_H(sys::SpecializedHomotopy, x, t)Evaluate the specialized homotopy equations at point x and parameter t.
For projective systems compiled with coordinate charts, x may be either chart coordinates or full projective coordinates.
CertifiedHomotopyTracking.evaluate_Jac — Function
evaluate_Jac(sys::SpecializedHomotopy, x, t)Evaluate the Jacobian of the specialized homotopy with respect to the unknowns.
CertifiedHomotopyTracking.evaluate_dt — Function
evaluate_dt(sys::SpecializedHomotopy, x, t)Evaluate the derivative of the specialized homotopy with respect to the homotopy parameter t.
CertifiedHomotopyTracking.system_with_precision — Function
system_with_precision(sys::SpecializedHomotopy, precision_bits::Integer)Return an SpecializedHomotopy with the same compiled data and parameters as sys, but with all stored ACB values converted to AcbField(precision_bits).
This is used internally by adaptive-precision track_path, and can also be useful when manually retrying a difficult path.
Evaluation Example
julia> @variables x y;julia> CC = AcbField(128);julia> F = [x^2 + y - 2, y^2 + x - 2];julia> G = [x^2 - 1, y^2 - 1];julia> H = straight_line_homotopy(F, G, [x, y]; CCRing=CC, gamma=CC(1, 1));Compilation Done.julia> point = [CC(1), CC(1)];julia> t = CC(0.25);julia> evaluate_H(H, point, t)2-element Vector{AcbFieldElem}: 0 0julia> evaluate_Jac(H, point, t)2×2 Matrix{AcbFieldElem}: 2.00000000000000000000000000000000000000 + 1.50000000000000000000000000000000000000*im … 0.250000000000000000000000000000000000000 0.250000000000000000000000000000000000000 2.00000000000000000000000000000000000000 + 1.50000000000000000000000000000000000000*imjulia> evaluate_dt(H, point, t)2-element Vector{AcbFieldElem}: 0 0
Direct Homotopy Example
julia> @variables x y t;julia> gamma = 1 + im;julia> compiled = compile_homotopy([(1 - t) * gamma * (x^3 - 1) + t * (x^3 + 2y - 2), (1 - t) * gamma * (y^2 - 1) + t * (y^2 + x - 2)], [x, y], t);Compiling Direct Homotopy System... Compilation Done.julia> CC = AcbField(256);julia> res = track_path(compiled, [CC(1), CC(1)])TrackResult(success, status=success, iterations=23, accepted=23, rejected=23, final_radius=0.00524288, precision=53->53, final_krawczyk_norm=0.3743120892904699, approx=ComplexF64[0.62608106 + 0.58366471im, 1.19722054 - 0.24375823im])julia> success(res)truejulia> solution(res)2-element Vector{ComplexF64}: 0.6260810620260073 + 0.5836647073117808im 1.1972205355035728 - 0.24375822582523698im