(Semi)linear maps #
In this file we define
-
LinearMap σ M M₂
,M →ₛₗ[σ] M₂
: a semilinear map between twoModule
s. Here,σ
is aRingHom
fromR
toR₂
and anf : M →ₛₗ[σ] M₂
satisfiesf (c • x) = (σ c) • (f x)
. We recover plain linear maps by choosingσ
to beRingHom.id R
. This is denoted byM →ₗ[R] M₂
. We also add the notationM →ₗ⋆[R] M₂
for star-linear maps. -
IsLinearMap R f
: predicate saying thatf : M → M₂
is a linear map. (Note that this was not generalized to semilinear maps.)
We then provide LinearMap
with the following instances:
LinearMap.addCommMonoid
andLinearMap.addCommGroup
: the elementwise addition structures corresponding to addition in the codomainLinearMap.distribMulAction
andLinearMap.module
: the elementwise scalar action structures corresponding to applying the action in the codomain.Module.End.semiring
andModule.End.ring
: the (semi)ring of endomorphisms formed by taking the additive structure above with composition as multiplication.
Implementation notes #
To ensure that composition works smoothly for semilinear maps, we use the typeclasses
RingHomCompTriple
, RingHomInvPair
and RingHomSurjective
from
Mathlib.Algebra.Ring.CompTypeclasses
.
Notation #
- Throughout the file, we denote regular linear maps by
fₗ
,gₗ
, etc, and semilinear maps byf
,g
, etc.
TODO #
- Parts of this file have not yet been generalized to semilinear maps (i.e.
CompatibleSMul
)
Tags #
linear map
A map f
between modules over a semiring is linear if it satisfies the two properties
f (x + y) = f x + f y
and f (c • x) = c • f x
. The predicate IsLinearMap R f
asserts this
property. A bundled version is available with LinearMap
, and should be favored over
IsLinearMap
most of the time.
A linear map preserves addition.
A linear map preserves scalar multiplication.
Instances For
A map f
between an R
-module and an S
-module over a ring homomorphism σ : R →+* S
is semilinear if it satisfies the two properties f (x + y) = f x + f y
and
f (c • x) = (σ c) • f x
. Elements of LinearMap σ M M₂
(available under the notation
M →ₛₗ[σ] M₂
) are bundled versions of such maps. For plain linear maps (i.e. for which
σ = RingHom.id R
), the notation M →ₗ[R] M₂
is available. An unbundled version of plain linear
maps is available with the predicate IsLinearMap
, but it should be avoided most of the time.
- toFun : M → M₂
- map_add' : ∀ (x y : M), AddHom.toFun s.toAddHom (x + y) = AddHom.toFun s.toAddHom x + AddHom.toFun s.toAddHom y
- map_smul' : ∀ (r : R) (x : M), AddHom.toFun s.toAddHom (r • x) = σ r • AddHom.toFun s.toAddHom x
A linear map preserves scalar multiplication. We prefer the spelling
_root_.map_smul
instead.
Instances For
M →ₛₗ[σ] N
is the type of σ
-semilinear maps from M
to N
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
M →ₗ[R] N
is the type of R
-linear maps from M
to N
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
M →ₗ⋆[R] N
is the type of R
-conjugate-linear maps from M
to N
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
SemilinearMapClass F σ M M₂
asserts F
is a type of bundled σ
-semilinear maps M → M₂
.
See also LinearMapClass F R M M₂
for the case where σ
is the identity map on R
.
A map f
between an R
-module and an S
-module over a ring homomorphism σ : R →+* S
is semilinear if it satisfies the two properties f (x + y) = f x + f y
and
f (c • x) = (σ c) • f x
.
- coe : F → M → M₂
- coe_injective' : Function.Injective FunLike.coe
A semilinear map preserves scalar multiplication up to some ring homomorphism
σ
. See also_root_.map_smul
for the case whereσ
is the identity.
Instances
LinearMapClass F R M M₂
asserts F
is a type of bundled R
-linear maps M → M₂
.
This is an abbreviation for SemilinearMapClass F (RingHom.id R) M M₂
.
Equations
- LinearMapClass F R M M₂ = SemilinearMapClass F (RingHom.id R) M M₂
Instances For
Equations
- SemilinearMapClass.addMonoidHomClass F = let src := SemilinearMapClass.toAddHomClass; AddMonoidHomClass.mk (_ : ∀ (f : F), f 0 = 0)
Equations
- One or more equations did not get rendered due to their size.
Reinterpret an element of a type of semilinear maps as a semilinear map.
Equations
Instances For
Reinterpret an element of a type of linear maps as a linear map.
Equations
Instances For
Equations
- LinearMap.semilinearMapClass = SemilinearMapClass.mk (_ : ∀ (self : M →ₛₗ[σ] M₃) (r : R) (x : M), AddHom.toFun self.toAddHom (r • x) = σ r • AddHom.toFun self.toAddHom x)
Equations
- LinearMap.instFunLike = let src := AddHomClass.toFunLike; { coe := FunLike.coe, coe_injective' := (_ : Function.Injective FunLike.coe) }
The DistribMulActionHom
underlying a LinearMap
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Copy of a LinearMap
with a new toFun
equal to the old one. Useful to fix definitional
equalities.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Identity map as a LinearMap
Equations
- One or more equations did not get rendered due to their size.
Instances For
A generalisation of LinearMap.id
that constructs the identity function
as a σ
-semilinear map for any ring homomorphism σ
which we know is the identity.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If two linear maps are equal, they are equal at each point.
A typeclass for SMul
structures which can be moved through a LinearMap
.
This typeclass is generated automatically from an IsScalarTower
instance, but exists so that
we can also add an instance for AddCommGroup.intModule
, allowing z •
to be moved even if
R
does not support negation.
Scalar multiplication by
R
ofM
can be moved through linear maps.
Instances
Equations
- (_ : LinearMap.CompatibleSMul M M₂ R S) = (_ : LinearMap.CompatibleSMul M M₂ R S)
convert a linear map to an additive map
Equations
Instances For
If M
and M₂
are both R
-modules and S
-modules and R
-module structures
are defined by an action of R
on S
(formally, we have two scalar towers), then any S
-linear
map from M
to M₂
is R
-linear.
See also LinearMap.map_smul_of_tower
.
Equations
Instances For
Equations
- LinearMap.coeIsScalarTower R = { coe := ↑R }
Composition of two linear maps is a linear map
Equations
- One or more equations did not get rendered due to their size.
Instances For
∘ₗ
is notation for composition of two linear (not semilinear!) maps into a linear map.
This is useful when Lean is struggling to infer the RingHomCompTriple
instance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The linear map version of Function.Surjective.injective_comp_right
The linear map version of Function.Injective.comp_left
If a function g
is a left and right inverse of a linear map f
, then g
is linear itself.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- (_ : LinearMap.CompatibleSMul M M₂ ℤ S) = (_ : LinearMap.CompatibleSMul M M₂ ℤ S)
Equations
- (_ : LinearMap.CompatibleSMul M M₂ Rˣ S) = (_ : LinearMap.CompatibleSMul M M₂ Rˣ S)
g : R →+* S
is R
-linear when the module structure on S
is Module.compHom S g
.
Equations
Instances For
A DistribMulActionHom
between two modules is a linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Convert an IsLinearMap
predicate to a LinearMap
Equations
Instances For
Linear endomorphisms of a module, with associated ring structure
Module.End.semiring
and algebra structure Module.End.algebra
.
Equations
- Module.End R M = (M →ₗ[R] M)
Instances For
Reinterpret an additive homomorphism as an ℕ
-linear map.
Equations
Instances For
Reinterpret an additive homomorphism as a ℤ
-linear map.
Equations
Instances For
Reinterpret an additive homomorphism as a ℚ
-linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : SMulCommClass S T (M →ₛₗ[σ₁₂] M₂)) = (_ : SMulCommClass S T (M →ₛₗ[σ₁₂] M₂))
Equations
- (_ : IsScalarTower S T (M →ₛₗ[σ₁₂] M₂)) = (_ : IsScalarTower S T (M →ₛₗ[σ₁₂] M₂))
Equations
- (_ : IsCentralScalar S (M →ₛₗ[σ₁₂] M₂)) = (_ : IsCentralScalar S (M →ₛₗ[σ₁₂] M₂))
Arithmetic on the codomain #
The constant 0 map is linear.
Equations
- LinearMap.instInhabitedLinearMap = { default := 0 }
The sum of two linear maps is linear.
Equations
- One or more equations did not get rendered due to their size.
The type of linear maps is an additive monoid.
Equations
- One or more equations did not get rendered due to their size.
The negation of a linear map is linear.
Equations
- One or more equations did not get rendered due to their size.
The subtraction of two linear maps is linear.
Equations
- One or more equations did not get rendered due to their size.
The type of linear maps is an additive group.
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : NoZeroSMulDivisors S (M →ₛₗ[σ₁₂] M₂)) = (_ : NoZeroSMulDivisors S (M →ₛₗ[σ₁₂] M₂))
Monoid structure of endomorphisms #
Equations
- LinearMap.instOneEnd = { one := LinearMap.id }
Equations
- LinearMap.instMulEnd = { mul := LinearMap.comp }
Equations
- One or more equations did not get rendered due to their size.
See also Module.End.natCast_def
.
See also Module.End.intCast_def
.
Equations
- (_ : IsScalarTower S (Module.End R M) (Module.End R M)) = (_ : IsScalarTower S (Module.End R M) (Module.End R M))
Equations
- (_ : SMulCommClass S (Module.End R M) (Module.End R M)) = (_ : SMulCommClass S (Module.End R M) (Module.End R M))
Equations
- (_ : SMulCommClass (Module.End R M) S (Module.End R M)) = (_ : SMulCommClass (Module.End R M) S (Module.End R M))
Action by a module endomorphism. #
The tautological action by Module.End R M
(aka M →ₗ[R] M
) on M
.
This generalizes Function.End.applyMulAction
.
LinearMap.applyModule
is faithful.
Equations
- (_ : FaithfulSMul (Module.End R M) M) = (_ : FaithfulSMul (Module.End R M) M)
Equations
- (_ : SMulCommClass R (Module.End R M) M) = (_ : SMulCommClass R (Module.End R M) M)
Equations
- (_ : SMulCommClass (Module.End R M) R M) = (_ : SMulCommClass (Module.End R M) R M)
Equations
- (_ : IsScalarTower R (Module.End R M) M) = (_ : IsScalarTower R (Module.End R M) M)
Actions as module endomorphisms #
Each element of the monoid defines a linear map.
This is a stronger version of DistribMulAction.toAddMonoidHom
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Each element of the monoid defines a module endomorphism.
This is a stronger version of DistribMulAction.toAddMonoidEnd
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Each element of the semiring defines a module endomorphism.
This is a stronger version of DistribMulAction.toModuleEnd
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The canonical (semi)ring isomorphism from Rᵐᵒᵖ
to Module.End R R
induced by the right
multiplication.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The canonical (semi)ring isomorphism from R
to Module.End Rᵐᵒᵖ R
induced by the left
multiplication.
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
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
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
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.