@@ -4,10 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Weiyi Wang
55-/
66import Mathlib.Algebra.BigOperators.Group.Finset.Basic
7+ import Mathlib.Algebra.Group.Subgroup.Lattice
8+ import Mathlib.Algebra.Group.Subgroup.Order
79import Mathlib.Algebra.Order.Archimedean.Basic
810import Mathlib.Algebra.Order.Hom.Monoid
911import Mathlib.Data.Finset.Max
1012import Mathlib.Order.Antisymmetrization
13+ import Mathlib.Order.SupIndep
14+ import Mathlib.Order.UpperLower.CompleteLattice
15+ import Mathlib.Order.UpperLower.Principal
1116
1217/-!
1318# Archimedean classes of a linearly ordered group
@@ -451,6 +456,185 @@ theorem liftOrderHom_mk (f : M → α) (h : ∀ a b, mk a ≤ mk b → f a ≤ f
451456
452457end LiftHom
453458
459+ /-- Given a non-empty `UpperSet` of `MulArchimedeanClass`,
460+ all group elements belonging to these classes form a subgroup. -/
461+ @ [to_additive "Given a non-empty `UpperSet` of `ArchimedeanClass`,
462+ all group elements belonging to these classes form a subgroup." ]
463+ def subgroup' {s : UpperSet (MulArchimedeanClass M)} (hs : s ≠ ⊤) : Subgroup M where
464+ carrier := mk ⁻¹' s
465+ mul_mem' {a b} ha hb := by
466+ rw [Set.mem_preimage] at ha hb ⊢
467+ obtain h | h := min_le_iff.mp (min_le_mk_mul a b)
468+ · exact s.upper h ha
469+ · exact s.upper h hb
470+ one_mem' := by
471+ rw [Set.mem_preimage]
472+ obtain ⟨u, hu⟩ := UpperSet.coe_nonempty.mpr hs
473+ simpa using s.upper (by simp) hu
474+ inv_mem' {a} h := by simpa using h
475+
476+ /-- Extend `MulArchimedeanClass.subgroup'` to any `UpperSet`
477+ with a junk value `⊥` assigned to the empty set. -/
478+ @ [to_additive "Extend `ArchimedeanClass.subgroup'` to any `UpperSet`
479+ with a junk value `⊥` assigned to the empty set." ]
480+ noncomputable
481+ def subgroup (s : UpperSet (MulArchimedeanClass M)) : Subgroup M :=
482+ open Classical in
483+ if hs : s = ⊤ then
484+ ⊥
485+ else
486+ subgroup' hs
487+
488+ variable {s : UpperSet (MulArchimedeanClass M)}
489+
490+ @[to_additive]
491+ theorem subgroup_eq_of_ne_top (hs : s ≠ ⊤) : subgroup s = subgroup' hs := by
492+ simp [subgroup, hs]
493+
494+ variable (M) in
495+ @ [to_additive (attr := simp)]
496+ theorem subgroup_eq_bot : subgroup (M := M) ⊤ = ⊥ := by
497+ simp [subgroup]
498+
499+ @[to_additive]
500+ theorem mem_subgroup_iff (hs : s ≠ ⊤) : a ∈ subgroup s ↔ mk a ∈ s := by
501+ rw [subgroup_eq_of_ne_top hs]
502+ exact Set.mem_preimage
503+
504+ /-- An open ball defined by `MulArchimedeanClass.subgroup` of `UpperSet.Ioi A`.
505+ For `A = ⊤`, we assign the junk value `⊥`. -/
506+ @ [to_additive "An open ball defined by `ArchimedeanClass.addSubgroup` of `UpperSet.Ioi A`.
507+ For `A = ⊤`, we assign the junk value `⊥`. " ]
508+ noncomputable
509+ abbrev ballSubgroup (A : MulArchimedeanClass M) := subgroup (UpperSet.Ioi A)
510+
511+ /-- A closed ball defined by `MulArchimedeanClass.subgroup` of `UpperSet.Ici A`. -/
512+ @ [to_additive "An closed ball defined by `ArchimedeanClass.addSubgroup` of `UpperSet.Ici A`." ]
513+ noncomputable
514+ abbrev closedBallSubgroup (A : MulArchimedeanClass M) := subgroup (UpperSet.Ici A)
515+
516+ @[to_additive]
517+ theorem mem_ballSubgroup_iff {a : M} {A : MulArchimedeanClass M} (hA : A ≠ ⊤) :
518+ a ∈ ballSubgroup A ↔ A < mk a := by
519+ have : UpperSet.Ioi A ≠ ⊤ := by
520+ contrapose! hA
521+ rw [UpperSet.ext_iff] at hA
522+ simpa using hA
523+ simp [mem_subgroup_iff this]
524+
525+ @ [to_additive (attr := simp)]
526+ theorem mem_closedBallSubgroup_iff {a : M} {A : MulArchimedeanClass M} :
527+ a ∈ closedBallSubgroup A ↔ A ≤ mk a := by
528+ have : UpperSet.Ici A ≠ ⊤ := by simp
529+ simp [mem_subgroup_iff this]
530+
531+ variable (M) in
532+ @ [to_additive (attr := simp)]
533+ theorem ballSubgroup_top : ballSubgroup (M := M) ⊤ = ⊥ := by
534+ convert subgroup_eq_bot M
535+ simp
536+
537+ variable (M) in
538+ @ [to_additive (attr := simp)]
539+ theorem closedBallSubgroup_top : closedBallSubgroup (M := M) ⊤ = ⊥ := by
540+ ext
541+ simp
542+
543+ variable (M) in
544+ @[to_additive]
545+ theorem subgroup_strictAntiOn : StrictAntiOn (subgroup (M := M)) (Set.Iio ⊤) := by
546+ intro s hs t ht hst
547+ rw [subgroup_eq_of_ne_top (Set.mem_Iio.mp hs).ne_top]
548+ rw [subgroup_eq_of_ne_top (Set.mem_Iio.mp ht).ne_top]
549+ apply lt_of_le_of_ne
550+ · rw [Subgroup.mk_le_mk]
551+ exact (Set.preimage_subset_preimage_iff (by simp)).mpr (by simpa using hst.le)
552+ · contrapose! hst with heq
553+ apply le_of_eq
554+ simpa [mk_surjective, subgroup'] using heq
555+
556+ variable (M) in
557+ @[to_additive]
558+ theorem subgroup_antitone : Antitone (subgroup (M := M)) := by
559+ intro s t hst
560+ obtain hs | rfl := ne_or_eq s ⊤
561+ · obtain ht | rfl := ne_or_eq t ⊤
562+ · exact ((subgroup_strictAntiOn M).le_iff_le
563+ (Set.mem_Iio.mpr ht.lt_top) (Set.mem_Iio.mpr hs.lt_top)).mpr hst
564+ · simp
565+ · rw [eq_top_iff.mpr hst]
566+
567+ variable (M) in
568+ @[to_additive]
569+ theorem ballSubgroup_antitone : Antitone (ballSubgroup (M := M)) := by
570+ intro A B h
571+ exact subgroup_antitone _ <| (UpperSet.Ioi_strictMono _).monotone h
572+
573+
574+ /-- A subgroup `G` is called a grade at `c` iff
575+ `ballSubgroup c` and `G` are complements in the lattice under `closedBallSubgroup c`. -/
576+ @ [to_additive /-- A subgroup `G` is called a grade at `c` iff
577+ `ballAddSubgroup c` and `G` are complements in the lattice under `closedBallAddSubgroup c`. -/ ]
578+ def IsGradeSubgroup (c : MulArchimedeanClass M) (G : Subgroup M) : Prop :=
579+ Disjoint (ballSubgroup c) G ∧ ballSubgroup c ⊔ G = closedBallSubgroup c
580+
581+ namespace IsGradeSubgroup
582+ variable {c : MulArchimedeanClass M} {G : Subgroup M}
583+
584+ @[to_additive]
585+ theorem disjoint (hgrade : IsGradeSubgroup c G) : Disjoint (ballSubgroup c) G := hgrade.1
586+
587+ @[to_additive]
588+ theorem sup_eq (hgrade : IsGradeSubgroup c G) : ballSubgroup c ⊔ G = closedBallSubgroup c :=
589+ hgrade.2
590+
591+ @[to_additive]
592+ theorem eq_bot_iff (hgrade : IsGradeSubgroup c G) : G = ⊥ ↔ c = ⊤ := by
593+ obtain hsup := hgrade.sup_eq
594+ constructor
595+ · rintro rfl
596+ replace hsup : c.ballSubgroup = c.closedBallSubgroup := by simpa using hsup
597+ contrapose! hsup with h
598+ apply Subgroup.ext_iff.not.mpr
599+ induction c using ind with | mk a
600+ rw [not_forall]
601+ exact ⟨a, by simp [h]⟩
602+ · rintro rfl
603+ simpa using hsup
604+
605+ @[to_additive]
606+ theorem nontrivial (hgrade : IsGradeSubgroup c G) (h : c ≠ ⊤) : Nontrivial G :=
607+ (Subgroup.nontrivial_iff_ne_bot _).mpr (hgrade.eq_bot_iff.ne.mpr h)
608+
609+ @[to_additive]
610+ theorem le_closedBallSubgroup (hgrade : IsGradeSubgroup c G) : G ≤ closedBallSubgroup c := by
611+ simp [← hgrade.sup_eq]
612+
613+ @ [to_additive archimedeanClassMk_eq]
614+ theorem mulArchimedeanClassMk_eq (hgrade : IsGradeSubgroup c G) {a : M} (ha : a ∈ G) (h0 : a ≠ 1 ) :
615+ mk a = c := by
616+ apply le_antisymm
617+ · have hA : c ≠ ⊤ := by
618+ contrapose! h0
619+ rw [hgrade.eq_bot_iff.mpr h0] at ha
620+ simpa using ha
621+ contrapose! h0 with hlt
622+ have ha' : a ∈ ballSubgroup c := (mem_ballSubgroup_iff hA).mpr hlt
623+ exact (Subgroup.disjoint_def.mp hgrade.disjoint) ha' ha
624+ · simpa using hgrade.le_closedBallSubgroup ha
625+
626+ @ [to_additive archimedean]
627+ theorem mulArchimedean (hgrade : IsGradeSubgroup c G) : MulArchimedean G := by
628+ apply mulArchimedean_of_mk_eq_mk
629+ intro a ha b hb
630+ suffices mk a.val = mk b.val by
631+ rw [mk_eq_mk] at this ⊢
632+ exact this
633+ rw [hgrade.mulArchimedeanClassMk_eq a.prop (by simpa using ha)]
634+ rw [hgrade.mulArchimedeanClassMk_eq b.prop (by simpa using hb)]
635+
636+ end IsGradeSubgroup
637+
454638end MulArchimedeanClass
455639
456640variable (M) in
0 commit comments