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

tactic: simpa [Scheme.Hom.appLE] using X.basicOpen_restrict _ _
state_before: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this✝ : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
this : IsLocalization.Away ((Scheme.Hom.appLE f U V e) r) ↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)) :=
  isLocalization_basicOpen hV ((Scheme.Hom.appLE f U V e) r)
⊢ X.basicOpen ((Scheme.Hom.appLE f U V e) r) ≤ f ⁻¹ᵁ Y.basicOpen r
state_after: no goals

tactic: letI := hU.isLocalization_basicOpen r
state_before: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
⊢ Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯ =
    IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
      (Scheme.Hom.appLE f U V e) r
state_after: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
⊢ Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯ =
    IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
      (Scheme.Hom.appLE f U V e) r

tactic: letI := hV.isLocalization_basicOpen (f.appLE U V e r)
state_before: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
⊢ Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯ =
    IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
      (Scheme.Hom.appLE f U V e) r
state_after: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this✝ : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
this : IsLocalization.Away ((Scheme.Hom.appLE f U V e) r) ↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)) :=
  isLocalization_basicOpen hV ((Scheme.Hom.appLE f U V e) r)
⊢ Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯ =
    IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
      (Scheme.Hom.appLE f U V e) r

tactic: apply IsLocalization.ringHom_ext (.powers r)
state_before: X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this✝ : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
this : IsLocalization.Away ((Scheme.Hom.appLE f U V e) r) ↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)) :=
  isLocalization_basicOpen hV ((Scheme.Hom.appLE f U V e) r)
⊢ Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯ =
    IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
      (Scheme.Hom.appLE f U V e) r
state_after: case h
X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this✝ : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
this : IsLocalization.Away ((Scheme.Hom.appLE f U V e) r) ↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)) :=
  isLocalization_basicOpen hV ((Scheme.Hom.appLE f U V e) r)
⊢ RingHom.comp (Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯)
      (algebraMap ↑Γ(Y, U) ↑Γ(Y, Y.basicOpen r)) =
    (IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
          (Scheme.Hom.appLE f U V e) r).comp
      (algebraMap ↑Γ(Y, U) ↑Γ(Y, Y.basicOpen r))

tactic: rw [← CommRingCat.comp_eq_ring_hom_comp, IsLocalization.Away.map, IsLocalization.map_comp,
  RingHom.algebraMap_toAlgebra, RingHom.algebraMap_toAlgebra, ← CommRingCat.comp_eq_ring_hom_comp,
  Scheme.Hom.appLE_map, Scheme.Hom.map_appLE]
state_before: case h
X✝ Y✝ : Scheme
U✝ : Opens ↑↑X✝.toPresheafedSpace
hU✝ : IsAffineOpen U✝
f✝ : ↑Γ(X✝, U✝)
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
hU : IsAffineOpen U
V : Opens ↑↑X.toPresheafedSpace
hV : IsAffineOpen V
e : V ≤ f ⁻¹ᵁ U
r : ↑Γ(Y, U)
this✝ : IsLocalization.Away r ↑Γ(Y, Y.basicOpen r) := isLocalization_basicOpen hU r
this : IsLocalization.Away ((Scheme.Hom.appLE f U V e) r) ↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)) :=
  isLocalization_basicOpen hV ((Scheme.Hom.appLE f U V e) r)
⊢ RingHom.comp (Scheme.Hom.appLE f (Y.basicOpen r) (X.basicOpen ((Scheme.Hom.appLE f U V e) r)) ⋯)
      (algebraMap ↑Γ(Y, U) ↑Γ(Y, Y.basicOpen r)) =
    (IsLocalization.Away.map (↑Γ(Y, Y.basicOpen r)) (↑Γ(X, X.basicOpen ((Scheme.Hom.appLE f U V e) r)))
          (Scheme.Hom.appLE f U V e) r).comp
      (algebraMap ↑Γ(Y, U) ↑Γ(Y, Y.basicOpen r))
state_after: no goals