summaryrefslogtreecommitdiff
path: root/Nominal/Permutations.lean
diff options
context:
space:
mode:
Diffstat (limited to 'Nominal/Permutations.lean')
-rw-r--r--Nominal/Permutations.lean11
1 files changed, 11 insertions, 0 deletions
diff --git a/Nominal/Permutations.lean b/Nominal/Permutations.lean
index 1bcb00f..a583b4c 100644
--- a/Nominal/Permutations.lean
+++ b/Nominal/Permutations.lean
@@ -133,6 +133,14 @@ lemma mul_swap_eq_swap_mul {π : FPerm X} {a b : X} : π * ⸨a, b⸩ = ⸨π a,
apply ext
apply Equiv.mul_swap_eq_swap_mul
+/-- If c is not equal to a or b, then (a b) leaves c unchanged. -/
+lemma swap_neq {a b c : X} : c ≠ a → c ≠ b → ⸨a, b⸩ c = c := by
+ intro ha hb
+ apply Equiv.Perm.supp_notin
+ simp only [swap, Equiv.Perm.supp_swap, ne_eq, ite_not, Set.mem_ite_empty_left, Set.mem_insert_iff, Set.mem_singleton_iff, not_and, not_or]
+ intro _
+ exact ⟨ha, hb⟩
+
end FPerm
example : FPerm ℕ := ⸨1, 2⸩ * ⸨3, 4⸩ * ⸨2, 3⸩
@@ -168,4 +176,7 @@ open Pointwise
/-- The powerset of an (FPerm 𝔸)-Set forms an (FPerm 𝔸)-Set using pointwise permutation. -/
instance {X : Type} [PermSet 𝔸 X] : PermSet 𝔸 (Set X) where
+/-- Simplification for swaps applied to an atom. -/
+@[simp] lemma PermSet.atom_swap {a b c : 𝔸} : ⸨a, b⸩ • c = (Equiv.swap a b) c := by rfl
+
end PermSet