diff options
| -rw-r--r-- | Nominal/Basic.lean | 75 |
1 files changed, 67 insertions, 8 deletions
diff --git a/Nominal/Basic.lean b/Nominal/Basic.lean index eb10b44..2858516 100644 --- a/Nominal/Basic.lean +++ b/Nominal/Basic.lean @@ -1,5 +1,6 @@ import Mathlib.Tactic import Nominal.Permutations +import Nominal.Helpers.Finset /-! # Basic Definitions @@ -18,20 +19,20 @@ variable (๐ธ : Type) [Infinite ๐ธ] [Countable ๐ธ] [DecidableEq ๐ธ] /-- A set X equipped with a group action โข: (FPerm ๐ธ) ร X โ X. -/ class PermSet (X : Type) extends MulAction (FPerm ๐ธ) X -/-- The set of atoms itself forms a G-Set. -/ +/-- The set of atoms itself forms a (FPerm ๐ธ)-Set. -/ instance : PermSet ๐ธ ๐ธ where smul ฯ a := ฯ a one_smul := by aesop mul_smul := by aesop -/-- The set of finite permutations forms a G-Set. -/ +/-- The set of finite permutations forms a (FPerm ๐ธ)-Set. -/ instance : PermSet ๐ธ (FPerm ๐ธ) where smul ฯ ฯ := ฯ * ฯ one_smul := by aesop mul_smul := by aesop /-- A discrete (FPerm ๐ธ)-Set where permutations do not change anything. -/ -instance PermSet.discrete (X : Type) : PermSet ๐ธ X where +def PermSet.discrete (X : Type) : PermSet ๐ธ X where smul ฯ x := x one_smul := by aesop mul_smul := by aesop @@ -68,8 +69,12 @@ def HasSupport (x : X) (S : Set ๐ธ) : Prop := fix ๐ธ S โ fix' ๐ธ x @[simp] -lemma support_iff {x : X} {S : Set ๐ธ} : HasSupport ๐ธ x S โ fix ๐ธ S โ fix' ๐ธ x := by - rfl +lemma support_iff {x : X} {S : Set ๐ธ} : HasSupport ๐ธ x S โ โ (ฯ : FPerm ๐ธ), (โ x โ S, ฯ x = x) โ ฯ โ fix' ๐ธ x := by + constructor + ยท intro hsupp ฯ hฯ + aesop + ยท intro hsupp ฯ hฯ + aesop lemma support_subset {x : X} {S T : Set ๐ธ} : HasSupport ๐ธ x S โ S โ T โ HasSupport ๐ธ x T := by intro hS hsub ฯ hฯ @@ -80,6 +85,31 @@ lemma support_subset {x : X} {S T : Set ๐ธ} : HasSupport ๐ธ x S โ S โ T lemma support_inter {x : X} {S T : Set ๐ธ} : HasSupport ๐ธ x S โ S.Finite โ HasSupport ๐ธ x T โ T.Finite โ HasSupport ๐ธ x (S โฉ T) := by sorry +lemma support_sInter {x : X} {C : Set (Set ๐ธ)}: C.Finite โ C.Nonempty โ (โ S โ C, HasSupport ๐ธ x S โง S.Finite) โ HasSupport ๐ธ x (โโ C) := by + suffices (C : Finset (Set ๐ธ)) : C.Nonempty โ (โ S โ C, HasSupport ๐ธ x S โง S.Finite) โ HasSupport ๐ธ x (โโ C.toSet) โง (โโ C.toSet).Finite + ยท intro hfin + rw [show C = hfin.toFinset.toSet by simp] + intro hne h + exact (this hfin.toFinset hne h).left + ยท have : DecidableEq (Set ๐ธ) := Classical.typeDecidableEq (Set ๐ธ) + apply Finset.Nonempty.induction + ยท intro S hS + rw [show โโ ({S} : Finset (Set ๐ธ)).toSet = S by simp] + apply hS + simp + ยท intro S C' hS hC' hsing + rw [show (โโ (insert S C' : Finset (Set ๐ธ))) = S โฉ (โโ C') by aesop] + have hother : (โ S โ C', HasSupport ๐ธ x S โง S.Finite) := by + intro S' hS' + apply hsing + exact Finset.mem_insert_of_mem hS' + specialize hC' hother + specialize hsing S (by simp) + constructor + ยท apply support_inter ๐ธ hsing.left hsing.right hC'.left hC'.right + ยท apply Set.Finite.inter_of_left + exact hsing.right + end PermSet end Support @@ -103,7 +133,7 @@ variable {X : Type} [nom : NominalSet ๐ธ X] /-- For every element x of a nominal set, there exists a least finite support, denoted "supp x". --/ noncomputable def supp (x : X) : Set ๐ธ := - โโ { S : Set ๐ธ | PermSet.HasSupport ๐ธ x S } + โโ { S : Set ๐ธ | PermSet.HasSupport ๐ธ x S โง S.Finite } /-- The least finite support in a nominal set is always finite. -/ lemma supp_finite {x : X} : (supp ๐ธ x).Finite := by @@ -114,7 +144,34 @@ lemma supp_finite {x : X} : (supp ๐ธ x).Finite := by ยท grind /-- The least finite support is itself a support. -/ -lemma supp_is_support {x : X} : PermSet.HasSupport ๐ธ x (supp ๐ธ x) := sorry +lemma supp_is_support {x : X} : PermSet.HasSupport ๐ธ x (supp ๐ธ x) := by + obtain โจS, โจhsuppS, hfinSโฉโฉ := nom.finsupp x + have suppf : (supp ๐ธ x = โโ { T : Set ๐ธ | T โ S โง PermSet.HasSupport ๐ธ x T โง T.Finite }) := by + unfold supp; ext a + constructor + ยท intro h T hT + apply h + exact hT.out.right + ยท intro h T hT + suffices : a โ S โฉ T + ยท apply Set.mem_of_mem_inter_right; assumption + ยท apply h + constructor + ยท exact Set.inter_subset_left + ยท constructor + ยท exact PermSet.support_inter ๐ธ hsuppS hfinS hT.out.left hT.out.right + ยท apply Set.Finite.inter_of_left; assumption + rw [suppf] + apply PermSet.support_sInter + ยท apply Set.Finite.subset + ยท apply Set.Finite.powerset + exact hfinS + ยท intro T hT + exact hT.out.left + ยท use S + exact โจby rfl, โจhsuppS, hfinSโฉโฉ + ยท intro T hT + exact hT.right end NominalSet @@ -131,7 +188,8 @@ instance : NominalSet ๐ธ ๐ธ where -- TODO: Prove supp a = {a} /-- Every set can be made into a discrete nominal set where every element has empty support. -/ -instance NominalSet.discrete (X : Type) : NominalSet ๐ธ X where +def NominalSet.discrete (X : Type) : NominalSet ๐ธ X := +{ PermSet.discrete ๐ธ X with finsupp := by intro x use {} @@ -139,6 +197,7 @@ instance NominalSet.discrete (X : Type) : NominalSet ๐ธ X where ยท intro ฯ hฯ aesop ยท simp +} -- TODO: Prove supp x = โ
|
