summaryrefslogtreecommitdiff
path: root/Nominal
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-12-04 17:14:46 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-12-04 17:14:46 +0100
commit8fdf459876b999dbe184196f9abd330a3c24d560 (patch)
tree3a834246faba68d9dcb59448e21c166816e0c8e0 /Nominal
parentb00c95bd3580a8a8bd779f57a034900140ce41fa (diff)
implement derivable equality
Diffstat (limited to 'Nominal')
-rw-r--r--Nominal/Instances/Basic.lean15
-rw-r--r--Nominal/Permutations.lean17
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 ฯ€ ฯ„ := ฯ€ * ฯ„