JuliaHomotopyContinuation/HomotopyContinuation.jl

Non-real solution incorrectly certified as real

saschatimme opened this issue · 0 comments

Discussed in #562

Originally posted by oskarhenriksson January 16, 2024
Hi! My student Mikkel Dons Demsig and I are a bit puzzled by the following example, where certify incorrectly claims that a solution is real:

using HomotopyContinuation
@var x
F = System([x-(3+1e-14*im)])
result = solve(F)
vector_of_solutions = solutions(result)
certification_result = certify(F,vector_of_solutions)
certificate = first(certificates(certification_result))

In fact, it turns out that both is_real(certificate) and is_complex(certificate) return true, so certification_result is displayed in the following (somewhat funny!) way:

CertificationResult
===================
• 1 solution candidates given
• 1 certified solution intervals (1 real, 1 complex)
• 1 distinct certified solution intervals (1 real, 1 complex)

How is this happening? It seems like the relevant function is ε_inflation_krawczyk, but I don't see how the realness check with isinterior could accidentally give an incorrect true when the imaginary part is small.