Theorem: AlgebraicGeometry.IsAffineOpen.isLocalization_basicOpen
File: Mathlib/AlgebraicGeometry/AffineScheme.lean

tactic: apply
  (IsLocalization.isLocalization_iff_of_ringEquiv (Submonoid.powers f)
    (asIso <| basicOpenSectionsToAffine hU f).commRingCatIsoToRingEquiv).mpr
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
⊢ IsLocalization.Away f ↑Γ(X, X.basicOpen f)
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
⊢ IsLocalization (Submonoid.powers f) ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f)

tactic: convert StructureSheaf.IsLocalization.to_basicOpen _ f using 1
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
⊢ IsLocalization (Submonoid.powers f) ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f)
state_after: case h.e'_3.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
        (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f))).toAlgebra =
    StructureSheaf.openAlgebra ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }

tactic: delta StructureSheaf.openAlgebra
state_before: case h.e'_3.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
        (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f))).toAlgebra =
    StructureSheaf.openAlgebra ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }
state_after: case h.e'_3.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
        (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f))).toAlgebra =
    RingHom.toAlgebra (StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop)

tactic: congr 1
state_before: case h.e'_3.h.h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
        (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f))).toAlgebra =
    RingHom.toAlgebra (StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop)
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ (asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
      (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f)) =
    StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop

tactic: rw [CommRingCat.ringHom_comp_eq_comp, Iso.commRingIsoToRingEquiv_toRingHom, asIso_hom]
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ (asIso (hU.basicOpenSectionsToAffine f)).commRingCatIsoToRingEquiv.toRingHom.comp
      (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f)) =
    StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ CommRingCat.ofHom (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f)) ≫ CommRingCat.ofHom (hU.basicOpenSectionsToAffine f) =
    StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop

tactic: dsimp [CommRingCat.ofHom, RingHom.algebraMap_toAlgebra]
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ CommRingCat.ofHom (algebraMap ↑Γ(X, U) ↑Γ(X, X.basicOpen f)) ≫ CommRingCat.ofHom (hU.basicOpenSectionsToAffine f) =
    StructureSheaf.toOpen ↑Γ(X, U) { unop := PrimeSpectrum.basicOpen f }.unop
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ X.presheaf.map (homOfLE ⋯).op ≫ hU.basicOpenSectionsToAffine f =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)

tactic: delta basicOpenSectionsToAffine
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ X.presheaf.map (homOfLE ⋯).op ≫ hU.basicOpenSectionsToAffine f =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ X.presheaf.map (homOfLE ⋯).op ≫
      hU.fromSpec.val.c.app { unop := X.basicOpen f } ≫ (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)

tactic: rw [hU.fromSpec.naturality_assoc, hU.fromSpec_app_self]
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ X.presheaf.map (homOfLE ⋯).op ≫
      hU.fromSpec.val.c.app { unop := X.basicOpen f } ≫ (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((Scheme.ΓSpecIso Γ(X, U)).inv ≫ (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op) ≫
      (Spec Γ(X, U)).presheaf.map ((Opens.map hU.fromSpec.val.base).map (homOfLE ⋯).op.unop).op ≫
        (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)

tactic: simp only [Category.assoc, ← Functor.map_comp, ← op_comp]
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ ((Scheme.ΓSpecIso Γ(X, U)).inv ≫ (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op) ≫
      (Spec Γ(X, U)).presheaf.map ((Opens.map hU.fromSpec.val.base).map (homOfLE ⋯).op.unop).op ≫
        (Spec Γ(X, U)).presheaf.map (eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)
state_after: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ (Scheme.ΓSpecIso Γ(X, U)).inv ≫
      (Spec Γ(X, U)).presheaf.map
        (eqToHom ⋯ ≫ (Opens.map hU.fromSpec.val.base).map (homOfLE ⋯).op.unop ≫ eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)

tactic: apply StructureSheaf.toOpen_res
state_before: case h.e'_3.h.h.e_i
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
e_1✝ :
  ↑Γ(Spec Γ(X, U), PrimeSpectrum.basicOpen f) =
    ↑((structureSheaf ↑Γ(X, U)).val.obj { unop := PrimeSpectrum.basicOpen f })
he✝ : CommRing.toCommSemiring = CommRing.toCommSemiring
⊢ (Scheme.ΓSpecIso Γ(X, U)).inv ≫
      (Spec Γ(X, U)).presheaf.map
        (eqToHom ⋯ ≫ (Opens.map hU.fromSpec.val.base).map (homOfLE ⋯).op.unop ≫ eqToHom ⋯).op =
    StructureSheaf.toOpen (↑Γ(X, U)) (PrimeSpectrum.basicOpen f)
state_after: no goals