Theorem: Submonoid.LocalizationMap.lift_injective_iff
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: constructor
state_before: M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
⊢ Injective ↑(lift f hg) ↔ ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y

tactic: intro H x y
state_before: case mp
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
⊢ Injective ↑(lift f hg) → ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y

tactic: constructor
state_before: case mp
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : Injective ↑(lift f hg)
x y : M
⊢ ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y

tactic: exact f.eq_of_eq hg
state_before: case mp.mp
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : Injective ↑(lift f hg)
x y : M
⊢ ↑(toMap f) x = ↑(toMap f) y → ↑g x = ↑g y

tactic: intro h
state_before: case mp.mpr
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : Injective ↑(lift f hg)
x y : M
⊢ ↑g x = ↑g y → ↑(toMap f) x = ↑(toMap f) y

tactic: rw [← f.lift_eq hg, ← f.lift_eq hg] at h
state_before: case mp.mpr
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : Injective ↑(lift f hg)
x y : M
h : ↑g x = ↑g y
⊢ ↑(toMap f) x = ↑(toMap f) y

tactic: exact H h
state_before: case mp.mpr
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : Injective ↑(lift f hg)
x y : M
h : ↑(lift f hg) (↑(toMap f) x) = ↑(lift f hg) (↑(toMap f) y)
⊢ ↑(toMap f) x = ↑(toMap f) y

tactic: intro H z w h
state_before: case mpr
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
⊢ (∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y) → Injective ↑(lift f hg)

tactic: obtain ⟨_, _⟩ := f.surj z
state_before: case mpr
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y
z w : N
h : ↑(lift f hg) z = ↑(lift f hg) w
⊢ z = w

tactic: obtain ⟨_, _⟩ := f.surj w
state_before: case mpr.intro
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y
z w : N
h : ↑(lift f hg) z = ↑(lift f hg) w
w✝ : M × { x // x ∈ S }
h✝ : z * ↑(toMap f) ↑w✝.snd = ↑(toMap f) w✝.fst
⊢ z = w

tactic: rw [← f.mk'_sec z, ← f.mk'_sec w]
state_before: case mpr.intro.intro
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y
z w : N
h : ↑(lift f hg) z = ↑(lift f hg) w
w✝¹ : M × { x // x ∈ S }
h✝¹ : z * ↑(toMap f) ↑w✝¹.snd = ↑(toMap f) w✝¹.fst
w✝ : M × { x // x ∈ S }
h✝ : w * ↑(toMap f) ↑w✝.snd = ↑(toMap f) w✝.fst
⊢ z = w

tactic: exact (mul_inv f.map_units).2 ((H _ _).2 <| (mul_inv hg).1 h)
state_before: case mpr.intro.intro
M : Type u_3
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝¹ : CommMonoid N
P : Type u_2
inst✝ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
H : ∀ (x y : M), ↑(toMap f) x = ↑(toMap f) y ↔ ↑g x = ↑g y
z w : N
h : ↑(lift f hg) z = ↑(lift f hg) w
w✝¹ : M × { x // x ∈ S }
h✝¹ : z * ↑(toMap f) ↑w✝¹.snd = ↑(toMap f) w✝¹.fst
w✝ : M × { x // x ∈ S }
h✝ : w * ↑(toMap f) ↑w✝.snd = ↑(toMap f) w✝.fst
⊢ mk' f (sec f z).fst (sec f z).snd = mk' f (sec f w).fst (sec f w).snd