Theorem: StalkSkyscraperPresheafAdjunctionAuxs.unit_app
File: Mathlib/Topology/Sheaves/Skyscraper.lean

Proof steps:
state_before: X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
⊢ (𝟭 (Presheaf C X)).map f ≫ (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓖 =
    (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓕 ≫
      (Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀).map f
state_after: case w
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
⊢ ((𝟭 (Presheaf C X)).map f ≫ (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓖).app
      (op U) =
    ((fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓕 ≫
          (Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀).map f).app
      (op U)
tactic: ext U
state_before: case w
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
⊢ ((𝟭 (Presheaf C X)).map f ≫ (fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓖).app
      (op U) =
    ((fun 𝓕 => toSkyscraperPresheaf p₀ (𝟙 (((𝟭 (Presheaf C X)).obj 𝓕).stalk p₀))) 𝓕 ≫
          (Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀).map f).app
      (op U)
state_after: case w
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
⊢ (f.app (op U) ≫
      if h : p₀ ∈ U then 𝓖.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓖.stalk p₀) ≫ eqToHom ⋯
      else (⋯ ▸ terminalIsTerminal).from (𝓖.obj (op U))) =
    (if h : p₀ ∈ U then 𝓕.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓕.stalk p₀) ≫ eqToHom ⋯ else (⋯ ▸ terminalIsTerminal).from (𝓕.obj (op U))) ≫
      if h : p₀ ∈ U then eqToHom ⋯ ≫ (Presheaf.stalkFunctor C p₀).map f ≫ eqToHom ⋯
      else (⋯ ▸ terminalIsTerminal).from (if p₀ ∈ U then 𝓕.stalk p₀ else ⊤_ C)
tactic: dsimp
state_before: case w
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
⊢ (f.app (op U) ≫
      if h : p₀ ∈ U then 𝓖.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓖.stalk p₀) ≫ eqToHom ⋯
      else (⋯ ▸ terminalIsTerminal).from (𝓖.obj (op U))) =
    (if h : p₀ ∈ U then 𝓕.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓕.stalk p₀) ≫ eqToHom ⋯ else (⋯ ▸ terminalIsTerminal).from (𝓕.obj (op U))) ≫
      if h : p₀ ∈ U then eqToHom ⋯ ≫ (Presheaf.stalkFunctor C p₀).map f ≫ eqToHom ⋯
      else (⋯ ▸ terminalIsTerminal).from (if p₀ ∈ U then 𝓕.stalk p₀ else ⊤_ C)
state_after: case pos
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
h : p₀ ∈ U
⊢ f.app (op U) ≫ 𝓖.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓖.stalk p₀) ≫ eqToHom ⋯ =
    (𝓕.germ ⟨p₀, h⟩ ≫ 𝟙 (𝓕.stalk p₀) ≫ eqToHom ⋯) ≫ eqToHom ⋯ ≫ (Presheaf.stalkFunctor C p₀).map f ≫ eqToHom ⋯

case neg
X : TopCat
p₀ : ↑X
inst✝³ : (U : Opens ↑X) → Decidable (p₀ ∈ U)
C : Type v
inst✝² : Category.{u, v} C
A : C
inst✝¹ : HasTerminal C
inst✝ : HasColimits C
𝓕 𝓖 : Presheaf C X
f : 𝓕 ⟶ 𝓖
U : Opens ↑X
h : p₀ ∉ U
⊢ f.app (op U) ≫ (⋯ ▸ terminalIsTerminal).from (𝓖.obj (op U)) =
    (⋯ ▸ terminalIsTerminal).from (𝓕.obj (op U)) ≫ (⋯ ▸ terminalIsTerminal).from (if p₀ ∈ U then 𝓕.stalk p₀ else ⊤_ C)
tactic: split_ifs with h