Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.WitnessScan.Finite

Native interval failure and existing finite witness scans #

The actual verifier reports the last zero it reads, whereas scanPiece returns the first. Their failure conditions agree: both exhaust precisely the original vertices in the existing finite piece. This value lemma connects native failure accounting to the existing finite false-positive theory without identifying the two witness-order conventions.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.WitnessScan.fails_iff_scanPiece_eq_none {n D g k : ℕ} (AB BC AC : ℕ → ℕ → ℤ) (wAB wBC wAC : Fin n → Fin n → ℤ) (hD : 16 ≤ D) (hg : 1 ≤ g) (hAB : ∀ (u v : Fin n), AB ↑u ↑v = wAB u v) (hBC : ∀ (u v : Fin n), BC ↑u ↑v = wBC u v) (hAC : ∀ (u v : Fin n), AC ↑u ↑v = wAC u v) (a b : Fin n) :
have first := k * ExactTriangle.pieceSize D g; have length := min (ExactTriangle.pieceSize D g) (n - first); (∀ (c : Fin length), AB ↑a ↑b + BC (↑b) (first + ↑c) + AC (↑a) (first + ↑c) ≠ 0) ↔ ExactTriangle.scanPiece wAB wBC wAC D g k a b = none

Native interval exhaustion is exactly failure of the existing finite piece scan. The array equations describe the same original integer weights; no witness routine is assumed.