Linear algebra #
This file defines the basics of linear algebra. It sets up the "categorical/lattice structure" of modules over a ring, submodules, and linear maps.
Many of the relevant definitions, including Module, Submodule, and LinearMap, are found in
Algebra/Module.
Main definitions #
- Many constructors for (semi)linear maps
- The kernel
kerand rangerangeof a linear map are submodules of the domain and codomain respectively.
See LinearAlgebra.Span for the span of a set (as a submodule),
and LinearAlgebra.Quotient for quotients by submodules.
Main theorems #
See LinearAlgebra.Isomorphisms for Noether's three isomorphism theorems for modules.
Notations #
- We continue to use the notations
M →ₛₗ[σ] M₂andM →ₗ[R] M₂for the type of semilinear (resp. linear) maps fromMtoM₂over the ring homomorphismσ(resp. over the ringR).
Implementation notes #
We note that, when constructing linear maps, it is convenient to use operations defined on bundled
maps (LinearMap.prod, LinearMap.coprod, arithmetic operations like +) instead of defining a
function and proving it is linear.
TODO #
- Parts of this file have not yet been generalized to semilinear maps
Tags #
linear algebra, vector space, module
Given Finite α, linearEquivFunOnFinite R is the natural R-linear equivalence between
α →₀ β and α → β.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If α has a unique term, then the type of finitely supported functions α →₀ M is
R-linearly equivalent to M.
Equations
- One or more equations did not get rendered due to their size.
Instances For
decomposing x : ι → R as a sum along the canonical basis
Properties of linear maps #
The restriction of a linear map f : M → M₂ to a submodule p ⊆ M gives a linear map
p → M₂.
Equations
Instances For
A linear map f : M₂ → M whose values lie in a submodule p ⊆ M can be restricted to a
linear map M₂ → p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restrict domain and codomain of a linear map.
Equations
- LinearMap.restrict f hf = LinearMap.codRestrict q (LinearMap.domRestrict f p) (_ : ∀ (x : { x // x ∈ p }), ↑(LinearMap.domRestrict f p) x ∈ q)
Instances For
Equations
- LinearMap.uniqueOfRight = Function.Injective.unique (_ : Function.Injective FunLike.coe)
Evaluation of a σ₁₂-linear map at a fixed a, as an AddMonoidHom.
Equations
- One or more equations did not get rendered due to their size.
Instances For
LinearMap.toAddMonoidHom promoted to a AddMonoidHom
Equations
- One or more equations did not get rendered due to their size.
Instances For
When f is an R-linear map taking values in S, then fun ↦ b, f b • x is an R-linear
map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A linear map f applied to x : ι → R can be computed using the image under f of elements
of the canonical basis.
Applying a linear map at v : M, seen as S-linear map from M →ₗ[R] M₂ to M₂.
See LinearMap.applyₗ for a version where S = R.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence between R-linear maps from R to M, and points of M itself.
This says that the forgetful functor from R-modules to types is representable, by R.
This as an S-linear equivalence, under the assumption that S acts on M commuting with R.
When R is commutative, we can take this to be the usual action with S = R.
Otherwise, S = ℕ shows that the equivalence is additive.
See note [bundled maps over different rings].
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composition by f : M₂ → M₃ is a linear map from the space of linear maps M → M₂
to the space of linear maps M₂ → M₃.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applying a linear map at v : M, seen as a linear map from M →ₗ[R] M₂ to M₂.
See also LinearMap.applyₗ' for a version that works with two different semirings.
This is the LinearMap version of toAddMonoidHom.eval.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alternative version of domRestrict as a linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The family of linear maps M₂ → M parameterised by f ∈ M₂ → R, x ∈ M, is linear in f, x.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The R-linear equivalence between additive morphisms A →+ B and ℕ-linear morphisms A →ₗ[ℕ] B.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The R-linear equivalence between additive morphisms A →+ B and ℤ-linear morphisms A →ₗ[ℤ] B.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Properties of submodules #
If two submodules p and p' satisfy p ⊆ p', then ofLe p p' is the linear map version of
this inclusion.
Equations
- Submodule.ofLe h = LinearMap.codRestrict p' (Submodule.subtype p) (_ : ∀ (x : { x // x ∈ p }), ↑(Submodule.subtype p) x ∈ p')
Instances For
The pushforward of a submodule p ⊆ M by f : M → M₂
Equations
- One or more equations did not get rendered due to their size.
Instances For
The pushforward of a submodule by an injective linear map is
linearly equivalent to the original submodule. See also LinearEquiv.submoduleMap for a
computable version when f has an explicit inverse.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The pullback of a submodule p ⊆ M₂ along f : M → M₂
Equations
- One or more equations did not get rendered due to their size.
Instances For
map f and comap f form a GaloisInsertion when f is surjective.
Equations
- One or more equations did not get rendered due to their size.
Instances For
map f and comap f form a GaloisCoinsertion when f is injective.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A linear isomorphism induces an order isomorphism of submodules.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The infimum of a family of invariant submodule of an endomorphism is also an invariant submodule.
Properties of linear maps #
The range of a linear map f : M → M₂ is a submodule of M₂.
See Note [range copy pattern].
Equations
- LinearMap.range f = Submodule.copy (Submodule.map f ⊤) (Set.range ↑f) (_ : Set.range ↑f = ↑f '' Set.univ)
Instances For
A linear map version of AddMonoidHom.eqLocusM
Equations
- One or more equations did not get rendered due to their size.
Instances For
The decreasing sequence of submodules consisting of the ranges of the iterates of a linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restrict the codomain of a linear map f to f.range.
This is the bundled version of Set.rangeFactorization.
Equations
- LinearMap.rangeRestrict f = LinearMap.codRestrict (LinearMap.range f) f (_ : ∀ (x : M), ↑f x ∈ LinearMap.range f)
Instances For
The range of a linear map is finite if the domain is finite.
Note: this instance can form a diamond with Subtype.fintype in the
presence of Fintype M₂.
Equations
The kernel of a linear map f : M → M₂ is defined to be comap f ⊥. This is equivalent to the
set of x : M such that f x = 0. The kernel is a submodule of M.
Equations
Instances For
The increasing sequence of submodules consisting of the kernels of the iterates of a linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Under the canonical linear map from a submodule p to the ambient space M, the image of the
maximal submodule of p is just p .
If N ⊆ M then submodules of N are the same as submodules of M contained in N
Equations
- One or more equations did not get rendered due to their size.
Instances For
If p ⊆ M is a submodule, the ordering of submodules of p is embedded in the ordering of
submodules of M.
Equations
- Submodule.MapSubtype.orderEmbedding p = RelEmbedding.trans (RelIso.toRelEmbedding (Submodule.MapSubtype.relIso p)) (Subtype.relEmbedding (fun p p' => p ≤ p') fun p' => p' ≤ p)
Instances For
A monomorphism is injective.
If O is a submodule of M, and Φ : O →ₗ M' is a linear map,
then (ϕ : O →ₗ M').submoduleImage N is ϕ(N) as a submodule of M'
Equations
- LinearMap.submoduleImage ϕ N = Submodule.map ϕ (Submodule.comap (Submodule.subtype O) N)
Instances For
Linear equivalences #
Between two zero modules, the zero map is an equivalence.
Equations
- One or more equations did not get rendered due to their size.
Between two zero modules, the zero map is the only equivalence.
Equations
- LinearEquiv.uniqueOfSubsingleton = inferInstance
A linear equivalence of two modules restricts to a linear equivalence from any submodule
p of the domain onto the image of that submodule.
This is the linear version of AddEquiv.submonoidMap and AddEquiv.subgroupMap.
This is LinearEquiv.ofSubmodule' but with map on the right instead of comap on the left.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Linear equivalence between two equal submodules.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A linear equivalence which maps a submodule of one module onto another, restricts to a linear equivalence of the two submodules.
Equations
- LinearEquiv.ofSubmodules e p q h = LinearEquiv.trans (LinearEquiv.submoduleMap e p) (LinearEquiv.ofEq (Submodule.map (↑e) p) q h)
Instances For
A linear equivalence of two modules restricts to a linear equivalence from the preimage of any submodule to that submodule.
This is LinearEquiv.ofSubmodule but with comap on the left instead of map on the right.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The top submodule of M is linearly equivalent to M.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If a linear map has an inverse, it is a linear equivalence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A linear map f : M →ₗ[R] M₂ with a left-inverse g : M₂ →ₗ[R] M defines a linear
equivalence between M and f.range.
This is a computable alternative to LinearEquiv.ofInjective, and a bidirectional version of
LinearMap.rangeRestrict.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An Injective linear map f : M →ₗ[R] M₂ defines a linear equivalence
between M and f.range. See also LinearMap.ofLeftInverse.
Equations
- LinearEquiv.ofInjective f h = LinearEquiv.ofLeftInverse (_ : Function.LeftInverse (Classical.choose (_ : Function.HasLeftInverse ↑f)) ↑f)
Instances For
A bijective linear map is a linear equivalence.
Equations
- LinearEquiv.ofBijective f hf = LinearEquiv.trans (LinearEquiv.ofInjective f (_ : Function.Injective ↑f)) (LinearEquiv.ofTop (LinearMap.range f) (_ : LinearMap.range f = ⊤))
Instances For
x ↦ -x as a LinearEquiv
Equations
- One or more equations did not get rendered due to their size.
Instances For
Multiplying by a unit a of the ring R is a linear equivalence.
Equations
Instances For
A linear isomorphism between the domains and codomains of two spaces of linear maps gives a linear isomorphism between the two function spaces.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If M₂ and M₃ are linearly isomorphic then the two spaces of linear maps from M into M₂
and M into M₃ are linearly isomorphic.
Equations
Instances For
If M and M₂ are linearly isomorphic then the two spaces of linear maps from M and M₂ to
themselves are linearly isomorphic.
Equations
Instances For
Multiplying by a nonzero element a of the field K is a linear equivalence.
Equations
- LinearEquiv.smulOfNeZero K M a ha = LinearEquiv.smulOfUnit (Units.mk0 a ha)
Instances For
Given p a submodule of the module M and q a submodule of p, p.equivSubtypeMap q
is the natural LinearEquiv between q and q.map p.subtype.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If s ≤ t, then we can view s as a submodule of t by taking the comap
of t.subtype.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given modules M, M₂ over a commutative ring, together with submodules p ⊆ M, q ⊆ M₂,
the set of maps ${f ∈ Hom(M, M₂) | f(p) ⊆ q }$ is a submodule of Hom(M, M₂).
Equations
- One or more equations did not get rendered due to their size.
Instances For
An equivalence whose underlying function is linear is a linear equivalence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given an R-module M and a function m → n between arbitrary types,
construct a linear map (n → M) →ₗ[R] (m → M)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given an R-module M and an equivalence m ≃ n between arbitrary types,
construct a linear equivalence (n → M) ≃ₗ[R] (m → M)
Equations
- One or more equations did not get rendered due to their size.