Theorem: Localization.mem_range_mapToFractionRing_iff
File: Mathlib/RingTheory/Localization/AsSubring.lean

tactic: rintro ⟨x, rfl⟩
state_before: A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
x : K
⊢ x ∈ AlgHom.range (mapToFractionRing K S B hS) →
    ∃ a s hs, x = IsLocalization.mk' K a { val := s, property := (_ : s ∈ A⁰) }

tactic: obtain ⟨a, s, rfl⟩ := IsLocalization.mk'_surjective S x
state_before: case intro
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
x : B
⊢ ∃ a s hs, ↑↑(mapToFractionRing K S B hS) x = IsLocalization.mk' K a { val := s, property := (_ : s ∈ A⁰) }

tactic: use a, s, s.2
state_before: case intro.intro.intro
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
a : A
s : { x // x ∈ S }
⊢ ∃ a_1 s_1 hs,
    ↑↑(mapToFractionRing K S B hS) (IsLocalization.mk' B a s) =
      IsLocalization.mk' K a_1 { val := s_1, property := (_ : s_1 ∈ A⁰) }

tactic: apply IsLocalization.lift_mk'
state_before: case intro.intro.intro
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
a : A
s : { x // x ∈ S }
⊢ ↑↑(mapToFractionRing K S B hS) (IsLocalization.mk' B a s) =
    IsLocalization.mk' K a { val := ↑s, property := (_ : ↑s ∈ A⁰) }

tactic: rintro ⟨a, s, hs, rfl⟩
state_before: A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
x : K
⊢ (∃ a s hs, x = IsLocalization.mk' K a { val := s, property := (_ : s ∈ A⁰) }) →
    x ∈ AlgHom.range (mapToFractionRing K S B hS)

tactic: use IsLocalization.mk' _ a ⟨s, hs⟩
state_before: case intro.intro.intro
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
a s : A
hs : s ∈ S
⊢ IsLocalization.mk' K a { val := s, property := (_ : s ∈ A⁰) } ∈ AlgHom.range (mapToFractionRing K S B hS)

tactic: apply IsLocalization.lift_mk'
state_before: case intro.intro.intro
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing A
S : Submonoid A
hS✝ : S ≤ A⁰
inst✝⁵ : CommRing K
inst✝⁴ : Algebra A K
inst✝³ : IsFractionRing A K
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : IsLocalization S B
hS : S ≤ A⁰
a s : A
hs : s ∈ S
⊢ ↑↑(mapToFractionRing K S B hS) (IsLocalization.mk' B a { val := s, property := hs }) =
    IsLocalization.mk' K a { val := s, property := (_ : s ∈ A⁰) }