diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-12-04 17:14:46 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-12-04 17:14:46 +0100 |
| commit | 8fdf459876b999dbe184196f9abd330a3c24d560 (patch) | |
| tree | 3a834246faba68d9dcb59448e21c166816e0c8e0 /Nominal | |
| parent | b00c95bd3580a8a8bd779f57a034900140ce41fa (diff) | |
implement derivable equality
Diffstat (limited to 'Nominal')
| -rw-r--r-- | Nominal/Instances/Basic.lean | 15 | ||||
| -rw-r--r-- | Nominal/Permutations.lean | 17 |
2 files changed, 32 insertions, 0 deletions
diff --git a/Nominal/Instances/Basic.lean b/Nominal/Instances/Basic.lean index dcca75b..64b6425 100644 --- a/Nominal/Instances/Basic.lean +++ b/Nominal/Instances/Basic.lean @@ -70,6 +70,21 @@ def NominalSet.mkDiscrete (X : Type) : NominalSet.Discrete ๐ธ X where ยท intro ฯ hฯ; simp only [PermSet.fix', Set.mem_setOf_eq]; rfl ยท exact Set.finite_empty +instance {X : Type} [NominalSet.Discrete ๐ธ X] [Finite X] : OrbitFinite ๐ธ X where + fin_orbits := Finite.of_equiv X + { toFun x := Quotient.mk _ x + invFun x := x.out + left_inv x := by + suffices โ (x y : X), MulAction.orbitRel (FPerm ๐ธ) X x y โ x = y by + apply this + rw [โ Quotient.eq] + apply Quotient.out_eq + intro x y โจฯ, hฯโฉ + simp only [NominalSet.Discrete.is_discrete] at hฯ + exact hฯ.symm + right_inv x := by simp + } + @[simp] lemma NominalSet.Discrete.supp {X : Type} [NominalSet.Discrete ๐ธ X] {x : X} : supp ๐ธ x = โ
:= by rw [โ Set.subset_empty_iff] apply Set.sInter_subset_of_mem 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 ฯ ฯ := ฯ * ฯ |
