File: Mathlib/Algebra/Free.lean

full_name: FreeAddMagma.add
code: /-- Free nonabelian additive magma over a given alphabet. -/
inductive FreeAddMagma (α : Type u) : Type u
  | of : α → FreeAddMagma α
  | add : FreeAddMagma α → FreeAddMagma α → FreeAddMagma α
  deriving DecidableEq
goal: FreeAddMagma α → FreeAddMagma α → FreeAddMagma α

full_name: FreeAddMagma.of
code: /-- Free nonabelian additive magma over a given alphabet. -/
inductive FreeAddMagma (α : Type u) : Type u
  | of : α → FreeAddMagma α
  | add : FreeAddMagma α → FreeAddMagma α → FreeAddMagma α
  deriving DecidableEq
goal: α → FreeAddMagma α

full_name: FreeAddMagma
code: /-- Free nonabelian additive magma over a given alphabet. -/
inductive FreeAddMagma (α : Type u) : Type u
  | of : α → FreeAddMagma α
  | add : FreeAddMagma α → FreeAddMagma α → FreeAddMagma α
  deriving DecidableEq
goal: Type u

full_name: FreeMagma.of
code: /-- Free magma over a given alphabet. -/
@[to_additive]
inductive FreeMagma (α : Type u) : Type u
  | of : α → FreeMagma α
  | mul : FreeMagma α → FreeMagma α → FreeMagma α
  deriving DecidableEq
goal: α → FreeMagma α

full_name: FreeMagma.mul
code: /-- Free magma over a given alphabet. -/
@[to_additive]
inductive FreeMagma (α : Type u) : Type u
  | of : α → FreeMagma α
  | mul : FreeMagma α → FreeMagma α → FreeMagma α
  deriving DecidableEq
goal: FreeMagma α → FreeMagma α → FreeMagma α

full_name: FreeMagma
code: /-- Free magma over a given alphabet. -/
@[to_additive]
inductive FreeMagma (α : Type u) : Type u
  | of : α → FreeMagma α
  | mul : FreeMagma α → FreeMagma α → FreeMagma α
  deriving DecidableEq
goal: Type u

full_name: FreeAddMagma.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (FreeMagma α) 
goal: Inhabited (FreeAddMagma α)

full_name: FreeMagma.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (FreeMagma α) 
goal: Inhabited (FreeMagma α)

full_name: FreeAddMagma.instAdd
code: @[to_additive]
instance : Mul (FreeMagma α) 
goal: Add (FreeAddMagma α)

full_name: FreeMagma.instMul
code: @[to_additive]
instance : Mul (FreeMagma α) 
goal: Mul (FreeMagma α)

full_name: FreeAddMagma.add_eq
code: @[to_additive (attr := simp)]
theorem mul_eq (x y : FreeMagma α) : mul x y = x * y 
goal: x.add y = x + y

full_name: FreeMagma.mul_eq
code: @[to_additive (attr := simp)]
theorem mul_eq (x y : FreeMagma α) : mul x y = x * y 
goal: x.mul y = x * y

full_name: FreeMagma.recOnMul
code: /-- Recursor for `FreeMagma` using `x * y` instead of `FreeMagma.mul x y`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator)
  "Recursor for `FreeAddMagma` using `x + y` instead of `FreeAddMagma.add x y`."]
def recOnMul {C : FreeMagma α → Sort l} (x) (ih1 : ∀ x, C (of x))
    (ih2 : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: FreeAddMagma.recOnAdd
code: /-- Recursor for `FreeMagma` using `x * y` instead of `FreeMagma.mul x y`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator)
  "Recursor for `FreeAddMagma` using `x + y` instead of `FreeAddMagma.add x y`."]
def recOnMul {C : FreeMagma α → Sort l} (x) (ih1 : ∀ x, C (of x))
    (ih2 : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: FreeMagma.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeMagma α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g 
goal: f = g

full_name: FreeAddMagma.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeMagma α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g 
goal: f = g

full_name: FreeMagma.liftAux
code: /-- Lifts a function `α → β` to a magma homomorphism `FreeMagma α → β` given a magma `β`. -/
def FreeMagma.liftAux {α : Type u} {β : Type v} [Mul β] (f : α → β) : FreeMagma α → β
  
goal: FreeMagma α → β

full_name: FreeAddMagma.liftAux
code: /-- Lifts a function `α → β` to an additive magma homomorphism `FreeAddMagma α → β` given
an additive magma `β`. -/
def FreeAddMagma.liftAux {α : Type u} {β : Type v} [Add β] (f : α → β) : FreeAddMagma α → β
  
goal: FreeAddMagma α → β

full_name: FreeAddMagma.lift
code: /-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) 
goal: (α → β) ≃ AddHom (FreeAddMagma α) β

full_name: FreeMagma.lift_symm_apply
code: /-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) 
goal: ∀ (a : α), FreeMagma.lift.symm F a = (⇑F ∘ FreeMagma.of) a

full_name: FreeMagma.lift
code: /-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) 
goal: (α → β) ≃ (FreeMagma α →ₙ* β)

full_name: FreeAddMagma.lift_symm_apply
code: /-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β) 
goal: ∀ (a : α), FreeAddMagma.lift.symm F a = (⇑F ∘ FreeAddMagma.of) a

full_name: FreeAddMagma.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x) : lift f (of x) = f x 
goal: (FreeAddMagma.lift f) (FreeAddMagma.of x) = f x

full_name: FreeMagma.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x) : lift f (of x) = f x 
goal: (FreeMagma.lift f) (FreeMagma.of x) = f x

full_name: FreeAddMagma.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f 
goal: ⇑(FreeAddMagma.lift f) ∘ FreeAddMagma.of = f

full_name: FreeMagma.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f 
goal: ⇑(FreeMagma.lift f) ∘ FreeMagma.of = f

full_name: FreeMagma.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : FreeMagma α →ₙ* β) : lift (f ∘ of) = f 
goal: FreeMagma.lift (⇑f ∘ FreeMagma.of) = f

full_name: FreeAddMagma.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : FreeMagma α →ₙ* β) : lift (f ∘ of) = f 
goal: FreeAddMagma.lift (⇑f ∘ FreeAddMagma.of) = f

full_name: FreeMagma.map
code: /-- The unique magma homomorphism `FreeMagma α →ₙ* FreeMagma β` that sends
each `of x` to `of (f x)`. -/
@[to_additive "The unique additive magma homomorphism `FreeAddMagma α → FreeAddMagma β` that sends
each `of x` to `of (f x)`."]
def map (f : α → β) : FreeMagma α →ₙ* FreeMagma β 
goal: FreeMagma α →ₙ* FreeMagma β

full_name: FreeAddMagma.map
code: /-- The unique magma homomorphism `FreeMagma α →ₙ* FreeMagma β` that sends
each `of x` to `of (f x)`. -/
@[to_additive "The unique additive magma homomorphism `FreeAddMagma α → FreeAddMagma β` that sends
each `of x` to `of (f x)`."]
def map (f : α → β) : FreeMagma α →ₙ* FreeMagma β 
goal: AddHom (FreeAddMagma α) (FreeAddMagma β)

full_name: FreeMagma.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (FreeMagma.map f) (FreeMagma.of x) = FreeMagma.of (f x)

full_name: FreeAddMagma.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (FreeAddMagma.map f) (FreeAddMagma.of x) = FreeAddMagma.of (f x)

full_name: FreeAddMagma.instMonad
code: @[to_additive]
instance : Monad FreeMagma 
goal: Monad FreeAddMagma

full_name: FreeMagma.instMonad
code: @[to_additive]
instance : Monad FreeMagma 
goal: Monad FreeMagma

full_name: FreeAddMagma.recOnPure
code: /-- Recursor on `FreeMagma` using `pure` instead of `of`. -/
@[to_additive (attr := elab_as_elim) "Recursor on `FreeAddMagma` using `pure` instead of `of`."]
protected def recOnPure {C : FreeMagma α → Sort l} (x) (ih1 : ∀ x, C (pure x))
    (ih2 : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: FreeMagma.recOnPure
code: /-- Recursor on `FreeMagma` using `pure` instead of `of`. -/
@[to_additive (attr := elab_as_elim) "Recursor on `FreeAddMagma` using `pure` instead of `of`."]
protected def recOnPure {C : FreeMagma α → Sort l} (x) (ih1 : ∀ x, C (pure x))
    (ih2 : ∀ x y, C x → C y → C (x * y)) : C x 
goal: C x

full_name: FreeAddMagma.map_pure
code: @[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeMagma β) = pure (f x) 
goal: f <$> pure x = pure (f x)

full_name: FreeMagma.map_pure
code: @[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeMagma β) = pure (f x) 
goal: f <$> pure x = pure (f x)

full_name: FreeAddMagma.map_add'
code: @[to_additive (attr := simp)]
theorem map_mul' (f : α → β) (x y : FreeMagma α) : f <$> (x * y) = f <$> x * f <$> y 
goal: f <$> (x + y) = f <$> x + f <$> y

full_name: FreeMagma.map_mul'
code: @[to_additive (attr := simp)]
theorem map_mul' (f : α → β) (x y : FreeMagma α) : f <$> (x * y) = f <$> x * f <$> y 
goal: f <$> (x * y) = f <$> x * f <$> y

full_name: FreeAddMagma.pure_bind
code: @[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeMagma β) (x) : pure x >>= f = f x 
goal: pure x >>= f = f x

full_name: FreeMagma.pure_bind
code: @[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeMagma β) (x) : pure x >>= f = f x 
goal: pure x >>= f = f x

full_name: FreeAddMagma.add_bind
code: @[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeMagma β) (x y : FreeMagma α) : x * y >>= f = (x >>= f) * (y >>= f) 
goal: x + y >>= f = (x >>= f) + (y >>= f)

full_name: FreeMagma.mul_bind
code: @[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeMagma β) (x y : FreeMagma α) : x * y >>= f = (x >>= f) * (y >>= f) 
goal: x * y >>= f = (x >>= f) * (y >>= f)

full_name: FreeMagma.pure_seq
code: @[to_additive (attr := simp)]
theorem pure_seq {α β : Type u} {f : α → β} {x : FreeMagma α} : pure f <*> x = f <$> x 
goal: (Seq.seq (pure f) fun x_1 => x) = f <$> x

full_name: FreeAddMagma.pure_seq
code: @[to_additive (attr := simp)]
theorem pure_seq {α β : Type u} {f : α → β} {x : FreeMagma α} : pure f <*> x = f <$> x 
goal: (Seq.seq (pure f) fun x_1 => x) = f <$> x

full_name: FreeAddMagma.add_seq
code: @[to_additive (attr := simp)]
theorem mul_seq {α β : Type u} {f g : FreeMagma (α → β)} {x : FreeMagma α} :
    f * g <*> x = (f <*> x) * (g <*> x) 
goal: (Seq.seq (f + g) fun x_1 => x) = (Seq.seq f fun x_1 => x) + Seq.seq g fun x_1 => x

full_name: FreeMagma.mul_seq
code: @[to_additive (attr := simp)]
theorem mul_seq {α β : Type u} {f g : FreeMagma (α → β)} {x : FreeMagma α} :
    f * g <*> x = (f <*> x) * (g <*> x) 
goal: (Seq.seq (f * g) fun x_1 => x) = (Seq.seq f fun x_1 => x) * Seq.seq g fun x_1 => x

full_name: FreeMagma.instLawfulMonad
code: @[to_additive]
instance instLawfulMonad : LawfulMonad FreeMagma.{u} 
goal: LawfulMonad FreeMagma

full_name: FreeAddMagma.instLawfulMonad
code: @[to_additive]
instance instLawfulMonad : LawfulMonad FreeMagma.{u} 
goal: LawfulMonad FreeAddMagma

full_name: FreeMagma.traverse
code: /-- `FreeMagma` is traversable. -/
protected def FreeMagma.traverse {m : Type u → Type u} [Applicative m] {α β : Type u}
    (F : α → m β) : FreeMagma α → m (FreeMagma β)
  
goal: FreeMagma α → m (FreeMagma β)

full_name: FreeAddMagma.traverse
code: /-- `FreeAddMagma` is traversable. -/
protected def FreeAddMagma.traverse {m : Type u → Type u} [Applicative m] {α β : Type u}
    (F : α → m β) : FreeAddMagma α → m (FreeAddMagma β)
  
goal: FreeAddMagma α → m (FreeAddMagma β)

full_name: FreeMagma.instTraversable
code: @[to_additive]
instance : Traversable FreeMagma 
goal: Traversable FreeMagma

full_name: FreeAddMagma.instTraversable
code: @[to_additive]
instance : Traversable FreeMagma 
goal: Traversable FreeAddMagma

full_name: FreeMagma.traverse_pure
code: @[to_additive (attr := simp)]
theorem traverse_pure (x) : traverse F (pure x : FreeMagma α) = pure <$> F x 
goal: traverse F (pure x) = pure <$> F x

full_name: FreeAddMagma.traverse_pure
code: @[to_additive (attr := simp)]
theorem traverse_pure (x) : traverse F (pure x : FreeMagma α) = pure <$> F x 
goal: traverse F (pure x) = pure <$> F x

full_name: FreeMagma.traverse_pure'
code: @[to_additive (attr := simp)]
theorem traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeMagma β)) 
goal: traverse F ∘ pure = fun x => pure <$> F x

full_name: FreeAddMagma.traverse_pure'
code: @[to_additive (attr := simp)]
theorem traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeMagma β)) 
goal: traverse F ∘ pure = fun x => pure <$> F x

full_name: FreeMagma.traverse_mul
code: @[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeMagma α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y 
goal: traverse F (x * y) = Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeAddMagma.traverse_add
code: @[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeMagma α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y 
goal: traverse F (x + y) = Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeAddMagma.traverse_add'
code: @[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeMagma α → FreeMagma α → FreeMagma α) = fun x y ↦
      (· * ·) <$> traverse F x <*> traverse F y 
goal: Function.comp (traverse F) ∘ HAdd.hAdd = fun x y =>
  Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeMagma.traverse_mul'
code: @[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeMagma α → FreeMagma α → FreeMagma α) = fun x y ↦
      (· * ·) <$> traverse F x <*> traverse F y 
goal: Function.comp (traverse F) ∘ HMul.hMul = fun x y =>
  Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeAddMagma.traverse_eq
code: @[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeMagma.traverse F x = traverse F x 
goal: FreeAddMagma.traverse F x = traverse F x

full_name: FreeMagma.traverse_eq
code: @[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeMagma.traverse F x = traverse F x 
goal: FreeMagma.traverse F x = traverse F x

full_name: FreeMagma.mul_map_seq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mul_map_seq (x y : FreeMagma α) :
    ((· * ·) <$> x <*> y : Id (FreeMagma α)) = (x * y : FreeMagma α) 
goal: (Seq.seq ((fun x x_1 => x * x_1) <$> x) fun x => y) = x * y

full_name: FreeAddMagma.add_map_seq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mul_map_seq (x y : FreeMagma α) :
    ((· * ·) <$> x <*> y : Id (FreeMagma α)) = (x * y : FreeMagma α) 
goal: (Seq.seq ((fun x x_1 => x + x_1) <$> x) fun x => y) = x + y

full_name: FreeAddMagma.instLawfulTraversable
code: @[to_additive]
instance : LawfulTraversable FreeMagma.{u} 
goal: LawfulTraversable FreeAddMagma

full_name: FreeMagma.instLawfulTraversable
code: @[to_additive]
instance : LawfulTraversable FreeMagma.{u} 
goal: LawfulTraversable FreeMagma

full_name: FreeMagma.repr
code: /-- Representation of an element of a free magma. -/
protected def FreeMagma.repr {α : Type u} [Repr α] : FreeMagma α → Lean.Format
  
goal: FreeMagma α → Lean.Format

full_name: FreeAddMagma.repr
code: /-- Representation of an element of a free additive magma. -/
protected def FreeAddMagma.repr {α : Type u} [Repr α] : FreeAddMagma α → Lean.Format
  
goal: FreeAddMagma α → Lean.Format

full_name: instReprFreeAddMagma
code: @[to_additive]
instance {α : Type u} [Repr α] : Repr (FreeMagma α) 
goal: Repr (FreeAddMagma α)

full_name: instReprFreeMagma
code: @[to_additive]
instance {α : Type u} [Repr α] : Repr (FreeMagma α) 
goal: Repr (FreeMagma α)

full_name: FreeMagma.length
code: /-- Length of an element of a free magma. -/
def FreeMagma.length {α : Type u} : FreeMagma α → ℕ
  
goal: FreeMagma α → ℕ

full_name: FreeAddMagma.length
code: /-- Length of an element of a free additive magma. -/
def FreeAddMagma.length {α : Type u} : FreeAddMagma α → ℕ
  
goal: FreeAddMagma α → ℕ

full_name: FreeAddMagma.length_pos
code: /-- The length of an element of a free magma is positive. -/
@[to_additive "The length of an element of a free additive magma is positive."]
lemma FreeMagma.length_pos {α : Type u} (x : FreeMagma α) : 0 < x.length 
goal: 0 < x.length

full_name: FreeMagma.length_pos
code: /-- The length of an element of a free magma is positive. -/
@[to_additive "The length of an element of a free additive magma is positive."]
lemma FreeMagma.length_pos {α : Type u} (x : FreeMagma α) : 0 < x.length 
goal: 0 < x.length

full_name: AddMagma.AssocRel
code: /-- Associativity relations for an additive magma. -/
inductive AddMagma.AssocRel (α : Type u) [Add α] : α → α → Prop
  | intro : ∀ x y z, AddMagma.AssocRel α (x + y + z) (x + (y + z))
  | left : ∀ w x y z, AddMagma.AssocRel α (w + (x + y + z)) (w + (x + (y + z)))
goal: α → α → Prop

full_name: AddMagma.AssocRel.left
code: /-- Associativity relations for an additive magma. -/
inductive AddMagma.AssocRel (α : Type u) [Add α] : α → α → Prop
  | intro : ∀ x y z, AddMagma.AssocRel α (x + y + z) (x + (y + z))
  | left : ∀ w x y z, AddMagma.AssocRel α (w + (x + y + z)) (w + (x + (y + z)))
goal: AddMagma.AssocRel α (w + (x + y + z)) (w + (x + (y + z)))

full_name: AddMagma.AssocRel.intro
code: /-- Associativity relations for an additive magma. -/
inductive AddMagma.AssocRel (α : Type u) [Add α] : α → α → Prop
  | intro : ∀ x y z, AddMagma.AssocRel α (x + y + z) (x + (y + z))
  | left : ∀ w x y z, AddMagma.AssocRel α (w + (x + y + z)) (w + (x + (y + z)))
goal: AddMagma.AssocRel α (x + y + z) (x + (y + z))

full_name: Magma.AssocRel.left
code: /-- Associativity relations for a magma. -/
@[to_additive AddMagma.AssocRel "Associativity relations for an additive magma."]
inductive Magma.AssocRel (α : Type u) [Mul α] : α → α → Prop
  | intro : ∀ x y z, Magma.AssocRel α (x * y * z) (x * (y * z))
  | left : ∀ w x y z, Magma.AssocRel α (w * (x * y * z)) (w * (x * (y * z)))
goal: Magma.AssocRel α (w * (x * y * z)) (w * (x * (y * z)))

full_name: Magma.AssocRel.intro
code: /-- Associativity relations for a magma. -/
@[to_additive AddMagma.AssocRel "Associativity relations for an additive magma."]
inductive Magma.AssocRel (α : Type u) [Mul α] : α → α → Prop
  | intro : ∀ x y z, Magma.AssocRel α (x * y * z) (x * (y * z))
  | left : ∀ w x y z, Magma.AssocRel α (w * (x * y * z)) (w * (x * (y * z)))
goal: Magma.AssocRel α (x * y * z) (x * (y * z))

full_name: Magma.AssocRel
code: /-- Associativity relations for a magma. -/
@[to_additive AddMagma.AssocRel "Associativity relations for an additive magma."]
inductive Magma.AssocRel (α : Type u) [Mul α] : α → α → Prop
  | intro : ∀ x y z, Magma.AssocRel α (x * y * z) (x * (y * z))
  | left : ∀ w x y z, Magma.AssocRel α (w * (x * y * z)) (w * (x * (y * z)))
goal: α → α → Prop

full_name: Magma.AssocQuotient
code: /-- Semigroup quotient of a magma. -/
@[to_additive AddMagma.FreeAddSemigroup "Additive semigroup quotient of an additive magma."]
def AssocQuotient (α : Type u) [Mul α] : Type u 
goal: Type u

full_name: AddMagma.FreeAddSemigroup
code: /-- Semigroup quotient of a magma. -/
@[to_additive AddMagma.FreeAddSemigroup "Additive semigroup quotient of an additive magma."]
def AssocQuotient (α : Type u) [Mul α] : Type u 
goal: Type u

full_name: Magma.AssocQuotient.quot_mk_assoc
code: @[to_additive]
theorem quot_mk_assoc (x y z : α) : Quot.mk (AssocRel α) (x * y * z) = Quot.mk _ (x * (y * z)) 
goal: Quot.mk (Magma.AssocRel α) (x * y * z) = Quot.mk (Magma.AssocRel α) (x * (y * z))

full_name: AddMagma.FreeAddSemigroup.quot_mk_assoc
code: @[to_additive]
theorem quot_mk_assoc (x y z : α) : Quot.mk (AssocRel α) (x * y * z) = Quot.mk _ (x * (y * z)) 
goal: Quot.mk (AddMagma.AssocRel α) (x + y + z) = Quot.mk (AddMagma.AssocRel α) (x + (y + z))

full_name: Magma.AssocQuotient.quot_mk_assoc_left
code: @[to_additive]
theorem quot_mk_assoc_left (x y z w : α) :
    Quot.mk (AssocRel α) (x * (y * z * w)) = Quot.mk _ (x * (y * (z * w))) 
goal: Quot.mk (Magma.AssocRel α) (x * (y * z * w)) = Quot.mk (Magma.AssocRel α) (x * (y * (z * w)))

full_name: AddMagma.FreeAddSemigroup.quot_mk_assoc_left
code: @[to_additive]
theorem quot_mk_assoc_left (x y z w : α) :
    Quot.mk (AssocRel α) (x * (y * z * w)) = Quot.mk _ (x * (y * (z * w))) 
goal: Quot.mk (AddMagma.AssocRel α) (x + (y + z + w)) = Quot.mk (AddMagma.AssocRel α) (x + (y + (z + w)))

full_name: Magma.AssocQuotient.instSemigroup
code: @[to_additive]
instance : Semigroup (AssocQuotient α) 
goal: Semigroup (Magma.AssocQuotient α)

full_name: AddMagma.FreeAddSemigroup.instAddSemigroup
code: @[to_additive]
instance : Semigroup (AssocQuotient α) 
goal: AddSemigroup (AddMagma.FreeAddSemigroup α)

full_name: AddMagma.FreeAddSemigroup.of
code: /-- Embedding from magma to its free semigroup. -/
@[to_additive "Embedding from additive magma to its free additive semigroup."]
def of : α →ₙ* AssocQuotient α 
goal: AddHom α (AddMagma.FreeAddSemigroup α)

full_name: Magma.AssocQuotient.of
code: /-- Embedding from magma to its free semigroup. -/
@[to_additive "Embedding from additive magma to its free additive semigroup."]
def of : α →ₙ* AssocQuotient α 
goal: α →ₙ* Magma.AssocQuotient α

full_name: AddMagma.FreeAddSemigroup.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (AssocQuotient α) 
goal: Inhabited (AddMagma.FreeAddSemigroup α)

full_name: Magma.AssocQuotient.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (AssocQuotient α) 
goal: Inhabited (Magma.AssocQuotient α)

full_name: AddMagma.FreeAddSemigroup.induction_on
code: @[to_additive (attr := elab_as_elim, induction_eliminator)]
protected theorem induction_on {C : AssocQuotient α → Prop} (x : AssocQuotient α)
    (ih : ∀ x, C (of x)) : C x 
goal: C x

full_name: Magma.AssocQuotient.induction_on
code: @[to_additive (attr := elab_as_elim, induction_eliminator)]
protected theorem induction_on {C : AssocQuotient α → Prop} (x : AssocQuotient α)
    (ih : ∀ x, C (of x)) : C x 
goal: C x

full_name: Magma.AssocQuotient.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {f g : AssocQuotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g 
goal: f = g

full_name: AddMagma.FreeAddSemigroup.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {f g : AssocQuotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g 
goal: f = g

full_name: Magma.AssocQuotient.lift_symm_apply
code: /-- Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts an additive magma homomorphism `α → β` to an
additive semigroup homomorphism `AddMagma.AssocQuotient α → β` given an additive semigroup `β`."]
def lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β) 
goal: Magma.AssocQuotient.lift.symm f = f.comp Magma.AssocQuotient.of

full_name: AddMagma.FreeAddSemigroup.lift
code: /-- Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts an additive magma homomorphism `α → β` to an
additive semigroup homomorphism `AddMagma.AssocQuotient α → β` given an additive semigroup `β`."]
def lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β) 
goal: AddHom α β ≃ AddHom (AddMagma.FreeAddSemigroup α) β

full_name: Magma.AssocQuotient.lift
code: /-- Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts an additive magma homomorphism `α → β` to an
additive semigroup homomorphism `AddMagma.AssocQuotient α → β` given an additive semigroup `β`."]
def lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β) 
goal: (α →ₙ* β) ≃ (Magma.AssocQuotient α →ₙ* β)

full_name: AddMagma.FreeAddSemigroup.lift_symm_apply
code: /-- Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts an additive magma homomorphism `α → β` to an
additive semigroup homomorphism `AddMagma.AssocQuotient α → β` given an additive semigroup `β`."]
def lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β) 
goal: AddMagma.FreeAddSemigroup.lift.symm f = f.comp AddMagma.FreeAddSemigroup.of

full_name: AddMagma.FreeAddSemigroup.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x 
goal: (AddMagma.FreeAddSemigroup.lift f) (AddMagma.FreeAddSemigroup.of x) = f x

full_name: Magma.AssocQuotient.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x 
goal: (Magma.AssocQuotient.lift f) (Magma.AssocQuotient.of x) = f x

full_name: AddMagma.FreeAddSemigroup.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : (lift f).comp of = f 
goal: (AddMagma.FreeAddSemigroup.lift f).comp AddMagma.FreeAddSemigroup.of = f

full_name: Magma.AssocQuotient.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : (lift f).comp of = f 
goal: (Magma.AssocQuotient.lift f).comp Magma.AssocQuotient.of = f

full_name: AddMagma.FreeAddSemigroup.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : AssocQuotient α →ₙ* β) : lift (f.comp of) = f 
goal: AddMagma.FreeAddSemigroup.lift (f.comp AddMagma.FreeAddSemigroup.of) = f

full_name: Magma.AssocQuotient.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : AssocQuotient α →ₙ* β) : lift (f.comp of) = f 
goal: Magma.AssocQuotient.lift (f.comp Magma.AssocQuotient.of) = f

full_name: AddMagma.FreeAddSemigroup.map
code: /-- From a magma homomorphism `α →ₙ* β` to a semigroup homomorphism
`Magma.AssocQuotient α →ₙ* Magma.AssocQuotient β`. -/
@[to_additive "From an additive magma homomorphism `α → β` to an additive semigroup homomorphism
`AddMagma.AssocQuotient α → AddMagma.AssocQuotient β`."]
def map : AssocQuotient α →ₙ* AssocQuotient β 
goal: AddHom (AddMagma.FreeAddSemigroup α) (AddMagma.FreeAddSemigroup β)

full_name: Magma.AssocQuotient.map
code: /-- From a magma homomorphism `α →ₙ* β` to a semigroup homomorphism
`Magma.AssocQuotient α →ₙ* Magma.AssocQuotient β`. -/
@[to_additive "From an additive magma homomorphism `α → β` to an additive semigroup homomorphism
`AddMagma.AssocQuotient α → AddMagma.AssocQuotient β`."]
def map : AssocQuotient α →ₙ* AssocQuotient β 
goal: Magma.AssocQuotient α →ₙ* Magma.AssocQuotient β

full_name: AddMagma.FreeAddSemigroup.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (AddMagma.FreeAddSemigroup.map f) (AddMagma.FreeAddSemigroup.of x) = AddMagma.FreeAddSemigroup.of (f x)

full_name: Magma.AssocQuotient.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (Magma.AssocQuotient.map f) (Magma.AssocQuotient.of x) = Magma.AssocQuotient.of (f x)

full_name: FreeAddSemigroup
code: /-- Free additive semigroup over a given alphabet. -/
structure FreeAddSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: Type u

full_name: FreeAddSemigroup.tail
code: /-- Free additive semigroup over a given alphabet. -/
structure FreeAddSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: List α

full_name: FreeAddSemigroup.head
code: /-- Free additive semigroup over a given alphabet. -/
structure FreeAddSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: α

full_name: FreeSemigroup.tail
code: /-- Free semigroup over a given alphabet. -/
@[to_additive (attr := ext)]
structure FreeSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: List α

full_name: FreeSemigroup
code: /-- Free semigroup over a given alphabet. -/
@[to_additive (attr := ext)]
structure FreeSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: Type u

full_name: FreeSemigroup.head
code: /-- Free semigroup over a given alphabet. -/
@[to_additive (attr := ext)]
structure FreeSemigroup (α : Type u) where
  /-- The head of the element -/
  head : α
  /-- The tail of the element -/
  tail : List α
goal: α

full_name: FreeAddSemigroup.instAddSemigroup
code: @[to_additive]
instance : Semigroup (FreeSemigroup α) 
goal: AddSemigroup (FreeAddSemigroup α)

full_name: FreeSemigroup.instSemigroup
code: @[to_additive]
instance : Semigroup (FreeSemigroup α) 
goal: Semigroup (FreeSemigroup α)

full_name: FreeAddSemigroup.head_add
code: @[to_additive (attr := simp)]
theorem head_mul (x y : FreeSemigroup α) : (x * y).1 = x.1 
goal: (x + y).head = x.head

full_name: FreeSemigroup.head_mul
code: @[to_additive (attr := simp)]
theorem head_mul (x y : FreeSemigroup α) : (x * y).1 = x.1 
goal: (x * y).head = x.head

full_name: FreeSemigroup.tail_mul
code: @[to_additive (attr := simp)]
theorem tail_mul (x y : FreeSemigroup α) : (x * y).2 = x.2 ++ y.1 :: y.2 
goal: (x * y).tail = x.tail ++ y.head :: y.tail

full_name: FreeAddSemigroup.tail_add
code: @[to_additive (attr := simp)]
theorem tail_mul (x y : FreeSemigroup α) : (x * y).2 = x.2 ++ y.1 :: y.2 
goal: (x + y).tail = x.tail ++ y.head :: y.tail

full_name: FreeAddSemigroup.mk_add_mk
code: @[to_additive (attr := simp)]
theorem mk_mul_mk (x y : α) (L1 L2 : List α) : mk x L1 * mk y L2 = mk x (L1 ++ y :: L2) 
goal: { head := x, tail := L1 } + { head := y, tail := L2 } = { head := x, tail := L1 ++ y :: L2 }

full_name: FreeSemigroup.mk_mul_mk
code: @[to_additive (attr := simp)]
theorem mk_mul_mk (x y : α) (L1 L2 : List α) : mk x L1 * mk y L2 = mk x (L1 ++ y :: L2) 
goal: { head := x, tail := L1 } * { head := y, tail := L2 } = { head := x, tail := L1 ++ y :: L2 }

full_name: FreeSemigroup.of
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: FreeSemigroup α

full_name: FreeAddSemigroup.of_tail
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: (FreeAddSemigroup.of x).tail = []

full_name: FreeSemigroup.of_tail
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: (FreeSemigroup.of x).tail = []

full_name: FreeAddSemigroup.of_head
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: (FreeAddSemigroup.of x).head = x

full_name: FreeAddSemigroup.of
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: FreeAddSemigroup α

full_name: FreeSemigroup.of_head
code: /-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α 
goal: (FreeSemigroup.of x).head = x

full_name: FreeSemigroup.length
code: /-- Length of an element of free semigroup. -/
@[to_additive "Length of an element of free additive semigroup"]
def length (x : FreeSemigroup α) : ℕ 
goal: ℕ

full_name: FreeAddSemigroup.length
code: /-- Length of an element of free semigroup. -/
@[to_additive "Length of an element of free additive semigroup"]
def length (x : FreeSemigroup α) : ℕ 
goal: ℕ

full_name: FreeSemigroup.length_mul
code: @[to_additive (attr := simp)]
theorem length_mul (x y : FreeSemigroup α) : (x * y).length = x.length + y.length 
goal: (x * y).length = x.length + y.length

full_name: FreeAddSemigroup.length_add
code: @[to_additive (attr := simp)]
theorem length_mul (x y : FreeSemigroup α) : (x * y).length = x.length + y.length 
goal: (x + y).length = x.length + y.length

full_name: FreeAddSemigroup.length_of
code: @[to_additive (attr := simp)]
theorem length_of (x : α) : (of x).length = 1 
goal: (FreeAddSemigroup.of x).length = 1

full_name: FreeSemigroup.length_of
code: @[to_additive (attr := simp)]
theorem length_of (x : α) : (of x).length = 1 
goal: (FreeSemigroup.of x).length = 1

full_name: FreeAddSemigroup.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (FreeSemigroup α) 
goal: Inhabited (FreeAddSemigroup α)

full_name: FreeSemigroup.instInhabited
code: @[to_additive]
instance [Inhabited α] : Inhabited (FreeSemigroup α) 
goal: Inhabited (FreeSemigroup α)

full_name: FreeAddSemigroup.recOnAdd
code: /-- Recursor for free semigroup using `of` and `*`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator)
  "Recursor for free additive semigroup using `of` and `+`."]
protected def recOnMul {C : FreeSemigroup α → Sort l} (x) (ih1 : ∀ x, C (of x))
    (ih2 : ∀ x y, C (of x) → C y → C (of x * y)) : C x 
goal: C x

full_name: FreeSemigroup.recOnMul
code: /-- Recursor for free semigroup using `of` and `*`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator)
  "Recursor for free additive semigroup using `of` and `+`."]
protected def recOnMul {C : FreeSemigroup α → Sort l} (x) (ih1 : ∀ x, C (of x))
    (ih2 : ∀ x y, C (of x) → C y → C (of x * y)) : C x 
goal: C x

full_name: FreeAddSemigroup.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeSemigroup α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g 
goal: f = g

full_name: FreeSemigroup.hom_ext
code: @[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeSemigroup α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g 
goal: f = g

full_name: FreeSemigroup.lift
code: /-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β) 
goal: (α → β) ≃ (FreeSemigroup α →ₙ* β)

full_name: FreeAddSemigroup.lift
code: /-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β) 
goal: (α → β) ≃ AddHom (FreeAddSemigroup α) β

full_name: FreeSemigroup.lift_symm_apply
code: /-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β) 
goal: ∀ (a : α), FreeSemigroup.lift.symm f a = (⇑f ∘ FreeSemigroup.of) a

full_name: FreeAddSemigroup.lift_symm_apply
code: /-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β) 
goal: ∀ (a : α), FreeAddSemigroup.lift.symm f a = (⇑f ∘ FreeAddSemigroup.of) a

full_name: FreeAddSemigroup.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x 
goal: (FreeAddSemigroup.lift f) (FreeAddSemigroup.of x) = f x

full_name: FreeSemigroup.lift_of
code: @[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x 
goal: (FreeSemigroup.lift f) (FreeSemigroup.of x) = f x

full_name: FreeSemigroup.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f 
goal: ⇑(FreeSemigroup.lift f) ∘ FreeSemigroup.of = f

full_name: FreeAddSemigroup.lift_comp_of
code: @[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f 
goal: ⇑(FreeAddSemigroup.lift f) ∘ FreeAddSemigroup.of = f

full_name: FreeAddSemigroup.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : FreeSemigroup α →ₙ* β) : lift (f ∘ of) = f 
goal: FreeAddSemigroup.lift (⇑f ∘ FreeAddSemigroup.of) = f

full_name: FreeSemigroup.lift_comp_of'
code: @[to_additive (attr := simp)]
theorem lift_comp_of' (f : FreeSemigroup α →ₙ* β) : lift (f ∘ of) = f 
goal: FreeSemigroup.lift (⇑f ∘ FreeSemigroup.of) = f

full_name: FreeSemigroup.lift_of_mul
code: @[to_additive]
theorem lift_of_mul (x y) : lift f (of x * y) = f x * lift f y 
goal: (FreeSemigroup.lift f) (FreeSemigroup.of x * y) = f x * (FreeSemigroup.lift f) y

full_name: FreeAddSemigroup.lift_of_add
code: @[to_additive]
theorem lift_of_mul (x y) : lift f (of x * y) = f x * lift f y 
goal: (FreeAddSemigroup.lift f) (FreeAddSemigroup.of x + y) = f x + (FreeAddSemigroup.lift f) y

full_name: FreeSemigroup.map
code: /-- The unique semigroup homomorphism that sends `of x` to `of (f x)`. -/
@[to_additive "The unique additive semigroup homomorphism that sends `of x` to `of (f x)`."]
def map : FreeSemigroup α →ₙ* FreeSemigroup β 
goal: FreeSemigroup α →ₙ* FreeSemigroup β

full_name: FreeAddSemigroup.map
code: /-- The unique semigroup homomorphism that sends `of x` to `of (f x)`. -/
@[to_additive "The unique additive semigroup homomorphism that sends `of x` to `of (f x)`."]
def map : FreeSemigroup α →ₙ* FreeSemigroup β 
goal: AddHom (FreeAddSemigroup α) (FreeAddSemigroup β)

full_name: FreeAddSemigroup.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (FreeAddSemigroup.map f) (FreeAddSemigroup.of x) = FreeAddSemigroup.of (f x)

full_name: FreeSemigroup.map_of
code: @[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x) 
goal: (FreeSemigroup.map f) (FreeSemigroup.of x) = FreeSemigroup.of (f x)

full_name: FreeAddSemigroup.length_map
code: @[to_additive (attr := simp)]
theorem length_map (x) : (map f x).length = x.length 
goal: ((FreeAddSemigroup.map f) x).length = x.length

full_name: FreeSemigroup.length_map
code: @[to_additive (attr := simp)]
theorem length_map (x) : (map f x).length = x.length 
goal: ((FreeSemigroup.map f) x).length = x.length

full_name: FreeSemigroup.instMonad
code: @[to_additive]
instance : Monad FreeSemigroup 
goal: Monad FreeSemigroup

full_name: FreeAddSemigroup.instMonad
code: @[to_additive]
instance : Monad FreeSemigroup 
goal: Monad FreeAddSemigroup

full_name: FreeSemigroup.recOnPure
code: /-- Recursor that uses `pure` instead of `of`. -/
@[to_additive (attr := elab_as_elim) "Recursor that uses `pure` instead of `of`."]
def recOnPure {C : FreeSemigroup α → Sort l} (x) (ih1 : ∀ x, C (pure x))
    (ih2 : ∀ x y, C (pure x) → C y → C (pure x * y)) : C x 
goal: C x

full_name: FreeAddSemigroup.recOnPure
code: /-- Recursor that uses `pure` instead of `of`. -/
@[to_additive (attr := elab_as_elim) "Recursor that uses `pure` instead of `of`."]
def recOnPure {C : FreeSemigroup α → Sort l} (x) (ih1 : ∀ x, C (pure x))
    (ih2 : ∀ x y, C (pure x) → C y → C (pure x * y)) : C x 
goal: C x

full_name: FreeSemigroup.map_pure
code: @[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeSemigroup β) = pure (f x) 
goal: f <$> pure x = pure (f x)

full_name: FreeAddSemigroup.map_pure
code: @[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeSemigroup β) = pure (f x) 
goal: f <$> pure x = pure (f x)

full_name: FreeSemigroup.map_mul'
code: @[to_additive (attr := simp)]
theorem map_mul' (f : α → β) (x y : FreeSemigroup α) : f <$> (x * y) = f <$> x * f <$> y 
goal: f <$> (x * y) = f <$> x * f <$> y

full_name: FreeAddSemigroup.map_add'
code: @[to_additive (attr := simp)]
theorem map_mul' (f : α → β) (x y : FreeSemigroup α) : f <$> (x * y) = f <$> x * f <$> y 
goal: f <$> (x + y) = f <$> x + f <$> y

full_name: FreeSemigroup.pure_bind
code: @[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeSemigroup β) (x) : pure x >>= f = f x 
goal: pure x >>= f = f x

full_name: FreeAddSemigroup.pure_bind
code: @[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeSemigroup β) (x) : pure x >>= f = f x 
goal: pure x >>= f = f x

full_name: FreeSemigroup.mul_bind
code: @[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeSemigroup β) (x y : FreeSemigroup α) :
    x * y >>= f = (x >>= f) * (y >>= f) 
goal: x * y >>= f = (x >>= f) * (y >>= f)

full_name: FreeAddSemigroup.add_bind
code: @[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeSemigroup β) (x y : FreeSemigroup α) :
    x * y >>= f = (x >>= f) * (y >>= f) 
goal: x + y >>= f = (x >>= f) + (y >>= f)

full_name: FreeAddSemigroup.pure_seq
code: @[to_additive (attr := simp)]
theorem pure_seq {f : α → β} {x : FreeSemigroup α} : pure f <*> x = f <$> x 
goal: (Seq.seq (pure f) fun x_1 => x) = f <$> x

full_name: FreeSemigroup.pure_seq
code: @[to_additive (attr := simp)]
theorem pure_seq {f : α → β} {x : FreeSemigroup α} : pure f <*> x = f <$> x 
goal: (Seq.seq (pure f) fun x_1 => x) = f <$> x

full_name: FreeSemigroup.mul_seq
code: @[to_additive (attr := simp)]
theorem mul_seq {f g : FreeSemigroup (α → β)} {x : FreeSemigroup α} :
    f * g <*> x = (f <*> x) * (g <*> x) 
goal: (Seq.seq (f * g) fun x_1 => x) = (Seq.seq f fun x_1 => x) * Seq.seq g fun x_1 => x

full_name: FreeAddSemigroup.add_seq
code: @[to_additive (attr := simp)]
theorem mul_seq {f g : FreeSemigroup (α → β)} {x : FreeSemigroup α} :
    f * g <*> x = (f <*> x) * (g <*> x) 
goal: (Seq.seq (f + g) fun x_1 => x) = (Seq.seq f fun x_1 => x) + Seq.seq g fun x_1 => x

full_name: FreeSemigroup.instLawfulMonad
code: @[to_additive]
instance instLawfulMonad : LawfulMonad FreeSemigroup.{u} 
goal: LawfulMonad FreeSemigroup

full_name: FreeAddSemigroup.instLawfulMonad
code: @[to_additive]
instance instLawfulMonad : LawfulMonad FreeSemigroup.{u} 
goal: LawfulMonad FreeAddSemigroup

full_name: FreeSemigroup.traverse
code: /-- `FreeSemigroup` is traversable. -/
@[to_additive "`FreeAddSemigroup` is traversable."]
protected def traverse {m : Type u → Type u} [Applicative m] {α β : Type u}
    (F : α → m β) (x : FreeSemigroup α) : m (FreeSemigroup β) 
goal: m (FreeSemigroup β)

full_name: FreeAddSemigroup.traverse
code: /-- `FreeSemigroup` is traversable. -/
@[to_additive "`FreeAddSemigroup` is traversable."]
protected def traverse {m : Type u → Type u} [Applicative m] {α β : Type u}
    (F : α → m β) (x : FreeSemigroup α) : m (FreeSemigroup β) 
goal: m (FreeAddSemigroup β)

full_name: FreeAddSemigroup.instTraversable
code: @[to_additive]
instance : Traversable FreeSemigroup 
goal: Traversable FreeAddSemigroup

full_name: FreeSemigroup.instTraversable
code: @[to_additive]
instance : Traversable FreeSemigroup 
goal: Traversable FreeSemigroup

full_name: FreeAddSemigroup.traverse_pure
code: @[to_additive (attr := simp)]
theorem traverse_pure (x) : traverse F (pure x : FreeSemigroup α) = pure <$> F x 
goal: traverse F (pure x) = pure <$> F x

full_name: FreeSemigroup.traverse_pure
code: @[to_additive (attr := simp)]
theorem traverse_pure (x) : traverse F (pure x : FreeSemigroup α) = pure <$> F x 
goal: traverse F (pure x) = pure <$> F x

full_name: FreeAddSemigroup.traverse_pure'
code: @[to_additive (attr := simp)]
theorem traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeSemigroup β)) 
goal: traverse F ∘ pure = fun x => pure <$> F x

full_name: FreeSemigroup.traverse_pure'
code: @[to_additive (attr := simp)]
theorem traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeSemigroup β)) 
goal: traverse F ∘ pure = fun x => pure <$> F x

full_name: FreeAddSemigroup.traverse_add
code: @[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeSemigroup α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y 
goal: traverse F (x + y) = Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeSemigroup.traverse_mul
code: @[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeSemigroup α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y 
goal: traverse F (x * y) = Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeAddSemigroup.traverse_add'
code: @[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeSemigroup α → FreeSemigroup α → FreeSemigroup α) =
      fun x y ↦ (· * ·) <$> traverse F x <*> traverse F y 
goal: Function.comp (traverse F) ∘ HAdd.hAdd = fun x y =>
  Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeSemigroup.traverse_mul'
code: @[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeSemigroup α → FreeSemigroup α → FreeSemigroup α) =
      fun x y ↦ (· * ·) <$> traverse F x <*> traverse F y 
goal: Function.comp (traverse F) ∘ HMul.hMul = fun x y =>
  Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y

full_name: FreeSemigroup.traverse_eq
code: @[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeSemigroup.traverse F x = traverse F x 
goal: FreeSemigroup.traverse F x = traverse F x

full_name: FreeAddSemigroup.traverse_eq
code: @[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeSemigroup.traverse F x = traverse F x 
goal: FreeAddSemigroup.traverse F x = traverse F x

full_name: FreeAddSemigroup.add_map_seq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mul_map_seq (x y : FreeSemigroup α) :
    ((· * ·) <$> x <*> y : Id (FreeSemigroup α)) = (x * y : FreeSemigroup α) 
goal: (Seq.seq ((fun x x_1 => x + x_1) <$> x) fun x => y) = x + y

full_name: FreeSemigroup.mul_map_seq
code: @[to_additive (attr := simp, nolint simpNF)]
theorem mul_map_seq (x y : FreeSemigroup α) :
    ((· * ·) <$> x <*> y : Id (FreeSemigroup α)) = (x * y : FreeSemigroup α) 
goal: (Seq.seq ((fun x x_1 => x * x_1) <$> x) fun x => y) = x * y

full_name: FreeSemigroup.instLawfulTraversable
code: @[to_additive]
instance : LawfulTraversable FreeSemigroup.{u} 
goal: LawfulTraversable FreeSemigroup

full_name: FreeAddSemigroup.instLawfulTraversable
code: @[to_additive]
instance : LawfulTraversable FreeSemigroup.{u} 
goal: LawfulTraversable FreeAddSemigroup

full_name: FreeSemigroup.instDecidableEq
code: @[to_additive]
instance [DecidableEq α] : DecidableEq (FreeSemigroup α) 
goal: DecidableEq (FreeSemigroup α)

full_name: FreeAddSemigroup.instDecidableEq
code: @[to_additive]
instance [DecidableEq α] : DecidableEq (FreeSemigroup α) 
goal: DecidableEq (FreeAddSemigroup α)

full_name: FreeAddMagma.toFreeAddSemigroup
code: /-- The canonical multiplicative morphism from `FreeMagma α` to `FreeSemigroup α`. -/
@[to_additive "The canonical additive morphism from `FreeAddMagma α` to `FreeAddSemigroup α`."]
def toFreeSemigroup : FreeMagma α →ₙ* FreeSemigroup α 
goal: AddHom (FreeAddMagma α) (FreeAddSemigroup α)

full_name: FreeMagma.toFreeSemigroup
code: /-- The canonical multiplicative morphism from `FreeMagma α` to `FreeSemigroup α`. -/
@[to_additive "The canonical additive morphism from `FreeAddMagma α` to `FreeAddSemigroup α`."]
def toFreeSemigroup : FreeMagma α →ₙ* FreeSemigroup α 
goal: FreeMagma α →ₙ* FreeSemigroup α

full_name: FreeMagma.toFreeSemigroup_of
code: @[to_additive (attr := simp)]
theorem toFreeSemigroup_of (x : α) : toFreeSemigroup (of x) = FreeSemigroup.of x 
goal: FreeMagma.toFreeSemigroup (FreeMagma.of x) = FreeSemigroup.of x

full_name: FreeAddMagma.toFreeAddSemigroup_of
code: @[to_additive (attr := simp)]
theorem toFreeSemigroup_of (x : α) : toFreeSemigroup (of x) = FreeSemigroup.of x 
goal: FreeAddMagma.toFreeAddSemigroup (FreeAddMagma.of x) = FreeAddSemigroup.of x

full_name: FreeMagma.toFreeSemigroup_comp_of
code: @[to_additive (attr := simp)]
theorem toFreeSemigroup_comp_of : @toFreeSemigroup α ∘ of = FreeSemigroup.of 
goal: ⇑FreeMagma.toFreeSemigroup ∘ FreeMagma.of = FreeSemigroup.of

full_name: FreeAddMagma.toFreeAddSemigroup_comp_of
code: @[to_additive (attr := simp)]
theorem toFreeSemigroup_comp_of : @toFreeSemigroup α ∘ of = FreeSemigroup.of 
goal: ⇑FreeAddMagma.toFreeAddSemigroup ∘ FreeAddMagma.of = FreeAddSemigroup.of

full_name: FreeMagma.toFreeSemigroup_comp_map
code: @[to_additive]
theorem toFreeSemigroup_comp_map (f : α → β) :
    toFreeSemigroup.comp (map f) = (FreeSemigroup.map f).comp toFreeSemigroup 
goal: FreeMagma.toFreeSemigroup.comp (FreeMagma.map f) = (FreeSemigroup.map f).comp FreeMagma.toFreeSemigroup

full_name: FreeAddMagma.toFreeAddSemigroup_comp_map
code: @[to_additive]
theorem toFreeSemigroup_comp_map (f : α → β) :
    toFreeSemigroup.comp (map f) = (FreeSemigroup.map f).comp toFreeSemigroup 
goal: FreeAddMagma.toFreeAddSemigroup.comp (FreeAddMagma.map f) =
  (FreeAddSemigroup.map f).comp FreeAddMagma.toFreeAddSemigroup

full_name: FreeAddMagma.toFreeAddSemigroup_map
code: @[to_additive]
theorem toFreeSemigroup_map (f : α → β) (x : FreeMagma α) :
    toFreeSemigroup (map f x) = FreeSemigroup.map f (toFreeSemigroup x) 
goal: FreeAddMagma.toFreeAddSemigroup ((FreeAddMagma.map f) x) = (FreeAddSemigroup.map f) (FreeAddMagma.toFreeAddSemigroup x)

full_name: FreeMagma.toFreeSemigroup_map
code: @[to_additive]
theorem toFreeSemigroup_map (f : α → β) (x : FreeMagma α) :
    toFreeSemigroup (map f x) = FreeSemigroup.map f (toFreeSemigroup x) 
goal: FreeMagma.toFreeSemigroup ((FreeMagma.map f) x) = (FreeSemigroup.map f) (FreeMagma.toFreeSemigroup x)

full_name: FreeAddMagma.length_toFreeAddSemigroup
code: @[to_additive (attr := simp)]
theorem length_toFreeSemigroup (x : FreeMagma α) : (toFreeSemigroup x).length = x.length 
goal: (FreeAddMagma.toFreeAddSemigroup x).length = x.length

full_name: FreeMagma.length_toFreeSemigroup
code: @[to_additive (attr := simp)]
theorem length_toFreeSemigroup (x : FreeMagma α) : (toFreeSemigroup x).length = x.length 
goal: (FreeMagma.toFreeSemigroup x).length = x.length

full_name: FreeMagmaAssocQuotientEquiv
code: /-- Isomorphism between `Magma.AssocQuotient (FreeMagma α)` and `FreeSemigroup α`. -/
@[to_additive "Isomorphism between `AddMagma.AssocQuotient (FreeAddMagma α)` and
`FreeAddSemigroup α`."]
def FreeMagmaAssocQuotientEquiv (α : Type u) :
    Magma.AssocQuotient (FreeMagma α) ≃* FreeSemigroup α 
goal: Magma.AssocQuotient (FreeMagma α) ≃* FreeSemigroup α

full_name: FreeAddMagmaAssocQuotientEquiv
code: /-- Isomorphism between `Magma.AssocQuotient (FreeMagma α)` and `FreeSemigroup α`. -/
@[to_additive "Isomorphism between `AddMagma.AssocQuotient (FreeAddMagma α)` and
`FreeAddSemigroup α`."]
def FreeMagmaAssocQuotientEquiv (α : Type u) :
    Magma.AssocQuotient (FreeMagma α) ≃* FreeSemigroup α 
goal: AddMagma.FreeAddSemigroup (FreeAddMagma α) ≃+ FreeAddSemigroup α