pathGreedyRun
def
Greedily count disjoint true edges in a Boolean edge word.
Statement
open scoped BigOperators in def pathGreedyRun (prev : Bool) : List Bool → ℕ
- Source
- Finite-state path cut-matching certificate for OP-827; exhaustive transition check in experiment 22529.
- Verified
- 11 Nov 2026
- Axioms
- none listed
- Used by 4
- pathGreedyRun_identityThe greedy matching count and pending run parity satisfy an exact counting identity.
- pathCertRun_eq_greedyThe automaton output equals the signed sum of seven greedy edge counts.
- pathGreedyRun_eq_count_and_oddTwice the greedy count equals the number of true edges plus the number of odd true runs.
- pathCertOddRunIneqFor any four-color path word, the signed sum of odd crossing-run counts for the seven masks is nonpositive.
Lean source view module on GitHub
open scoped BigOperators in def pathGreedyRun (prev : Bool) : List Bool → ℕ | [] => 0 | b :: bs => (if b && !prev then 1 else 0) + pathGreedyRun (b && !prev) bs