Documentation

HexBerlekampZassenhaus.BhksRecover

theorem Hex.bhksIndicatorCandidates?_getD_candidate {f : ZPoly} {d : LiftData} {indicators : Array (Array Int)} {candidates : Array ZPoly} (h : bhksIndicatorCandidates? f d indicators = some candidates) (i : Nat) :
i < indicators.size (quotient : ZPoly), bhksIndicatorCandidate? f d (indicators.getD i #[]) = some (candidates.getD i 0, quotient)

Per-index extraction from a successful bhksIndicatorCandidates? fold. The fold records only candidate factors, not quotients, so the quotient is returned existentially for the corresponding successful bhksIndicatorCandidate? call.

Return the factors recovered by the lattice computation when all checks succeed.

Equations
Instances For

    If the executable BHKS recovery guards all pass, bhksRecover? returns the verified candidate array.

    This lemma is the public proof-facing surface for callers that should not unfold the private failure classifier used by the executable.