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

tactic: have := isLocalization_basicOpen hU f
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
g : ↑Γ(X, X.basicOpen f)
⊢ ∃ f', X.basicOpen f' = X.basicOpen g
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
g : ↑Γ(X, X.basicOpen f)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
⊢ ∃ f', X.basicOpen f' = X.basicOpen g

tactic: obtain ⟨x, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.surj'' (Submonoid.powers f) g
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
g : ↑Γ(X, X.basicOpen f)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
⊢ ∃ f', X.basicOpen f' = X.basicOpen g
state_after: case intro.intro.mk.intro
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ ∃ f',
    X.basicOpen f' =
      X.basicOpen
        (x • ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩))

tactic: use f * x
state_before: case intro.intro.mk.intro
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ ∃ f',
    X.basicOpen f' =
      X.basicOpen
        (x • ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩))
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen (f * x) =
    X.basicOpen
      (x • ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩))

tactic: rw [Algebra.smul_def, Scheme.basicOpen_mul, Scheme.basicOpen_mul, RingHom.algebraMap_toAlgebra]
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen (f * x) =
    X.basicOpen
      (x • ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩))
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x =
    X.basicOpen ((X.presheaf.map (homOfLE ⋯).op) x) ⊓
      X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)

tactic: rw [Scheme.basicOpen_res]
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x =
    X.basicOpen ((X.presheaf.map (homOfLE ⋯).op) x) ⊓
      X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x =
    X.basicOpen f ⊓ X.basicOpen x ⊓
      X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)

tactic: refine (inf_eq_left.mpr ?_).symm
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x =
    X.basicOpen f ⊓ X.basicOpen x ⊓
      X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)
state_after: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x ≤
    X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)

tactic: convert inf_le_left (α := Opens X) using 1
state_before: case h
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen f ⊓ X.basicOpen x ≤
    X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)
state_after: case h.e'_4
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩) =
    X.basicOpen f

tactic: apply Scheme.basicOpen_of_isUnit
state_before: case h.e'_4
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ X.basicOpen ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩) =
    X.basicOpen f
state_after: case h.e'_4.hf
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ IsUnit ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)

tactic: apply
  Submonoid.leftInv_le_isUnit _
    (IsLocalization.toInvSubmonoid (Submonoid.powers f) (Γ(X, X.basicOpen f))
      _).prop
state_before: case h.e'_4.hf
X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
this : IsLocalization.Away f ↑Γ(X, X.basicOpen f)
x : ↑Γ(X, U)
n : ℕ
⊢ IsUnit ↑((IsLocalization.toInvSubmonoid (Submonoid.powers f) ↑Γ(X, X.basicOpen f)) ⟨(fun x => f ^ x) n, ⋯⟩)
state_after: no goals