Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
e3f0045
refactoring ModuleCat.Presheaf
joelriou Sep 10, 2024
00ead34
wip
joelriou Sep 10, 2024
39a0013
fixed Presheaf.Limits
joelriou Sep 11, 2024
458a34c
fix docstrings
joelriou Sep 11, 2024
4986072
fixed Presheaf.Colimits
joelriou Sep 11, 2024
2f85fa6
wip
joelriou Sep 11, 2024
47b3337
fixed ModuleCat.Sheaf
joelriou Sep 11, 2024
bcb4088
fixed Sheaf.ChangeOfRings
joelriou Sep 11, 2024
61d4ac8
fixed Presheaf.Sheafify
joelriou Sep 12, 2024
ae99ab9
wip
joelriou Sep 12, 2024
94eb640
fixed Presheaf.Sheafification
joelriou Sep 12, 2024
ade38cf
fixed Differentials.Presheaf
joelriou Sep 13, 2024
919b915
feat(Algebra/Category/ModuleCat): the free presheaf of modules functor
joelriou Sep 13, 2024
ab3f04b
AIM note
joelriou Sep 13, 2024
f7e9796
fixing AG.Modules.Tilde
joelriou Sep 13, 2024
e0eccec
cleaning up
joelriou Sep 13, 2024
aae13f3
Merge remote-tracking branch 'origin/refactor-presheaf-of-modules' in…
joelriou Sep 13, 2024
177dbdf
fixed GroupCohomology.Resolution
joelriou Sep 13, 2024
be238ef
cleaning up
joelriou Sep 13, 2024
e833541
cleaning up
joelriou Sep 13, 2024
3c589a0
Merge remote-tracking branch 'origin/refactor-presheaf-of-modules' in…
joelriou Sep 13, 2024
1e15c86
added docstrings
joelriou Sep 14, 2024
b0edaa3
Merge remote-tracking branch 'origin' into the-free-presheaf-of-modul…
joelriou Sep 27, 2024
6b0c727
fixing the build
joelriou Sep 27, 2024
68d109c
cleaning up
joelriou Sep 27, 2024
f9171f7
coding style
joelriou Sep 27, 2024
aab62c4
typo
joelriou Sep 27, 2024
f168dc3
Merge remote-tracking branch 'origin' into the-free-presheaf-of-modul…
joelriou Sep 27, 2024
4fb41e7
Merge remote-tracking branch 'origin' into the-free-presheaf-of-modul…
joelriou Sep 28, 2024
8adc243
Merge remote-tracking branch 'origin' into the-free-presheaf-of-modul…
joelriou Oct 2, 2024
ddca67f
feat(Algebra/ModuleCat/Presheaf): pullback of presheaves of modules
joelriou Oct 2, 2024
ac4c27d
some progress
joelriou Oct 3, 2024
a038f77
refactoring (co)Representable
joelriou Oct 3, 2024
2fdfb7c
feat(CategoryTheory/Adjunction): definition set of the left adjoint
joelriou Oct 3, 2024
5298580
refactor(CategoryTheory): generalize universes for representable func…
joelriou Oct 3, 2024
67e6706
fixing the build
joelriou Oct 3, 2024
fe09896
fixing the build
joelriou Oct 3, 2024
9f734a1
better name
joelriou Oct 3, 2024
1763ad2
Merge remote-tracking branch 'origin/refactor-representable-functors-…
joelriou Oct 3, 2024
c2eab62
cleaning up
joelriou Oct 3, 2024
c6f9b68
renaming the file
joelriou Oct 3, 2024
4d23efb
Merge remote-tracking branch 'origin/adjoint-definition-set' into pre…
joelriou Oct 3, 2024
6ea1bba
fix imports
joelriou Oct 3, 2024
668b6e9
cleaning up
joelriou Oct 3, 2024
cdbb1f4
finished the proof
joelriou Oct 4, 2024
6921482
Merge remote-tracking branch 'origin' into adjoint-definition-set
joelriou Oct 4, 2024
c652142
typo
joelriou Oct 4, 2024
6f7c8c4
Merge remote-tracking branch 'origin/adjoint-definition-set' into pre…
joelriou Oct 4, 2024
3646289
Merge remote-tracking branch 'origin' into presheaf-of-modules-pullback
joelriou Oct 4, 2024
b066528
added docstrings
joelriou Oct 4, 2024
0135678
cleaning up
joelriou Oct 4, 2024
929bba3
Merge remote-tracking branch 'origin/adjoint-definition-set' into pre…
joelriou Oct 4, 2024
8e34bf0
Merge remote-tracking branch 'origin' into presheaf-of-modules-pullback
joelriou Oct 4, 2024
23724a9
fixed imports
joelriou Oct 4, 2024
012042c
fix
joelriou Oct 4, 2024
ceb6806
Merge remote-tracking branch 'origin' into presheaf-of-modules-pullback
joelriou Oct 7, 2024
20db559
Merge remote-tracking branch 'origin' into presheaf-of-modules-pullback
joelriou Oct 9, 2024
853a093
compatibilities for pushforward
joelriou Oct 9, 2024
3c50683
obtained compatibilities
joelriou Oct 10, 2024
85f2f72
Merge remote-tracking branch 'origin' into presheaf-of-modules-pullba…
joelriou Jan 23, 2025
e2db97e
Merge remote-tracking branch 'origin/master' into presheaf-of-modules…
joelriou Oct 8, 2025
0b41e2d
fix Mathlib.lean
joelriou Oct 8, 2025
693a91a
wip
joelriou Oct 8, 2025
957b5c7
wip
joelriou Oct 8, 2025
3028d04
wip
joelriou Oct 8, 2025
c3c3e6c
wip
joelriou Oct 8, 2025
8f76cdb
wip
joelriou Oct 8, 2025
5d7c2a3
wip
joelriou Oct 8, 2025
6ac08eb
wip
joelriou Oct 8, 2025
7328a6e
removed sorries
joelriou Oct 8, 2025
3089317
updating Mathlib.lean
joelriou Oct 8, 2025
01e0cbe
feat(CategoryTheory/Adjunction): more mate compatibilities
joelriou Oct 8, 2025
f70afec
updating Mathlib.lean
joelriou Oct 8, 2025
6d8ba74
Merge remote-tracking branch 'origin/adjunction-composition-iso' into…
joelriou Oct 8, 2025
e5dded0
feat(Algebra/CategoryTheory/ModuleCat/Sheaf): compatibilities of pull…
joelriou Oct 8, 2025
151c935
feat(AlgebraicGeometry): the pseudofunctor sending a scheme to its ca…
joelriou Oct 8, 2025
daabf75
better instances
joelriou Oct 8, 2025
e931f34
sorry free
joelriou Oct 9, 2025
823ecd4
cleaning up
joelriou Oct 9, 2025
31e9b54
docstrings
joelriou Oct 9, 2025
fa58352
Merge remote-tracking branch 'origin/master' into scheme-modules-pseu…
joelriou Oct 30, 2025
8789b59
Merge remote-tracking branch 'origin/master' into scheme-modules-pseu…
joelriou Nov 20, 2025
54fd231
wip
joelriou Nov 20, 2025
4b0cc0f
Merge remote-tracking branch 'origin/master' into scheme-modules-pseu…
joelriou Nov 21, 2025
f596d5d
clean up
joelriou Nov 21, 2025
eae0291
better def
joelriou Nov 21, 2025
f58746b
better syntax
joelriou Nov 21, 2025
09de33f
better syntax
joelriou Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,7 @@ public import Mathlib.CategoryTheory.Adjunction.Whiskering
public import Mathlib.CategoryTheory.Balanced
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Adj
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Basic
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Cat
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Mate
public import Mathlib.CategoryTheory.Bicategory.Basic
public import Mathlib.CategoryTheory.Bicategory.CatEnriched
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/ModuleCat/Sheaf/Abelian.lean
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace SheafOfModules
variable (R : Sheaf J RingCat.{u}) [HasSheafify J AddCommGrpCat.{v}]
[J.WEqualsLocallyBijective AddCommGrpCat.{v}]

noncomputable instance : Abelian (SheafOfModules.{v} R) := by
instance : Abelian (SheafOfModules.{v} R) := by
let adj := PresheafOfModules.sheafificationAdjunction (𝟙 R.val)
exact abelianOfAdjunction _ _ (asIso (adj.counit)) adj

Expand Down
15 changes: 15 additions & 0 deletions Mathlib/Algebra/Category/ModuleCat/Sheaf/PullbackContinuous.lean
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ category of sheaves of modules. -/
noncomputable def pullbackId : pullback.{v} (F := 𝟭 C) (𝟙 S) ≅ 𝟭 _ :=
((pullbackPushforwardAdjunction.{v} (F := 𝟭 C) (𝟙 S))).leftAdjointIdIso (pushforwardId S)

variable (S) in
@[simp]
lemma conjugateEquiv_pullbackId_hom :
conjugateEquiv .id (pullbackPushforwardAdjunction.{v} _) (pullbackId S).hom =
(pushforwardId S).inv :=
Adjunction.conjugateEquiv_leftAdjointIdIso_hom _ _

variable [(pushforward.{v} φ).IsRightAdjoint]

section
Expand Down Expand Up @@ -164,6 +171,14 @@ noncomputable def pullbackComp :
(φ ≫ (F.sheafPushforwardContinuous RingCat.{u} J K).map ψ))
(pushforwardComp φ ψ)

@[simp]
lemma conjugateEquiv_pullbackComp_inv :
conjugateEquiv ((pullbackPushforwardAdjunction.{v} φ).comp
(pullbackPushforwardAdjunction.{v} ψ))
(pullbackPushforwardAdjunction.{v} _) (pullbackComp.{v} φ ψ).inv =
(pushforwardComp.{v} φ ψ).hom :=
Adjunction.conjugateEquiv_leftAdjointCompIso_inv _ _ _ _

variable {G' : D' ⥤ D''} {R'' : Sheaf K'' RingCat.{u}}
[Functor.IsContinuous.{u} G' K' K''] [Functor.IsContinuous.{v} G' K' K'']
[Functor.IsContinuous.{u} (G ⋙ G') K K'']
Expand Down
163 changes: 152 additions & 11 deletions Mathlib/AlgebraicGeometry/Modules/Sheaf.lean
Original file line number Diff line number Diff line change
@@ -1,39 +1,180 @@
/-
Copyright (c) 2024 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
Authors: Joël Riou, Andrew Yang
-/
module

public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
public import Mathlib.AlgebraicGeometry.Modules.Presheaf
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Adj
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Cat
public import Mathlib.CategoryTheory.Bicategory.Functor.LocallyDiscrete

/-!
# The category of sheaves of modules over a scheme
In this file, we define the abelian category of sheaves of modules
`X.Modules` over a scheme `X`.
`X.Modules` over a scheme `X`, and study its basic functoriality.
-/

@[expose] public section

universe u
universe t u

open CategoryTheory
open CategoryTheory Bicategory

namespace AlgebraicGeometry.Scheme

variable (X : Scheme.{u})
variable {X Y Z T : Scheme.{u}}

/-- The morphism of sheaves of rings corresponding to a morphism of schemes. -/
def Hom.toRingCatSheafHom (f : X ⟶ Y) :
Y.ringCatSheaf ⟶ ((TopologicalSpace.Opens.map f.base).sheafPushforwardContinuous
_ _ _).obj X.ringCatSheaf where
val := Functor.whiskerRight f.c _
Comment on lines +33 to +37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go near Scheme.ringCatSheaf


variable (X) in
/-- The category of sheaves of modules over a scheme. -/
abbrev Modules := SheafOfModules.{u} X.ringCatSheaf
def Modules := SheafOfModules.{u} X.ringCatSheaf

namespace Modules

/-- Morphisms between `𝒪ₓ`-modules. -/
def Hom (M N : X.Modules) : Type u := SheafOfModules.Hom M N

instance : Category X.Modules where
Hom := Modules.Hom
__ := inferInstanceAs (Category (SheafOfModules.{u} X.ringCatSheaf))

instance : Preadditive X.Modules :=
inferInstanceAs (Preadditive (SheafOfModules.{u} X.ringCatSheaf))

instance : Abelian X.Modules :=
inferInstanceAs (Abelian (SheafOfModules.{u} X.ringCatSheaf))

variable (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ T)

/-- The pushforward functor for categories of sheaves of modules over schemes. -/
noncomputable def pushforward : X.Modules ⥤ Y.Modules :=
SheafOfModules.pushforward f.toRingCatSheafHom

/-- The pullback functor for categories of sheaves of modules over schemes. -/
noncomputable def pullback : Y.Modules ⥤ X.Modules :=
SheafOfModules.pullback f.toRingCatSheafHom

/-- The pullback functor for categories of sheaves of modules over schemes
is left adjoint to the pushforward functor. -/
noncomputable def pullbackPushforwardAdjunction : pullback f ⊣ pushforward f :=
SheafOfModules.pullbackPushforwardAdjunction _

variable (X) in
/-- The pushforward of sheaves of modules by the identity morphism identifies
to the identity functor. -/
noncomputable def pushforwardId : pushforward (𝟙 X) ≅ 𝟭 _ :=
SheafOfModules.pushforwardId _

variable (X) in
/-- The pullback of sheaves of modules by the identity morphism identifies
to the identity functor. -/
noncomputable def pullbackId : pullback (𝟙 X) ≅ 𝟭 _ :=
SheafOfModules.pullbackId _

variable (X) in
lemma conjugateEquiv_pullbackId_hom :
conjugateEquiv .id (pullbackPushforwardAdjunction (𝟙 X)) (pullbackId X).hom =
(pushforwardId X).inv :=
SheafOfModules.conjugateEquiv_pullbackId_hom _

/-- The composition of two pushforward functors for sheaves of modules on schemes
identify to the pushforward for the composition. -/
noncomputable def pushforwardComp :
pushforward f ⋙ pushforward g ≅ pushforward (f ≫ g) :=
SheafOfModules.pushforwardComp _ _

/-- The composition of two pullback functors for sheaves of modules on schemes
identify to the pullback for the composition. -/
noncomputable def pullbackComp :
pullback g ⋙ pullback f ≅ pullback (f ≫ g) :=
SheafOfModules.pullbackComp _ _

lemma conjugateEquiv_pullbackComp_inv :
conjugateEquiv ((pullbackPushforwardAdjunction g).comp (pullbackPushforwardAdjunction f))
(pullbackPushforwardAdjunction (f ≫ g)) (pullbackComp f g).inv =
(pushforwardComp f g).hom :=
SheafOfModules.conjugateEquiv_pullbackComp_inv _ _

@[reassoc]
lemma pseudofunctor_associativity :
(pullbackComp f (g ≫ h)).inv ≫
Functor.whiskerRight (pullbackComp g h).inv _ ≫ (Functor.associator _ _ _).hom ≫
Functor.whiskerLeft _ (pullbackComp f g).hom ≫ (pullbackComp (f ≫ g) h).hom =
eqToHom (by simp) := by
let e₁ := pullbackComp f (g ≫ h)
let e₂ := Functor.isoWhiskerRight (pullbackComp g h) (pullback f)
let e₃ := Functor.isoWhiskerLeft (pullback h) (pullbackComp f g)
let e₄ := pullbackComp (f ≫ g) h
change e₁.inv ≫ e₂.inv ≫ (Functor.associator _ _ _).hom ≫ e₃.hom ≫ e₄.hom = _
have : e₃.hom ≫ e₄.hom = (Functor.associator _ _ _).inv ≫ e₂.hom ≫ e₁.hom :=
congr_arg Iso.hom (SheafOfModules.pullback_assoc.{u}
h.toRingCatSheafHom g.toRingCatSheafHom f.toRingCatSheafHom)
simp [this]

@[reassoc]
lemma pseudofunctor_left_unitality :
(pullbackComp f (𝟙 Y)).inv ≫
Functor.whiskerRight (pullbackId Y).hom (pullback f) ≫ (Functor.leftUnitor _).hom =
eqToHom (by simp) := by
let e₁ := pullbackComp f (𝟙 _)
let e₂ := Functor.isoWhiskerRight (pullbackId Y) (pullback f)
let e₃ := (pullback f).leftUnitor
change e₁.inv ≫ e₂.hom ≫ e₃.hom = _
have : e₁.hom = e₂.hom ≫ e₃.hom :=
congr_arg Iso.hom (SheafOfModules.pullback_id_comp.{u} f.toRingCatSheafHom)
simp [← this]

@[reassoc]
lemma pseudofunctor_right_unitality :
(pullbackComp (𝟙 X) f).inv ≫
Functor.whiskerLeft (pullback f) (pullbackId X).hom ≫ (Functor.rightUnitor _).hom =
eqToHom (by simp) := by
let e₁ := pullbackComp (𝟙 _) f
let e₂ := Functor.isoWhiskerLeft (pullback f) (pullbackId _)
let e₃ := (pullback f).rightUnitor
change e₁.inv ≫ e₂.hom ≫ e₃.hom = _
have : e₁.hom = e₂.hom ≫ e₃.hom :=
congr_arg Iso.hom (SheafOfModules.pullback_comp_id.{u} f.toRingCatSheafHom)
simp [← this]

/-- The pseudofunctor from `Schemeᵒᵖ` to the bicategory of adjunctions which sends
a scheme `X` to the category `X.Modules` of sheaves of modules over `X`.
(This contains both the covariant and the contravariant functorialities of
these categories.) -/
noncomputable def pseudofunctor :
Pseudofunctor (LocallyDiscrete Scheme.{u}ᵒᵖ) (Adj Cat) :=
LocallyDiscrete.mkPseudofunctor
(fun X ↦ Adj.mk (Cat.of X.unop.Modules))
(fun f ↦ .mk (pullbackPushforwardAdjunction f.unop).toCat)
(fun _ ↦ Adj.iso₂Mk (pullbackId _) (pushforwardId _).symm (by
dsimp
rw [Bicategory.conjugateEquiv_eq_categoryTheoryConjugateEquiv]
apply conjugateEquiv_pullbackId_hom))
(fun _ _ ↦ Adj.iso₂Mk (pullbackComp _ _).symm (pushforwardComp _ _) (by
dsimp
rw [Bicategory.conjugateEquiv_eq_categoryTheoryConjugateEquiv,
Adjunction.toCat_comp_toCat]
apply conjugateEquiv_pullbackComp_inv))
(fun _ _ _ ↦ by ext : 1; apply pseudofunctor_associativity _ _ _)
(fun _ ↦ by ext : 1; apply pseudofunctor_left_unitality)
(fun _ ↦ by ext : 1; apply pseudofunctor_right_unitality)

attribute [local instance] Types.instFunLike Types.instConcreteCategory in
noncomputable instance : HasSheafify (Opens.grothendieckTopology X) AddCommGrpCat.{u} :=
inferInstance
attribute [simps! obj_obj map_l map_r map_adj] pseudofunctor
attribute [simps! mapId_hom_τl mapId_hom_τr mapId_inv_τl mapId_inv_τr] pseudofunctor
attribute [simps! mapComp_hom_τl mapComp_hom_τr] pseudofunctor
attribute [simps! mapComp_inv_τl mapComp_inv_τr] pseudofunctor
Comment on lines +173 to +176
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these done separately? Is it because it times out otherwise?


attribute [local instance] Types.instFunLike Types.instConcreteCategory in
noncomputable instance : Abelian X.Modules := inferInstance
end Modules

end AlgebraicGeometry.Scheme
22 changes: 20 additions & 2 deletions Mathlib/CategoryTheory/Adjunction/CompositionIso.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public import Mathlib.CategoryTheory.Adjunction.Mates

In this file, given isomorphisms between compositions of right adjoint functors,
we obtain isomorphisms between the corresponding compositions of the left adjoint functors,
and show that the left adjoint functors satisfy properties similar to the left/right
and show that the left adjoint functors satisfies properties similar to the left/right
unitality and the associativity of pseudofunctors if the right adjoint functors
satisfy the corresponding properties.
satisfies the corresponding properties.
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think satisfy was correct?


This is used in `Mathlib.Algebra.Category.ModuleCat.Presheaf.Pullback` to study
the behaviour with respect to composition of the pullback functors on presheaves
Expand All @@ -34,12 +34,23 @@ open Functor

namespace Adjunction

section

variable {F : C₀ ⥤ C₀} {G : C₀ ⥤ C₀} (adj : F ⊣ G) (e : G ≅ 𝟭 C₀)

/-- If a right adjoint functor is isomorphic to the identity functor,
so is the left adjoint. -/
@[simps! -isSimp]
def leftAdjointIdIso {F : C₀ ⥤ C₀} {G : C₀ ⥤ C₀} (adj : F ⊣ G) (e : G ≅ 𝟭 C₀) :
F ≅ 𝟭 C₀ := (conjugateIsoEquiv .id adj).symm e.symm

@[simp]
lemma conjugateEquiv_leftAdjointIdIso_hom :
conjugateEquiv .id adj (leftAdjointIdIso adj e).hom = e.inv := by
simp [leftAdjointIdIso]

end

section

variable {F₀₁ : C₀ ⥤ C₁} {F₁₂ : C₁ ⥤ C₂} {F₀₂ : C₀ ⥤ C₂}
Expand Down Expand Up @@ -67,6 +78,13 @@ lemma leftAdjointCompIso_hom (e₀₁₂ : G₂₁ ⋙ G₁₀ ≅ G₂₀) :
leftAdjointCompNatTrans adj₀₁ adj₁₂ adj₀₂ e₀₁₂.inv :=
rfl

@[simp]
lemma conjugateEquiv_leftAdjointCompIso_inv (e₀₁₂ : G₂₁ ⋙ G₁₀ ≅ G₂₀) :
conjugateEquiv (adj₀₁.comp adj₁₂) adj₀₂
(leftAdjointCompIso adj₀₁ adj₁₂ adj₀₂ e₀₁₂).inv = e₀₁₂.hom := by
dsimp only [leftAdjointCompIso]
simp

end

lemma leftAdjointCompIso_comp_id
Expand Down
1 change: 1 addition & 0 deletions Mathlib/CategoryTheory/Bicategory/Adjunction/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ theorem rightZigzag_idempotent_of_left_triangle
rw [h]; bicategory

/-- Adjunction between two 1-morphisms. -/
@[ext]
structure Adjunction (f : a ⟶ b) (g : b ⟶ a) where
/-- The unit of an adjunction. -/
unit : 𝟙 a ⟶ f ≫ g
Expand Down
98 changes: 98 additions & 0 deletions Mathlib/CategoryTheory/Bicategory/Adjunction/Cat.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/-
Copyright (c) 2025 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/
module

public import Mathlib.CategoryTheory.Adjunction.Mates
public import Mathlib.CategoryTheory.Bicategory.Adjunction.Mate
public import Mathlib.CategoryTheory.Category.Cat

/-!
# Adjunctions in `Cat`
-/

@[expose] public section

universe v u

namespace CategoryTheory

open Bicategory

section

variable {C D E : Type u} [Category.{v} C] [Category.{v} D] [Category.{v} E]
{F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G)
{F' : D ⥤ E} {G' : E ⥤ D} (adj' : F' ⊣ G')

attribute [local simp] bicategoricalComp Cat.associator_hom_app Cat.associator_inv_app
Cat.leftUnitor_hom_app Cat.leftUnitor_inv_app Cat.rightUnitor_hom_app Cat.rightUnitor_inv_app
Functor.toCatHom
Comment on lines +31 to +33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a simp set?


namespace Adjunction

/-- The adjunction in the bicategorical sense attached to an adjunction between functors. -/
abbrev toCat : Bicategory.Adjunction F.toCatHom G.toCatHom where
unit := adj.unit
counit := adj.counit

/-- The adjunction of functors corresponding to an adjunction in the bicategory `Cat`. -/
abbrev ofCat {C D : Cat} {F : C ⟶ D} {G : D ⟶ C}
(adj : Bicategory.Adjunction F G) :
Functor.ofCatHom F ⊣ Functor.ofCatHom G where
unit := adj.unit
counit := adj.counit
left_triangle_components X := by simpa using congr_app adj.left_triangle X
right_triangle_components X := by simpa using congr_app adj.right_triangle X
Comment on lines +38 to +49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these abbrevs?


@[simp]
lemma toCat_ofCat
{C D : Cat} {F : C ⟶ D} {G : D ⟶ C} (adj : Bicategory.Adjunction F G) :
(Adjunction.ofCat adj).toCat = adj := rfl

@[simp]
lemma ofCat_toCat :
Adjunction.ofCat adj.toCat = adj := rfl

lemma toCat_comp_toCat : adj.toCat.comp adj'.toCat = (adj.comp adj').toCat := by
cat_disch

end Adjunction

end

namespace Bicategory

@[simp]
lemma Adjunction.toCat_id (C : Cat.{v, u}) :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lemma Adjunction.toCat_id (C : Cat.{v, u}) :
lemma Adjunction.ofCat_id (C : Cat.{v, u}) :

Adjunction.ofCat (Adjunction.id C) = CategoryTheory.Adjunction.id :=
rfl

lemma mateEquiv_eq_categoryTheoryMateEquiv {C D E F : Cat}
{G : C ⟶ E} {H : D ⟶ F} {L₁ : C ⟶ D} {R₁ : D ⟶ C} {L₂ : E ⟶ F} {R₂ : F ⟶ E}
(adj₁ : Bicategory.Adjunction L₁ R₁) (adj₂ : Bicategory.Adjunction L₂ R₂)
(f : G ≫ L₂ ⟶ L₁ ≫ H) :
Bicategory.mateEquiv adj₁ adj₂ f =
CategoryTheory.mateEquiv (Adjunction.ofCat adj₁) (Adjunction.ofCat adj₂) f := by
ext X
simp [mateEquiv, Adjunction.homEquiv₁, Adjunction.homEquiv₂, Functor.ofCatHom,
Cat.rightUnitor_inv_app, Cat.associator_hom_app, Cat.associator_inv_app,
Cat.leftUnitor_hom_app]

lemma conjugateEquiv_eq_categoryTheoryConjugateEquiv {C D : Cat}
{L₁ L₂ : C ⟶ D} {R₁ R₂ : D ⟶ C}
(adj₁ : Bicategory.Adjunction L₁ R₁) (adj₂ : Bicategory.Adjunction L₂ R₂) (f : L₂ ⟶ L₁) :
Bicategory.conjugateEquiv adj₁ adj₂ f =
CategoryTheory.conjugateEquiv (Adjunction.ofCat adj₁) (Adjunction.ofCat adj₂) f := by
dsimp [Bicategory.conjugateEquiv]
rw [mateEquiv_eq_categoryTheoryMateEquiv]
ext X
simp [CategoryTheory.conjugateEquiv, Functor.ofCatHom,
Cat.rightUnitor_inv_app, Cat.leftUnitor_hom_app]

end Bicategory

end CategoryTheory
Loading