Documentation

Mathlib.Algebra.FreeMonoid.FreeSemigroup

Relation between the free semigroup and the free monoid #

We provide some constructions relating the free semigroup and the free monoid on the same type.

Main definitions #

The natural embedding of the free semigroup into the free monoid. This is injective (FreeSemigroup.toFreeMonoid_injective), and its image consists of all non-1 elements of the free monoid (FreeSemigroup.eq_one_or_toFreeMonoid).

Equations
Instances For

    The natural embedding of the free additive semigroup into the free additive monoid. This is injective (FreeAddSemigroup.toFreeAddMonoid_injective), and its image consists of all non-0 elements of the free additive monoid (FreeAddSemigroup.eq_zero_or_toFreeAddMonoid).

    Equations
    Instances For
      @[simp]
      theorem FreeSemigroup.toFreeMonoid_mk_eq_cons {α : Type u_1} (x : α) (xs : List α) :
      toFreeMonoid { head := x, tail := xs } = FreeMonoid.ofList (x :: xs)
      theorem FreeAddSemigroup.toFreeAddMonoid_mk_eq_cons {α : Type u_1} (x : α) (xs : List α) :
      toFreeAddMonoid { head := x, tail := xs } = FreeAddMonoid.ofList (x :: xs)

      The free monoid on α is isomorphic to the free semigroup on α with a 1 added.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The free additive monoid on α is isomorphic to the free additive semigroup on α with a 0 added.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]