From 8fdf459876b999dbe184196f9abd330a3c24d560 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 4 Dec 2025 17:14:46 +0100 Subject: implement derivable equality --- Nominal/Permutations.lean | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Nominal/Permutations.lean') diff --git a/Nominal/Permutations.lean b/Nominal/Permutations.lean index 79a5042..0a4974a 100644 --- a/Nominal/Permutations.lean +++ b/Nominal/Permutations.lean @@ -187,12 +187,29 @@ class PermSet (๐”ธ : Type) [Infinite ๐”ธ] [Countable ๐”ธ] [DecidableEq ๐”ธ] variable (๐”ธ : Type) [Infinite ๐”ธ] [Countable ๐”ธ] [DecidableEq ๐”ธ] +/-- An (FPerm ๐”ธ)-set is orbit-finite if there are only finitely many different orbits. -/ +class OrbitFinite (X : Type) [PermSet ๐”ธ X] where + fin_orbits : Finite (Quotient (MulAction.orbitRel (FPerm ๐”ธ) X)) + /-- The set of atoms itself forms an (FPerm ๐”ธ)-Set. -/ instance : PermSet ๐”ธ ๐”ธ where smul ฯ€ a := ฯ€ a one_smul := by intro; rfl mul_smul := by intro _ _ _; rfl +instance : OrbitFinite ๐”ธ ๐”ธ where + fin_orbits := Finite.of_equiv Unit + { toFun _ := Quotient.mk _ (inferInstanceAs (Nonempty ๐”ธ)).some + invFun _ := () + right_inv := by + let chosen := (inferInstanceAs (Nonempty ๐”ธ)).some + apply Quotient.ind; intro a + rw [Quotient.eq] + show chosen โˆˆ MulAction.orbit (FPerm ๐”ธ) a + use โธจchosen, aโธฉ + exact FPerm.swap_apply_right chosen a + } + /-- The set of finite permutations forms an (FPerm ๐”ธ)-Set. -/ instance : PermSet ๐”ธ (FPerm ๐”ธ) where smul ฯ€ ฯ„ := ฯ€ * ฯ„ -- cgit v1.3.1