Documentation

MyProject.Substructures

Substructures of Semigroups #

In this file, we extend Mathlib's Subsemigroup structure to define structures for Submonoid and Subgroup. Note that these are different that the mathlib notions of Submonoid and Subgroup which requrire the outer structure to also be a monoid/group, so we put all definitions in the Semigroup namespace to avoid conflict

Main Definitions #

References #

See https://avigad.github.io/mathematics_in_lean/C08_Hierarchies.html#sub-objects

TODO #

Redefine group with only left inverse requirement not both.

Blueprint #

Subgroup of a Semigroup Label: def:subgroup-of-semigroup Lean definition to tag: Semigroup.Subgroup dependencies: None

Maximal Subgroup label: def:maximal-subgroup Lean definition to tag: Semigroup.Subgroup.isMaximal Dependencies: def:subgroup-of-semigroup

Structure definitions #

The definition of Semigroup.Subsemigroup is copied from mathlibs Subsemigroup, except we requrie an outer Semigroup structure. These BUNDLED structures come with SetLike instances, enabiling a coersion to Set so you can write things like x ∈ H for x : S and H : Subsemigroup S. It also provides the lattice strucure (⊓ ⊔ ⊤ ⊥) and the cannonical subtype H : Type := {x // x ∈ carrier}

structure Semigroup.Subsemigroup (S : Type u_1) [Semigroup S] :
Type u_1

A subsemigroup of a Semigroup S is a subset closed under multiplication.

  • carrier : Set S

    The carrier of a subsemigroup.

  • mul_mem {a b : S} : a self.carrierb self.carriera * b self.carrier

    The product of two elements of a subsemigroup belongs to the subsemigroup.

Instances For

    We prove that Subsemigroup S has an injective coersion to Set S

    Equations

    We define * on the subsemigroup as a subtype

    Equations

    We relate our defintion of * in the subtype to that outside of the subtype

    @[simp]
    theorem Semigroup.Subsemigroup.coe_mul {S : Type u_1} [Semigroup S] {T : Subsemigroup S} (x y : T) :
    ↑(x * y) = x * y
    @[simp]
    theorem Semigroup.Subsemigroup.mk_mul_mk {S : Type u_1} [Semigroup S] {T : Subsemigroup S} (x y : S) (hx : x T) (hy : y T) :
    x, hx * y, hy = x * y,
    @[simp]
    theorem Semigroup.Subsemigroup.mul_def {S : Type u_1} [Semigroup S] {T : Subsemigroup S} (x y : T) :
    x * y = x * y,

    A subsemigroup is a semigroup on its subtype

    Equations
    structure Semigroup.Submonoid (S : Type u_1) [Semigroup S] extends Semigroup.Subsemigroup S :
    Type u_1

    A submonoid of a Semigroup S is a subset closed under multiplication and containing and identity element

    Instances For
      theorem Semigroup.Submonoid.one_eq {S : Type u_1} [Semigroup S] {T₁ T₂ : Submonoid S} (heq : T₁.carrier = T₂.carrier) :
      T₁.one = T₂.one

      In Order to obtain the SetLike instance, we need to construct an injection from Submonoids to Sets. This means that we must prove that, if the carrier of two Submonoids is equal, then the one elements must be equal.

      We prove that Submonoid S has an injective coersion to Set S

      Equations

      We define * on the submonoid as a subtype

      Equations

      We relate our defintion of * in the subtype to that outside of the subtype

      @[simp]
      theorem Semigroup.Submonoid.coe_mul {S : Type u_1} [Semigroup S] {T : Submonoid S} (x y : T) :
      ↑(x * y) = x * y
      @[simp]
      theorem Semigroup.Submonoid.mk_mul_mk {S : Type u_1} [Semigroup S] {T : Submonoid S} (x y : S) (hx : x T) (hy : y T) :
      x, hx * y, hy = x * y,
      @[simp]
      theorem Semigroup.Submonoid.mul_def {S : Type u_1} [Semigroup S] {T : Submonoid S} (x y : T) :
      x * y = x * y,

      We relate our identiy properties to the subtype

      theorem Semigroup.Submonoid.one_def {S : Type u_1} [Semigroup S] {T : Submonoid S} :
      1 = T.one,
      @[simp]
      theorem Semigroup.Submonoid.coe_one {S : Type u_1} [Semigroup S] {T : Submonoid S} :
      1 = T.one
      @[simp]
      theorem Semigroup.Submonoid.coe_mul_one {S : Type u_1} [Semigroup S] {T : Submonoid S} (x : T) :
      x * 1 = x
      @[simp]
      theorem Semigroup.Submonoid.coe_one_mul {S : Type u_1} [Semigroup S] {T : Submonoid S} (x : T) :
      1 * x = x
      instance Semigroup.Submonoid.toMonoid {S : Type u_1} [Semigroup S] {T : Submonoid S} :
      Monoid T

      A Submonoid is a Monoid on its subtype

      Equations
      structure Semigroup.Subgroup (S : Type u_1) [Semigroup S] extends Semigroup.Submonoid S :
      Type u_1

      A Subgroup of a Semigroup S is a subset closed under multiplication and containing and identity element and an inverse function

      Instances For
        theorem Semigroup.Subgroup.one_eq {S : Type u_1} [Semigroup S] {T₁ T₂ : Subgroup S} (heq : T₁.carrier = T₂.carrier) :
        T₁.one = T₂.one

        In Order to obtain the SetLike instance, we need to construct an injection from Subgroups to Sets. This means that we must prove that, if the carrier of two Submonoids is equal, then the one elements and the inverse functions must be equal.

        theorem Semigroup.Subgroup.inv_unique' {S : Type u_1} [Semigroup S] {T : Subgroup S} {x y : S} (hx : x T.carrier) (hy : y T.carrier) (heq : T.one = x * y) :
        T.inv y = x
        theorem Semigroup.Subgroup.inv_unique {S : Type u_1} [Semigroup S] {T : Subgroup S} {x y : S} (hx : x T.carrier) (hy : y T.carrier) (heq : T.one = x * y) :
        T.inv x = y
        theorem Semigroup.Subgroup.inv_eq {S : Type u_1} [Semigroup S] {T₁ T₂ : Subgroup S} (heq : T₁.carrier = T₂.carrier) :
        T₁.inv = T₂.inv
        instance Semigroup.Subgroup.instMulSubtypeMem {S : Type u_1} [Semigroup S] (T : Subgroup S) :
        Mul T

        We define * on the submonoid as a subtype

        Equations

        We relate our defintion of * in the subtype to that outside of the subtype

        @[simp]
        theorem Semigroup.Subgroup.coe_mul {S : Type u_1} [Semigroup S] {T : Subgroup S} (x y : T) :
        ↑(x * y) = x * y
        @[simp]
        theorem Semigroup.Subgroup.mk_mul_mk {S : Type u_1} [Semigroup S] {T : Subgroup S} (x y : S) (hx : x T) (hy : y T) :
        x, hx * y, hy = x * y,
        @[simp]
        theorem Semigroup.Subgroup.mul_def {S : Type u_1} [Semigroup S] {T : Subgroup S} (x y : T) :
        x * y = x * y,
        Equations

        We relate our identiy properties to the subtype

        theorem Semigroup.Subgroup.one_def {S : Type u_1} [Semigroup S] {T : Subgroup S} :
        1 = T.one,
        @[simp]
        theorem Semigroup.Subgroup.coe_one {S : Type u_1} [Semigroup S] {T : Subgroup S} :
        1 = T.one
        @[simp]
        theorem Semigroup.Subgroup.coe_mul_one {S : Type u_1} [Semigroup S] {T : Subgroup S} (x : T) :
        x * 1 = x
        @[simp]
        theorem Semigroup.Subgroup.coe_one_mul {S : Type u_1} [Semigroup S] {T : Subgroup S} (x : T) :
        1 * x = x
        Equations
        • One or more equations did not get rendered due to their size.
        instance Semigroup.Subgroup.instInvSubtypeMem {S : Type u_1} [Semigroup S] {T : Subgroup S} :
        Inv T
        Equations
        @[simp]
        theorem Semigroup.Subgroup.inv_def {S : Type u_1} [Semigroup S] {T : Subgroup S} (x : T) :
        x⁻¹ = T.inv x,
        Equations
        • One or more equations did not get rendered due to their size.

        A maximal subgroup is a subgroup that is not properly contained in any other subgroup.

        Equations
        Instances For
          theorem Semigroup.Subgroup.mem_def {S : Type u_1} [Semigroup S] {T : Subgroup S} (x : S) :
          x T x T.carrier
          def Semigroup.Subgroup.bijOn_toEquiv {S : Type u_1} [Semigroup S] {H T : Subgroup S} (f : SS) (hbij : Set.BijOn f H.carrier T.carrier) :
          Function.Bijective fun (x : H) => f x,

          Lift a bijection on the carriers of two subgroups to a bijection on their subtypes.

          Equations
          • =
          Instances For
            noncomputable def Semigroup.Subgroup.hom_of_bijOn {S : Type u_1} [Semigroup S] (H T : Subgroup S) (f : SS) (hbij : Set.BijOn f H.carrier T.carrier) (hmap : ∀ (x y : S), x Hy Hf (x * y) = f x * f y) :
            H ≃* T

            Lift a bijection on the carriers of two subgroups that maps multiplication to an isomorphism between the groups.

            Equations
            Instances For