Documentation

Mathlib.Algebra.Order.Hom.Basic

Algebraic order homomorphism classes #

This file defines hom classes for common properties at the intersection of order theory and algebra.

Typeclasses #

Basic typeclasses

Group norms

Ring norms

Notes #

Typeclasses for seminorms are defined here while types of seminorms are defined in Analysis.Normed.Group.Seminorm and Analysis.Normed.Ring.Seminorm because absolute values are multiplicative ring norms but outside of this use we only consider real-valued seminorms.

TODO #

Finitary versions of the current lemmas.

Diamond inheritance cannot depend on outParams in the following circumstances:

  • there are three classes Top, Middle, Bottom
  • all of these classes have a parameter (α : outParam _)
  • all of these classes have an instance parameter [Root α] that depends on this outParam
  • the Root class has two child classes: Left and Right, these are siblings in the hierarchy
  • the instance Bottom.toMiddle takes a [Left α] parameter
  • the instance Middle.toTop takes a [Right α] parameter
  • there is a Leaf class that inherits from both Left and Right. In that case, given instances Bottom α and Leaf α, Lean cannot synthesize a Top α instance, even though the hypotheses of the instances Bottom.toMiddle and Middle.toTop are satisfied.

There are two workarounds:

  • You could replace the bundled inheritance implemented by the instance Middle.toTop with unbundled inheritance implemented by adding a [Top α] parameter to the Middle class. This is the preferred option since it is also more compatible with Lean 4, at the cost of being more work to implement and more verbose to use.
  • You could weaken the Bottom.toMiddle instance by making it depend on a subclass of Middle.toTop's parameter, in this example replacing [Left α] with [Leaf α].
Equations
Instances For

    Basics #

    class NonnegHomClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Zero β] [LE β] [FunLike F α β] :

    NonnegHomClass F α β states that F is a type of nonnegative morphisms.

    • apply_nonneg (f : F) (a : α) : 0 f a

      the image of any element is nonnegative.

    Instances
      class SubadditiveHomClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Add α] [Add β] [LE β] [FunLike F α β] :

      SubadditiveHomClass F α β states that F is a type of subadditive morphisms.

      • map_add_le_add (f : F) (a b : α) : f (a + b) f a + f b

        the image of a sum is less or equal than the sum of the images.

      Instances
        class SubmultiplicativeHomClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Mul α] [Mul β] [LE β] [FunLike F α β] :

        SubmultiplicativeHomClass F α β states that F is a type of submultiplicative morphisms.

        • map_mul_le_mul (f : F) (a b : α) : f (a * b) f a * f b

          the image of a product is less or equal than the product of the images.

        Instances
          class MulLEAddHomClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Mul α] [Add β] [LE β] [FunLike F α β] :

          MulLEAddHomClass F α β states that F is a type of subadditive morphisms.

          • map_mul_le_add (f : F) (a b : α) : f (a * b) f a + f b

            the image of a product is less or equal than the sum of the images.

          Instances
            class NonarchimedeanHomClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Add α] [LinearOrder β] [FunLike F α β] :

            NonarchimedeanHomClass F α β states that F is a type of non-archimedean morphisms.

            • map_add_le_max (f : F) (a b : α) : f (a + b) max (f a) (f b)

              the image of a sum is less or equal than the maximum of the images.

            Instances
              theorem le_map_mul_map_div {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [CommMagma β] [LE β] [SubmultiplicativeHomClass F α β] (f : F) (a b : α) :
              f a f b * f (a / b)
              theorem le_map_add_map_sub {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMagma β] [LE β] [SubadditiveHomClass F α β] (f : F) (a b : α) :
              f a f b + f (a - b)
              theorem le_map_add_map_div {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMagma β] [LE β] [MulLEAddHomClass F α β] (f : F) (a b : α) :
              f a f b + f (a / b)
              theorem le_map_div_mul_map_div {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [Mul β] [LE β] [SubmultiplicativeHomClass F α β] (f : F) (a b c : α) :
              f (a / c) f (a / b) * f (b / c)
              theorem le_map_sub_add_map_sub {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [Add β] [LE β] [SubadditiveHomClass F α β] (f : F) (a b c : α) :
              f (a - c) f (a - b) + f (b - c)
              theorem le_map_div_add_map_div {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [Add β] [LE β] [MulLEAddHomClass F α β] (f : F) (a b c : α) :
              f (a / c) f (a / b) + f (b / c)

              Group (semi)norms #

              class AddGroupSeminormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [AddGroup α] [AddCommMonoid β] [PartialOrder β] [FunLike F α β] extends SubadditiveHomClass F α β :

              AddGroupSeminormClass F α states that F is a type of β-valued seminorms on the additive group α.

              You should extend this class when you extend AddGroupSeminorm.

              • map_add_le_add (f : F) (a b : α) : f (a + b) f a + f b
              • map_zero (f : F) : f 0 = 0

                The image of zero is zero.

              • map_neg_eq_map (f : F) (a : α) : f (-a) = f a

                The map is invariant under negation of its argument.

              Instances
                class GroupSeminormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Group α] [AddCommMonoid β] [PartialOrder β] [FunLike F α β] extends MulLEAddHomClass F α β :

                GroupSeminormClass F α states that F is a type of β-valued seminorms on the group α.

                You should extend this class when you extend GroupSeminorm.

                • map_mul_le_add (f : F) (a b : α) : f (a * b) f a + f b
                • map_one_eq_zero (f : F) : f 1 = 0

                  The image of one is zero.

                • map_inv_eq_map (f : F) (a : α) : f a⁻¹ = f a

                  The map is invariant under inversion of its argument.

                Instances
                  class AddGroupNormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [AddGroup α] [AddCommMonoid β] [PartialOrder β] [FunLike F α β] extends AddGroupSeminormClass F α β :

                  AddGroupNormClass F α states that F is a type of β-valued norms on the additive group α.

                  You should extend this class when you extend AddGroupNorm.

                  • map_add_le_add (f : F) (a b : α) : f (a + b) f a + f b
                  • map_zero (f : F) : f 0 = 0
                  • map_neg_eq_map (f : F) (a : α) : f (-a) = f a
                  • eq_zero_of_map_eq_zero (f : F) {a : α} : f a = 0a = 0

                    The argument is zero if its image under the map is zero.

                  Instances
                    class GroupNormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [Group α] [AddCommMonoid β] [PartialOrder β] [FunLike F α β] extends GroupSeminormClass F α β :

                    GroupNormClass F α states that F is a type of β-valued norms on the group α.

                    You should extend this class when you extend GroupNorm.

                    Instances
                      @[instance 100]
                      instance AddGroupSeminormClass.toZeroHomClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupSeminormClass F α β] :
                      ZeroHomClass F α β
                      theorem map_div_le_add {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [PartialOrder β] [GroupSeminormClass F α β] (f : F) (x y : α) :
                      f (x / y) f x + f y
                      theorem map_sub_le_add {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupSeminormClass F α β] (f : F) (x y : α) :
                      f (x - y) f x + f y
                      theorem map_div_rev {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [PartialOrder β] [GroupSeminormClass F α β] (f : F) (x y : α) :
                      f (x / y) = f (y / x)
                      theorem map_sub_rev {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupSeminormClass F α β] (f : F) (x y : α) :
                      f (x - y) = f (y - x)
                      theorem le_map_add_map_div' {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [PartialOrder β] [GroupSeminormClass F α β] (f : F) (x y : α) :
                      f x f y + f (y / x)
                      theorem le_map_add_map_sub' {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupSeminormClass F α β] (f : F) (x y : α) :
                      f x f y + f (y - x)
                      theorem abs_sub_map_le_div {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommGroup β] [LinearOrder β] [IsOrderedAddMonoid β] [GroupSeminormClass F α β] (f : F) (x y : α) :
                      |f x - f y| f (x / y)
                      theorem abs_sub_map_le_sub {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommGroup β] [LinearOrder β] [IsOrderedAddMonoid β] [AddGroupSeminormClass F α β] (f : F) (x y : α) :
                      |f x - f y| f (x - y)
                      @[instance 100]
                      instance GroupSeminormClass.toNonnegHomClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [LinearOrder β] [IsOrderedAddMonoid β] [GroupSeminormClass F α β] :
                      @[instance 100]
                      instance AddGroupSeminormClass.toNonnegHomClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [LinearOrder β] [IsOrderedAddMonoid β] [AddGroupSeminormClass F α β] :
                      theorem map_eq_zero_iff_eq_one {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [PartialOrder β] [GroupNormClass F α β] (f : F) {x : α} :
                      f x = 0 x = 1
                      theorem map_eq_zero_iff_eq_zero {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupNormClass F α β] (f : F) {x : α} :
                      f x = 0 x = 0
                      theorem map_ne_zero_iff_ne_one {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [PartialOrder β] [GroupNormClass F α β] (f : F) {x : α} :
                      f x 0 x 1
                      theorem map_ne_zero_iff_ne_zero {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [PartialOrder β] [AddGroupNormClass F α β] (f : F) {x : α} :
                      f x 0 x 0
                      theorem map_pos_of_ne_one {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [Group α] [AddCommMonoid β] [LinearOrder β] [IsOrderedAddMonoid β] [GroupNormClass F α β] (f : F) {x : α} (hx : x 1) :
                      0 < f x
                      theorem map_pos_of_ne_zero {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [AddGroup α] [AddCommMonoid β] [LinearOrder β] [IsOrderedAddMonoid β] [AddGroupNormClass F α β] (f : F) {x : α} (hx : x 0) :
                      0 < f x

                      Ring (semi)norms #

                      class RingSeminormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [NonUnitalNonAssocRing α] [Semiring β] [PartialOrder β] [FunLike F α β] extends AddGroupSeminormClass F α β, SubmultiplicativeHomClass F α β :

                      RingSeminormClass F α states that F is a type of β-valued seminorms on the ring α.

                      You should extend this class when you extend RingSeminorm.

                      Instances
                        class RingNormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [NonUnitalNonAssocRing α] [Semiring β] [PartialOrder β] [FunLike F α β] extends RingSeminormClass F α β, AddGroupNormClass F α β :

                        RingNormClass F α states that F is a type of β-valued norms on the ring α.

                        You should extend this class when you extend RingNorm.

                        Instances
                          class MulRingSeminormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [NonAssocRing α] [Semiring β] [PartialOrder β] [FunLike F α β] extends AddGroupSeminormClass F α β, MonoidWithZeroHomClass F α β :

                          MulRingSeminormClass F α states that F is a type of β-valued multiplicative seminorms on the ring α.

                          You should extend this class when you extend MulRingSeminorm.

                          Instances
                            class MulRingNormClass (F : Type u_7) (α : outParam (Type u_8)) (β : outParam (Type u_9)) [NonAssocRing α] [Semiring β] [PartialOrder β] [FunLike F α β] extends MulRingSeminormClass F α β, AddGroupNormClass F α β :

                            MulRingNormClass F α states that F is a type of β-valued multiplicative norms on the ring α.

                            You should extend this class when you extend MulRingNorm.

                            Instances
                              @[instance 100]
                              instance RingSeminormClass.toNonnegHomClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [NonUnitalNonAssocRing α] [Semiring β] [LinearOrder β] [IsOrderedAddMonoid β] [RingSeminormClass F α β] :
                              @[instance 100]
                              instance MulRingSeminormClass.toRingSeminormClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [NonAssocRing α] [Semiring β] [PartialOrder β] [MulRingSeminormClass F α β] :
                              @[instance 100]
                              instance MulRingNormClass.toRingNormClass {F : Type u_2} {α : Type u_3} {β : Type u_4} [FunLike F α β] [NonAssocRing α] [Semiring β] [PartialOrder β] [MulRingNormClass F α β] :