algebra.free

# Free constructions #

## Main definitions #

• free_magma α: free magma (structure with binary operation without any axioms) over alphabet α, defined inductively, with traversable instance and decidable equality.
• magma.free_semigroup α: free semigroup over magma α.
• free_semigroup α: free semigroup over alphabet α, defined as a synonym for α × list α (i.e. nonempty lists), with traversable instance and decidable equality.
• free_semigroup_free_magma α: isomorphism between magma.free_semigroup (free_magma α) and free_semigroup α.
• free_magma.lift: the universal property of the free magma, expressing its adjointness.
inductive free_magma (α : Type u) :
Type u
• of : Π {α : Type u}, α →
• mul : Π {α : Type u},

Free magma over a given alphabet.

Instances for free_magma
@[protected, instance]
def free_magma.decidable_eq (α : Type u) [a : decidable_eq α] :
@[protected, instance]
def free_add_magma.decidable_eq (α : Type u) [a : decidable_eq α] :
inductive free_add_magma (α : Type u) :
Type u
• of : Π {α : Type u}, α →
• add : Π {α : Type u},

Free nonabelian additive magma over a given alphabet.

Instances for free_add_magma
@[protected, instance]
def free_add_magma.inhabited {α : Type u} [inhabited α] :
Equations
@[protected, instance]
def free_magma.inhabited {α : Type u} [inhabited α] :
Equations
@[protected, instance]
def free_add_magma.has_add {α : Type u} :
Equations
@[protected, instance]
def free_magma.has_mul {α : Type u} :
Equations
@[simp]
theorem free_magma.mul_eq {α : Type u} (x y : free_magma α) :
x.mul y = x * y
@[simp]
theorem free_add_magma.add_eq {α : Type u} (x y : free_add_magma α) :
x.add y = x + y
def free_add_magma.rec_on_add {α : Type u} {C : Sort l} (x : free_add_magma α) (ih1 : Π (x : α), C ) (ih2 : Π (x y : , C xC yC (x + y)) :
C x

Recursor for free_add_magma using x + y instead of free_add_magma.add x y.

Equations
def free_magma.rec_on_mul {α : Type u} {C : Sort l} (x : free_magma α) (ih1 : Π (x : α), C ) (ih2 : Π (x y : , C xC yC (x * y)) :
C x

Recursor for free_magma using x * y instead of free_magma.mul x y.

Equations
def free_magma.lift_aux {α : Type u} {β : Type v} [has_mul β] (f : α → β) :
→ β

Lifts a function α → β to a magma homomorphism free_magma α → β given a magma β.

Equations
• (x * y) =
• = f x
def free_add_magma.lift_aux {α : Type u} {β : Type v} [has_add β] (f : α → β) :
→ β

Lifts a function α → β to an additive magma homomorphism free_add_magma α → β given an additive magma β.

Equations
• (x + y) =
theorem free_add_magma.lift_aux_unique {α : Type u} {β : Type v} [has_add β] (F : β) :
theorem free_magma.lift_aux_unique {α : Type u} {β : Type v} [has_mul β] (F : →ₙ* β) :
def free_add_magma.lift {α : Type u} {β : Type v} [has_add β] :
(α → β) β

The universal property of the free additive magma expressing its adjointness.

Equations
def free_magma.lift {α : Type u} {β : Type v} [has_mul β] :
(α → β) →ₙ* β)

The universal property of the free magma expressing its adjointness.

Equations
@[simp]
theorem free_add_magma.lift_of {α : Type u} {β : Type v} [has_add β] (f : α → β) (x : α) :
= f x
@[simp]
theorem free_magma.lift_of {α : Type u} {β : Type v} [has_mul β] (f : α → β) (x : α) :
= f x
def free_magma.map {α : Type u} {β : Type v} (f : α → β) :

The unique magma homomorphism free_magma α → free_magma β that sends each of x to of (f x).

Equations
def free_add_magma.map {α : Type u} {β : Type v} (f : α → β) :

The unique additive magma homomorphism free_add_magma α → free_add_magma β that sends each of x to of (f x).

Equations
• (x + y) =
@[simp]
theorem free_add_magma.map_of {α : Type u} {β : Type v} (f : α → β) (x : α) :
@[simp]
theorem free_magma.map_of {α : Type u} {β : Type v} (f : α → β) (x : α) :
@[simp]
theorem free_add_magma.map_add {α : Type u} {β : Type v} (f : α → β) (x y : free_add_magma α) :
(x + y) =
@[simp]
theorem free_magma.map_mul {α : Type u} {β : Type v} (f : α → β) (x y : free_magma α) :
(x * y) = *
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected]
def free_add_magma.rec_on_pure {α : Type u} {C : Sort l} (x : free_add_magma α) (ih1 : Π (x : α), C ) (ih2 : Π (x y : , C xC yC (x + y)) :
C x

Recursor on free_add_magma using pure instead of of.

Equations
@[protected]
def free_magma.rec_on_pure {α : Type u} {C : Sort l} (x : free_magma α) (ih1 : Π (x : α), C ) (ih2 : Π (x y : , C xC yC (x * y)) :
C x

Recursor on free_magma using pure instead of of.

Equations
@[simp]
theorem free_magma.map_pure {α β : Type u} (f : α → β) (x : α) :
@[simp]
theorem free_add_magma.map_pure {α β : Type u} (f : α → β) (x : α) :
@[simp]
theorem free_magma.map_mul' {α β : Type u} (f : α → β) (x y : free_magma α) :
f <$> (x * y) = f <$> x * f <$> y @[simp] theorem free_add_magma.map_add' {α β : Type u} (f : α → β) (x y : free_add_magma α) : f <$> (x + y) = f <$> x + f <$> y
@[simp]
theorem free_add_magma.pure_bind {α β : Type u} (f : α → ) (x : α) :
= f x
@[simp]
theorem free_magma.pure_bind {α β : Type u} (f : α → ) (x : α) :
= f x
@[simp]
theorem free_add_magma.add_bind {α β : Type u} (f : α → ) (x y : free_add_magma α) :
x + y >>= f = (x >>= f) + (y >>= f)
@[simp]
theorem free_magma.mul_bind {α β : Type u} (f : α → ) (x y : free_magma α) :
x * y >>= f = (x >>= f) * (y >>= f)
@[simp]
theorem free_add_magma.pure_seq {α β : Type u} {f : α → β} {x : free_add_magma α} :
= f <$> x @[simp] theorem free_magma.pure_seq {α β : Type u} {f : α → β} {x : free_magma α} : = f <$> x
@[simp]
theorem free_add_magma.add_seq {α β : Type u} {f g : free_add_magma (α → β)} {x : free_add_magma α} :
f + g <*> x = (f <*> x) + (g <*> x)
@[simp]
theorem free_magma.mul_seq {α β : Type u} {f g : free_magma (α → β)} {x : free_magma α} :
f * g <*> x = (f <*> x) * (g <*> x)
@[protected, instance]
@[protected, instance]
@[protected]
def free_magma.traverse {m : Type uType u} [applicative m] {α β : Type u} (F : α → m β) :
m (free_magma β)

free_magma is traversable.

Equations
• (x * y) =
@[protected]
def free_add_magma.traverse {m : Type uType u} [applicative m] {α β : Type u} (F : α → m β) :
m

free_add_magma is traversable.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[simp]
theorem free_magma.traverse_pure {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : α) :
@[simp]
theorem free_add_magma.traverse_pure {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : α) :
@[simp]
theorem free_add_magma.traverse_pure' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x : α),
@[simp]
theorem free_magma.traverse_pure' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x : α),
@[simp]
theorem free_add_magma.traverse_add {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x y : free_add_magma α) :
(x + y) =
@[simp]
theorem free_magma.traverse_mul {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x y : free_magma α) :
(x * y) =
@[simp]
theorem free_magma.traverse_mul' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x y : ,
@[simp]
theorem free_add_magma.traverse_add' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x y : ,
@[simp]
theorem free_magma.traverse_eq {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : free_magma α) :
@[simp]
theorem free_add_magma.traverse_eq {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : free_add_magma α) :
@[simp]
theorem free_add_magma.add_map_seq {α : Type u} (x y : free_add_magma α) :
= x + y
@[simp]
theorem free_magma.mul_map_seq {α : Type u} (x y : free_magma α) :
= x * y
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected]
def free_magma.repr {α : Type u} [has_repr α] :

Representation of an element of a free magma.

Equations
@[protected]
def free_add_magma.repr {α : Type u} [has_repr α] :

Representation of an element of a free additive magma.

Equations
@[protected, instance]
def free_magma.has_repr {α : Type u} [has_repr α] :
Equations
@[protected, instance]
def free_add_magma.has_repr {α : Type u} [has_repr α] :
Equations
def free_magma.length {α : Type u} :

Length of an element of a free magma.

Equations
def free_add_magma.length {α : Type u} :

Length of an element of a free additive magma.

Equations
inductive magma.free_semigroup.r (α : Type u) [has_mul α] :
α → α → Prop
• intro : ∀ {α : Type u} [_inst_1 : has_mul α] (x y z : α), (x * y * z) (x * (y * z))
• left : ∀ {α : Type u} [_inst_1 : has_mul α] (w x y z : α), (w * (x * y * z)) (w * (x * (y * z)))

Associativity relations for a magma.

α → α → Prop
• intro : ∀ {α : Type u} [_inst_1 : has_add α] (x y z : α), (x + y + z) (x + (y + z))
• left : ∀ {α : Type u} [_inst_1 : has_add α] (w x y z : α), (w + (x + y + z)) (w + (x + (y + z)))

Associativity relations for an additive magma.

def magma.free_semigroup (α : Type u) [has_mul α] :
Type u

Free semigroup over a magma.

Equations
• = quot
Instances for magma.free_semigroup
Type u

Free additive semigroup over an additive magma.

Equations
Instances for add_magma.free_add_semigroup
def magma.free_semigroup.of {α : Type u} [has_mul α] :
α →

Embedding from magma to its free semigroup.

Equations

Embedding from additive magma to its free additive semigroup.

Equations
@[protected, instance]
def magma.free_semigroup.inhabited {α : Type u} [has_mul α] [inhabited α] :
Equations
@[protected, instance]
Equations
@[protected]
theorem add_magma.free_add_semigroup.induction_on {α : Type u} [has_add α] {C : → Prop} (ih : ∀ (x : α), ) :
C x
@[protected]
theorem magma.free_semigroup.induction_on {α : Type u} [has_mul α] {C : → Prop} (x : magma.free_semigroup α) (ih : ∀ (x : α), ) :
C x
theorem magma.free_semigroup.of_mul_assoc {α : Type u} [has_mul α] (x y z : α) :
theorem magma.free_semigroup.of_mul_assoc_left {α : Type u} [has_mul α] (w x y z : α) :
theorem magma.free_semigroup.of_mul_assoc_right {α : Type u} [has_mul α] (w x y z : α) :
@[protected, instance]
Equations
@[protected, instance]
def magma.free_semigroup.semigroup {α : Type u} [has_mul α] :
Equations
theorem magma.free_semigroup.of_mul {α : Type u} [has_mul α] (x y : α) :
def magma.free_semigroup.lift {α : Type u} [has_mul α] {β : Type v} [semigroup β] (f : α → β) (hf : ∀ (x y : α), f (x * y) = f x * f y) :
→ β

Lifts a magma homomorphism α → β to a semigroup homomorphism magma.free_semigroup α → β given a semigroup β.

Equations
• = quot.lift f _
def add_magma.free_add_semigroup.lift {α : Type u} [has_add α] {β : Type v} (f : α → β) (hf : ∀ (x y : α), f (x + y) = f x + f y) :

Lifts an additive magma homomorphism α → β to an additive semigroup homomorphism add_magma.free_add_semigroup α → β given an additive semigroup β.

Equations
• = quot.lift f _
@[simp]
theorem magma.free_semigroup.lift_of {α : Type u} [has_mul α] {β : Type v} [semigroup β] (f : α → β) {hf : ∀ (x y : α), f (x * y) = f x * f y} (x : α) :
= f x
@[simp]
theorem add_magma.free_add_semigroup.lift_of {α : Type u} [has_add α] {β : Type v} (f : α → β) {hf : ∀ (x y : α), f (x + y) = f x + f y} (x : α) :
@[simp]
theorem add_magma.free_add_semigroup.lift_add {α : Type u} [has_add α] {β : Type v} (f : α → β) {hf : ∀ (x y : α), f (x + y) = f x + f y} (x y : add_magma.free_add_semigroup α) :
(x + y) =
@[simp]
theorem magma.free_semigroup.lift_mul {α : Type u} [has_mul α] {β : Type v} [semigroup β] (f : α → β) {hf : ∀ (x y : α), f (x * y) = f x * f y} (x y : magma.free_semigroup α) :
(x * y) = *
theorem add_magma.free_add_semigroup.lift_unique {α : Type u} [has_add α] {β : Type v} (f : → β) (hf : ∀ (x y : , f (x + y) = f x + f y) :
theorem magma.free_semigroup.lift_unique {α : Type u} [has_mul α] {β : Type v} [semigroup β] (f : → β) (hf : ∀ (x y : , f (x * y) = f x * f y) :
def add_magma.free_add_semigroup.map {α : Type u} [has_add α] {β : Type v} [has_add β] (f : α → β) (hf : ∀ (x y : α), f (x + y) = f x + f y) :

From an additive magma homomorphism α → β to an additive semigroup homomorphism add_magma.free_add_semigroup α → add_magma.free_add_semigroup β.

Equations
def magma.free_semigroup.map {α : Type u} [has_mul α] {β : Type v} [has_mul β] (f : α → β) (hf : ∀ (x y : α), f (x * y) = f x * f y) :

From a magma homomorphism α → β to a semigroup homomorphism magma.free_semigroup α → magma.free_semigroup β.

Equations
@[simp]
theorem add_magma.free_add_semigroup.map_of {α : Type u} [has_add α] {β : Type v} [has_add β] (f : α → β) {hf : ∀ (x y : α), f (x + y) = f x + f y} (x : α) :
@[simp]
theorem magma.free_semigroup.map_of {α : Type u} [has_mul α] {β : Type v} [has_mul β] (f : α → β) {hf : ∀ (x y : α), f (x * y) = f x * f y} (x : α) :
@[simp]
theorem add_magma.free_add_semigroup.map_add {α : Type u} [has_add α] {β : Type v} [has_add β] (f : α → β) {hf : ∀ (x y : α), f (x + y) = f x + f y} (x y : add_magma.free_add_semigroup α) :
(x + y) =
@[simp]
theorem magma.free_semigroup.map_mul {α : Type u} [has_mul α] {β : Type v} [has_mul β] (f : α → β) {hf : ∀ (x y : α), f (x * y) = f x * f y} (x y : magma.free_semigroup α) :
(x * y) = x * y
def free_add_semigroup (α : Type u) :
Type u

Free additive semigroup over a given alphabet.

Equations
Instances for free_add_semigroup
def free_semigroup (α : Type u) :
Type u

Free semigroup over a given alphabet. (Note: In this definition, the free semigroup does not contain the empty word.)

Equations
Instances for free_semigroup
@[protected, instance]
def free_semigroup.semigroup {α : Type u} :
Equations
@[protected, instance]
def free_add_semigroup.add_semigroup {α : Type u} :
Equations
def free_semigroup.of {α : Type u} (x : α) :

The embedding α → free_semigroup α.

Equations
def free_add_semigroup.of {α : Type u} (x : α) :

The embedding α → free_add_semigroup α.

Equations
@[protected, instance]
def free_add_semigroup.inhabited {α : Type u} [inhabited α] :
Equations
@[protected, instance]
def free_semigroup.inhabited {α : Type u} [inhabited α] :
Equations
@[protected]
def free_add_semigroup.rec_on {α : Type u} {C : Sort l} (x : free_add_semigroup α) (ih1 : Π (x : α), ) (ih2 : Π (x : α) (y : , C yC ) :
C x

Recursor for free additive semigroup using of and +.

Equations
• x.rec_on ih1 ih2 = prod.rec_on x (λ (f : α) (s : list α), s.rec_on ih1 (λ (hd : α) (tl : list α) (ih : Π (_a : α), C (_a, tl)) (f : α), ih2 f (hd, tl) (ih1 f) (ih hd)) f)
@[protected]
def free_semigroup.rec_on {α : Type u} {C : Sort l} (x : free_semigroup α) (ih1 : Π (x : α), C ) (ih2 : Π (x : α) (y : , C C yC * y)) :
C x

Recursor for free semigroup using of and *.

Equations
• x.rec_on ih1 ih2 = prod.rec_on x (λ (f : α) (s : list α), s.rec_on ih1 (λ (hd : α) (tl : list α) (ih : Π (_a : α), C (_a, tl)) (f : α), ih2 f (hd, tl) (ih1 f) (ih hd)) f)
def free_semigroup.lift' {α : Type u} {β : Type v} [semigroup β] (f : α → β) :
α → list α → β

Auxiliary function for free_semigroup.lift.

Equations
• (hd :: tl) = f x * tl
• = f x
def free_add_semigroup.lift' {α : Type u} {β : Type v} (f : α → β) :
α → list α → β

Auxiliary function for free_semigroup.lift.

Equations
• (hd :: tl) = f x + tl
def free_semigroup.lift {α : Type u} {β : Type v} [semigroup β] (f : α → β) (x : free_semigroup α) :
β

Lifts a function α → β to a semigroup homomorphism free_semigroup α → β given a semigroup β.

Equations
def free_add_semigroup.lift {α : Type u} {β : Type v} (f : α → β) (x : free_add_semigroup α) :
β

Lifts a function α → β to an additive semigroup homomorphism free_add_semigroup α → β given an additive semigroup β.

Equations
@[simp]
theorem free_semigroup.lift_of {α : Type u} {β : Type v} [semigroup β] (f : α → β) (x : α) :
= f x
@[simp]
theorem free_add_semigroup.lift_of {α : Type u} {β : Type v} (f : α → β) (x : α) :
theorem free_add_semigroup.lift_of_add {α : Type u} {β : Type v} (f : α → β) (x : α) (y : free_add_semigroup α) :
= f x +
theorem free_semigroup.lift_of_mul {α : Type u} {β : Type v} [semigroup β] (f : α → β) (x : α) (y : free_semigroup α) :
= f x *
@[simp]
theorem free_add_semigroup.lift_add {α : Type u} {β : Type v} (f : α → β) (x y : free_add_semigroup α) :
(x + y) =
@[simp]
theorem free_semigroup.lift_mul {α : Type u} {β : Type v} [semigroup β] (f : α → β) (x y : free_semigroup α) :
(x * y) =
theorem free_add_semigroup.lift_unique {α : Type u} {β : Type v} (f : → β) (hf : ∀ (x y : , f (x + y) = f x + f y) :
theorem free_semigroup.lift_unique {α : Type u} {β : Type v} [semigroup β] (f : → β) (hf : ∀ (x y : , f (x * y) = f x * f y) :
def free_semigroup.map {α : Type u} {β : Type v} (f : α → β) :

The unique semigroup homomorphism that sends of x to of (f x).

Equations
def free_add_semigroup.map {α : Type u} {β : Type v} (f : α → β) :

The unique additive semigroup homomorphism that sends of x to of (f x).

Equations
@[simp]
theorem free_add_semigroup.map_of {α : Type u} {β : Type v} (f : α → β) (x : α) :
@[simp]
theorem free_semigroup.map_of {α : Type u} {β : Type v} (f : α → β) (x : α) :
@[simp]
theorem free_add_semigroup.map_add {α : Type u} {β : Type v} (f : α → β) (x y : free_add_semigroup α) :
(x + y) =
@[simp]
theorem free_semigroup.map_mul {α : Type u} {β : Type v} (f : α → β) (x y : free_semigroup α) :
(x * y) =
@[protected, instance]
Equations
@[protected, instance]
Equations
def free_semigroup.rec_on_pure {α : Type u} {C : Sort l} (x : free_semigroup α) (ih1 : Π (x : α), C ) (ih2 : Π (x : α) (y : , C C yC * y)) :
C x

Recursor that uses pure instead of of.

Equations
def free_add_semigroup.rec_on_pure {α : Type u} {C : Sort l} (x : free_add_semigroup α) (ih1 : Π (x : α), C ) (ih2 : Π (x : α) (y : , C C yC + y)) :
C x

Recursor that uses pure instead of of.

Equations
@[simp]
theorem free_semigroup.map_pure {α β : Type u} (f : α → β) (x : α) :
@[simp]
theorem free_add_semigroup.map_pure {α β : Type u} (f : α → β) (x : α) :
@[simp]
theorem free_add_semigroup.map_add' {α β : Type u} (f : α → β) (x y : free_add_semigroup α) :
f <$> (x + y) = f <$> x + f <$> y @[simp] theorem free_semigroup.map_mul' {α β : Type u} (f : α → β) (x y : free_semigroup α) : f <$> (x * y) = f <$> x * f <$> y
@[simp]
theorem free_add_semigroup.pure_bind {α β : Type u} (f : α → ) (x : α) :
= f x
@[simp]
theorem free_semigroup.pure_bind {α β : Type u} (f : α → ) (x : α) :
= f x
@[simp]
theorem free_add_semigroup.add_bind {α β : Type u} (f : α → ) (x y : free_add_semigroup α) :
x + y >>= f = (x >>= f) + (y >>= f)
@[simp]
theorem free_semigroup.mul_bind {α β : Type u} (f : α → ) (x y : free_semigroup α) :
x * y >>= f = (x >>= f) * (y >>= f)
@[simp]
theorem free_add_semigroup.pure_seq {α β : Type u} {f : α → β} {x : free_add_semigroup α} :
= f <$> x @[simp] theorem free_semigroup.pure_seq {α β : Type u} {f : α → β} {x : free_semigroup α} : = f <$> x
@[simp]
theorem free_semigroup.mul_seq {α β : Type u} {f g : free_semigroup (α → β)} {x : free_semigroup α} :
f * g <*> x = (f <*> x) * (g <*> x)
@[simp]
theorem free_add_semigroup.add_seq {α β : Type u} {f g : free_add_semigroup (α → β)} {x : free_add_semigroup α} :
f + g <*> x = (f <*> x) + (g <*> x)
@[protected, instance]
@[protected, instance]
@[protected]
def free_add_semigroup.traverse {m : Type uType u} [applicative m] {α β : Type u} (F : α → m β) (x : free_add_semigroup α) :
m

free_add_semigroup is traversable.

Equations
@[protected]
def free_semigroup.traverse {m : Type uType u} [applicative m] {α β : Type u} (F : α → m β) (x : free_semigroup α) :
m

free_semigroup is traversable.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[simp]
theorem free_add_semigroup.traverse_pure {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : α) :
@[simp]
theorem free_semigroup.traverse_pure {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : α) :
@[simp]
theorem free_add_semigroup.traverse_pure' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x : α),
@[simp]
theorem free_semigroup.traverse_pure' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) :
= λ (x : α),
@[simp]
theorem free_add_semigroup.traverse_add {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x y : free_add_semigroup α) :
(x + y) =
@[simp]
theorem free_semigroup.traverse_mul {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x y : free_semigroup α) :
(x * y) =
@[simp]
theorem free_add_semigroup.traverse_add' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β)  :
= λ (x y : ,
@[simp]
theorem free_semigroup.traverse_mul' {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β)  :
= λ (x y : ,
@[simp]
theorem free_semigroup.traverse_eq {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : free_semigroup α) :
@[simp]
theorem free_add_semigroup.traverse_eq {α β : Type u} {m : Type uType u} [applicative m] (F : α → m β) (x : free_add_semigroup α) :
@[simp]
theorem free_add_semigroup.add_map_seq {α : Type u} (x y : free_add_semigroup α) :
= x + y
@[simp]
theorem free_semigroup.mul_map_seq {α : Type u} (x y : free_semigroup α) :
= x * y
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
def free_add_semigroup.decidable_eq {α : Type u} [decidable_eq α] :
Equations
@[protected, instance]
def free_semigroup.decidable_eq {α : Type u} [decidable_eq α] :
Equations
def free_semigroup_free_magma (α : Type u) :

Isomorphism between magma.free_semigroup (free_magma α) and free_semigroup α.

Equations
def free_add_semigroup_free_add_magma (α : Type u) :

Isomorphism between add_magma.free_add_semigroup (free_add_magma α) and free_add_semigroup α.

Equations
@[simp]
theorem free_semigroup_free_magma_mul {α : Type u} (x y : magma.free_semigroup (free_magma α)) :
(x * y) =