(Semi)linear maps #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In this file we define
-
linear_map σ M M₂
,M →ₛₗ[σ] M₂
: a semilinear map between twomodule
s. Here,σ
is aring_hom
fromR
toR₂
and anf : M →ₛₗ[σ] M₂
satisfiesf (c • x) = (σ c) • (f x)
. We recover plain linear maps by choosingσ
to bering_hom.id R
. This is denoted byM →ₗ[R] M₂
. We also add the notationM →ₗ⋆[R] M₂
for star-linear maps. -
is_linear_map R f
: predicate saying thatf : M → M₂
is a linear map. (Note that this was not generalized to semilinear maps.)
We then provide linear_map
with the following instances:
linear_map.add_comm_monoid
andlinear_map.add_comm_group
: the elementwise addition structures corresponding to addition in the codomainlinear_map.distrib_mul_action
andlinear_map.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
ring_hom_comp_triple
, ring_hom_inv_pair
and ring_hom_surjective
from
algebra/ring/comp_typeclasses
.
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.
compatible_smul
)
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 is_linear_map R f
asserts this
property. A bundled version is available with linear_map
, and should be favored over
is_linear_map
most of the time.
- to_fun : M → M₂
- map_add' : ∀ (x y : M), self.to_fun (x + y) = self.to_fun x + self.to_fun y
- map_smul' : ∀ (r : R) (x : M), self.to_fun (r • x) = ⇑σ r • self.to_fun x
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 linear_map σ M M₂
(available under the notation
M →ₛₗ[σ] M₂
) are bundled versions of such maps. For plain linear maps (i.e. for which
σ = ring_hom.id R
), the notation M →ₗ[R] M₂
is available. An unbundled version of plain linear
maps is available with the predicate is_linear_map
, but it should be avoided most of the time.
Instances for linear_map
- linear_map.has_sizeof_inst
- linear_map.semilinear_map_class
- linear_map.has_coe_to_fun
- distrib_mul_action_hom.linear_map.has_coe
- linear_map.has_smul
- linear_map.smul_comm_class
- linear_map.is_scalar_tower
- linear_map.is_central_scalar
- linear_map.has_zero
- linear_map.inhabited
- linear_map.has_add
- linear_map.add_comm_monoid
- linear_map.has_neg
- linear_map.has_sub
- linear_map.add_comm_group
- linear_map.distrib_mul_action
- linear_map.module
- linear_map.no_zero_smul_divisors
- linear_map.module.End.has_one
- linear_map.module.End.has_mul
- module.End.monoid
- module.End.semiring
- module.End.ring
- module.End.is_scalar_tower
- module.End.smul_comm_class
- module.End.smul_comm_class'
- linear_map.apply_module
- linear_map.apply_has_faithful_smul
- linear_map.apply_smul_comm_class
- linear_map.apply_smul_comm_class'
- linear_map.apply_is_scalar_tower
- linear_equiv.linear_map.has_coe
- linear_map.unique_of_left
- linear_map.unique_of_right
- linear_map.module.End.nontrivial
- module.End.algebra
- linear_map.coe_is_scalar_tower
- linear_pmap.has_vadd
- linear_pmap.add_action
- module.free.linear_map
- module.finite.linear_map
- linear_map.finite_dimensional''
- continuous_linear_map.linear_map.has_coe
- module.dual.inhabited
- module.dual.has_coe_to_fun
- basis.dual_free
- basis.dual_finite
- subspace.module.dual.finite_dimensional
- module.End.division_ring
- linear_map.continuous_linear_map_class_of_finite_dimensional
- linear_map.can_lift_continuous_linear_map
- representation.as_module.module
- derivation.has_coe_to_linear_map
- linear_map.has_star
- linear_map.has_involutive_star
- linear_map.star_semigroup
- linear_map.star_ring
- linear_map.star_module
- linear_map.lie_ring_module
- linear_map.lie_module
- lie_hom.linear_map.has_coe
- lie_module_hom.linear_map.has_coe
- module.End.lie_ring_module
- module.End.lie_module
- category_theory.Module.coextend_scalars.has_smul
- category_theory.Module.coextend_scalars.mul_action
- category_theory.Module.coextend_scalars.distrib_mul_action
- category_theory.Module.coextend_scalars.is_module
- linear_map.finite_dimensional
- linear_map.finite_dimensional'
The add_hom
underlying a linear_map
.
- coe : F → Π (a : M), (λ (_x : M), M₂) a
- coe_injective' : function.injective semilinear_map_class.coe
- map_add : ∀ (f : F) (x y : M), ⇑f (x + y) = ⇑f x + ⇑f y
- map_smulₛₗ : ∀ (f : F) (r : R) (x : M), ⇑f (r • x) = ⇑σ r • ⇑f x
semilinear_map_class F σ M M₂
asserts F
is a type of bundled σ
-semilinear maps M → M₂
.
See also linear_map_class 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
.
Instances of this typeclass
Instances of other typeclasses for semilinear_map_class
- semilinear_map_class.has_sizeof_inst
linear_map_class F R M M₂
asserts F
is a type of bundled R
-linear maps M → M₂
.
This is an abbreviation for semilinear_map_class F (ring_hom.id R) M M₂
.
Equations
- semilinear_map_class.add_monoid_hom_class F = {coe := λ (f : F), ⇑f, coe_injective' := _, map_add := _, map_zero := _}
Equations
- semilinear_map_class.distrib_mul_action_hom_class F = {coe := λ (f : F), ⇑f, coe_injective' := _, map_smul := _, map_add := _, map_zero := _}
Equations
- linear_map.semilinear_map_class = {coe := linear_map.to_fun _inst_12, coe_injective' := _, map_add := _, map_smulₛₗ := _}
Helper instance for when there's too many metavariables to apply fun_like.has_coe_to_fun
directly.
The distrib_mul_action_hom
underlying a linear_map
.
Copy of a linear_map
with a new to_fun
equal to the old one. Useful to fix definitional
equalities.
See Note [custom simps projection].
Equations
- linear_map.simps.apply σ M M₃ f = ⇑f
Identity map as a linear_map
If two linear maps are equal, they are equal at each point.
A typeclass for has_smul
structures which can be moved through a linear_map
.
This typeclass is generated automatically from a is_scalar_tower
instance, but exists so that
we can also add an instance for add_comm_group.int_module
, allowing z •
to be moved even if
R
does not support negation.
Instances of this typeclass
Instances of other typeclasses for linear_map.compatible_smul
- linear_map.compatible_smul.has_sizeof_inst
Equations
convert a linear map to an additive map
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 linear_map.map_smul_of_tower
.
Composition of two linear maps is a linear map
If a function g
is a left and right inverse of a linear map f
, then g
is linear itself.
Equations
Equations
A distrib_mul_action_hom
between two modules is a linear map.
Equations
Convert an is_linear_map
predicate to a linear_map
Linear endomorphisms of a module, with associated ring structure
module.End.semiring
and algebra structure module.End.algebra
.
Reinterpret an additive homomorphism as a ℕ
-linear map.
Reinterpret an additive homomorphism as a ℤ
-linear map.
Reinterpret an additive homomorphism as a ℚ
-linear map.
Arithmetic on the codomain #
The constant 0 map is linear.
Equations
- linear_map.inhabited = {default := 0}
The sum of two linear maps is linear.
The type of linear maps is an additive monoid.
Equations
- linear_map.add_comm_monoid = function.injective.add_comm_monoid coe_fn linear_map.add_comm_monoid._proof_2 linear_map.add_comm_monoid._proof_3 linear_map.add_comm_monoid._proof_4 linear_map.add_comm_monoid._proof_5
The negation of a linear map is linear.
The subtraction of two linear maps is linear.
The type of linear maps is an additive group.
Equations
- linear_map.add_comm_group = function.injective.add_comm_group coe_fn linear_map.add_comm_group._proof_3 linear_map.add_comm_group._proof_4 linear_map.add_comm_group._proof_5 linear_map.add_comm_group._proof_6 linear_map.add_comm_group._proof_7 linear_map.add_comm_group._proof_8 linear_map.add_comm_group._proof_9
Equations
- linear_map.distrib_mul_action = {to_mul_action := {to_has_smul := linear_map.has_smul _inst_13, one_smul := _, mul_smul := _}, smul_zero := _, smul_add := _}
Equations
- linear_map.module = {to_distrib_mul_action := linear_map.distrib_mul_action _inst_13, add_smul := _, zero_smul := _}
Monoid structure of endomorphisms #
Lemmas about pow
such as linear_map.pow_apply
appear in later files.
Equations
- linear_map.module.End.has_one = {one := linear_map.id _inst_4}
Equations
- linear_map.module.End.has_mul = {mul := linear_map.comp linear_map.module.End.has_mul._proof_1}
Equations
- module.End.monoid = {mul := has_mul.mul linear_map.module.End.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := npow_rec (mul_one_class.to_has_mul (module.End R M)), npow_zero' := _, npow_succ' := _}
Equations
- module.End.semiring = {add := has_add.add linear_map.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_monoid_with_one.nsmul add_monoid_with_one.unary, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := has_mul.mul linear_map.module.End.has_mul, left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := 1, one_mul := _, mul_one := _, nat_cast := λ (n : ℕ), n • 1, nat_cast_zero := _, nat_cast_succ := _, npow := monoid.npow module.End.monoid, npow_zero' := _, npow_succ' := _}
See also module.End.nat_cast_def
.
Equations
- module.End.ring = {add := semiring.add module.End.semiring, add_assoc := _, zero := semiring.zero module.End.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul module.End.semiring, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg linear_map.add_comm_group, sub := add_comm_group.sub linear_map.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul linear_map.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := λ (z : ℤ), z • 1, nat_cast := semiring.nat_cast module.End.semiring, one := semiring.one module.End.semiring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := semiring.mul module.End.semiring, mul_assoc := _, one_mul := _, mul_one := _, npow := semiring.npow module.End.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
See also module.End.int_cast_def
.
Action by a module endomorphism. #
The tautological action by module.End R M
(aka M →ₗ[R] M
) on M
.
This generalizes function.End.apply_mul_action
.
Equations
- linear_map.apply_module = {to_distrib_mul_action := {to_mul_action := {to_has_smul := {smul := λ (_x : module.End R M) (_y : M), ⇑_x _y}, one_smul := _, mul_smul := _}, smul_zero := _, smul_add := _}, add_smul := _, zero_smul := _}
linear_map.apply_module
is faithful.
Actions as module endomorphisms #
Each element of the monoid defines a linear map.
This is a stronger version of distrib_mul_action.to_add_monoid_hom
.
Equations
- distrib_mul_action.to_linear_map R M s = {to_fun := has_smul.smul s, map_add' := _, map_smul' := _}
Each element of the monoid defines a module endomorphism.
This is a stronger version of distrib_mul_action.to_add_monoid_End
.
Equations
- distrib_mul_action.to_module_End R M = {to_fun := distrib_mul_action.to_linear_map R M _inst_6, map_one' := _, map_mul' := _}
Each element of the semiring defines a module endomorphism.
This is a stronger version of distrib_mul_action.to_module_End
.
Equations
- module.to_module_End R M = {to_fun := distrib_mul_action.to_linear_map R M _inst_6, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
The canonical (semi)ring isomorphism from Rᵐᵒᵖ
to module.End R R
induced by the right
multiplication.
Equations
- module.module_End_self R = {to_fun := distrib_mul_action.to_linear_map R R _, inv_fun := λ (f : module.End R R), mul_opposite.op (⇑f 1), left_inv := _, right_inv := _, map_mul' := _, map_add' := _}
The canonical (semi)ring isomorphism from R
to module.End Rᵐᵒᵖ R
induced by the left
multiplication.
Equations
- module.module_End_self_op R = {to_fun := distrib_mul_action.to_linear_map Rᵐᵒᵖ R _, inv_fun := λ (f : module.End Rᵐᵒᵖ R), ⇑f 1, left_inv := _, right_inv := _, map_mul' := _, map_add' := _}