The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V05. Groups

Mathlib.Algebra.GroupWithZero.WithZero

109 declarations. Mathlib docs · Source

Adjoining a zero to a group

This file proves that one can adjoin a new zero element to a group and get a group with zero.

In valuation theory, valuations have codomain {0} ∪ {c ^ n | n : ℤ} for some c > 1, which we can formalise as ℤᵐ⁰ := WithZero (Multiplicative ℤ). It is important to be able to talk about the maps n ↦ c ^ n and c ^ n ↦ n. We define these as exp : ℤ → ℤᵐ⁰ and log : ℤᵐ⁰ → ℤ with junk value log 0 = 0. Junkless versions are defined as expEquiv : ℤ ≃ ℤᵐ⁰ˣ and logEquiv : ℤᵐ⁰ˣ ≃ ℤ.

Notation

In scope WithZero:

  • Mᵐ⁰ for WithZero (Multiplicative M)

Main definitions

  • WithZero.map': the MonoidWithZero homomorphism WithZero α →* WithZero β induced by a monoid homomorphism f : α →* β.
  • WithZero.exp: The "exponential map" M → Mᵐ⁰
  • WithZero.exp: The "logarithm" Mᵐ⁰ → M

Exponential and logarithm

theorem WithZero.unzero.congr_simp E1 #

∀ {α : Type u} {x x_1 : WithZero α} (e_x : x = x_1) (a : x ≠ 0), WithZero.unzero a = WithZero.unzero ⋯

instance WithZero.one E0 #

{α : Type u_2} → [One α] → One (WithZero α)

theorem WithZero.coe_one E0 #

∀ {α : Type u_2} [inst : One α], ↑1 = 1

theorem WithZero.recZeroCoe_one E0 #

∀ {M : Type u_5} {N : Type u_6} [inst : One M] (f : M → N) (z : N), WithZero.recZeroCoe z f 1 = f 1

instance WithZero.instMulZeroClass E0 #

{α : Type u_2} → [Mul α] → MulZeroClass (WithZero α)

theorem WithZero.coe_mul E0 #

∀ {α : Type u_2} [inst : Mul α] (a b : α), ↑(a * b) = ↑a * ↑b

theorem WithZero.unzero_mul E1 #

∀ {α : Type u_2} [inst : Mul α] {x y : WithZero α} (hxy : x * y ≠ 0),
  WithZero.unzero hxy = WithZero.unzero ⋯ * WithZero.unzero ⋯

instance WithZero.instNoZeroDivisors E0 #

∀ {α : Type u_2} [inst : Mul α], NoZeroDivisors (WithZero α)

def WithZero.coeMulHom E1 #

{α : Type u_2} → [inst : Mul α] → α →ₙ* WithZero α

WithZero.coe as a mul hom.

theorem WithZero.coeMulHom_apply E0 #

∀ {α : Type u_2} [inst : Mul α] (a : α), WithZero.coeMulHom a = ↑a

instance WithZero.instSemigroupWithZero E0 #

{M : Type u_1} → [Semigroup M] → SemigroupWithZero (WithZero M)

theorem WithZero.coe_dvd_coe_iff E0 #

∀ {M : Type u_1} [inst : Semigroup M] {a b : M}, ↑a ∣ ↑b ↔ a ∣ b

instance WithZero.instCommSemigroup E0 #

{α : Type u_2} → [CommSemigroup α] → CommSemigroup (WithZero α)

instance WithZero.instMulZeroOneClass E0 #

{α : Type u_2} → [MulOneClass α] → MulZeroOneClass (WithZero α)

def WithZero.coeMonoidHom E1 #

{α : Type u_2} → [inst : MulOneClass α] → α →* WithZero α

WithZero.coe as a monoid hom.

theorem WithZero.coeMonoidHom_apply E0 #

∀ {α : Type u_2} [inst : MulOneClass α] (a : α), WithZero.coeMonoidHom a = ↑a

theorem WithZero.monoidWithZeroHom_ext_iff E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] {f g : WithZero α →*₀ β},
  f = g ↔ (↑f).comp WithZero.coeMonoidHom = (↑g).comp WithZero.coeMonoidHom

theorem WithZero.monoidWithZeroHom_ext E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] ⦃f g : WithZero α →*₀ β⦄,
  (↑f).comp WithZero.coeMonoidHom = (↑g).comp WithZero.coeMonoidHom → f = g

def WithZero.lift' E1 #

{α : Type u_2} → {β : Type u_3} → [inst : MulOneClass α] → [inst_1 : MulZeroOneClass β] → (α →* β) ≃ (WithZero α →*₀ β)

The (multiplicative) universal property of WithZero.

theorem WithZero.lift'_symm_apply_apply E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] (F : WithZero α →*₀ β) (x : α),
  (WithZero.lift'.symm F) x = F ↑x

theorem WithZero.lift'_zero E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] (f : α →* β),
  (WithZero.lift' f) 0 = 0

theorem WithZero.lift'_coe E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] (f : α →* β) (x : α),
  (WithZero.lift' f) ↑x = f x

theorem WithZero.lift'_unique E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] (f : WithZero α →*₀ β),
  f = WithZero.lift' ((↑f).comp WithZero.coeMonoidHom)

theorem WithZero.lift'_surjective E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulZeroOneClass β] {f : α →* β},
  Function.Surjective ⇑f → Function.Surjective ⇑(WithZero.lift' f)

def WithZero.map' E3 #

{α : Type u_2} →
  {β : Type u_3} → [inst : MulOneClass α] → [inst_1 : MulOneClass β] → (α →* β) → WithZero α →*₀ WithZero β

The MonoidWithZero homomorphism WithZero α →* WithZero β induced by a monoid homomorphism f : α →* β.

theorem WithZero.map'_zero E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] (f : α →* β), (WithZero.map' f) 0 = 0

theorem WithZero.map'_coe E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] (f : α →* β) (x : α),
  (WithZero.map' f) ↑x = ↑(f x)

theorem WithZero.map'_id E0 #

∀ {β : Type u_3} [inst : MulOneClass β], ↑(WithZero.map' (MonoidHom.id β)) = MonoidHom.id (WithZero β)

theorem WithZero.map'_map' E1 #

∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulOneClass α] [inst_1 : MulOneClass β] [inst_2 : MulOneClass γ]
  (f : α →* β) (g : β →* γ) (x : WithZero α), (WithZero.map' g) ((WithZero.map' f) x) = (WithZero.map' (g.comp f)) x

theorem WithZero.map'_comp E0 #

∀ {α : Type u_2} {β : Type u_3} {γ : Type u_4} [inst : MulOneClass α] [inst_1 : MulOneClass β] [inst_2 : MulOneClass γ]
  (f : α →* β) (g : β →* γ), WithZero.map' (g.comp f) = (WithZero.map' g).comp (WithZero.map' f)

theorem WithZero.map'_injective_iff E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] {f : α →* β},
  Function.Injective ⇑(WithZero.map' f) ↔ Function.Injective ⇑f

theorem WithZero.map'_injective E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] {f : α →* β},
  Function.Injective ⇑f → Function.Injective ⇑(WithZero.map' f)

Alias of the reverse direction of WithZero.map'_injective_iff.

theorem WithZero.map'_surjective_iff E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] {f : α →* β},
  Function.Surjective ⇑(WithZero.map' f) ↔ Function.Surjective ⇑f

theorem WithZero.map'_surjective E1 #

∀ {α : Type u_2} {β : Type u_3} [inst : MulOneClass α] [inst_1 : MulOneClass β] {f : α →* β},
  Function.Surjective ⇑f → Function.Surjective ⇑(WithZero.map' f)

Alias of the reverse direction of WithZero.map'_surjective_iff.

instance WithZero.pow E0 #

{α : Type u_2} → [One α] → [Pow α ℕ] → Pow (WithZero α) ℕ

theorem WithZero.coe_pow E0 #

∀ {α : Type u_2} [inst : One α] [inst_1 : Pow α ℕ] (a : α) (n : ℕ), ↑(a ^ n) = ↑a ^ n

instance WithZero.instMonoidWithZero E0 #

{α : Type u_2} → [Monoid α] → MonoidWithZero (WithZero α)

instance WithZero.instCommMonoidWithZero E0 #

{α : Type u_2} → [CommMonoid α] → CommMonoidWithZero (WithZero α)

instance WithZero.inv E0 #

{α : Type u_2} → [Inv α] → Inv (WithZero α)

Extend the inverse operation on α to WithZero α by sending 0 to 0.

theorem WithZero.coe_inv E0 #

∀ {α : Type u_2} [inst : Inv α] (a : α), ↑a⁻¹ = (↑a)⁻¹

theorem WithZero.inv_zero E0 #

∀ {α : Type u_2} [inst : Inv α], 0⁻¹ = 0

instance WithZero.invOneClass E0 #

{α : Type u_2} → [InvOneClass α] → InvOneClass (WithZero α)

instance WithZero.div E0 #

{α : Type u_2} → [Div α] → Div (WithZero α)

theorem WithZero.coe_div E0 #

∀ {α : Type u_2} [inst : Div α] (a b : α), ↑(a / b) = ↑a / ↑b

instance WithZero.instPowInt E0 #

{α : Type u_2} → [One α] → [Pow α ℤ] → Pow (WithZero α) ℤ

theorem WithZero.coe_zpow E0 #

∀ {α : Type u_2} [inst : One α] [inst_1 : Pow α ℤ] (a : α) (n : ℤ), ↑(a ^ n) = ↑a ^ n

instance WithZero.instDivInvMonoid E0 #

{α : Type u_2} → [DivInvMonoid α] → DivInvMonoid (WithZero α)

instance WithZero.instDivInvOneMonoid E0 #

{α : Type u_2} → [DivInvOneMonoid α] → DivInvOneMonoid (WithZero α)

instance WithZero.instInvolutiveInv E0 #

{α : Type u_2} → [InvolutiveInv α] → InvolutiveInv (WithZero α)

instance WithZero.instDivisionMonoid E0 #

{α : Type u_2} → [DivisionMonoid α] → DivisionMonoid (WithZero α)

instance WithZero.instDivisionCommMonoid E0 #

{α : Type u_2} → [DivisionCommMonoid α] → DivisionCommMonoid (WithZero α)

instance WithZero.instGroupWithZero E0 #

{α : Type u_2} → [Group α] → GroupWithZero (WithZero α)

If α is a group then WithZero α is a group with zero.

def WithZero.unitsWithZeroEquiv E1 #

{α : Type u_2} → [inst : Group α] → (WithZero α)ˣ ≃* α

Any group is isomorphic to the units of itself adjoined with 0.

theorem WithZero.unitsWithZeroEquiv_symm_apply E0 #

∀ {α : Type u_2} [inst : Group α] (a : α), WithZero.unitsWithZeroEquiv.symm a = Units.mk0 ↑a ⋯

theorem WithZero.unitsWithZeroEquiv_apply E0 #

∀ {α : Type u_2} [inst : Group α] (a : (WithZero α)ˣ), WithZero.unitsWithZeroEquiv a = WithZero.unzero ⋯

instance WithZero.instNontrivialUnits E0 #

∀ {α : Type u_2} [inst : Group α] [Nontrivial α], Nontrivial (WithZero α)ˣ

theorem WithZero.coe_unitsWithZeroEquiv_eq_units_val E0 #

∀ {α : Type u_2} [inst : Group α] (γ : (WithZero α)ˣ), ↑(WithZero.unitsWithZeroEquiv γ) = ↑γ

def WithZero.withZeroUnitsEquiv E1 #

{G : Type u_5} → [inst : GroupWithZero G] → [DecidablePred fun a ↦ a = 0] → WithZero Gˣ ≃* G

Any group with zero is isomorphic to adjoining 0 to the units of itself.

theorem WithZero.withZeroUnitsEquiv_symm_apply E0 #

∀ {G : Type u_5} [inst : GroupWithZero G] [inst_1 : DecidablePred fun a ↦ a = 0] (a : G),
  WithZero.withZeroUnitsEquiv.symm a = if h : a = 0 then 0 else ↑(Units.mk0 a h)

theorem WithZero.withZeroUnitsEquiv_apply E0 #

∀ {G : Type u_5} [inst : GroupWithZero G] [inst_1 : DecidablePred fun a ↦ a = 0] (n : WithZero Gˣ),
  WithZero.withZeroUnitsEquiv n = WithZero.recZeroCoe 0 Units.val n

theorem WithZero.withZeroUnitsEquiv_symm_apply_coe E0 #

∀ {G : Type u_5} [inst : GroupWithZero G] [inst_1 : DecidablePred fun a ↦ a = 0] (a : Gˣ),
  WithZero.withZeroUnitsEquiv.symm ↑a = ↑a

def MulEquiv.withZero E1 #

{α : Type u_2} → {β : Type u_3} → [inst : Group α] → [inst_1 : Group β] → α ≃* β ≃ (WithZero α ≃* WithZero β)

A version of Equiv.optionCongr for WithZero.

theorem MulEquiv.withZero_apply_symm_apply E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : Group α] [inst_1 : Group β] (e : α ≃* β) (a : WithZero β),
  (MulEquiv.withZero e).symm a = (WithZero.map' ↑e.symm) a

theorem MulEquiv.withZero_apply_apply E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : Group α] [inst_1 : Group β] (e : α ≃* β) (a : WithZero α),
  (MulEquiv.withZero e) a = (WithZero.map' ↑e) a

theorem MulEquiv.withZero_symm_apply_apply E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : Group α] [inst_1 : Group β] (e : WithZero α ≃* WithZero β) (x : α),
  (MulEquiv.withZero.symm e) x = WithZero.unzero ⋯

theorem MulEquiv.withZero_symm_apply_symm_apply E0 #

∀ {α : Type u_2} {β : Type u_3} [inst : Group α] [inst_1 : Group β] (e : WithZero α ≃* WithZero β) (x : β),
  (MulEquiv.withZero.symm e).symm x = WithZero.unzero ⋯

abbrev MulEquiv.unzero E1 #

{α : Type u_2} → {β : Type u_3} → [inst : Group α] → [inst_1 : Group β] → WithZero α ≃* WithZero β → α ≃* β

The inverse of MulEquiv.withZero.

instance WithZero.instCommGroupWithZero E0 #

{α : Type u_2} → [CommGroup α] → CommGroupWithZero (WithZero α)

instance WithZero.instAddMonoidWithOne E0 #

{α : Type u_2} → [AddMonoidWithOne α] → AddMonoidWithOne (WithZero α)

def WithZero.«term_ᵐ⁰» E1 #

Lean.TrailingParserDescr

Mᵐ⁰ is notation for WithZero (Multiplicative M).

This naturally shows up as the codomain of valuations in valuation theory.

def WithZero.exp E3 #

{M : Type u_5} → M → WithZero (Multiplicative M)

The exponential map as a function M → Mᵐ⁰.

theorem WithZero.exp_ne_zero E0 #

∀ {M : Type u_5} {a : M}, WithZero.exp a ≠ 0

theorem WithZero.exp_eq_coe_ofAdd E1 #

∀ {M : Type u_5} (a : M), WithZero.exp a = ↑(Multiplicative.ofAdd a)

theorem WithZero.exp_injective E1 #

∀ {M : Type u_5}, Function.Injective WithZero.exp

theorem WithZero.exp_inj E0 #

∀ {M : Type u_5} {x y : M}, WithZero.exp x = WithZero.exp y ↔ x = y

def WithZero.expRecOn E1 #

{M : Type u_5} →
  {motive : WithZero (Multiplicative M) → Sort u_7} →
    (x : WithZero (Multiplicative M)) → motive 0 → ((a : M) → motive (WithZero.exp a)) → motive x

Recursion principle for Mᵐ⁰. To construct predicate for all elements of Mᵐ⁰, it is enough to construct its value at 0 and its value at exp a for all a : M.

theorem WithZero.expRecOn_zero E0 #

∀ {M : Type u_5} {motive : WithZero (Multiplicative M) → Sort u_7} (zero : motive 0)
  (exp : (a : M) → motive (WithZero.exp a)), WithZero.expRecOn 0 zero exp = zero

theorem WithZero.expRecOn_exp E0 #

∀ {M : Type u_5} {motive : WithZero (Multiplicative M) → Sort u_7} (x : M) (zero : motive 0)
  (exp : (a : M) → motive (WithZero.exp a)), WithZero.expRecOn (WithZero.exp x) zero exp = exp x

instance WithZero.instCanLiftMultiplicativeExpNeOfNat E0 #

∀ {M : Type u_5}, CanLift (WithZero (Multiplicative M)) M WithZero.exp fun x ↦ x ≠ 0

def WithZero.log E1 #

{M : Type u_5} → [AddMonoid M] → WithZero (Multiplicative M) → M

The logarithm as a function Mᵐ⁰ → M with junk value log 0 = 0.

theorem WithZero.log_exp E0 #

∀ {M : Type u_5} [inst : AddMonoid M] (a : M), (WithZero.exp a).log = a

theorem WithZero.exp_log E0 #

∀ {M : Type u_5} [inst : AddMonoid M] {x : WithZero (Multiplicative M)}, x ≠ 0 → WithZero.exp x.log = x

theorem WithZero.log_zero E0 #

∀ {M : Type u_5} [inst : AddMonoid M], WithZero.log 0 = 0

theorem WithZero.exp_zero E0 #

∀ {M : Type u_5} [inst : AddMonoid M], WithZero.exp 0 = 1

theorem WithZero.exp_eq_one E0 #

∀ {M : Type u_5} [inst : AddMonoid M] {x : M}, WithZero.exp x = 1 ↔ x = 0

theorem WithZero.log_one E0 #

∀ {M : Type u_5} [inst : AddMonoid M], WithZero.log 1 = 0

theorem WithZero.exp_add E0 #

∀ {M : Type u_5} [inst : AddMonoid M] (a b : M), WithZero.exp (a + b) = WithZero.exp a * WithZero.exp b

theorem WithZero.log_mul E0 #

∀ {M : Type u_5} [inst : AddMonoid M] {x y : WithZero (Multiplicative M)}, x ≠ 0 → y ≠ 0 → (x * y).log = x.log + y.log

theorem WithZero.exp_nsmul E1 #

∀ {M : Type u_5} [inst : AddMonoid M] (n : ℕ) (a : M), WithZero.exp (n • a) = WithZero.exp a ^ n

theorem WithZero.log_pow E0 #

∀ {M : Type u_5} [inst : AddMonoid M] (x : WithZero (Multiplicative M)) (n : ℕ), (x ^ n).log = n • x.log

theorem WithZero.toAdd_unzero_eq_log E1 #

∀ {M : Type u_5} [inst : AddMonoid M] {x : WithZero (Multiplicative M)} (hx : x ≠ 0),
  Multiplicative.toAdd (WithZero.unzero hx) = x.log

def WithZero.expEquiv E1 #

{G : Type u_6} → [inst : AddGroup G] → G ≃ (WithZero (Multiplicative G))ˣ

The exponential map as an equivalence between G and (Gᵐ⁰)ˣ.

def WithZero.logEquiv E1 #

{G : Type u_6} → [inst : AddGroup G] → (WithZero (Multiplicative G))ˣ ≃ G

The logarithm as an equivalence between (Gᵐ⁰)ˣ and G.

theorem WithZero.logEquiv_symm E0 #

∀ {G : Type u_6} [inst : AddGroup G], WithZero.logEquiv.symm = WithZero.expEquiv

theorem WithZero.expEquiv_symm E0 #

∀ {G : Type u_6} [inst : AddGroup G], WithZero.expEquiv.symm = WithZero.logEquiv

theorem WithZero.coe_expEquiv_apply E0 #

∀ {G : Type u_6} [inst : AddGroup G] (a : G), ↑(WithZero.expEquiv a) = WithZero.exp a

theorem WithZero.logEquiv_apply E0 #

∀ {G : Type u_6} [inst : AddGroup G] (x : (WithZero (Multiplicative G))ˣ), WithZero.logEquiv x = (↑x).log

theorem WithZero.logEquiv_unitsMk0 E1 #

∀ {G : Type u_6} [inst : AddGroup G] (x : WithZero (Multiplicative G)) (hx : x ≠ 0),
  WithZero.logEquiv (Units.mk0 x hx) = x.log

theorem WithZero.exp_sub E0 #

∀ {G : Type u_6} [inst : AddGroup G] (a b : G), WithZero.exp (a - b) = WithZero.exp a / WithZero.exp b

theorem WithZero.log_div E0 #

∀ {G : Type u_6} [inst : AddGroup G] {x y : WithZero (Multiplicative G)}, x ≠ 0 → y ≠ 0 → (x / y).log = x.log - y.log

theorem WithZero.exp_neg E1 #

∀ {G : Type u_6} [inst : AddGroup G] (a : G), WithZero.exp (-a) = (WithZero.exp a)⁻¹

theorem WithZero.inv_exp E0 #

∀ {G : Type u_6} [inst : AddGroup G] (a : G), (WithZero.exp a)⁻¹ = WithZero.exp (-a)

theorem WithZero.log_inv E0 #

∀ {G : Type u_6} [inst : AddGroup G] (x : WithZero (Multiplicative G)), x⁻¹.log = -x.log

theorem WithZero.exp_zsmul E1 #

∀ {G : Type u_6} [inst : AddGroup G] (n : ℤ) (a : G), WithZero.exp (n • a) = WithZero.exp a ^ n

theorem WithZero.log_zpow E0 #

∀ {G : Type u_6} [inst : AddGroup G] (x : WithZero (Multiplicative G)) (n : ℤ), (x ^ n).log = n • x.log

theorem MonoidWithZeroHom.map_eq_zero_iff E0 #

∀ {G₀ : Type u_1} {M₀ : Type u_2} [inst : GroupWithZero G₀] [inst_1 : MulZeroOneClass M₀] [Nontrivial M₀]
  {f : G₀ →*₀ M₀} {x : G₀}, f x = 0 ↔ x = 0

theorem MonoidWithZeroHom.one_apply_val_unit E0 #

∀ {M₀ : Type u_1} {N₀ : Type u_2} [inst : MonoidWithZero M₀] [inst_1 : MulZeroOneClass N₀]
  [inst_2 : DecidablePred fun x ↦ x = 0] [inst_3 : Nontrivial M₀] [inst_4 : NoZeroDivisors M₀] (x : M₀ˣ), 1 ↑x = 1

theorem MonoidWithZeroHom.apply_one_apply_eq E0 #

∀ {M₀ : Type u_1} {N₀ : Type u_2} {G₀ : Type u_3} [inst : MulZeroOneClass M₀] [inst_1 : Nontrivial M₀]
  [inst_2 : NoZeroDivisors M₀] [inst_3 : MulZeroOneClass N₀] [inst_4 : MulZeroOneClass G₀]
  [inst_5 : DecidablePred fun x ↦ x = 0] (f : N₀ →*₀ G₀) (x : M₀), f (1 x) = 1 x

The trivial group-with-zero hom is absorbing for composition.

theorem MonoidWithZeroHom.comp_one E0 #

∀ {M₀ : Type u_1} {N₀ : Type u_2} {G₀ : Type u_3} [inst : MulZeroOneClass M₀] [inst_1 : Nontrivial M₀]
  [inst_2 : NoZeroDivisors M₀] [inst_3 : MulZeroOneClass N₀] [inst_4 : MulZeroOneClass G₀]
  [inst_5 : DecidablePred fun x ↦ x = 0] (f : N₀ →*₀ G₀), f.comp 1 = 1

The trivial group-with-zero hom is absorbing for composition.