AFTD Auto-Formalizing Theoretical Domains

wiring_diagram_zero_excess

def

A pair of wiring diagrams (represented as rank-3 signotopes) has braid-move excess 0 if their distance in the higher Bruhat graph B(m, 2) equals their Hamming distance, namely the number of ordered triples where they differ.

Statement

def wiring_diagram_zero_excess (inst : WiringDiagramPair) : Prop
Defined in
arXiv:2610.03808 Sec. 2.2
Verified
26 Oct 2026
Axioms
none listed
Built on 6
  • WiringDiagramPairAn instance of the zero excess problem consisting of a wire count m and two rank-3 signotopes u and v on Fin m representing wiring…
  • bruhat_order_three_graphThe higher Bruhat order B(α, 2) is the simple graph whose vertices are rank-3 signotopes u : OrderedTriple α → ℤˣ (subtypes of functions…
  • OrderedTripleAn ordered triple in a preordered type is a triple of elements (a, b, c) with a < b and b < c.
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
  • is_rank_three_signotopeA function u : OrderedTriple α → ℤˣ assigning units of ℤ ({+1, -1}) to ordered triples in a linearly ordered type α is a rank-3 signotope…
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
Used by 3
  • op_517_zero_excess_of_eq_pairFor any instance inst of WiringDiagramPair, if the two signotopes inst.u and inst.v are equal, then inst has braid-move excess 0…
  • op_517_zero_excess_of_le_twoFor any instance inst of WiringDiagramPair on m pseudolines with m ≤ 2, there are no ordered triples in Fin m, so inst.u = inst.v holds…
  • op_517_zero_excess_of_adjIf two wiring diagrams (represented as rank-3 signotopes u and v on Fin m) are adjacent in the higher Bruhat graph…

Read back from the Lean

Given a WiringDiagramPair inst (which specifies a natural number m, two functions u, v : OrderedTriple (Fin m) → ℤˣ, and proofs hu, hv that u and v are rank-three signotopes), wiring_diagram_zero_excess inst is the proposition that the graph distance between ⟨inst.u, inst.hu⟩ and ⟨inst.v, inst.hv⟩ in bruhat_order_three_graph (Fin inst.m) is equal to the number of ordered triples t : OrderedTriple (Fin inst.m) for which inst.u t ≠ inst.v t (computed by Set.ncard).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A pair of wiring diagrams has braid-move excess 0 if its graph distance in B(m, 2) equals its Hamming distance. -/
def wiring_diagram_zero_excess (inst : WiringDiagramPair) : Prop :=
  (bruhat_order_three_graph (Fin inst.m)).dist ⟨inst.u, inst.hu⟩ ⟨inst.v, inst.hv⟩ =
    {t : OrderedTriple (Fin inst.m) | inst.u t ≠ inst.v t}.ncard
See it in the graphDiscuss this resultChallenge it