mathlib3 documentation

algebra.free_monoid.basic

Free monoid over a given alphabet #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

Main definitions #

def free_add_monoid (α : Type u_1) :
Type u_1

Free nonabelian additive monoid over a given alphabet

Equations
Instances for free_add_monoid
def free_monoid (α : Type u_1) :
Type u_1

Free monoid over a given alphabet.

Equations
Instances for free_monoid
def free_monoid.to_list {α : Type u_1} :

The identity equivalence between free_monoid α and list α.

Equations

The identity equivalence between free_add_monoid α and list α.

Equations
def free_monoid.of_list {α : Type u_1} :

The identity equivalence between list α and free_monoid α.

Equations

The identity equivalence between list α and free_add_monoid α.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
def free_monoid.of {α : Type u_1} (x : α) :

Embeds an element of α into free_monoid α as a singleton list.

Equations
def free_add_monoid.of {α : Type u_1} (x : α) :

Embeds an element of α into free_add_monoid α as a singleton list.

Equations
@[simp]
theorem free_monoid.to_list_of {α : Type u_1} (x : α) :
@[simp]
theorem free_monoid.of_list_cons {α : Type u_1} (x : α) (xs : list α) :
def free_monoid.rec_on {α : Type u_1} {C : free_monoid α Sort u_2} (xs : free_monoid α) (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C xs C (free_monoid.of x * xs)) :
C xs

Recursor for free_monoid using 1 and free_monoid.of x * xs instead of [] and x :: xs.

Equations
  • xs.rec_on h0 ih = list.rec_on xs h0 ih
def free_add_monoid.rec_on {α : Type u_1} {C : free_add_monoid α Sort u_2} (xs : free_add_monoid α) (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C xs C (free_add_monoid.of x + xs)) :
C xs

Recursor for free_add_monoid using 0 and free_add_monoid.of x + xs instead of [] and x :: xs.

Equations
  • xs.rec_on h0 ih = list.rec_on xs h0 ih
@[simp]
theorem free_add_monoid.rec_on_zero {α : Type u_1} {C : free_add_monoid α Sort u_2} (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C xs C (free_add_monoid.of x + xs)) :
0.rec_on h0 ih = h0
@[simp]
theorem free_monoid.rec_on_one {α : Type u_1} {C : free_monoid α Sort u_2} (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C xs C (free_monoid.of x * xs)) :
1.rec_on h0 ih = h0
@[simp]
theorem free_monoid.rec_on_of_mul {α : Type u_1} {C : free_monoid α Sort u_2} (x : α) (xs : free_monoid α) (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C xs C (free_monoid.of x * xs)) :
(free_monoid.of x * xs).rec_on h0 ih = ih x xs (xs.rec_on h0 ih)
@[simp]
theorem free_add_monoid.rec_on_of_add {α : Type u_1} {C : free_add_monoid α Sort u_2} (x : α) (xs : free_add_monoid α) (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C xs C (free_add_monoid.of x + xs)) :
(free_add_monoid.of x + xs).rec_on h0 ih = ih x xs (xs.rec_on h0 ih)
def free_add_monoid.cases_on {α : Type u_1} {C : free_add_monoid α Sort u_2} (xs : free_add_monoid α) (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C (free_add_monoid.of x + xs)) :
C xs

A version of list.cases_on for free_add_monoid using 0 and free_add_monoid.of x + xs instead of [] and x :: xs.

Equations
def free_monoid.cases_on {α : Type u_1} {C : free_monoid α Sort u_2} (xs : free_monoid α) (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C (free_monoid.of x * xs)) :
C xs

A version of list.cases_on for free_monoid using 1 and free_monoid.of x * xs instead of [] and x :: xs.

Equations
@[simp]
theorem free_add_monoid.cases_on_zero {α : Type u_1} {C : free_add_monoid α Sort u_2} (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C (free_add_monoid.of x + xs)) :
0.cases_on h0 ih = h0
@[simp]
theorem free_monoid.cases_on_one {α : Type u_1} {C : free_monoid α Sort u_2} (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C (free_monoid.of x * xs)) :
1.cases_on h0 ih = h0
@[simp]
theorem free_add_monoid.cases_on_of_add {α : Type u_1} {C : free_add_monoid α Sort u_2} (x : α) (xs : free_add_monoid α) (h0 : C 0) (ih : Π (x : α) (xs : free_add_monoid α), C (free_add_monoid.of x + xs)) :
(free_add_monoid.of x + xs).cases_on h0 ih = ih x xs
@[simp]
theorem free_monoid.cases_on_of_mul {α : Type u_1} {C : free_monoid α Sort u_2} (x : α) (xs : free_monoid α) (h0 : C 1) (ih : Π (x : α) (xs : free_monoid α), C (free_monoid.of x * xs)) :
(free_monoid.of x * xs).cases_on h0 ih = ih x xs
@[ext]
theorem free_monoid.hom_eq {α : Type u_1} {M : Type u_4} [monoid M] ⦃f g : free_monoid α →* M⦄ (h : (x : α), f (free_monoid.of x) = g (free_monoid.of x)) :
f = g
@[ext]
theorem free_add_monoid.hom_eq {α : Type u_1} {M : Type u_4} [add_monoid M] ⦃f g : free_add_monoid α →+ M⦄ (h : (x : α), f (free_add_monoid.of x) = g (free_add_monoid.of x)) :
f = g
def free_add_monoid.sum_aux {M : Type u_1} [add_monoid M] (l : list M) :
M

A variant of list.sum that has [x].sum = x true definitionally.

The purpose is to make free_add_monoid.lift_eval_of true by rfl.

Equations
def free_monoid.prod_aux {M : Type u_1} [monoid M] (l : list M) :
M

A variant of list.prod that has [x].prod = x true definitionally.

The purpose is to make free_monoid.lift_eval_of true by rfl.

Equations
theorem free_monoid.prod_aux_eq {M : Type u_4} [monoid M] (l : list M) :
def free_add_monoid.lift {α : Type u_1} {M : Type u_4} [add_monoid M] :
M) (free_add_monoid α →+ M)

Equivalence between maps α → A and additive monoid homomorphisms free_add_monoid α →+ A.

Equations
def free_monoid.lift {α : Type u_1} {M : Type u_4} [monoid M] :
M) (free_monoid α →* M)

Equivalence between maps α → M and monoid homomorphisms free_monoid α →* M.

Equations
@[simp]
theorem free_monoid.lift_apply {α : Type u_1} {M : Type u_4} [monoid M] (f : α M) (l : free_monoid α) :
theorem free_monoid.lift_comp_of {α : Type u_1} {M : Type u_4} [monoid M] (f : α M) :
@[simp]
theorem free_add_monoid.lift_eval_of {α : Type u_1} {M : Type u_4} [add_monoid M] (f : α M) (x : α) :
@[simp]
theorem free_monoid.lift_eval_of {α : Type u_1} {M : Type u_4} [monoid M] (f : α M) (x : α) :
@[simp]
theorem free_monoid.lift_restrict {α : Type u_1} {M : Type u_4} [monoid M] (f : free_monoid α →* M) :
theorem free_monoid.comp_lift {α : Type u_1} {M : Type u_4} [monoid M] {N : Type u_5} [monoid N] (g : M →* N) (f : α M) :
theorem free_add_monoid.comp_lift {α : Type u_1} {M : Type u_4} [add_monoid M] {N : Type u_5} [add_monoid N] (g : M →+ N) (f : α M) :
theorem free_monoid.hom_map_lift {α : Type u_1} {M : Type u_4} [monoid M] {N : Type u_5} [monoid N] (g : M →* N) (f : α M) (x : free_monoid α) :
theorem free_add_monoid.hom_map_lift {α : Type u_1} {M : Type u_4} [add_monoid M] {N : Type u_5} [add_monoid N] (g : M →+ N) (f : α M) (x : free_add_monoid α) :
def free_monoid.mk_mul_action {α : Type u_1} {β : Type u_2} (f : α β β) :

Define a multiplicative action of free_monoid α on β.

Equations
def free_add_monoid.mk_add_action {α : Type u_1} {β : Type u_2} (f : α β β) :

Define an additive action of free_add_monoid α on β.

Equations
theorem free_add_monoid.vadd_def {α : Type u_1} {β : Type u_2} (f : α β β) (l : free_add_monoid α) (b : β) :
theorem free_monoid.smul_def {α : Type u_1} {β : Type u_2} (f : α β β) (l : free_monoid α) (b : β) :
theorem free_monoid.of_list_smul {α : Type u_1} {β : Type u_2} (f : α β β) (l : list α) (b : β) :
theorem free_add_monoid.of_list_vadd {α : Type u_1} {β : Type u_2} (f : α β β) (l : list α) (b : β) :
@[simp]
theorem free_add_monoid.of_vadd {α : Type u_1} {β : Type u_2} (f : α β β) (x : α) (y : β) :
@[simp]
theorem free_monoid.of_smul {α : Type u_1} {β : Type u_2} (f : α β β) (x : α) (y : β) :
free_monoid.of x y = f x y
def free_add_monoid.map {α : Type u_1} {β : Type u_2} (f : α β) :

The unique additive monoid homomorphism free_add_monoid α →+ free_add_monoid β that sends each of x to of (f x).

Equations
def free_monoid.map {α : Type u_1} {β : Type u_2} (f : α β) :

The unique monoid homomorphism free_monoid α →* free_monoid β that sends each of x to of (f x).

Equations
@[simp]
theorem free_add_monoid.map_of {α : Type u_1} {β : Type u_2} (f : α β) (x : α) :
@[simp]
theorem free_monoid.map_of {α : Type u_1} {β : Type u_2} (f : α β) (x : α) :
theorem free_monoid.to_list_map {α : Type u_1} {β : Type u_2} (f : α β) (xs : free_monoid α) :
theorem free_monoid.of_list_map {α : Type u_1} {β : Type u_2} (f : α β) (xs : list α) :
theorem free_monoid.lift_of_comp_eq_map {α : Type u_1} {β : Type u_2} (f : α β) :
theorem free_add_monoid.lift_of_comp_eq_map {α : Type u_1} {β : Type u_2} (f : α β) :
theorem free_add_monoid.map_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} (g : β γ) (f : α β) :
theorem free_monoid.map_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} (g : β γ) (f : α β) :