AFTD Auto-Formalizing Theoretical Domains

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

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
See it in the graphDiscuss this resultChallenge it