File: Mathlib/GroupTheory/MonoidLocalization/Basic.lean

full_name: AddSubmonoid.LocalizationMap.map_add_units'
code: /-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y
goal: IsAddUnit ((↑self.toAddMonoidHom).toFun ↑y)

full_name: AddSubmonoid.LocalizationMap.surj'
code: /-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y
goal: ∃ x, z + (↑self.toAddMonoidHom).toFun ↑x.2 = (↑self.toAddMonoidHom).toFun x.1

full_name: AddSubmonoid.LocalizationMap.exists_of_eq
code: /-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y
goal: (↑self.toAddMonoidHom).toFun x = (↑self.toAddMonoidHom).toFun y → ∃ c, ↑c + x = ↑c + y

full_name: AddSubmonoid.LocalizationMap
code: /-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y
goal: Type (max u_1 u_2)

full_name: Submonoid.LocalizationMap.map_units'
code: /-- The type of monoid homomorphisms satisfying the characteristic predicate: if `f : M →* N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends MonoidHom M N where
  map_units' : ∀ y : S, IsUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z * toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c * x = c * y
goal: IsUnit ((↑self.toMonoidHom).toFun ↑y)

full_name: Submonoid.LocalizationMap.exists_of_eq
code: /-- The type of monoid homomorphisms satisfying the characteristic predicate: if `f : M →* N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends MonoidHom M N where
  map_units' : ∀ y : S, IsUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z * toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c * x = c * y
goal: (↑self.toMonoidHom).toFun x = (↑self.toMonoidHom).toFun y → ∃ c, ↑c * x = ↑c * y

full_name: Submonoid.LocalizationMap
code: /-- The type of monoid homomorphisms satisfying the characteristic predicate: if `f : M →* N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends MonoidHom M N where
  map_units' : ∀ y : S, IsUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z * toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c * x = c * y
goal: Type (max u_1 u_2)

full_name: Submonoid.LocalizationMap.surj'
code: /-- The type of monoid homomorphisms satisfying the characteristic predicate: if `f : M →* N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends MonoidHom M N where
  map_units' : ∀ y : S, IsUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z * toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c * x = c * y
goal: ∃ x, z * (↑self.toMonoidHom).toFun ↑x.2 = (↑self.toMonoidHom).toFun x.1

full_name: Localization.r
code: /-- The congruence relation on `M × S`, `M` a `CommMonoid` and `S` a submonoid of `M`, whose
quotient is the localization of `M` at `S`, defined as the unique congruence relation on
`M × S` such that for any other congruence relation `s` on `M × S` where for all `y ∈ S`,
`(1, 1) ∼ (y, y)` under `s`, we have that `(x₁, y₁) ∼ (x₂, y₂)` by `r` implies
`(x₁, y₁) ∼ (x₂, y₂)` by `s`. -/
@[to_additive AddLocalization.r
    "The congruence relation on `M × S`, `M` an `AddCommMonoid` and `S` an `AddSubmonoid` of `M`,
whose quotient is the localization of `M` at `S`, defined as the unique congruence relation on
`M × S` such that for any other congruence relation `s` on `M × S` where for all `y ∈ S`,
`(0, 0) ∼ (y, y)` under `s`, we have that `(x₁, y₁) ∼ (x₂, y₂)` by `r` implies
`(x₁, y₁) ∼ (x₂, y₂)` by `s`."]
def r (S : Submonoid M) : Con (M × S) 
goal: Con (M × ↥S)

full_name: AddLocalization.r
code: /-- The congruence relation on `M × S`, `M` a `CommMonoid` and `S` a submonoid of `M`, whose
quotient is the localization of `M` at `S`, defined as the unique congruence relation on
`M × S` such that for any other congruence relation `s` on `M × S` where for all `y ∈ S`,
`(1, 1) ∼ (y, y)` under `s`, we have that `(x₁, y₁) ∼ (x₂, y₂)` by `r` implies
`(x₁, y₁) ∼ (x₂, y₂)` by `s`. -/
@[to_additive AddLocalization.r
    "The congruence relation on `M × S`, `M` an `AddCommMonoid` and `S` an `AddSubmonoid` of `M`,
whose quotient is the localization of `M` at `S`, defined as the unique congruence relation on
`M × S` such that for any other congruence relation `s` on `M × S` where for all `y ∈ S`,
`(0, 0) ∼ (y, y)` under `s`, we have that `(x₁, y₁) ∼ (x₂, y₂)` by `r` implies
`(x₁, y₁) ∼ (x₂, y₂)` by `s`."]
def r (S : Submonoid M) : Con (M × S) 
goal: AddCon (M × ↥S)

full_name: Localization.r'
code: /-- An alternate form of the congruence relation on `M × S`, `M` a `CommMonoid` and `S` a
submonoid of `M`, whose quotient is the localization of `M` at `S`. -/
@[to_additive AddLocalization.r'
    "An alternate form of the congruence relation on `M × S`, `M` a `CommMonoid` and `S` a
submonoid of `M`, whose quotient is the localization of `M` at `S`."]
def r' : Con (M × S) 
goal: Con (M × ↥S)

full_name: AddLocalization.r'
code: /-- An alternate form of the congruence relation on `M × S`, `M` a `CommMonoid` and `S` a
submonoid of `M`, whose quotient is the localization of `M` at `S`. -/
@[to_additive AddLocalization.r'
    "An alternate form of the congruence relation on `M × S`, `M` a `CommMonoid` and `S` a
submonoid of `M`, whose quotient is the localization of `M` at `S`."]
def r' : Con (M × S) 
goal: AddCon (M × ↥S)

full_name: AddLocalization.r_eq_r'
code: /-- The congruence relation used to localize a `CommMonoid` at a submonoid can be expressed
equivalently as an infimum (see `Localization.r`) or explicitly
(see `Localization.r'`). -/
@[to_additive AddLocalization.r_eq_r'
    "The additive congruence relation used to localize an `AddCommMonoid` at a submonoid can be
expressed equivalently as an infimum (see `AddLocalization.r`) or explicitly
(see `AddLocalization.r'`)."]
theorem r_eq_r' : r S = r' S 
goal: AddLocalization.r S = AddLocalization.r' S

full_name: Localization.r_eq_r'
code: /-- The congruence relation used to localize a `CommMonoid` at a submonoid can be expressed
equivalently as an infimum (see `Localization.r`) or explicitly
(see `Localization.r'`). -/
@[to_additive AddLocalization.r_eq_r'
    "The additive congruence relation used to localize an `AddCommMonoid` at a submonoid can be
expressed equivalently as an infimum (see `AddLocalization.r`) or explicitly
(see `AddLocalization.r'`)."]
theorem r_eq_r' : r S = r' S 
goal: Localization.r S = Localization.r' S

full_name: Localization.r_iff_exists
code: @[to_additive AddLocalization.r_iff_exists]
theorem r_iff_exists {x y : M × S} : r S x y ↔ ∃ c : S, ↑c * (↑y.2 * x.1) = c * (x.2 * y.1) 
goal: (Localization.r S) x y ↔ ∃ c, ↑c * (↑y.2 * x.1) = ↑c * (↑x.2 * y.1)

full_name: AddLocalization.r_iff_exists
code: @[to_additive AddLocalization.r_iff_exists]
theorem r_iff_exists {x y : M × S} : r S x y ↔ ∃ c : S, ↑c * (↑y.2 * x.1) = c * (x.2 * y.1) 
goal: (AddLocalization.r S) x y ↔ ∃ c, ↑c + (↑y.2 + x.1) = ↑c + (↑x.2 + y.1)

full_name: AddLocalization.r_iff_oreEqv_r
code: @[to_additive AddLocalization.r_iff_oreEqv_r]
theorem r_iff_oreEqv_r {x y : M × S} : r S x y ↔ (OreLocalization.oreEqv S M).r x y 
goal: (AddLocalization.r S) x y ↔ Setoid.r x y

full_name: Localization.r_iff_oreEqv_r
code: @[to_additive AddLocalization.r_iff_oreEqv_r]
theorem r_iff_oreEqv_r {x y : M × S} : r S x y ↔ (OreLocalization.oreEqv S M).r x y 
goal: (Localization.r S) x y ↔ Setoid.r x y

full_name: Localization
code: /-- The localization of a `CommMonoid` at one of its submonoids (as a quotient type). -/
@[to_additive AddLocalization
    "The localization of an `AddCommMonoid` at one of its submonoids (as a quotient type)."]
abbrev Localization 
goal: Type u_1

full_name: AddLocalization
code: /-- The localization of a `CommMonoid` at one of its submonoids (as a quotient type). -/
@[to_additive AddLocalization
    "The localization of an `AddCommMonoid` at one of its submonoids (as a quotient type)."]
abbrev Localization 
goal: Type u_1

full_name: AddLocalization.mk
code: /-- Given a `CommMonoid` `M` and submonoid `S`, `mk` sends `x : M`, `y ∈ S` to the equivalence
class of `(x, y)` in the localization of `M` at `S`. -/
@[to_additive
    "Given an `AddCommMonoid` `M` and submonoid `S`, `mk` sends `x : M`, `y ∈ S` to
the equivalence class of `(x, y)` in the localization of `M` at `S`."]
def mk (x : M) (y : S) : Localization S 
goal: AddLocalization S

full_name: Localization.mk
code: /-- Given a `CommMonoid` `M` and submonoid `S`, `mk` sends `x : M`, `y ∈ S` to the equivalence
class of `(x, y)` in the localization of `M` at `S`. -/
@[to_additive
    "Given an `AddCommMonoid` `M` and submonoid `S`, `mk` sends `x : M`, `y ∈ S` to
the equivalence class of `(x, y)` in the localization of `M` at `S`."]
def mk (x : M) (y : S) : Localization S 
goal: Localization S

full_name: AddLocalization.mk_eq_mk_iff
code: @[to_additive]
theorem mk_eq_mk_iff {a c : M} {b d : S} : mk a b = mk c d ↔ r S ⟨a, b⟩ ⟨c, d⟩ 
goal: AddLocalization.mk a b = AddLocalization.mk c d ↔ (AddLocalization.r S) (a, b) (c, d)

full_name: Localization.mk_eq_mk_iff
code: @[to_additive]
theorem mk_eq_mk_iff {a c : M} {b d : S} : mk a b = mk c d ↔ r S ⟨a, b⟩ ⟨c, d⟩ 
goal: Localization.mk a b = Localization.mk c d ↔ (Localization.r S) (a, b) (c, d)

full_name: Localization.rec
code: /-- Dependent recursion principle for `Localizations`: given elements `f a b : p (mk a b)`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d` (with the correct coercions),
then `f` is defined on the whole `Localization S`. -/
@[to_additive (attr := elab_as_elim)
    "Dependent recursion principle for `AddLocalizations`: given elements `f a b : p (mk a b)`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d` (with the correct coercions),
then `f` is defined on the whole `AddLocalization S`."]
def rec {p : Localization S → Sort u} (f : ∀ (a : M) (b : S), p (mk a b))
    (H : ∀ {a c : M} {b d : S} (h : r S (a, b) (c, d)),
      (Eq.ndrec (f a b) (mk_eq_mk_iff.mpr h) : p (mk c d)) = f c d) (x) : p x 
goal: p x

full_name: AddLocalization.rec
code: /-- Dependent recursion principle for `Localizations`: given elements `f a b : p (mk a b)`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d` (with the correct coercions),
then `f` is defined on the whole `Localization S`. -/
@[to_additive (attr := elab_as_elim)
    "Dependent recursion principle for `AddLocalizations`: given elements `f a b : p (mk a b)`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d` (with the correct coercions),
then `f` is defined on the whole `AddLocalization S`."]
def rec {p : Localization S → Sort u} (f : ∀ (a : M) (b : S), p (mk a b))
    (H : ∀ {a c : M} {b d : S} (h : r S (a, b) (c, d)),
      (Eq.ndrec (f a b) (mk_eq_mk_iff.mpr h) : p (mk c d)) = f c d) (x) : p x 
goal: p x

full_name: Localization.recOnSubsingleton₂
code: /-- Copy of `Quotient.recOnSubsingleton₂` for `Localization` -/
@[to_additive (attr := elab_as_elim) "Copy of `Quotient.recOnSubsingleton₂` for `AddLocalization`"]
def recOnSubsingleton₂ {r : Localization S → Localization S → Sort u}
    [h : ∀ (a c : M) (b d : S), Subsingleton (r (mk a b) (mk c d))] (x y : Localization S)
    (f : ∀ (a c : M) (b d : S), r (mk a b) (mk c d)) : r x y 
goal: r x y

full_name: AddLocalization.recOnSubsingleton₂
code: /-- Copy of `Quotient.recOnSubsingleton₂` for `Localization` -/
@[to_additive (attr := elab_as_elim) "Copy of `Quotient.recOnSubsingleton₂` for `AddLocalization`"]
def recOnSubsingleton₂ {r : Localization S → Localization S → Sort u}
    [h : ∀ (a c : M) (b d : S), Subsingleton (r (mk a b) (mk c d))] (x y : Localization S)
    (f : ∀ (a c : M) (b d : S), r (mk a b) (mk c d)) : r x y 
goal: r x y

full_name: AddLocalization.mk_add
code: @[to_additive]
theorem mk_mul (a c : M) (b d : S) : mk a b * mk c d = mk (a * c) (b * d) 
goal: AddLocalization.mk a b + AddLocalization.mk c d = AddLocalization.mk (a + c) (b + d)

full_name: Localization.mk_mul
code: @[to_additive]
theorem mk_mul (a c : M) (b d : S) : mk a b * mk c d = mk (a * c) (b * d) 
goal: Localization.mk a b * Localization.mk c d = Localization.mk (a * c) (b * d)

full_name: Localization.mk_one
code: @[to_additive]
theorem mk_one : mk 1 (1 : S) = 1 
goal: Localization.mk 1 1 = 1

full_name: AddLocalization.mk_zero
code: @[to_additive]
theorem mk_one : mk 1 (1 : S) = 1 
goal: AddLocalization.mk 0 0 = 0

full_name: AddLocalization.mk_nsmul
code: @[to_additive]
theorem mk_pow (n : ℕ) (a : M) (b : S) : mk a b ^ n = mk (a ^ n) (b ^ n) 
goal: n • AddLocalization.mk a b = AddLocalization.mk (n • a) (n • b)

full_name: Localization.mk_pow
code: @[to_additive]
theorem mk_pow (n : ℕ) (a : M) (b : S) : mk a b ^ n = mk (a ^ n) (b ^ n) 
goal: Localization.mk a b ^ n = Localization.mk (a ^ n) (b ^ n)

full_name: Localization.ndrec_mk
code: @[to_additive (attr := simp)]
theorem ndrec_mk {p : Localization S → Sort u} (f : ∀ (a : M) (b : S), p (mk a b)) (H) (a : M)
    (b : S) : (rec f H (mk a b) : p (mk a b)) = f a b 
goal: Localization.rec f H (Localization.mk a b) = f a b

full_name: AddLocalization.ndrec_mk
code: @[to_additive (attr := simp)]
theorem ndrec_mk {p : Localization S → Sort u} (f : ∀ (a : M) (b : S), p (mk a b)) (H) (a : M)
    (b : S) : (rec f H (mk a b) : p (mk a b)) = f a b 
goal: AddLocalization.rec f H (AddLocalization.mk a b) = f a b

full_name: AddLocalization.liftOn
code: /-- Non-dependent recursion principle for localizations: given elements `f a b : p`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d`,
then `f` is defined on the whole `Localization S`. -/
-- Porting note: the attribute `elab_as_elim` fails with `unexpected eliminator resulting type p`
-- @[to_additive (attr := elab_as_elim)
@[to_additive
    "Non-dependent recursion principle for `AddLocalization`s: given elements `f a b : p`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d`,
then `f` is defined on the whole `Localization S`."]
def liftOn {p : Sort u} (x : Localization S) (f : M → S → p)
    (H : ∀ {a c : M} {b d : S}, r S (a, b) (c, d) → f a b = f c d) : p 
goal: p

full_name: Localization.liftOn
code: /-- Non-dependent recursion principle for localizations: given elements `f a b : p`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d`,
then `f` is defined on the whole `Localization S`. -/
-- Porting note: the attribute `elab_as_elim` fails with `unexpected eliminator resulting type p`
-- @[to_additive (attr := elab_as_elim)
@[to_additive
    "Non-dependent recursion principle for `AddLocalization`s: given elements `f a b : p`
for all `a b`, such that `r S (a, b) (c, d)` implies `f a b = f c d`,
then `f` is defined on the whole `Localization S`."]
def liftOn {p : Sort u} (x : Localization S) (f : M → S → p)
    (H : ∀ {a c : M} {b d : S}, r S (a, b) (c, d) → f a b = f c d) : p 
goal: p

full_name: Localization.liftOn_mk
code: @[to_additive]
theorem liftOn_mk {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn (mk a b) f H = f a b 
goal: (Localization.mk a b).liftOn f H = f a b

full_name: AddLocalization.liftOn_mk
code: @[to_additive]
theorem liftOn_mk {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn (mk a b) f H = f a b 
goal: (AddLocalization.mk a b).liftOn f H = f a b

full_name: Localization.ind
code: @[to_additive (attr := elab_as_elim, induction_eliminator, cases_eliminator)]
theorem ind {p : Localization S → Prop} (H : ∀ y : M × S, p (mk y.1 y.2)) (x) : p x 
goal: p x

full_name: AddLocalization.ind
code: @[to_additive (attr := elab_as_elim, induction_eliminator, cases_eliminator)]
theorem ind {p : Localization S → Prop} (H : ∀ y : M × S, p (mk y.1 y.2)) (x) : p x 
goal: p x

full_name: AddLocalization.induction_on
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on {p : Localization S → Prop} (x) (H : ∀ y : M × S, p (mk y.1 y.2)) : p x 
goal: p x

full_name: Localization.induction_on
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on {p : Localization S → Prop} (x) (H : ∀ y : M × S, p (mk y.1 y.2)) : p x 
goal: p x

full_name: AddLocalization.liftOn₂
code: /-- Non-dependent recursion principle for localizations: given elements `f x y : p`
for all `x` and `y`, such that `r S x x'` and `r S y y'` implies `f x y = f x' y'`,
then `f` is defined on the whole `Localization S`. -/
-- Porting note: the attribute `elab_as_elim` fails with `unexpected eliminator resulting type p`
-- @[to_additive (attr := elab_as_elim)
@[to_additive
    "Non-dependent recursion principle for localizations: given elements `f x y : p`
for all `x` and `y`, such that `r S x x'` and `r S y y'` implies `f x y = f x' y'`,
then `f` is defined on the whole `Localization S`."]
def liftOn₂ {p : Sort u} (x y : Localization S) (f : M → S → M → S → p)
    (H : ∀ {a a' b b' c c' d d'}, r S (a, b) (a', b') → r S (c, d) (c', d') →
      f a b c d = f a' b' c' d') : p 
goal: p

full_name: Localization.liftOn₂
code: /-- Non-dependent recursion principle for localizations: given elements `f x y : p`
for all `x` and `y`, such that `r S x x'` and `r S y y'` implies `f x y = f x' y'`,
then `f` is defined on the whole `Localization S`. -/
-- Porting note: the attribute `elab_as_elim` fails with `unexpected eliminator resulting type p`
-- @[to_additive (attr := elab_as_elim)
@[to_additive
    "Non-dependent recursion principle for localizations: given elements `f x y : p`
for all `x` and `y`, such that `r S x x'` and `r S y y'` implies `f x y = f x' y'`,
then `f` is defined on the whole `Localization S`."]
def liftOn₂ {p : Sort u} (x y : Localization S) (f : M → S → M → S → p)
    (H : ∀ {a a' b b' c c' d d'}, r S (a, b) (a', b') → r S (c, d) (c', d') →
      f a b c d = f a' b' c' d') : p 
goal: p

full_name: Localization.liftOn₂_mk
code: @[to_additive]
theorem liftOn₂_mk {p : Sort*} (f : M → S → M → S → p) (H) (a c : M) (b d : S) :
    liftOn₂ (mk a b) (mk c d) f H = f a b c d 
goal: (Localization.mk a b).liftOn₂ (Localization.mk c d) f H = f a b c d

full_name: AddLocalization.liftOn₂_mk
code: @[to_additive]
theorem liftOn₂_mk {p : Sort*} (f : M → S → M → S → p) (H) (a c : M) (b d : S) :
    liftOn₂ (mk a b) (mk c d) f H = f a b c d 
goal: (AddLocalization.mk a b).liftOn₂ (AddLocalization.mk c d) f H = f a b c d

full_name: AddLocalization.induction_on₂
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on₂ {p : Localization S → Localization S → Prop} (x y)
    (H : ∀ x y : M × S, p (mk x.1 x.2) (mk y.1 y.2)) : p x y 
goal: p x y

full_name: Localization.induction_on₂
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on₂ {p : Localization S → Localization S → Prop} (x y)
    (H : ∀ x y : M × S, p (mk x.1 x.2) (mk y.1 y.2)) : p x y 
goal: p x y

full_name: Localization.induction_on₃
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on₃ {p : Localization S → Localization S → Localization S → Prop} (x y z)
    (H : ∀ x y z : M × S, p (mk x.1 x.2) (mk y.1 y.2) (mk z.1 z.2)) : p x y z 
goal: p x y z

full_name: AddLocalization.induction_on₃
code: @[to_additive (attr := elab_as_elim)]
theorem induction_on₃ {p : Localization S → Localization S → Localization S → Prop} (x y z)
    (H : ∀ x y z : M × S, p (mk x.1 x.2) (mk y.1 y.2) (mk z.1 z.2)) : p x y z 
goal: p x y z

full_name: Localization.one_rel
code: @[to_additive]
theorem one_rel (y : S) : r S 1 (y, y) 
goal: (Localization.r S) 1 (↑y, y)

full_name: AddLocalization.zero_rel
code: @[to_additive]
theorem one_rel (y : S) : r S 1 (y, y) 
goal: (AddLocalization.r S) 0 (↑y, y)

full_name: Localization.r_of_eq
code: @[to_additive]
theorem r_of_eq {x y : M × S} (h : ↑y.2 * x.1 = ↑x.2 * y.1) : r S x y 
goal: (Localization.r S) x y

full_name: AddLocalization.r_of_eq
code: @[to_additive]
theorem r_of_eq {x y : M × S} (h : ↑y.2 * x.1 = ↑x.2 * y.1) : r S x y 
goal: (AddLocalization.r S) x y

full_name: Localization.mk_self
code: @[to_additive]
theorem mk_self (a : S) : mk (a : M) a = 1 
goal: Localization.mk (↑a) a = 1

full_name: AddLocalization.mk_self
code: @[to_additive]
theorem mk_self (a : S) : mk (a : M) a = 1 
goal: AddLocalization.mk (↑a) a = 0

full_name: Localization.smul_mk
code: theorem smul_mk [SMul R M] [IsScalarTower R M M] (c : R) (a b) :
    c • (mk a b : Localization S) = mk (c • a) b 
goal: c • Localization.mk a b = Localization.mk (c • a) b

full_name: Localization.instSMulCommClassOfIsScalarTower
code: instance {R M : Type*} [CommMonoid M] [SMul R M] [IsScalarTower R M M] : SMulCommClass R M M 
goal: SMulCommClass R M M

full_name: MonoidHom.toLocalizationMap
code: /-- Makes a localization map from a `CommMonoid` hom satisfying the characteristic predicate. -/
@[to_additive
    "Makes a localization map from an `AddCommMonoid` hom satisfying the characteristic predicate."]
def toLocalizationMap (f : M →* N) (H1 : ∀ y : S, IsUnit (f y))
    (H2 : ∀ z, ∃ x : M × S, z * f x.2 = f x.1) (H3 : ∀ x y, f x = f y → ∃ c : S, ↑c * x = ↑c * y) :
    Submonoid.LocalizationMap S N 
goal: S.LocalizationMap N

full_name: AddMonoidHom.toLocalizationMap
code: /-- Makes a localization map from a `CommMonoid` hom satisfying the characteristic predicate. -/
@[to_additive
    "Makes a localization map from an `AddCommMonoid` hom satisfying the characteristic predicate."]
def toLocalizationMap (f : M →* N) (H1 : ∀ y : S, IsUnit (f y))
    (H2 : ∀ z, ∃ x : M × S, z * f x.2 = f x.1) (H3 : ∀ x y, f x = f y → ∃ c : S, ↑c * x = ↑c * y) :
    Submonoid.LocalizationMap S N 
goal: S.LocalizationMap N

full_name: AddSubmonoid.LocalizationMap.toMap
code: /-- Short for `toMonoidHom`; used to apply a localization map as a function. -/
@[to_additive "Short for `toAddMonoidHom`; used to apply a localization map as a function."]
abbrev toMap (f : LocalizationMap S N) 
goal: M →+ N

full_name: Submonoid.LocalizationMap.toMap
code: /-- Short for `toMonoidHom`; used to apply a localization map as a function. -/
@[to_additive "Short for `toAddMonoidHom`; used to apply a localization map as a function."]
abbrev toMap (f : LocalizationMap S N) 
goal: M →* N

full_name: Submonoid.LocalizationMap.ext
code: @[to_additive (attr := ext)]
theorem ext {f g : LocalizationMap S N} (h : ∀ x, f.toMap x = g.toMap x) : f = g 
goal: f = g

full_name: AddSubmonoid.LocalizationMap.ext
code: @[to_additive (attr := ext)]
theorem ext {f g : LocalizationMap S N} (h : ∀ x, f.toMap x = g.toMap x) : f = g 
goal: f = g

full_name: AddSubmonoid.LocalizationMap.ext_iff
code: @[to_additive]
protected theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x 
goal: f = g ↔ ∀ (x : M), f.toMap x = g.toMap x

full_name: Submonoid.LocalizationMap.ext_iff
code: @[to_additive]
protected theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x 
goal: f = g ↔ ∀ (x : M), f.toMap x = g.toMap x

full_name: AddSubmonoid.LocalizationMap.toMap_injective
code: @[to_additive]
theorem toMap_injective : Function.Injective (@LocalizationMap.toMap _ _ S N _) 
goal: Function.Injective AddSubmonoid.LocalizationMap.toMap

full_name: Submonoid.LocalizationMap.toMap_injective
code: @[to_additive]
theorem toMap_injective : Function.Injective (@LocalizationMap.toMap _ _ S N _) 
goal: Function.Injective Submonoid.LocalizationMap.toMap

full_name: AddSubmonoid.LocalizationMap.map_addUnits
code: @[to_additive]
theorem map_units (f : LocalizationMap S N) (y : S) : IsUnit (f.toMap y) 
goal: IsAddUnit (f.toMap ↑y)

full_name: Submonoid.LocalizationMap.map_units
code: @[to_additive]
theorem map_units (f : LocalizationMap S N) (y : S) : IsUnit (f.toMap y) 
goal: IsUnit (f.toMap ↑y)

full_name: AddSubmonoid.LocalizationMap.surj
code: @[to_additive]
theorem surj (f : LocalizationMap S N) (z : N) : ∃ x : M × S, z * f.toMap x.2 = f.toMap x.1 
goal: ∃ x, z + f.toMap ↑x.2 = f.toMap x.1

full_name: Submonoid.LocalizationMap.surj
code: @[to_additive]
theorem surj (f : LocalizationMap S N) (z : N) : ∃ x : M × S, z * f.toMap x.2 = f.toMap x.1 
goal: ∃ x, z * f.toMap ↑x.2 = f.toMap x.1

full_name: AddSubmonoid.LocalizationMap.surj₂
code: /-- Given a localization map `f : M →* N`, and `z w : N`, there exist `z' w' : M` and `d : S`
such that `f z' / f d = z` and `f w' / f d = w`. -/
@[to_additive
    "Given a localization map `f : M →+ N`, and `z w : N`, there exist `z' w' : M` and `d : S`
such that `f z' - f d = z` and `f w' - f d = w`."]
theorem surj₂ (f : LocalizationMap S N) (z w : N) : ∃ z' w' : M, ∃ d : S,
    (z * f.toMap d = f.toMap z') ∧  (w * f.toMap d = f.toMap w') 
goal: ∃ z' w' d, z + f.toMap ↑d = f.toMap z' ∧ w + f.toMap ↑d = f.toMap w'

full_name: Submonoid.LocalizationMap.surj₂
code: /-- Given a localization map `f : M →* N`, and `z w : N`, there exist `z' w' : M` and `d : S`
such that `f z' / f d = z` and `f w' / f d = w`. -/
@[to_additive
    "Given a localization map `f : M →+ N`, and `z w : N`, there exist `z' w' : M` and `d : S`
such that `f z' - f d = z` and `f w' - f d = w`."]
theorem surj₂ (f : LocalizationMap S N) (z w : N) : ∃ z' w' : M, ∃ d : S,
    (z * f.toMap d = f.toMap z') ∧  (w * f.toMap d = f.toMap w') 
goal: ∃ z' w' d, z * f.toMap ↑d = f.toMap z' ∧ w * f.toMap ↑d = f.toMap w'

full_name: AddSubmonoid.LocalizationMap.eq_iff_exists
code: @[to_additive]
theorem eq_iff_exists (f : LocalizationMap S N) {x y} :
    f.toMap x = f.toMap y ↔ ∃ c : S, ↑c * x = c * y 
goal: f.toMap x = f.toMap y ↔ ∃ c, ↑c + x = ↑c + y

full_name: Submonoid.LocalizationMap.eq_iff_exists
code: @[to_additive]
theorem eq_iff_exists (f : LocalizationMap S N) {x y} :
    f.toMap x = f.toMap y ↔ ∃ c : S, ↑c * x = c * y 
goal: f.toMap x = f.toMap y ↔ ∃ c, ↑c * x = ↑c * y

full_name: Submonoid.LocalizationMap.sec
code: /-- Given a localization map `f : M →* N`, a section function sending `z : N` to some
`(x, y) : M × S` such that `f x * (f y)⁻¹ = z`. -/
@[to_additive
    "Given a localization map `f : M →+ N`, a section function sending `z : N`
to some `(x, y) : M × S` such that `f x - f y = z`."]
noncomputable def sec (f : LocalizationMap S N) (z : N) : M × S 
goal: M × ↥S

full_name: AddSubmonoid.LocalizationMap.sec
code: /-- Given a localization map `f : M →* N`, a section function sending `z : N` to some
`(x, y) : M × S` such that `f x * (f y)⁻¹ = z`. -/
@[to_additive
    "Given a localization map `f : M →+ N`, a section function sending `z : N`
to some `(x, y) : M × S` such that `f x - f y = z`."]
noncomputable def sec (f : LocalizationMap S N) (z : N) : M × S 
goal: M × ↥S

full_name: AddSubmonoid.LocalizationMap.sec_spec
code: @[to_additive]
theorem sec_spec {f : LocalizationMap S N} (z : N) :
    z * f.toMap (f.sec z).2 = f.toMap (f.sec z).1 
goal: z + f.toMap ↑(f.sec z).2 = f.toMap (f.sec z).1

full_name: Submonoid.LocalizationMap.sec_spec
code: @[to_additive]
theorem sec_spec {f : LocalizationMap S N} (z : N) :
    z * f.toMap (f.sec z).2 = f.toMap (f.sec z).1 
goal: z * f.toMap ↑(f.sec z).2 = f.toMap (f.sec z).1

full_name: Submonoid.LocalizationMap.sec_spec'
code: @[to_additive]
theorem sec_spec' {f : LocalizationMap S N} (z : N) :
    f.toMap (f.sec z).1 = f.toMap (f.sec z).2 * z 
goal: f.toMap (f.sec z).1 = f.toMap ↑(f.sec z).2 * z

full_name: AddSubmonoid.LocalizationMap.sec_spec'
code: @[to_additive]
theorem sec_spec' {f : LocalizationMap S N} (z : N) :
    f.toMap (f.sec z).1 = f.toMap (f.sec z).2 * z 
goal: f.toMap (f.sec z).1 = f.toMap ↑(f.sec z).2 + z

full_name: AddSubmonoid.LocalizationMap.add_neg_left
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`w, z : N` and `y ∈ S`, we have `w * (f y)⁻¹ = z ↔ w = f y * z`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `w, z : N` and `y ∈ S`, we have `w - f y = z ↔ w = f y + z`."]
theorem mul_inv_left {f : M →* N} (h : ∀ y : S, IsUnit (f y)) (y : S) (w z : N) :
    w * (IsUnit.liftRight (f.restrict S) h y)⁻¹ = z ↔ w = f y * z 
goal: w + ↑(-(IsAddUnit.liftRight (f.restrict S) h) y) = z ↔ w = f ↑y + z

full_name: Submonoid.LocalizationMap.mul_inv_left
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`w, z : N` and `y ∈ S`, we have `w * (f y)⁻¹ = z ↔ w = f y * z`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `w, z : N` and `y ∈ S`, we have `w - f y = z ↔ w = f y + z`."]
theorem mul_inv_left {f : M →* N} (h : ∀ y : S, IsUnit (f y)) (y : S) (w z : N) :
    w * (IsUnit.liftRight (f.restrict S) h y)⁻¹ = z ↔ w = f y * z 
goal: w * ↑((IsUnit.liftRight (f.restrict S) h) y)⁻¹ = z ↔ w = f ↑y * z

full_name: AddSubmonoid.LocalizationMap.add_neg_right
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`w, z : N` and `y ∈ S`, we have `z = w * (f y)⁻¹ ↔ z * f y = w`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `w, z : N` and `y ∈ S`, we have `z = w - f y ↔ z + f y = w`."]
theorem mul_inv_right {f : M →* N} (h : ∀ y : S, IsUnit (f y)) (y : S) (w z : N) :
    z = w * (IsUnit.liftRight (f.restrict S) h y)⁻¹ ↔ z * f y = w 
goal: z = w + ↑(-(IsAddUnit.liftRight (f.restrict S) h) y) ↔ z + f ↑y = w

full_name: Submonoid.LocalizationMap.mul_inv_right
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`w, z : N` and `y ∈ S`, we have `z = w * (f y)⁻¹ ↔ z * f y = w`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `w, z : N` and `y ∈ S`, we have `z = w - f y ↔ z + f y = w`."]
theorem mul_inv_right {f : M →* N} (h : ∀ y : S, IsUnit (f y)) (y : S) (w z : N) :
    z = w * (IsUnit.liftRight (f.restrict S) h y)⁻¹ ↔ z * f y = w 
goal: z = w * ↑((IsUnit.liftRight (f.restrict S) h) y)⁻¹ ↔ z * f ↑y = w

full_name: Submonoid.LocalizationMap.mul_inv
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ Nˣ`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ * (f y₁)⁻¹ = f x₂ * (f y₂)⁻¹ ↔ f (x₁ * y₂) = f (x₂ * y₁)`. -/
@[to_additive (attr := simp)
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ - f y₁ = f x₂ - f y₂ ↔ f (x₁ + y₂) = f (x₂ + y₁)`."]
theorem mul_inv {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {x₁ x₂} {y₁ y₂ : S} :
    f x₁ * (IsUnit.liftRight (f.restrict S) h y₁)⁻¹ =
        f x₂ * (IsUnit.liftRight (f.restrict S) h y₂)⁻¹ ↔
      f (x₁ * y₂) = f (x₂ * y₁) 
goal: f x₁ * ↑((IsUnit.liftRight (f.restrict S) h) y₁)⁻¹ = f x₂ * ↑((IsUnit.liftRight (f.restrict S) h) y₂)⁻¹ ↔
  f (x₁ * ↑y₂) = f (x₂ * ↑y₁)

full_name: AddSubmonoid.LocalizationMap.add_neg
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ Nˣ`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ * (f y₁)⁻¹ = f x₂ * (f y₂)⁻¹ ↔ f (x₁ * y₂) = f (x₂ * y₁)`. -/
@[to_additive (attr := simp)
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ - f y₁ = f x₂ - f y₂ ↔ f (x₁ + y₂) = f (x₂ + y₁)`."]
theorem mul_inv {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {x₁ x₂} {y₁ y₂ : S} :
    f x₁ * (IsUnit.liftRight (f.restrict S) h y₁)⁻¹ =
        f x₂ * (IsUnit.liftRight (f.restrict S) h y₂)⁻¹ ↔
      f (x₁ * y₂) = f (x₂ * y₁) 
goal: f x₁ + ↑(-(IsAddUnit.liftRight (f.restrict S) h) y₁) = f x₂ + ↑(-(IsAddUnit.liftRight (f.restrict S) h) y₂) ↔
  f (x₁ + ↑y₂) = f (x₂ + ↑y₁)

full_name: Submonoid.LocalizationMap.inv_inj
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y, z ∈ S`, we have `(f y)⁻¹ = (f z)⁻¹ → f y = f z`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y, z ∈ S`, we have `- (f y) = - (f z) → f y = f z`."]
theorem inv_inj {f : M →* N} (hf : ∀ y : S, IsUnit (f y)) {y z : S}
    (h : (IsUnit.liftRight (f.restrict S) hf y)⁻¹ = (IsUnit.liftRight (f.restrict S) hf z)⁻¹) :
      f y = f z 
goal: f ↑y = f ↑z

full_name: AddSubmonoid.LocalizationMap.neg_inj
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y, z ∈ S`, we have `(f y)⁻¹ = (f z)⁻¹ → f y = f z`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y, z ∈ S`, we have `- (f y) = - (f z) → f y = f z`."]
theorem inv_inj {f : M →* N} (hf : ∀ y : S, IsUnit (f y)) {y z : S}
    (h : (IsUnit.liftRight (f.restrict S) hf y)⁻¹ = (IsUnit.liftRight (f.restrict S) hf z)⁻¹) :
      f y = f z 
goal: f ↑y = f ↑z

full_name: AddSubmonoid.LocalizationMap.neg_unique
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y ∈ S`, `(f y)⁻¹` is unique. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y ∈ S`, `- (f y)` is unique."]
theorem inv_unique {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {y : S} {z : N} (H : f y * z = 1) :
    (IsUnit.liftRight (f.restrict S) h y)⁻¹ = z 
goal: ↑(-(IsAddUnit.liftRight (f.restrict S) h) y) = z

full_name: Submonoid.LocalizationMap.inv_unique
code: /-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y ∈ S`, `(f y)⁻¹` is unique. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y ∈ S`, `- (f y)` is unique."]
theorem inv_unique {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {y : S} {z : N} (H : f y * z = 1) :
    (IsUnit.liftRight (f.restrict S) h y)⁻¹ = z 
goal: ↑((IsUnit.liftRight (f.restrict S) h) y)⁻¹ = z

full_name: AddSubmonoid.LocalizationMap.map_right_cancel
code: @[to_additive]
theorem map_right_cancel {x y} {c : S} (h : f.toMap (c * x) = f.toMap (c * y)) :
    f.toMap x = f.toMap y 
goal: f.toMap x = f.toMap y

full_name: Submonoid.LocalizationMap.map_right_cancel
code: @[to_additive]
theorem map_right_cancel {x y} {c : S} (h : f.toMap (c * x) = f.toMap (c * y)) :
    f.toMap x = f.toMap y 
goal: f.toMap x = f.toMap y

full_name: AddSubmonoid.LocalizationMap.map_left_cancel
code: @[to_additive]
theorem map_left_cancel {x y} {c : S} (h : f.toMap (x * c) = f.toMap (y * c)) :
    f.toMap x = f.toMap y 
goal: f.toMap x = f.toMap y

full_name: Submonoid.LocalizationMap.map_left_cancel
code: @[to_additive]
theorem map_left_cancel {x y} {c : S} (h : f.toMap (x * c) = f.toMap (y * c)) :
    f.toMap x = f.toMap y 
goal: f.toMap x = f.toMap y

full_name: Submonoid.LocalizationMap.mk'
code: /-- Given a localization map `f : M →* N`, the surjection sending `(x, y) : M × S` to
`f x * (f y)⁻¹`. -/
@[to_additive
      "Given a localization map `f : M →+ N`, the surjection sending `(x, y) : M × S`
to `f x - f y`."]
noncomputable def mk' (f : LocalizationMap S N) (x : M) (y : S) : N 
goal: N

full_name: AddSubmonoid.LocalizationMap.mk'
code: /-- Given a localization map `f : M →* N`, the surjection sending `(x, y) : M × S` to
`f x * (f y)⁻¹`. -/
@[to_additive
      "Given a localization map `f : M →+ N`, the surjection sending `(x, y) : M × S`
to `f x - f y`."]
noncomputable def mk' (f : LocalizationMap S N) (x : M) (y : S) : N 
goal: N

full_name: Submonoid.LocalizationMap.mk'_mul
code: @[to_additive]
theorem mk'_mul (x₁ x₂ : M) (y₁ y₂ : S) : f.mk' (x₁ * x₂) (y₁ * y₂) = f.mk' x₁ y₁ * f.mk' x₂ y₂ 
goal: f.mk' (x₁ * x₂) (y₁ * y₂) = f.mk' x₁ y₁ * f.mk' x₂ y₂

full_name: AddSubmonoid.LocalizationMap.mk'_add
code: @[to_additive]
theorem mk'_mul (x₁ x₂ : M) (y₁ y₂ : S) : f.mk' (x₁ * x₂) (y₁ * y₂) = f.mk' x₁ y₁ * f.mk' x₂ y₂ 
goal: f.mk' (x₁ + x₂) (y₁ + y₂) = f.mk' x₁ y₁ + f.mk' x₂ y₂

full_name: AddSubmonoid.LocalizationMap.mk'_zero
code: @[to_additive]
theorem mk'_one (x) : f.mk' x (1 : S) = f.toMap x 
goal: f.mk' x 0 = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_one
code: @[to_additive]
theorem mk'_one (x) : f.mk' x (1 : S) = f.toMap x 
goal: f.mk' x 1 = f.toMap x

full_name: AddSubmonoid.LocalizationMap.mk'_sec
code: /-- Given a localization map `f : M →* N` for a submonoid `S ⊆ M`, for all `z : N` we have that if
`x : M, y ∈ S` are such that `z * f y = f x`, then `f x * (f y)⁻¹ = z`. -/
@[to_additive (attr := simp)
    "Given a localization map `f : M →+ N` for a Submonoid `S ⊆ M`, for all `z : N`
we have that if `x : M, y ∈ S` are such that `z + f y = f x`, then `f x - f y = z`."]
theorem mk'_sec (z : N) : f.mk' (f.sec z).1 (f.sec z).2 = z 
goal: f.mk' (f.sec z).1 (f.sec z).2 = z

full_name: Submonoid.LocalizationMap.mk'_sec
code: /-- Given a localization map `f : M →* N` for a submonoid `S ⊆ M`, for all `z : N` we have that if
`x : M, y ∈ S` are such that `z * f y = f x`, then `f x * (f y)⁻¹ = z`. -/
@[to_additive (attr := simp)
    "Given a localization map `f : M →+ N` for a Submonoid `S ⊆ M`, for all `z : N`
we have that if `x : M, y ∈ S` are such that `z + f y = f x`, then `f x - f y = z`."]
theorem mk'_sec (z : N) : f.mk' (f.sec z).1 (f.sec z).2 = z 
goal: f.mk' (f.sec z).1 (f.sec z).2 = z

full_name: AddSubmonoid.LocalizationMap.mk'_surjective
code: @[to_additive]
theorem mk'_surjective (z : N) : ∃ (x : _) (y : S), f.mk' x y = z 
goal: ∃ x y, f.mk' x y = z

full_name: Submonoid.LocalizationMap.mk'_surjective
code: @[to_additive]
theorem mk'_surjective (z : N) : ∃ (x : _) (y : S), f.mk' x y = z 
goal: ∃ x y, f.mk' x y = z

full_name: AddSubmonoid.LocalizationMap.mk'_spec
code: @[to_additive]
theorem mk'_spec (x) (y : S) : f.mk' x y * f.toMap y = f.toMap x 
goal: f.mk' x y + f.toMap ↑y = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_spec
code: @[to_additive]
theorem mk'_spec (x) (y : S) : f.mk' x y * f.toMap y = f.toMap x 
goal: f.mk' x y * f.toMap ↑y = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_spec'
code: @[to_additive]
theorem mk'_spec' (x) (y : S) : f.toMap y * f.mk' x y = f.toMap x 
goal: f.toMap ↑y * f.mk' x y = f.toMap x

full_name: AddSubmonoid.LocalizationMap.mk'_spec'
code: @[to_additive]
theorem mk'_spec' (x) (y : S) : f.toMap y * f.mk' x y = f.toMap x 
goal: f.toMap ↑y + f.mk' x y = f.toMap x

full_name: Submonoid.LocalizationMap.eq_mk'_iff_mul_eq
code: @[to_additive]
theorem eq_mk'_iff_mul_eq {x} {y : S} {z} : z = f.mk' x y ↔ z * f.toMap y = f.toMap x 
goal: z = f.mk' x y ↔ z * f.toMap ↑y = f.toMap x

full_name: AddSubmonoid.LocalizationMap.eq_mk'_iff_add_eq
code: @[to_additive]
theorem eq_mk'_iff_mul_eq {x} {y : S} {z} : z = f.mk' x y ↔ z * f.toMap y = f.toMap x 
goal: z = f.mk' x y ↔ z + f.toMap ↑y = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_eq_iff_eq_mul
code: @[to_additive]
theorem mk'_eq_iff_eq_mul {x} {y : S} {z} : f.mk' x y = z ↔ f.toMap x = z * f.toMap y 
goal: f.mk' x y = z ↔ f.toMap x = z * f.toMap ↑y

full_name: AddSubmonoid.LocalizationMap.mk'_eq_iff_eq_add
code: @[to_additive]
theorem mk'_eq_iff_eq_mul {x} {y : S} {z} : f.mk' x y = z ↔ f.toMap x = z * f.toMap y 
goal: f.mk' x y = z ↔ f.toMap x = z + f.toMap ↑y

full_name: AddSubmonoid.LocalizationMap.mk'_eq_iff_eq
code: @[to_additive]
theorem mk'_eq_iff_eq {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (y₂ * x₁) = f.toMap (y₁ * x₂) 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (↑y₂ + x₁) = f.toMap (↑y₁ + x₂)

full_name: Submonoid.LocalizationMap.mk'_eq_iff_eq
code: @[to_additive]
theorem mk'_eq_iff_eq {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (y₂ * x₁) = f.toMap (y₁ * x₂) 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (↑y₂ * x₁) = f.toMap (↑y₁ * x₂)

full_name: Submonoid.LocalizationMap.mk'_eq_iff_eq'
code: @[to_additive]
theorem mk'_eq_iff_eq' {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ * y₂) = f.toMap (x₂ * y₁) 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ * ↑y₂) = f.toMap (x₂ * ↑y₁)

full_name: AddSubmonoid.LocalizationMap.mk'_eq_iff_eq'
code: @[to_additive]
theorem mk'_eq_iff_eq' {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ * y₂) = f.toMap (x₂ * y₁) 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ + ↑y₂) = f.toMap (x₂ + ↑y₁)

full_name: Submonoid.LocalizationMap.eq
code: @[to_additive]
protected theorem eq {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c : S, ↑c * (↑b₂ * a₁) = c * (a₂ * b₁) 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c, ↑c * (↑b₂ * a₁) = ↑c * (↑a₂ * b₁)

full_name: AddSubmonoid.LocalizationMap.eq
code: @[to_additive]
protected theorem eq {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c : S, ↑c * (↑b₂ * a₁) = c * (a₂ * b₁) 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c, ↑c + (↑b₂ + a₁) = ↑c + (↑a₂ + b₁)

full_name: AddSubmonoid.LocalizationMap.eq'
code: @[to_additive]
protected theorem eq' {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ Localization.r S (a₁, a₂) (b₁, b₂) 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ (AddLocalization.r S) (a₁, a₂) (b₁, b₂)

full_name: Submonoid.LocalizationMap.eq'
code: @[to_additive]
protected theorem eq' {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ Localization.r S (a₁, a₂) (b₁, b₂) 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ (Localization.r S) (a₁, a₂) (b₁, b₂)

full_name: Submonoid.LocalizationMap.eq_iff_eq
code: @[to_additive]
theorem eq_iff_eq (g : LocalizationMap S P) {x y} : f.toMap x = f.toMap y ↔ g.toMap x = g.toMap y 
goal: f.toMap x = f.toMap y ↔ g.toMap x = g.toMap y

full_name: AddSubmonoid.LocalizationMap.eq_iff_eq
code: @[to_additive]
theorem eq_iff_eq (g : LocalizationMap S P) {x y} : f.toMap x = f.toMap y ↔ g.toMap x = g.toMap y 
goal: f.toMap x = f.toMap y ↔ g.toMap x = g.toMap y

full_name: AddSubmonoid.LocalizationMap.mk'_eq_iff_mk'_eq
code: @[to_additive]
theorem mk'_eq_iff_mk'_eq (g : LocalizationMap S P) {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ g.mk' x₁ y₁ = g.mk' x₂ y₂ 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ g.mk' x₁ y₁ = g.mk' x₂ y₂

full_name: Submonoid.LocalizationMap.mk'_eq_iff_mk'_eq
code: @[to_additive]
theorem mk'_eq_iff_mk'_eq (g : LocalizationMap S P) {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ g.mk' x₁ y₁ = g.mk' x₂ y₂ 
goal: f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ g.mk' x₁ y₁ = g.mk' x₂ y₂

full_name: AddSubmonoid.LocalizationMap.exists_of_sec_mk'
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, for all `x₁ : M` and `y₁ ∈ S`,
if `x₂ : M, y₂ ∈ S` are such that `f x₁ * (f y₁)⁻¹ * f y₂ = f x₂`, then there exists `c ∈ S`
such that `x₁ * y₂ * c = x₂ * y₁ * c`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, for all `x₁ : M`
and `y₁ ∈ S`, if `x₂ : M, y₂ ∈ S` are such that `(f x₁ - f y₁) + f y₂ = f x₂`, then there exists
`c ∈ S` such that `x₁ + y₂ + c = x₂ + y₁ + c`."]
theorem exists_of_sec_mk' (x) (y : S) :
    ∃ c : S, ↑c * (↑(f.sec <| f.mk' x y).2 * x) = c * (y * (f.sec <| f.mk' x y).1) 
goal: ∃ c, ↑c + (↑(f.sec (f.mk' x y)).2 + x) = ↑c + (↑y + (f.sec (f.mk' x y)).1)

full_name: Submonoid.LocalizationMap.exists_of_sec_mk'
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, for all `x₁ : M` and `y₁ ∈ S`,
if `x₂ : M, y₂ ∈ S` are such that `f x₁ * (f y₁)⁻¹ * f y₂ = f x₂`, then there exists `c ∈ S`
such that `x₁ * y₂ * c = x₂ * y₁ * c`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, for all `x₁ : M`
and `y₁ ∈ S`, if `x₂ : M, y₂ ∈ S` are such that `(f x₁ - f y₁) + f y₂ = f x₂`, then there exists
`c ∈ S` such that `x₁ + y₂ + c = x₂ + y₁ + c`."]
theorem exists_of_sec_mk' (x) (y : S) :
    ∃ c : S, ↑c * (↑(f.sec <| f.mk' x y).2 * x) = c * (y * (f.sec <| f.mk' x y).1) 
goal: ∃ c, ↑c * (↑(f.sec (f.mk' x y)).2 * x) = ↑c * (↑y * (f.sec (f.mk' x y)).1)

full_name: AddSubmonoid.LocalizationMap.mk'_eq_of_eq
code: @[to_additive]
theorem mk'_eq_of_eq {a₁ b₁ : M} {a₂ b₂ : S} (H : ↑a₂ * b₁ = ↑b₂ * a₁) :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂

full_name: Submonoid.LocalizationMap.mk'_eq_of_eq
code: @[to_additive]
theorem mk'_eq_of_eq {a₁ b₁ : M} {a₂ b₂ : S} (H : ↑a₂ * b₁ = ↑b₂ * a₁) :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂

full_name: AddSubmonoid.LocalizationMap.mk'_eq_of_eq'
code: @[to_additive]
theorem mk'_eq_of_eq' {a₁ b₁ : M} {a₂ b₂ : S} (H : b₁ * ↑a₂ = a₁ * ↑b₂) :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂

full_name: Submonoid.LocalizationMap.mk'_eq_of_eq'
code: @[to_additive]
theorem mk'_eq_of_eq' {a₁ b₁ : M} {a₂ b₂ : S} (H : b₁ * ↑a₂ = a₁ * ↑b₂) :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ 
goal: f.mk' a₁ a₂ = f.mk' b₁ b₂

full_name: AddSubmonoid.LocalizationMap.mk'_cancel
code: @[to_additive]
theorem mk'_cancel (a : M) (b c : S) :
    f.mk' (a * c) (b * c) = f.mk' a b 
goal: f.mk' (a + ↑c) (b + c) = f.mk' a b

full_name: Submonoid.LocalizationMap.mk'_cancel
code: @[to_additive]
theorem mk'_cancel (a : M) (b c : S) :
    f.mk' (a * c) (b * c) = f.mk' a b 
goal: f.mk' (a * ↑c) (b * c) = f.mk' a b

full_name: Submonoid.LocalizationMap.mk'_eq_of_same
code: @[to_additive]
theorem mk'_eq_of_same {a b} {d : S} :
    f.mk' a d = f.mk' b d ↔ ∃ c : S, c * a = c * b 
goal: f.mk' a d = f.mk' b d ↔ ∃ c, ↑c * a = ↑c * b

full_name: AddSubmonoid.LocalizationMap.mk'_eq_of_same
code: @[to_additive]
theorem mk'_eq_of_same {a b} {d : S} :
    f.mk' a d = f.mk' b d ↔ ∃ c : S, c * a = c * b 
goal: f.mk' a d = f.mk' b d ↔ ∃ c, ↑c + a = ↑c + b

full_name: Submonoid.LocalizationMap.mk'_self'
code: @[to_additive (attr := simp)]
theorem mk'_self' (y : S) : f.mk' (y : M) y = 1 
goal: f.mk' (↑y) y = 1

full_name: AddSubmonoid.LocalizationMap.mk'_self'
code: @[to_additive (attr := simp)]
theorem mk'_self' (y : S) : f.mk' (y : M) y = 1 
goal: f.mk' (↑y) y = 0

full_name: AddSubmonoid.LocalizationMap.mk'_self
code: @[to_additive (attr := simp)]
theorem mk'_self (x) (H : x ∈ S) : f.mk' x ⟨x, H⟩ = 1 
goal: f.mk' x ⟨x, H⟩ = 0

full_name: Submonoid.LocalizationMap.mk'_self
code: @[to_additive (attr := simp)]
theorem mk'_self (x) (H : x ∈ S) : f.mk' x ⟨x, H⟩ = 1 
goal: f.mk' x ⟨x, H⟩ = 1

full_name: Submonoid.LocalizationMap.mul_mk'_eq_mk'_of_mul
code: @[to_additive]
theorem mul_mk'_eq_mk'_of_mul (x₁ x₂) (y : S) : f.toMap x₁ * f.mk' x₂ y = f.mk' (x₁ * x₂) y 
goal: f.toMap x₁ * f.mk' x₂ y = f.mk' (x₁ * x₂) y

full_name: AddSubmonoid.LocalizationMap.add_mk'_eq_mk'_of_add
code: @[to_additive]
theorem mul_mk'_eq_mk'_of_mul (x₁ x₂) (y : S) : f.toMap x₁ * f.mk' x₂ y = f.mk' (x₁ * x₂) y 
goal: f.toMap x₁ + f.mk' x₂ y = f.mk' (x₁ + x₂) y

full_name: Submonoid.LocalizationMap.mk'_mul_eq_mk'_of_mul
code: @[to_additive]
theorem mk'_mul_eq_mk'_of_mul (x₁ x₂) (y : S) : f.mk' x₂ y * f.toMap x₁ = f.mk' (x₁ * x₂) y 
goal: f.mk' x₂ y * f.toMap x₁ = f.mk' (x₁ * x₂) y

full_name: AddSubmonoid.LocalizationMap.mk'_add_eq_mk'_of_add
code: @[to_additive]
theorem mk'_mul_eq_mk'_of_mul (x₁ x₂) (y : S) : f.mk' x₂ y * f.toMap x₁ = f.mk' (x₁ * x₂) y 
goal: f.mk' x₂ y + f.toMap x₁ = f.mk' (x₁ + x₂) y

full_name: AddSubmonoid.LocalizationMap.add_mk'_zero_eq_mk'
code: @[to_additive]
theorem mul_mk'_one_eq_mk' (x) (y : S) : f.toMap x * f.mk' 1 y = f.mk' x y 
goal: f.toMap x + f.mk' 0 y = f.mk' x y

full_name: Submonoid.LocalizationMap.mul_mk'_one_eq_mk'
code: @[to_additive]
theorem mul_mk'_one_eq_mk' (x) (y : S) : f.toMap x * f.mk' 1 y = f.mk' x y 
goal: f.toMap x * f.mk' 1 y = f.mk' x y

full_name: AddSubmonoid.LocalizationMap.mk'_add_cancel_right
code: @[to_additive (attr := simp)]
theorem mk'_mul_cancel_right (x : M) (y : S) : f.mk' (x * y) y = f.toMap x 
goal: f.mk' (x + ↑y) y = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_mul_cancel_right
code: @[to_additive (attr := simp)]
theorem mk'_mul_cancel_right (x : M) (y : S) : f.mk' (x * y) y = f.toMap x 
goal: f.mk' (x * ↑y) y = f.toMap x

full_name: Submonoid.LocalizationMap.mk'_mul_cancel_left
code: @[to_additive]
theorem mk'_mul_cancel_left (x) (y : S) : f.mk' ((y : M) * x) y = f.toMap x 
goal: f.mk' (↑y * x) y = f.toMap x

full_name: AddSubmonoid.LocalizationMap.mk'_add_cancel_left
code: @[to_additive]
theorem mk'_mul_cancel_left (x) (y : S) : f.mk' ((y : M) * x) y = f.toMap x 
goal: f.mk' (↑y + x) y = f.toMap x

full_name: AddSubmonoid.LocalizationMap.isAddUnit_comp
code: @[to_additive]
theorem isUnit_comp (j : N →* P) (y : S) : IsUnit (j.comp f.toMap y) 
goal: IsAddUnit ((j.comp f.toMap) ↑y)

full_name: Submonoid.LocalizationMap.isUnit_comp
code: @[to_additive]
theorem isUnit_comp (j : N →* P) (y : S) : IsUnit (j.comp f.toMap y) 
goal: IsUnit ((j.comp f.toMap) ↑y)

full_name: Submonoid.LocalizationMap.eq_of_eq
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g(S) ⊆ Units P`, `f x = f y → g x = g y` for all `x y : M`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g(S) ⊆ AddUnits P`, `f x = f y → g x = g y`
for all `x y : M`."]
theorem eq_of_eq (hg : ∀ y : S, IsUnit (g y)) {x y} (h : f.toMap x = f.toMap y) : g x = g y 
goal: g x = g y

full_name: AddSubmonoid.LocalizationMap.eq_of_eq
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g(S) ⊆ Units P`, `f x = f y → g x = g y` for all `x y : M`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g(S) ⊆ AddUnits P`, `f x = f y → g x = g y`
for all `x y : M`."]
theorem eq_of_eq (hg : ∀ y : S, IsUnit (g y)) {x y} (h : f.toMap x = f.toMap y) : g x = g y 
goal: g x = g y

full_name: Submonoid.LocalizationMap.comp_eq_of_eq
code: /-- Given `CommMonoid`s `M, P`, Localization maps `f : M →* N, k : P →* Q` for Submonoids
`S, T` respectively, and `g : M →* P` such that `g(S) ⊆ T`, `f x = f y` implies
`k (g x) = k (g y)`. -/
@[to_additive
    "Given `AddCommMonoid`s `M, P`, Localization maps `f : M →+ N, k : P →+ Q` for Submonoids
`S, T` respectively, and `g : M →+ P` such that `g(S) ⊆ T`, `f x = f y`
implies `k (g x) = k (g y)`."]
theorem comp_eq_of_eq {T : Submonoid P} {Q : Type*} [CommMonoid Q] (hg : ∀ y : S, g y ∈ T)
    (k : LocalizationMap T Q) {x y} (h : f.toMap x = f.toMap y) : k.toMap (g x) = k.toMap (g y) 
goal: k.toMap (g x) = k.toMap (g y)

full_name: AddSubmonoid.LocalizationMap.comp_eq_of_eq
code: /-- Given `CommMonoid`s `M, P`, Localization maps `f : M →* N, k : P →* Q` for Submonoids
`S, T` respectively, and `g : M →* P` such that `g(S) ⊆ T`, `f x = f y` implies
`k (g x) = k (g y)`. -/
@[to_additive
    "Given `AddCommMonoid`s `M, P`, Localization maps `f : M →+ N, k : P →+ Q` for Submonoids
`S, T` respectively, and `g : M →+ P` such that `g(S) ⊆ T`, `f x = f y`
implies `k (g x) = k (g y)`."]
theorem comp_eq_of_eq {T : Submonoid P} {Q : Type*} [CommMonoid Q] (hg : ∀ y : S, g y ∈ T)
    (k : LocalizationMap T Q) {x y} (h : f.toMap x = f.toMap y) : k.toMap (g x) = k.toMap (g y) 
goal: k.toMap (g x) = k.toMap (g y)

full_name: AddSubmonoid.LocalizationMap.lift
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g y` is invertible for all `y : S`, the homomorphism induced from
`N` to `P` sending `z : N` to `g x * (g y)⁻¹`, where `(x, y) : M × S` are such that
`z = f x * (f y)⁻¹`. -/
@[to_additive
    "Given a localization map `f : M →+ N` for a submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g y` is invertible for all `y : S`, the homomorphism
induced from `N` to `P` sending `z : N` to `g x - g y`, where `(x, y) : M × S` are such that
`z = f x - f y`."]
noncomputable def lift : N →* P 
goal: N →+ P

full_name: Submonoid.LocalizationMap.lift
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g y` is invertible for all `y : S`, the homomorphism induced from
`N` to `P` sending `z : N` to `g x * (g y)⁻¹`, where `(x, y) : M × S` are such that
`z = f x * (f y)⁻¹`. -/
@[to_additive
    "Given a localization map `f : M →+ N` for a submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g y` is invertible for all `y : S`, the homomorphism
induced from `N` to `P` sending `z : N` to `g x - g y`, where `(x, y) : M × S` are such that
`z = f x - f y`."]
noncomputable def lift : N →* P 
goal: N →* P

full_name: Submonoid.LocalizationMap.lift_mk'
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g y` is invertible for all `y : S`, the homomorphism induced from
`N` to `P` maps `f x * (f y)⁻¹` to `g x * (g y)⁻¹` for all `x : M, y ∈ S`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g y` is invertible for all `y : S`, the homomorphism
induced from `N` to `P` maps `f x - f y` to `g x - g y` for all `x : M, y ∈ S`."]
theorem lift_mk' (x y) : f.lift hg (f.mk' x y) = g x * (IsUnit.liftRight (g.restrict S) hg y)⁻¹ 
goal: (f.lift hg) (f.mk' x y) = g x * ↑((IsUnit.liftRight (g.restrict S) hg) y)⁻¹

full_name: AddSubmonoid.LocalizationMap.lift_mk'
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g y` is invertible for all `y : S`, the homomorphism induced from
`N` to `P` maps `f x * (f y)⁻¹` to `g x * (g y)⁻¹` for all `x : M, y ∈ S`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g y` is invertible for all `y : S`, the homomorphism
induced from `N` to `P` maps `f x - f y` to `g x - g y` for all `x : M, y ∈ S`."]
theorem lift_mk' (x y) : f.lift hg (f.mk' x y) = g x * (IsUnit.liftRight (g.restrict S) hg y)⁻¹ 
goal: (f.lift hg) (f.mk' x y) = g x + ↑(-(IsAddUnit.liftRight (g.restrict S) hg) y)

full_name: AddSubmonoid.LocalizationMap.lift_spec
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v : P`, we have
`f.lift hg z = v ↔ g x = g y * v`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an
`AddCommMonoid` map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v : P`, we have `f.lift hg z = v ↔ g x = g y + v`, where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem lift_spec (z v) : f.lift hg z = v ↔ g (f.sec z).1 = g (f.sec z).2 * v 
goal: (f.lift hg) z = v ↔ g (f.sec z).1 = g ↑(f.sec z).2 + v

full_name: Submonoid.LocalizationMap.lift_spec
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v : P`, we have
`f.lift hg z = v ↔ g x = g y * v`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an
`AddCommMonoid` map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v : P`, we have `f.lift hg z = v ↔ g x = g y + v`, where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem lift_spec (z v) : f.lift hg z = v ↔ g (f.sec z).1 = g (f.sec z).2 * v 
goal: (f.lift hg) z = v ↔ g (f.sec z).1 = g ↑(f.sec z).2 * v

full_name: AddSubmonoid.LocalizationMap.lift_spec_add
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v w : P`, we have
`f.lift hg z * w = v ↔ g x * w = g y * v`, where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid` map
`g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v w : P`, we have `f.lift hg z + w = v ↔ g x + w = g y + v`, where `x : M, y ∈ S` are such
that `z + f y = f x`."]
theorem lift_spec_mul (z w v) : f.lift hg z * w = v ↔ g (f.sec z).1 * w = g (f.sec z).2 * v 
goal: (f.lift hg) z + w = v ↔ g (f.sec z).1 + w = g ↑(f.sec z).2 + v

full_name: Submonoid.LocalizationMap.lift_spec_mul
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v w : P`, we have
`f.lift hg z * w = v ↔ g x * w = g y * v`, where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid` map
`g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v w : P`, we have `f.lift hg z + w = v ↔ g x + w = g y + v`, where `x : M, y ∈ S` are such
that `z + f y = f x`."]
theorem lift_spec_mul (z w v) : f.lift hg z * w = v ↔ g (f.sec z).1 * w = g (f.sec z).2 * v 
goal: (f.lift hg) z * w = v ↔ g (f.sec z).1 * w = g ↑(f.sec z).2 * v

full_name: Submonoid.LocalizationMap.lift_mk'_spec
code: @[to_additive]
theorem lift_mk'_spec (x v) (y : S) : f.lift hg (f.mk' x y) = v ↔ g x = g y * v 
goal: (f.lift hg) (f.mk' x y) = v ↔ g x = g ↑y * v

full_name: AddSubmonoid.LocalizationMap.lift_mk'_spec
code: @[to_additive]
theorem lift_mk'_spec (x v) (y : S) : f.lift hg (f.mk' x y) = v ↔ g x = g y * v 
goal: (f.lift hg) (f.mk' x y) = v ↔ g x = g ↑y + v

full_name: Submonoid.LocalizationMap.lift_mul_right
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`f.lift hg z * g y = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid`
map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`f.lift hg z + g y = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_right (z) : f.lift hg z * g (f.sec z).2 = g (f.sec z).1 
goal: (f.lift hg) z * g ↑(f.sec z).2 = g (f.sec z).1

full_name: AddSubmonoid.LocalizationMap.lift_add_right
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`f.lift hg z * g y = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid`
map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`f.lift hg z + g y = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_right (z) : f.lift hg z * g (f.sec z).2 = g (f.sec z).1 
goal: (f.lift hg) z + g ↑(f.sec z).2 = g (f.sec z).1

full_name: AddSubmonoid.LocalizationMap.lift_add_left
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`g y * f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid` map
`g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`g y + f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_left (z) : g (f.sec z).2 * f.lift hg z = g (f.sec z).1 
goal: g ↑(f.sec z).2 + (f.lift hg) z = g (f.sec z).1

full_name: Submonoid.LocalizationMap.lift_mul_left
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`g y * f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid` map
`g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`g y + f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_left (z) : g (f.sec z).2 * f.lift hg z = g (f.sec z).1 
goal: g ↑(f.sec z).2 * (f.lift hg) z = g (f.sec z).1

full_name: Submonoid.LocalizationMap.lift_eq
code: @[to_additive (attr := simp)]
theorem lift_eq (x : M) : f.lift hg (f.toMap x) = g x 
goal: (f.lift hg) (f.toMap x) = g x

full_name: AddSubmonoid.LocalizationMap.lift_eq
code: @[to_additive (attr := simp)]
theorem lift_eq (x : M) : f.lift hg (f.toMap x) = g x 
goal: (f.lift hg) (f.toMap x) = g x

full_name: AddSubmonoid.LocalizationMap.lift_eq_iff
code: @[to_additive]
theorem lift_eq_iff {x y : M × S} :
    f.lift hg (f.mk' x.1 x.2) = f.lift hg (f.mk' y.1 y.2) ↔ g (x.1 * y.2) = g (y.1 * x.2) 
goal: (f.lift hg) (f.mk' x.1 x.2) = (f.lift hg) (f.mk' y.1 y.2) ↔ g (x.1 + ↑y.2) = g (y.1 + ↑x.2)

full_name: Submonoid.LocalizationMap.lift_eq_iff
code: @[to_additive]
theorem lift_eq_iff {x y : M × S} :
    f.lift hg (f.mk' x.1 x.2) = f.lift hg (f.mk' y.1 y.2) ↔ g (x.1 * y.2) = g (y.1 * x.2) 
goal: (f.lift hg) (f.mk' x.1 x.2) = (f.lift hg) (f.mk' y.1 y.2) ↔ g (x.1 * ↑y.2) = g (y.1 * ↑x.2)

full_name: Submonoid.LocalizationMap.lift_comp
code: @[to_additive (attr := simp)]
theorem lift_comp : (f.lift hg).comp f.toMap = g 
goal: (f.lift hg).comp f.toMap = g

full_name: AddSubmonoid.LocalizationMap.lift_comp
code: @[to_additive (attr := simp)]
theorem lift_comp : (f.lift hg).comp f.toMap = g 
goal: (f.lift hg).comp f.toMap = g

full_name: AddSubmonoid.LocalizationMap.lift_of_comp
code: @[to_additive (attr := simp)]
theorem lift_of_comp (j : N →* P) : f.lift (f.isUnit_comp j) = j 
goal: f.lift ⋯ = j

full_name: Submonoid.LocalizationMap.lift_of_comp
code: @[to_additive (attr := simp)]
theorem lift_of_comp (j : N →* P) : f.lift (f.isUnit_comp j) = j 
goal: f.lift ⋯ = j

full_name: AddSubmonoid.LocalizationMap.epic_of_localizationMap
code: @[to_additive]
theorem epic_of_localizationMap {j k : N →* P} (h : ∀ a, j.comp f.toMap a = k.comp f.toMap a) :
    j = k 
goal: j = k

full_name: Submonoid.LocalizationMap.epic_of_localizationMap
code: @[to_additive]
theorem epic_of_localizationMap {j k : N →* P} (h : ∀ a, j.comp f.toMap a = k.comp f.toMap a) :
    j = k 
goal: j = k

full_name: AddSubmonoid.LocalizationMap.lift_unique
code: @[to_additive]
theorem lift_unique {j : N →* P} (hj : ∀ x, j (f.toMap x) = g x) : f.lift hg = j 
goal: f.lift hg = j

full_name: Submonoid.LocalizationMap.lift_unique
code: @[to_additive]
theorem lift_unique {j : N →* P} (hj : ∀ x, j (f.toMap x) = g x) : f.lift hg = j 
goal: f.lift hg = j

full_name: AddSubmonoid.LocalizationMap.lift_id
code: @[to_additive (attr := simp)]
theorem lift_id (x) : f.lift f.map_units x = x 
goal: (f.lift ⋯) x = x

full_name: Submonoid.LocalizationMap.lift_id
code: @[to_additive (attr := simp)]
theorem lift_id (x) : f.lift f.map_units x = x 
goal: (f.lift ⋯) x = x

full_name: AddSubmonoid.LocalizationMap.lift_comp_lift
code: /-- Given Localization maps `f : M →* N` for a Submonoid `S ⊆ M` and
`k : M →* Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →* A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the  induced map `f.lift` for `l`. -/
@[to_additive
    "Given Localization maps `f : M →+ N` for a Submonoid `S ⊆ M` and
`k : M →+ Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →+ A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the  induced map `f.lift` for `l`"]
theorem lift_comp_lift {T : Submonoid M} (hST : S ≤ T) {Q : Type*} [CommMonoid Q]
    (k : LocalizationMap T Q) {A : Type*} [CommMonoid A] {l : M →* A}
    (hl : ∀ w : T, IsUnit (l w)) :
    (k.lift hl).comp (f.lift (map_units k ⟨_, hST ·.2⟩)) =
    f.lift (hl ⟨_, hST ·.2⟩) 
goal: (k.lift hl).comp (f.lift ⋯) = f.lift ⋯

full_name: Submonoid.LocalizationMap.lift_comp_lift
code: /-- Given Localization maps `f : M →* N` for a Submonoid `S ⊆ M` and
`k : M →* Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →* A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the  induced map `f.lift` for `l`. -/
@[to_additive
    "Given Localization maps `f : M →+ N` for a Submonoid `S ⊆ M` and
`k : M →+ Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →+ A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the  induced map `f.lift` for `l`"]
theorem lift_comp_lift {T : Submonoid M} (hST : S ≤ T) {Q : Type*} [CommMonoid Q]
    (k : LocalizationMap T Q) {A : Type*} [CommMonoid A] {l : M →* A}
    (hl : ∀ w : T, IsUnit (l w)) :
    (k.lift hl).comp (f.lift (map_units k ⟨_, hST ·.2⟩)) =
    f.lift (hl ⟨_, hST ·.2⟩) 
goal: (k.lift hl).comp (f.lift ⋯) = f.lift ⋯

full_name: Submonoid.LocalizationMap.lift_comp_lift_eq
code: @[to_additive]
theorem lift_comp_lift_eq {Q : Type*} [CommMonoid Q] (k : LocalizationMap S Q)
    {A : Type*} [CommMonoid A] {l : M →* A} (hl : ∀ w : S, IsUnit (l w)) :
    (k.lift hl).comp (f.lift k.map_units) = f.lift hl 
goal: (k.lift hl).comp (f.lift ⋯) = f.lift hl

full_name: AddSubmonoid.LocalizationMap.lift_comp_lift_eq
code: @[to_additive]
theorem lift_comp_lift_eq {Q : Type*} [CommMonoid Q] (k : LocalizationMap S Q)
    {A : Type*} [CommMonoid A] {l : M →* A} (hl : ∀ w : S, IsUnit (l w)) :
    (k.lift hl).comp (f.lift k.map_units) = f.lift hl 
goal: (k.lift hl).comp (f.lift ⋯) = f.lift hl

full_name: Submonoid.LocalizationMap.lift_left_inverse
code: /-- Given two Localization maps `f : M →* N, k : M →* P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`. -/
@[to_additive (attr := simp)
    "Given two Localization maps `f : M →+ N, k : M →+ P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`."]
theorem lift_left_inverse {k : LocalizationMap S P} (z : N) :
    k.lift f.map_units (f.lift k.map_units z) = z 
goal: (k.lift ⋯) ((f.lift ⋯) z) = z

full_name: AddSubmonoid.LocalizationMap.lift_left_inverse
code: /-- Given two Localization maps `f : M →* N, k : M →* P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`. -/
@[to_additive (attr := simp)
    "Given two Localization maps `f : M →+ N, k : M →+ P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`."]
theorem lift_left_inverse {k : LocalizationMap S P} (z : N) :
    k.lift f.map_units (f.lift k.map_units z) = z 
goal: (k.lift ⋯) ((f.lift ⋯) z) = z

full_name: AddSubmonoid.LocalizationMap.lift_surjective_iff
code: @[to_additive]
theorem lift_surjective_iff :
    Function.Surjective (f.lift hg) ↔ ∀ v : P, ∃ x : M × S, v * g x.2 = g x.1 
goal: Function.Surjective ⇑(f.lift hg) ↔ ∀ (v : P), ∃ x, v + g ↑x.2 = g x.1

full_name: Submonoid.LocalizationMap.lift_surjective_iff
code: @[to_additive]
theorem lift_surjective_iff :
    Function.Surjective (f.lift hg) ↔ ∀ v : P, ∃ x : M × S, v * g x.2 = g x.1 
goal: Function.Surjective ⇑(f.lift hg) ↔ ∀ (v : P), ∃ x, v * g ↑x.2 = g x.1

full_name: AddSubmonoid.LocalizationMap.lift_injective_iff
code: @[to_additive]
theorem lift_injective_iff :
    Function.Injective (f.lift hg) ↔ ∀ x y, f.toMap x = f.toMap y ↔ g x = g y 
goal: Function.Injective ⇑(f.lift hg) ↔ ∀ (x y : M), f.toMap x = f.toMap y ↔ g x = g y

full_name: Submonoid.LocalizationMap.lift_injective_iff
code: @[to_additive]
theorem lift_injective_iff :
    Function.Injective (f.lift hg) ↔ ∀ x y, f.toMap x = f.toMap y ↔ g x = g y 
goal: Function.Injective ⇑(f.lift hg) ↔ ∀ (x y : M), f.toMap x = f.toMap y ↔ g x = g y

full_name: AddSubmonoid.LocalizationMap.map
code: /-- Given a `CommMonoid` homomorphism `g : M →* P` where for Submonoids `S ⊆ M, T ⊆ P` we have
`g(S) ⊆ T`, the induced Monoid homomorphism from the Localization of `M` at `S` to the
Localization of `P` at `T`: if `f : M →* N` and `k : P →* Q` are Localization maps for `S` and
`T` respectively, we send `z : N` to `k (g x) * (k (g y))⁻¹`, where `(x, y) : M × S` are such
that `z = f x * (f y)⁻¹`. -/
@[to_additive
    "Given an `AddCommMonoid` homomorphism `g : M →+ P` where for Submonoids `S ⊆ M, T ⊆ P` we have
`g(S) ⊆ T`, the induced AddMonoid homomorphism from the Localization of `M` at `S` to the
Localization of `P` at `T`: if `f : M →+ N` and `k : P →+ Q` are Localization maps for `S` and
`T` respectively, we send `z : N` to `k (g x) - k (g y)`, where `(x, y) : M × S` are such
that `z = f x - f y`."]
noncomputable def map : N →* Q 
goal: N →+ Q

full_name: Submonoid.LocalizationMap.map
code: /-- Given a `CommMonoid` homomorphism `g : M →* P` where for Submonoids `S ⊆ M, T ⊆ P` we have
`g(S) ⊆ T`, the induced Monoid homomorphism from the Localization of `M` at `S` to the
Localization of `P` at `T`: if `f : M →* N` and `k : P →* Q` are Localization maps for `S` and
`T` respectively, we send `z : N` to `k (g x) * (k (g y))⁻¹`, where `(x, y) : M × S` are such
that `z = f x * (f y)⁻¹`. -/
@[to_additive
    "Given an `AddCommMonoid` homomorphism `g : M →+ P` where for Submonoids `S ⊆ M, T ⊆ P` we have
`g(S) ⊆ T`, the induced AddMonoid homomorphism from the Localization of `M` at `S` to the
Localization of `P` at `T`: if `f : M →+ N` and `k : P →+ Q` are Localization maps for `S` and
`T` respectively, we send `z : N` to `k (g x) - k (g y)`, where `(x, y) : M × S` are such
that `z = f x - f y`."]
noncomputable def map : N →* Q 
goal: N →* Q

full_name: AddSubmonoid.LocalizationMap.map_eq
code: @[to_additive]
theorem map_eq (x) : f.map hy k (f.toMap x) = k.toMap (g x) 
goal: (f.map hy k) (f.toMap x) = k.toMap (g x)

full_name: Submonoid.LocalizationMap.map_eq
code: @[to_additive]
theorem map_eq (x) : f.map hy k (f.toMap x) = k.toMap (g x) 
goal: (f.map hy k) (f.toMap x) = k.toMap (g x)

full_name: AddSubmonoid.LocalizationMap.map_comp
code: @[to_additive (attr := simp)]
theorem map_comp : (f.map hy k).comp f.toMap = k.toMap.comp g 
goal: (f.map hy k).comp f.toMap = k.toMap.comp g

full_name: Submonoid.LocalizationMap.map_comp
code: @[to_additive (attr := simp)]
theorem map_comp : (f.map hy k).comp f.toMap = k.toMap.comp g 
goal: (f.map hy k).comp f.toMap = k.toMap.comp g

full_name: Submonoid.LocalizationMap.map_mk'
code: @[to_additive]
theorem map_mk' (x) (y : S) : f.map hy k (f.mk' x y) = k.mk' (g x) ⟨g y, hy y⟩ 
goal: (f.map hy k) (f.mk' x y) = k.mk' (g x) ⟨g ↑y, ⋯⟩

full_name: AddSubmonoid.LocalizationMap.map_mk'
code: @[to_additive]
theorem map_mk' (x) (y : S) : f.map hy k (f.mk' x y) = k.mk' (g x) ⟨g y, hy y⟩ 
goal: (f.map hy k) (f.mk' x y) = k.mk' (g x) ⟨g ↑y, ⋯⟩

full_name: Submonoid.LocalizationMap.map_spec
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) * u` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) + u` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_spec (z u) : f.map hy k z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g (f.sec z).2) * u 
goal: (f.map hy k) z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g ↑(f.sec z).2) * u

full_name: AddSubmonoid.LocalizationMap.map_spec
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) * u` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) + u` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_spec (z u) : f.map hy k z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g (f.sec z).2) * u 
goal: (f.map hy k) z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g ↑(f.sec z).2) + u

full_name: AddSubmonoid.LocalizationMap.map_add_right
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `f.map hy k z * k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `f.map hy k z + k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_right (z) : f.map hy k z * k.toMap (g (f.sec z).2) = k.toMap (g (f.sec z).1) 
goal: (f.map hy k) z + k.toMap (g ↑(f.sec z).2) = k.toMap (g (f.sec z).1)

full_name: Submonoid.LocalizationMap.map_mul_right
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `f.map hy k z * k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `f.map hy k z + k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_right (z) : f.map hy k z * k.toMap (g (f.sec z).2) = k.toMap (g (f.sec z).1) 
goal: (f.map hy k) z * k.toMap (g ↑(f.sec z).2) = k.toMap (g (f.sec z).1)

full_name: AddSubmonoid.LocalizationMap.map_add_left
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `k (g y) * f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `k (g y) + f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_left (z) : k.toMap (g (f.sec z).2) * f.map hy k z = k.toMap (g (f.sec z).1) 
goal: k.toMap (g ↑(f.sec z).2) + (f.map hy k) z = k.toMap (g (f.sec z).1)

full_name: Submonoid.LocalizationMap.map_mul_left
code: /-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `k (g y) * f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `k (g y) + f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_left (z) : k.toMap (g (f.sec z).2) * f.map hy k z = k.toMap (g (f.sec z).1) 
goal: k.toMap (g ↑(f.sec z).2) * (f.map hy k) z = k.toMap (g (f.sec z).1)

full_name: AddSubmonoid.LocalizationMap.map_id
code: @[to_additive (attr := simp)]
theorem map_id (z : N) : f.map (fun y ↦ show MonoidHom.id M y ∈ S from y.2) f z = z 
goal: (f.map ⋯ f) z = z

full_name: Submonoid.LocalizationMap.map_id
code: @[to_additive (attr := simp)]
theorem map_id (z : N) : f.map (fun y ↦ show MonoidHom.id M y ∈ S from y.2) f z = z 
goal: (f.map ⋯ f) z = z

full_name: Submonoid.LocalizationMap.map_comp_map
code: /-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_comp_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) :
    (k.map hl j).comp (f.map hy k) =
    f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j 
goal: (k.map hl j).comp (f.map hy k) = f.map ⋯ j

full_name: AddSubmonoid.LocalizationMap.map_comp_map
code: /-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_comp_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) :
    (k.map hl j).comp (f.map hy k) =
    f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j 
goal: (k.map hl j).comp (f.map hy k) = f.map ⋯ j

full_name: Submonoid.LocalizationMap.map_map
code: /-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) (x) :
    k.map hl j (f.map hy k x) = f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j x 
goal: (k.map hl j) ((f.map hy k) x) = (f.map ⋯ j) x

full_name: AddSubmonoid.LocalizationMap.map_map
code: /-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) (x) :
    k.map hl j (f.map hy k x) = f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j x 
goal: (k.map hl j) ((f.map hy k) x) = (f.map ⋯ j) x

full_name: AddSubmonoid.LocalizationMap.map_injective_of_injective
code: /-- Given an injective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is injective.
-/
@[to_additive "Given an injective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is injective. "]
theorem map_injective_of_injective (hg : Injective g) (k : LocalizationMap (S.map g) Q) :
    Injective (map f (apply_coe_mem_map g S) k) 
goal: Function.Injective ⇑(f.map ⋯ k)

full_name: Submonoid.LocalizationMap.map_injective_of_injective
code: /-- Given an injective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is injective.
-/
@[to_additive "Given an injective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is injective. "]
theorem map_injective_of_injective (hg : Injective g) (k : LocalizationMap (S.map g) Q) :
    Injective (map f (apply_coe_mem_map g S) k) 
goal: Function.Injective ⇑(f.map ⋯ k)

full_name: AddSubmonoid.LocalizationMap.map_surjective_of_surjective
code: /-- Given a surjective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is surjective.
-/
@[to_additive "Given a surjective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is surjective. "]
theorem map_surjective_of_surjective (hg : Surjective g) (k : LocalizationMap (S.map g) Q) :
    Surjective (map f (apply_coe_mem_map g S) k) 
goal: Function.Surjective ⇑(f.map ⋯ k)

full_name: Submonoid.LocalizationMap.map_surjective_of_surjective
code: /-- Given a surjective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is surjective.
-/
@[to_additive "Given a surjective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is surjective. "]
theorem map_surjective_of_surjective (hg : Surjective g) (k : LocalizationMap (S.map g) Q) :
    Surjective (map f (apply_coe_mem_map g S) k) 
goal: Function.Surjective ⇑(f.map ⋯ k)

full_name: Submonoid.LocalizationMap.AwayMap
code: /-- Given `x : M`, the type of `CommMonoid` homomorphisms `f : M →* N` such that `N`
is isomorphic to the Localization of `M` at the Submonoid generated by `x`. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the type of `AddCommMonoid` homomorphisms `f : M →+ N` such that `N`
is isomorphic to the localization of `M` at the AddSubmonoid generated by `x`."]
def AwayMap (N' : Type*) [CommMonoid N'] 
goal: Type (max u_1 u_5)

full_name: AddSubmonoid.LocalizationMap.AwayMap
code: /-- Given `x : M`, the type of `CommMonoid` homomorphisms `f : M →* N` such that `N`
is isomorphic to the Localization of `M` at the Submonoid generated by `x`. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the type of `AddCommMonoid` homomorphisms `f : M →+ N` such that `N`
is isomorphic to the localization of `M` at the AddSubmonoid generated by `x`."]
def AwayMap (N' : Type*) [CommMonoid N'] 
goal: Type (max u_1 u_5)

full_name: Submonoid.LocalizationMap.AwayMap.invSelf
code: /-- Given `x : M` and a Localization map `F : M →* N` away from `x`, `invSelf` is `(F x)⁻¹`. -/
noncomputable def AwayMap.invSelf : N 
goal: N

full_name: Submonoid.LocalizationMap.AwayMap.lift
code: /-- Given `x : M`, a Localization map `F : M →* N` away from `x`, and a map of `CommMonoid`s
`g : M →* P` such that `g x` is invertible, the homomorphism induced from `N` to `P` sending
`z : N` to `g y * (g x)⁻ⁿ`, where `y : M, n : ℕ` are such that `z = F y * (F x)⁻ⁿ`. -/
noncomputable def AwayMap.lift (hg : IsUnit (g x)) : N →* P 
goal: N →* P

full_name: Submonoid.LocalizationMap.AwayMap.lift_eq
code: @[simp]
theorem AwayMap.lift_eq (hg : IsUnit (g x)) (a : M) : F.lift x hg (F.toMap a) = g a 
goal: (Submonoid.LocalizationMap.AwayMap.lift x F hg) ((Submonoid.LocalizationMap.toMap F) a) = g a

full_name: Submonoid.LocalizationMap.AwayMap.lift_comp
code: @[simp]
theorem AwayMap.lift_comp (hg : IsUnit (g x)) : (F.lift x hg).comp F.toMap = g 
goal: (Submonoid.LocalizationMap.AwayMap.lift x F hg).comp (Submonoid.LocalizationMap.toMap F) = g

full_name: Submonoid.LocalizationMap.awayToAwayRight
code: /-- Given `x y : M` and Localization maps `F : M →* N, G : M →* P` away from `x` and `x * y`
respectively, the homomorphism induced from `N` to `P`. -/
noncomputable def awayToAwayRight (y : M) (G : AwayMap (x * y) P) : N →* P 
goal: N →* P

full_name: AddSubmonoid.LocalizationMap.AwayMap.negSelf
code: /-- Given `x : A` and a Localization map `F : A →+ B` away from `x`, `neg_self` is `- (F x)`. -/
noncomputable def AwayMap.negSelf : B 
goal: B

full_name: AddSubmonoid.LocalizationMap.AwayMap.lift
code: /-- Given `x : A`, a localization map `F : A →+ B` away from `x`, and a map of `AddCommMonoid`s
`g : A →+ C` such that `g x` is invertible, the homomorphism induced from `B` to `C` sending
`z : B` to `g y - n • g x`, where `y : A, n : ℕ` are such that `z = F y - n • F x`. -/
noncomputable def AwayMap.lift (hg : IsAddUnit (g x)) : B →+ C 
goal: B →+ C

full_name: AddSubmonoid.LocalizationMap.AwayMap.lift_eq
code: @[simp]
theorem AwayMap.lift_eq (hg : IsAddUnit (g x)) (a : A) : F.lift x hg (F.toMap a) = g a 
goal: (AddSubmonoid.LocalizationMap.AwayMap.lift x F hg) ((AddSubmonoid.LocalizationMap.toMap F) a) = g a

full_name: AddSubmonoid.LocalizationMap.AwayMap.lift_comp
code: @[simp]
theorem AwayMap.lift_comp (hg : IsAddUnit (g x)) : (F.lift x hg).comp F.toMap = g 
goal: (AddSubmonoid.LocalizationMap.AwayMap.lift x F hg).comp (AddSubmonoid.LocalizationMap.toMap F) = g

full_name: AddSubmonoid.LocalizationMap.awayToAwayRight
code: /-- Given `x y : A` and Localization maps `F : A →+ B, G : A →+ C` away from `x` and `x + y`
respectively, the homomorphism induced from `B` to `C`. -/
noncomputable def awayToAwayRight (y : A) (G : AwayMap (x + y) C) : B →+ C 
goal: B →+ C

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations
code: /-- If `f : M →* N` and `k : M →* P` are Localization maps for a Submonoid `S`, we get an
isomorphism of `N` and `P`. -/
@[to_additive
    "If `f : M →+ N` and `k : M →+ R` are Localization maps for an AddSubmonoid `S`, we get an
isomorphism of `N` and `R`."]
noncomputable def mulEquivOfLocalizations (k : LocalizationMap S P) : N ≃* P 
goal: N ≃+ P

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations
code: /-- If `f : M →* N` and `k : M →* P` are Localization maps for a Submonoid `S`, we get an
isomorphism of `N` and `P`. -/
@[to_additive
    "If `f : M →+ N` and `k : M →+ R` are Localization maps for an AddSubmonoid `S`, we get an
isomorphism of `N` and `R`."]
noncomputable def mulEquivOfLocalizations (k : LocalizationMap S P) : N ≃* P 
goal: N ≃* P

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_apply {k : LocalizationMap S P} {x} :
    f.mulEquivOfLocalizations k x = f.lift k.map_units x 
goal: (f.mulEquivOfLocalizations k) x = (f.lift ⋯) x

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_apply {k : LocalizationMap S P} {x} :
    f.mulEquivOfLocalizations k x = f.lift k.map_units x 
goal: (f.addEquivOfLocalizations k) x = (f.lift ⋯) x

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_symm_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_symm_apply {k : LocalizationMap S P} {x} :
    (f.mulEquivOfLocalizations k).symm x = k.lift f.map_units x 
goal: (f.mulEquivOfLocalizations k).symm x = (k.lift ⋯) x

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_symm_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_symm_apply {k : LocalizationMap S P} {x} :
    (f.mulEquivOfLocalizations k).symm x = k.lift f.map_units x 
goal: (f.addEquivOfLocalizations k).symm x = (k.lift ⋯) x

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_symm_eq_addEquivOfLocalizations
code: @[to_additive]
theorem mulEquivOfLocalizations_symm_eq_mulEquivOfLocalizations {k : LocalizationMap S P} :
    (k.mulEquivOfLocalizations f).symm = f.mulEquivOfLocalizations k 
goal: (k.addEquivOfLocalizations f).symm = f.addEquivOfLocalizations k

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_symm_eq_mulEquivOfLocalizations
code: @[to_additive]
theorem mulEquivOfLocalizations_symm_eq_mulEquivOfLocalizations {k : LocalizationMap S P} :
    (k.mulEquivOfLocalizations f).symm = f.mulEquivOfLocalizations k 
goal: (k.mulEquivOfLocalizations f).symm = f.mulEquivOfLocalizations k

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations
code: /-- If `f : M →* N` is a Localization map for a Submonoid `S` and `k : N ≃* P` is an isomorphism
of `CommMonoid`s, `k ∘ f` is a Localization map for `M` at `S`. -/
@[to_additive
    "If `f : M →+ N` is a Localization map for a Submonoid `S` and `k : N ≃+ P` is an isomorphism
of `AddCommMonoid`s, `k ∘ f` is a Localization map for `M` at `S`."]
def ofMulEquivOfLocalizations (k : N ≃* P) : LocalizationMap S P 
goal: S.LocalizationMap P

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations
code: /-- If `f : M →* N` is a Localization map for a Submonoid `S` and `k : N ≃* P` is an isomorphism
of `CommMonoid`s, `k ∘ f` is a Localization map for `M` at `S`. -/
@[to_additive
    "If `f : M →+ N` is a Localization map for a Submonoid `S` and `k : N ≃+ P` is an isomorphism
of `AddCommMonoid`s, `k ∘ f` is a Localization map for `M` at `S`."]
def ofMulEquivOfLocalizations (k : N ≃* P) : LocalizationMap S P 
goal: S.LocalizationMap P

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_apply
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    (f.ofMulEquivOfLocalizations k).toMap x = k (f.toMap x) 
goal: (f.ofMulEquivOfLocalizations k).toMap x = k (f.toMap x)

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations_apply
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    (f.ofMulEquivOfLocalizations k).toMap x = k (f.toMap x) 
goal: (f.ofAddEquivOfLocalizations k).toMap x = k (f.toMap x)

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations_eq
code: @[to_additive]
theorem ofMulEquivOfLocalizations_eq {k : N ≃* P} :
    (f.ofMulEquivOfLocalizations k).toMap = k.toMonoidHom.comp f.toMap 
goal: (f.ofAddEquivOfLocalizations k).toMap = k.toAddMonoidHom.comp f.toMap

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_eq
code: @[to_additive]
theorem ofMulEquivOfLocalizations_eq {k : N ≃* P} :
    (f.ofMulEquivOfLocalizations k).toMap = k.toMonoidHom.comp f.toMap 
goal: (f.ofMulEquivOfLocalizations k).toMap = k.toMonoidHom.comp f.toMap

full_name: Submonoid.LocalizationMap.symm_comp_ofMulEquivOfLocalizations_apply
code: @[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    k.symm ((f.ofMulEquivOfLocalizations k).toMap x) = f.toMap x 
goal: k.symm ((f.ofMulEquivOfLocalizations k).toMap x) = f.toMap x

full_name: AddSubmonoid.LocalizationMap.symm_comp_ofAddEquivOfLocalizations_apply
code: @[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    k.symm ((f.ofMulEquivOfLocalizations k).toMap x) = f.toMap x 
goal: k.symm ((f.ofAddEquivOfLocalizations k).toMap x) = f.toMap x

full_name: AddSubmonoid.LocalizationMap.symm_comp_ofAddEquivOfLocalizations_apply'
code: @[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply' {k : P ≃* N} (x) :
    k ((f.ofMulEquivOfLocalizations k.symm).toMap x) = f.toMap x 
goal: k ((f.ofAddEquivOfLocalizations k.symm).toMap x) = f.toMap x

full_name: Submonoid.LocalizationMap.symm_comp_ofMulEquivOfLocalizations_apply'
code: @[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply' {k : P ≃* N} (x) :
    k ((f.ofMulEquivOfLocalizations k.symm).toMap x) = f.toMap x 
goal: k ((f.ofMulEquivOfLocalizations k.symm).toMap x) = f.toMap x

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_eq_iff_eq
code: @[to_additive]
theorem ofMulEquivOfLocalizations_eq_iff_eq {k : N ≃* P} {x y} :
    (f.ofMulEquivOfLocalizations k).toMap x = y ↔ f.toMap x = k.symm y 
goal: (f.ofMulEquivOfLocalizations k).toMap x = y ↔ f.toMap x = k.symm y

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations_eq_iff_eq
code: @[to_additive]
theorem ofMulEquivOfLocalizations_eq_iff_eq {k : N ≃* P} {x y} :
    (f.ofMulEquivOfLocalizations k).toMap x = y ↔ f.toMap x = k.symm y 
goal: (f.ofAddEquivOfLocalizations k).toMap x = y ↔ f.toMap x = k.symm y

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_right_inv
code: @[to_additive addEquivOfLocalizations_right_inv]
theorem mulEquivOfLocalizations_right_inv (k : LocalizationMap S P) :
    f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k) = k 
goal: f.ofAddEquivOfLocalizations (f.addEquivOfLocalizations k) = k

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_right_inv
code: @[to_additive addEquivOfLocalizations_right_inv]
theorem mulEquivOfLocalizations_right_inv (k : LocalizationMap S P) :
    f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k) = k 
goal: f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k) = k

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_right_inv_apply
code: @[to_additive addEquivOfLocalizations_right_inv_apply]
theorem mulEquivOfLocalizations_right_inv_apply {k : LocalizationMap S P} {x} :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k)).toMap x = k.toMap x 
goal: (f.ofAddEquivOfLocalizations (f.addEquivOfLocalizations k)).toMap x = k.toMap x

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_right_inv_apply
code: @[to_additive addEquivOfLocalizations_right_inv_apply]
theorem mulEquivOfLocalizations_right_inv_apply {k : LocalizationMap S P} {x} :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k)).toMap x = k.toMap x 
goal: (f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k)).toMap x = k.toMap x

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_left_inv
code: @[to_additive]
theorem mulEquivOfLocalizations_left_inv (k : N ≃* P) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) = k 
goal: f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) = k

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_left_neg
code: @[to_additive]
theorem mulEquivOfLocalizations_left_inv (k : N ≃* P) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) = k 
goal: f.addEquivOfLocalizations (f.ofAddEquivOfLocalizations k) = k

full_name: AddSubmonoid.LocalizationMap.addEquivOfLocalizations_left_neg_apply
code: @[to_additive]
theorem mulEquivOfLocalizations_left_inv_apply {k : N ≃* P} (x) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) x = k x 
goal: (f.addEquivOfLocalizations (f.ofAddEquivOfLocalizations k)) x = k x

full_name: Submonoid.LocalizationMap.mulEquivOfLocalizations_left_inv_apply
code: @[to_additive]
theorem mulEquivOfLocalizations_left_inv_apply {k : N ≃* P} (x) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) x = k x 
goal: (f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k)) x = k x

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_id
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_id : f.ofMulEquivOfLocalizations (MulEquiv.refl N) = f 
goal: f.ofMulEquivOfLocalizations (MulEquiv.refl N) = f

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations_id
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_id : f.ofMulEquivOfLocalizations (MulEquiv.refl N) = f 
goal: f.ofAddEquivOfLocalizations (AddEquiv.refl N) = f

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfLocalizations_comp
code: @[to_additive]
theorem ofMulEquivOfLocalizations_comp {k : N ≃* P} {j : P ≃* Q} :
    (f.ofMulEquivOfLocalizations (k.trans j)).toMap =
      j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap 
goal: (f.ofAddEquivOfLocalizations (k.trans j)).toMap = j.toAddMonoidHom.comp (f.ofAddEquivOfLocalizations k).toMap

full_name: Submonoid.LocalizationMap.ofMulEquivOfLocalizations_comp
code: @[to_additive]
theorem ofMulEquivOfLocalizations_comp {k : N ≃* P} {j : P ≃* Q} :
    (f.ofMulEquivOfLocalizations (k.trans j)).toMap =
      j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap 
goal: (f.ofMulEquivOfLocalizations (k.trans j)).toMap = j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom
code: /-- Given `CommMonoid`s `M, P` and Submonoids `S ⊆ M, T ⊆ P`, if `f : M →* N` is a Localization
map for `S` and `k : P ≃* M` is an isomorphism of `CommMonoid`s such that `k(T) = S`, `f ∘ k`
is a Localization map for `T`. -/
@[to_additive
    "Given `AddCommMonoid`s `M, P` and `AddSubmonoid`s `S ⊆ M, T ⊆ P`, if `f : M →* N` is a
    Localization map for `S` and `k : P ≃+ M` is an isomorphism of `AddCommMonoid`s such that
    `k(T) = S`, `f ∘ k` is a Localization map for `T`."]
def ofMulEquivOfDom {k : P ≃* M} (H : T.map k.toMonoidHom = S) : LocalizationMap T N 
goal: T.LocalizationMap N

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom
code: /-- Given `CommMonoid`s `M, P` and Submonoids `S ⊆ M, T ⊆ P`, if `f : M →* N` is a Localization
map for `S` and `k : P ≃* M` is an isomorphism of `CommMonoid`s such that `k(T) = S`, `f ∘ k`
is a Localization map for `T`. -/
@[to_additive
    "Given `AddCommMonoid`s `M, P` and `AddSubmonoid`s `S ⊆ M, T ⊆ P`, if `f : M →* N` is a
    Localization map for `S` and `k : P ≃+ M` is an isomorphism of `AddCommMonoid`s such that
    `k(T) = S`, `f ∘ k` is a Localization map for `T`."]
def ofMulEquivOfDom {k : P ≃* M} (H : T.map k.toMonoidHom = S) : LocalizationMap T N 
goal: T.LocalizationMap N

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom_apply
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfDom_apply {k : P ≃* M} (H : T.map k.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap x = f.toMap (k x) 
goal: (f.ofAddEquivOfDom H).toMap x = f.toMap (k x)

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom_apply
code: @[to_additive (attr := simp)]
theorem ofMulEquivOfDom_apply {k : P ≃* M} (H : T.map k.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap x = f.toMap (k x) 
goal: (f.ofMulEquivOfDom H).toMap x = f.toMap (k x)

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom_eq
code: @[to_additive]
theorem ofMulEquivOfDom_eq {k : P ≃* M} (H : T.map k.toMonoidHom = S) :
    (f.ofMulEquivOfDom H).toMap = f.toMap.comp k.toMonoidHom 
goal: (f.ofAddEquivOfDom H).toMap = f.toMap.comp k.toAddMonoidHom

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom_eq
code: @[to_additive]
theorem ofMulEquivOfDom_eq {k : P ≃* M} (H : T.map k.toMonoidHom = S) :
    (f.ofMulEquivOfDom H).toMap = f.toMap.comp k.toMonoidHom 
goal: (f.ofMulEquivOfDom H).toMap = f.toMap.comp k.toMonoidHom

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom_comp_symm
code: @[to_additive]
theorem ofMulEquivOfDom_comp_symm {k : P ≃* M} (H : T.map k.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k.symm x) = f.toMap x 
goal: (f.ofAddEquivOfDom H).toMap (k.symm x) = f.toMap x

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom_comp_symm
code: @[to_additive]
theorem ofMulEquivOfDom_comp_symm {k : P ≃* M} (H : T.map k.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k.symm x) = f.toMap x 
goal: (f.ofMulEquivOfDom H).toMap (k.symm x) = f.toMap x

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom_comp
code: @[to_additive]
theorem ofMulEquivOfDom_comp {k : M ≃* P} (H : T.map k.symm.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k x) = f.toMap x 
goal: (f.ofAddEquivOfDom H).toMap (k x) = f.toMap x

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom_comp
code: @[to_additive]
theorem ofMulEquivOfDom_comp {k : M ≃* P} (H : T.map k.symm.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k x) = f.toMap x 
goal: (f.ofMulEquivOfDom H).toMap (k x) = f.toMap x

full_name: AddSubmonoid.LocalizationMap.ofAddEquivOfDom_id
code: /-- A special case of `f ∘ id = f`, `f` a Localization map. -/
@[to_additive (attr := simp) "A special case of `f ∘ id = f`, `f` a Localization map."]
theorem ofMulEquivOfDom_id :
    f.ofMulEquivOfDom
        (show S.map (MulEquiv.refl M).toMonoidHom = S from
          Submonoid.ext fun x ↦ ⟨fun ⟨_, hy, h⟩ ↦ h ▸ hy, fun h ↦ ⟨x, h, rfl⟩⟩) = f 
goal: f.ofAddEquivOfDom ⋯ = f

full_name: Submonoid.LocalizationMap.ofMulEquivOfDom_id
code: /-- A special case of `f ∘ id = f`, `f` a Localization map. -/
@[to_additive (attr := simp) "A special case of `f ∘ id = f`, `f` a Localization map."]
theorem ofMulEquivOfDom_id :
    f.ofMulEquivOfDom
        (show S.map (MulEquiv.refl M).toMonoidHom = S from
          Submonoid.ext fun x ↦ ⟨fun ⟨_, hy, h⟩ ↦ h ▸ hy, fun h ↦ ⟨x, h, rfl⟩⟩) = f 
goal: f.ofMulEquivOfDom ⋯ = f

full_name: Submonoid.LocalizationMap.mulEquivOfMulEquiv
code: /-- Given Localization maps `f : M →* N, k : P →* U` for Submonoids `S, T` respectively, an
isomorphism `j : M ≃* P` such that `j(S) = T` induces an isomorphism of localizations `N ≃* U`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ U` for Submonoids `S, T` respectively, an
isomorphism `j : M ≃+ P` such that `j(S) = T` induces an isomorphism of localizations `N ≃+ U`."]
noncomputable def mulEquivOfMulEquiv (k : LocalizationMap T Q) {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) : N ≃* Q 
goal: N ≃* Q

full_name: AddSubmonoid.LocalizationMap.addEquivOfAddEquiv
code: /-- Given Localization maps `f : M →* N, k : P →* U` for Submonoids `S, T` respectively, an
isomorphism `j : M ≃* P` such that `j(S) = T` induces an isomorphism of localizations `N ≃* U`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ U` for Submonoids `S, T` respectively, an
isomorphism `j : M ≃+ P` such that `j(S) = T` induces an isomorphism of localizations `N ≃+ U`."]
noncomputable def mulEquivOfMulEquiv (k : LocalizationMap T Q) {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) : N ≃* Q 
goal: N ≃+ Q

full_name: AddSubmonoid.LocalizationMap.addEquivOfAddEquiv_eq_map_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfMulEquiv_eq_map_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    f.mulEquivOfMulEquiv k H x =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k x 
goal: (f.addEquivOfAddEquiv k H) x = (f.map ⋯ k) x

full_name: Submonoid.LocalizationMap.mulEquivOfMulEquiv_eq_map_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfMulEquiv_eq_map_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    f.mulEquivOfMulEquiv k H x =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k x 
goal: (f.mulEquivOfMulEquiv k H) x = (f.map ⋯ k) x

full_name: Submonoid.LocalizationMap.mulEquivOfMulEquiv_eq_map
code: @[to_additive]
theorem mulEquivOfMulEquiv_eq_map {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) :
    (f.mulEquivOfMulEquiv k H).toMonoidHom =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k 
goal: (f.mulEquivOfMulEquiv k H).toMonoidHom = f.map ⋯ k

full_name: AddSubmonoid.LocalizationMap.addEquivOfAddEquiv_eq_map
code: @[to_additive]
theorem mulEquivOfMulEquiv_eq_map {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) :
    (f.mulEquivOfMulEquiv k H).toMonoidHom =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k 
goal: (f.addEquivOfAddEquiv k H).toAddMonoidHom = f.map ⋯ k

full_name: AddSubmonoid.LocalizationMap.addEquivOfAddEquiv_eq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_eq {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x) :
    f.mulEquivOfMulEquiv k H (f.toMap x) = k.toMap (j x) 
goal: (f.addEquivOfAddEquiv k H) (f.toMap x) = k.toMap (j x)

full_name: Submonoid.LocalizationMap.mulEquivOfMulEquiv_eq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_eq {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x) :
    f.mulEquivOfMulEquiv k H (f.toMap x) = k.toMap (j x) 
goal: (f.mulEquivOfMulEquiv k H) (f.toMap x) = k.toMap (j x)

full_name: AddSubmonoid.LocalizationMap.addEquivOfAddEquiv_mk'
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_mk' {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x y) :
    f.mulEquivOfMulEquiv k H (f.mk' x y) = k.mk' (j x) ⟨j y, H ▸ Set.mem_image_of_mem j y.2⟩ 
goal: (f.addEquivOfAddEquiv k H) (f.mk' x y) = k.mk' (j x) ⟨j ↑y, ⋯⟩

full_name: Submonoid.LocalizationMap.mulEquivOfMulEquiv_mk'
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_mk' {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x y) :
    f.mulEquivOfMulEquiv k H (f.mk' x y) = k.mk' (j x) ⟨j y, H ▸ Set.mem_image_of_mem j y.2⟩ 
goal: (f.mulEquivOfMulEquiv k H) (f.mk' x y) = k.mk' (j x) ⟨j ↑y, ⋯⟩

full_name: AddSubmonoid.LocalizationMap.of_addEquivOfAddEquiv_apply
code: @[to_additive (attr := simp, nolint simpNF)]
theorem of_mulEquivOfMulEquiv_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap x = k.toMap (j x) 
goal: (f.ofAddEquivOfLocalizations (f.addEquivOfAddEquiv k H)).toMap x = k.toMap (j x)

full_name: Submonoid.LocalizationMap.of_mulEquivOfMulEquiv_apply
code: @[to_additive (attr := simp, nolint simpNF)]
theorem of_mulEquivOfMulEquiv_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap x = k.toMap (j x) 
goal: (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap x = k.toMap (j x)

full_name: Submonoid.LocalizationMap.of_mulEquivOfMulEquiv
code: @[to_additive]
theorem of_mulEquivOfMulEquiv {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap = k.toMap.comp j.toMonoidHom 
goal: (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap = k.toMap.comp j.toMonoidHom

full_name: AddSubmonoid.LocalizationMap.of_addEquivOfAddEquiv
code: @[to_additive]
theorem of_mulEquivOfMulEquiv {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap = k.toMap.comp j.toMonoidHom 
goal: (f.ofAddEquivOfLocalizations (f.addEquivOfAddEquiv k H)).toMap = k.toMap.comp j.toAddMonoidHom

full_name: AddLocalization.addMonoidOf
code: /-- Natural homomorphism sending `x : M`, `M` a `CommMonoid`, to the equivalence class of
`(x, 1)` in the Localization of `M` at a Submonoid. -/
@[to_additive
    "Natural homomorphism sending `x : M`, `M` an `AddCommMonoid`, to the equivalence class of
`(x, 0)` in the Localization of `M` at a Submonoid."]
def monoidOf : Submonoid.LocalizationMap S (Localization S) 
goal: S.LocalizationMap (AddLocalization S)

full_name: Localization.monoidOf
code: /-- Natural homomorphism sending `x : M`, `M` a `CommMonoid`, to the equivalence class of
`(x, 1)` in the Localization of `M` at a Submonoid. -/
@[to_additive
    "Natural homomorphism sending `x : M`, `M` an `AddCommMonoid`, to the equivalence class of
`(x, 0)` in the Localization of `M` at a Submonoid."]
def monoidOf : Submonoid.LocalizationMap S (Localization S) 
goal: S.LocalizationMap (Localization S)

full_name: Localization.mk_one_eq_monoidOf_mk
code: @[to_additive]
theorem mk_one_eq_monoidOf_mk (x) : mk x 1 = (monoidOf S).toMap x 
goal: Localization.mk x 1 = (Localization.monoidOf S).toMap x

full_name: AddLocalization.mk_zero_eq_addMonoidOf_mk
code: @[to_additive]
theorem mk_one_eq_monoidOf_mk (x) : mk x 1 = (monoidOf S).toMap x 
goal: AddLocalization.mk x 0 = (AddLocalization.addMonoidOf S).toMap x

full_name: AddLocalization.mk_eq_addMonoidOf_mk'_apply
code: @[to_additive]
theorem mk_eq_monoidOf_mk'_apply (x y) : mk x y = (monoidOf S).mk' x y 
goal: AddLocalization.mk x y = (AddLocalization.addMonoidOf S).mk' x y

full_name: Localization.mk_eq_monoidOf_mk'_apply
code: @[to_additive]
theorem mk_eq_monoidOf_mk'_apply (x y) : mk x y = (monoidOf S).mk' x y 
goal: Localization.mk x y = (Localization.monoidOf S).mk' x y

full_name: Localization.mk_eq_monoidOf_mk'
code: @[to_additive (attr := simp)]
theorem mk_eq_monoidOf_mk' : mk = (monoidOf S).mk' 
goal: Localization.mk = (Localization.monoidOf S).mk'

full_name: AddLocalization.mk_eq_addMonoidOf_mk'
code: @[to_additive (attr := simp)]
theorem mk_eq_monoidOf_mk' : mk = (monoidOf S).mk' 
goal: AddLocalization.mk = (AddLocalization.addMonoidOf S).mk'

full_name: AddLocalization.liftOn_mk'
code: @[to_additive (attr := simp)]
theorem liftOn_mk' {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn ((monoidOf S).mk' a b) f H = f a b 
goal: ((AddLocalization.addMonoidOf S).mk' a b).liftOn f H = f a b

full_name: Localization.liftOn_mk'
code: @[to_additive (attr := simp)]
theorem liftOn_mk' {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn ((monoidOf S).mk' a b) f H = f a b 
goal: ((Localization.monoidOf S).mk' a b).liftOn f H = f a b

full_name: AddLocalization.liftOn₂_mk'
code: @[to_additive (attr := simp)]
theorem liftOn₂_mk' {p : Sort*} (f : M → S → M → S → p) (H) (a c : M) (b d : S) :
    liftOn₂ ((monoidOf S).mk' a b) ((monoidOf S).mk' c d) f H = f a b c d 
goal: ((AddLocalization.addMonoidOf S).mk' a b).liftOn₂ ((AddLocalization.addMonoidOf S).mk' c d) f H = f a b c d

full_name: Localization.liftOn₂_mk'
code: @[to_additive (attr := simp)]
theorem liftOn₂_mk' {p : Sort*} (f : M → S → M → S → p) (H) (a c : M) (b d : S) :
    liftOn₂ ((monoidOf S).mk' a b) ((monoidOf S).mk' c d) f H = f a b c d 
goal: ((Localization.monoidOf S).mk' a b).liftOn₂ ((Localization.monoidOf S).mk' c d) f H = f a b c d

full_name: AddLocalization.addEquivOfQuotient
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S`, we get an isomorphism between
the Localization of `M` at `S` as a quotient type and `N`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S`, we get an isomorphism between
the Localization of `M` at `S` as a quotient type and `N`."]
noncomputable def mulEquivOfQuotient (f : Submonoid.LocalizationMap S N) : Localization S ≃* N 
goal: AddLocalization S ≃+ N

full_name: Localization.mulEquivOfQuotient
code: /-- Given a Localization map `f : M →* N` for a Submonoid `S`, we get an isomorphism between
the Localization of `M` at `S` as a quotient type and `N`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S`, we get an isomorphism between
the Localization of `M` at `S` as a quotient type and `N`."]
noncomputable def mulEquivOfQuotient (f : Submonoid.LocalizationMap S N) : Localization S ≃* N 
goal: Localization S ≃* N

full_name: Localization.mulEquivOfQuotient_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_apply (x) : mulEquivOfQuotient f x = (monoidOf S).lift f.map_units x 
goal: (Localization.mulEquivOfQuotient f) x = ((Localization.monoidOf S).lift ⋯) x

full_name: AddLocalization.addEquivOfQuotient_apply
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_apply (x) : mulEquivOfQuotient f x = (monoidOf S).lift f.map_units x 
goal: (AddLocalization.addEquivOfQuotient f) x = ((AddLocalization.addMonoidOf S).lift ⋯) x

full_name: AddLocalization.addEquivOfQuotient_mk'
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfQuotient_mk' (x y) : mulEquivOfQuotient f ((monoidOf S).mk' x y) = f.mk' x y 
goal: (AddLocalization.addEquivOfQuotient f) ((AddLocalization.addMonoidOf S).mk' x y) = f.mk' x y

full_name: Localization.mulEquivOfQuotient_mk'
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfQuotient_mk' (x y) : mulEquivOfQuotient f ((monoidOf S).mk' x y) = f.mk' x y 
goal: (Localization.mulEquivOfQuotient f) ((Localization.monoidOf S).mk' x y) = f.mk' x y

full_name: Localization.mulEquivOfQuotient_mk
code: @[to_additive]
theorem mulEquivOfQuotient_mk (x y) : mulEquivOfQuotient f (mk x y) = f.mk' x y 
goal: (Localization.mulEquivOfQuotient f) (Localization.mk x y) = f.mk' x y

full_name: AddLocalization.addEquivOfQuotient_mk
code: @[to_additive]
theorem mulEquivOfQuotient_mk (x y) : mulEquivOfQuotient f (mk x y) = f.mk' x y 
goal: (AddLocalization.addEquivOfQuotient f) (AddLocalization.mk x y) = f.mk' x y

full_name: AddLocalization.addEquivOfQuotient_addMonoidOf
code: @[to_additive]
theorem mulEquivOfQuotient_monoidOf (x) :
    mulEquivOfQuotient f ((monoidOf S).toMap x) = f.toMap x 
goal: (AddLocalization.addEquivOfQuotient f) ((AddLocalization.addMonoidOf S).toMap x) = f.toMap x

full_name: Localization.mulEquivOfQuotient_monoidOf
code: @[to_additive]
theorem mulEquivOfQuotient_monoidOf (x) :
    mulEquivOfQuotient f ((monoidOf S).toMap x) = f.toMap x 
goal: (Localization.mulEquivOfQuotient f) ((Localization.monoidOf S).toMap x) = f.toMap x

full_name: AddLocalization.addEquivOfQuotient_symm_mk'
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_mk' (x y) :
    (mulEquivOfQuotient f).symm (f.mk' x y) = (monoidOf S).mk' x y 
goal: (AddLocalization.addEquivOfQuotient f).symm (f.mk' x y) = (AddLocalization.addMonoidOf S).mk' x y

full_name: Localization.mulEquivOfQuotient_symm_mk'
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_mk' (x y) :
    (mulEquivOfQuotient f).symm (f.mk' x y) = (monoidOf S).mk' x y 
goal: (Localization.mulEquivOfQuotient f).symm (f.mk' x y) = (Localization.monoidOf S).mk' x y

full_name: AddLocalization.addEquivOfQuotient_symm_mk
code: @[to_additive]
theorem mulEquivOfQuotient_symm_mk (x y) : (mulEquivOfQuotient f).symm (f.mk' x y) = mk x y 
goal: (AddLocalization.addEquivOfQuotient f).symm (f.mk' x y) = AddLocalization.mk x y

full_name: Localization.mulEquivOfQuotient_symm_mk
code: @[to_additive]
theorem mulEquivOfQuotient_symm_mk (x y) : (mulEquivOfQuotient f).symm (f.mk' x y) = mk x y 
goal: (Localization.mulEquivOfQuotient f).symm (f.mk' x y) = Localization.mk x y

full_name: Localization.mulEquivOfQuotient_symm_monoidOf
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_monoidOf (x) :
    (mulEquivOfQuotient f).symm (f.toMap x) = (monoidOf S).toMap x 
goal: (Localization.mulEquivOfQuotient f).symm (f.toMap x) = (Localization.monoidOf S).toMap x

full_name: AddLocalization.addEquivOfQuotient_symm_addMonoidOf
code: @[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_monoidOf (x) :
    (mulEquivOfQuotient f).symm (f.toMap x) = (monoidOf S).toMap x 
goal: (AddLocalization.addEquivOfQuotient f).symm (f.toMap x) = (AddLocalization.addMonoidOf S).toMap x

full_name: Localization.Away
code: /-- Given `x : M`, the Localization of `M` at the Submonoid generated by `x`, as a quotient. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the Localization of `M` at the Submonoid generated by `x`, as a quotient."]
def Away 
goal: Type u_1

full_name: AddLocalization.Away
code: /-- Given `x : M`, the Localization of `M` at the Submonoid generated by `x`, as a quotient. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the Localization of `M` at the Submonoid generated by `x`, as a quotient."]
def Away 
goal: Type u_1

full_name: AddLocalization.Away.negSelf
code: /-- Given `x : M`, `invSelf` is `x⁻¹` in the Localization (as a quotient type) of `M` at the
Submonoid generated by `x`. -/
@[to_additive
    "Given `x : M`, `negSelf` is `-x` in the Localization (as a quotient type) of `M` at the
Submonoid generated by `x`."]
def Away.invSelf : Away x 
goal: AddLocalization.Away x

full_name: Localization.Away.invSelf
code: /-- Given `x : M`, `invSelf` is `x⁻¹` in the Localization (as a quotient type) of `M` at the
Submonoid generated by `x`. -/
@[to_additive
    "Given `x : M`, `negSelf` is `-x` in the Localization (as a quotient type) of `M` at the
Submonoid generated by `x`."]
def Away.invSelf : Away x 
goal: Localization.Away x

full_name: Localization.Away.monoidOf
code: /-- Given `x : M`, the natural hom sending `y : M`, `M` a `CommMonoid`, to the equivalence class
of `(y, 1)` in the Localization of `M` at the Submonoid generated by `x`. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the natural hom sending `y : M`, `M` an `AddCommMonoid`, to the equivalence
class of `(y, 0)` in the Localization of `M` at the Submonoid generated by `x`."]
def Away.monoidOf : Submonoid.LocalizationMap.AwayMap x (Away x) 
goal: Submonoid.LocalizationMap.AwayMap x (Localization.Away x)

full_name: AddLocalization.Away.addMonoidOf
code: /-- Given `x : M`, the natural hom sending `y : M`, `M` a `CommMonoid`, to the equivalence class
of `(y, 1)` in the Localization of `M` at the Submonoid generated by `x`. -/
@[to_additive (attr := reducible)
    "Given `x : M`, the natural hom sending `y : M`, `M` an `AddCommMonoid`, to the equivalence
class of `(y, 0)` in the Localization of `M` at the Submonoid generated by `x`."]
def Away.monoidOf : Submonoid.LocalizationMap.AwayMap x (Away x) 
goal: AddSubmonoid.LocalizationMap.AwayMap x (AddLocalization.Away x)

full_name: Localization.Away.mk_eq_monoidOf_mk'
code: @[to_additive]
theorem Away.mk_eq_monoidOf_mk' : mk = (Away.monoidOf x).mk' 
goal: Localization.mk = Submonoid.LocalizationMap.mk' (Localization.Away.monoidOf x)

full_name: AddLocalization.Away.mk_eq_addMonoidOf_mk'
code: @[to_additive]
theorem Away.mk_eq_monoidOf_mk' : mk = (Away.monoidOf x).mk' 
goal: AddLocalization.mk = AddSubmonoid.LocalizationMap.mk' (AddLocalization.Away.addMonoidOf x)

full_name: Localization.Away.mulEquivOfQuotient
code: /-- Given `x : M` and a Localization map `f : M →* N` away from `x`, we get an isomorphism between
the Localization of `M` at the Submonoid generated by `x` as a quotient type and `N`. -/
@[to_additive
    "Given `x : M` and a Localization map `f : M →+ N` away from `x`, we get an isomorphism between
the Localization of `M` at the Submonoid generated by `x` as a quotient type and `N`."]
noncomputable def Away.mulEquivOfQuotient (f : Submonoid.LocalizationMap.AwayMap x N) :
    Away x ≃* N 
goal: Localization.Away x ≃* N

full_name: AddLocalization.Away.addEquivOfQuotient
code: /-- Given `x : M` and a Localization map `f : M →* N` away from `x`, we get an isomorphism between
the Localization of `M` at the Submonoid generated by `x` as a quotient type and `N`. -/
@[to_additive
    "Given `x : M` and a Localization map `f : M →+ N` away from `x`, we get an isomorphism between
the Localization of `M` at the Submonoid generated by `x` as a quotient type and `N`."]
noncomputable def Away.mulEquivOfQuotient (f : Submonoid.LocalizationMap.AwayMap x N) :
    Away x ≃* N 
goal: AddLocalization.Away x ≃+ N

full_name: Localization.mk_left_injective
code: @[to_additive]
theorem mk_left_injective (b : s) : Injective fun a => mk a b 
goal: Function.Injective fun a => Localization.mk a b

full_name: AddLocalization.mk_left_injective
code: @[to_additive]
theorem mk_left_injective (b : s) : Injective fun a => mk a b 
goal: Function.Injective fun a => AddLocalization.mk a b

full_name: Localization.mk_eq_mk_iff'
code: @[to_additive]
theorem mk_eq_mk_iff' : mk a₁ a₂ = mk b₁ b₂ ↔ ↑b₂ * a₁ = a₂ * b₁ 
goal: Localization.mk a₁ a₂ = Localization.mk b₁ b₂ ↔ ↑b₂ * a₁ = ↑a₂ * b₁

full_name: AddLocalization.mk_eq_mk_iff'
code: @[to_additive]
theorem mk_eq_mk_iff' : mk a₁ a₂ = mk b₁ b₂ ↔ ↑b₂ * a₁ = a₂ * b₁ 
goal: AddLocalization.mk a₁ a₂ = AddLocalization.mk b₁ b₂ ↔ ↑b₂ + a₁ = ↑a₂ + b₁

full_name: AddLocalization.decidableEq
code: @[to_additive]
instance decidableEq [DecidableEq α] : DecidableEq (Localization s) 
goal: DecidableEq (AddLocalization s)

full_name: Localization.decidableEq
code: @[to_additive]
instance decidableEq [DecidableEq α] : DecidableEq (Localization s) 
goal: DecidableEq (Localization s)

full_name: OreLocalization.localizationMap
code: /-- The morphism `numeratorHom` is a monoid localization map in the case of commutative `R`. -/
protected def localizationMap : S.LocalizationMap R[S⁻¹] 
goal: S.LocalizationMap (OreLocalization S R)

full_name: OreLocalization.equivMonoidLocalization
code: /-- If `R` is commutative, Ore localization and monoid localization are isomorphic. -/
protected noncomputable def equivMonoidLocalization : Localization S ≃* R[S⁻¹] 
goal: Localization S ≃* OreLocalization S R