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
ker
and rangerange
of 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 fromM
toM₂
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
Properties of linear maps #
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
Ring equivalence between additive group endomorphisms of an AddCommGroup
A
and
ℤ
-module endomorphisms of A.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
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
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
An R
-linear isomorphism between two R
-modules M₂
and M₃
induces an S
-linear
isomorphism between M₂ →ₗ[R] M
and M₃ →ₗ[R] M
, if M
is both an R
-module and an
S
-module and their actions commute.
Equations
- One or more equations did not get rendered due to their size.
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
A linear injection M ↪ N
restricts to an equivalence f⁻¹ p ≃ p
for any submodule p
contained in its range.
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.