English
A permutation lies in the closure of the set of swaps if and only if it has finite fixed-by complement.
Русский
Перестановка лежит в замыкании множества транспозиций ⇔ её complemento фиксирования конечна.
LaTeX
$$theorem mem_closure_isSwap' {f : Equiv.Perm α} : ...$$
Lean4
/-- A permutation is a product of transpositions if and only if it has finite support. -/
theorem mem_closure_isSwap' {f : Perm α} : f ∈ closure {σ : Perm α | σ.IsSwap} ↔ (fixedBy α f)ᶜ.Finite :=
by
refine (mem_closure_isSwap fun _ ↦ id).trans (and_iff_left fun x ↦ ⟨⟨swap x (f x), ?_⟩, swap_apply_left x (f x)⟩)
by_cases h : x = f x
· rw [← h, swap_self]
apply Subgroup.one_mem
· exact subset_closure ⟨x, f x, h, rfl⟩