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_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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
state_after: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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: refine @isLocalization_of_is_exists_mul_mem _ _ _ _ _ _ _ this ?_ ?_
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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
state_after: case refine_1
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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

case refine_2
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥(nonZeroDivisors S)), ∃ m, m * ↑x ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: exact map_nonZeroDivisors_le M S
state_before: case refine_1
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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
state_after: no goals

tactic: rintro ⟨x, hx⟩
state_before: case refine_2
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥(nonZeroDivisors S)), ∃ m, m * ↑x ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)
state_after: case refine_2.mk
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 * ↑⟨x, hx⟩ ∈ 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_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 * ↑⟨x, hx⟩ ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)
state_after: case refine_2.mk.intro.mk
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ ∃ m, m * ↑⟨x, 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_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ ∃ m, m * ↑⟨x, hx⟩ ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)
state_after: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (algebraMap R S) ↑s * ↑⟨x, hx⟩ ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: rw [mul_comm, Subtype.coe_mk, e]
state_before: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (algebraMap R S) ↑s * ↑⟨x, hx⟩ ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)
state_after: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (algebraMap R S) (y, s).1 ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)

tactic: refine Set.mem_image_of_mem (algebraMap R S) ?_
state_before: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (algebraMap R S) (y, s).1 ∈ Submonoid.map (algebraMap R S) (nonZeroDivisors R)
state_after: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (y, s).1 ∈ ↑(nonZeroDivisors R)

tactic: intro z hz
state_before: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
⊢ (y, s).1 ∈ ↑(nonZeroDivisors R)
state_after: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ z = 0

tactic: apply IsLocalization.injective S hM
state_before: case h
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ z = 0
state_after: case h.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z = (algebraMap R S) 0

tactic: rw [map_zero]
state_before: case h.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z = (algebraMap R S) 0
state_after: case h.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z = 0

tactic: apply hx
state_before: case h.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z = 0
state_after: case h.a.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z * x = 0

tactic: rw [← (map_units S s).mul_left_inj, mul_assoc, e, ← map_mul, hz, map_zero,
  zero_mul]
state_before: case h.a.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
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 : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z * x = 0
state_after: no goals