Theorem: AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.pullback_cone_of_left_condition
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

tactic: refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun U => ?_
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
⊢ pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict ⋯ ≫ g
state_after: case refine_1
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
⊢ (pullbackConeOfLeftFst f g ≫ f).base = (Y.ofRestrict ⋯ ≫ g).base

case refine_2
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑Z)ᵒᵖ
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫ whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app U =
    (Y.ofRestrict ⋯ ≫ g).c.app U

tactic: simpa using pullback.condition
state_before: case refine_1
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
⊢ (pullbackConeOfLeftFst f g ≫ f).base = (Y.ofRestrict ⋯ ≫ g).base
state_after: no goals

tactic: induction U using Opposite.rec'
state_before: case refine_2
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
U : (Opens ↑↑Z)ᵒᵖ
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫ whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app U =
    (Y.ofRestrict ⋯ ≫ g).c.app U
state_after: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫ whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app { unop := X✝ } =
    (Y.ofRestrict ⋯ ≫ g).c.app { unop := X✝ }

tactic: rw [NatTrans.comp_app]
state_before: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ ((pullbackConeOfLeftFst f g ≫ f).c ≫ whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app { unop := X✝ } =
    (Y.ofRestrict ⋯ ≫ g).c.app { unop := X✝ }
state_after: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ (pullbackConeOfLeftFst f g ≫ f).c.app { unop := X✝ } ≫
      (whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app { unop := X✝ } =
    (Y.ofRestrict ⋯ ≫ g).c.app { unop := X✝ }

tactic: dsimp only [comp_c_app, unop_op, whiskerRight_app, pullbackConeOfLeftFst]
state_before: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ (pullbackConeOfLeftFst f g ≫ f).c.app { unop := X✝ } ≫
      (whiskerRight (eqToHom ⋯) (Y.restrict ⋯).presheaf).app { unop := X✝ } =
    (Y.ofRestrict ⋯ ≫ g).c.app { unop := X✝ }
state_after: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ (f.c.app { unop := X✝ } ≫
        invApp f ((Opens.map f.base).obj X✝) ≫
          g.c.app { unop := ⋯.functor.obj ((Opens.map f.base).obj X✝) } ≫ Y.presheaf.map (eqToHom ⋯)) ≫
      (Y.restrict ⋯).presheaf.map ((eqToHom ⋯).app { unop := X✝ }) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }

tactic: simp only [Quiver.Hom.unop_op, TopCat.Presheaf.pushforwardObj_map, app_invApp_assoc,
  eqToHom_app, eqToHom_unop, Category.assoc, NatTrans.naturality_assoc, Functor.op_map]
state_before: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ (f.c.app { unop := X✝ } ≫
        invApp f ((Opens.map f.base).obj X✝) ≫
          g.c.app { unop := ⋯.functor.obj ((Opens.map f.base).obj X✝) } ≫ Y.presheaf.map (eqToHom ⋯)) ≫
      (Y.restrict ⋯).presheaf.map ((eqToHom ⋯).app { unop := X✝ }) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }
state_after: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ g.c.app { unop := X✝ } ≫
      Y.presheaf.map ((Opens.map g.base).map (homOfLE ⋯).op.unop).op ≫
        Y.presheaf.map (eqToHom ⋯) ≫ (Y.restrict ⋯).presheaf.map (eqToHom ⋯) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }

tactic: erw [← Y.presheaf.map_comp, ← Y.presheaf.map_comp]
state_before: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ g.c.app { unop := X✝ } ≫
      Y.presheaf.map ((Opens.map g.base).map (homOfLE ⋯).op.unop).op ≫
        Y.presheaf.map (eqToHom ⋯) ≫ (Y.restrict ⋯).presheaf.map (eqToHom ⋯) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }
state_after: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ g.c.app { unop := X✝ } ≫
      Y.presheaf.map (((Opens.map g.base).map (homOfLE ⋯).op.unop).op ≫ eqToHom ⋯ ≫ ⋯.functor.op.map (eqToHom ⋯)) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }

tactic: congr 1
state_before: case refine_2.h
C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
X✝ : Opens ↑↑Z
⊢ g.c.app { unop := X✝ } ≫
      Y.presheaf.map (((Opens.map g.base).map (homOfLE ⋯).op.unop).op ≫ eqToHom ⋯ ≫ ⋯.functor.op.map (eqToHom ⋯)) =
    g.c.app { unop := X✝ } ≫ (Y.ofRestrict ⋯).c.app { unop := (Opens.map g.base).obj X✝ }
state_after: no goals