Documentation

Mathlib.Algebra.Group.Submonoid.Defs

Submonoids: definition #

This file defines bundled multiplicative and additive submonoids. We also define a CompleteLattice structure on Submonoids, define the closure of a set as the minimal submonoid that includes this set, and prove a few results about extending properties from a dense set (i.e. a set with closure s = ⊤) to the whole monoid, see Submonoid.dense_induction and MonoidHom.ofClosureEqTopLeft/MonoidHom.ofClosureEqTopRight.

Main definitions #

For each of the following definitions in the Submonoid namespace, there is a corresponding definition in the AddSubmonoid namespace.

Implementation notes #

Submonoid inclusion is denoted rather than , although is defined as membership of a submonoid's underlying set.

Note that Submonoid M does not actually require Monoid M, instead requiring only the weaker MulOneClass M.

This file is designed to have very few dependencies. In particular, it should not use natural numbers. Submonoid is implemented by extending Subsemigroup requiring one_mem'.

Tags #

submonoid, submonoids

class OneMemClass (S : Type u_3) (M : outParam (Type u_4)) [One M] [SetLike S M] :

OneMemClass S M says S is a type of subsets s ≤ M, such that 1 ∈ s for all s.

  • one_mem : ∀ (s : S), 1 s

    By definition, if we have OneMemClass S M, we have 1 ∈ s for all s : S.

Instances
    theorem OneMemClass.one_mem {S : Type u_3} {M : outParam (Type u_4)} :
    ∀ {inst : One M} {inst_1 : SetLike S M} [self : OneMemClass S M] (s : S), 1 s

    By definition, if we have OneMemClass S M, we have 1 ∈ s for all s : S.

    class ZeroMemClass (S : Type u_3) (M : outParam (Type u_4)) [Zero M] [SetLike S M] :

    ZeroMemClass S M says S is a type of subsets s ≤ M, such that 0 ∈ s for all s.

    • zero_mem : ∀ (s : S), 0 s

      By definition, if we have ZeroMemClass S M, we have 0 ∈ s for all s : S.

    Instances
      theorem ZeroMemClass.zero_mem {S : Type u_3} {M : outParam (Type u_4)} :
      ∀ {inst : Zero M} {inst_1 : SetLike S M} [self : ZeroMemClass S M] (s : S), 0 s

      By definition, if we have ZeroMemClass S M, we have 0 ∈ s for all s : S.

      structure Submonoid (M : Type u_3) [MulOneClass M] extends Subsemigroup :
      Type u_3

      A submonoid of a monoid M is a subset containing 1 and closed under multiplication.

      • carrier : Set M
      • mul_mem' : ∀ {a b : M}, a self.carrierb self.carriera * b self.carrier
      • one_mem' : 1 self.carrier

        A submonoid contains 1.

      Instances For
        theorem Submonoid.one_mem' {M : Type u_3} [MulOneClass M] (self : Submonoid M) :
        1 self.carrier

        A submonoid contains 1.

        class SubmonoidClass (S : Type u_3) (M : outParam (Type u_4)) [MulOneClass M] [SetLike S M] extends MulMemClass , OneMemClass :

        SubmonoidClass S M says S is a type of subsets s ≤ M that contain 1 and are closed under (*)

          Instances
            structure AddSubmonoid (M : Type u_3) [AddZeroClass M] extends AddSubsemigroup :
            Type u_3

            An additive submonoid of an additive monoid M is a subset containing 0 and closed under addition.

            • carrier : Set M
            • add_mem' : ∀ {a b : M}, a self.carrierb self.carriera + b self.carrier
            • zero_mem' : 0 self.carrier

              An additive submonoid contains 0.

            Instances For
              theorem AddSubmonoid.zero_mem' {M : Type u_3} [AddZeroClass M] (self : AddSubmonoid M) :
              0 self.carrier

              An additive submonoid contains 0.

              class AddSubmonoidClass (S : Type u_3) (M : outParam (Type u_4)) [AddZeroClass M] [SetLike S M] extends AddMemClass , ZeroMemClass :

              AddSubmonoidClass S M says S is a type of subsets s ≤ M that contain 0 and are closed under (+)

                Instances
                  theorem pow_mem {M : Type u_3} {A : Type u_4} [Monoid M] [SetLike A M] [SubmonoidClass A M] {S : A} {x : M} (hx : x S) (n : ) :
                  x ^ n S
                  theorem nsmul_mem {M : Type u_3} {A : Type u_4} [AddMonoid M] [SetLike A M] [AddSubmonoidClass A M] {S : A} {x : M} (hx : x S) (n : ) :
                  n x S
                  Equations
                  • Submonoid.instSetLike = { coe := fun (s : Submonoid M) => s.carrier, coe_injective' := }
                  Equations
                  • AddSubmonoid.instSetLike = { coe := fun (s : AddSubmonoid M) => s.carrier, coe_injective' := }
                  theorem AddSubmonoid.instSetLike.proof_1 {M : Type u_1} [AddZeroClass M] (p : AddSubmonoid M) (q : AddSubmonoid M) (h : (fun (s : AddSubmonoid M) => s.carrier) p = (fun (s : AddSubmonoid M) => s.carrier) q) :
                  p = q
                  Equations
                  • =
                  @[simp]
                  theorem Submonoid.mem_toSubsemigroup {M : Type u_1} [MulOneClass M] {s : Submonoid M} {x : M} :
                  x s.toSubsemigroup x s
                  @[simp]
                  theorem AddSubmonoid.mem_toSubsemigroup {M : Type u_1} [AddZeroClass M] {s : AddSubmonoid M} {x : M} :
                  x s.toAddSubsemigroup x s
                  theorem Submonoid.mem_carrier {M : Type u_1} [MulOneClass M] {s : Submonoid M} {x : M} :
                  x s.carrier x s
                  theorem AddSubmonoid.mem_carrier {M : Type u_1} [AddZeroClass M] {s : AddSubmonoid M} {x : M} :
                  x s.carrier x s
                  @[simp]
                  theorem Submonoid.mem_mk {M : Type u_1} [MulOneClass M] {s : Subsemigroup M} {x : M} (h_one : 1 s.carrier) :
                  x { toSubsemigroup := s, one_mem' := h_one } x s
                  @[simp]
                  theorem AddSubmonoid.mem_mk {M : Type u_1} [AddZeroClass M] {s : AddSubsemigroup M} {x : M} (h_one : 0 s.carrier) :
                  x { toAddSubsemigroup := s, zero_mem' := h_one } x s
                  @[simp]
                  theorem Submonoid.coe_set_mk {M : Type u_1} [MulOneClass M] {s : Subsemigroup M} (h_one : 1 s.carrier) :
                  { toSubsemigroup := s, one_mem' := h_one } = s
                  @[simp]
                  theorem AddSubmonoid.coe_set_mk {M : Type u_1} [AddZeroClass M] {s : AddSubsemigroup M} (h_one : 0 s.carrier) :
                  { toAddSubsemigroup := s, zero_mem' := h_one } = s
                  @[simp]
                  theorem Submonoid.mk_le_mk {M : Type u_1} [MulOneClass M] {s : Subsemigroup M} {t : Subsemigroup M} (h_one : 1 s.carrier) (h_one' : 1 t.carrier) :
                  { toSubsemigroup := s, one_mem' := h_one } { toSubsemigroup := t, one_mem' := h_one' } s t
                  @[simp]
                  theorem AddSubmonoid.mk_le_mk {M : Type u_1} [AddZeroClass M] {s : AddSubsemigroup M} {t : AddSubsemigroup M} (h_one : 0 s.carrier) (h_one' : 0 t.carrier) :
                  { toAddSubsemigroup := s, zero_mem' := h_one } { toAddSubsemigroup := t, zero_mem' := h_one' } s t
                  theorem AddSubmonoid.ext {M : Type u_1} [AddZeroClass M] {S : AddSubmonoid M} {T : AddSubmonoid M} (h : ∀ (x : M), x S x T) :
                  S = T

                  Two AddSubmonoids are equal if they have the same elements.

                  theorem Submonoid.ext {M : Type u_1} [MulOneClass M] {S : Submonoid M} {T : Submonoid M} (h : ∀ (x : M), x S x T) :
                  S = T

                  Two submonoids are equal if they have the same elements.

                  def Submonoid.copy {M : Type u_1} [MulOneClass M] (S : Submonoid M) (s : Set M) (hs : s = S) :

                  Copy a submonoid replacing carrier with a set that is equal to it.

                  Equations
                  • S.copy s hs = { carrier := s, mul_mem' := , one_mem' := }
                  Instances For
                    theorem AddSubmonoid.copy.proof_2 {M : Type u_1} [AddZeroClass M] (S : AddSubmonoid M) (s : Set M) (hs : s = S) :
                    0 s
                    def AddSubmonoid.copy {M : Type u_1} [AddZeroClass M] (S : AddSubmonoid M) (s : Set M) (hs : s = S) :

                    Copy an additive submonoid replacing carrier with a set that is equal to it.

                    Equations
                    • S.copy s hs = { carrier := s, add_mem' := , zero_mem' := }
                    Instances For
                      theorem AddSubmonoid.copy.proof_1 {M : Type u_1} [AddZeroClass M] (S : AddSubmonoid M) (s : Set M) (hs : s = S) :
                      ∀ {a b : M}, a sb sa + b s
                      @[simp]
                      theorem Submonoid.coe_copy {M : Type u_1} [MulOneClass M] {S : Submonoid M} {s : Set M} (hs : s = S) :
                      (S.copy s hs) = s
                      @[simp]
                      theorem AddSubmonoid.coe_copy {M : Type u_1} [AddZeroClass M] {S : AddSubmonoid M} {s : Set M} (hs : s = S) :
                      (S.copy s hs) = s
                      theorem Submonoid.copy_eq {M : Type u_1} [MulOneClass M] {S : Submonoid M} {s : Set M} (hs : s = S) :
                      S.copy s hs = S
                      theorem AddSubmonoid.copy_eq {M : Type u_1} [AddZeroClass M] {S : AddSubmonoid M} {s : Set M} (hs : s = S) :
                      S.copy s hs = S
                      theorem Submonoid.one_mem {M : Type u_1} [MulOneClass M] (S : Submonoid M) :
                      1 S

                      A submonoid contains the monoid's 1.

                      theorem AddSubmonoid.zero_mem {M : Type u_1} [AddZeroClass M] (S : AddSubmonoid M) :
                      0 S

                      An AddSubmonoid contains the monoid's 0.

                      theorem Submonoid.mul_mem {M : Type u_1} [MulOneClass M] (S : Submonoid M) {x : M} {y : M} :
                      x Sy Sx * y S

                      A submonoid is closed under multiplication.

                      theorem AddSubmonoid.add_mem {M : Type u_1} [AddZeroClass M] (S : AddSubmonoid M) {x : M} {y : M} :
                      x Sy Sx + y S

                      An AddSubmonoid is closed under addition.

                      instance Submonoid.instTop {M : Type u_1} [MulOneClass M] :

                      The submonoid M of the monoid M.

                      Equations
                      • Submonoid.instTop = { top := { carrier := Set.univ, mul_mem' := , one_mem' := } }
                      theorem AddSubmonoid.instTop.proof_2 {M : Type u_1} [AddZeroClass M] :
                      0 Set.univ

                      The additive submonoid M of the AddMonoid M.

                      Equations
                      • AddSubmonoid.instTop = { top := { carrier := Set.univ, add_mem' := , zero_mem' := } }
                      theorem AddSubmonoid.instTop.proof_1 {M : Type u_1} [AddZeroClass M] :
                      ∀ {a b : M}, a Set.univb Set.univa + b Set.univ
                      instance Submonoid.instBot {M : Type u_1} [MulOneClass M] :

                      The trivial submonoid {1} of a monoid M.

                      Equations
                      • Submonoid.instBot = { bot := { carrier := {1}, mul_mem' := , one_mem' := } }

                      The trivial AddSubmonoid {0} of an AddMonoid M.

                      Equations
                      • AddSubmonoid.instBot = { bot := { carrier := {0}, add_mem' := , zero_mem' := } }
                      theorem AddSubmonoid.instBot.proof_1 {M : Type u_1} [AddZeroClass M] :
                      ∀ {a b : M}, a {0}b {0}a + b {0}
                      Equations
                      • Submonoid.instInhabited = { default := }
                      Equations
                      • AddSubmonoid.instInhabited = { default := }
                      @[simp]
                      theorem Submonoid.mem_bot {M : Type u_1} [MulOneClass M] {x : M} :
                      x x = 1
                      @[simp]
                      theorem AddSubmonoid.mem_bot {M : Type u_1} [AddZeroClass M] {x : M} :
                      x x = 0
                      @[simp]
                      theorem Submonoid.mem_top {M : Type u_1} [MulOneClass M] (x : M) :
                      @[simp]
                      theorem AddSubmonoid.mem_top {M : Type u_1} [AddZeroClass M] (x : M) :
                      @[simp]
                      theorem Submonoid.coe_top {M : Type u_1} [MulOneClass M] :
                      = Set.univ
                      @[simp]
                      theorem AddSubmonoid.coe_top {M : Type u_1} [AddZeroClass M] :
                      = Set.univ
                      @[simp]
                      theorem Submonoid.coe_bot {M : Type u_1} [MulOneClass M] :
                      = {1}
                      @[simp]
                      theorem AddSubmonoid.coe_bot {M : Type u_1} [AddZeroClass M] :
                      = {0}
                      instance Submonoid.instInf {M : Type u_1} [MulOneClass M] :

                      The inf of two submonoids is their intersection.

                      Equations
                      • Submonoid.instInf = { inf := fun (S₁ S₂ : Submonoid M) => { carrier := S₁ S₂, mul_mem' := , one_mem' := } }
                      theorem AddSubmonoid.instInf.proof_2 {M : Type u_1} [AddZeroClass M] (S₁ : AddSubmonoid M) (S₂ : AddSubmonoid M) :
                      0 S₁ 0 S₂

                      The inf of two AddSubmonoids is their intersection.

                      Equations
                      • AddSubmonoid.instInf = { inf := fun (S₁ S₂ : AddSubmonoid M) => { carrier := S₁ S₂, add_mem' := , zero_mem' := } }
                      theorem AddSubmonoid.instInf.proof_1 {M : Type u_1} [AddZeroClass M] (S₁ : AddSubmonoid M) (S₂ : AddSubmonoid M) :
                      ∀ {a b : M}, a S₁ S₂b S₁ S₂a + b S₁ S₂
                      @[simp]
                      theorem Submonoid.coe_inf {M : Type u_1} [MulOneClass M] (p : Submonoid M) (p' : Submonoid M) :
                      (p p') = p p'
                      @[simp]
                      theorem AddSubmonoid.coe_inf {M : Type u_1} [AddZeroClass M] (p : AddSubmonoid M) (p' : AddSubmonoid M) :
                      (p p') = p p'
                      @[simp]
                      theorem Submonoid.mem_inf {M : Type u_1} [MulOneClass M] {p : Submonoid M} {p' : Submonoid M} {x : M} :
                      x p p' x p x p'
                      @[simp]
                      theorem AddSubmonoid.mem_inf {M : Type u_1} [AddZeroClass M] {p : AddSubmonoid M} {p' : AddSubmonoid M} {x : M} :
                      x p p' x p x p'
                      Equations
                      • Submonoid.instUniqueOfSubsingleton = { default := , uniq := }
                      Equations
                      • AddSubmonoid.instUniqueOfSubsingleton = { default := , uniq := }
                      Equations
                      • =
                      def MonoidHom.eqLocusM {M : Type u_1} {N : Type u_2} [MulOneClass M] [MulOneClass N] (f : M →* N) (g : M →* N) :

                      The submonoid of elements x : M such that f x = g x

                      Equations
                      • f.eqLocusM g = { carrier := {x : M | f x = g x}, mul_mem' := , one_mem' := }
                      Instances For
                        theorem AddMonoidHom.eqLocusM.proof_1 {M : Type u_2} {N : Type u_1} [AddZeroClass M] [AddZeroClass N] (f : M →+ N) (g : M →+ N) :
                        ∀ {a b : M}, f a = g af b = g bf (a + b) = g (a + b)
                        theorem AddMonoidHom.eqLocusM.proof_2 {M : Type u_1} {N : Type u_2} [AddZeroClass M] [AddZeroClass N] (f : M →+ N) (g : M →+ N) :
                        0 { carrier := {x : M | f x = g x}, add_mem' := }.carrier
                        def AddMonoidHom.eqLocusM {M : Type u_1} {N : Type u_2} [AddZeroClass M] [AddZeroClass N] (f : M →+ N) (g : M →+ N) :

                        The additive submonoid of elements x : M such that f x = g x

                        Equations
                        • f.eqLocusM g = { carrier := {x : M | f x = g x}, add_mem' := , zero_mem' := }
                        Instances For
                          @[simp]
                          theorem MonoidHom.eqLocusM_same {M : Type u_1} {N : Type u_2} [MulOneClass M] [MulOneClass N] (f : M →* N) :
                          f.eqLocusM f =
                          @[simp]
                          theorem AddMonoidHom.eqLocusM_same {M : Type u_1} {N : Type u_2} [AddZeroClass M] [AddZeroClass N] (f : M →+ N) :
                          f.eqLocusM f =
                          theorem MonoidHom.eq_of_eqOn_topM {M : Type u_1} {N : Type u_2} [MulOneClass M] [MulOneClass N] {f : M →* N} {g : M →* N} (h : Set.EqOn f g ) :
                          f = g
                          theorem AddMonoidHom.eq_of_eqOn_topM {M : Type u_1} {N : Type u_2} [AddZeroClass M] [AddZeroClass N] {f : M →+ N} {g : M →+ N} (h : Set.EqOn f g ) :
                          f = g