wiring_diagram_pair_encode
Encodes an instance of a pair of wiring diagrams on m pseudolines as a list of Booleans consisting of m unary ones followed by false and the truth values of u and v on all ordered triples.
Statement
def wiring_diagram_pair_encode (inst : WiringDiagramPair) : List Bool- Defined in
- arXiv:2610.03808 Sec. 2
- Verified
- 26 Oct 2026
- Axioms
- none listed
- Built on 5
- 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…
- fin_triplesThe list of all ordered triples (a, b, c) of elements of Fin m satisfying a < b < c.
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - OrderedTripleAn ordered triple in a preordered type is a triple of elements (a, b, c) with a < b and b < c.
Read back from the Lean
wiring_diagram_pair_encode is a function taking an instance inst of WiringDiagramPair and returning a List Bool. The resulting list is the concatenation of:
1. inst.m copies of true,
2. a single false,
3. the boolean evaluations of inst.u t == 1 for each strictly increasing triple t = ⟨a, b, c⟩ of elements in Fin inst.m (ordered lexicographically by a, then b, then c),
4. the boolean evaluations of inst.v t == 1 for each strictly increasing triple t = ⟨a, b, c⟩ of elements in Fin inst.m in the same order.
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
/-- Boolean list encoding of a pair of wiring diagrams on m pseudolines. -/ def wiring_diagram_pair_encode (inst : WiringDiagramPair) : List Bool := List.replicate inst.m true ++ [false] ++ (fin_triples inst.m).map (fun t => inst.u t == 1) ++ (fin_triples inst.m).map (fun t => inst.v t == 1)