category_theory.sites.cover_preservingMathlib.CategoryTheory.Sites.CoverPreserving

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -182,7 +182,8 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
 -/
 
 #print CategoryTheory.compatiblePreservingOfDownwardsClosed /-
-theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
+theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [CategoryTheory.Functor.Full F]
+    [CategoryTheory.Functor.Faithful F]
     (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σ c', F.obj c' ≅ d) : CompatiblePreserving K F :=
   by
   constructor
Diff
@@ -205,7 +205,7 @@ theorem pullback_isSheaf_of_coverPreserving {G : C ⥤ D} (hG₁ : CompatiblePre
     (hG₂ : CoverPreserving J K G) (ℱ : Sheaf K A) : Presheaf.IsSheaf J (G.op ⋙ ℱ.val) :=
   by
   intro X U S hS x hx
-  change family_of_elements (G.op ⋙ ℱ.val ⋙ coyoneda.obj (op X)) _ at x 
+  change family_of_elements (G.op ⋙ ℱ.val ⋙ coyoneda.obj (op X)) _ at x
   let H := ℱ.2 X _ (hG₂.cover_preserve hS)
   let hx' := hx.functor_pushforward hG₁ (sheaf_over ℱ X)
   constructor; swap
Diff
@@ -196,7 +196,6 @@ theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F
 #align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosed
 -/
 
-#print CategoryTheory.pullback_isSheaf_of_coverPreserving /-
 /-- If `G` is cover-preserving and compatible-preserving,
 then `G.op ⋙ _` pulls sheaves back to sheaves.
 
@@ -225,30 +224,28 @@ theorem pullback_isSheaf_of_coverPreserving {G : C ⥤ D} (hG₁ : CompatiblePre
     dsimp
     simp [hG₁.apply_map (sheaf_over ℱ X) hx h, ← hy f' h]
 #align category_theory.pullback_is_sheaf_of_cover_preserving CategoryTheory.pullback_isSheaf_of_coverPreserving
--/
 
-#print CategoryTheory.pullbackSheaf /-
 /-- The pullback of a sheaf along a cover-preserving and compatible-preserving functor. -/
 def pullbackSheaf {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : CoverPreserving J K G)
     (ℱ : Sheaf K A) : Sheaf J A :=
   ⟨G.op ⋙ ℱ.val, pullback_isSheaf_of_coverPreserving hG₁ hG₂ ℱ⟩
 #align category_theory.pullback_sheaf CategoryTheory.pullbackSheaf
--/
 
 variable (A)
 
-#print CategoryTheory.Sites.pullback /-
+#print CategoryTheory.Functor.sheafPushforwardContinuous /-
 /-- The induced functor from `Sheaf K A ⥤ Sheaf J A` given by `G.op ⋙ _`
 if `G` is cover-preserving and compatible-preserving.
 -/
 @[simps]
-def Sites.pullback {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : CoverPreserving J K G) :
-    Sheaf K A ⥤ Sheaf J A where
+def Functor.sheafPushforwardContinuous {G : C ⥤ D} (hG₁ : CompatiblePreserving K G)
+    (hG₂ : CoverPreserving J K G) : Sheaf K A ⥤ Sheaf J A
+    where
   obj ℱ := pullbackSheaf hG₁ hG₂ ℱ
   map _ _ f := ⟨((whiskeringLeft _ _ _).obj G.op).map f.val⟩
   map_id' ℱ := by ext1; apply ((whiskering_left _ _ _).obj G.op).map_id
   map_comp' _ _ _ f g := by ext1; apply ((whiskering_left _ _ _).obj G.op).map_comp
-#align category_theory.sites.pullback CategoryTheory.Sites.pullback
+#align category_theory.sites.pullback CategoryTheory.Functor.sheafPushforwardContinuous
 -/
 
 end CategoryTheory
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 -/
-import Mathbin.CategoryTheory.Functor.Flat
-import Mathbin.CategoryTheory.Sites.Sheaf
-import Mathbin.Tactic.ApplyFun
+import CategoryTheory.Functor.Flat
+import CategoryTheory.Sites.Sheaf
+import Tactic.ApplyFun
 
 #align_import category_theory.sites.cover_preserving from "leanprover-community/mathlib"@"781cb2eed038c4caf53bdbd8d20a95e5822d77df"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit 781cb2eed038c4caf53bdbd8d20a95e5822d77df
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Functor.Flat
 import Mathbin.CategoryTheory.Sites.Sheaf
 import Mathbin.Tactic.ApplyFun
 
+#align_import category_theory.sites.cover_preserving from "leanprover-community/mathlib"@"781cb2eed038c4caf53bdbd8d20a95e5822d77df"
+
 /-!
 # Cover-preserving functors between sites.
 
Diff
@@ -121,8 +121,7 @@ variable {J K} {G : C ⥤ D} (hG : CompatiblePreserving.{w} K G) (ℱ : SheafOfT
 
 variable {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T} (h : x.Compatible)
 
-include h hG
-
+#print CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward /-
 /-- `compatible_preserving` functors indeed preserve compatible families. -/
 theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
     (x.functorPushforward G).Compatible :=
@@ -136,7 +135,9 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
   apply hG.compatible ℱ h _ _ hf₁ hf₂
   simpa using Eq
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
+-/
 
+#print CategoryTheory.CompatiblePreserving.apply_map /-
 @[simp]
 theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
     x.functorPushforward G (G.map f) (image_mem_functorPushforward G T hf) = x f hf :=
@@ -146,11 +147,11 @@ theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
     ⟨X, g, f', hg, eq⟩
   simpa using hG.compatible ℱ h f' (𝟙 _) hg hf (by simp [Eq])
 #align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_map
-
-omit h hG
+-/
 
 open Limits.WalkingCospan
 
+#print CategoryTheory.compatiblePreservingOfFlat /-
 theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type u₁} [Category.{v₁} D]
     (K : GrothendieckTopology D) (G : C ⥤ D) [RepresentablyFlat G] : CompatiblePreserving K G :=
   by
@@ -181,7 +182,9 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   injection c'.π.naturality walking_cospan.hom.inr with _ e₂
   exact hx (c'.π.app left).right (c'.π.app right).right hg₁ hg₂ (e₁.symm.trans e₂)
 #align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlat
+-/
 
+#print CategoryTheory.compatiblePreservingOfDownwardsClosed /-
 theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
     (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σ c', F.obj c' ≅ d) : CompatiblePreserving K F :=
   by
@@ -194,6 +197,7 @@ theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F
     hx (F.preimage <| e.hom ≫ f₁) (F.preimage <| e.hom ≫ f₂) hg₁ hg₂
       (F.map_injective <| by simpa using he)
 #align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosed
+-/
 
 #print CategoryTheory.pullback_isSheaf_of_coverPreserving /-
 /-- If `G` is cover-preserving and compatible-preserving,
Diff
@@ -183,7 +183,7 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
 #align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlat
 
 theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
-    (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σc', F.obj c' ≅ d) : CompatiblePreserving K F :=
+    (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σ c', F.obj c' ≅ d) : CompatiblePreserving K F :=
   by
   constructor
   introv hx he
@@ -205,7 +205,7 @@ theorem pullback_isSheaf_of_coverPreserving {G : C ⥤ D} (hG₁ : CompatiblePre
     (hG₂ : CoverPreserving J K G) (ℱ : Sheaf K A) : Presheaf.IsSheaf J (G.op ⋙ ℱ.val) :=
   by
   intro X U S hS x hx
-  change family_of_elements (G.op ⋙ ℱ.val ⋙ coyoneda.obj (op X)) _ at x
+  change family_of_elements (G.op ⋙ ℱ.val ⋙ coyoneda.obj (op X)) _ at x 
   let H := ℱ.2 X _ (hG₂.cover_preserve hS)
   let hx' := hx.functor_pushforward hG₁ (sheaf_over ℱ X)
   constructor; swap
Diff
@@ -123,12 +123,6 @@ variable {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T} (h : x.Com
 
 include h hG
 
-/- warning: category_theory.presieve.family_of_elements.compatible.functor_pushforward -> CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u3, u5} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z) (CategoryTheory.Presieve.functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z T) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x)))
-but is expected to have type
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u3, u5} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Z) (CategoryTheory.Presieve.functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z T) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x)))
-Case conversion may be inaccurate. Consider using '#align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforwardₓ'. -/
 /-- `compatible_preserving` functors indeed preserve compatible families. -/
 theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
     (x.functorPushforward G).Compatible :=
@@ -143,9 +137,6 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
   simpa using Eq
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
 
-/- warning: category_theory.compatible_preserving.apply_map -> CategoryTheory.CompatiblePreserving.apply_map is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_mapₓ'. -/
 @[simp]
 theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
     x.functorPushforward G (G.map f) (image_mem_functorPushforward G T hf) = x f hf :=
@@ -160,12 +151,6 @@ omit h hG
 
 open Limits.WalkingCospan
 
-/- warning: category_theory.compatible_preserving_of_flat -> CategoryTheory.compatiblePreservingOfFlat is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u2}} [_inst_4 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u2}} [_inst_5 : CategoryTheory.Category.{u1, u2} D] (K : CategoryTheory.GrothendieckTopology.{u1, u2} D _inst_5) (G : CategoryTheory.Functor.{u1, u1, u2, u2} C _inst_4 D _inst_5) [_inst_6 : CategoryTheory.RepresentablyFlat.{u1, u1, u2, u2} C _inst_4 D _inst_5 G], CategoryTheory.CompatiblePreserving.{u3, u1, u1, u2, u2} C _inst_4 D _inst_5 K G
-but is expected to have type
-  forall {C : Type.{u3}} [_inst_4 : CategoryTheory.Category.{u2, u3} C] {D : Type.{u3}} [_inst_5 : CategoryTheory.Category.{u2, u3} D] (K : CategoryTheory.GrothendieckTopology.{u2, u3} D _inst_5) (G : CategoryTheory.Functor.{u2, u2, u3, u3} C _inst_4 D _inst_5) [_inst_6 : CategoryTheory.RepresentablyFlat.{u2, u2, u3, u3} C _inst_4 D _inst_5 G], CategoryTheory.CompatiblePreserving.{u1, u2, u2, u3, u3} C _inst_4 D _inst_5 K G
-Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlatₓ'. -/
 theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type u₁} [Category.{v₁} D]
     (K : GrothendieckTopology D) (G : C ⥤ D) [RepresentablyFlat G] : CompatiblePreserving K G :=
   by
@@ -197,12 +182,6 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   exact hx (c'.π.app left).right (c'.π.app right).right hg₁ hg₂ (e₁.symm.trans e₂)
 #align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlat
 
-/- warning: category_theory.compatible_preserving_of_downwards_closed -> CategoryTheory.compatiblePreservingOfDownwardsClosed is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D] {K : CategoryTheory.GrothendieckTopology.{u2, u4} D _inst_2} (F : CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) [_inst_4 : CategoryTheory.Full.{u1, u2, u3, u4} C _inst_1 D _inst_2 F] [_inst_5 : CategoryTheory.Faithful.{u1, u2, u3, u4} C _inst_1 D _inst_2 F], (forall {c : C} {d : D}, (Quiver.Hom.{succ u2, u4} D (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} D (CategoryTheory.Category.toCategoryStruct.{u2, u4} D _inst_2)) d (CategoryTheory.Functor.obj.{u1, u2, u3, u4} C _inst_1 D _inst_2 F c)) -> (Sigma.{u3, u2} C (fun (c' : C) => CategoryTheory.Iso.{u2, u4} D _inst_2 (CategoryTheory.Functor.obj.{u1, u2, u3, u4} C _inst_1 D _inst_2 F c') d))) -> (CategoryTheory.CompatiblePreserving.{u5, u1, u2, u3, u4} C _inst_1 D _inst_2 K F)
-but is expected to have type
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} (F : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2) [_inst_4 : CategoryTheory.Full.{u2, u3, u4, u5} C _inst_1 D _inst_2 F] [_inst_5 : CategoryTheory.Faithful.{u2, u3, u4, u5} C _inst_1 D _inst_2 F], (forall {c : C} {d : D}, (Quiver.Hom.{succ u3, u5} D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) d (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 F) c)) -> (Sigma.{u4, u3} C (fun (c' : C) => CategoryTheory.Iso.{u3, u5} D _inst_2 (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 F) c') d))) -> (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K F)
-Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosedₓ'. -/
 theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
     (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σc', F.obj c' ≅ d) : CompatiblePreserving K F :=
   by
Diff
@@ -180,16 +180,10 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
     Then, it suffices to prove that it is compatible when restricted onto `u(c'.X.right)`.
     -/
   let c' := is_cofiltered.cone (structured_arrow_cone.to_diagram c ⋙ structured_arrow.pre _ _ _)
-  have eq₁ : f₁ = (c'.X.hom ≫ G.map (c'.π.app left).right) ≫ eq_to_hom (by simp) :=
-    by
-    erw [← (c'.π.app left).w]
-    dsimp
-    simp
-  have eq₂ : f₂ = (c'.X.hom ≫ G.map (c'.π.app right).right) ≫ eq_to_hom (by simp) :=
-    by
-    erw [← (c'.π.app right).w]
-    dsimp
-    simp
+  have eq₁ : f₁ = (c'.X.hom ≫ G.map (c'.π.app left).right) ≫ eq_to_hom (by simp) := by
+    erw [← (c'.π.app left).w]; dsimp; simp
+  have eq₂ : f₂ = (c'.X.hom ≫ G.map (c'.π.app right).right) ≫ eq_to_hom (by simp) := by
+    erw [← (c'.π.app right).w]; dsimp; simp
   conv_lhs => rw [eq₁]
   conv_rhs => rw [eq₂]
   simp only [op_comp, functor.map_comp, types_comp_apply, eq_to_hom_op, eq_to_hom_map]
@@ -272,12 +266,8 @@ def Sites.pullback {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : Cov
     Sheaf K A ⥤ Sheaf J A where
   obj ℱ := pullbackSheaf hG₁ hG₂ ℱ
   map _ _ f := ⟨((whiskeringLeft _ _ _).obj G.op).map f.val⟩
-  map_id' ℱ := by
-    ext1
-    apply ((whiskering_left _ _ _).obj G.op).map_id
-  map_comp' _ _ _ f g := by
-    ext1
-    apply ((whiskering_left _ _ _).obj G.op).map_comp
+  map_id' ℱ := by ext1; apply ((whiskering_left _ _ _).obj G.op).map_id
+  map_comp' _ _ _ f g := by ext1; apply ((whiskering_left _ _ _).obj G.op).map_comp
 #align category_theory.sites.pullback CategoryTheory.Sites.pullback
 -/
 
Diff
@@ -144,10 +144,7 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
 
 /- warning: category_theory.compatible_preserving.apply_map -> CategoryTheory.CompatiblePreserving.apply_map is a dubious translation:
-lean 3 declaration is
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (forall {Y : C} {f : Quiver.Hom.{succ u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) Y Z} (hf : T Y f), Eq.{succ u1} (CategoryTheory.Functor.obj.{u3, u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (Opposite.op.{succ u5} D (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y))) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y) (CategoryTheory.Functor.map.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y Z f) (CategoryTheory.Presieve.image_mem_functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z Y T f hf)) (x Y f hf)))
-but is expected to have type
-  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (forall {Y : C} {f : Quiver.Hom.{succ u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) Y Z} (hf : T Y f), Eq.{succ u1} (Prefunctor.obj.{succ u3, succ u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} (Opposite.{succ u5} D) (CategoryTheory.Category.toCategoryStruct.{u3, u5} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2))) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u3, u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) (Opposite.op.{succ u5} D (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y))) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y) (Prefunctor.map.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y Z f) (CategoryTheory.Presieve.image_mem_functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z Y T f hf)) (x Y f hf)))
+<too large>
 Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_mapₓ'. -/
 @[simp]
 theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 781cb2eed038c4caf53bdbd8d20a95e5822d77df
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Tactic.ApplyFun
 /-!
 # Cover-preserving functors between sites.
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define cover-preserving functors between sites as functors that push covering sieves to
 covering sieves. A cover-preserving and compatible-preserving functor `G : C ⥤ D` then pulls
 sheaves on `D` back to sheaves on `C` via `G.op ⋙ -`.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit 781cb2eed038c4caf53bdbd8d20a95e5822d77df
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,9 +15,6 @@ import Mathbin.Tactic.ApplyFun
 /-!
 # Cover-preserving functors between sites.
 
-> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
-> Any changes to this file require a corresponding PR to mathlib4.
-
 We define cover-preserving functors between sites as functors that push covering sieves to
 covering sieves. A cover-preserving and compatible-preserving functor `G : C ⥤ D` then pulls
 sheaves on `D` back to sheaves on `C` via `G.op ⋙ -`.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 781cb2eed038c4caf53bdbd8d20a95e5822d77df
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Tactic.ApplyFun
 /-!
 # Cover-preserving functors between sites.
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We define cover-preserving functors between sites as functors that push covering sieves to
 covering sieves. A cover-preserving and compatible-preserving functor `G : C ⥤ D` then pulls
 sheaves on `D` back to sheaves on `C` via `G.op ⋙ -`.
Diff
@@ -68,6 +68,7 @@ variable (J : GrothendieckTopology C) (K : GrothendieckTopology D)
 
 variable {L : GrothendieckTopology A}
 
+#print CategoryTheory.CoverPreserving /-
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
 if for all covering sieves `R` in `C`, `R.pushforward_functor G` is a covering sieve in `D`.
 -/
@@ -75,14 +76,18 @@ if for all covering sieves `R` in `C`, `R.pushforward_functor G` is a covering s
 structure CoverPreserving (G : C ⥤ D) : Prop where
   cover_preserve : ∀ {U : C} {S : Sieve U} (hS : S ∈ J U), S.functorPushforward G ∈ K (G.obj U)
 #align category_theory.cover_preserving CategoryTheory.CoverPreserving
+-/
 
+#print CategoryTheory.idCoverPreserving /-
 /-- The identity functor on a site is cover-preserving. -/
 theorem idCoverPreserving : CoverPreserving J J (𝟭 _) :=
   ⟨fun U S hS => by simpa using hS⟩
 #align category_theory.id_cover_preserving CategoryTheory.idCoverPreserving
+-/
 
 variable (J) (K)
 
+#print CategoryTheory.CoverPreserving.comp /-
 /-- The composition of two cover-preserving functors is cover-preserving. -/
 theorem CoverPreserving.comp {F} (hF : CoverPreserving J K F) {G} (hG : CoverPreserving K L G) :
     CoverPreserving J L (F ⋙ G) :=
@@ -90,7 +95,9 @@ theorem CoverPreserving.comp {F} (hF : CoverPreserving J K F) {G} (hG : CoverPre
     rw [sieve.functor_pushforward_comp]
     exact hG.cover_preserve (hF.cover_preserve hS)⟩
 #align category_theory.cover_preserving.comp CategoryTheory.CoverPreserving.comp
+-/
 
+#print CategoryTheory.CompatiblePreserving /-
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is called compatible preserving if for each
 compatible family of elements at `C` and valued in `G.op ⋙ ℱ`, and each commuting diagram
 `f₁ ≫ G.map g₁ = f₂ ≫ G.map g₂`, `x g₁` and `x g₂` coincide when restricted via `fᵢ`.
@@ -105,6 +112,7 @@ structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop
       {g₂ : Y₂ ⟶ Z} (hg₁ : T g₁) (hg₂ : T g₂) (eq : f₁ ≫ G.map g₁ = f₂ ≫ G.map g₂),
       ℱ.val.map f₁.op (x g₁ hg₁) = ℱ.val.map f₂.op (x g₂ hg₂)
 #align category_theory.compatible_preserving CategoryTheory.CompatiblePreserving
+-/
 
 variable {J K} {G : C ⥤ D} (hG : CompatiblePreserving.{w} K G) (ℱ : SheafOfTypes.{w} K) {Z : C}
 
@@ -112,6 +120,12 @@ variable {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T} (h : x.Com
 
 include h hG
 
+/- warning: category_theory.presieve.family_of_elements.compatible.functor_pushforward -> CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u3, u5} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z) (CategoryTheory.Presieve.functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z T) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x)))
+but is expected to have type
+  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u3, u5} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Z) (CategoryTheory.Presieve.functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z T) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x)))
+Case conversion may be inaccurate. Consider using '#align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforwardₓ'. -/
 /-- `compatible_preserving` functors indeed preserve compatible families. -/
 theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
     (x.functorPushforward G).Compatible :=
@@ -126,6 +140,12 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
   simpa using Eq
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
 
+/- warning: category_theory.compatible_preserving.apply_map -> CategoryTheory.CompatiblePreserving.apply_map is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (forall {Y : C} {f : Quiver.Hom.{succ u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) Y Z} (hf : T Y f), Eq.{succ u1} (CategoryTheory.Functor.obj.{u3, u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) (Opposite.op.{succ u5} D (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y))) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x (CategoryTheory.Functor.obj.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y) (CategoryTheory.Functor.map.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Y Z f) (CategoryTheory.Presieve.image_mem_functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z Y T f hf)) (x Y f hf)))
+but is expected to have type
+  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} {G : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2}, (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K G) -> (forall (ℱ : CategoryTheory.SheafOfTypes.{u1, u3, u5} D _inst_2 K) {Z : C} {T : CategoryTheory.Presieve.{u2, u4} C _inst_1 Z} {x : CategoryTheory.Presieve.FamilyOfElements.{u1, u2, u4} C _inst_1 Z (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) T}, (CategoryTheory.Presieve.FamilyOfElements.Compatible.{u1, u2, u4} C _inst_1 (CategoryTheory.Functor.comp.{u2, u3, u1, u4, u5, succ u1} (Opposite.{succ u4} C) (CategoryTheory.Category.opposite.{u2, u4} C _inst_1) (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.Functor.op.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) Z T x) -> (forall {Y : C} {f : Quiver.Hom.{succ u2, u4} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) Y Z} (hf : T Y f), Eq.{succ u1} (Prefunctor.obj.{succ u3, succ u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} (Opposite.{succ u5} D) (CategoryTheory.Category.toCategoryStruct.{u3, u5} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2))) Type.{u1} (CategoryTheory.CategoryStruct.toQuiver.{u1, succ u1} Type.{u1} (CategoryTheory.Category.toCategoryStruct.{u1, succ u1} Type.{u1} CategoryTheory.types.{u1})) (CategoryTheory.Functor.toPrefunctor.{u3, u1, u5, succ u1} (Opposite.{succ u5} D) (CategoryTheory.Category.opposite.{u3, u5} D _inst_2) Type.{u1} CategoryTheory.types.{u1} (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ)) (Opposite.op.{succ u5} D (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y))) (CategoryTheory.Presieve.FamilyOfElements.functorPushforward.{u1, u3, u2, u5, u4} D _inst_2 (CategoryTheory.SheafOfTypes.val.{u1, u3, u5} D _inst_2 K ℱ) C _inst_1 G Z T x (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y) (Prefunctor.map.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 G) Y Z f) (CategoryTheory.Presieve.image_mem_functorPushforward.{u2, u3, u4, u5} C _inst_1 D _inst_2 G Z Y T f hf)) (x Y f hf)))
+Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_mapₓ'. -/
 @[simp]
 theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
     x.functorPushforward G (G.map f) (image_mem_functorPushforward G T hf) = x f hf :=
@@ -140,6 +160,12 @@ omit h hG
 
 open Limits.WalkingCospan
 
+/- warning: category_theory.compatible_preserving_of_flat -> CategoryTheory.compatiblePreservingOfFlat is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u2}} [_inst_4 : CategoryTheory.Category.{u1, u2} C] {D : Type.{u2}} [_inst_5 : CategoryTheory.Category.{u1, u2} D] (K : CategoryTheory.GrothendieckTopology.{u1, u2} D _inst_5) (G : CategoryTheory.Functor.{u1, u1, u2, u2} C _inst_4 D _inst_5) [_inst_6 : CategoryTheory.RepresentablyFlat.{u1, u1, u2, u2} C _inst_4 D _inst_5 G], CategoryTheory.CompatiblePreserving.{u3, u1, u1, u2, u2} C _inst_4 D _inst_5 K G
+but is expected to have type
+  forall {C : Type.{u3}} [_inst_4 : CategoryTheory.Category.{u2, u3} C] {D : Type.{u3}} [_inst_5 : CategoryTheory.Category.{u2, u3} D] (K : CategoryTheory.GrothendieckTopology.{u2, u3} D _inst_5) (G : CategoryTheory.Functor.{u2, u2, u3, u3} C _inst_4 D _inst_5) [_inst_6 : CategoryTheory.RepresentablyFlat.{u2, u2, u3, u3} C _inst_4 D _inst_5 G], CategoryTheory.CompatiblePreserving.{u1, u2, u2, u3, u3} C _inst_4 D _inst_5 K G
+Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlatₓ'. -/
 theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type u₁} [Category.{v₁} D]
     (K : GrothendieckTopology D) (G : C ⥤ D) [RepresentablyFlat G] : CompatiblePreserving K G :=
   by
@@ -177,6 +203,12 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   exact hx (c'.π.app left).right (c'.π.app right).right hg₁ hg₂ (e₁.symm.trans e₂)
 #align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlat
 
+/- warning: category_theory.compatible_preserving_of_downwards_closed -> CategoryTheory.compatiblePreservingOfDownwardsClosed is a dubious translation:
+lean 3 declaration is
+  forall {C : Type.{u3}} [_inst_1 : CategoryTheory.Category.{u1, u3} C] {D : Type.{u4}} [_inst_2 : CategoryTheory.Category.{u2, u4} D] {K : CategoryTheory.GrothendieckTopology.{u2, u4} D _inst_2} (F : CategoryTheory.Functor.{u1, u2, u3, u4} C _inst_1 D _inst_2) [_inst_4 : CategoryTheory.Full.{u1, u2, u3, u4} C _inst_1 D _inst_2 F] [_inst_5 : CategoryTheory.Faithful.{u1, u2, u3, u4} C _inst_1 D _inst_2 F], (forall {c : C} {d : D}, (Quiver.Hom.{succ u2, u4} D (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} D (CategoryTheory.Category.toCategoryStruct.{u2, u4} D _inst_2)) d (CategoryTheory.Functor.obj.{u1, u2, u3, u4} C _inst_1 D _inst_2 F c)) -> (Sigma.{u3, u2} C (fun (c' : C) => CategoryTheory.Iso.{u2, u4} D _inst_2 (CategoryTheory.Functor.obj.{u1, u2, u3, u4} C _inst_1 D _inst_2 F c') d))) -> (CategoryTheory.CompatiblePreserving.{u5, u1, u2, u3, u4} C _inst_1 D _inst_2 K F)
+but is expected to have type
+  forall {C : Type.{u4}} [_inst_1 : CategoryTheory.Category.{u2, u4} C] {D : Type.{u5}} [_inst_2 : CategoryTheory.Category.{u3, u5} D] {K : CategoryTheory.GrothendieckTopology.{u3, u5} D _inst_2} (F : CategoryTheory.Functor.{u2, u3, u4, u5} C _inst_1 D _inst_2) [_inst_4 : CategoryTheory.Full.{u2, u3, u4, u5} C _inst_1 D _inst_2 F] [_inst_5 : CategoryTheory.Faithful.{u2, u3, u4, u5} C _inst_1 D _inst_2 F], (forall {c : C} {d : D}, (Quiver.Hom.{succ u3, u5} D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) d (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 F) c)) -> (Sigma.{u4, u3} C (fun (c' : C) => CategoryTheory.Iso.{u3, u5} D _inst_2 (Prefunctor.obj.{succ u2, succ u3, u4, u5} C (CategoryTheory.CategoryStruct.toQuiver.{u2, u4} C (CategoryTheory.Category.toCategoryStruct.{u2, u4} C _inst_1)) D (CategoryTheory.CategoryStruct.toQuiver.{u3, u5} D (CategoryTheory.Category.toCategoryStruct.{u3, u5} D _inst_2)) (CategoryTheory.Functor.toPrefunctor.{u2, u3, u4, u5} C _inst_1 D _inst_2 F) c') d))) -> (CategoryTheory.CompatiblePreserving.{u1, u2, u3, u4, u5} C _inst_1 D _inst_2 K F)
+Case conversion may be inaccurate. Consider using '#align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosedₓ'. -/
 theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
     (hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σc', F.obj c' ≅ d) : CompatiblePreserving K F :=
   by
@@ -190,6 +222,7 @@ theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F
       (F.map_injective <| by simpa using he)
 #align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosed
 
+#print CategoryTheory.pullback_isSheaf_of_coverPreserving /-
 /-- If `G` is cover-preserving and compatible-preserving,
 then `G.op ⋙ _` pulls sheaves back to sheaves.
 
@@ -218,15 +251,19 @@ theorem pullback_isSheaf_of_coverPreserving {G : C ⥤ D} (hG₁ : CompatiblePre
     dsimp
     simp [hG₁.apply_map (sheaf_over ℱ X) hx h, ← hy f' h]
 #align category_theory.pullback_is_sheaf_of_cover_preserving CategoryTheory.pullback_isSheaf_of_coverPreserving
+-/
 
+#print CategoryTheory.pullbackSheaf /-
 /-- The pullback of a sheaf along a cover-preserving and compatible-preserving functor. -/
 def pullbackSheaf {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : CoverPreserving J K G)
     (ℱ : Sheaf K A) : Sheaf J A :=
   ⟨G.op ⋙ ℱ.val, pullback_isSheaf_of_coverPreserving hG₁ hG₂ ℱ⟩
 #align category_theory.pullback_sheaf CategoryTheory.pullbackSheaf
+-/
 
 variable (A)
 
+#print CategoryTheory.Sites.pullback /-
 /-- The induced functor from `Sheaf K A ⥤ Sheaf J A` given by `G.op ⋙ _`
 if `G` is cover-preserving and compatible-preserving.
 -/
@@ -242,6 +279,7 @@ def Sites.pullback {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : Cov
     ext1
     apply ((whiskering_left _ _ _).obj G.op).map_comp
 #align category_theory.sites.pullback CategoryTheory.Sites.pullback
+-/
 
 end CategoryTheory
 
Diff
@@ -4,13 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit e2e38c005fc6f715502490da6cb0ec84df9ed228
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.CategoryTheory.Sites.Limits
 import Mathbin.CategoryTheory.Functor.Flat
-import Mathbin.CategoryTheory.Limits.Preserves.Filtered
+import Mathbin.CategoryTheory.Sites.Sheaf
+import Mathbin.Tactic.ApplyFun
 
 /-!
 # Cover-preserving functors between sites.
Diff
@@ -4,14 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
 
 ! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit 85d6221d32c37e68f05b2e42cde6cee658dae5e9
+! leanprover-community/mathlib commit e2e38c005fc6f715502490da6cb0ec84df9ed228
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.CategoryTheory.Sites.Limits
 import Mathbin.CategoryTheory.Functor.Flat
 import Mathbin.CategoryTheory.Limits.Preserves.Filtered
-import Mathbin.CategoryTheory.Sites.LeftExact
 
 /-!
 # Cover-preserving functors between sites.
@@ -30,10 +29,6 @@ if it pushes compatible families of elements to compatible families.
 compatible-preserving functor.
 * `category_theory.sites.pullback`: the induced functor `Sheaf K A ⥤ Sheaf J A` for a
 cover-preserving and compatible-preserving functor `G : (C, J) ⥤ (D, K)`.
-* `category_theory.sites.pushforward`: the induced functor `Sheaf J A ⥤ Sheaf K A` for a
-cover-preserving and compatible-preserving functor `G : (C, J) ⥤ (D, K)`.
-* `category_theory.sites.pushforward`: the induced functor `Sheaf J A ⥤ Sheaf K A` for a
-cover-preserving and compatible-preserving functor `G : (C, J) ⥤ (D, K)`.
 
 ## Main results
 
@@ -250,53 +245,3 @@ def Sites.pullback {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : Cov
 
 end CategoryTheory
 
-namespace CategoryTheory
-
-variable {C : Type v₁} [SmallCategory C] {D : Type v₁} [SmallCategory D]
-
-variable (A : Type u₂) [Category.{v₁} A]
-
-variable (J : GrothendieckTopology C) (K : GrothendieckTopology D)
-
-instance [HasLimits A] : CreatesLimits (sheafToPresheaf J A) :=
-  CategoryTheory.Sheaf.CategoryTheory.SheafToPresheaf.CategoryTheory.createsLimits.{u₂, v₁, v₁}
-
--- The assumptions so that we have sheafification
-variable [ConcreteCategory.{v₁} A] [PreservesLimits (forget A)] [HasColimits A] [HasLimits A]
-
-variable [PreservesFilteredColimits (forget A)] [ReflectsIsomorphisms (forget A)]
-
-attribute [local instance] reflects_limits_of_reflects_isomorphisms
-
-instance {X : C} : IsCofiltered (J.cover X) :=
-  inferInstance
-
-/-- The pushforward functor `Sheaf J A ⥤ Sheaf K A` associated to a functor `G : C ⥤ D` in the
-same direction as `G`. -/
-@[simps]
-def Sites.pushforward (G : C ⥤ D) : Sheaf J A ⥤ Sheaf K A :=
-  sheafToPresheaf J A ⋙ lan G.op ⋙ presheafToSheaf K A
-#align category_theory.sites.pushforward CategoryTheory.Sites.pushforward
-
-instance (G : C ⥤ D) [RepresentablyFlat G] : PreservesFiniteLimits (Sites.pushforward A J K G) :=
-  by
-  apply (config := { instances := false }) comp_preserves_finite_limits
-  · infer_instance
-  apply (config := { instances := false }) comp_preserves_finite_limits
-  · apply CategoryTheory.lanPreservesFiniteLimitsOfFlat
-  · apply CategoryTheory.presheafToSheaf.Limits.preservesFiniteLimits.{u₂, v₁, v₁}
-    infer_instance
-
-/-- The pushforward functor is left adjoint to the pullback functor. -/
-def Sites.pullbackPushforwardAdjunction {G : C ⥤ D} (hG₁ : CompatiblePreserving K G)
-    (hG₂ : CoverPreserving J K G) : Sites.pushforward A J K G ⊣ Sites.pullback A hG₁ hG₂ :=
-  ((Lan.adjunction A G.op).comp (sheafificationAdjunction K A)).restrictFullyFaithful
-    (sheafToPresheaf J A) (𝟭 _)
-    (NatIso.ofComponents (fun _ => Iso.refl _) fun _ _ _ =>
-      (Category.comp_id _).trans (Category.id_comp _).symm)
-    (NatIso.ofComponents (fun _ => Iso.refl _) fun _ _ _ =>
-      (Category.comp_id _).trans (Category.id_comp _).symm)
-#align category_theory.sites.pullback_pushforward_adjunction CategoryTheory.Sites.pullbackPushforwardAdjunction
-
-end CategoryTheory
-
Diff
@@ -290,7 +290,7 @@ instance (G : C ⥤ D) [RepresentablyFlat G] : PreservesFiniteLimits (Sites.push
 /-- The pushforward functor is left adjoint to the pullback functor. -/
 def Sites.pullbackPushforwardAdjunction {G : C ⥤ D} (hG₁ : CompatiblePreserving K G)
     (hG₂ : CoverPreserving J K G) : Sites.pushforward A J K G ⊣ Sites.pullback A hG₁ hG₂ :=
-  ((lan.adjunction A G.op).comp (sheafificationAdjunction K A)).restrictFullyFaithful
+  ((Lan.adjunction A G.op).comp (sheafificationAdjunction K A)).restrictFullyFaithful
     (sheafToPresheaf J A) (𝟭 _)
     (NatIso.ofComponents (fun _ => Iso.refl _) fun _ _ _ =>
       (Category.comp_id _).trans (Category.id_comp _).symm)
Diff
@@ -82,9 +82,9 @@ structure CoverPreserving (G : C ⥤ D) : Prop where
 #align category_theory.cover_preserving CategoryTheory.CoverPreserving
 
 /-- The identity functor on a site is cover-preserving. -/
-theorem id_coverPreserving : CoverPreserving J J (𝟭 _) :=
+theorem idCoverPreserving : CoverPreserving J J (𝟭 _) :=
   ⟨fun U S hS => by simpa using hS⟩
-#align category_theory.id_cover_preserving CategoryTheory.id_coverPreserving
+#align category_theory.id_cover_preserving CategoryTheory.idCoverPreserving
 
 variable (J) (K)
 

Changes in mathlib4

mathlib3
mathlib4
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -63,7 +63,7 @@ variable {L : GrothendieckTopology A}
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
 if for all covering sieves `R` in `C`, `R.functorPushforward G` is a covering sieve in `D`.
 -/
--- Porting note: removed `@[nolint has_nonempty_instance]`
+-- Porting note(#5171): removed `@[nolint has_nonempty_instance]`
 structure CoverPreserving (G : C ⥤ D) : Prop where
   cover_preserve : ∀ {U : C} {S : Sieve U} (_ : S ∈ J U), S.functorPushforward G ∈ K (G.obj U)
 #align category_theory.cover_preserving CategoryTheory.CoverPreserving
@@ -87,7 +87,7 @@ compatible family of elements at `C` and valued in `G.op ⋙ ℱ`, and each comm
 This is actually stronger than merely preserving compatible families because of the definition of
 `functorPushforward` used.
 -/
--- Porting note: this doesn't work yet @[nolint has_nonempty_instance]
+-- Porting note(#5171): linter not ported yet @[nolint has_nonempty_instance]
 structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop where
   compatible :
     ∀ (ℱ : SheafOfTypes.{w} K) {Z} {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T}
chore(CategoryTheory): move Full, Faithful, EssSurj, IsEquivalence and ReflectsIsomorphisms to the Functor namespace (#11985)

These notions on functors are now Functor.Full, Functor.Faithful, Functor.EssSurj, Functor.IsEquivalence, Functor.ReflectsIsomorphisms. Deprecated aliases are introduced for the previous names.

Diff
@@ -158,7 +158,7 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   exact hx (c'.π.app left).right (c'.π.app right).right hg₁ hg₂ (e₁.symm.trans e₂)
 #align category_theory.compatible_preserving_of_flat CategoryTheory.compatiblePreservingOfFlat
 
-theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F]
+theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [F.Full] [F.Faithful]
     (hF : ∀ {c : C} {d : D} (_ : d ⟶ F.obj c), Σc', F.obj c' ≅ d) : CompatiblePreserving K F := by
   constructor
   introv hx he
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -56,11 +56,8 @@ open CategoryTheory Opposite CategoryTheory.Presieve.FamilyOfElements CategoryTh
 namespace CategoryTheory
 
 variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D] (F : C ⥤ D)
-
 variable {A : Type u₃} [Category.{v₃} A]
-
 variable (J : GrothendieckTopology C) (K : GrothendieckTopology D)
-
 variable {L : GrothendieckTopology A}
 
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
@@ -100,7 +97,6 @@ structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop
 #align category_theory.compatible_preserving CategoryTheory.CompatiblePreserving
 
 variable {J K} {G : C ⥤ D} (hG : CompatiblePreserving.{w} K G) (ℱ : SheafOfTypes.{w} K) {Z : C}
-
 variable {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T} (h : x.Compatible)
 
 /-- `CompatiblePreserving` functors indeed preserve compatible families. -/
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -66,7 +66,7 @@ variable {L : GrothendieckTopology A}
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
 if for all covering sieves `R` in `C`, `R.functorPushforward G` is a covering sieve in `D`.
 -/
--- porting note: removed `@[nolint has_nonempty_instance]`
+-- Porting note: removed `@[nolint has_nonempty_instance]`
 structure CoverPreserving (G : C ⥤ D) : Prop where
   cover_preserve : ∀ {U : C} {S : Sieve U} (_ : S ∈ J U), S.functorPushforward G ∈ K (G.obj U)
 #align category_theory.cover_preserving CategoryTheory.CoverPreserving
@@ -90,7 +90,7 @@ compatible family of elements at `C` and valued in `G.op ⋙ ℱ`, and each comm
 This is actually stronger than merely preserving compatible families because of the definition of
 `functorPushforward` used.
 -/
--- porting note: this doesn't work yet @[nolint has_nonempty_instance]
+-- Porting note: this doesn't work yet @[nolint has_nonempty_instance]
 structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop where
   compatible :
     ∀ (ℱ : SheafOfTypes.{w} K) {Z} {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T}
@@ -151,7 +151,7 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   conv_lhs => rw [eq₁]
   conv_rhs => rw [eq₂]
   simp only [op_comp, Functor.map_comp, types_comp_apply, eqToHom_op, eqToHom_map]
-  apply congr_arg -- porting note: was `congr 1` which for some reason doesn't do anything here
+  apply congr_arg -- Porting note: was `congr 1` which for some reason doesn't do anything here
   -- despite goal being of the form f a = f b, with f=`ℱ.val.map (Quiver.Hom.op c'.pt.hom)`
   /-
     Since everything now falls in the image of `u`,
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -142,11 +142,11 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
   let c' := IsCofiltered.cone (c.toStructuredArrow ⋙ StructuredArrow.pre _ _ _)
   have eq₁ : f₁ = (c'.pt.hom ≫ G.map (c'.π.app left).right) ≫ eqToHom (by simp) := by
     erw [← (c'.π.app left).w]
-    dsimp
+    dsimp [c]
     simp
   have eq₂ : f₂ = (c'.pt.hom ≫ G.map (c'.π.app right).right) ≫ eqToHom (by simp) := by
     erw [← (c'.π.app right).w]
-    dsimp
+    dsimp [c]
     simp
   conv_lhs => rw [eq₁]
   conv_rhs => rw [eq₂]
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -120,7 +120,7 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
 theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
     x.functorPushforward G (G.map f) (image_mem_functorPushforward G T hf) = x f hf := by
   unfold FamilyOfElements.functorPushforward
-  rcases e₁ : getFunctorPushforwardStructure (image_mem_functorPushforward G T hf) with
+  rcases getFunctorPushforwardStructure (image_mem_functorPushforward G T hf) with
     ⟨X, g, f', hg, eq⟩
   simpa using hG.compatible ℱ h f' (𝟙 _) hg hf (by simp [eq])
 #align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_map
refactor(CategoryTheory/Sites): continuous functors (#8408)

This PR introduces the typeclass Functor.IsContinuous which says that the precomposition with a functor preserves the sheaf condition for Grothendieck topologies. It slightly refactors the previous main theorem about CoverPreserving and CompatiblePreserving functors: it now states that such functors are continuous. The pushforward functor for a continuous functor is defined under the Functor.IsContinuous assumption rather than the combination of both CoverPreserving and CompatiblePreserving. The property CoverLifting is renamed IsCocontinuous and it is made a class. The property IsCoverDense is also made a class.

Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>

Diff
@@ -9,33 +9,39 @@ import Mathlib.Tactic.ApplyFun
 
 #align_import category_theory.sites.cover_preserving from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
 /-!
-# Cover-preserving functors between sites.
+# Cover-preserving and continuous functors between sites.
 
-We define cover-preserving functors between sites as functors that push covering sieves to
-covering sieves. A cover-preserving and compatible-preserving functor `G : C ⥤ D` then pulls
-sheaves on `D` back to sheaves on `C` via `G.op ⋙ -`.
+We define the notion of continuous functor between sites: these are functors `G` such that
+the precomposition with `G.op` preserves sheaves of types (and actually sheaves in any
+category).
+
+In order to show that a functor is continuous, we define cover-preserving functors
+between sites as functors that push covering sieves to covering sieves.
+Then, a cover-preserving and compatible-preserving functor is continuous.
 
 ## Main definitions
 
+* `CategoryTheory.Functor.IsContinuous`: a functor between sites is continuous if the
+precomposition with this functor preserves sheaves.
 * `CategoryTheory.CoverPreserving`: a functor between sites is cover-preserving if it
 pushes covering sieves to covering sieves
 * `CategoryTheory.CompatiblePreserving`: a functor between sites is compatible-preserving
 if it pushes compatible families of elements to compatible families.
-* `CategoryTheory.pullbackSheaf`: the pullback of a sheaf along a cover-preserving and
-compatible-preserving functor.
-* `CategoryTheory.Sites.pullback`: the induced functor `Sheaf K A ⥤ Sheaf J A` for a
-cover-preserving and compatible-preserving functor `G : (C, J) ⥤ (D, K)`.
+* `CategoryTheory.Functor.sheafPushforwardContinuous`: the induced functor
+`Sheaf K A ⥤ Sheaf J A` for a continuous functor `G : (C, J) ⥤ (D, K)`. In case this is
+part of a morphism of sites, this would be understood as the pushforward functor
+even though it goes in the opposite direction as the functor `G`.
 
 ## Main results
 
-- `CategoryTheory.pullback_isSheaf_of_coverPreserving`: If `G : C ⥤ D` is
-cover-preserving and compatible-preserving, then `G ⋙ -` (`uᵖ`) as a functor
-`(Dᵒᵖ ⥤ A) ⥤ (Cᵒᵖ ⥤ A)` of presheaves maps sheaves to sheaves.
+- `CategoryTheory.isContinuous_of_coverPreserving`: If `G : C ⥤ D` is
+cover-preserving and compatible-preserving, then `G` is a continuous functor,
+i.e. `G.op ⋙ -` as a functor `(Dᵒᵖ ⥤ A) ⥤ (Cᵒᵖ ⥤ A)` of presheaves maps sheaves to sheaves.
 
 ## References
 
 * [Elephant]: *Sketches of an Elephant*, P. T. Johnstone: C2.3.
-* https://stacks.math.columbia.edu/tag/00WW
+* https://stacks.math.columbia.edu/tag/00WU
 
 -/
 
@@ -49,7 +55,7 @@ open CategoryTheory Opposite CategoryTheory.Presieve.FamilyOfElements CategoryTh
 
 namespace CategoryTheory
 
-variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]
+variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D] (F : C ⥤ D)
 
 variable {A : Type u₃} [Category.{v₃} A]
 
@@ -86,7 +92,7 @@ This is actually stronger than merely preserving compatible families because of
 -/
 -- porting note: this doesn't work yet @[nolint has_nonempty_instance]
 structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop where
-  Compatible :
+  compatible :
     ∀ (ℱ : SheafOfTypes.{w} K) {Z} {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T}
       (_ : x.Compatible) {Y₁ Y₂} {X} (f₁ : X ⟶ G.obj Y₁) (f₂ : X ⟶ G.obj Y₂) {g₁ : Y₁ ⟶ Z}
       {g₂ : Y₂ ⟶ Z} (hg₁ : T g₁) (hg₂ : T g₂) (_ : f₁ ≫ G.map g₁ = f₂ ≫ G.map g₂),
@@ -106,7 +112,7 @@ theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
   rcases getFunctorPushforwardStructure H₂ with ⟨X₂, f₂, h₂, hf₂, rfl⟩
   suffices ℱ.val.map (g₁ ≫ h₁).op (x f₁ hf₁) = ℱ.val.map (g₂ ≫ h₂).op (x f₂ hf₂) by
     simpa using this
-  apply hG.Compatible ℱ h _ _ hf₁ hf₂
+  apply hG.compatible ℱ h _ _ hf₁ hf₂
   simpa using eq
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
 
@@ -116,7 +122,7 @@ theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
   unfold FamilyOfElements.functorPushforward
   rcases e₁ : getFunctorPushforwardStructure (image_mem_functorPushforward G T hf) with
     ⟨X, g, f', hg, eq⟩
-  simpa using hG.Compatible ℱ h f' (𝟙 _) hg hf (by simp [eq])
+  simpa using hG.compatible ℱ h f' (𝟙 _) hg hf (by simp [eq])
 #align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_map
 
 open Limits.WalkingCospan
@@ -168,57 +174,85 @@ theorem compatiblePreservingOfDownwardsClosed (F : C ⥤ D) [Full F] [Faithful F
       (F.map_injective <| by simpa using he)
 #align category_theory.compatible_preserving_of_downwards_closed CategoryTheory.compatiblePreservingOfDownwardsClosed
 
-/-- If `G` is cover-preserving and compatible-preserving,
-then `G.op ⋙ _` pulls sheaves back to sheaves.
+variable (J K)
 
-This result is basically <https://stacks.math.columbia.edu/tag/00WW>.
--/
-theorem pullback_isSheaf_of_coverPreserving {G : C ⥤ D} (hG₁ : CompatiblePreserving.{v₃} K G)
-    (hG₂ : CoverPreserving J K G) (ℱ : Sheaf K A) : Presheaf.IsSheaf J (G.op ⋙ ℱ.val) := by
-  intro X U S hS x hx
-  change FamilyOfElements (G.op ⋙ ℱ.val ⋙ coyoneda.obj (op X)) _ at x
-  let H := ℱ.2 X _ (hG₂.cover_preserve hS)
-  let hx' := hx.functorPushforward hG₁ (sheafOver ℱ X)
-  constructor; swap
-  · apply H.amalgamate (x.functorPushforward G)
-    exact hx'
-  constructor
-  · intro V f hf
-    convert H.isAmalgamation hx' (G.map f) (image_mem_functorPushforward G S hf)
-    rw [hG₁.apply_map (sheafOver ℱ X) hx]
-  · intro y hy
-    refine'
-      H.isSeparatedFor _ y _ _ (H.isAmalgamation (hx.functorPushforward hG₁ (sheafOver ℱ X)))
-    rintro V f ⟨Z, f', g', h, rfl⟩
-    -- porting note: didn't need coercion (S : Presieve U) in Lean 3
-    erw [FamilyOfElements.comp_of_compatible (S.functorPushforward G) hx'
-        (image_mem_functorPushforward G (S : Presieve U) h) g']
-    dsimp
-    simp [hG₁.apply_map (sheafOver ℱ X) hx h, ← hy f' h]
-#align category_theory.pullback_is_sheaf_of_cover_preserving CategoryTheory.pullback_isSheaf_of_coverPreserving
+/-- A functor `F` is continuous if the precomposition with `F.op` sends sheaves of `Type w`
+to sheaves. -/
+class Functor.IsContinuous : Prop where
+  op_comp_isSheafOfTypes (G : SheafOfTypes.{w} K) : Presieve.IsSheaf J (F.op ⋙ G.val)
+
+lemma Functor.op_comp_isSheafOfTypes [Functor.IsContinuous.{w} F J K]
+    (G : SheafOfTypes.{w} K) :
+    Presieve.IsSheaf J (F.op ⋙ G.val) :=
+  Functor.IsContinuous.op_comp_isSheafOfTypes _
+
+lemma Functor.isContinuous_of_iso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂)
+    (J : GrothendieckTopology C) (K : GrothendieckTopology D)
+    [Functor.IsContinuous.{w} F₁ J K] : Functor.IsContinuous.{w} F₂ J K where
+  op_comp_isSheafOfTypes G :=
+    Presieve.isSheaf_iso J (isoWhiskerRight (NatIso.op e.symm) _)
+      (F₁.op_comp_isSheafOfTypes J K G)
 
-/-- The pullback of a sheaf along a cover-preserving and compatible-preserving functor. -/
-def pullbackSheaf {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : CoverPreserving J K G)
-    (ℱ : Sheaf K A) : Sheaf J A :=
-  ⟨G.op ⋙ ℱ.val, pullback_isSheaf_of_coverPreserving hG₁ hG₂ ℱ⟩
-#align category_theory.pullback_sheaf CategoryTheory.pullbackSheaf
+instance Functor.isContinuous_id : Functor.IsContinuous.{w} (𝟭 C) J J where
+  op_comp_isSheafOfTypes G := G.2
 
-variable (A)
+lemma Functor.isContinuous_comp (F₁ : C ⥤ D) (F₂ : D ⥤ A) (J : GrothendieckTopology C)
+    (K : GrothendieckTopology D) (L : GrothendieckTopology A)
+    [Functor.IsContinuous.{w} F₁ J K] [Functor.IsContinuous.{w} F₂ K L] :
+    Functor.IsContinuous.{w} (F₁ ⋙ F₂) J L where
+  op_comp_isSheafOfTypes G := F₁.op_comp_isSheafOfTypes J K ⟨_, F₂.op_comp_isSheafOfTypes K L G⟩
 
-/-- The induced functor from `Sheaf K A ⥤ Sheaf J A` given by `G.op ⋙ _`
-if `G` is cover-preserving and compatible-preserving.
+lemma Functor.isContinuous_comp' {F₁ : C ⥤ D} {F₂ : D ⥤ A} {F₁₂ : C ⥤ A}
+    (e : F₁ ⋙ F₂ ≅ F₁₂) (J : GrothendieckTopology C)
+    (K : GrothendieckTopology D) (L : GrothendieckTopology A)
+    [Functor.IsContinuous.{w} F₁ J K] [Functor.IsContinuous.{w} F₂ K L] :
+    Functor.IsContinuous.{w} F₁₂ J L := by
+  have := Functor.isContinuous_comp F₁ F₂ J K L
+  apply Functor.isContinuous_of_iso e
+
+lemma Functor.op_comp_isSheaf [Functor.IsContinuous.{v₃} F J K] (G : Sheaf K A) :
+    Presheaf.IsSheaf J (F.op ⋙ G.val) :=
+  fun T => F.op_comp_isSheafOfTypes J K ⟨_, G.cond T⟩
+
+variable {F J K}
+
+/-- If `F` is cover-preserving and compatible-preserving,
+then `F` is a continuous functor.
+
+This result is basically <https://stacks.math.columbia.edu/tag/00WW>.
+-/
+lemma Functor.isContinuous_of_coverPreserving (hF₁ : CompatiblePreserving.{w} K F)
+    (hF₂ : CoverPreserving J K F) : Functor.IsContinuous.{w} F J K where
+  op_comp_isSheafOfTypes G X S hS x hx := by
+    apply exists_unique_of_exists_of_unique
+    · have H := G.2 _ (hF₂.cover_preserve hS)
+      exact ⟨H.amalgamate (x.functorPushforward F) (hx.functorPushforward hF₁),
+        fun V f hf => (H.isAmalgamation (hx.functorPushforward hF₁) (F.map f) _).trans
+          (hF₁.apply_map _ hx hf)⟩
+    · intro y₁ y₂ hy₁ hy₂
+      apply (Presieve.isSeparated_of_isSheaf _ _ G.cond _ (hF₂.cover_preserve hS)).ext
+      rintro Y _ ⟨Z, g, h, hg, rfl⟩
+      dsimp
+      simp only [Functor.map_comp, types_comp_apply]
+      have H := (hy₁ g hg).trans (hy₂ g hg).symm
+      dsimp at H
+      rw [H]
+
+variable (F J K A)
+
+/-- The induced functor `Sheaf K A ⥤ Sheaf J A` given by `G.op ⋙ _`
+if `G` is a continuous functor.
 -/
-@[simps]
-def Sites.pullback {G : C ⥤ D} (hG₁ : CompatiblePreserving K G) (hG₂ : CoverPreserving J K G) :
+def Functor.sheafPushforwardContinuous [Functor.IsContinuous.{v₃} F J K] :
     Sheaf K A ⥤ Sheaf J A where
-  obj ℱ := pullbackSheaf hG₁ hG₂ ℱ
-  map f := ⟨((whiskeringLeft _ _ _).obj G.op).map f.val⟩
+  obj ℱ := ⟨F.op ⋙ ℱ.val, F.op_comp_isSheaf J K ℱ⟩
+  map f := ⟨((whiskeringLeft _ _ _).obj F.op).map f.val⟩
   map_id ℱ := by
     ext1
-    apply ((whiskeringLeft _ _ _).obj G.op).map_id
+    apply ((whiskeringLeft _ _ _).obj F.op).map_id
   map_comp f g := by
     ext1
-    apply ((whiskeringLeft _ _ _).obj G.op).map_comp
-#align category_theory.sites.pullback CategoryTheory.Sites.pullback
+    apply ((whiskeringLeft _ _ _).obj F.op).map_comp
+#align category_theory.sites.pullback CategoryTheory.Functor.sheafPushforwardContinuous
 
 end CategoryTheory
feat: turn a cocone into a functor to costructured arrows (#6369)

After making this PR I noticed that this already existed in Functor/Flat.lean, so I unified the two developments.

Diff
@@ -133,7 +133,7 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
     over it since `StructuredArrow W u` is cofiltered.
     Then, it suffices to prove that it is compatible when restricted onto `u(c'.X.right)`.
     -/
-  let c' := IsCofiltered.cone (StructuredArrowCone.toDiagram c ⋙ StructuredArrow.pre _ _ _)
+  let c' := IsCofiltered.cone (c.toStructuredArrow ⋙ StructuredArrow.pre _ _ _)
   have eq₁ : f₁ = (c'.pt.hom ≫ G.map (c'.π.app left).right) ≫ eqToHom (by simp) := by
     erw [← (c'.π.app left).w]
     dsimp
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Andrew Yang. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module category_theory.sites.cover_preserving
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.CategoryTheory.Functor.Flat
 import Mathlib.CategoryTheory.Sites.Sheaf
 import Mathlib.Tactic.ApplyFun
+
+#align_import category_theory.sites.cover_preserving from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
 /-!
 # Cover-preserving functors between sites.
 
chore: tidy various files (#4003)
Diff
@@ -26,7 +26,7 @@ pushes covering sieves to covering sieves
 if it pushes compatible families of elements to compatible families.
 * `CategoryTheory.pullbackSheaf`: the pullback of a sheaf along a cover-preserving and
 compatible-preserving functor.
-* `category_theory.Sites.pullback`: the induced functor `Sheaf K A ⥤ Sheaf J A` for a
+* `CategoryTheory.Sites.pullback`: the induced functor `Sheaf K A ⥤ Sheaf J A` for a
 cover-preserving and compatible-preserving functor `G : (C, J) ⥤ (D, K)`.
 
 ## Main results
@@ -47,15 +47,8 @@ universe w v₁ v₂ v₃ u₁ u₂ u₃
 
 noncomputable section
 
-open CategoryTheory
-
-open Opposite
-
-open CategoryTheory.Presieve.FamilyOfElements
-
-open CategoryTheory.Presieve
-
-open CategoryTheory.Limits
+open CategoryTheory Opposite CategoryTheory.Presieve.FamilyOfElements CategoryTheory.Presieve
+  CategoryTheory.Limits
 
 namespace CategoryTheory
 
@@ -68,7 +61,7 @@ variable (J : GrothendieckTopology C) (K : GrothendieckTopology D)
 variable {L : GrothendieckTopology A}
 
 /-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
-if for all covering sieves `R` in `C`, `R.pushforward_functor G` is a covering sieve in `D`.
+if for all covering sieves `R` in `C`, `R.functorPushforward G` is a covering sieve in `D`.
 -/
 -- porting note: removed `@[nolint has_nonempty_instance]`
 structure CoverPreserving (G : C ⥤ D) : Prop where
@@ -80,9 +73,6 @@ theorem idCoverPreserving : CoverPreserving J J (𝟭 _) :=
   ⟨fun hS => by simpa using hS⟩
 #align category_theory.id_cover_preserving CategoryTheory.idCoverPreserving
 
--- porting note: this line is not needed as the variables are already explicit
--- variable (J) (K)
-
 /-- The composition of two cover-preserving functors is cover-preserving. -/
 theorem CoverPreserving.comp {F} (hF : CoverPreserving J K F) {G} (hG : CoverPreserving K L G) :
     CoverPreserving J L (F ⋙ G) :=
@@ -95,7 +85,7 @@ theorem CoverPreserving.comp {F} (hF : CoverPreserving J K F) {G} (hG : CoverPre
 compatible family of elements at `C` and valued in `G.op ⋙ ℱ`, and each commuting diagram
 `f₁ ≫ G.map g₁ = f₂ ≫ G.map g₂`, `x g₁` and `x g₂` coincide when restricted via `fᵢ`.
 This is actually stronger than merely preserving compatible families because of the definition of
-`functor_pushforward` used.
+`functorPushforward` used.
 -/
 -- porting note: this doesn't work yet @[nolint has_nonempty_instance]
 structure CompatiblePreserving (K : GrothendieckTopology D) (G : C ⥤ D) : Prop where
@@ -110,18 +100,15 @@ variable {J K} {G : C ⥤ D} (hG : CompatiblePreserving.{w} K G) (ℱ : SheafOfT
 
 variable {T : Presieve Z} {x : FamilyOfElements (G.op ⋙ ℱ.val) T} (h : x.Compatible)
 
--- porting note: commenting out `include`
--- include h hG
-
-/-- `compatible_preserving` functors indeed preserve compatible families. -/
+/-- `CompatiblePreserving` functors indeed preserve compatible families. -/
 theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
     (x.functorPushforward G).Compatible := by
   rintro Z₁ Z₂ W g₁ g₂ f₁' f₂' H₁ H₂ eq
   unfold FamilyOfElements.functorPushforward
   rcases getFunctorPushforwardStructure H₁ with ⟨X₁, f₁, h₁, hf₁, rfl⟩
   rcases getFunctorPushforwardStructure H₂ with ⟨X₂, f₂, h₂, hf₂, rfl⟩
-  suffices : ℱ.val.map (g₁ ≫ h₁).op (x f₁ hf₁) = ℱ.val.map (g₂ ≫ h₂).op (x f₂ hf₂)
-  simpa using this
+  suffices ℱ.val.map (g₁ ≫ h₁).op (x f₁ hf₁) = ℱ.val.map (g₂ ≫ h₂).op (x f₂ hf₂) by
+    simpa using this
   apply hG.Compatible ℱ h _ _ hf₁ hf₂
   simpa using eq
 #align category_theory.presieve.family_of_elements.compatible.functor_pushforward CategoryTheory.Presieve.FamilyOfElements.Compatible.functorPushforward
@@ -135,9 +122,6 @@ theorem CompatiblePreserving.apply_map {Y : C} {f : Y ⟶ Z} (hf : T f) :
   simpa using hG.Compatible ℱ h f' (𝟙 _) hg hf (by simp [eq])
 #align category_theory.compatible_preserving.apply_map CategoryTheory.CompatiblePreserving.apply_map
 
--- porting note: commenting out `omit`
--- omit h hG
-
 open Limits.WalkingCospan
 
 theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type u₁} [Category.{v₁} D]
@@ -149,7 +133,7 @@ theorem compatiblePreservingOfFlat {C : Type u₁} [Category.{v₁} C] {D : Type
     (Cones.postcompose (diagramIsoCospan (cospan g₁ g₂ ⋙ G)).inv).obj (PullbackCone.mk f₁ f₂ e)
   /-
     This can then be viewed as a cospan of structured arrows, and we may obtain an arbitrary cone
-    over it since `structured_arrow W u` is cofiltered.
+    over it since `StructuredArrow W u` is cofiltered.
     Then, it suffices to prove that it is compatible when restricted onto `u(c'.X.right)`.
     -/
   let c' := IsCofiltered.cone (StructuredArrowCone.toDiagram c ⋙ StructuredArrow.pre _ _ _)
feat: port CategoryTheory.Sites.CoverPreserving (#3884)

Straightforward.

Dependencies 3 + 333

334 files ported (99.1%)
135461 lines ported (99.2%)
Show graph

The unported dependencies are