Skip to content

Commit 718a757

Browse files
committed
feat(CategoryTheory/Galois): generalize transitivity to arbitrary universes (#16664)
The construction of the isomorphism of `Aut F` with the inverse limit of the automorphism groups of the Galois objects restricts the target category of `F` to be `FintypeCat.{v}` where `v` is the `Hom`-universe of `C`. Still, the transitivity of the action of `Aut F` on the fibers of connected objects can be generalized to arbitrary `F : C ⥤ FintypeCat.{w}` by post-composing with an equivalence `FintypeCat.{v} ≌ FintypeCat.{w}`.
1 parent 24f0179 commit 718a757

File tree

7 files changed

+174
-19
lines changed

7 files changed

+174
-19
lines changed

Mathlib/CategoryTheory/FintypeCat.lean

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def equivEquivIso {A B : FintypeCat} : A ≃ B ≃ (A ≅ B) where
9999
left_inv := by aesop_cat
100100
right_inv := by aesop_cat
101101

102-
instance foo (X Y : FintypeCat) : Finite (X ⟶ Y) :=
102+
instance (X Y : FintypeCat) : Finite (X ⟶ Y) :=
103103
inferInstanceAs <| Finite (X → Y)
104104

105105
instance (X Y : FintypeCat) : Finite (X ≅ Y) :=
@@ -198,5 +198,76 @@ lemma isSkeleton : IsSkeletonOf FintypeCat Skeleton Skeleton.incl where
198198
skel := Skeleton.is_skeletal
199199
eqv := by infer_instance
200200

201+
section Universes
202+
203+
universe v
204+
205+
/-- If `u` and `v` are two arbitrary universes, we may construct a functor
206+
`uSwitch.{u, v} : FintypeCat.{u} ⥤ FintypeCat.{v}` by sending
207+
`X : FintypeCat.{u}` to `ULift.{v} (Fin (Fintype.card X))`. -/
208+
noncomputable def uSwitch : FintypeCat.{u} ⥤ FintypeCat.{v} where
209+
obj X := FintypeCat.of <| ULift.{v} (Fin (Fintype.card X))
210+
map {X Y} f x := ULift.up <| (Fintype.equivFin Y) (f ((Fintype.equivFin X).symm x.down))
211+
map_comp {X Y Z} f g := by ext; simp
212+
213+
/-- Switching the universe of an object `X : FintypeCat.{u}` does not change `X` up to equivalence
214+
of types. This is natural in the sense that it commutes with `uSwitch.map f` for
215+
any `f : X ⟶ Y` in `FintypeCat.{u}`. -/
216+
noncomputable def uSwitchEquiv (X : FintypeCat.{u}) :
217+
uSwitch.{u, v}.obj X ≃ X :=
218+
Equiv.ulift.trans (Fintype.equivFin X).symm
219+
220+
lemma uSwitchEquiv_naturality {X Y : FintypeCat.{u}} (f : X ⟶ Y)
221+
(x : uSwitch.{u, v}.obj X) :
222+
f (X.uSwitchEquiv x) = Y.uSwitchEquiv (uSwitch.map f x) := by
223+
simp only [uSwitch, uSwitchEquiv, Equiv.trans_apply]
224+
erw [Equiv.ulift_apply, Equiv.ulift_apply]
225+
simp only [Equiv.symm_apply_apply]
226+
227+
lemma uSwitchEquiv_symm_naturality {X Y : FintypeCat.{u}} (f : X ⟶ Y) (x : X) :
228+
uSwitch.map f (X.uSwitchEquiv.symm x) = Y.uSwitchEquiv.symm (f x) := by
229+
rw [← Equiv.apply_eq_iff_eq_symm_apply, ← uSwitchEquiv_naturality f,
230+
Equiv.apply_symm_apply]
231+
232+
lemma uSwitch_map_uSwitch_map {X Y : FintypeCat.{u}} (f : X ⟶ Y) :
233+
uSwitch.map (uSwitch.map f) =
234+
(equivEquivIso ((uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv)).hom ≫
235+
f ≫ (equivEquivIso ((uSwitch.obj Y).uSwitchEquiv.trans
236+
Y.uSwitchEquiv)).inv := by
237+
ext x
238+
simp only [comp_apply, equivEquivIso_apply_hom, Equiv.trans_apply]
239+
rw [uSwitchEquiv_naturality f, ← uSwitchEquiv_naturality]
240+
rfl
241+
242+
/-- `uSwitch.{u, v}` is an equivalence of categories with quasi-inverse `uSwitch.{v, u}`. -/
243+
noncomputable def uSwitchEquivalence : FintypeCat.{u} ≌ FintypeCat.{v} where
244+
functor := uSwitch
245+
inverse := uSwitch
246+
unitIso := NatIso.ofComponents (fun X ↦ (equivEquivIso <|
247+
(uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv).symm) <| by
248+
simp [uSwitch_map_uSwitch_map]
249+
counitIso := NatIso.ofComponents (fun X ↦ equivEquivIso <|
250+
(uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv) <| by
251+
simp [uSwitch_map_uSwitch_map]
252+
functor_unitIso_comp X := by
253+
ext x
254+
simp [← uSwitchEquiv_naturality]
255+
256+
instance : uSwitch.IsEquivalence :=
257+
uSwitchEquivalence.isEquivalence_functor
258+
259+
end Universes
201260

202261
end FintypeCat
262+
263+
namespace FunctorToFintypeCat
264+
265+
universe u v w
266+
267+
variable {C : Type u} [Category.{v} C] (F G : C ⥤ FintypeCat.{w}) {X Y : C}
268+
269+
lemma naturality (σ : F ⟶ G) (f : X ⟶ Y) (x : F.obj X) :
270+
σ.app Y (F.map f x) = G.map f (σ.app X x) :=
271+
congr_fun (σ.naturality f) x
272+
273+
end FunctorToFintypeCat

Mathlib/CategoryTheory/Galois/Action.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace PreGaloisCategory
2626

2727
open Limits Functor
2828

29-
variable {C : Type u} [Category.{u} C] (F : C ⥤ FintypeCat.{u})
29+
variable {C : Type u} [Category.{v} C] (F : C ⥤ FintypeCat.{u})
3030

3131
/-- Any (fiber) functor `F : C ⥤ FintypeCat` naturally factors via
3232
the forgetful functor from `Action FintypeCat (MonCat.of (Aut F))` to `FintypeCat`. -/
@@ -76,7 +76,7 @@ noncomputable instance : PreservesFiniteProducts (functorToAction F) :=
7676
fun J _ ↦ Action.preservesLimitsOfShapeOfPreserves (functorToAction F)
7777
(inferInstanceAs <| PreservesLimitsOfShape (Discrete J) F)⟩
7878

79-
noncomputable instance (G : Type u) [Group G] [Finite G] :
79+
noncomputable instance (G : Type*) [Group G] [Finite G] :
8080
PreservesColimitsOfShape (SingleObj G) (functorToAction F) :=
8181
Action.preservesColimitsOfShapeOfPreserves _ <|
8282
inferInstanceAs <| PreservesColimitsOfShape (SingleObj G) F

Mathlib/CategoryTheory/Galois/Basic.lean

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ Copyright (c) 2024 Christian Merten. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Christian Merten
55
-/
6-
import Mathlib.CategoryTheory.FintypeCat
76
import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
87
import Mathlib.CategoryTheory.Limits.FintypeCat
98
import Mathlib.CategoryTheory.Limits.MonoCoprod
10-
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Terminal
11-
import Mathlib.CategoryTheory.Limits.Shapes.Types
129
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
1310
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
1411
import Mathlib.CategoryTheory.SingleObj
1512
import Mathlib.Data.Finite.Card
13+
import Mathlib.Logic.Equiv.TransferInstance
1614

1715
/-!
1816
# Definition and basic properties of Galois categories
@@ -41,7 +39,7 @@ as this is not needed for the proof of the fundamental theorem on Galois categor
4139
4240
-/
4341

44-
universe u₁ u₂ v₁ v₂ w
42+
universe u₁ u₂ v₁ v₂ w t
4543

4644
namespace CategoryTheory
4745

@@ -117,6 +115,11 @@ instance : HasBinaryProducts C := hasBinaryProducts_of_hasTerminal_and_pullbacks
117115

118116
instance : HasEqualizers C := hasEqualizers_of_hasPullbacks_and_binary_products
119117

118+
-- A `PreGaloisCategory` has quotients by finite groups in arbitrary universes. -/
119+
instance {G : Type*} [Group G] [Finite G] : HasColimitsOfShape (SingleObj G) C := by
120+
obtain ⟨G', hg, hf, ⟨e⟩⟩ := Finite.exists_type_univ_nonempty_mulEquiv G
121+
exact Limits.hasColimitsOfShape_of_equivalence e.toSingleObjEquiv.symm
122+
120123
end
121124

122125
namespace FiberFunctor
@@ -136,6 +139,12 @@ noncomputable instance : ReflectsColimitsOfShape (Discrete PEmpty.{1}) F :=
136139
noncomputable instance : PreservesFiniteLimits F :=
137140
preservesFiniteLimitsOfPreservesTerminalAndPullbacks F
138141

142+
/-- Fiber functors preserve quotients by finite groups in arbitrary universes. -/
143+
noncomputable instance {G : Type*} [Group G] [Finite G] :
144+
PreservesColimitsOfShape (SingleObj G) F := by
145+
choose G' hg hf he using Finite.exists_type_univ_nonempty_mulEquiv G
146+
exact Limits.preservesColimitsOfShapeOfEquiv he.some.toSingleObjEquiv.symm F
147+
139148
/-- Fiber functors reflect monomorphisms. -/
140149
instance : ReflectsMonomorphisms F := ReflectsMonomorphisms.mk <| by
141150
intro X Y f _
@@ -157,6 +166,16 @@ instance : F.Faithful where
157166
haveI : IsIso (equalizer.ι f g) := isIso_of_reflects_iso _ F
158167
exact eq_of_epi_equalizer
159168

169+
section
170+
171+
/-- If `F` is a fiber functor and `E` is an equivalence between categories of finite types,
172+
then `F ⋙ E` is again a fiber functor. -/
173+
noncomputable def compRight (E : FintypeCat.{w} ⥤ FintypeCat.{t}) [E.IsEquivalence] :
174+
FiberFunctor (F ⋙ E) where
175+
preservesQuotientsByFiniteGroups G := compPreservesColimitsOfShape F E
176+
177+
end
178+
160179
end FiberFunctor
161180

162181
variable {C : Type u₁} [Category.{u₂, u₁} C]

Mathlib/CategoryTheory/Galois/Examples.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ instance {X Y : Action FintypeCat (MonCat.of G)} (f : X ⟶ Y) :
7474

7575
/-- The category of finite sets has quotients by finite groups in arbitrary universes. -/
7676
instance [Finite G] : HasColimitsOfShape (SingleObj G) FintypeCat.{w} := by
77-
obtain ⟨G', hg, hf, ⟨e⟩⟩ := Finite.exists_type_zero_nonempty_mulEquiv G
77+
obtain ⟨G', hg, hf, ⟨e⟩⟩ := Finite.exists_type_univ_nonempty_mulEquiv G
7878
exact Limits.hasColimitsOfShape_of_equivalence e.toSingleObjEquiv.symm
7979

8080
noncomputable instance : PreservesFiniteLimits (forget (Action FintypeCat (MonCat.of G))) := by

Mathlib/CategoryTheory/Galois/GaloisObjects.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ open Limits Functor
3535

3636
noncomputable instance {G : Type v} [Group G] [Finite G] :
3737
PreservesColimitsOfShape (SingleObj G) FintypeCat.incl.{w} := by
38-
choose G' hg hf e using Finite.exists_type_zero_nonempty_mulEquiv G
38+
choose G' hg hf e using Finite.exists_type_univ_nonempty_mulEquiv G
3939
exact Limits.preservesColimitsOfShapeOfEquiv (Classical.choice e).toSingleObjEquiv.symm _
4040

4141
/-- A connected object `X` of `C` is Galois if the quotient `X / Aut X` is terminal. -/

Mathlib/CategoryTheory/Galois/Prorepresentability.lean

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Authors: Christian Merten
66
import Mathlib.Algebra.Category.Grp.Limits
77
import Mathlib.CategoryTheory.CofilteredSystem
88
import Mathlib.CategoryTheory.Galois.Decomposition
9-
import Mathlib.CategoryTheory.Limits.FunctorCategory.Basic
109
import Mathlib.CategoryTheory.Limits.IndYoneda
1110
import Mathlib.CategoryTheory.Limits.Preserves.Ulift
1211

@@ -34,6 +33,20 @@ groups of all Galois objects.
3433
- `FiberFunctor.isPretransitive_of_isConnected`: The `Aut F` action on the fiber of a connected
3534
object is transitive.
3635
36+
## Implementation details
37+
38+
The pro-representability statement and the isomorphism of `Aut F` with the limit over the
39+
automorphism groups of all Galois objects naturally forces `F` to take values in `FintypeCat.{u₂}`
40+
where `u₂` is the `Hom`-universe of `C`. Since this is used to show that `Aut F` acts
41+
transitively on `F.obj X` for connected `X`, we a priori only obtain this result for
42+
the mentioned specialized universe setup. To obtain the result for `F` taking values in an arbitrary
43+
`FintypeCat.{w}`, we postcompose with an equivalence `FintypeCat.{w} ≌ FintypeCat.{u₂}` and apply
44+
the specialized result.
45+
46+
In the following the section `Specialized` is reserved for the setup where `F` takes values in
47+
`FintypeCat.{u₂}` and the section `General` contains results holding for `F` taking values in
48+
an arbitrary `FintypeCat.{w}`.
49+
3750
## References
3851
3952
* [lenstraGSchemes]: H. W. Lenstra. Galois theory for schemes.
@@ -49,9 +62,9 @@ namespace PreGaloisCategory
4962
open Limits Functor
5063

5164
variable {C : Type u₁} [Category.{u₂} C] [GaloisCategory C]
52-
variable (F : C ⥤ FintypeCat.{u₂})
65+
5366
/-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
54-
structure PointedGaloisObject : Type (max u₁ u₂) where
67+
structure PointedGaloisObject (F : C ⥤ FintypeCat.{w}) : Type (max u₁ u₂ w) where
5568
/-- The underlying object of `C`. -/
5669
obj : C
5770
/-- An element of the fiber of `obj`. -/
@@ -61,6 +74,10 @@ structure PointedGaloisObject : Type (max u₁ u₂) where
6174

6275
namespace PointedGaloisObject
6376

77+
section General
78+
79+
variable (F : C ⥤ FintypeCat.{w})
80+
6481
attribute [instance] isGalois
6582

6683
instance (X : PointedGaloisObject F) : CoeDep (PointedGaloisObject F) X C where
@@ -117,6 +134,12 @@ lemma incl_obj (A : PointedGaloisObject F) : (incl F).obj A = A :=
117134
lemma incl_map {A B : PointedGaloisObject F} (f : A ⟶ B) : (incl F).map f = f.val :=
118135
rfl
119136

137+
end General
138+
139+
section Specialized
140+
141+
variable (F : C ⥤ FintypeCat.{u₂})
142+
120143
/-- `F ⋙ FintypeCat.incl` as a cocone over `(can F).op ⋙ coyoneda`.
121144
This is a colimit cocone (see `PreGaloisCategory.isColimìt`) -/
122145
def cocone : Cocone ((incl F).op ⋙ coyoneda) where
@@ -172,10 +195,16 @@ noncomputable def isColimit : IsColimit (cocone F) := by
172195
instance : HasColimit ((incl F).op ⋙ coyoneda) where
173196
exists_colimit := ⟨cocone F, isColimit F⟩
174197

198+
end Specialized
199+
175200
end PointedGaloisObject
176201

177202
open PointedGaloisObject
178203

204+
section Specialized
205+
206+
variable (F : C ⥤ FintypeCat.{u₂})
207+
179208
/-- The diagram sending each pointed Galois object to its automorphism group
180209
as an object of `C`. -/
181210
@[simps]
@@ -393,8 +422,9 @@ theorem FiberFunctor.isPretransitive_of_isGalois (X : C) [IsGalois X] :
393422
use (autMulEquivAutGalois F).symm ⟨a⟩
394423
simpa [mulAction_def, ha]
395424

396-
/-- The `Aut F` action on the fiber of a connected object is transitive. -/
397-
instance FiberFunctor.isPretransitive_of_isConnected (X : C) [IsConnected X] :
425+
/-- The `Aut F` action on the fiber of a connected object is transitive. For a version
426+
with less restrictive universe assumptions, see `FiberFunctor.isPretransitive_of_isConnected`. -/
427+
private instance FiberFunctor.isPretransitive_of_isConnected' (X : C) [IsConnected X] :
398428
MulAction.IsPretransitive (Aut F) (F.obj X) := by
399429
obtain ⟨A, f, hgal⟩ := exists_hom_from_galois_of_connected F X
400430
have hs : Function.Surjective (F.map f) := surjective_of_nonempty_fiber_of_isConnected F f
@@ -408,6 +438,39 @@ instance FiberFunctor.isPretransitive_of_isConnected (X : C) [IsConnected X] :
408438
show (F.map f ≫ σ.hom.app X) a = F.map f b
409439
rw [σ.hom.naturality, FintypeCat.comp_apply, hσ]
410440

441+
end Specialized
442+
443+
section General
444+
445+
variable (F : C ⥤ FintypeCat.{w}) [FiberFunctor F]
446+
447+
/-- The `Aut F` action on the fiber of a connected object is transitive. -/
448+
instance FiberFunctor.isPretransitive_of_isConnected (X : C) [IsConnected X] :
449+
MulAction.IsPretransitive (Aut F) (F.obj X) where
450+
exists_smul_eq x y := by
451+
let F' : C ⥤ FintypeCat.{u₂} := F ⋙ FintypeCat.uSwitch.{w, u₂}
452+
letI : FiberFunctor F' := FiberFunctor.compRight _
453+
let e (Y : C) : F'.obj Y ≃ F.obj Y := (F.obj Y).uSwitchEquiv
454+
set x' : F'.obj X := (e X).symm x with hx'
455+
set y' : F'.obj X := (e X).symm y with hy'
456+
obtain ⟨g', (hg' : g'.hom.app X x' = y')⟩ := MulAction.exists_smul_eq (Aut F') x' y'
457+
let gapp (Y : C) : F.obj Y ≅ F.obj Y := FintypeCat.equivEquivIso <|
458+
(e Y).symm.trans <| (FintypeCat.equivEquivIso.symm (g'.app Y)).trans (e Y)
459+
let g : F ≅ F := NatIso.ofComponents gapp <| fun {X Y} f ↦ by
460+
ext x
461+
simp only [FintypeCat.comp_apply, FintypeCat.equivEquivIso_apply_hom,
462+
Equiv.trans_apply, FintypeCat.equivEquivIso_symm_apply_apply, Iso.app_hom, gapp, e]
463+
erw [FintypeCat.uSwitchEquiv_naturality (F.map f)]
464+
rw [← Functor.comp_map, ← FunctorToFintypeCat.naturality]
465+
simp only [comp_obj, Functor.comp_map, F']
466+
rw [FintypeCat.uSwitchEquiv_symm_naturality (F.map f)]
467+
refine ⟨g, show (gapp X).hom x = y from ?_⟩
468+
simp only [FintypeCat.equivEquivIso_apply_hom, Equiv.trans_apply,
469+
FintypeCat.equivEquivIso_symm_apply_apply, Iso.app_hom, gapp]
470+
rw [← hx', hg', hy', Equiv.apply_symm_apply]
471+
472+
end General
473+
411474
end PreGaloisCategory
412475

413476
end CategoryTheory

Mathlib/Logic/Equiv/TransferInstance.lean

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,13 @@ namespace Finite
677677

678678
attribute [-instance] Fin.instMul
679679

680-
/-- Any finite group in universe `u` is equivalent to some finite group in universe `0`. -/
681-
lemma exists_type_zero_nonempty_mulEquiv (G : Type u) [Group G] [Finite G] :
682-
∃ (G' : Type) (_ : Group G') (_ : Fintype G'), Nonempty (G ≃* G') := by
680+
/-- Any finite group in universe `u` is equivalent to some finite group in universe `v`. -/
681+
lemma exists_type_univ_nonempty_mulEquiv (G : Type u) [Group G] [Finite G] :
682+
∃ (G' : Type v) (_ : Group G') (_ : Fintype G'), Nonempty (G ≃* G') := by
683683
obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin G
684-
letI groupH : Group (Fin n) := Equiv.group e.symm
685-
exact ⟨Fin n, inferInstance, inferInstance, ⟨MulEquiv.symm <| Equiv.mulEquiv e.symm⟩⟩
684+
let f : Fin n ≃ ULift (Fin n) := Equiv.ulift.symm
685+
let e : G ≃ ULift (Fin n) := e.trans f
686+
letI groupH : Group (ULift (Fin n)) := e.symm.group
687+
exact ⟨ULift (Fin n), groupH, inferInstance, ⟨MulEquiv.symm <| e.symm.mulEquiv⟩⟩
686688

687689
end Finite

0 commit comments

Comments
 (0)