File: Mathlib/CategoryTheory/Galois/Prorepresentability.lean

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.obj
code: /-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
structure PointedGaloisObject : Type (max u₁ u₂) where
  /-- The underlying object of `C`. -/
  obj : C
  /-- An element of the fiber of `obj`. -/
  pt : F.obj obj
  /-- `obj` is Galois. -/
  isGalois : IsGalois obj := by infer_instance
goal: C

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject
code: /-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
structure PointedGaloisObject : Type (max u₁ u₂) where
  /-- The underlying object of `C`. -/
  obj : C
  /-- An element of the fiber of `obj`. -/
  pt : F.obj obj
  /-- `obj` is Galois. -/
  isGalois : IsGalois obj := by infer_instance
goal: Type (max u₁ u₂)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.pt
code: /-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
structure PointedGaloisObject : Type (max u₁ u₂) where
  /-- The underlying object of `C`. -/
  obj : C
  /-- An element of the fiber of `obj`. -/
  pt : F.obj obj
  /-- `obj` is Galois. -/
  isGalois : IsGalois obj := by infer_instance
goal: ↑(F.obj self.obj)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.isGalois
code: /-- A pointed Galois object is a Galois object with a fixed point of its fiber. -/
structure PointedGaloisObject : Type (max u₁ u₂) where
  /-- The underlying object of `C`. -/
  obj : C
  /-- An element of the fiber of `obj`. -/
  pt : F.obj obj
  /-- `obj` is Galois. -/
  isGalois : IsGalois obj := by infer_instance
goal: CategoryTheory.PreGaloisCategory.IsGalois self.obj

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.instCoeDep
code: instance (X : PointedGaloisObject F) : CoeDep (PointedGaloisObject F) X C 
goal: CoeDep (CategoryTheory.PreGaloisCategory.PointedGaloisObject F) X C

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.Hom
code: /-- The type of homomorphisms between two pointed Galois objects. This is a homomorphism
of the underlying objects of `C` that maps the distinguished points to each other. -/
@[ext]
structure Hom (A B : PointedGaloisObject F) where
  /-- The underlying homomorphism of `C`. -/
  val : A.obj ⟶ B.obj
  /-- The distinguished point of `A` is mapped to the distinguished point of `B`. -/
  comp : F.map val A.pt = B.pt := by simp
goal: Type u₂

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.Hom.comp
code: /-- The type of homomorphisms between two pointed Galois objects. This is a homomorphism
of the underlying objects of `C` that maps the distinguished points to each other. -/
@[ext]
structure Hom (A B : PointedGaloisObject F) where
  /-- The underlying homomorphism of `C`. -/
  val : A.obj ⟶ B.obj
  /-- The distinguished point of `A` is mapped to the distinguished point of `B`. -/
  comp : F.map val A.pt = B.pt := by simp
goal: F.map self.val A.pt = B.pt

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.Hom.val
code: /-- The type of homomorphisms between two pointed Galois objects. This is a homomorphism
of the underlying objects of `C` that maps the distinguished points to each other. -/
@[ext]
structure Hom (A B : PointedGaloisObject F) where
  /-- The underlying homomorphism of `C`. -/
  val : A.obj ⟶ B.obj
  /-- The distinguished point of `A` is mapped to the distinguished point of `B`. -/
  comp : F.map val A.pt = B.pt := by simp
goal: A.obj ⟶ B.obj

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.instCategory
code: /-- The category of pointed Galois objects. -/
instance : Category.{u₂} (PointedGaloisObject F) 
goal: CategoryTheory.Category.{u₂, max u₂ u₁} (CategoryTheory.PreGaloisCategory.PointedGaloisObject F)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.instCoeHomHomObj
code: instance {A B : PointedGaloisObject F} : Coe (Hom A B) (A.obj ⟶ B.obj) 
goal: Coe (A.Hom B) (A.obj ⟶ B.obj)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.hom_ext
code: @[ext]
lemma hom_ext {A B : PointedGaloisObject F} {f g : A ⟶ B} (h : f.val = g.val) : f = g 
goal: f = g

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.id_val
code: @[simp]
lemma id_val (A : PointedGaloisObject F) : 𝟙 A = 𝟙 A.obj 
goal: (CategoryTheory.CategoryStruct.id A).val = CategoryTheory.CategoryStruct.id A.obj

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.comp_val
code: @[simp, reassoc]
lemma comp_val {A B C : PointedGaloisObject F} (f : A ⟶ B) (g : B ⟶ C) :
    (f ≫ g).val = f.val ≫ g.val 
goal: ∀ {C_1 : CategoryTheory.PreGaloisCategory.PointedGaloisObject F} (f : A ⟶ B) (g : B ⟶ C_1),
  (CategoryTheory.CategoryStruct.comp f g).val = CategoryTheory.CategoryStruct.comp f.val g.val

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.instIsCofilteredOrEmpty
code: /-- The category of pointed Galois objects is cofiltered. -/
instance : IsCofilteredOrEmpty (PointedGaloisObject F) 
goal: CategoryTheory.IsCofilteredOrEmpty (CategoryTheory.PreGaloisCategory.PointedGaloisObject F)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl
code: /-- The canonical functor from pointed Galois objects to `C`. -/
def incl : PointedGaloisObject F ⥤ C 
goal: CategoryTheory.Functor (CategoryTheory.PreGaloisCategory.PointedGaloisObject F) C

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl_obj
code: @[simp]
lemma incl_obj (A : PointedGaloisObject F) : (incl F).obj A = A 
goal: (CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).obj A = A.obj

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl_map
code: @[simp]
lemma incl_map {A B : PointedGaloisObject F} (f : A ⟶ B) : (incl F).map f = f.val 
goal: (CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).map f = f.val

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone
code: /-- `F ⋙ FintypeCat.incl` as a cocone over `(can F).op ⋙ coyoneda`.
This is a colimit cocone (see `PreGaloisCategory.isColimìt`) -/
def cocone : Cocone ((incl F).op ⋙ coyoneda) 
goal: CategoryTheory.Limits.Cocone
  ((CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).op.comp CategoryTheory.coyoneda)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone_app
code: @[simp]
lemma cocone_app (A : PointedGaloisObject F) (B : C) (f : (A : C) ⟶ B) :
    ((cocone F).ι.app ⟨A⟩).app B f = F.map f A.pt 
goal: ((CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone F).ι.app (Opposite.op A)).app B f = F.map f A.pt

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.isColimit
code: /-- `cocone F` is a colimit cocone, i.e. `F` is pro-represented by `incl F`. -/
noncomputable def isColimit : IsColimit (cocone F) 
goal: CategoryTheory.Limits.IsColimit (CategoryTheory.PreGaloisCategory.PointedGaloisObject.cocone F)

full_name: CategoryTheory.PreGaloisCategory.PointedGaloisObject.instHasColimitOppositeFunctorTypeCompOpInclCoyoneda
code: instance : HasColimit ((incl F).op ⋙ coyoneda) 
goal: CategoryTheory.Limits.HasColimit
  ((CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).op.comp CategoryTheory.coyoneda)

full_name: CategoryTheory.PreGaloisCategory.autGaloisSystem
code: /-- The diagram sending each pointed Galois object to its automorphism group
as an object of `C`. -/
@[simps]
noncomputable def autGaloisSystem : PointedGaloisObject F ⥤ Grp.{u₂} 
goal: CategoryTheory.Functor (CategoryTheory.PreGaloisCategory.PointedGaloisObject F) Grp

full_name: CategoryTheory.PreGaloisCategory.autGaloisSystem_obj
code: /-- The diagram sending each pointed Galois object to its automorphism group
as an object of `C`. -/
@[simps]
noncomputable def autGaloisSystem : PointedGaloisObject F ⥤ Grp.{u₂} 
goal: (CategoryTheory.PreGaloisCategory.autGaloisSystem F).obj A = Grp.of (CategoryTheory.Aut A.obj)

full_name: CategoryTheory.PreGaloisCategory.autGaloisSystem_map
code: /-- The diagram sending each pointed Galois object to its automorphism group
as an object of `C`. -/
@[simps]
noncomputable def autGaloisSystem : PointedGaloisObject F ⥤ Grp.{u₂} 
goal: (CategoryTheory.PreGaloisCategory.autGaloisSystem F).map f = CategoryTheory.PreGaloisCategory.autMapHom f.val

full_name: CategoryTheory.PreGaloisCategory.AutGalois
code: /-- The limit of `autGaloisSystem`.  -/
noncomputable def AutGalois : Type (max u₁ u₂) 
goal: Type (max u₁ u₂)

full_name: CategoryTheory.PreGaloisCategory.instGroupAutGalois
code: noncomputable instance : Group (AutGalois F) 
goal: Group (CategoryTheory.PreGaloisCategory.AutGalois F)

full_name: CategoryTheory.PreGaloisCategory.AutGalois.π
code: /-- The canonical projection from `AutGalois F` to the `C`-automorphism group of each
pointed Galois object. -/
noncomputable def AutGalois.π (A : PointedGaloisObject F) : AutGalois F →* Aut (A : C) 
goal: CategoryTheory.PreGaloisCategory.AutGalois F →* CategoryTheory.Aut A.obj

full_name: CategoryTheory.PreGaloisCategory.AutGalois.π_apply
code: lemma AutGalois.π_apply (A : PointedGaloisObject F) (x : AutGalois F) :
    AutGalois.π F A x = x.val A 
goal: (CategoryTheory.PreGaloisCategory.AutGalois.π F A) x = ↑x A

full_name: CategoryTheory.PreGaloisCategory.autGaloisSystem_map_surjective
code: lemma autGaloisSystem_map_surjective ⦃A B : PointedGaloisObject F⦄ (f : A ⟶ B) :
    Function.Surjective ((autGaloisSystem F).map f) 
goal: Function.Surjective ⇑((CategoryTheory.PreGaloisCategory.autGaloisSystem F).map f)

full_name: CategoryTheory.PreGaloisCategory.AutGalois.π_surjective
code: /-- `autGalois.π` is surjective for every pointed Galois object. -/
theorem AutGalois.π_surjective (A : PointedGaloisObject F) :
    Function.Surjective (AutGalois.π F A) 
goal: Function.Surjective ⇑(CategoryTheory.PreGaloisCategory.AutGalois.π F A)

full_name: CategoryTheory.PreGaloisCategory.AutGalois.ext
code: /-- Equality of elements of `AutGalois F` can be checked on the projections on each pointed
Galois object. -/
lemma AutGalois.ext {f g : AutGalois F}
    (h : ∀ (A : PointedGaloisObject F), AutGalois.π F A f = AutGalois.π F A g) : f = g 
goal: f = g

full_name: CategoryTheory.PreGaloisCategory._aux_Mathlib_CategoryTheory_Galois_Prorepresentability___macroRules_CategoryTheory_PreGaloisCategory_termF'_1
code: local notation "F'" => F ⋙ FintypeCat.incl
goal: Lean.Macro

full_name: CategoryTheory.PreGaloisCategory.endEquivSectionsFibers
code: /-- The endomorphisms of `F` are isomorphic to the limit over the fibers of `F` on all
Galois objects. -/
noncomputable def endEquivSectionsFibers : End F ≃ (incl F ⋙ F').sections 
goal: CategoryTheory.End F ≃
  ↑((CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).comp (F.comp FintypeCat.incl)).sections

full_name: CategoryTheory.PreGaloisCategory.endEquivSectionsFibers_π
code: @[simp]
lemma endEquivSectionsFibers_π (f : End F) (A : PointedGaloisObject F) :
    (endEquivSectionsFibers F f).val A = f.app A A.pt 
goal: ↑((CategoryTheory.PreGaloisCategory.endEquivSectionsFibers F) f) A = f.app A.obj A.pt

full_name: CategoryTheory.PreGaloisCategory.autIsoFibers
code: /-- Functorial isomorphism `Aut A ≅ F.obj A` for Galois objects `A`. -/
noncomputable def autIsoFibers :
    autGaloisSystem F ⋙ forget Grp ≅ incl F ⋙ F' 
goal: (CategoryTheory.PreGaloisCategory.autGaloisSystem F).comp (CategoryTheory.forget Grp) ≅
  (CategoryTheory.PreGaloisCategory.PointedGaloisObject.incl F).comp (F.comp FintypeCat.incl)

full_name: CategoryTheory.PreGaloisCategory.autIsoFibers_inv_app
code: lemma autIsoFibers_inv_app (A : PointedGaloisObject F) (b : F.obj A) :
    (autIsoFibers F).inv.app A b = (evaluationEquivOfIsGalois F A A.pt).symm b 
goal: (CategoryTheory.PreGaloisCategory.autIsoFibers F).inv.app A b =
  (CategoryTheory.PreGaloisCategory.evaluationEquivOfIsGalois F A.obj A.pt).symm b

full_name: CategoryTheory.PreGaloisCategory.endEquivAutGalois
code: /-- The equivalence between endomorphisms of `F` and the limit over the automorphism groups
of all Galois objects. -/
noncomputable def endEquivAutGalois : End F ≃ AutGalois F 
goal: CategoryTheory.End F ≃ CategoryTheory.PreGaloisCategory.AutGalois F

full_name: CategoryTheory.PreGaloisCategory.endEquivAutGalois_π
code: lemma endEquivAutGalois_π (f : End F) (A : PointedGaloisObject F) :
    F.map (AutGalois.π F A (endEquivAutGalois F f)).hom A.pt = f.app A A.pt 
goal: F.map
    ((CategoryTheory.PreGaloisCategory.AutGalois.π F A) ((CategoryTheory.PreGaloisCategory.endEquivAutGalois F) f)).hom
    A.pt =
  f.app A.obj A.pt

full_name: CategoryTheory.PreGaloisCategory.endEquivAutGalois_mul
code: @[simp]
theorem endEquivAutGalois_mul (f g : End F) :
    (endEquivAutGalois F) (g ≫ f) = (endEquivAutGalois F g) * (endEquivAutGalois F f) 
goal: (CategoryTheory.PreGaloisCategory.endEquivAutGalois F) (CategoryTheory.CategoryStruct.comp g f) =
  (CategoryTheory.PreGaloisCategory.endEquivAutGalois F) g * (CategoryTheory.PreGaloisCategory.endEquivAutGalois F) f

full_name: CategoryTheory.PreGaloisCategory.endMulEquivAutGalois
code: /-- The monoid isomorphism between endomorphisms of `F` and the (multiplicative opposite of the)
limit of automorphism groups of all Galois objects. -/
noncomputable def endMulEquivAutGalois : End F ≃* (AutGalois F)ᵐᵒᵖ 
goal: CategoryTheory.End F ≃* (CategoryTheory.PreGaloisCategory.AutGalois F)ᵐᵒᵖ

full_name: CategoryTheory.PreGaloisCategory.endMulEquivAutGalois_pi
code: lemma endMulEquivAutGalois_pi (f : End F) (A : PointedGaloisObject F) :
    F.map (AutGalois.π F A (endMulEquivAutGalois F f).unop).hom A.2 = f.app A A.pt 
goal: F.map
    ((CategoryTheory.PreGaloisCategory.AutGalois.π F A)
        (MulOpposite.unop ((CategoryTheory.PreGaloisCategory.endMulEquivAutGalois F) f))).hom
    A.pt =
  f.app A.obj A.pt

full_name: CategoryTheory.PreGaloisCategory.FibreFunctor.end_isUnit
code: /-- Any endomorphism of a fiber functor is a unit. -/
theorem FibreFunctor.end_isUnit (f : End F) : IsUnit f 
goal: IsUnit f

full_name: CategoryTheory.PreGaloisCategory.FibreFunctor.end_isIso
code: /-- Any endomorphism of a fiber functor is an isomorphism. -/
instance FibreFunctor.end_isIso (f : End F) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.PreGaloisCategory.autMulEquivAutGalois
code: /-- The automorphism group of `F` is multiplicatively isomorphic to
(the multiplicative opposite of) the limit over the automorphism groups of
the Galois objects. -/
noncomputable def autMulEquivAutGalois : Aut F ≃* (AutGalois F)ᵐᵒᵖ 
goal: CategoryTheory.Aut F ≃* (CategoryTheory.PreGaloisCategory.AutGalois F)ᵐᵒᵖ

full_name: CategoryTheory.PreGaloisCategory.autMulEquivAutGalois_π
code: lemma autMulEquivAutGalois_π (f : Aut F) (A : C) [IsGalois A] (a : F.obj A) :
    F.map (AutGalois.π F { obj := A, pt := a } (autMulEquivAutGalois F f).unop).hom a =
      f.hom.app A a 
goal: F.map
    ((CategoryTheory.PreGaloisCategory.AutGalois.π F { obj := A, pt := a, isGalois := ⋯ })
        (MulOpposite.unop ((CategoryTheory.PreGaloisCategory.autMulEquivAutGalois F) f))).hom
    a =
  f.hom.app A a

full_name: CategoryTheory.PreGaloisCategory.autMulEquivAutGalois_symm_app
code: @[simp]
lemma autMulEquivAutGalois_symm_app (x : AutGalois F) (A : C) [IsGalois A] (a : F.obj A) :
    ((autMulEquivAutGalois F).symm ⟨x⟩).hom.app A a =
      F.map (AutGalois.π F ⟨A, a, inferInstance⟩ x).hom a 
goal: ((CategoryTheory.PreGaloisCategory.autMulEquivAutGalois F).symm { unop' := x }).hom.app A a =
  F.map ((CategoryTheory.PreGaloisCategory.AutGalois.π F { obj := A, pt := a, isGalois := ⋯ }) x).hom a

full_name: CategoryTheory.PreGaloisCategory.FiberFunctor.isPretransitive_of_isGalois
code: /-- The `Aut F` action on the fiber of a Galois object is transitive. See
`pretransitive_of_isConnected` for the same result for connected objects. -/
theorem FiberFunctor.isPretransitive_of_isGalois (X : C) [IsGalois X] :
    MulAction.IsPretransitive (Aut F) (F.obj X) 
goal: MulAction.IsPretransitive (CategoryTheory.Aut F) ↑(F.obj X)

full_name: CategoryTheory.PreGaloisCategory.FiberFunctor.isPretransitive_of_isConnected
code: /-- The `Aut F` action on the fiber of a connected object is transitive. -/
instance FiberFunctor.isPretransitive_of_isConnected (X : C) [IsConnected X] :
    MulAction.IsPretransitive (Aut F) (F.obj X) 
goal: MulAction.IsPretransitive (CategoryTheory.Aut F) ↑(F.obj X)