statement stringlengths 1 2.93k | proof stringlengths 0 19.2k | type stringclasses 13
values | symbolic_name stringlengths 1 131 | library stringlengths 4 62 | filename stringlengths 20 95 | imports listlengths 0 10 | deps listlengths 0 64 | docstring stringlengths 0 4.95k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
quot_mk_assoc_left (x y z w : α) :
Quot.mk (AssocRel α) (x * (y * z * w)) = Quot.mk _ (x * (y * (z * w))) | Quot.sound (AssocRel.left _ _ _ _) | theorem | Magma.AssocQuotient.quot_mk_assoc_left | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
of : α →ₙ* AssocQuotient α | where toFun := Quot.mk _; map_mul' _x _y := rfl | def | Magma.AssocQuotient.of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | Embedding from magma to its free semigroup. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
induction_on {C : AssocQuotient α → Prop} (x : AssocQuotient α)
(ih : ∀ x, C (of x)) : C x | Quot.induction_on x ih | theorem | Magma.AssocQuotient.induction_on | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"Quot.induction_on"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
hom_ext {f g : AssocQuotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g | (DFunLike.ext _ _) fun x => AssocQuotient.induction_on x <| DFunLike.congr_fun h | theorem | Magma.AssocQuotient.hom_ext | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"DFunLike.congr_fun",
"DFunLike.ext"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β) | where
toFun f :=
{ toFun := fun x ↦
Quot.liftOn x f <| by rintro a b (⟨c, d, e⟩ | ⟨c, d, e, f⟩) <;> simp only [map_mul, mul_assoc]
map_mul' := fun x y ↦ Quot.induction_on₂ x y (map_mul f) }
invFun f := f.comp of | def | Magma.AssocQuotient.lift | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"Quot.induction_on₂",
"map_mul",
"mul_assoc"
] | Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
lift_of (x : α) : lift f (of x) = f x | rfl | theorem | Magma.AssocQuotient.lift_of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_comp_of : (lift f).comp of = f | lift.symm_apply_apply f | theorem | Magma.AssocQuotient.lift_comp_of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_comp_of' (f : AssocQuotient α →ₙ* β) : lift (f.comp of) = f | lift.apply_symm_apply f | theorem | Magma.AssocQuotient.lift_comp_of' | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
map : AssocQuotient α →ₙ* AssocQuotient β | lift (of.comp f) | def | Magma.AssocQuotient.map | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | From a magma homomorphism `α →ₙ* β` to a semigroup homomorphism
`Magma.AssocQuotient α →ₙ* Magma.AssocQuotient β`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
FreeAddSemigroup (α : Type u) where
/-- The head of the element -/
head : α
/-- The tail of the element -/
tail : List α
compile_inductive% FreeAddSemigroup | structure | FreeAddSemigroup | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | If `α` is a type, then `FreeAddSemigroup α` is the free additive semigroup generated by `α`.
This is an additive semigroup equipped with a function
`FreeAddSemigroup.of : α → FreeAddSemigroup α` which has the following universal property:
if `M` is any additive semigroup, and `f : α → M` is any function,
then this func... | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
FreeSemigroup (α : Type u) where
/-- The head of the element -/
head : α
/-- The tail of the element -/
tail : List α
compile_inductive% FreeSemigroup | structure | FreeSemigroup | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | If `α` is a type, then `FreeSemigroup α` is the free semigroup generated by `α`.
This is a semigroup equipped with a function `FreeSemigroup.of : α → FreeSemigroup α` which has
the following universal property: if `M` is any semigroup, and `f : α → M` is any function,
then this function is the composite of `FreeSemigro... | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
head_mul (x y : FreeSemigroup α) : (x * y).1 = x.1 | rfl | theorem | FreeSemigroup.head_mul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
tail_mul (x y : FreeSemigroup α) : (x * y).2 = x.2 ++ y.1 :: y.2 | rfl | theorem | FreeSemigroup.tail_mul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
mk_mul_mk (x y : α) (L1 L2 : List α) : mk x L1 * mk y L2 = mk x (L1 ++ y :: L2) | rfl | theorem | FreeSemigroup.mk_mul_mk | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
of (x : α) : FreeSemigroup α | ⟨x, []⟩ | def | FreeSemigroup.of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | The embedding `α → FreeSemigroup α`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
length (x : FreeSemigroup α) : ℕ | x.tail.length + 1 | def | FreeSemigroup.length | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | Length of an element of free semigroup. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
length_mul (x y : FreeSemigroup α) : (x * y).length = x.length + y.length | by
simp [length, Nat.add_right_comm] | theorem | FreeSemigroup.length_mul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
length_of (x : α) : (of x).length = 1 | rfl | theorem | FreeSemigroup.length_of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
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 | FreeSemigroup.recOn x fun f s ↦
List.recOn s ih1 (fun hd tl ih f ↦ ih2 f ⟨hd, tl⟩ (ih1 f) (ih hd)) f | def | FreeSemigroup.recOnMul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | Recursor for free semigroup using `of` and `*`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hom_ext {β : Type v} [Mul β] {f g : FreeSemigroup α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g | (DFunLike.ext _ _) fun x ↦
FreeSemigroup.recOnMul x (congr_fun h) fun x y hx hy ↦ by simp only [map_mul, *] | theorem | FreeSemigroup.hom_ext | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"DFunLike.ext",
"FreeSemigroup",
"FreeSemigroup.recOnMul",
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift : (α → β) ≃ (FreeSemigroup α →ₙ* β) | where
toFun f :=
{ toFun x := x.2.foldl (fun a b ↦ a * f b) (f x.1)
map_mul' := by simp [← List.foldl_map, List.foldl_assoc] }
invFun f := f ∘ of | def | FreeSemigroup.lift | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
lift_mk_eq_foldl {f : α → β} {x : α} {xs : List α} :
lift f ⟨x, xs⟩ = xs.foldl (· * f ·) (f x) | rfl | lemma | FreeSemigroup.lift_mk_eq_foldl | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_comp_of' (f : FreeSemigroup α →ₙ* β) : lift (f ∘ of) = f | hom_ext rfl | theorem | FreeSemigroup.lift_comp_of' | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_of_mul (x y) : lift f (of x * y) = f x * lift f y | by rw [map_mul, lift_of] | theorem | FreeSemigroup.lift_of_mul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
map : FreeSemigroup α →ₙ* FreeSemigroup β | lift <| of ∘ f | def | FreeSemigroup.map | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | The unique semigroup homomorphism that sends `of x` to `of (f x)`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
length_map (x) : (map f x).length = x.length | FreeSemigroup.recOnMul x (fun _ ↦ rfl) (fun x y hx hy ↦ by simp only [map_mul, length_mul, *]) | theorem | FreeSemigroup.length_map | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup.recOnMul",
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
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 | FreeSemigroup.recOnMul x ih1 ih2 | def | FreeSemigroup.recOnPure | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup",
"FreeSemigroup.recOnMul"
] | Recursor that uses `pure` instead of `of`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
map_pure (f : α → β) (x) : (f <$> pure x : FreeSemigroup β) = pure (f x) | rfl | theorem | FreeSemigroup.map_pure | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
map_mul' (f : α → β) (x y : FreeSemigroup α) : f <$> (x * y) = f <$> x * f <$> y | map_mul (map f) _ _ | theorem | FreeSemigroup.map_mul' | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup",
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
pure_bind (f : α → FreeSemigroup β) (x) : pure x >>= f = f x | rfl | theorem | FreeSemigroup.pure_bind | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
mul_bind (f : α → FreeSemigroup β) (x y : FreeSemigroup α) :
x * y >>= f = (x >>= f) * (y >>= f) | map_mul (lift f) _ _ | theorem | FreeSemigroup.mul_bind | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup",
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
pure_seq {f : α → β} {x : FreeSemigroup α} : pure f <*> x = f <$> x | rfl | theorem | FreeSemigroup.pure_seq | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
mul_seq {f g : FreeSemigroup (α → β)} {x : FreeSemigroup α} :
f * g <*> x = (f <*> x) * (g <*> x) | mul_bind _ _ _ | theorem | FreeSemigroup.mul_seq | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instLawfulMonad : LawfulMonad FreeSemigroup.{u} | LawfulMonad.mk'
(pure_bind := fun _ _ ↦ rfl)
(bind_assoc := fun x g f ↦
recOnPure x (fun _ ↦ rfl) fun x y ih1 ih2 ↦ by rw [mul_bind, mul_bind, mul_bind, ih1, ih2])
(id_map := fun x ↦ recOnPure x (fun _ ↦ rfl) fun x y ih1 ih2 ↦ by rw [map_mul', ih1, ih2]) | instance | FreeSemigroup.instLawfulMonad | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
traverse {m : Type u → Type u} [Applicative m] {α β : Type u}
(F : α → m β) (x : FreeSemigroup α) : m (FreeSemigroup β) | recOnPure x (fun x ↦ pure <$> F x) fun _x _y ihx ihy ↦ (· * ·) <$> ihx <*> ihy | def | FreeSemigroup.traverse | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | `FreeSemigroup` is traversable. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
traverse_pure (x) : traverse F (pure x : FreeSemigroup α) = pure <$> F x | rfl | theorem | FreeSemigroup.traverse_pure | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeSemigroup β)) | rfl | theorem | FreeSemigroup.traverse_pure' | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
traverse_mul (x y : FreeSemigroup α) :
traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y | let ⟨x, L1⟩ := x
let ⟨y, L2⟩ := y
List.recOn L1 (fun _ ↦ rfl)
(fun hd tl ih x ↦ show
(· * ·) <$> pure <$> F x <*> traverse F (mk hd tl * mk y L2) =
(· * ·) <$> ((· * ·) <$> pure <$> F x <*> traverse F (mk hd tl)) <*> traverse F (mk y L2)
by rw [ih]; simp only [Function.comp_def, (mul_a... | theorem | FreeSemigroup.traverse_mul | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup",
"mul_assoc",
"symm"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
traverse_mul' :
Function.comp (traverse F) ∘ (HMul.hMul : FreeSemigroup α → FreeSemigroup α → FreeSemigroup α) =
fun x y ↦ (· * ·) <$> traverse F x <*> traverse F y | funext fun x ↦ funext fun y ↦ traverse_mul F x y | theorem | FreeSemigroup.traverse_mul' | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
traverse_eq (x) : FreeSemigroup.traverse F x = traverse F x | rfl | theorem | FreeSemigroup.traverse_eq | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup.traverse"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
toFreeSemigroup : FreeMagma α →ₙ* FreeSemigroup α | FreeMagma.lift FreeSemigroup.of | def | FreeMagma.toFreeSemigroup | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeMagma",
"FreeMagma.lift",
"FreeSemigroup",
"FreeSemigroup.of"
] | The canonical multiplicative morphism from `FreeMagma α` to `FreeSemigroup α`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
toFreeSemigroup_of (x : α) : toFreeSemigroup (of x) = FreeSemigroup.of x | rfl | theorem | FreeMagma.toFreeSemigroup_of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup.of"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
toFreeSemigroup_comp_of : @toFreeSemigroup α ∘ of = FreeSemigroup.of | rfl | theorem | FreeMagma.toFreeSemigroup_comp_of | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup.of"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
toFreeSemigroup_comp_map (f : α → β) :
toFreeSemigroup.comp (map f) = (FreeSemigroup.map f).comp toFreeSemigroup | by ext1; rfl | theorem | FreeMagma.toFreeSemigroup_comp_map | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeSemigroup.map"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
toFreeSemigroup_map (f : α → β) (x : FreeMagma α) :
toFreeSemigroup (map f x) = FreeSemigroup.map f (toFreeSemigroup x) | DFunLike.congr_fun (toFreeSemigroup_comp_map f) x | theorem | FreeMagma.toFreeSemigroup_map | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"DFunLike.congr_fun",
"FreeMagma",
"FreeSemigroup.map"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
length_toFreeSemigroup (x : FreeMagma α) : (toFreeSemigroup x).length = x.length | FreeMagma.recOnMul x (fun _ ↦ rfl) fun x y hx hy ↦ by
rw [map_mul, FreeSemigroup.length_mul, hx, hy]; rfl | theorem | FreeMagma.length_toFreeSemigroup | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeMagma",
"FreeMagma.recOnMul",
"FreeSemigroup.length_mul",
"map_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
FreeMagmaAssocQuotientEquiv (α : Type u) :
Magma.AssocQuotient (FreeMagma α) ≃* FreeSemigroup α | (Magma.AssocQuotient.lift FreeMagma.toFreeSemigroup).toMulEquiv
(FreeSemigroup.lift (Magma.AssocQuotient.of ∘ FreeMagma.of))
(by ext; rfl)
(by ext1; rfl) | def | FreeMagmaAssocQuotientEquiv | Algebra | Mathlib/Algebra/Free.lean | [
"Mathlib.Tactic.Attr.Register"
] | [
"FreeMagma",
"FreeMagma.toFreeSemigroup",
"FreeSemigroup",
"FreeSemigroup.lift",
"Magma.AssocQuotient",
"Magma.AssocQuotient.lift",
"Magma.AssocQuotient.of"
] | Isomorphism between `Magma.AssocQuotient (FreeMagma α)` and `FreeSemigroup α`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
Pre
| of : X → Pre
| ofScalar : R → Pre
| add : Pre → Pre → Pre
| mul : Pre → Pre → Pre | inductive | FreeAlgebra.Pre | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | This inductive type is used to express representatives of the free algebra. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
hasCoeGenerator : Coe X (Pre R X) | ⟨of⟩ | def | FreeAlgebra.Pre.hasCoeGenerator | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Coercion from `X` to `Pre R X`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasCoeSemiring : Coe R (Pre R X) | ⟨ofScalar⟩ | def | FreeAlgebra.Pre.hasCoeSemiring | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Coercion from `R` to `Pre R X`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasMul : Mul (Pre R X) | ⟨mul⟩ | def | FreeAlgebra.Pre.hasMul | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Multiplication in `Pre R X` defined as `Pre.mul`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasAdd : Add (Pre R X) | ⟨add⟩ | def | FreeAlgebra.Pre.hasAdd | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Addition in `Pre R X` defined as `Pre.add`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasZero : Zero (Pre R X) | ⟨ofScalar 0⟩ | def | FreeAlgebra.Pre.hasZero | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Zero in `Pre R X` defined as the image of `0` from `R`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasOne : One (Pre R X) | ⟨ofScalar 1⟩ | def | FreeAlgebra.Pre.hasOne | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | One in `Pre R X` defined as the image of `1` from `R`. Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
hasSMul : SMul R (Pre R X) | ⟨fun r m ↦ mul (ofScalar r) m⟩ | def | FreeAlgebra.Pre.hasSMul | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | Scalar multiplication defined as multiplication by the image of elements from `R`.
Note: Used for notation only. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
liftFun {A : Type*} [Semiring A] [Algebra R A] (f : X → A) :
Pre R X → A | | .of t => f t
| .add a b => liftFun f a + liftFun f b
| .mul a b => liftFun f a * liftFun f b
| .ofScalar c => algebraMap _ _ c | def | FreeAlgebra.liftFun | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra",
"Semiring"
] | Given a function from `X` to an `R`-algebra `A`, `lift_fun` provides a lift of `f` to a function
from `Pre R X` to `A`. This is mainly used in the construction of `FreeAlgebra.lift`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
Rel : Pre R X → Pre R X → Prop
-- force `ofScalar` to be a central semiring morphism
| add_scalar {r s : R} : Rel (↑(r + s)) (↑r + ↑s)
| mul_scalar {r s : R} : Rel (↑(r * s)) (↑r * ↑s)
| central_scalar {r : R} {a : Pre R X} : Rel (r * a) (a * r)
-- commutative additive semigroup
| add_assoc {a b c : Pre R X... | inductive | FreeAlgebra.Rel | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Rel",
"left_distrib",
"mul_assoc",
"mul_one",
"one_mul",
"right_distrib"
] | An inductively defined relation on `Pre R X` used to force the initial algebra structure on
the associated quotient. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
FreeAlgebra | Quot (FreeAlgebra.Rel R X) | def | FreeAlgebra | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra.Rel"
] | If `α` is a type, and `R` is a commutative semiring, then `FreeAlgebra R α` is the
free (unital, associative) `R`-algebra generated by `α`.
This is an `R`-algebra equipped with a function `FreeAlgebra.ι R : α → FreeAlgebra R α` which has
the following universal property: if `A` is any `R`-algebra, and `f : α → A` is an... | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
instSMul {A} [CommSemiring A] [Algebra R A] : SMul R (FreeAlgebra A X) | where
smul r := Quot.map (HMul.hMul (algebraMap R A r : Pre A X)) fun _ _ ↦ Rel.mul_compat_right | instance | FreeAlgebra.instSMul | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra",
"CommSemiring",
"FreeAlgebra",
"Quot.map"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instZero : Zero (FreeAlgebra R X) | where zero := Quot.mk _ 0 | instance | FreeAlgebra.instZero | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instOne : One (FreeAlgebra R X) | where one := Quot.mk _ 1 | instance | FreeAlgebra.instOne | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instAdd : Add (FreeAlgebra R X) | where
add := Quot.map₂ HAdd.hAdd (fun _ _ _ ↦ Rel.add_compat_right) fun _ _ _ ↦ Rel.add_compat_left | instance | FreeAlgebra.instAdd | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"Quot.map₂"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instMul : Mul (FreeAlgebra R X) | where
mul := Quot.map₂ HMul.hMul (fun _ _ _ ↦ Rel.mul_compat_right) fun _ _ _ ↦ Rel.mul_compat_left | instance | FreeAlgebra.instMul | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"Quot.map₂"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
mk_mul (x y : Pre R X) :
Quot.mk (Rel R X) (x * y) = (HMul.hMul (self := instHMul (α := FreeAlgebra R X))
(Quot.mk (Rel R X) x) (Quot.mk (Rel R X) y)) | rfl | theorem | FreeAlgebra.mk_mul | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"Rel"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instMonoidWithZero : MonoidWithZero (FreeAlgebra R X) | where
mul_assoc := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.mul_assoc
one := Quot.mk _ 1
one_mul := by
rintro ⟨⟩
exact Quot.sound Rel.one_mul
mul_one := by
rintro ⟨⟩
exact Quot.sound Rel.mul_one
zero_mul := by
rintro ⟨⟩
exact Quot.sound Rel.zero_mul
mul_zero := by
rintro ⟨... | instance | FreeAlgebra.instMonoidWithZero | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"MonoidWithZero",
"mul_assoc",
"mul_one",
"one_mul"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instDistrib : Distrib (FreeAlgebra R X) | where
left_distrib := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.left_distrib
right_distrib := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.right_distrib | instance | FreeAlgebra.instDistrib | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Distrib",
"FreeAlgebra",
"left_distrib",
"right_distrib"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instAddCommMonoid : AddCommMonoid (FreeAlgebra R X) | where
add_assoc := by
rintro ⟨⟩ ⟨⟩ ⟨⟩
exact Quot.sound Rel.add_assoc
zero_add := by
rintro ⟨⟩
exact Quot.sound Rel.zero_add
add_zero := by
rintro ⟨⟩
change Quot.mk _ _ = _
rw [Quot.sound Rel.add_comm, Quot.sound Rel.zero_add]
add_comm := by
rintro ⟨⟩ ⟨⟩
exact Quot.sound Rel.a... | instance | FreeAlgebra.instAddCommMonoid | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"AddCommMonoid",
"FreeAlgebra",
"Quot.map",
"add_one_mul",
"map_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instAlgebra {A} [CommSemiring A] [Algebra R A] : Algebra R (FreeAlgebra A X) | where
algebraMap := ({
toFun := fun r => Quot.mk _ r
map_one' := rfl
map_mul' := fun _ _ => Quot.sound Rel.mul_scalar
map_zero' := rfl
map_add' := fun _ _ => Quot.sound Rel.add_scalar } : A →+* FreeAlgebra A X).comp
(algebraMap R A)
commutes' _ := by
rintro ⟨⟩
exact Quot.... | instance | FreeAlgebra.instAlgebra | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra",
"CommSemiring",
"FreeAlgebra",
"instAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
quot_mk_eq_ι (m : X) : Quot.mk (FreeAlgebra.Rel R X) m = ι R m | by rw [ι_def] | theorem | FreeAlgebra.quot_mk_eq_ι | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra.Rel"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
liftAux (f : X → A) : FreeAlgebra R X →ₐ[R] A | where
toFun a :=
Quot.liftOn a (liftFun _ _ f) fun a b h ↦ by
induction h
· exact (algebraMap R A).map_add _ _
· exact (algebraMap R A).map_mul _ _
· apply Algebra.commutes
· change _ + _ + _ = _ + (_ + _)
rw [add_assoc]
· change _ + _ = _ + _
rw [add_comm]
... | def | FreeAlgebra.liftAux | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra.commutes",
"FreeAlgebra",
"left_distrib",
"map_mul",
"mul_assoc",
"right_distrib"
] | Internal definition used to define `lift` | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
lift : (X → A) ≃ (FreeAlgebra R X →ₐ[R] A) | { toFun := liftAux R
invFun := fun F ↦ F ∘ ι R
left_inv := fun f ↦ by
ext
simp only [Function.comp_apply, ι_def]
rfl
right_inv := fun F ↦ by
ext t
rcases t with ⟨x⟩
induction x with
| of =>
change ((F : FreeAlgebra R X → A) ∘ ι R) _ = _
simp only [Fu... | def | FreeAlgebra.lift | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"AlgHom.commutes",
"FreeAlgebra",
"Rel"
] | Given a function `f : X → A` where `A` is an `R`-algebra, `lift R f` is the unique lift
of `f` to a morphism of `R`-algebras `FreeAlgebra R X → A`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
liftAux_eq (f : X → A) : liftAux R f = lift R f | by
rw [lift]
rfl | theorem | FreeAlgebra.liftAux_eq | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_symm_apply (F : FreeAlgebra R X →ₐ[R] A) : (lift R).symm F = F ∘ ι R | by
rw [lift]
rfl | theorem | FreeAlgebra.lift_symm_apply | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"symm"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_comp_lift (f : X → A) : (lift R f : FreeAlgebra R X → A) ∘ ι R = f | by
ext
rw [Function.comp_apply, ι_def, lift]
rfl | theorem | FreeAlgebra.ι_comp_lift | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_ι_apply (f : X → A) (x) : lift R f (ι R x) = f x | by
rw [ι_def, lift]
rfl | theorem | FreeAlgebra.lift_ι_apply | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_unique (f : X → A) (g : FreeAlgebra R X →ₐ[R] A) :
(g : FreeAlgebra R X → A) ∘ ι R = f ↔ g = lift R f | by
rw [← (lift R).symm_apply_eq, lift]
rfl | theorem | FreeAlgebra.lift_unique | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
lift_comp_ι (g : FreeAlgebra R X →ₐ[R] A) :
lift R ((g : FreeAlgebra R X → A) ∘ ι R) = g | by
rw [← lift_symm_apply]
exact (lift R).apply_symm_apply g | theorem | FreeAlgebra.lift_comp_ι | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
hom_ext {f g : FreeAlgebra R X →ₐ[R] A}
(w : (f : FreeAlgebra R X → A) ∘ ι R = (g : FreeAlgebra R X → A) ∘ ι R) : f = g | by
rw [← lift_symm_apply, ← lift_symm_apply] at w
exact (lift R).symm.injective w | theorem | FreeAlgebra.hom_ext | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | See note [partially-applied ext lemmas]. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
equivMonoidAlgebraFreeMonoid : FreeAlgebra R X ≃ₐ[R] R[FreeMonoid X] | .ofAlgHom (lift R fun x ↦ .of R (FreeMonoid X) (.of x))
(MonoidAlgebra.lift R (FreeAlgebra R X) (FreeMonoid X) (FreeMonoid.lift (ι R)))
(by ext; simp) (by ext; simp) | def | FreeAlgebra.equivMonoidAlgebraFreeMonoid | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"FreeMonoid",
"FreeMonoid.lift",
"MonoidAlgebra.lift"
] | The free algebra on `X` is "just" the monoid algebra on the free monoid on `X`.
This would be useful when constructing linear maps out of a free algebra,
for example. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
instNoZeroDivisors [NoZeroDivisors R] : NoZeroDivisors (FreeAlgebra R X) | equivMonoidAlgebraFreeMonoid.toMulEquiv.noZeroDivisors | instance | FreeAlgebra.instNoZeroDivisors | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"NoZeroDivisors"
] | `FreeAlgebra R X` has no zero-divisors when `R` has no zero-divisors. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
instIsDomain {R X} [CommRing R] [IsDomain R] : IsDomain (FreeAlgebra R X) | NoZeroDivisors.to_isDomain _ | instance | FreeAlgebra.instIsDomain | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"CommRing",
"FreeAlgebra",
"IsDomain",
"NoZeroDivisors.to_isDomain"
] | `FreeAlgebra R X` is a domain when `R` is an integral domain. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
algebraMapInv : FreeAlgebra R X →ₐ[R] R | lift R (0 : X → R) | def | FreeAlgebra.algebraMapInv | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | The left-inverse of `algebraMap`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
algebraMap_leftInverse :
Function.LeftInverse algebraMapInv (algebraMap R <| FreeAlgebra R X) | fun x ↦ by
simp | theorem | FreeAlgebra.algebraMap_leftInverse | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
algebraMap_inj (x y : R) :
algebraMap R (FreeAlgebra R X) x = algebraMap R (FreeAlgebra R X) y ↔ x = y | algebraMap_leftInverse.injective.eq_iff | theorem | FreeAlgebra.algebraMap_inj | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
algebraMap_eq_zero_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 0 ↔ x = 0 | map_eq_zero_iff (algebraMap _ _) algebraMap_leftInverse.injective | theorem | FreeAlgebra.algebraMap_eq_zero_iff | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
algebraMap_eq_one_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 1 ↔ x = 1 | map_eq_one_iff (algebraMap _ _) algebraMap_leftInverse.injective | theorem | FreeAlgebra.algebraMap_eq_one_iff | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"map_eq_one_iff"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_injective [Nontrivial R] : Function.Injective (ι R : X → FreeAlgebra R X) | fun x y hoxy ↦
by_contradiction <| by
classical exact fun hxy : x ≠ y ↦
let f : FreeAlgebra R X →ₐ[R] R := lift R fun z ↦ if x = z then (1 : R) else 0
have hfx1 : f (ι R x) = 1 := (lift_ι_apply _ _).trans <| if_pos rfl
have hfy1 : f (ι R y) = 1 := hoxy ▸ hfx1
have hfy0 : f (ι R y) ... | theorem | FreeAlgebra.ι_injective | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"FreeAlgebra",
"Nontrivial",
"by_contradiction",
"one_ne_zero",
"trans"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_inj [Nontrivial R] (x y : X) : ι R x = ι R y ↔ x = y | ι_injective.eq_iff | theorem | FreeAlgebra.ι_inj | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Nontrivial"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_ne_algebraMap [Nontrivial R] (x : X) (r : R) : ι R x ≠ algebraMap R _ r | fun h ↦ by
let f0 : FreeAlgebra R X →ₐ[R] R := lift R 0
let f1 : FreeAlgebra R X →ₐ[R] R := lift R 1
have hf0 : f0 (ι R x) = 0 := lift_ι_apply _ _
have hf1 : f1 (ι R x) = 1 := lift_ι_apply _ _
rw [h, f0.commutes, Algebra.algebraMap_self_apply] at hf0
rw [h, f1.commutes, Algebra.algebraMap_self_apply] at hf1... | theorem | FreeAlgebra.ι_ne_algebraMap | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra.algebraMap_self_apply",
"FreeAlgebra",
"Nontrivial",
"zero_ne_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_ne_zero [Nontrivial R] (x : X) : ι R x ≠ 0 | ι_ne_algebraMap x 0 | theorem | FreeAlgebra.ι_ne_zero | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Nontrivial"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ι_ne_one [Nontrivial R] (x : X) : ι R x ≠ 1 | ι_ne_algebraMap x 1 | theorem | FreeAlgebra.ι_ne_one | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Nontrivial"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
induction {motive : FreeAlgebra R X → Prop}
(grade0 : ∀ r, motive (algebraMap R (FreeAlgebra R X) r)) (grade1 : ∀ x, motive (ι R x))
(mul : ∀ a b, motive a → motive b → motive (a * b))
(add : ∀ a b, motive a → motive b → motive (a + b))
(a : FreeAlgebra R X) : motive a | by
-- the arguments are enough to construct a subalgebra, and a mapping into it from X
let s : Subalgebra R (FreeAlgebra R X) :=
{ carrier := motive
mul_mem' := mul _ _
add_mem' := add _ _
algebraMap_mem' := grade0 }
let of : X → s := Subtype.coind (ι R) grade1
-- the mapping through the s... | theorem | FreeAlgebra.induction | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"AlgHom.coe_comp",
"AlgHom.coe_id",
"AlgHom.id",
"FreeAlgebra",
"Subalgebra",
"Subalgebra.coe_val",
"Subtype.coind",
"Subtype.prop"
] | An induction principle for the free algebra.
If `C` holds for the `algebraMap` of `r : R` into `FreeAlgebra R X`, the `ι` of `x : X`, and is
preserved under addition and multiplication, then it holds for all of `FreeAlgebra R X`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
adjoin_range_ι : Algebra.adjoin R (Set.range (ι R : X → FreeAlgebra R X)) = ⊤ | by
set S := Algebra.adjoin R (Set.range (ι R : X → FreeAlgebra R X))
refine top_unique fun x hx => ?_; clear hx
induction x with
| grade0 => exact S.algebraMap_mem _
| add x y hx hy => exact S.add_mem hx hy
| mul x y hx hy => exact S.mul_mem hx hy
| grade1 x => exact Algebra.subset_adjoin (Set.mem_range_s... | theorem | FreeAlgebra.adjoin_range_ι | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra.adjoin",
"Algebra.subset_adjoin",
"FreeAlgebra",
"Set.mem_range_self",
"Set.range",
"top_unique"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
_root_.Algebra.adjoin_range_eq_range_freeAlgebra_lift (f : X → A) :
Algebra.adjoin R (Set.range f) = (FreeAlgebra.lift R f).range | by
simp only [← Algebra.map_top, ← adjoin_range_ι, AlgHom.map_adjoin, ← Set.range_comp,
Function.comp_def, lift_ι_apply] | theorem | Algebra.adjoin_range_eq_range_freeAlgebra_lift | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"AlgHom.map_adjoin",
"Algebra.adjoin",
"Algebra.map_top",
"FreeAlgebra.lift",
"Set.range",
"Set.range_comp"
] | Noncommutative version of `Algebra.adjoin_range_eq_range_aeval`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
_root_.Algebra.adjoin_eq_range_freeAlgebra_lift (s : Set A) :
Algebra.adjoin R s = (FreeAlgebra.lift R ((↑) : s → A)).range | by
rw [← Algebra.adjoin_range_eq_range_freeAlgebra_lift, Subtype.range_coe] | theorem | Algebra.adjoin_eq_range_freeAlgebra_lift | Algebra | Mathlib/Algebra/FreeAlgebra.lean | [] | [
"Algebra.adjoin",
"Algebra.adjoin_range_eq_range_freeAlgebra_lift",
"FreeAlgebra.lift",
"Set",
"Subtype.range_coe"
] | Noncommutative version of `Algebra.adjoin_range_eq_range`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
FreeNonUnitalNonAssocAlgebra | R[FreeMagma X] | abbrev | FreeNonUnitalNonAssocAlgebra | Algebra | Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean | [] | [
"FreeMagma"
] | If `α` is a type, and `R` is a semiring, then `FreeNonUnitalNonAssocAlgebra R α` is the free
non-unital non-associative `R`-algebra generated by `α`.
This is an `R`-algebra equipped with a function
`FreeNonUnitalNonAssocAlgebra.of R : α → FreeNonUnitalNonAssocAlgebra R α` which has
the following universal property: if ... | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
of : X → FreeNonUnitalNonAssocAlgebra R X | MonoidAlgebra.ofMagma R _ ∘ FreeMagma.of | def | FreeNonUnitalNonAssocAlgebra.of | Algebra | Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean | [] | [
"FreeNonUnitalNonAssocAlgebra",
"MonoidAlgebra.ofMagma"
] | The embedding of `X` into the free algebra with coefficients in `R`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
lift : (X → A) ≃ (FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) | FreeMagma.lift.trans (MonoidAlgebra.liftMagma R) | def | FreeNonUnitalNonAssocAlgebra.lift | Algebra | Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean | [] | [
"FreeNonUnitalNonAssocAlgebra",
"MonoidAlgebra.liftMagma"
] | The functor `X ↦ FreeNonUnitalNonAssocAlgebra R X` from the category of types to the
category of non-unital, non-associative algebras over `R` is adjoint to the forgetful functor in the
other direction. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
lift_symm_apply (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) :
(lift R).symm F = F ∘ of R | rfl | theorem | FreeNonUnitalNonAssocAlgebra.lift_symm_apply | Algebra | Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean | [] | [
"FreeNonUnitalNonAssocAlgebra",
"symm"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
of_comp_lift (f : X → A) : lift R f ∘ of R = f | (lift R).left_inv f | theorem | FreeNonUnitalNonAssocAlgebra.of_comp_lift | Algebra | Mathlib/Algebra/FreeNonUnitalNonAssocAlgebra.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.