Theorem: AlgebraicGeometry.morphismRestrict_app
File: Mathlib/AlgebraicGeometry/Restrict.lean

tactic: have := Scheme.congr_app (morphismRestrict_ι f U) (Scheme.ιOpens U ''ᵁ V)
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
⊢ Hom.app (f ∣_ U) V = Hom.app f (ιOpens U ''ᵁ V) ≫ X.presheaf.map (eqToHom ⋯).op
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Hom.app (f ∣_ U ≫ ιOpens U) (ιOpens U ''ᵁ V) =
    Hom.app (ιOpens (f ⁻¹ᵁ U) ≫ f) (ιOpens U ''ᵁ V) ≫ (X ∣_ᵤ f ⁻¹ᵁ U).presheaf.map (eqToHom ⋯).op
⊢ Hom.app (f ∣_ U) V = Hom.app f (ιOpens U ''ᵁ V) ≫ X.presheaf.map (eqToHom ⋯).op

tactic: simp only [restrict_presheaf_obj, Hom.app_eq_appLE, eqToHom_op, Hom.appLE_map]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Hom.app (f ∣_ U ≫ ιOpens U) (ιOpens U ''ᵁ V) =
    Hom.app (ιOpens (f ⁻¹ᵁ U) ≫ f) (ιOpens U ''ᵁ V) ≫ (X ∣_ᵤ f ⁻¹ᵁ U).presheaf.map (eqToHom ⋯).op
⊢ Hom.app (f ∣_ U) V = Hom.app f (ιOpens U ''ᵁ V) ≫ X.presheaf.map (eqToHom ⋯).op
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Hom.app (f ∣_ U ≫ ιOpens U) (ιOpens U ''ᵁ V) =
    Hom.app (ιOpens (f ⁻¹ᵁ U) ≫ f) (ιOpens U ''ᵁ V) ≫ (X ∣_ᵤ f ⁻¹ᵁ U).presheaf.map (eqToHom ⋯).op
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯

tactic: simp only [comp_coeBase, Opens.map_comp_obj, restrict_presheaf_obj,
  Hom.app_eq_appLE, comp_appLE, ofRestrict_appLE, Hom.appLE_map, eqToHom_op,
  restrict_presheaf_map, eqToHom_unop] at this
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Hom.app (f ∣_ U ≫ ιOpens U) (ιOpens U ''ᵁ V) =
    Hom.app (ιOpens (f ⁻¹ᵁ U) ≫ f) (ιOpens U ''ᵁ V) ≫ (X ∣_ᵤ f ⁻¹ᵁ U).presheaf.map (eqToHom ⋯).op
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯

tactic: have e : ιOpens U ⁻¹ᵁ (ιOpens U ''ᵁ V) = V :=
  Opens.ext (Set.preimage_image_eq _ Subtype.coe_injective)
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
e : ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V = V
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯

tactic: have e' : (f ∣_ U) ⁻¹ᵁ V = (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V := by rw [e]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
e : ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V = V
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
e : ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V = V
e' : (f ∣_ U) ⁻¹ᵁ V = (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯

tactic: rw [← (f ∣_ U).appLE_map' _ e', ← (f ∣_ U).map_appLE' _ e, Scheme.restrict_presheaf_map,
  Scheme.restrict_presheaf_map, this, Hom.appLE_map]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
e : ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V = V
e' : (f ∣_ U) ⁻¹ᵁ V = (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V
⊢ Hom.appLE (f ∣_ U) V ((f ∣_ U) ⁻¹ᵁ V) ⋯ = Hom.appLE f (ιOpens U ''ᵁ V) (ιOpens (f ⁻¹ᵁ U) ''ᵁ (f ∣_ U) ⁻¹ᵁ V) ⋯
state_after: no goals

tactic: rw [e]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
V : Opens ↥U
this :
  Y.presheaf.map (homOfLE ⋯).op ≫
      Hom.appLE (f ∣_ U) (ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ((f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯ =
    Hom.appLE f (ιOpens U ''ᵁ V) (X.ofRestrict ⋯ ''ᵁ (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V) ⋯
e : ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V = V
⊢ (f ∣_ U) ⁻¹ᵁ V = (f ∣_ U) ⁻¹ᵁ ιOpens U ⁻¹ᵁ ιOpens U ''ᵁ V
state_after: no goals