AFTD Auto-Formalizing Theoretical Domains

op874_repair_block_cut_count

def

The number of non-matching block edges at port r whose other endpoint has the same matching-cut bit as r.

Statement

def op874_repair_block_cut_count (r : Fin 20) : ℕ
Source
step towards op874_repair_chain_data
Verified
26 Nov 2026
Axioms
none listed
Built on 4
  • op874_repair_base_graphThe twenty-vertex repair block as a simple graph on its own, with its 29 internal edges; the adjacency is stated as an existential over…
  • op874_repair_base_bitThe matching-constant cut bits in the repair gadget.
  • op874_repair_base_leftLeft endpoints of the twenty factor edges followed by ten matching edges in the repair gadget.
  • op874_repair_base_rightRight endpoints of the twenty factor edges followed by ten matching edges in the repair gadget.

Lean source view module on GitHub

/-- The number of non-matching block edges at port r whose other endpoint has the same matching-cut bit as r. -/
def op874_repair_block_cut_count (r : Fin 20) : ℕ := (Finset.univ.filter (fun t : Fin 20 => op874_repair_base_graph.Adj r t ∧
      op874_repair_base_bit t = op874_repair_base_bit r ∧
      ¬ (∃ j : Fin 30, 20 ≤ j.val ∧
        s(op874_repair_base_left j, op874_repair_base_right j) = s(r, t)))).card
See it in the graphDiscuss this resultChallenge it