AFTD Auto-Formalizing Theoretical Domains

poset_edge_braid_map

def

For a partially ordered set P with decidable equality, poset_edge_braid_map is the bipartite braid map on ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2))² that fixes pairs from the same component and, for an edge l = (y, x) with y ≤ x and z in P × ZMod 2, applies the transposition interchanging (y, 0) and (x, 1) to z while swapping components.

Statement

def poset_edge_braid_map {P : Type*} [PartialOrder P] [DecidableEq P]
    (p : ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2)) × ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2))) :
    ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2)) × ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2))
Defined in
arXiv:2611.15540, eq (3.6)
Verified
16 Nov 2026
Axioms
none listed
Used by 4

Read back from the Lean

Given a type P equipped with a partial order [PartialOrder P] and decidable equality [DecidableEq P], let E denote the subtype {p : P × P // p.1 ≤ p.2} of pairs (u, v) ∈ P × P with u ≤ v, and let S denote the direct sum (disjoint union) E ⊕ (P × ZMod 2). poset_edge_braid_map defines a function from S × S to S × S. First, an auxiliary function t : E → (P × ZMod 2) → (P × ZMod 2) is defined for l = ⟨(u, v), h⟩ ∈ E and z ∈ P × ZMod 2 by: - t(l, z) = (v, 1) if z = (u, 0) - t(l, z) = (u, 0) if z = (v, 1) - t(l, z) = z otherwise. Then poset_edge_braid_map acts on an input pair p ∈ S × S by case analysis: 1. (Sum.inl l, Sum.inl l') ↦ (Sum.inl l, Sum.inl l') 2. (Sum.inr z, Sum.inr z') ↦ (Sum.inr z, Sum.inr z') 3. (Sum.inl l, Sum.inr z) ↦ (Sum.inr (t l z), Sum.inl l) 4. (Sum.inr z, Sum.inl l) ↦ (Sum.inl l, Sum.inr (t l z))

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

/-- The bipartite solution E_P of the braid equation associated to a poset P on L_P ⊔ Z_P. -/
def poset_edge_braid_map {P : Type*} [PartialOrder P] [DecidableEq P]
    (p : ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2)) × ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2))) :
    ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2)) × ({p : P × P // p.1 ≤ p.2} ⊕ (P × ZMod 2)) :=
  let t (l : {p : P × P // p.1 ≤ p.2}) (z : P × ZMod 2) : P × ZMod 2 :=
    if z = (l.1.1, 0) then (l.1.2, 1)
    else if z = (l.1.2, 1) then (l.1.1, 0)
    else z
  match p with
  | (.inl l, .inl l') => (.inl l, .inl l')
  | (.inr z, .inr z') => (.inr z, .inr z')
  | (.inl l, .inr z)  => (.inr (t l z), .inl l)
  | (.inr z, .inl l)  => (.inl l, .inr (t l z))
See it in the graphDiscuss this resultChallenge it