Coefficient-level Boolean equality for ZPoly: the generic
DensePoly.beqCoeffs at R = Int. Kept as an abbrev so the Sturm-chain
checkers below read at the ZPoly level; see DensePoly.beqCoeffs for why
this is used instead of the structural DecidableEq.
Equations
- a.beqCoeffs b = Hex.DensePoly.beqCoeffs a b
Instances For
The tail validator for SturmChainCert: given the two most recent chain
elements prev, cur, check that rest continues the Sturm chain exactly as
sturmChainAux builds it. An empty tail requires the next pseudo-remainder to
vanish (sturmChainAux's stopping condition); a nonempty tail requires the
pseudo-remainder nonzero, its next element = −primitivePart (spem prev cur),
and the rest to continue from cur, next. Mirrors sturmChainAux's branch
structure so certTail_sound is a direct induction.
Equations
Instances For
The tail validator reconstructs sturmChainAux exactly: if certTail prev cur rest holds and there is enough fuel, then running sturmChainAux from
prev, cur with accumulator acc yields acc followed by rest. Induction
on rest.
A decidable executable certificate that chain is the Sturm chain of p,
by coefficient-level checks that kernel-reduce.
chain must have at least two elements, p must have positive degree
(2 ≤ p.size) and chain must be no longer than p.size (a fuel bound that
every genuine chain satisfies, since chain degrees strictly decrease). The head
must be primitivePart p, the second primitivePart p', each further element
−primitivePart (spem …) of its two predecessors, and the chain must terminate
with a vanishing pseudo-remainder — exactly sturmChain's construction. All
element comparisons go through beqCoeffs, never structural Array equality.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Chain-validity certificate: chain is the Sturm chain of p. A decidable
Prop (the Bool-check = true pattern) verified by coefficient-level checks
that kernel-reduce.
Equations
- Hex.SturmChainCert p chain = (p.sturmChainCertB chain = true)
Instances For
Equations
- Hex.instDecidableSturmChainCert p chain = Hex.instDecidableSturmChainCert._aux_1 p chain
Certificate soundness. A valid SturmChainCert p chain identifies
chain with sturmChain p as a proposition. Proving (not deciding) this
equality sidesteps the kernel Array.instDecidableEqImpl block.
Count transport. Under a valid certificate, the Sturm count of p on
any interval is the sign-variation gap of the literal certified chain at the
two endpoints — the shape the elaborator decides per emitted root.
Root-count transport. Under a valid certificate, the total root count of
p is the −∞/+∞ sign-variation gap of the literal certified chain — the shape
the elaborator decides for the complete field.
An O(n) adjacent-pair order check on an emitted isolation array: every
consecutive pair has upperᵢ ≤ lowerᵢ₊₁. The elaborator decides this in place
of the quadratic RealRootIsolations.ordered, which ordered_of_adjacent
recovers by transitivity.
Equations
Instances For
The transitivity walk: orderedAdjacent (adjacent pairs) upgrades to the
all-pairs RealRootIsolations.ordered shape, using each interval's own
lower < upper to bridge consecutive gaps.