Documentation

MyProject.Ideals

Ideals #

This file defines Left/Right/Two-sided ideals in magmas as bundled Set-Like structures. We also provide functions that return the minimum ideal containing a set/element in semigroups.

We also give an ideal-based characterization of Green's Relations in semigroups.

We also define typeclasses for simple, zero-simple, and regular semigroups.

Main Definitions #

Main Theorems #

Let x y be elements of a semigroup S

Notation #

For p, q : Ideal' Ξ±:

Implementation Notes #

The SetLike implementation is from the template in the docstring of Mathlib.Data.Setlike.Basic.

For an p : Ideal' α and x : α, the notation x ∈ (p : Set S) is perfered over x ∈ p.carrier and this is supported by tagging the mem_carrier lemmas with @[simp].

For principal ideals, use Ideal'.ofSet {x}.

TODO #

Prove that ideals are stable under surjective morphisms and inverses of morphisms Prove that a semigroup has at most one minimal ideal

structure LeftIdeal (Ξ± : Type u_1) [Mul Ξ±] :
Type u_1

A Left Ideal is a set X such that βˆ€ y, βˆ€ x ∈ X, y * x ∈ X.

Instances For
    instance LeftIdeal.instSetLike {Ξ± : Type u_1} [Mul Ξ±] :
    SetLike (LeftIdeal Ξ±) Ξ±

    SetLike instance requires we prove that there is an injection from LeftIdeal β†’ Set. It regesters a coersion to Set and provides various simp lemmas and instances.

    Equations
    @[simp]
    theorem LeftIdeal.mem_carrier {Ξ± : Type u_1} [Mul Ξ±] {p : LeftIdeal Ξ±} {x : Ξ±} :
    x ∈ p.carrier ↔ x ∈ ↑p
    theorem LeftIdeal.mem_coe {Ξ± : Type u_1} [Mul Ξ±] {p : LeftIdeal Ξ±} {x : Ξ±} :
    x ∈ ↑p ↔ x ∈ p
    theorem LeftIdeal.ext {Ξ± : Type u_1} [Mul Ξ±] {p q : LeftIdeal Ξ±} (h : βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q) :
    p = q

    This allows us to use the ext tactic

    theorem LeftIdeal.ext_iff {Ξ± : Type u_1} [Mul Ξ±] {p q : LeftIdeal Ξ±} :
    p = q ↔ βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q
    @[simp]
    theorem LeftIdeal.mem {α : Type u_1} [Mul α] {x y : α} {p : LeftIdeal α} (hin : x ∈ p) :
    y * x ∈ p
    instance LeftIdeal.instEmptyCollection {Ξ± : Type u_1} [Mul Ξ±] :

    Allows for notation βˆ… : LeftIdeal Ξ± for the empty ideal.

    Equations
    @[simp]
    theorem LeftIdeal.coe_empty {Ξ± : Type u_1} [Mul Ξ±] :
    instance LeftIdeal.instTop {Ξ± : Type u_1} [Mul Ξ±] :
    Top (LeftIdeal Ξ±)

    Allows for notation ⊀ : LeftIdeal α for the full ideal.

    Equations
    @[simp]
    theorem LeftIdeal.coe_top {Ξ± : Type u_1} [Mul Ξ±] :
    instance LeftIdeal.instBot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
    Bot (LeftIdeal Ξ²)

    Allows for notation βŠ₯ : LeftIdeal Ξ± for the left ideal {0}.

    Equations
    @[simp]
    theorem LeftIdeal.coe_bot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
    ↑βŠ₯ = {0}
    instance LeftIdeal.instInter {Ξ± : Type u_1} [Mul Ξ±] :

    The intersection of two left ideals is a left ideal.

    Equations
    @[simp]
    theorem LeftIdeal.inter_coe {Ξ± : Type u_1} [Mul Ξ±] {p q : LeftIdeal Ξ±} :
    ↑p ∩ ↑q = ↑p ∩ ↑q
    @[simp]
    theorem LeftIdeal.univ_mul_self_subset_self {Ξ± : Type u_1} [Mul Ξ±] (p : LeftIdeal Ξ±) :
    Set.univ * ↑p βŠ† ↑p

    If p is a left ideal of Ξ±, then Ξ± * p βŠ† p.

    def LeftIdeal.ofSet {S : Type u_2} [Semigroup S] (s : Set S) :

    Given a set in a Semigroup, the minimal Left Ideal containing the set.

    Equations
    Instances For
      theorem LeftIdeal.ofSet_def {S : Type u_2} [Semigroup S] (p : Set S) :
      ↑(ofSet p) = Set.univ * p βˆͺ p
      @[simp]
      theorem LeftIdeal.mem_ofSet {S : Type u_2} [Semigroup S] (p : Set S) (x : S) :
      theorem LeftIdeal.ofSet_minimal {S : Type u_2} [Semigroup S] {p : LeftIdeal S} {q : Set S} (hin : q βŠ† ↑p) :

      For q : Set S, LeftIdeal.ofSet q is the minimal left ideal containing the set.

      structure RightIdeal (Ξ± : Type u_1) [Mul Ξ±] :
      Type u_1

      A right ideal is a set X such that βˆ€ y, βˆ€ x ∈ X, x * y ∈ X.

      Instances For
        instance RightIdeal.instSetLike {Ξ± : Type u_1} [Mul Ξ±] :
        SetLike (RightIdeal Ξ±) Ξ±
        Equations
        @[simp]
        theorem RightIdeal.mem_carrier {Ξ± : Type u_1} [Mul Ξ±] {p : RightIdeal Ξ±} {x : Ξ±} :
        x ∈ p.carrier ↔ x ∈ ↑p
        theorem RightIdeal.mem_coe {Ξ± : Type u_1} [Mul Ξ±] {p : RightIdeal Ξ±} {x : Ξ±} :
        x ∈ ↑p ↔ x ∈ p
        theorem RightIdeal.ext {Ξ± : Type u_1} [Mul Ξ±] {p q : RightIdeal Ξ±} (h : βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q) :
        p = q
        theorem RightIdeal.ext_iff {Ξ± : Type u_1} [Mul Ξ±] {p q : RightIdeal Ξ±} :
        p = q ↔ βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q
        @[simp]
        theorem RightIdeal.mem {α : Type u_1} [Mul α] {x y : α} {p : RightIdeal α} (hin : x ∈ p) :
        x * y ∈ p
        Equations
        @[simp]
        theorem RightIdeal.coe_empty {Ξ± : Type u_1} [Mul Ξ±] :
        instance RightIdeal.instTop {Ξ± : Type u_1} [Mul Ξ±] :
        Equations
        @[simp]
        theorem RightIdeal.coe_top {Ξ± : Type u_1} [Mul Ξ±] :
        instance RightIdeal.instBot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
        Equations
        @[simp]
        theorem RightIdeal.coe_bot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
        ↑βŠ₯ = {0}
        instance RightIdeal.instInter {Ξ± : Type u_1} [Mul Ξ±] :

        The intersection of right ideals is a right isimpdeal.

        Equations
        @[simp]
        theorem RightIdeal.inter_coe {Ξ± : Type u_1} [Mul Ξ±] {p q : RightIdeal Ξ±} :
        ↑p ∩ ↑q = ↑p ∩ ↑q
        @[simp]
        theorem RightIdeal.mul_univ_subset_self {Ξ± : Type u_1} [Mul Ξ±] (p : RightIdeal Ξ±) :
        ↑p * Set.univ βŠ† ↑p

        If p is a right ideal of Ξ±, then p * Ξ± βŠ† p.

        def RightIdeal.ofSet {S : Type u_2} [Semigroup S] (s : Set S) :

        Given a set in a Semigroup, the minimal right ideal containing the set.

        Equations
        Instances For
          theorem RightIdeal.ofSet_def {S : Type u_2} [Semigroup S] (p : Set S) :
          ↑(ofSet p) = p * Set.univ βˆͺ p
          @[simp]
          theorem RightIdeal.mem_ofSet {S : Type u_2} [Semigroup S] (p : Set S) (x : S) :
          theorem RightIdeal.ofSet_minimal {S : Type u_2} [Semigroup S] {p : RightIdeal S} {q : Set S} (hin : q βŠ† ↑p) :

          For q : Set S, RightIdeal.ofSet q is the minimal right ideal containing the set.

          structure Ideal' (Ξ± : Type u_1) [Mul Ξ±] :
          Type u_1

          An ideal is a set closed under multiplication on both sides.

          Instances For
            def Ideal'.toLeftIdeal {Ξ± : Type u_1} [Mul Ξ±] (p : Ideal' Ξ±) :
            Equations
            Instances For
              def Ideal'.toRightIdeal {Ξ± : Type u_1} [Mul Ξ±] (p : Ideal' Ξ±) :
              Equations
              Instances For
                instance Ideal'.instSetLike {Ξ± : Type u_1} [Mul Ξ±] :
                SetLike (Ideal' Ξ±) Ξ±
                Equations
                @[simp]
                theorem Ideal'.mem_carrier {Ξ± : Type u_1} [Mul Ξ±] {p : Ideal' Ξ±} {x : Ξ±} :
                x ∈ p.carrier ↔ x ∈ ↑p
                theorem Ideal'.mem_coe {Ξ± : Type u_1} [Mul Ξ±] {p : Ideal' Ξ±} {x : Ξ±} :
                x ∈ ↑p ↔ x ∈ p
                theorem Ideal'.ext {Ξ± : Type u_1} [Mul Ξ±] {p q : Ideal' Ξ±} (h : βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q) :
                p = q

                This allows us to use the ext tactic

                theorem Ideal'.ext_iff {Ξ± : Type u_1} [Mul Ξ±] {p q : Ideal' Ξ±} :
                p = q ↔ βˆ€ (x : Ξ±), x ∈ p ↔ x ∈ q
                @[simp]
                theorem Ideal'.mem {α : Type u_1} [Mul α] {x z y : α} {p : Ideal' α} (hin : x ∈ p) :
                z * x * y ∈ p
                @[simp]
                theorem Ideal'.mul_right_mem {α : Type u_1} [Mul α] {x y : α} {p : Ideal' α} (hin : x ∈ p) :
                x * y ∈ p
                @[simp]
                theorem Ideal'.mul_left_mem {α : Type u_1} [Mul α] {x y : α} {p : Ideal' α} (hin : x ∈ p) :
                y * x ∈ p
                instance Ideal'.instEmptyCollection {Ξ± : Type u_1} [Mul Ξ±] :
                Equations
                @[simp]
                theorem Ideal'.coe_empty {Ξ± : Type u_1} [Mul Ξ±] :
                @[simp]
                theorem Ideal'.not_in_empty {Ξ± : Type u_1} [Mul Ξ±] (x : Ξ±) :
                x βˆ‰ βˆ…
                instance Ideal'.instTop {Ξ± : Type u_1} [Mul Ξ±] :
                Top (Ideal' Ξ±)
                Equations
                @[simp]
                theorem Ideal'.coe_top {Ξ± : Type u_1} [Mul Ξ±] :
                @[simp]
                theorem Ideal'.in_top {Ξ± : Type u_1} [Mul Ξ±] (x : Ξ±) :
                instance Ideal'.instBot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
                Bot (Ideal' Ξ²)
                Equations
                @[simp]
                theorem Ideal'.coe_bot {Ξ² : Type u_2} [MulZeroClass Ξ²] :
                ↑βŠ₯ = {0}
                theorem Ideal'.eq_zero_iff_in_bot {Ξ² : Type u_2} [MulZeroClass Ξ²] (x : Ξ²) :
                instance Ideal'.instInter {Ξ± : Type u_1} [Mul Ξ±] :
                Inter (Ideal' Ξ±)

                The intersection of two ideals is an ideal.

                Equations
                @[simp]
                theorem Ideal'.inter_coe {Ξ± : Type u_1} [Mul Ξ±] {p q : Ideal' Ξ±} :
                ↑p ∩ ↑q = ↑p ∩ ↑q
                def Ideal'.ofSet {S : Type u_2} [Semigroup S] (s : Set S) :

                Given a set in a Semigroup, the minimal ideal containing the set.

                Equations
                Instances For
                  theorem Ideal'.ofSet_def {S : Type u_2} [Semigroup S] (p : Set S) :
                  @[simp]
                  theorem Ideal'.mem_ofSet {S : Type u_2} [Semigroup S] (s : Set S) (x : S) :
                  theorem Ideal'.ofSet_minimal {S : Type u_2} [Semigroup S] {p : Ideal' S} {q : Set S} (hin : q βŠ† ↑p) :

                  For q : Set S, Ideal'.ofSet q is the minimal ideal containing the set.

                  Ideal characterization of Greens Relations #

                  x is in the principal left ideal of y iff x ≀𝓛 y.

                  theorem Semigroup.LPreorder.le_in_leftIdeal {S : Type u_1} [Semigroup S] {x y : S} {i : LeftIdeal S} (hx : x ∈ i) (hy : y ≀𝓛 x) :
                  y ∈ i

                  For x ∈ i : LeftIdeal S, if y ≀𝓛 x then y ∈ i.

                  The principal left ideal of x is a subset of that of y iff x ≀𝓛 y

                  The principal left ideal of x is a equal to that of y iff x 𝓛 y.

                  x is in the principal right ideal of y iff x ≀𝓑 y.

                  theorem Semigroup.RPreorder.le_in_rightIdeal {S : Type u_1} [Semigroup S] {x y : S} {i : RightIdeal S} (hx : x ∈ i) (hy : y ≀𝓑 x) :
                  y ∈ i

                  For x ∈ i : RightIdeal S, if y ≀𝓑 x then y ∈ i.

                  The principal right ideal of x is a subset of that of y iff x ≀𝓑 y

                  The principal right ideal of x is a equal to that of y iff x 𝓑 y.

                  x is in the principal ideal of y iff x ≀𝓙 y.

                  theorem Semigroup.JPreorder.le_in_ideal' {S : Type u_1} [Semigroup S] {x y : S} {i : Ideal' S} (hx : x ∈ i) (hy : y ≀𝓙 x) :
                  y ∈ i

                  For x ∈ i : Ideal' S, if y ≀𝓙 x then y ∈ i.

                  The principal ideal of x is a subset of that of y iff x ≀𝓙 y

                  The principal ideal of x is a equal to that of y iff x 𝓙 y.

                  Simple Semigroups #

                  class SimpleSemigroup (S : Type u_1) extends Semigroup S :
                  Type u_1

                  A semigroup is simple if its only ideals are βŠ₯ and βˆ…

                  Instances
                    @[simp]
                    theorem SimpleSemigroup.ideal {S : Type u_1} [inst : SimpleSemigroup S] (I : Ideal' S) :
                    class ZeroSimpleSemigroup (S : Type u_2) extends SemigroupWithZero S :
                    Type u_2
                    Instances

                      In a simple semigroup, all elements are J-preorder related

                      theorem Semigroup.JEquiv.ofSimple {S : Type u_1} [SimpleSemigroup S] (x y : S) :

                      In a simple semigroup, all elements are 𝓙 related

                      instance Semigroup.JPreorder.toSimpleSemigroup {S : Type u_1} [Semigroup S] (h : βˆ€ (x y : S), x ≀𝓙 y) :

                      If all elements of a semigroup are J-preorder related, then it is a simple semigroup.

                      Equations
                      theorem Semigroup.JPreorder.ofZeroSimple {S : Type u_1} [ZeroSimpleSemigroup S] (x y : S) (hy : y β‰  0) :

                      All non-zero elements of a zero-simple-semigroup are J-preorder related.

                      instance Semigroup.JPreorder.toZeroSimpleSemigroup {S : Type u_1} [SemigroupWithZero S] (h : βˆ€ (x y : S), y β‰  0 β†’ x ≀𝓙 y) :

                      If all non-zero elements of a semigroup with zero are J-preorder related, then it is a zero-simple semigroup.

                      Equations

                      Regular Semigroups #

                      See Semigroup.DEquiv.regular_d_class_tfae and regularClass_iff_* / hasIdempotent_iff_* in MyProject/Green/Location.lean (Proposition 1.9).

                      def Semigroup.isRegularElem {Ξ± : Type u_2} [Mul Ξ±] (x : Ξ±) :

                      A element x of a magma is regular iff βˆƒ y, x * y * x = x.

                      Equations
                      Instances For
                        class Semigroup.RegularSemigroup (S : Type u_2) extends Semigroup S :
                        Type u_2

                        In a regular semigroup, every element is regular.

                        Instances
                          @[simp]
                          theorem Semigroup.RegularSemigroup.regular {S : Type u_1} [inst : RegularSemigroup S] (x : S) :
                          βˆƒ (y : S), x * y * x = x