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

tactic: rcases f with ⟨⟨⟩⟩
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.212365
inst✝ : CommMonoid P
f g : LocalizationMap S N
h : ∀ (x : M), ↑(toMap f) x = ↑(toMap g) x
⊢ f = g

tactic: rcases g with ⟨⟨⟩⟩
state_before: case mk.mk
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.212365
inst✝ : CommMonoid P
g : LocalizationMap S N
toOneHom✝ : OneHom M N
map_mul'✝ : ∀ (x y : M), OneHom.toFun toOneHom✝ (x * y) = OneHom.toFun toOneHom✝ x * OneHom.toFun toOneHom✝ y
map_units'✝ : ∀ (y : { x // x ∈ S }), IsUnit (OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑y)
surj'✝ :
  ∀ (z : N),
    ∃ x,
      z * OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑x.snd =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x.fst
eq_iff_exists'✝ :
  ∀ (x y : M),
    OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) y ↔
      ∃ c, ↑c * x = ↑c * y
h :
  ∀ (x : M),
    ↑(toMap
            { toMonoidHom := { toOneHom := toOneHom✝, map_mul' := map_mul'✝ }, map_units' := map_units'✝,
              surj' := surj'✝, eq_iff_exists' := eq_iff_exists'✝ })
        x =
      ↑(toMap g) x
⊢ { toMonoidHom := { toOneHom := toOneHom✝, map_mul' := map_mul'✝ }, map_units' := map_units'✝, surj' := surj'✝,
      eq_iff_exists' := eq_iff_exists'✝ } =
    g

tactic: simp only [mk.injEq, MonoidHom.mk.injEq]
state_before: case mk.mk.mk.mk
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.212365
inst✝ : CommMonoid P
toOneHom✝¹ : OneHom M N
map_mul'✝¹ : ∀ (x y : M), OneHom.toFun toOneHom✝¹ (x * y) = OneHom.toFun toOneHom✝¹ x * OneHom.toFun toOneHom✝¹ y
map_units'✝¹ : ∀ (y : { x // x ∈ S }), IsUnit (OneHom.toFun ↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ } ↑y)
surj'✝¹ :
  ∀ (z : N),
    ∃ x,
      z * OneHom.toFun ↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ } ↑x.snd =
        OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) x.fst
eq_iff_exists'✝¹ :
  ∀ (x y : M),
    OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) x =
        OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) y ↔
      ∃ c, ↑c * x = ↑c * y
toOneHom✝ : OneHom M N
map_mul'✝ : ∀ (x y : M), OneHom.toFun toOneHom✝ (x * y) = OneHom.toFun toOneHom✝ x * OneHom.toFun toOneHom✝ y
map_units'✝ : ∀ (y : { x // x ∈ S }), IsUnit (OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑y)
surj'✝ :
  ∀ (z : N),
    ∃ x,
      z * OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑x.snd =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x.fst
eq_iff_exists'✝ :
  ∀ (x y : M),
    OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) y ↔
      ∃ c, ↑c * x = ↑c * y
h :
  ∀ (x : M),
    ↑(toMap
            { toMonoidHom := { toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }, map_units' := map_units'✝¹,
              surj' := surj'✝¹, eq_iff_exists' := eq_iff_exists'✝¹ })
        x =
      ↑(toMap
            { toMonoidHom := { toOneHom := toOneHom✝, map_mul' := map_mul'✝ }, map_units' := map_units'✝,
              surj' := surj'✝, eq_iff_exists' := eq_iff_exists'✝ })
        x
⊢ { toMonoidHom := { toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }, map_units' := map_units'✝¹, surj' := surj'✝¹,
      eq_iff_exists' := eq_iff_exists'✝¹ } =
    { toMonoidHom := { toOneHom := toOneHom✝, map_mul' := map_mul'✝ }, map_units' := map_units'✝, surj' := surj'✝,
      eq_iff_exists' := eq_iff_exists'✝ }

tactic: exact OneHom.ext h
state_before: case mk.mk.mk.mk
M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type ?u.212365
inst✝ : CommMonoid P
toOneHom✝¹ : OneHom M N
map_mul'✝¹ : ∀ (x y : M), OneHom.toFun toOneHom✝¹ (x * y) = OneHom.toFun toOneHom✝¹ x * OneHom.toFun toOneHom✝¹ y
map_units'✝¹ : ∀ (y : { x // x ∈ S }), IsUnit (OneHom.toFun ↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ } ↑y)
surj'✝¹ :
  ∀ (z : N),
    ∃ x,
      z * OneHom.toFun ↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ } ↑x.snd =
        OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) x.fst
eq_iff_exists'✝¹ :
  ∀ (x y : M),
    OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) x =
        OneHom.toFun (↑{ toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }) y ↔
      ∃ c, ↑c * x = ↑c * y
toOneHom✝ : OneHom M N
map_mul'✝ : ∀ (x y : M), OneHom.toFun toOneHom✝ (x * y) = OneHom.toFun toOneHom✝ x * OneHom.toFun toOneHom✝ y
map_units'✝ : ∀ (y : { x // x ∈ S }), IsUnit (OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑y)
surj'✝ :
  ∀ (z : N),
    ∃ x,
      z * OneHom.toFun ↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ } ↑x.snd =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x.fst
eq_iff_exists'✝ :
  ∀ (x y : M),
    OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) x =
        OneHom.toFun (↑{ toOneHom := toOneHom✝, map_mul' := map_mul'✝ }) y ↔
      ∃ c, ↑c * x = ↑c * y
h :
  ∀ (x : M),
    ↑(toMap
            { toMonoidHom := { toOneHom := toOneHom✝¹, map_mul' := map_mul'✝¹ }, map_units' := map_units'✝¹,
              surj' := surj'✝¹, eq_iff_exists' := eq_iff_exists'✝¹ })
        x =
      ↑(toMap
            { toMonoidHom := { toOneHom := toOneHom✝, map_mul' := map_mul'✝ }, map_units' := map_units'✝,
              surj' := surj'✝, eq_iff_exists' := eq_iff_exists'✝ })
        x
⊢ toOneHom✝¹ = toOneHom✝