poset_braid_map_is_braid_solution
For any partially ordered set P with decidable order, poset_braid_map satisfies the braid equation.
Statement
theorem poset_braid_map_is_braid_solution {P : Type*} [PartialOrder P] [DecidableRel ((· ≤ ·) : P → P → Prop)] : is_braid_solution (@poset_braid_map 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 2
- is_braid_solutionA map R : X × X → X × X on a type X is a solution of the braid equation if (R × id) ∘ (id × R) ∘ (R × id) = (id × R) ∘ (R × id) ∘ (id × R)…
- 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 type P equipped with a partial order [PartialOrder P] and a decidable relation for ≤ ([DecidableRel (· ≤ ·)]), the map poset_braid_map on (P ⊕ (P × ZMod 2)) × (P ⊕ (P × ZMod 2)) is a braid solution (satisfies is_braid_solution).
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
To prove that poset_braid_map satisfies the braid equation R₁₂ ∘ R₂₃ ∘ R₁₂ = R₂₃ ∘ R₁₂ ∘ R₂₃, we apply functional extensionality to consider an arbitrary input triple in (P ⊕ (P × ZMod 2))³. A case split on each component yields 8 cases. In 6 of the cases, both sides agree definitionally by computing the map; in the remaining 2 cases, an element has its parity flipped twice under the same condition, which reduces back to the original value via a helper lemma in ZMod 2.
Applying the conditional increment by 1 twice in ZMod 2 leaves ε unchanged. automation
We split on whether the proposition p is true or false. When p is false, the conditional expression simplifies directly to ε. When p is true, the expression becomes ε + 1 + 1, which equals ε in ZMod 2; checking both elements 0 and 1 of ZMod 2 confirms the equality by reflexivity.
split_ifs <;> (try fin_cases ε) <;> rfl
To show that poset_braid_map is a braid solution, it suffices to prove that the braid equation holds on an arbitrary input triple (u, v, w).
We unfold the definition of is_braid_solution into the composition equation R₁₂ ∘ R₂₃ ∘ R₁₂ = R₂₃ ∘ R₁₂ ∘ R₂₃ and apply functional extensionality to an arbitrary triple (u, v, w).
dsimp [is_braid_solution] funext ⟨u, v, w⟩
The verification splits into 8 cases according to the components of the triple (u, v, w).
Each of u, v, w belongs to P ⊕ (P × ZMod 2), so each is either an element of P or a pair in P × ZMod 2. Performing case analysis on all three coordinates decomposes the goal into 2³ = 8 subgoals.
rcases u with x₁ | ⟨y₁, ε₁⟩ <;> rcases v with x₂ | ⟨y₂, ε₂⟩ <;> rcases w with x₃ | ⟨y₃, ε₃⟩
The braid equation holds in all 8 cases.
In each of the 8 cases, we unfold the definition of poset_braid_map. In 6 cases, both sides evaluate to the exact same triple definitionally. In the remaining 2 cases (where an element from P × ZMod 2 passes between two elements from P, or vice versa), the parity component ε is conditionally incremented twice under the same inequality condition; rewriting with poset_braid_map_is_braid_solution_helper reduces this double toggle back to ε, closing all goals.
uses
poset_braid_map_is_braid_solution_helperall_goals dsimp [poset_braid_map] try simp only [poset_braid_map_is_braid_solution_helper]
poset_braid_map_is_braid_solution_helper- For any proposition p with decidable truth value and any ε in ZMod 2, conditionally adding 1 to ε twice under the condition p returns ε.
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.
lemma poset_braid_map_is_braid_solution_helper (p : Prop) [Decidable p] (ε : ZMod 2) : (if p then (if p then ε + 1 else ε) + 1 else if p then ε + 1 else ε) = ε := by split_ifs <;> (try fin_cases ε) <;> rfl/-- The poset braid map D_P is a solution of the braid equation. -/theorem poset_braid_map_is_braid_solution {P : Type*} [PartialOrder P] [DecidableRel ((· ≤ ·) : P → P → Prop)] : is_braid_solution (@poset_braid_map P _ _) := by dsimp [is_braid_solution] funext ⟨u, v, w⟩ rcases u with x₁ | ⟨y₁, ε₁⟩ <;> rcases v with x₂ | ⟨y₂, ε₂⟩ <;> rcases w with x₃ | ⟨y₃, ε₃⟩ all_goals dsimp [poset_braid_map] try simp only [poset_braid_map_is_braid_solution_helper]