Theorem: AlgebraicGeometry.Scheme.Spec_map_presheaf_map_eqToHom
File: Mathlib/AlgebraicGeometry/Scheme.lean

tactic: cases h
state_before: X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
h : U = V
W : Opens ↑↑(Spec Γ(X, V)).toPresheafedSpace
⊢ Γ(Spec Γ(X, V), W) = Γ(Spec Γ(X, U), Spec.map (X.presheaf.map (eqToHom h).op) ⁻¹ᵁ W)
state_after: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Γ(Spec Γ(X, U), W) = Γ(Spec Γ(X, U), Spec.map (X.presheaf.map (eqToHom ⋯).op) ⁻¹ᵁ W)

tactic: dsimp
state_before: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Γ(Spec Γ(X, U), W) = Γ(Spec Γ(X, U), Spec.map (X.presheaf.map (eqToHom ⋯).op) ⁻¹ᵁ W)
state_after: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Γ(Spec Γ(X, U), W) = Γ(Spec Γ(X, U), Spec.map (X.presheaf.map (𝟙 { unop := U })) ⁻¹ᵁ W)

tactic: simp
state_before: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Γ(Spec Γ(X, U), W) = Γ(Spec Γ(X, U), Spec.map (X.presheaf.map (𝟙 { unop := U })) ⁻¹ᵁ W)
state_after: no goals

tactic: have : Scheme.Spec.map (X.presheaf.map (𝟙 (op U))).op = 𝟙 _ := by
  rw [X.presheaf.map_id, op_id, Scheme.Spec.map_id]
state_before: X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
h : U = V
W : Opens ↑↑(Spec Γ(X, V)).toPresheafedSpace
⊢ Hom.app (Spec.map (X.presheaf.map (eqToHom h).op)) W = eqToHom ⋯
state_after: X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
h : U = V
W : Opens ↑↑(Spec Γ(X, V)).toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
⊢ Hom.app (Spec.map (X.presheaf.map (eqToHom h).op)) W = eqToHom ⋯

tactic: cases h
state_before: X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
h : U = V
W : Opens ↑↑(Spec Γ(X, V)).toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
⊢ Hom.app (Spec.map (X.presheaf.map (eqToHom h).op)) W = eqToHom ⋯
state_after: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Hom.app (Spec.map (X.presheaf.map (eqToHom ⋯).op)) W = eqToHom ⋯

tactic: refine (Scheme.congr_app this _).trans ?_
state_before: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Hom.app (Spec.map (X.presheaf.map (eqToHom ⋯).op)) W = eqToHom ⋯
state_after: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Hom.app (𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })) W ≫
      (Scheme.Spec.obj { unop := Γ(X, U) }).presheaf.map (eqToHom ⋯).op =
    eqToHom ⋯

tactic: simp [eqToHom_map]
state_before: case refl
X : Scheme
U : Opens ↑↑X.toPresheafedSpace
this : Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
W : Opens ↑↑(Spec Γ(X, U)).toPresheafedSpace
⊢ Hom.app (𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })) W ≫
      (Scheme.Spec.obj { unop := Γ(X, U) }).presheaf.map (eqToHom ⋯).op =
    eqToHom ⋯
state_after: no goals

tactic: rw [X.presheaf.map_id, op_id, Scheme.Spec.map_id]
state_before: X : Scheme
U V : Opens ↑↑X.toPresheafedSpace
h : U = V
W : Opens ↑↑(Spec Γ(X, V)).toPresheafedSpace
⊢ Scheme.Spec.map (X.presheaf.map (𝟙 { unop := U })).op = 𝟙 (Scheme.Spec.obj { unop := Γ(X, U) })
state_after: no goals