The areas / V08. Multilinear algebra and forms
Mathlib.Algebra.FreeAlgebra
105 declarations. Mathlib docs · Source
Free Algebras
Given a commutative semiring R, and a type X, we construct the free unital, associative
R-algebra on X.
Notation
FreeAlgebra R Xis the free algebra itself. It is endowed with anR-algebra structure.FreeAlgebra.ι Ris the functionX → FreeAlgebra R X.- Given a function
f : X → Ato an R-algebraA,lift R fis the lift offto anR-algebra morphismFreeAlgebra R X → A.
Theorems
ι_comp_liftstates that the composition(lift R f) ∘ (ι R)is identical tof.lift_uniquestates that whenever an R-algebra morphismg : FreeAlgebra R X → Ais given whose composition withι Risf, then one hasg = lift R f.hom_extis a variant oflift_uniquein the form of an extensionality theorem.lift_comp_ιis a combination ofι_comp_liftandlift_unique. It states that the lift of the composition of an algebra morphism withιis the algebra morphism itself.equivMonoidAlgebraFreeMonoid : FreeAlgebra R X ≃ₐ[R] R[FreeMonoid X]- An inductive principle
induction.
Implementation notes
We construct the free algebra on X as a quotient of an inductive type FreeAlgebra.Pre by an
inductively defined relation FreeAlgebra.Rel. Explicitly, the construction involves three steps:
- We construct an inductive type
FreeAlgebra.Pre R X, the terms of which should be thought of as representatives for the elements ofFreeAlgebra R X. It is the free type with maps fromRandX, and with two binary operationsaddandmul. - We construct an inductive relation
FreeAlgebra.Rel R XonFreeAlgebra.Pre R X. This is the smallest relation for which the quotient is anR-algebra where addition resp. multiplication are induced byaddresp.mulfrom 1., and for which the map fromRis the structure map for the algebra. - The free algebra
FreeAlgebra R Xis the quotient ofFreeAlgebra.Pre R Xby the relationFreeAlgebra.Rel R X.
Define the basic operations
Build the semiring structure. We do this one piece at a time as this is convenient for proving
the nsmul fields.
Since we have set the basic definitions as @[no_expose], from this point onwards one
should only use the universal properties of the free algebra, and consider the actual implementation
as a quotient of an inductive type as completely hidden.
theorem FreeAlgebra.Pre.of.inj E1 #
∀ {R : Type u_1} {X : Type u_2} {a a_1 : X}, FreeAlgebra.Pre.of a = FreeAlgebra.Pre.of a_1 → a = a_1
ctor FreeAlgebra.Rel.below.zero_add E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.mul_assoc E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.add_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {r s : R}, FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.add_comm E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
theorem FreeAlgebra.Pre.ofScalar.inj E1 #
∀ {R : Type u_1} {X : Type u_2} {a a_1 : R}, FreeAlgebra.Pre.ofScalar a = FreeAlgebra.Pre.ofScalar a_1 → a = a_1
theorem FreeAlgebra.Pre.brecOn.eq E1 #
∀ {R : Type u_1} {X : Type u_2} {motive : FreeAlgebra.Pre R X → Sort u} (t : FreeAlgebra.Pre R X)
(F_1 : (t : FreeAlgebra.Pre R X) → FreeAlgebra.Pre.below t → motive t),
FreeAlgebra.Pre.brecOn t F_1 = F_1 t (FreeAlgebra.Pre.brecOn.go t F_1).2
ctor FreeAlgebra.Rel.below.mul_zero E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.add_compat_right E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X}
(a_1 : FreeAlgebra.Rel R X a b), FreeAlgebra.Rel.below a_1 → motive a b a_1 → FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.left_distrib E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.right_distrib E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.mul_compat_right E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X}
(a_1 : FreeAlgebra.Rel R X a b), FreeAlgebra.Rel.below a_1 → motive a b a_1 → FreeAlgebra.Rel.below ⋯
def FreeAlgebra.Pre.ctorIdx E1 #
{R : Type u_1} → {X : Type u_2} → FreeAlgebra.Pre R X → ℕ
ctor FreeAlgebra.Rel.below.central_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {r : R} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.zero_mul E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.add_compat_left E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X}
(a_1 : FreeAlgebra.Rel R X a b), FreeAlgebra.Rel.below a_1 → motive a b a_1 → FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.mul_one E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.add_assoc E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
ctor FreeAlgebra.Rel.below.mul_compat_left E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a b c : FreeAlgebra.Pre R X}
(a_1 : FreeAlgebra.Rel R X a b), FreeAlgebra.Rel.below a_1 → motive a b a_1 → FreeAlgebra.Rel.below ⋯
theorem FreeAlgebra.Pre.of.injEq E0 #
∀ {R : Type u_1} {X : Type u_2} (a a_1 : X), (FreeAlgebra.Pre.of a = FreeAlgebra.Pre.of a_1) = (a = a_1)
abbrev FreeAlgebra.Pre.brecOn.go E1 #
{R : Type u_1} →
{X : Type u_2} →
{motive : FreeAlgebra.Pre R X → Sort u} →
(t : FreeAlgebra.Pre R X) →
((t : FreeAlgebra.Pre R X) → FreeAlgebra.Pre.below t → motive t) → motive t ×' FreeAlgebra.Pre.below t
abbrev FreeAlgebra.Pre.ctorElimType E1 #
{R : Type u_1} →
{X : Type u_2} →
{motive : FreeAlgebra.Pre R X → Sort u} →
ℕ →
Sort (max 1 (imax (u_1 + 1) u) (imax (u_2 + 1) u) (imax (max (u_1 + 1) (u_2 + 1)) (max (u_1 + 1) (u_2 + 1)) u))
ctor FreeAlgebra.Rel.below.mul_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {r s : R}, FreeAlgebra.Rel.below ⋯
theorem FreeAlgebra.Pre.ofScalar.injEq E0 #
∀ {R : Type u_1} {X : Type u_2} (a a_1 : R), (FreeAlgebra.Pre.ofScalar a = FreeAlgebra.Pre.ofScalar a_1) = (a = a_1)
ctor FreeAlgebra.Rel.below.one_mul E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R]
{motive : (a a_1 : FreeAlgebra.Pre R X) → FreeAlgebra.Rel R X a a_1 → Prop} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel.below ⋯
theorem FreeAlgebra.Pre.add.injEq E0 #
∀ {R : Type u_1} {X : Type u_2} (a a_1 a_2 a_3 : FreeAlgebra.Pre R X), (a.add a_1 = a_2.add a_3) = (a = a_2 ∧ a_1 = a_3)
theorem FreeAlgebra.Pre.add.inj E1 #
∀ {R : Type u_1} {X : Type u_2} {a a_1 a_2 a_3 : FreeAlgebra.Pre R X}, a.add a_1 = a_2.add a_3 → a = a_2 ∧ a_1 = a_3
theorem FreeAlgebra.Pre.mul.injEq E0 #
∀ {R : Type u_1} {X : Type u_2} (a a_1 a_2 a_3 : FreeAlgebra.Pre R X), (a.mul a_1 = a_2.mul a_3) = (a = a_2 ∧ a_1 = a_3)
theorem FreeAlgebra.Pre.mul.inj E1 #
∀ {R : Type u_1} {X : Type u_2} {a a_1 a_2 a_3 : FreeAlgebra.Pre R X}, a.mul a_1 = a_2.mul a_3 → a = a_2 ∧ a_1 = a_3
inductive FreeAlgebra.Pre E1 #
Type u_1 → Type u_2 → Type (max u_1 u_2)
This inductive type is used to express representatives of the free algebra.
ctor FreeAlgebra.Pre.of E0 #
{R : Type u_1} → {X : Type u_2} → X → FreeAlgebra.Pre R X
ctor FreeAlgebra.Pre.ofScalar E0 #
{R : Type u_1} → {X : Type u_2} → R → FreeAlgebra.Pre R X
ctor FreeAlgebra.Pre.add E0 #
{R : Type u_1} → {X : Type u_2} → FreeAlgebra.Pre R X → FreeAlgebra.Pre R X → FreeAlgebra.Pre R X
ctor FreeAlgebra.Pre.mul E0 #
{R : Type u_1} → {X : Type u_2} → FreeAlgebra.Pre R X → FreeAlgebra.Pre R X → FreeAlgebra.Pre R X
instance FreeAlgebra.Pre.instInhabited E0 #
(R : Type u_1) → (X : Type u_2) → [CommSemiring R] → Inhabited (FreeAlgebra.Pre R X)
def FreeAlgebra.Pre.hasCoeGenerator E1 #
(R : Type u_1) → (X : Type u_2) → Coe X (FreeAlgebra.Pre R X)
Coercion from X to Pre R X. Note: Used for notation only.
def FreeAlgebra.Pre.hasCoeSemiring E1 #
(R : Type u_1) → (X : Type u_2) → Coe R (FreeAlgebra.Pre R X)
Coercion from R to Pre R X. Note: Used for notation only.
def FreeAlgebra.Pre.hasMul E1 #
(R : Type u_1) → (X : Type u_2) → Mul (FreeAlgebra.Pre R X)
Multiplication in Pre R X defined as Pre.mul. Note: Used for notation only.
def FreeAlgebra.Pre.hasAdd E1 #
(R : Type u_1) → (X : Type u_2) → Add (FreeAlgebra.Pre R X)
Addition in Pre R X defined as Pre.add. Note: Used for notation only.
def FreeAlgebra.Pre.hasZero E1 #
(R : Type u_1) → (X : Type u_2) → [CommSemiring R] → Zero (FreeAlgebra.Pre R X)
Zero in Pre R X defined as the image of 0 from R. Note: Used for notation only.
def FreeAlgebra.Pre.hasOne E1 #
(R : Type u_1) → (X : Type u_2) → [CommSemiring R] → One (FreeAlgebra.Pre R X)
One in Pre R X defined as the image of 1 from R. Note: Used for notation only.
def FreeAlgebra.Pre.hasSMul E1 #
(R : Type u_1) → (X : Type u_2) → SMul R (FreeAlgebra.Pre R X)
Scalar multiplication defined as multiplication by the image of elements from R.
Note: Used for notation only.
def FreeAlgebra.liftFun E1 #
(R : Type u_1) →
(X : Type u_2) →
[inst : CommSemiring R] → {A : Type u_3} → [inst_1 : Semiring A] → [Algebra R A] → (X → A) → FreeAlgebra.Pre R X → A
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.
inductive FreeAlgebra.Rel E1 #
(R : Type u_1) → (X : Type u_2) → [CommSemiring R] → FreeAlgebra.Pre R X → FreeAlgebra.Pre R X → Prop
An inductively defined relation on Pre R X used to force the initial algebra structure on
the associated quotient.
ctor FreeAlgebra.Rel.add_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {r s : R},
FreeAlgebra.Rel R X (FreeAlgebra.Pre.ofScalar (r + s)) (FreeAlgebra.Pre.ofScalar r + FreeAlgebra.Pre.ofScalar s)
ctor FreeAlgebra.Rel.mul_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {r s : R},
FreeAlgebra.Rel R X (FreeAlgebra.Pre.ofScalar (r * s)) (FreeAlgebra.Pre.ofScalar r * FreeAlgebra.Pre.ofScalar s)
ctor FreeAlgebra.Rel.central_scalar E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {r : R} {a : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X (FreeAlgebra.Pre.ofScalar r * a) (a * FreeAlgebra.Pre.ofScalar r)
ctor FreeAlgebra.Rel.add_assoc E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X (a + b + c) (a + (b + c))
ctor FreeAlgebra.Rel.add_comm E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (a + b) (b + a)
ctor FreeAlgebra.Rel.zero_add E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (0 + a) a
ctor FreeAlgebra.Rel.mul_assoc E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X (a * b * c) (a * (b * c))
ctor FreeAlgebra.Rel.one_mul E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (1 * a) a
ctor FreeAlgebra.Rel.mul_one E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (a * 1) a
ctor FreeAlgebra.Rel.left_distrib E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X (a * (b + c)) (a * b + a * c)
ctor FreeAlgebra.Rel.right_distrib E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X ((a + b) * c) (a * c + b * c)
ctor FreeAlgebra.Rel.zero_mul E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (0 * a) 0
ctor FreeAlgebra.Rel.mul_zero E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a : FreeAlgebra.Pre R X}, FreeAlgebra.Rel R X (a * 0) 0
ctor FreeAlgebra.Rel.add_compat_left E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X a b → FreeAlgebra.Rel R X (a + c) (b + c)
ctor FreeAlgebra.Rel.add_compat_right E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X a b → FreeAlgebra.Rel R X (c + a) (c + b)
ctor FreeAlgebra.Rel.mul_compat_left E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X a b → FreeAlgebra.Rel R X (a * c) (b * c)
ctor FreeAlgebra.Rel.mul_compat_right E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {a b c : FreeAlgebra.Pre R X},
FreeAlgebra.Rel R X a b → FreeAlgebra.Rel R X (c * a) (c * b)
def FreeAlgebra E3 #
(R : Type u_1) → Type u_2 → [CommSemiring R] → Type (max u_1 u_2)
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 any function,
then this function is the composite of FreeAlgebra.ι R and a unique R-algebra homomorphism
FreeAlgebra.lift R f : FreeAlgebra R α →ₐ[R] A.
A typical element of FreeAlgebra R α is an R-linear
combination of formal products of elements of α.
For example if x and y are terms of type α and a, b are terms of type R then
(3 * a * a) • (x * y * x) + (2 * b + 1) • (y * x) + (a * b * b + 3) is a
"typical" element of FreeAlgebra R α. In particular if α is empty
then FreeAlgebra R α is isomorphic to R, and if α has one term t
then FreeAlgebra R α is isomorphic to the polynomial ring R[t].
If α has two or more terms then FreeAlgebra R α is not commutative.
One can think of FreeAlgebra R α as the free non-commutative polynomial ring
with coefficients in R and variables indexed by α.
instance FreeAlgebra.instSMul E0 #
(R : Type u_1) →
(X : Type u_2) →
[inst : CommSemiring R] → {A : Type u_3} → [inst_1 : CommSemiring A] → [Algebra R A] → SMul R (FreeAlgebra A X)
instance FreeAlgebra.instZero E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Zero (FreeAlgebra R X)
instance FreeAlgebra.instOne E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → One (FreeAlgebra R X)
instance FreeAlgebra.instAdd E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Add (FreeAlgebra R X)
instance FreeAlgebra.instMul E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Mul (FreeAlgebra R X)
instance FreeAlgebra.instMonoidWithZero E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → MonoidWithZero (FreeAlgebra R X)
instance FreeAlgebra.instDistrib E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Distrib (FreeAlgebra R X)
instance FreeAlgebra.instAddCommMonoid E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → AddCommMonoid (FreeAlgebra R X)
instance FreeAlgebra.instSemiring E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Semiring (FreeAlgebra R X)
instance FreeAlgebra.instInhabited E0 #
(R : Type u_1) → (X : Type u_2) → [inst : CommSemiring R] → Inhabited (FreeAlgebra R X)
instance FreeAlgebra.instAlgebra E0 #
(R : Type u_1) →
(X : Type u_2) →
[inst : CommSemiring R] → {A : Type u_3} → [inst_1 : CommSemiring A] → [Algebra R A] → Algebra R (FreeAlgebra A X)
instance FreeAlgebra.instIsScalarTower E0 #
∀ (X : Type u_2) {R : Type u_3} {S : Type u_4} {A : Type u_5} [inst : CommSemiring R] [inst_1 : CommSemiring S]
[inst_2 : CommSemiring A] [inst_3 : SMul R S] [inst_4 : Algebra R A] [inst_5 : Algebra S A] [IsScalarTower R S A],
IsScalarTower R S (FreeAlgebra A X)
instance FreeAlgebra.instSMulCommClass E0 #
∀ (X : Type u_2) {R : Type u_3} {S : Type u_4} {A : Type u_5} [inst : CommSemiring R] [inst_1 : CommSemiring S]
[inst_2 : CommSemiring A] [inst_3 : Algebra R A] [inst_4 : Algebra S A], SMulCommClass R S (FreeAlgebra A X)
instance FreeAlgebra.instRing E0 #
(X : Type u_2) → {S : Type u_3} → [inst : CommRing S] → Ring (FreeAlgebra S X)
def FreeAlgebra.ι E1 #
(R : Type u_1) → {X : Type u_2} → [inst : CommSemiring R] → X → FreeAlgebra R X
The canonical function X → FreeAlgebra R X.
theorem FreeAlgebra.quot_mk_eq_ι E0 #
∀ (R : Type u_1) {X : Type u_2} [inst : CommSemiring R] (m : X),
Quot.mk (FreeAlgebra.Rel R X) (FreeAlgebra.Pre.of m) = FreeAlgebra.ι R m
def FreeAlgebra.lift E1 #
(R : Type u_1) →
{X : Type u_2} →
[inst : CommSemiring R] →
{A : Type u_3} → [inst_1 : Semiring A] → [inst_2 : Algebra R A] → (X → A) ≃ (FreeAlgebra R X →ₐ[R] A)
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.
theorem FreeAlgebra.liftAux_eq E0 #
∀ (R : Type u_1) {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(f : X → A), FreeAlgebra.liftAux✝ R f = (FreeAlgebra.lift R) f
theorem FreeAlgebra.lift_symm_apply E0 #
∀ (R : Type u_1) {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(F : FreeAlgebra R X →ₐ[R] A), (FreeAlgebra.lift R).symm F = ⇑F ∘ FreeAlgebra.ι R
theorem FreeAlgebra.ι_comp_lift E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(f : X → A), ⇑((FreeAlgebra.lift R) f) ∘ FreeAlgebra.ι R = f
theorem FreeAlgebra.lift_ι_apply E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(f : X → A) (x : X), ((FreeAlgebra.lift R) f) (FreeAlgebra.ι R x) = f x
theorem FreeAlgebra.lift_unique E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(f : X → A) (g : FreeAlgebra R X →ₐ[R] A), ⇑g ∘ FreeAlgebra.ι R = f ↔ g = (FreeAlgebra.lift R) f
theorem FreeAlgebra.lift_comp_ι E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(g : FreeAlgebra R X →ₐ[R] A), (FreeAlgebra.lift R) (⇑g ∘ FreeAlgebra.ι R) = g
theorem FreeAlgebra.hom_ext E1 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
{f g : FreeAlgebra R X →ₐ[R] A}, ⇑f ∘ FreeAlgebra.ι R = ⇑g ∘ FreeAlgebra.ι R → f = g
See note [partially-applied ext lemmas].
theorem FreeAlgebra.hom_ext_iff E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
{f g : FreeAlgebra R X →ₐ[R] A}, f = g ↔ ⇑f ∘ FreeAlgebra.ι R = ⇑g ∘ FreeAlgebra.ι R
def FreeAlgebra.equivMonoidAlgebraFreeMonoid E1 #
{R : Type u_1} → {X : Type u_2} → [inst : CommSemiring R] → FreeAlgebra R X ≃ₐ[R] MonoidAlgebra R (FreeMonoid X)
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.
instance FreeAlgebra.instNontrivial E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R], Nontrivial (FreeAlgebra R X)
FreeAlgebra R X is nontrivial when R is.
instance FreeAlgebra.instNoZeroDivisors E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [NoZeroDivisors R], NoZeroDivisors (FreeAlgebra R X)
FreeAlgebra R X has no zero-divisors when R has no zero-divisors.
instance FreeAlgebra.instIsDomain E0 #
∀ {R : Type u_4} {X : Type u_5} [inst : CommRing R] [IsDomain R], IsDomain (FreeAlgebra R X)
FreeAlgebra R X is a domain when R is an integral domain.
def FreeAlgebra.algebraMapInv E1 #
{R : Type u_1} → {X : Type u_2} → [inst : CommSemiring R] → FreeAlgebra R X →ₐ[R] R
The left-inverse of algebraMap.
theorem FreeAlgebra.algebraMap_leftInverse E1 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R],
Function.LeftInverse ⇑FreeAlgebra.algebraMapInv ⇑(algebraMap R (FreeAlgebra R X))
theorem FreeAlgebra.algebraMap_inj E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] (x y : R),
(algebraMap R (FreeAlgebra R X)) x = (algebraMap R (FreeAlgebra R X)) y ↔ x = y
theorem FreeAlgebra.algebraMap_eq_zero_iff E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] (x : R), (algebraMap R (FreeAlgebra R X)) x = 0 ↔ x = 0
theorem FreeAlgebra.algebraMap_eq_one_iff E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] (x : R), (algebraMap R (FreeAlgebra R X)) x = 1 ↔ x = 1
theorem FreeAlgebra.ι_injective E1 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R], Function.Injective (FreeAlgebra.ι R)
theorem FreeAlgebra.ι_inj E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R] (x y : X),
FreeAlgebra.ι R x = FreeAlgebra.ι R y ↔ x = y
theorem FreeAlgebra.ι_ne_algebraMap E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R] (x : X) (r : R),
FreeAlgebra.ι R x ≠ (algebraMap R (FreeAlgebra R X)) r
theorem FreeAlgebra.ι_ne_zero E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R] (x : X), FreeAlgebra.ι R x ≠ 0
theorem FreeAlgebra.ι_ne_one E0 #
∀ {R : Type u_1} {X : Type u_2} [inst : CommSemiring R] [Nontrivial R] (x : X), FreeAlgebra.ι R x ≠ 1
theorem FreeAlgebra.induction E1 #
∀ (R : Type u_1) (X : Type u_2) [inst : CommSemiring R] {motive : FreeAlgebra R X → Prop},
(∀ (r : R), motive ((algebraMap R (FreeAlgebra R X)) r)) →
(∀ (x : X), motive (FreeAlgebra.ι R x)) →
(∀ (a b : FreeAlgebra R X), motive a → motive b → motive (a * b)) →
(∀ (a b : FreeAlgebra R X), motive a → motive b → motive (a + b)) → ∀ (a : FreeAlgebra R X), motive a
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.
theorem FreeAlgebra.adjoin_range_ι E0 #
∀ (R : Type u_1) (X : Type u_2) [inst : CommSemiring R], Algebra.adjoin R (Set.range (FreeAlgebra.ι R)) = ⊤
theorem Algebra.adjoin_range_eq_range_freeAlgebra_lift E1 #
∀ (R : Type u_1) (X : Type u_2) [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A]
(f : X → A), Algebra.adjoin R (Set.range f) = ((FreeAlgebra.lift R) f).range
Noncommutative version of Algebra.adjoin_range_eq_range_aeval.
theorem Algebra.adjoin_eq_range_freeAlgebra_lift E1 #
∀ (R : Type u_1) [inst : CommSemiring R] {A : Type u_3} [inst_1 : Semiring A] [inst_2 : Algebra R A] (s : Set A),
Algebra.adjoin R s = ((FreeAlgebra.lift R) Subtype.val).range
Noncommutative version of Algebra.adjoin_range_eq_range.