Free monoid over a given alphabet
Main definitions
free_monoid α
: free monoid over alphabetα
; defined as a synonym forlist α
with multiplication given by(++)
.free_monoid.of
: embeddingα → free_monoid α
sending each elementx
to[x]
;free_monoid.lift
: natural equivalence betweenα → M
andfree_monoid α →* M
free_monoid.map
: embedding ofα → β
intofree_monoid α →* free_monoid β
given bylist.map
.
Free monoid over a given alphabet.
Equations
- free_monoid α = list α
Free nonabelian additive monoid over a given alphabet
Equations
- free_monoid.inhabited = {default := 1}
Embeds an element of α
into free_add_monoid α
as a singleton list.
Embeds an element of α
into free_monoid α
as a singleton list.
Equations
- free_monoid.of x = [x]
Recursor for free_add_monoid
using 0
and of x + xs
instead of []
and x :: xs
.
Recursor for free_monoid
using 1
and of x * xs
instead of []
and x :: xs
.
Equivalence between maps α → A
and additive monoid homomorphisms
free_add_monoid α →+ A
.
Equivalence between maps α → M
and monoid homomorphisms free_monoid α →* M
.
Equations
- free_monoid.lift = {to_fun := λ (f : α → M), {to_fun := λ (l : free_monoid α), (list.map f l).prod, map_one' := _, map_mul' := _}, inv_fun := λ (f : free_monoid α →* M) (x : α), ⇑f (free_monoid.of x), left_inv := _, right_inv := _}
The unique monoid homomorphism free_monoid α →* free_monoid β
that sends
each of x
to of (f x)
.
The unique additive monoid homomorphism free_add_monoid α →+ free_add_monoid β
that sends each of x
to of (f x)
.