Theorem: AlgebraicGeometry.StructureSheaf.stalkIso_hom
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ stalkToFiberRingHom R x ≫ localizationToStalk R x = 𝟙 ((structureSheaf R).presheaf.stalk x)
state_after: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ stalkToFiberRingHom R x ≫ localizationToStalk R x) s =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ 𝟙 ((structureSheaf R).presheaf.stalk x)) s
tactic: ext U hxU s
state_before: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ stalkToFiberRingHom R x ≫ localizationToStalk R x) s =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ 𝟙 ((structureSheaf R).presheaf.stalk x)) s
state_after: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ stalkToFiberRingHom R x ≫ localizationToStalk R x) s =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
tactic: simp only [Category.comp_id]
state_before: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ ((structureSheaf R).presheaf.germ ⟨x, hxU⟩ ≫ stalkToFiberRingHom R x ≫ localizationToStalk R x) s =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
state_after: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ (localizationToStalk R x) (↑s ⟨x, hxU⟩) = ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
tactic: erw [comp_apply, comp_apply, stalkToFiberRingHom_germ']
state_before: case ih.w
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
⊢ (localizationToStalk R x) (↑s ⟨x, hxU⟩) = ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
state_after: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ (localizationToStalk R x) (↑s ⟨x, hxU⟩) = ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
tactic: obtain ⟨V, hxV, iVU, f, g, (hg : V ≤ PrimeSpectrum.basicOpen _), hs⟩ :=
      exists_const _ _ s x hxU
state_before: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ (localizationToStalk R x) (↑s ⟨x, hxU⟩) = ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
state_after: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.germ ⟨x, ⋯⟩) (const R f (↑⟨g, ⋯⟩) (PrimeSpectrum.basicOpen ↑⟨g, ⋯⟩) ⋯) =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
tactic: erw [← res_apply R U V iVU s ⟨x, hxV⟩, ← hs, const_apply, localizationToStalk_mk']
state_before: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.germ ⟨x, ⋯⟩) (const R f (↑⟨g, ⋯⟩) (PrimeSpectrum.basicOpen ↑⟨g, ⋯⟩) ⋯) =
    ((structureSheaf R).presheaf.germ ⟨x, hxU⟩) s
state_after: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.map (homOfLE hg).op) (const R f (↑⟨g, ⋯⟩) (PrimeSpectrum.basicOpen ↑⟨g, ⋯⟩) ⋯) =
    ((structureSheaf R).presheaf.map iVU.op) s
tactic: refine (structureSheaf R).presheaf.germ_ext V hxV (homOfLE hg) iVU ?_
state_before: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.map (homOfLE hg).op) (const R f (↑⟨g, ⋯⟩) (PrimeSpectrum.basicOpen ↑⟨g, ⋯⟩) ⋯) =
    ((structureSheaf R).presheaf.map iVU.op) s
state_after: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.map (homOfLE hg).op) (const R f g (PrimeSpectrum.basicOpen g) ⋯) =
    ((structureSheaf R).presheaf.map iVU.op) s
tactic: dsimp
state_before: case ih.w.intro.intro.intro.intro.intro.intro
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
U : Opens ↑(PrimeSpectrum.Top R)
hxU : x ∈ U
s : (forget CommRingCat).obj ((structureSheaf R).presheaf.obj (op U))
V : Opens ↑(PrimeSpectrum.Top R)
hxV : x ∈ V
iVU : V ⟶ U
f g : R
hg : V ≤ PrimeSpectrum.basicOpen g
hs : const R f g V hg = ((structureSheaf R).val.map iVU.op) s
⊢ ((structureSheaf R).presheaf.map (homOfLE hg).op) (const R f g (PrimeSpectrum.basicOpen g) ⋯) =
    ((structureSheaf R).presheaf.map iVU.op) s
state_after: no goals
tactic: erw [← hs, res_const']
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ (RingHom.comp (stalkToFiberRingHom R x) (localizationToStalk R x)).comp
      (algebraMap R (Localization.AtPrime x.asIdeal)) =
    (RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))
state_after: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ ((RingHom.comp (stalkToFiberRingHom R x) (localizationToStalk R x)).comp
        (algebraMap R (Localization.AtPrime x.asIdeal)))
      f =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
tactic: ext f
state_before: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ ((RingHom.comp (stalkToFiberRingHom R x) (localizationToStalk R x)).comp
        (algebraMap R (Localization.AtPrime x.asIdeal)))
      f =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
state_after: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ (stalkToFiberRingHom R x) ((localizationToStalk R x) ((algebraMap R (Localization.AtPrime x.asIdeal)) f)) =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
tactic: rw [RingHom.comp_apply, RingHom.comp_apply]
state_before: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ (stalkToFiberRingHom R x) ((localizationToStalk R x) ((algebraMap R (Localization.AtPrime x.asIdeal)) f)) =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
state_after: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ (algebraMap R (Localization.AtPrime x.asIdeal)) f =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
tactic: erw [localizationToStalk_of,
          stalkToFiberRingHom_toStalk]
state_before: case a
R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
f : R
⊢ (algebraMap R (Localization.AtPrime x.asIdeal)) f =
    ((RingHom.id (Localization.AtPrime x.asIdeal)).comp (algebraMap R (Localization.AtPrime x.asIdeal))) f
state_after: no goals
tactic: rw [RingHom.comp_apply, RingHom.id_apply]