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

Proof steps:
state_before: R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ localizationToStalk R y ≫ (structureSheaf R).presheaf.stalkSpecializes h =
    CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x
state_after: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (localizationToStalk R y ≫ (structureSheaf R).presheaf.stalkSpecializes h)
      (algebraMap R (Localization.AtPrime y.asIdeal)) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
tactic: apply IsLocalization.ringHom_ext (S := Localization.AtPrime y.asIdeal) y.asIdeal.primeCompl
state_before: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp (localizationToStalk R y ≫ (structureSheaf R).presheaf.stalkSpecializes h)
      (algebraMap R (Localization.AtPrime y.asIdeal)) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
state_after: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
tactic: erw [RingHom.comp_assoc]
state_before: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫ localizationToStalk R x)
      (algebraMap R (Localization.AtPrime y.asIdeal))
state_after: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (localizationToStalk R x)
      (RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h))
        (algebraMap R (Localization.AtPrime y.asIdeal)))
tactic: conv_rhs => erw [RingHom.comp_assoc]
state_before: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      (RingHom.comp (localizationToStalk R y) (algebraMap R (Localization.AtPrime y.asIdeal))) =
    RingHom.comp (localizationToStalk R x)
      (RingHom.comp (CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h))
        (algebraMap R (Localization.AtPrime y.asIdeal)))
state_after: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      ((IsLocalization.lift ⋯).comp (algebraMap R (Localization.AtPrime y.asIdeal))) =
    (IsLocalization.lift ⋯).comp ((IsLocalization.lift ⋯).comp (algebraMap R (Localization.AtPrime y.asIdeal)))
tactic: dsimp [CommRingCat.ofHom, localizationToStalk, PrimeSpectrum.localizationMapOfSpecializes]
state_before: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h)
      ((IsLocalization.lift ⋯).comp (algebraMap R (Localization.AtPrime y.asIdeal))) =
    (IsLocalization.lift ⋯).comp ((IsLocalization.lift ⋯).comp (algebraMap R (Localization.AtPrime y.asIdeal)))
state_after: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h) (toStalk R y) = toStalk R x
tactic: rw [IsLocalization.lift_comp, IsLocalization.lift_comp, IsLocalization.lift_comp]
state_before: case h
R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ RingHom.comp ((structureSheaf R).presheaf.stalkSpecializes h) (toStalk R y) = toStalk R x
state_after: no goals
tactic: exact toStalk_stalkSpecializes h