Theorem: IsLocalization.of_le
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: obtain ⟨⟨x, y, hy⟩, H⟩ := IsLocalization.surj M s
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
s : S
⊢ ∃ x, s * ↑(algebraMap R S) ↑x.snd = ↑(algebraMap R S) x.fst

tactic: exact ⟨⟨x, y, h₁ hy⟩, H⟩
state_before: case intro.mk.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
s : S
x y : R
hy : y ∈ M
H :
  s * ↑(algebraMap R S) ↑(x, { val := y, property := hy }).snd = ↑(algebraMap R S) (x, { val := y, property := hy }).fst
⊢ ∃ x, s * ↑(algebraMap R S) ↑x.snd = ↑(algebraMap R S) x.fst

tactic: constructor
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
⊢ ↑(algebraMap R S) x = ↑(algebraMap R S) y ↔ ∃ c, ↑c * x = ↑c * y

tactic: rw [IsLocalization.eq_iff_exists M]
state_before: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
⊢ ↑(algebraMap R S) x = ↑(algebraMap R S) y → ∃ c, ↑c * x = ↑c * y

tactic: rintro ⟨c, hc⟩
state_before: case mp
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
⊢ (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y

tactic: exact ⟨⟨c, h₁ c.2⟩, hc⟩
state_before: case mp.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
c : { x // x ∈ M }
hc : ↑c * x = ↑c * y
⊢ ∃ c, ↑c * x = ↑c * y

tactic: rintro ⟨c, h⟩
state_before: case mpr
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
⊢ (∃ c, ↑c * x = ↑c * y) → ↑(algebraMap R S) x = ↑(algebraMap R S) y

tactic: simpa only [map_mul, (h₂ c c.2).mul_right_inj] using
  congr_arg (algebraMap R S) h
state_before: case mpr.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.125264
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
N : Submonoid R
h₁ : M ≤ N
h₂ : ∀ (r : R), r ∈ N → IsUnit (↑(algebraMap R S) r)
x y : R
c : { x // x ∈ N }
h : ↑c * x = ↑c * y
⊢ ↑(algebraMap R S) x = ↑(algebraMap R S) y