Documentation

HexRootsTheory.NKDriver

theorem HexRootsTheory.isolateLoop_nk_atoms {p : Hex.ZPoly} {target : ℤ} {fuel : ℕ} {work : Array Hex.Component} {rs : Array (Hex.Certified p)} (hloop : Hex.isolateLoop p target Hex.AtomStrategy.nk fuel work = some rs) (r : Hex.Certified p) :

Every successful NK-only loop result is an NK atom.

theorem HexRootsTheory.isolateAll_nk_covers {p : Hex.ZPoly} {target : ℤ} {work : Array Hex.Component} {rs : Array (Hex.Certified p)} (hrun : Hex.isolateAll? p target work Hex.AtomStrategy.nk = some rs) {z : ℂ} (hzroot : (toPolyℂ p).IsRoot z) (hz : z ∈ Worklist.region work) :

Successful NK-only isolateAll? execution preserves every root covered by its starting worklist.

Every successful NK-only isolateAll? result is an NK atom.

theorem HexRootsTheory.isolateAll_nk_ready_disjoint {p : Hex.ZPoly} {target : ℤ} {work : Array Hex.Component} {rs : Array (Hex.Certified p)} (hrun : Hex.isolateAll? p target work Hex.AtomStrategy.nk = some rs) :
(∀ r ∈ rs.toList, target ≤ r.square.prec) ∧ ∀ {i j : ℕ} (hi : i < rs.size) (hj : j < rs.size), i ≠ j → Disjoint (DyadicSquare.closedDisc rs[i].square) (DyadicSquare.closedDisc rs[j].square)

Successful NK-only isolateAll? results meet the target and have pairwise-disjoint closed circumscribed discs.

Starting from the Cauchy component, successful NK-only isolation covers every complex root.

Each emitted NK atom contains one interior simple root, unique in its closed square.

theorem HexRootsTheory.isolate_nk_run (p : Hex.ZPoly) (h : Hex.HasOnlySimpleRoots p) (atomPrec : ℤ) (hdegree : 0 < Hex.DensePoly.natDegree p) {atoms : Array (Hex.DyadicRootIsolation p)} (hrun : p.isolateComplexRoots? h atomPrec Hex.AtomStrategy.nk = some atoms) :
∃ (rs : Array (Hex.Certified p)), Hex.isolateAll? p (max atomPrec ↑(Hex.separationDepth p)) #[Hex.Component.cauchy p hdegree] Hex.AtomStrategy.nk = some rs ∧ rs.size = atoms.size ∧ ∀ (i : ℕ) (hi : i < rs.size) (hj : i < atoms.size), rs[i] = Hex.Certified.atom atoms[i] ∧ Hex.nkWitness p atoms[i].square ∧ atoms[i].witness.isNK = true

In the positive-degree branch, successful ZPoly.isolateComplexRoots? execution is a successful Cauchy-started isolateAll? run whose result indices correspond exactly to the returned NK atoms.

Every atom returned by positive-degree NK-only isolation meets the requested precision and contains a unique interior simple root.

theorem HexRootsTheory.isolate_nk_disjoint (p : Hex.ZPoly) (h : Hex.HasOnlySimpleRoots p) (atomPrec : ℤ) (hdegree : 0 < Hex.DensePoly.natDegree p) {atoms : Array (Hex.DyadicRootIsolation p)} (hrun : p.isolateComplexRoots? h atomPrec Hex.AtomStrategy.nk = some atoms) {i j : ℕ} (hi : i < atoms.size) (hj : j < atoms.size) (hij : i ≠ j) :

Distinct atoms returned by positive-degree NK-only isolation have disjoint closed circumscribed discs.

Every complex root belongs to exactly one atom returned by successful positive-degree NK-only isolation.

A nonzero executable polynomial has a nonzero complex cast.

A nonzero executable polynomial whose natural degree is not positive has no complex root.

A successful non-positive-degree ZPoly.isolateComplexRoots? call is exactly the nonzero constant branch and returns the empty atom array.

Every successful NK-only ZPoly.isolateComplexRoots? call assigns each complex root to exactly one returned atom, including the vacuous nonzero-constant branch.

theorem HexRootsTheory.isolate_nk_pairwise (p : Hex.ZPoly) (h : Hex.HasOnlySimpleRoots p) (atomPrec : ℤ) {atoms : Array (Hex.DyadicRootIsolation p)} (hrun : p.isolateComplexRoots? h atomPrec Hex.AtomStrategy.nk = some atoms) {i j : ℕ} (hi : i < atoms.size) (hj : j < atoms.size) (hij : i ≠ j) :

Any two differently indexed atoms returned by successful NK-only ZPoly.isolateComplexRoots? execution have disjoint closed circumscribed discs.

Every returned atom of successful NK-only isolation meets the requested precision and has the unique interior simple-root contract.