l3lab/ntp-mathlib huggingface dataset:
/-- An adjunction `adj : G ⊣ F` with `F : D ⥤ E` and `G : E ⥤ D` induces an adjunction
between `Sheaf J D` and `Sheaf J E`, in contexts where one can sheafify `D`-valued presheaves,
and `F` preserves the correct limits. -/
@[simps! unit_app_val counit_app_val]
def adjunction (adj : G ⊣ F) : composeAndSheafify J G ⊣ sheafCompose J F :=
  Adjunction.mkOfHomEquiv
    { homEquiv := composeEquiv J adj
      homEquiv_naturality_left_symm := fun f g => by
        ext1
        dsimp [composeEquiv]
        rw [sheafifyMap_sheafifyLift]
        erw [Adjunction.homEquiv_naturality_left_symm]
        rw [whiskeringRight_obj_map]
        rfl
      homEquiv_naturality_right := fun f g => by
        

Proof state:
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
adj : G ⊣ F
X✝ : Sheaf J E
Y✝ Y'✝ : Sheaf J D
f : (composeAndSheafify J G).obj X✝ ⟶ Y✝
g : Y✝ ⟶ Y'✝
⊢ (composeEquiv J adj X✝ Y'✝) (f ≫ g) = (composeEquiv J adj X✝ Y✝) f ≫ (sheafCompose J F).map g

Next tactic:
ext
/-- An adjunction `adj : G ⊣ F` with `F : D ⥤ E` and `G : E ⥤ D` induces an adjunction
between `Sheaf J D` and `Sheaf J E`, in contexts where one can sheafify `D`-valued presheaves,
and `F` preserves the correct limits. -/
@[simps! unit_app_val counit_app_val]
def adjunction (adj : G ⊣ F) : composeAndSheafify J G ⊣ sheafCompose J F :=
  Adjunction.mkOfHomEquiv
    { homEquiv := composeEquiv J adj
      homEquiv_naturality_left_symm := fun f g => by
        ext1
        dsimp [composeEquiv]
        rw [sheafifyMap_sheafifyLift]
        erw [Adjunction.homEquiv_naturality_left_symm]
        rw [whiskeringRight_obj_map]
        rfl
      homEquiv_naturality_right := fun f g => by
        ext
        

Proof state:
case h.w.h
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
adj : G ⊣ F
X✝ : Sheaf J E
Y✝ Y'✝ : Sheaf J D
f : (composeAndSheafify J G).obj X✝ ⟶ Y✝
g : Y✝ ⟶ Y'✝
x✝ : Cᵒᵖ
⊢ ((composeEquiv J adj X✝ Y'✝) (f ≫ g)).val.app x✝ =
    ((composeEquiv J adj X✝ Y✝) f ≫ (sheafCompose J F).map g).val.app x✝

Next tactic:
dsimp [composeEquiv]
/-- An adjunction `adj : G ⊣ F` with `F : D ⥤ E` and `G : E ⥤ D` induces an adjunction
between `Sheaf J D` and `Sheaf J E`, in contexts where one can sheafify `D`-valued presheaves,
and `F` preserves the correct limits. -/
@[simps! unit_app_val counit_app_val]
def adjunction (adj : G ⊣ F) : composeAndSheafify J G ⊣ sheafCompose J F :=
  Adjunction.mkOfHomEquiv
    { homEquiv := composeEquiv J adj
      homEquiv_naturality_left_symm := fun f g => by
        ext1
        dsimp [composeEquiv]
        rw [sheafifyMap_sheafifyLift]
        erw [Adjunction.homEquiv_naturality_left_symm]
        rw [whiskeringRight_obj_map]
        rfl
      homEquiv_naturality_right := fun f g => by
        ext
        dsimp [composeEquiv]
        

Proof state:
case h.w.h
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
adj : G ⊣ F
X✝ : Sheaf J E
Y✝ Y'✝ : Sheaf J D
f : (composeAndSheafify J G).obj X✝ ⟶ Y✝
g : Y✝ ⟶ Y'✝
x✝ : Cᵒᵖ
⊢ ((Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y'✝.val)
          (toSheafify J (X✝.val ⋙ G) ≫ f.val ≫ g.val)).app
      x✝ =
    ((Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val) (toSheafify J (X✝.val ⋙ G) ≫ f.val)).app x✝ ≫
      F.map (g.val.app x✝)

Next tactic:
erw [Adjunction.homEquiv_unit, Adjunction.homEquiv_unit]
/-- An adjunction `adj : G ⊣ F` with `F : D ⥤ E` and `G : E ⥤ D` induces an adjunction
between `Sheaf J D` and `Sheaf J E`, in contexts where one can sheafify `D`-valued presheaves,
and `F` preserves the correct limits. -/
@[simps! unit_app_val counit_app_val]
def adjunction (adj : G ⊣ F) : composeAndSheafify J G ⊣ sheafCompose J F :=
  Adjunction.mkOfHomEquiv
    { homEquiv := composeEquiv J adj
      homEquiv_naturality_left_symm := fun f g => by
        ext1
        dsimp [composeEquiv]
        rw [sheafifyMap_sheafifyLift]
        erw [Adjunction.homEquiv_naturality_left_symm]
        rw [whiskeringRight_obj_map]
        rfl
      homEquiv_naturality_right := fun f g => by
        ext
        dsimp [composeEquiv]
        erw [Adjunction.homEquiv_unit, Adjunction.homEquiv_unit]
        

Proof state:
case h.w.h
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
adj : G ⊣ F
X✝ : Sheaf J E
Y✝ Y'✝ : Sheaf J D
f : (composeAndSheafify J G).obj X✝ ⟶ Y✝
g : Y✝ ⟶ Y'✝
x✝ : Cᵒᵖ
⊢ ((Adjunction.whiskerRight Cᵒᵖ adj).unit.app X✝.val ≫
          ((whiskeringRight Cᵒᵖ D E).obj F).map (toSheafify J (X✝.val ⋙ G) ≫ f.val ≫ g.val)).app
      x✝ =
    ((Adjunction.whiskerRight Cᵒᵖ adj).unit.app X✝.val ≫
            ((whiskeringRight Cᵒᵖ D E).obj F).map (toSheafify J (X✝.val ⋙ G) ≫ f.val)).app
        x✝ ≫
      F.map (g.val.app x✝)

Next tactic:
dsimp
/-- An adjunction `adj : G ⊣ F` with `F : D ⥤ E` and `G : E ⥤ D` induces an adjunction
between `Sheaf J D` and `Sheaf J E`, in contexts where one can sheafify `D`-valued presheaves,
and `F` preserves the correct limits. -/
@[simps! unit_app_val counit_app_val]
def adjunction (adj : G ⊣ F) : composeAndSheafify J G ⊣ sheafCompose J F :=
  Adjunction.mkOfHomEquiv
    { homEquiv := composeEquiv J adj
      homEquiv_naturality_left_symm := fun f g => by
        ext1
        dsimp [composeEquiv]
        rw [sheafifyMap_sheafifyLift]
        erw [Adjunction.homEquiv_naturality_left_symm]
        rw [whiskeringRight_obj_map]
        rfl
      homEquiv_naturality_right := fun f g => by
        ext
        dsimp [composeEquiv]
        erw [Adjunction.homEquiv_unit, Adjunction.homEquiv_unit]
        dsimp
        

Proof state:
case h.w.h
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
adj : G ⊣ F
X✝ : Sheaf J E
Y✝ Y'✝ : Sheaf J D
f : (composeAndSheafify J G).obj X✝ ⟶ Y✝
g : Y✝ ⟶ Y'✝
x✝ : Cᵒᵖ
⊢ ((Adjunction.whiskerRight Cᵒᵖ adj).unit.app X✝.val).app x✝ ≫
      F.map ((toSheafify J (X✝.val ⋙ G)).app x✝ ≫ f.val.app x✝ ≫ g.val.app x✝) =
    (((Adjunction.whiskerRight Cᵒᵖ adj).unit.app X✝.val).app x✝ ≫
        F.map ((toSheafify J (X✝.val ⋙ G)).app x✝ ≫ f.val.app x✝)) ≫
      F.map (g.val.app x✝)

Next tactic:
simp
@[simp]
theorem adjunctionToTypes_unit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (Y : SheafOfTypes J) :
    ((adjunctionToTypes J adj).unit.app Y).val =
      (adj.whiskerRight _).unit.app ((sheafOfTypesToPresheaf J).obj Y) ≫
        whiskerRight (J.toSheafify _) (forget D) := by
  

Proof state:
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
Y : SheafOfTypes J
⊢ ((adjunctionToTypes J adj).unit.app Y).val =
    (Adjunction.whiskerRight Cᵒᵖ adj).unit.app ((sheafOfTypesToPresheaf J).obj Y) ≫
      whiskerRight
        (toSheafify J (((whiskeringRight Cᵒᵖ (Type (max v u)) D).obj G).obj ((sheafOfTypesToPresheaf J).obj Y)))
        (forget D)

Next tactic:
dsimp [adjunctionToTypes, Adjunction.comp]
@[simp]
theorem adjunctionToTypes_unit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (Y : SheafOfTypes J) :
    ((adjunctionToTypes J adj).unit.app Y).val =
      (adj.whiskerRight _).unit.app ((sheafOfTypesToPresheaf J).obj Y) ≫
        whiskerRight (J.toSheafify _) (forget D) := by
  dsimp [adjunctionToTypes, Adjunction.comp]
  

Proof state:
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
Y : SheafOfTypes J
⊢ ((sheafEquivSheafOfTypes J).symm.unit.app Y).val ≫
      ((adjunction J adj).unit.app ((sheafEquivSheafOfTypes J).inverse.obj Y)).val ≫
        𝟙 (sheafify J (Y.val ⋙ G) ⋙ forget D) =
    (Adjunction.whiskerRight Cᵒᵖ adj).unit.app Y.val ≫ whiskerRight (toSheafify J (Y.val ⋙ G)) (forget D)

Next tactic:
simp
@[simp]
theorem adjunctionToTypes_unit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (Y : SheafOfTypes J) :
    ((adjunctionToTypes J adj).unit.app Y).val =
      (adj.whiskerRight _).unit.app ((sheafOfTypesToPresheaf J).obj Y) ≫
        whiskerRight (J.toSheafify _) (forget D) := by
  dsimp [adjunctionToTypes, Adjunction.comp]
  simp
  

Proof state:
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
Y : SheafOfTypes J
⊢ ((sheafEquivSheafOfTypes J).symm.unit.app Y).val ≫
      (Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) Y.val (sheafify J (Y.val ⋙ G)))
        (toSheafify J (Y.val ⋙ G)) =
    (Adjunction.whiskerRight Cᵒᵖ adj).unit.app Y.val ≫ whiskerRight (toSheafify J (Y.val ⋙ G)) (forget D)

Next tactic:
rfl
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  

Proof state:
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
⊢ ((adjunctionToTypes J adj).counit.app X).val =
    sheafifyLift J ((Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1)
      (_ : Presheaf.IsSheaf J X.val)

Next tactic:
apply J.sheafifyLift_unique
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  apply J.sheafifyLift_unique
  

Proof state:
case a
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
⊢ toSheafify J
        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj
          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫
      ((adjunctionToTypes J adj).counit.app X).val =
    (Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1

Next tactic:
dsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app,
    instCategorySheaf_comp_val, instCategorySheaf_id_val]
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  apply J.sheafifyLift_unique
  dsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app,
    instCategorySheaf_comp_val, instCategorySheaf_id_val]
  

Proof state:
case a
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
⊢ toSheafify J
        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj
          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫
      ((Functor.associator (sheafCompose J (forget D)) (sheafEquivSheafOfTypes J).symm.inverse
                  ((sheafEquivSheafOfTypes J).symm.functor ⋙ composeAndSheafify J G)).hom.app
            X).val ≫
        ((whiskerLeft (sheafCompose J (forget D))
                  (whiskerRight (sheafEquivSheafOfTypes J).symm.toAdjunction.counit (composeAndSheafify J G))).app
              X).val ≫
          ((adjunction J adj).counit.app X).val =
    (Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1

Next tactic:
rw [adjunction_counit_app_val]
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  apply J.sheafifyLift_unique
  dsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app,
    instCategorySheaf_comp_val, instCategorySheaf_id_val]
  rw [adjunction_counit_app_val]
  

Proof state:
case a
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
⊢ toSheafify J
        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj
          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫
      ((Functor.associator (sheafCompose J (forget D)) (sheafEquivSheafOfTypes J).symm.inverse
                  ((sheafEquivSheafOfTypes J).symm.functor ⋙ composeAndSheafify J G)).hom.app
            X).val ≫
        ((whiskerLeft (sheafCompose J (forget D))
                  (whiskerRight (sheafEquivSheafOfTypes J).symm.toAdjunction.counit (composeAndSheafify J G))).app
              X).val ≫
          sheafifyLift J
            ((Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm
              (𝟙 (X.val ⋙ forget D)))
            (_ : Presheaf.IsSheaf J X.val) =
    (Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1

Next tactic:
erw [Category.id_comp, J.sheafifyMap_sheafifyLift, J.toSheafify_sheafifyLift]
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  apply J.sheafifyLift_unique
  dsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app,
    instCategorySheaf_comp_val, instCategorySheaf_id_val]
  rw [adjunction_counit_app_val]
  erw [Category.id_comp, J.sheafifyMap_sheafifyLift, J.toSheafify_sheafifyLift]
  

Proof state:
case a
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
⊢ ((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).map
        ((sheafToPresheaf J (Type (max u v))).map
          ((sheafEquivSheafOfTypes J).symm.toAdjunction.counit.app ((sheafCompose J (forget D)).obj X))) ≫
      (Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm (𝟙 (X.val ⋙ forget D)) =
    (Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1

Next tactic:
ext
@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      J.sheafifyLift ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2 := by
  apply J.sheafifyLift_unique
  dsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app,
    instCategorySheaf_comp_val, instCategorySheaf_id_val]
  rw [adjunction_counit_app_val]
  erw [Category.id_comp, J.sheafifyMap_sheafifyLift, J.toSheafify_sheafifyLift]
  ext
  

Proof state:
case a.w.h.w
C : Type u
inst✝⁹ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w₁
inst✝⁸ : Category.{max v u, w₁} D
E : Type w₂
inst✝⁷ : Category.{max v u, w₂} E
F : D ⥤ E
G✝ : E ⥤ D
inst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F
inst✝⁵ : ConcreteCategory D
inst✝⁴ : PreservesLimits (forget D)
inst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
inst✝ : ReflectsIsomorphisms (forget D)
G : Type (max v u) ⥤ D
adj : G ⊣ forget D
X : Sheaf J D
x✝¹ : Cᵒᵖ
x✝ :
  (forget D).obj
    ((((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj
          ((sheafToPresheaf J (Type (max u v))).obj
            (((sheafEquivSheafOfTypes J).symm.inverse ⋙ (sheafEquivSheafOfTypes J).symm.functor).obj
              ((sheafCompose J (forget D)).obj X)))).obj
      x✝¹)
⊢ ((((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).map
              ((sheafToPresheaf J (Type (max u v))).map
                ((sheafEquivSheafOfTypes J).symm.toAdjunction.counit.app ((sheafCompose J (forget D)).obj X))) ≫
            (Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm
              (𝟙 (X.val ⋙ forget D))).app
        x✝¹)
      x✝ =
    (((Functor.associator X.1 (forget D) G).hom ≫ (Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1).app x✝¹) x✝

Next tactic:
dsimp [sheafEquivSheafOfTypes, Equivalence.symm, Equivalence.toAdjunction,
    NatIso.ofComponents, Adjunction.whiskerRight, Adjunction.mkOfUnitCounit]