Theorem: IsFractionRing.isFractionRing_of_isLocalization
File: Mathlib/RingTheory/Localization/LocalizationLocalization.lean

tactic: have := isLocalization_of_submonoid_le S T M (nonZeroDivisors R) hM
state_before: R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
⊢ IsFractionRing S T

tactic: refine @isLocalization_of_is_exists_mul_mem _ _ _ _ _ _ _ this ?_ ?_
state_before: R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
⊢ IsFractionRing S T

tactic: exact map_nonZeroDivisors_le M S
state_before: case refine_1
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
⊢ Submonoid.map (algebraMap R S) (nonZeroDivisors R) ≤ nonZeroDivisors S

tactic: rintro ⟨x, hx⟩
state_before: case refine_2
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
⊢ ∀ (x : { x // x ∈ nonZeroDivisors S }), ∃ m, m * ↑x ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: obtain ⟨⟨y, s⟩, e⟩ := IsLocalization.surj M x
state_before: case refine_2.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
⊢ ∃ m, m * ↑{ val := x, property := hx } ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: use algebraMap R S s
state_before: case refine_2.mk.intro.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
⊢ ∃ m, m * ↑{ val := x, property := hx } ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: rw [mul_comm, Subtype.coe_mk, e]
state_before: case refine_2.mk.intro.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
⊢ ↑(algebraMap R S) ↑s * ↑{ val := x, property := hx } ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: refine' Set.mem_image_of_mem (algebraMap R S) _
state_before: case refine_2.mk.intro.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
⊢ ↑(algebraMap R S) (y, s).fst ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: intro z hz
state_before: case refine_2.mk.intro.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
⊢ (y, s).fst ∈ ↑(nonZeroDivisors R)

tactic: apply IsLocalization.injective S hM
state_before: case refine_2.mk.intro.mk
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
z : R
hz : z * (y, s).fst = 0
⊢ z = 0

tactic: rw [map_zero]
state_before: case refine_2.mk.intro.mk.a
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
z : R
hz : z * (y, s).fst = 0
⊢ ↑(algebraMap R S) z = ↑(algebraMap R S) 0

tactic: apply hx
state_before: case refine_2.mk.intro.mk.a
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
z : R
hz : z * (y, s).fst = 0
⊢ ↑(algebraMap R S) z = 0

tactic: rw [← (map_units S s).mul_left_inj, mul_assoc, e, ← map_mul, hz, map_zero,
  MulZeroClass.zero_mul]
state_before: case refine_2.mk.intro.mk.a.a
R : Type u_3
inst✝¹¹ : CommRing R
M : Submonoid R
S✝ : Type ?u.661559
inst✝¹⁰ : CommRing S✝
inst✝⁹ : Algebra R S✝
P : Type ?u.661815
inst✝⁸ : CommRing P
S : Type u_1
T : Type u_2
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : { x // x ∈ M }
e : x * ↑(algebraMap R S) ↑(y, s).snd = ↑(algebraMap R S) (y, s).fst
z : R
hz : z * (y, s).fst = 0
⊢ ↑(algebraMap R S) z * x = 0