poset_braid_map_involutive
For any partially ordered set P with decidable order, the bipartite map poset_braid_map is an involution on pairs: poset_braid_map (poset_braid_map p) = p for all p.
Statement
theorem poset_braid_map_involutive {P : Type*} [PartialOrder P] [DecidableRel ((· ≤ ·) : P → P → Prop)] (p : (P ⊕ (P × ZMod 2)) × (P ⊕ (P × ZMod 2))) : poset_braid_map (poset_braid_map p) = p
- Formalizes
- scout/2611-15540-solutions-of-the-set-theoretic-quantum-yang-baxter-equation.md:492
- Verified
- 14 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- poset_braid_mapFor a partially ordered set P with decidable order, the bipartite map poset_braid_map on (P ⊕ (P × ZMod 2)) × (P ⊕ (P × ZMod 2)) fixes…
Read back from the Lean
For any partially ordered type $P$ with decidable order relation $\le$, and for any element $p \in (P \oplus (P \times \mathbb{Z}/2\mathbb{Z})) \times (P \oplus (P \times \mathbb{Z}/2\mathbb{Z}))$, applying poset_braid_map twice to $p$ yields $p$ (that is, poset_braid_map is an involution).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The proof proceeds by case analysis on the pair p ∈ (P ⊕ (P × ℤ/2ℤ))². On identical summand types, the braid map is the identity by definition, so applying it twice immediately yields p. On mixed summand types, the map swaps the two components and conditionally increments the ℤ/2ℤ coordinate by 1 when the poset order holds; applying it a second time swaps the components back and increments the coordinate once more under the exact same condition. Because adding 1 twice in ℤ/2ℤ is the identity, the coordinate returns to its original value in all cases.
For all e ∈ ℤ/2ℤ, e + 1 + 1 = e.
The ring ℤ/2ℤ has only two elements, 0 and 1. We check each element by exhaustion (`fin_cases`): both 0 + 1 + 1 = 0 and 1 + 1 + 1 = 1 hold by definition (`rfl`).
have h2 (e : ZMod 2) : e + 1 + 1 = e := by fin_cases e <;> rfl
The map poset_braid_map is an involution: poset_braid_map (poset_braid_map p) = p.
We perform a case analysis on the pair p according to which summand of P ⊕ (P × ℤ/2ℤ) each component belongs to. In the two diagonal cases (both components in P, or both in P × ℤ/2ℤ), poset_braid_map acts as the identity by definition, so its square is the identity by reflexivity (`rfl`). In the two mixed cases, unfolding poset_braid_map reveals that it swaps the two components and conditionally adds 1 to the ℤ/2ℤ component if the poset inequality holds. Applying the map a second time swaps the components back to their original positions and tests the exact same inequality; splitting on whether this inequality holds (`split_ifs`), the ℤ/2ℤ coordinate either remains unchanged or has 1 added twice, which reduces to the original value by h2 (`simp [h2]`).
uses
h2rcases p with ⟨_ | ⟨_, _⟩, _ | ⟨_, _⟩⟩ <;> first | rfl | (dsimp [poset_braid_map]; split_ifs <;> simp [h2])
h2- In ℤ/2ℤ, adding 1 twice leaves any element unchanged: e + 1 + 1 = e for all e.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The poset braid map is an involution. -/theorem poset_braid_map_involutive {P : Type*} [PartialOrder P] [DecidableRel ((· ≤ ·) : P → P → Prop)] (p : (P ⊕ (P × ZMod 2)) × (P ⊕ (P × ZMod 2))) : poset_braid_map (poset_braid_map p) = p := by have h2 (e : ZMod 2) : e + 1 + 1 = e := by fin_cases e <;> rfl rcases p with ⟨_ | ⟨_, _⟩, _ | ⟨_, _⟩⟩ <;> first | rfl | (dsimp [poset_braid_map]; split_ifs <;> simp [h2])