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

tactic: refine PresheafedSpace.Hom.ext _ _ ?_ <| NatTrans.ext _ _ <| funext fun x => ?_
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : PresheafedSpace C
f : X ⟶ Z
hf : IsOpenImmersion f
g : Y ⟶ Z
s : PullbackCone f g
⊢ pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst = s.fst
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
s : PullbackCone f g
⊢ (pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).base = s.fst.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
s : PullbackCone f g
x : (Opens ↑↑X)ᵒᵖ
⊢ ((pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).c ≫ whiskerRight (eqToHom ⋯) s.pt.presheaf).app x =
    s.fst.c.app x

tactic: change pullback.lift _ _ _ ≫ pullback.fst = _
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
s : PullbackCone f g
⊢ (pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).base = s.fst.base
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
s : PullbackCone f g
⊢ pullback.lift s.fst.base s.snd.base ⋯ ≫ pullback.fst = s.fst.base

tactic: simp
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
s : PullbackCone f g
⊢ pullback.lift s.fst.base s.snd.base ⋯ ≫ pullback.fst = s.fst.base
state_after: no goals

tactic: induction x using Opposite.rec' with | h x => ?_
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
s : PullbackCone f g
x : (Opens ↑↑X)ᵒᵖ
⊢ ((pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).c ≫ whiskerRight (eqToHom ⋯) s.pt.presheaf).app x =
    s.fst.c.app 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
s : PullbackCone f g
x : Opens ↑↑X
⊢ ((pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).c ≫ whiskerRight (eqToHom ⋯) s.pt.presheaf).app
      { unop := x } =
    s.fst.c.app { unop := x }

tactic: change ((_ ≫ _) ≫ _ ≫ _) ≫ _ = _
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ ((pullbackConeOfLeftLift f g s ≫ (pullbackConeOfLeft f g).fst).c ≫ whiskerRight (eqToHom ⋯) s.pt.presheaf).app
      { unop := x } =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
⊢ ((invApp f { unop := x }.unop ≫ g.c.app { unop := ⋯.functor.obj { unop := x }.unop } ≫ Y.presheaf.map (eqToHom ⋯)) ≫
        s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
          s.pt.presheaf.map (eqToHom ⋯)) ≫
      (whiskerRight (eqToHom ⋯) s.pt.presheaf).app { unop := x } =
    s.fst.c.app { unop := x }

tactic: simp_rw [Category.assoc]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ ((invApp f { unop := x }.unop ≫ g.c.app { unop := ⋯.functor.obj { unop := x }.unop } ≫ Y.presheaf.map (eqToHom ⋯)) ≫
        s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
          s.pt.presheaf.map (eqToHom ⋯)) ≫
      (whiskerRight (eqToHom ⋯) s.pt.presheaf).app { unop := x } =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        Y.presheaf.map (eqToHom ⋯) ≫
          s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
            s.pt.presheaf.map (eqToHom ⋯) ≫ (whiskerRight (eqToHom ⋯) s.pt.presheaf).app { unop := x } =
    s.fst.c.app { unop := x }

tactic: erw [← s.pt.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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        Y.presheaf.map (eqToHom ⋯) ≫
          s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
            s.pt.presheaf.map (eqToHom ⋯) ≫ (whiskerRight (eqToHom ⋯) s.pt.presheaf).app { unop := x } =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        Y.presheaf.map (eqToHom ⋯) ≫
          s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: erw [s.snd.c.naturality_assoc]
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        Y.presheaf.map (eqToHom ⋯) ≫
          s.snd.c.app (⋯.functor.op.obj ((Opens.map (pullbackConeOfLeft f g).fst.base).op.obj { unop := x })) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: have := congr_app s.condition (op (opensFunctor f |>.obj x))
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
s : PullbackCone f g
x : Opens ↑↑X
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
this :
  (s.fst ≫ f).c.app { unop := (opensFunctor f).obj x } =
    (s.snd ≫ g).c.app { unop := (opensFunctor f).obj x } ≫ s.pt.presheaf.map (eqToHom ⋯)
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: dsimp only [comp_c_app, unop_op] at this
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  (s.fst ≫ f).c.app { unop := (opensFunctor f).obj x } =
    (s.snd ≫ g).c.app { unop := (opensFunctor f).obj x } ≫ s.pt.presheaf.map (eqToHom ⋯)
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
this :
  f.c.app { unop := (opensFunctor f).obj x } ≫ s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } =
    (g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) }) ≫
      s.pt.presheaf.map (eqToHom ⋯)
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: rw [← IsIso.comp_inv_eq] at this
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  f.c.app { unop := (opensFunctor f).obj x } ≫ s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } =
    (g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) }) ≫
      s.pt.presheaf.map (eqToHom ⋯)
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
this :
  (f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) }) ≫
      inv (s.pt.presheaf.map (eqToHom ⋯)) =
    g.c.app { unop := (opensFunctor f).obj x } ≫ s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) }
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: replace this := reassoc_of% this
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  (f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) }) ≫
      inv (s.pt.presheaf.map (eqToHom ⋯)) =
    g.c.app { unop := (opensFunctor f).obj x } ≫ s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) }
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((s.snd ≫ g).base _* s.pt.presheaf).obj { unop := (opensFunctor f).obj x } ⟶ Z_1),
    f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } ≫
          inv (s.pt.presheaf.map (eqToHom ⋯)) ≫ h =
      g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) } ≫ h
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: erw [← this, hf.invApp_app_assoc, s.fst.c.naturality_assoc]
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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((s.snd ≫ g).base _* s.pt.presheaf).obj { unop := (opensFunctor f).obj x } ⟶ Z_1),
    f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } ≫
          inv (s.pt.presheaf.map (eqToHom ⋯)) ≫ h =
      g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) } ≫ h
⊢ invApp f x ≫
      g.c.app { unop := ⋯.functor.obj x } ≫
        s.snd.c.app ((Opens.map g.base).op.obj { unop := ⋯.functor.obj x }) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((s.snd ≫ g).base _* s.pt.presheaf).obj { unop := (opensFunctor f).obj x } ⟶ Z_1),
    f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } ≫
          inv (s.pt.presheaf.map (eqToHom ⋯)) ≫ h =
      g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) } ≫ h
⊢ s.fst.c.app { unop := x } ≫
      (s.fst.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
        inv (s.pt.presheaf.map (eqToHom ⋯)) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }

tactic: simp [eqToHom_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
s : PullbackCone f g
x : Opens ↑↑X
this :
  ∀ {Z_1 : C} (h : ((s.snd ≫ g).base _* s.pt.presheaf).obj { unop := (opensFunctor f).obj x } ⟶ Z_1),
    f.c.app { unop := (opensFunctor f).obj x } ≫
        s.fst.c.app { unop := (Opens.map f.base).obj ((opensFunctor f).obj x) } ≫
          inv (s.pt.presheaf.map (eqToHom ⋯)) ≫ h =
      g.c.app { unop := (opensFunctor f).obj x } ≫
        s.snd.c.app { unop := (Opens.map g.base).obj ((opensFunctor f).obj x) } ≫ h
⊢ s.fst.c.app { unop := x } ≫
      (s.fst.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
        inv (s.pt.presheaf.map (eqToHom ⋯)) ≫
          (s.snd.base _* s.pt.presheaf).map (eqToHom ⋯) ≫
            s.pt.presheaf.map (eqToHom ⋯ ≫ (eqToHom ⋯).app { unop := x }) =
    s.fst.c.app { unop := x }
state_after: no goals