Documentation

Mathlib.Algebra.Order.Hom.MonoidWithZero

Ordered monoid and group homomorphisms #

This file defines morphisms between (additive) ordered monoids with zero.

Types of morphisms #

Notation #

TODO #

Tags #

monoid with zero

structure OrderMonoidWithZeroHom (α : Type u_6) (β : Type u_7) [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] extends α →*₀ β :
Type (max u_6 u_7)

OrderMonoidWithZeroHom α β is the type of functions α → β that preserve the MonoidWithZero structure.

OrderMonoidWithZeroHom is also used for group homomorphisms.

When possible, instead of parametrizing results over (f : α →+ β), you should parameterize over (F : Type*) [FunLike F M N] [MonoidWithZeroHomClass F M N] [OrderHomClass F M N] (f : F).

Instances For
    def OrderMonoidWithZeroHom.ofClass {F : Type u_1} {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] [FunLike F α β] [OrderHomClass F α β] [MonoidWithZeroHomClass F α β] (f : F) :
    α →*₀o β

    Turn an element of a type F satisfying OrderHomClass F α β and MonoidWithZeroHomClass F α β into an actual OrderMonoidWithZeroHom.

    Equations
    Instances For
      @[deprecated OrderMonoidWithZeroHom.ofClass (since := "2026-11-26")]
      def OrderMonoidWithZeroHomClass.toOrderMonoidWithZeroHom {F : Type u_1} {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] [FunLike F α β] [OrderHomClass F α β] [MonoidWithZeroHomClass F α β] (f : F) :
      α →*₀o β

      Alias of OrderMonoidWithZeroHom.ofClass.


      Turn an element of a type F satisfying OrderHomClass F α β and MonoidWithZeroHomClass F α β into an actual OrderMonoidWithZeroHom.

      Equations
      Instances For
        @[instance_reducible, macro_inline]
        instance OrderMonoidWithZeroHom.instFunLike {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] :
        FunLike (α →*₀o β) α β
        Equations
        @[simp]
        theorem OrderMonoidWithZeroHom.coe_ofClass {F : Type u_1} {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] [FunLike F α β] [OrderHomClass F α β] [MonoidWithZeroHomClass F α β] (f : F) :
        ⇑(ofClass f) = ⇑f
        @[deprecated OrderMonoidWithZeroHom.coe_ofClass (since := "2026-11-27")]
        theorem OrderMonoidWithZeroHom.ext {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] {f g : α →*₀o β} (h : ∀ (a : α), f a = g a) :
        f = g
        theorem OrderMonoidWithZeroHom.ext_iff {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] {f g : α →*₀o β} :
        f = g ↔ ∀ (a : α), f a = g a
        theorem OrderMonoidWithZeroHom.toFun_eq_coe {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
        (↑↑f).toFun = ⇑f
        @[simp]
        theorem OrderMonoidWithZeroHom.coe_mk {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀ β) (h : Monotone (↑f).toFun) :
        ⇑{ toMonoidWithZeroHom := f, monotone' := h } = ⇑f
        @[simp]
        theorem OrderMonoidWithZeroHom.mk_toMonoidWithZeroHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (h : Monotone (↑↑f).toFun) :
        { toMonoidWithZeroHom := ↑f, monotone' := h } = f
        @[deprecated OrderMonoidWithZeroHom.mk_toMonoidWithZeroHom (since := "2026-09-15")]
        theorem OrderMonoidWithZeroHom.mk_coe {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (h : Monotone (↑↑f).toFun) :
        { toMonoidWithZeroHom := ↑f, monotone' := h } = f

        Alias of OrderMonoidWithZeroHom.mk_toMonoidWithZeroHom.

        @[deprecated OrderMonoidWithZeroHom.mk_toMonoidWithZeroHom (since := "2026-09-15")]
        theorem OrderMonoidWithZeroHom.ofClass_mk {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (h : Monotone (↑↑f).toFun) :
        { toMonoidWithZeroHom := ↑f, monotone' := h } = f

        Alias of OrderMonoidWithZeroHom.mk_toMonoidWithZeroHom.

        def OrderMonoidWithZeroHom.toOrderMonoidHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
        α →*o β

        Reinterpret an ordered monoid with zero homomorphism as an order monoid homomorphism.

        Equations
        Instances For
          @[simp]
          theorem OrderMonoidWithZeroHom.coe_toMonoidWithZeroHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
          ⇑↑f = ⇑f
          @[deprecated OrderMonoidWithZeroHom.coe_toMonoidWithZeroHom (since := "2026-09-15")]
          theorem OrderMonoidWithZeroHom.coe_monoidWithZeroHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
          ⇑↑f = ⇑f

          Alias of OrderMonoidWithZeroHom.coe_toMonoidWithZeroHom.

          @[simp]
          theorem OrderMonoidWithZeroHom.coe_toOrderMonoidHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
          @[deprecated OrderMonoidWithZeroHom.coe_toOrderMonoidHom (since := "2026-09-15")]
          theorem OrderMonoidWithZeroHom.coe_orderMonoidHom {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :

          Alias of OrderMonoidWithZeroHom.coe_toOrderMonoidHom.

          def OrderMonoidWithZeroHom.copy {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (f' : α → β) (h : f' = ⇑f) :
          α →*₀o β

          Copy of an OrderMonoidWithZeroHom with a new toFun equal to the old one. Useful to fix definitional equalities.

          Equations
          Instances For
            @[simp]
            theorem OrderMonoidWithZeroHom.coe_copy {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (f' : α → β) (h : f' = ⇑f) :
            ⇑(f.copy f' h) = f'
            theorem OrderMonoidWithZeroHom.copy_eq {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) (f' : α → β) (h : f' = ⇑f) :
            f.copy f' h = f

            The identity map as an ordered monoid with zero homomorphism.

            Equations
            Instances For
              def OrderMonoidWithZeroHom.comp {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) :
              α →*₀o γ

              Composition of OrderMonoidWithZeroHoms as an OrderMonoidWithZeroHom.

              Equations
              • f.comp g = let __src := (↑f).comp ↑g; { toMonoidWithZeroHom := __src, monotone' := ⋯ }
              Instances For
                @[simp]
                theorem OrderMonoidWithZeroHom.coe_comp {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) :
                ⇑(f.comp g) = ⇑f ∘ ⇑g
                @[simp]
                theorem OrderMonoidWithZeroHom.comp_apply {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) (a : α) :
                (f.comp g) a = f (g a)
                @[simp]
                theorem OrderMonoidWithZeroHom.toMonoidWithZeroHom_comp {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) :
                ↑(f.comp g) = (↑f).comp ↑g
                @[deprecated OrderMonoidWithZeroHom.toMonoidWithZeroHom_comp (since := "2026-09-15")]
                theorem OrderMonoidWithZeroHom.ofClass_comp_monoidWithZeroHom {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) :
                ↑(f.comp g) = (↑f).comp ↑g

                Alias of OrderMonoidWithZeroHom.toMonoidWithZeroHom_comp.

                @[deprecated OrderMonoidWithZeroHom.toMonoidWithZeroHom_comp (since := "2026-09-15")]
                theorem OrderMonoidWithZeroHom.ofClass_comp {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] (f : β →*₀o γ) (g : α →*₀o β) :
                ↑(f.comp g) = (↑f).comp ↑g

                Alias of OrderMonoidWithZeroHom.toMonoidWithZeroHom_comp.

                @[deprecated OrderMonoidWithZeroHom.toOrderMonoidHom_comp (since := "2026-09-15")]

                Alias of OrderMonoidWithZeroHom.toOrderMonoidHom_comp.

                @[simp]
                theorem OrderMonoidWithZeroHom.comp_assoc {α : Type u_2} {β : Type u_3} {γ : Type u_4} {δ : Type u_5} [Preorder α] [Preorder β] [Preorder γ] [Preorder δ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] [MulZeroOneClass δ] (f : γ →*₀o δ) (g : β →*₀o γ) (h : α →*₀o β) :
                (f.comp g).comp h = f.comp (g.comp h)
                @[simp]
                theorem OrderMonoidWithZeroHom.comp_id {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
                @[simp]
                theorem OrderMonoidWithZeroHom.id_comp {α : Type u_2} {β : Type u_3} [Preorder α] [Preorder β] [MulZeroOneClass α] [MulZeroOneClass β] (f : α →*₀o β) :
                @[simp]
                theorem OrderMonoidWithZeroHom.cancel_right {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] {g₁ g₂ : β →*₀o γ} {f : α →*₀o β} (hf : Function.Surjective ⇑f) :
                g₁.comp f = g₂.comp f ↔ g₁ = g₂
                @[simp]
                theorem OrderMonoidWithZeroHom.cancel_left {α : Type u_2} {β : Type u_3} {γ : Type u_4} [Preorder α] [Preorder β] [Preorder γ] [MulZeroOneClass α] [MulZeroOneClass β] [MulZeroOneClass γ] {g : β →*₀o γ} {f₁ f₂ : α →*₀o β} (hg : Function.Injective ⇑g) :
                g.comp f₁ = g.comp f₂ ↔ f₁ = f₂
                @[instance_reducible]

                For two ordered monoid morphisms f and g, their product is the ordered monoid morphism sending a to f a * g a.

                Equations
                @[simp]
                theorem OrderMonoidWithZeroHom.coe_mul {α : Type u_2} {β : Type u_3} [LinearOrderedCommMonoidWithZero α] [LinearOrderedCommMonoidWithZero β] (f g : α →*₀o β) :
                ⇑(f * g) = ⇑f * ⇑g
                @[simp]
                theorem OrderMonoidWithZeroHom.mul_apply {α : Type u_2} {β : Type u_3} [LinearOrderedCommMonoidWithZero α] [LinearOrderedCommMonoidWithZero β] (f g : α →*₀o β) (a : α) :
                (f * g) a = f a * g a
                theorem OrderMonoidWithZeroHom.mul_comp {α : Type u_2} {β : Type u_3} {γ : Type u_4} [LinearOrderedCommMonoidWithZero α] [LinearOrderedCommMonoidWithZero β] [LinearOrderedCommMonoidWithZero γ] (g₁ g₂ : β →*₀o γ) (f : α →*₀o β) :
                (g₁ * g₂).comp f = g₁.comp f * g₂.comp f
                theorem OrderMonoidWithZeroHom.comp_mul {α : Type u_2} {β : Type u_3} {γ : Type u_4} [LinearOrderedCommMonoidWithZero α] [LinearOrderedCommMonoidWithZero β] [LinearOrderedCommMonoidWithZero γ] (g : β →*₀o γ) (f₁ f₂ : α →*₀o β) :
                g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂
                @[simp]
                theorem OrderMonoidWithZeroHom.ofClass_eq_toMonoidWithZeroHom {α : Type u_2} {β : Type u_3} {hα : Preorder α} {hα' : MulZeroOneClass α} {hβ : Preorder β} {hβ' : MulZeroOneClass β} (f : α →*₀o β) :
                @[deprecated OrderMonoidWithZeroHom.ofClass_eq_toMonoidWithZeroHom "Use `← ofClass_eq_toMonoidWithZeroHom` instead." (since := "2026-09-15")]
                theorem OrderMonoidWithZeroHom.toMonoidWithZeroHom_eq_ofClass {α : Type u_2} {β : Type u_3} {hα : Preorder α} {hα' : MulZeroOneClass α} {hβ : Preorder β} {hβ' : MulZeroOneClass β} (f : α →*₀o β) :

                Alias of OrderMonoidWithZeroHom.ofClass_eq_toMonoidWithZeroHom.

                @[deprecated OrderMonoidWithZeroHom.toOrderMonoidHom_eq_ofClass (since := "2026-11-26")]
                theorem OrderMonoidWithZeroHom.toOrderMonoidHom_eq_coe {α : Type u_2} {β : Type u_3} {hα : Preorder α} {hα' : MulZeroOneClass α} {hβ : Preorder β} {hβ' : MulZeroOneClass β} (f : α →*₀o β) :

                Alias of OrderMonoidWithZeroHom.toOrderMonoidHom_eq_ofClass.

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

                Equations
                Instances For
                  theorem OrderMonoidIso.val_unitsWithZero_symm_apply {α : Type u_6} [Group α] [Preorder α] (a : α) :
                  ↑(unitsWithZero.symm a) = ↑a
                  def OrderMonoidIso.withZero {G : Type u_6} {H : Type u_7} [Group G] [PartialOrder G] [Group H] [PartialOrder H] :

                  A version of Equiv.optionCongr for WithZero on OrderMonoidIso.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    @[simp]
                    theorem OrderMonoidIso.withZero_apply_symm_apply {G : Type u_6} {H : Type u_7} [Group G] [PartialOrder G] [Group H] [PartialOrder H] (e : G ≃*o H) (a : WithZero H) :
                    (withZero e).symm a = (WithZero.map' ↑(↑e).symm) a
                    @[simp]
                    theorem OrderMonoidIso.withZero_apply_apply {G : Type u_6} {H : Type u_7} [Group G] [PartialOrder G] [Group H] [PartialOrder H] (e : G ≃*o H) (a : WithZero G) :
                    (withZero e) a = (WithZero.map' ↑↑e) a

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

                    Equations
                    Instances For
                      @[simp]
                      theorem OrderMonoidIso.withZeroUnits_symm_apply {α : Type u_6} [LinearOrderedCommGroupWithZero α] [DecidablePred fun (a : α) => a = 0] (a : α) :
                      withZeroUnits.symm a = if h : a = 0 then 0 else ↑(Units.mk0 a h)
                      @[simp]