Theorem: RingHom.surjective_ofLocalizationSpan
File: Mathlib/RingTheory/RingHom/Surjective.lean

tactic: introv R hs H
state_before: ⊢ OfLocalizationSpan fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
⊢ Function.Surjective ⇑f

tactic: letI := f.toAlgebra
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
⊢ Function.Surjective ⇑f
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ Function.Surjective ⇑f

tactic: show Function.Surjective (Algebra.ofId R S)
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ Function.Surjective ⇑f
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ Function.Surjective ⇑(Algebra.ofId R S)

tactic: rw [← Algebra.range_top_iff_surjective, eq_top_iff]
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ Function.Surjective ⇑(Algebra.ofId R S)
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ ⊤ ≤ (Algebra.ofId R S).range

tactic: rintro x -
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
⊢ ⊤ ≤ (Algebra.ofId R S).range
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
⊢ x ∈ (Algebra.ofId R S).range

tactic: obtain ⟨l, hl⟩ :=
  (Finsupp.mem_span_iff_total R s 1).mp (show _ ∈ Ideal.span s by rw [hs]; trivial)
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
⊢ x ∈ (Algebra.ofId R S).range
state_after: case intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ x ∈ (Algebra.ofId R S).range

tactic: fapply
  Subalgebra.mem_of_finset_sum_eq_one_of_pow_smul_mem _ l.support (fun x : s => f x) fun x : s =>
    f (l x)
state_before: case intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ x ∈ (Algebra.ofId R S).range
state_after: case intro.e
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∑ i ∈ l.support, f (l i) * f ↑i = 1

case intro.hs
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), f ↑i ∈ (Algebra.ofId R S).range

case intro.hl
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), f (l i) ∈ (Algebra.ofId R S).range

case intro.H
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), ∃ n, f ↑i ^ n • x ∈ (Algebra.ofId R S).range

tactic: rw [hs]
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
⊢ 1 ∈ Ideal.span s
state_after: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
⊢ 1 ∈ ⊤

tactic: trivial
state_before: R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
⊢ 1 ∈ ⊤
state_after: no goals

tactic: simp_rw [← _root_.map_mul, ← map_sum, ← f.map_one]
state_before: case intro.e
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∑ i ∈ l.support, f (l i) * f ↑i = 1
state_after: case intro.e
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ f (∑ x ∈ l.support, l x * ↑x) = f 1

tactic: exact f.congr_arg hl
state_before: case intro.e
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ f (∑ x ∈ l.support, l x * ↑x) = f 1
state_after: no goals

tactic: exact fun _ => Set.mem_range_self _
state_before: case intro.hs
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), f ↑i ∈ (Algebra.ofId R S).range
state_after: no goals

tactic: exact fun _ => Set.mem_range_self _
state_before: case intro.hl
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), f (l i) ∈ (Algebra.ofId R S).range
state_after: no goals

tactic: intro r
state_before: case intro.H
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
⊢ ∀ (i : ↑s), ∃ n, f ↑i ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range

tactic: obtain ⟨y, hy⟩ := H r (IsLocalization.mk' _ x (1 : Submonoid.powers (f r)))
state_before: case intro.H
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
y : Localization.Away ↑r
hy : (Localization.awayMap f ↑r) y = IsLocalization.mk' (Localization.Away (f ↑r)) x 1
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range

tactic: obtain ⟨z, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers (r : R)) y
state_before: case intro.H.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
y : Localization.Away ↑r
hy : (Localization.awayMap f ↑r) y = IsLocalization.mk' (Localization.Away (f ↑r)) x 1
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n : ℕ
hy :
  (Localization.awayMap f ↑r) (IsLocalization.mk' (Localization.Away ↑r) z ⟨(fun x => ↑r ^ x) n, ⋯⟩) =
    IsLocalization.mk' (Localization.Away (f ↑r)) x 1
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range

tactic: erw [IsLocalization.map_mk', IsLocalization.eq] at hy
state_before: case intro.H.intro.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n : ℕ
hy :
  (Localization.awayMap f ↑r) (IsLocalization.mk' (Localization.Away ↑r) z ⟨(fun x => ↑r ^ x) n, ⋯⟩) =
    IsLocalization.mk' (Localization.Away (f ↑r)) x 1
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n : ℕ
hy : ∃ c, ↑c * (↑1 * f z) = ↑c * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range

tactic: obtain ⟨⟨_, m, rfl⟩, hm⟩ := hy
state_before: case intro.H.intro.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n : ℕ
hy : ∃ c, ↑c * (↑1 * f z) = ↑c * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑1 * f z) = ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range

tactic: refine ⟨m + n, ?_⟩
state_before: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑1 * f z) = ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ ∃ n, f ↑r ^ n • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑1 * f z) = ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ f ↑r ^ (m + n) • x ∈ (Algebra.ofId R S).range

tactic: dsimp at hm ⊢
state_before: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑1 * f z) = ↑⟨(fun x => f ↑r ^ x) m, ⋯⟩ * (↑⟨f ↑⟨(fun x => ↑r ^ x) n, ⋯⟩, ⋯⟩ * x)
⊢ f ↑r ^ (m + n) • x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : f ↑r ^ m * (1 * f z) = f ↑r ^ m * (f (↑r ^ n) * x)
⊢ f ↑r ^ (m + n) * x ∈ (Algebra.ofId R S).range

tactic: simp_rw [_root_.one_mul, ← _root_.mul_assoc, ← map_pow, ← f.map_mul, ← pow_add, map_pow] at hm
state_before: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : f ↑r ^ m * (1 * f z) = f ↑r ^ m * (f (↑r ^ n) * x)
⊢ f ↑r ^ (m + n) * x ∈ (Algebra.ofId R S).range
state_after: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : f (↑r ^ m * z) = f ↑r ^ (m + n) * x
⊢ f ↑r ^ (m + n) * x ∈ (Algebra.ofId R S).range

tactic: exact ⟨_, hm⟩
state_before: case intro.H.intro.intro.intro.mk.intro.intro.mk.intro
R S : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
s : Set R
hs : Ideal.span s = ⊤
H : ∀ (r : ↑s), (fun {X Y} [CommRing X] [CommRing Y] f => Function.Surjective ⇑f) (Localization.awayMap f ↑r)
this : Algebra R S := f.toAlgebra
x : S
l : ↑s →₀ R
hl : (Finsupp.total (↑s) R R Subtype.val) l = 1
r : ↑s
z : R
n m : ℕ
hm : f (↑r ^ m * z) = f ↑r ^ (m + n) * x
⊢ f ↑r ^ (m + n) * x ∈ (Algebra.ofId R S).range
state_after: no goals