Skip to content

Commit 7eee433

Browse files
joelrioukim-em
andcommitted
feat: port CategoryTheory.Sites.SheafOfTypes (#3223)
Co-authored-by: Scott Morrison <scott@tqft.net>
1 parent 00fcb9a commit 7eee433

File tree

6 files changed

+1103
-11
lines changed

6 files changed

+1103
-11
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ import Mathlib.CategoryTheory.Sigma.Basic
489489
import Mathlib.CategoryTheory.SingleObj
490490
import Mathlib.CategoryTheory.Sites.Grothendieck
491491
import Mathlib.CategoryTheory.Sites.Pretopology
492+
import Mathlib.CategoryTheory.Sites.SheafOfTypes
492493
import Mathlib.CategoryTheory.Sites.Sieves
493494
import Mathlib.CategoryTheory.Sites.Spaces
494495
import Mathlib.CategoryTheory.Skeletal

Mathlib/CategoryTheory/Adjunction/Evaluation.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def evaluationAdjunctionRight (c : C) : evaluationLeftAdjoint D c ⊣ (evaluatio
6767
ext x
6868
dsimp
6969
ext ⟨g⟩
70-
simp only [colimit.ι_desc, Cofan.mk_ι, Category.assoc, ←f.naturality,
70+
simp only [colimit.ι_desc, Cofan.mk_ι_app, Category.assoc, ←f.naturality,
7171
evaluationLeftAdjoint_obj_map, colimit.ι_desc_assoc,
7272
Discrete.functor_obj, Cofan.mk_pt, Discrete.natTrans_app, Category.id_comp]
7373
right_inv := fun f => by
@@ -131,7 +131,7 @@ def evaluationAdjunctionLeft (c : C) : (evaluation _ _).obj c ⊣ evaluationRigh
131131
ext ⟨g⟩
132132
simp only [Discrete.functor_obj, NatTrans.naturality_assoc,
133133
evaluationRightAdjoint_obj_obj, evaluationRightAdjoint_obj_map, limit.lift_π,
134-
Fan.mk_pt, Fan.mk_π, Discrete.natTrans_app, Category.comp_id] } }
134+
Fan.mk_pt, Fan.mk_π_app, Discrete.natTrans_app, Category.comp_id] } }
135135
#align category_theory.evaluation_adjunction_left CategoryTheory.evaluationAdjunctionLeft
136136

137137
instance evaluationIsLeftAdjoint (c : C) : IsLeftAdjoint ((evaluation _ D).obj c) :=

Mathlib/CategoryTheory/Limits/Constructions/FiniteProductsOfBinaryProducts.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ noncomputable def preservesFinOfPreservesBinaryAndTerminal :
153153
refine' Fin.inductionOn j ?_ ?_
154154
· apply (Category.id_comp _).symm
155155
· rintro i _
156-
dsimp [extendFan_π_app, Iso.refl_hom, Fan.mk_π]
156+
dsimp [extendFan_π_app, Iso.refl_hom, Fan.mk_π_app]
157157
rw [Fin.cases_succ, Fin.cases_succ]
158158
change F.map _ ≫ _ = 𝟙 _ ≫ _
159159
simp only [id_comp, ← F.map_comp]
@@ -298,7 +298,7 @@ noncomputable def preservesFinOfPreservesBinaryAndInitial :
298298
refine' Fin.inductionOn j ?_ ?_
299299
· apply Category.comp_id
300300
· rintro i _
301-
dsimp [extendCofan_ι_app, Iso.refl_hom, Cofan.mk_ι]
301+
dsimp [extendCofan_ι_app, Iso.refl_hom, Cofan.mk_ι_app]
302302
rw [Fin.cases_succ, Fin.cases_succ, comp_id, ← F.map_comp]
303303
#align category_theory.preserves_fin_of_preserves_binary_and_initial CategoryTheory.preservesFinOfPreservesBinaryAndInitialₓ -- Porting note: order of universes changed
304304

Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,7 @@ noncomputable def multicoforkEquivSigmaCofork :
746746
apply Limits.colimit.hom_ext
747747
rintro ⟨j⟩
748748
dsimp
749-
-- porting note: the last element was `cofan.mk_ι_app` in mathlib3 but at the
750-
-- time of writing this was not being generated by `@[simps]` on `Cofan.mk` in lean4
751-
simp only [Category.comp_id, colimit.ι_desc, Cofan.mk_ι]
749+
simp only [Category.comp_id, colimit.ι_desc, Cofan.mk_ι_app]
752750
rfl))
753751
fun {K₁ K₂} f => by
754752
-- porting note: in mathlib3 the next line was just `ext`

Mathlib/CategoryTheory/Limits/Shapes/Products.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ abbrev Cofan (f : β → C) :=
6464
#align category_theory.limits.cofan CategoryTheory.Limits.Cofan
6565

6666
/-- A fan over `f : β → C` consists of a collection of maps from an object `P` to every `f b`. -/
67-
@[simps]
67+
@[simps! pt π_app]
6868
def Fan.mk {f : β → C} (P : C) (p : ∀ b, P ⟶ f b) : Fan f
6969
where
7070
pt := P
7171
π := Discrete.natTrans (fun X => p X.as)
7272
#align category_theory.limits.fan.mk CategoryTheory.Limits.Fan.mk
7373

7474
/-- A cofan over `f : β → C` consists of a collection of maps from every `f b` to an object `P`. -/
75-
@[simps]
75+
@[simps! pt ι_app]
7676
def Cofan.mk {f : β → C} (P : C) (p : ∀ b, f b ⟶ P) : Cofan f
7777
where
7878
pt := P
@@ -243,7 +243,7 @@ theorem map_lift_piComparison [HasProduct f] [HasProduct fun b => G.obj (f b)] (
243243
(g : ∀ j, P ⟶ f j) : G.map (Pi.lift g) ≫ piComparison G f = Pi.lift fun j => G.map (g j) := by
244244
ext ⟨j⟩
245245
simp only [Discrete.functor_obj, Category.assoc, piComparison_comp_π, ← G.map_comp,
246-
limit.lift_π, Fan.mk_pt, Fan.mk_π, Discrete.natTrans_app]
246+
limit.lift_π, Fan.mk_pt, Fan.mk_π_app]
247247
#align category_theory.limits.map_lift_pi_comparison CategoryTheory.Limits.map_lift_piComparison
248248

249249
/-- The comparison morphism for the coproduct of `f`. This is an iso iff `G` preserves the coproduct
@@ -265,7 +265,7 @@ theorem sigmaComparison_map_desc [HasCoproduct f] [HasCoproduct fun b => G.obj (
265265
sigmaComparison G f ≫ G.map (Sigma.desc g) = Sigma.desc fun j => G.map (g j) := by
266266
ext ⟨j⟩
267267
simp only [Discrete.functor_obj, ι_comp_sigmaComparison_assoc, ← G.map_comp, colimit.ι_desc,
268-
Cofan.mk_pt, Cofan.mk_ι, Discrete.natTrans_app]
268+
Cofan.mk_pt, Cofan.mk_ι_app]
269269
#align category_theory.limits.sigma_comparison_map_desc CategoryTheory.Limits.sigmaComparison_map_desc
270270

271271
end Comparison

0 commit comments

Comments
 (0)