op874_three_ports_fixed_permutation_two_choices
A permutation of three ports fixing a specified port is either the identity or swaps the other two ports.
Statement
theorem op874_three_ports_fixed_permutation_two_choices
(p : Fin 3) (σ : Equiv.Perm (Fin 3)) (h : σ p = p) :
∃ i j : Fin 3, i ≠ j ∧ i ≠ p ∧ j ≠ p ∧
(σ = Equiv.refl (Fin 3) ∨ σ = Equiv.swap i j)- Source
- Local-state compatibility reduction for OP-874, https://arxiv.org/abs/2610.41950, Section 2.
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The theorem asserts that a permutation of three elements that fixes a given element is either the identity or swaps the remaining two elements. Because the port space has only 3 elements and the symmetric group on 3 elements has only 6 permutations, the theorem is a bounded, decidable proposition. Reverting the parameters allows Lean's `decide` tactic to prove the result by exhaustive evaluation over all cases.
It suffices to show the claim universally for all ports $p \in \mathrm{Fin}\,3$ and all permutations $\sigma$ on three elements.
Reverting $p$ and $\sigma$ (along with the hypothesis that $\sigma(p) = p$) transforms the goal into a closed, universally quantified proposition over the finite types `Fin 3` and `Equiv.Perm (Fin 3)`.
revert p σ
Every permutation $\sigma$ of three elements fixing $p$ is either the identity permutation or the swap of the other two elements. automation
Because `Fin 3` has 3 elements and its permutation group has order $3! = 6$, there are only 18 possible pairs $(p, \sigma)$ to consider. The `decide` tactic evaluates and confirms the statement by exhaustive finite computation.
decide
- The proof is purely computational: the `decide` tactic checks all cases by evaluating the decidable proposition over the finite domains `Fin 3` (3 elements) and `Equiv.Perm (Fin 3)` (6 elements).
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.
theorem op874_three_ports_fixed_permutation_two_choices (p : Fin 3) (σ : Equiv.Perm (Fin 3)) (h : σ p = p) : ∃ i j : Fin 3, i ≠ j ∧ i ≠ p ∧ j ≠ p ∧ (σ = Equiv.refl (Fin 3) ∨ σ = Equiv.swap i j) := by revert p σ decide