Theorem: AlgebraicGeometry.PresheafedSpace.GlueData.f_invApp_f_app
File: Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean

tactic: delta IsOpenImmersion.opensFunctor
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ {
      unop :=
        (opensFunctor pullback.snd).obj
          { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop } =
    (Opens.map (D.f i k).base).op.obj { unop := (opensFunctor (D.f i j)).obj U }
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ { unop := ⋯.functor.obj { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop } =
    (Opens.map (D.f i k).base).op.obj { unop := ⋯.functor.obj U }

tactic: dsimp only [Functor.op, IsOpenMap.functor, Opens.map, unop_op]
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ { unop := ⋯.functor.obj { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop } =
    (Opens.map (D.f i k).base).op.obj { unop := ⋯.functor.obj U }
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ {
      unop :=
        { carrier := ⇑pullback.snd.base '' ↑{ carrier := ⇑pullback.fst.base ⁻¹' ↑U, is_open' := ⋯ }, is_open' := ⋯ } } =
    { unop := { carrier := ⇑(D.f i k).base ⁻¹' ↑{ carrier := ⇑(D.f i j).base '' ↑U, is_open' := ⋯ }, is_open' := ⋯ } }

tactic: congr
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ {
      unop :=
        { carrier := ⇑pullback.snd.base '' ↑{ carrier := ⇑pullback.fst.base ⁻¹' ↑U, is_open' := ⋯ }, is_open' := ⋯ } } =
    { unop := { carrier := ⇑(D.f i k).base ⁻¹' ↑{ carrier := ⇑(D.f i j).base '' ↑U, is_open' := ⋯ }, is_open' := ⋯ } }
state_after: case e_unop.e_carrier
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ ⇑pullback.snd.base '' ↑{ carrier := ⇑pullback.fst.base ⁻¹' ↑U, is_open' := ⋯ } =
    ⇑(D.f i k).base ⁻¹' ↑{ carrier := ⇑(D.f i j).base '' ↑U, is_open' := ⋯ }

tactic: apply pullback_base
state_before: case e_unop.e_carrier
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ ⇑pullback.snd.base '' ↑{ carrier := ⇑pullback.fst.base ⁻¹' ↑U, is_open' := ⋯ } =
    ⇑(D.f i k).base ⁻¹' ↑{ carrier := ⇑(D.f i j).base '' ↑U, is_open' := ⋯ }
state_after: no goals

tactic: have := PresheafedSpace.congr_app (@pullback.condition _ _ _ _ _ (D.f i j) (D.f i k) _)
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
⊢ invApp (D.f i j) U ≫ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    pullback.fst.c.app { unop := U } ≫
      invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
        (D.V (i, k)).presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (pullback.fst ≫ D.f i j).c.app U =
      (pullback.snd ≫ D.f i k).c.app U ≫ (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ invApp (D.f i j) U ≫ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    pullback.fst.c.app { unop := U } ≫
      invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
        (D.V (i, k)).presheaf.map (eqToHom ⋯)

tactic: dsimp only [comp_c_app] at this
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (pullback.fst ≫ D.f i j).c.app U =
      (pullback.snd ≫ D.f i k).c.app U ≫ (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ invApp (D.f i j) U ≫ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    pullback.fst.c.app { unop := U } ≫
      invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
        (D.V (i, k)).presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ invApp (D.f i j) U ≫ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    pullback.fst.c.app { unop := U } ≫
      invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
        (D.V (i, k)).presheaf.map (eqToHom ⋯)

tactic: rw [← cancel_epi (inv ((D.f_open i j).invApp U)), IsIso.inv_hom_id_assoc,
  IsOpenImmersion.inv_invApp]
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ invApp (D.f i j) U ≫ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    pullback.fst.c.app { unop := U } ≫
      invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
        (D.V (i, k)).presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    ((D.f i j).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫ (D.V (i, j)).presheaf.map (eqToHom ⋯)) ≫
      pullback.fst.c.app { unop := U } ≫
        invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
          (D.V (i, k)).presheaf.map (eqToHom ⋯)

tactic: simp_rw [Category.assoc]
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    ((D.f i j).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫ (D.V (i, j)).presheaf.map (eqToHom ⋯)) ≫
      pullback.fst.c.app { unop := U } ≫
        invApp pullback.snd { unop := (Opens.map pullback.fst.base).toPrefunctor.1 { unop := U }.unop }.unop ≫
          (D.V (i, k)).presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    (D.f i j).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫
      (D.V (i, j)).presheaf.map (eqToHom ⋯) ≫
        pullback.fst.c.app { unop := U } ≫
          invApp pullback.snd ((Opens.map pullback.fst.base).toPrefunctor.1 U) ≫ (D.V (i, k)).presheaf.map (eqToHom ⋯)

tactic: erw [(π₁ i, j, k).c.naturality_assoc, reassoc_of% this, ← Functor.map_comp_assoc,
  IsOpenImmersion.inv_naturality_assoc, IsOpenImmersion.app_invApp_assoc, ←
  (D.V (i, k)).presheaf.map_comp, ← (D.V (i, k)).presheaf.map_comp]
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    (D.f i j).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫
      (D.V (i, j)).presheaf.map (eqToHom ⋯) ≫
        pullback.fst.c.app { unop := U } ≫
          invApp pullback.snd ((Opens.map pullback.fst.base).toPrefunctor.1 U) ≫ (D.V (i, k)).presheaf.map (eqToHom ⋯)
state_after: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫
      (D.V (i, k)).presheaf.map
        ((homOfLE ⋯).op ≫
          (opensFunctor pullback.snd).op.map (eqToHom ⋯ ≫ (Opens.map pullback.fst.base).op.map (eqToHom ⋯)) ≫ eqToHom ⋯)

tactic: convert (Category.comp_id ((f D.toGlueData i k).c.app _)).symm
state_before: C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } =
    (D.f i k).c.app { unop := (opensFunctor (D.f i j)).obj U } ≫
      (D.V (i, k)).presheaf.map
        ((homOfLE ⋯).op ≫
          (opensFunctor pullback.snd).op.map (eqToHom ⋯ ≫ (Opens.map pullback.fst.base).op.map (eqToHom ⋯)) ≫ eqToHom ⋯)
state_after: case h.e'_3.h.h.e'_7
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.V (i, k)).presheaf.map
      ((homOfLE ⋯).op ≫
        (opensFunctor pullback.snd).op.map (eqToHom ⋯ ≫ (Opens.map pullback.fst.base).op.map (eqToHom ⋯)) ≫ eqToHom ⋯) =
    𝟙 (((D.f i k).base _* (D.V (i, k)).presheaf).obj { unop := (opensFunctor (D.f i j)).obj U })

tactic: erw [(D.V (i, k)).presheaf.map_id]
state_before: case h.e'_3.h.h.e'_7
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ (D.V (i, k)).presheaf.map
      ((homOfLE ⋯).op ≫
        (opensFunctor pullback.snd).op.map (eqToHom ⋯ ≫ (Opens.map pullback.fst.base).op.map (eqToHom ⋯)) ≫ eqToHom ⋯) =
    𝟙 (((D.f i k).base _* (D.V (i, k)).presheaf).obj { unop := (opensFunctor (D.f i j)).obj U })
state_after: case h.e'_3.h.h.e'_7
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ 𝟙
      ((D.V (i, k)).presheaf.obj
        { unop := (Opens.map (D.f i k).base).obj { unop := (opensFunctor (D.f i j)).obj U }.unop }) =
    𝟙 (((D.f i k).base _* (D.V (i, k)).presheaf).obj { unop := (opensFunctor (D.f i j)).obj U })

tactic: rfl
state_before: case h.e'_3.h.h.e'_7
C : Type u
inst✝ : Category.{v, u} C
D : GlueData C
i j k : D.J
U : Opens ↑↑(D.V (i, j))
this :
  ∀ (U : (Opens ↑↑(D.U i))ᵒᵖ),
    (D.f i j).c.app U ≫ pullback.fst.c.app { unop := (Opens.map (D.f i j).base).obj U.unop } =
      ((D.f i k).c.app U ≫ pullback.snd.c.app { unop := (Opens.map (D.f i k).base).obj U.unop }) ≫
        (pullback (D.f i j) (D.f i k)).presheaf.map (eqToHom ⋯)
⊢ 𝟙
      ((D.V (i, k)).presheaf.obj
        { unop := (Opens.map (D.f i k).base).obj { unop := (opensFunctor (D.f i j)).obj U }.unop }) =
    𝟙 (((D.f i k).base _* (D.V (i, k)).presheaf).obj { unop := (opensFunctor (D.f i j)).obj U })
state_after: no goals