Module docstring
{"# Further results on (semi)linear equivalences. "}
{"# Further results on (semi)linear equivalences. "}
LinearEquiv.restrictScalars
definition
(f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂
/-- If `M` and `M₂` are both `R`-semimodules and `S`-semimodules and `R`-semimodule structures
are defined by an action of `R` on `S` (formally, we have two scalar towers), then any `S`-linear
equivalence from `M` to `M₂` is also an `R`-linear equivalence.
See also `LinearMap.restrictScalars`. -/
@[simps]
def restrictScalars (f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂ :=
{ f.toLinearMap.restrictScalars R with
toFun := f
invFun := f.symm
left_inv := f.left_inv
right_inv := f.right_inv }
LinearEquiv.restrictScalars_injective
theorem
: Function.Injective (restrictScalars R : (M ≃ₗ[S] M₂) → M ≃ₗ[R] M₂)
theorem restrictScalars_injective :
Function.Injective (restrictScalars R : (M ≃ₗ[S] M₂) → M ≃ₗ[R] M₂) := fun _ _ h ↦
ext (LinearEquiv.congr_fun h :)
LinearEquiv.restrictScalars_inj
theorem
(f g : M ≃ₗ[S] M₂) : f.restrictScalars R = g.restrictScalars R ↔ f = g
@[simp]
theorem restrictScalars_inj (f g : M ≃ₗ[S] M₂) :
f.restrictScalars R = g.restrictScalars R ↔ f = g :=
(restrictScalars_injective R).eq_iff
Module.End.isUnit_iff
theorem
[Module R M] (f : Module.End R M) : IsUnit f ↔ Function.Bijective f
theorem _root_.Module.End.isUnit_iff [Module R M] (f : Module.End R M) :
IsUnitIsUnit f ↔ Function.Bijective f :=
⟨fun h ↦
Function.bijective_iff_has_inverse.mpr <|
⟨h.unit.inv,
⟨Module.End.isUnit_inv_apply_apply_of_isUnit h,
Module.End.isUnit_apply_inv_apply_of_isUnit h⟩⟩,
fun H ↦
let e : M ≃ₗ[R] M := { f, Equiv.ofBijective f H with }
⟨⟨_, e.symm, LinearMap.ext e.right_inv, LinearMap.ext e.left_inv⟩, rfl⟩⟩
LinearEquiv.automorphismGroup
instance
: Group (M ≃ₗ[R] M)
LinearEquiv.one_eq_refl
theorem
: (1 : M ≃ₗ[R] M) = refl R M
lemma one_eq_refl : (1 : M ≃ₗ[R] M) = refl R M := rfl
LinearEquiv.mul_eq_trans
theorem
(f g : M ≃ₗ[R] M) : f * g = g.trans f
lemma mul_eq_trans (f g : M ≃ₗ[R] M) : f * g = g.trans f := rfl
LinearEquiv.coe_one
theorem
: ↑(1 : M ≃ₗ[R] M) = id
LinearEquiv.coe_toLinearMap_one
theorem
: (↑(1 : M ≃ₗ[R] M) : M →ₗ[R] M) = LinearMap.id
@[simp]
lemma coe_toLinearMap_one : (↑(1 : M ≃ₗ[R] M) : M →ₗ[R] M) = LinearMap.id := rfl
LinearEquiv.coe_toLinearMap_mul
theorem
{e₁ e₂ : M ≃ₗ[R] M} : (↑(e₁ * e₂) : M →ₗ[R] M) = (e₁ : M →ₗ[R] M) * (e₂ : M →ₗ[R] M)
LinearEquiv.coe_pow
theorem
(e : M ≃ₗ[R] M) (n : ℕ) : ⇑(e ^ n) = e^[n]
LinearEquiv.pow_apply
theorem
(e : M ≃ₗ[R] M) (n : ℕ) (m : M) : (e ^ n) m = e^[n] m
LinearEquiv.mul_apply
theorem
(f : M ≃ₗ[R] M) (g : M ≃ₗ[R] M) (x : M) : (f * g) x = f (g x)
LinearEquiv.automorphismGroup.toLinearMapMonoidHom
definition
: (M ≃ₗ[R] M) →* M →ₗ[R] M
/-- Restriction from `R`-linear automorphisms of `M` to `R`-linear endomorphisms of `M`,
promoted to a monoid hom. -/
@[simps]
def automorphismGroup.toLinearMapMonoidHom : (M ≃ₗ[R] M) →* M →ₗ[R] M where
toFun e := e.toLinearMap
map_one' := rfl
map_mul' _ _ := rfl
LinearEquiv.applyDistribMulAction
instance
: DistribMulAction (M ≃ₗ[R] M) M
/-- The tautological action by `M ≃ₗ[R] M` on `M`.
This generalizes `Function.End.applyMulAction`. -/
instance applyDistribMulAction : DistribMulAction (M ≃ₗ[R] M) M where
smul := (· <| ·)
smul_zero := LinearEquiv.map_zero
smul_add := LinearEquiv.map_add
one_smul _ := rfl
mul_smul _ _ _ := rfl
LinearEquiv.smul_def
theorem
(f : M ≃ₗ[R] M) (a : M) : f • a = f a
LinearEquiv.apply_faithfulSMul
instance
: FaithfulSMul (M ≃ₗ[R] M) M
/-- `LinearEquiv.applyDistribMulAction` is faithful. -/
instance apply_faithfulSMul : FaithfulSMul (M ≃ₗ[R] M) M :=
⟨LinearEquiv.ext⟩
LinearEquiv.apply_smulCommClass
instance
[SMul S R] [SMul S M] [IsScalarTower S R M] : SMulCommClass S (M ≃ₗ[R] M) M
instance apply_smulCommClass [SMul S R] [SMul S M] [IsScalarTower S R M] :
SMulCommClass S (M ≃ₗ[R] M) M where
smul_comm r e m := (e.map_smul_of_tower r m).symm
LinearEquiv.apply_smulCommClass'
instance
[SMul S R] [SMul S M] [IsScalarTower S R M] : SMulCommClass (M ≃ₗ[R] M) S M
instance apply_smulCommClass' [SMul S R] [SMul S M] [IsScalarTower S R M] :
SMulCommClass (M ≃ₗ[R] M) S M :=
SMulCommClass.symm _ _ _
LinearEquiv.ofSubsingleton
definition
: M ≃ₗ[R] M₂
/-- Any two modules that are subsingletons are isomorphic. -/
@[simps]
def ofSubsingleton : M ≃ₗ[R] M₂ :=
{ (0 : M →ₗ[R] M₂) with
toFun := fun _ ↦ 0
invFun := fun _ ↦ 0
left_inv := fun _ ↦ Subsingleton.elim _ _
right_inv := fun _ ↦ Subsingleton.elim _ _ }
LinearEquiv.ofSubsingleton_self
theorem
: ofSubsingleton M M = refl R M
@[simp]
theorem ofSubsingleton_self : ofSubsingleton M M = refl R M := by
ext
simp [eq_iff_true_of_subsingleton]
Module.compHom.toLinearEquiv
definition
{R S : Type*} [Semiring R] [Semiring S] (g : R ≃+* S) :
haveI := compHom S (↑g : R →+* S)
R ≃ₗ[R] S
/-- `g : R ≃+* S` is `R`-linear when the module structure on `S` is `Module.compHom S g` . -/
@[simps]
def compHom.toLinearEquiv {R S : Type*} [Semiring R] [Semiring S] (g : R ≃+* S) :
haveI := compHom S (↑g : R →+* S)
R ≃ₗ[R] S :=
letI := compHom S (↑g : R →+* S)
{ g with
toFun := (g : R → S)
invFun := (g.symm : S → R)
map_smul' := g.map_mul }
DistribMulAction.toLinearEquiv
definition
(s : S) : M ≃ₗ[R] M
/-- Each element of the group defines a linear equivalence.
This is a stronger version of `DistribMulAction.toAddEquiv`. -/
@[simps!]
def toLinearEquiv (s : S) : M ≃ₗ[R] M :=
{ toAddEquiv M s, toLinearMap R M s with }
DistribMulAction.toModuleAut
definition
: S →* M ≃ₗ[R] M
/-- Each element of the group defines a module automorphism.
This is a stronger version of `DistribMulAction.toAddAut`. -/
@[simps]
def toModuleAut : S →* M ≃ₗ[R] M where
toFun := toLinearEquiv R M
map_one' := LinearEquiv.ext <| one_smul _
map_mul' _ _ := LinearEquiv.ext <| mul_smul _ _
AddEquiv.toLinearEquiv
definition
(h : ∀ (c : R) (x), e (c • x) = c • e x) : M ≃ₗ[R] M₂
/-- An additive equivalence whose underlying function preserves `smul` is a linear equivalence. -/
def toLinearEquiv (h : ∀ (c : R) (x), e (c • x) = c • e x) : M ≃ₗ[R] M₂ :=
{ e with map_smul' := h }
AddEquiv.coe_toLinearEquiv
theorem
(h : ∀ (c : R) (x), e (c • x) = c • e x) : ⇑(e.toLinearEquiv h) = e
@[simp]
theorem coe_toLinearEquiv (h : ∀ (c : R) (x), e (c • x) = c • e x) : ⇑(e.toLinearEquiv h) = e :=
rfl
AddEquiv.coe_toLinearEquiv_symm
theorem
(h : ∀ (c : R) (x), e (c • x) = c • e x) : ⇑(e.toLinearEquiv h).symm = e.symm
@[simp]
theorem coe_toLinearEquiv_symm (h : ∀ (c : R) (x), e (c • x) = c • e x) :
⇑(e.toLinearEquiv h).symm = e.symm :=
rfl
AddEquiv.toNatLinearEquiv
definition
: M ≃ₗ[ℕ] M₂
/-- An additive equivalence between commutative additive monoids is a linear equivalence between
ℕ-modules -/
def toNatLinearEquiv : M ≃ₗ[ℕ] M₂ :=
e.toLinearEquiv fun c a ↦ by rw [map_nsmul]
AddEquiv.coe_toNatLinearEquiv
theorem
: ⇑e.toNatLinearEquiv = e
@[simp]
theorem coe_toNatLinearEquiv : ⇑e.toNatLinearEquiv = e :=
rfl
AddEquiv.toNatLinearEquiv_toAddEquiv
theorem
: ↑e.toNatLinearEquiv = e
@[simp]
theorem toNatLinearEquiv_toAddEquiv : ↑e.toNatLinearEquiv = e :=
rfl
LinearEquiv.toAddEquiv_toNatLinearEquiv
theorem
(e : M ≃ₗ[ℕ] M₂) : AddEquiv.toNatLinearEquiv ↑e = e
@[simp]
theorem _root_.LinearEquiv.toAddEquiv_toNatLinearEquiv (e : M ≃ₗ[ℕ] M₂) :
AddEquiv.toNatLinearEquiv ↑e = e :=
DFunLike.coe_injective rfl
AddEquiv.toNatLinearEquiv_symm
theorem
: e.toNatLinearEquiv.symm = e.symm.toNatLinearEquiv
@[simp]
theorem toNatLinearEquiv_symm : e.toNatLinearEquiv.symm = e.symm.toNatLinearEquiv :=
rfl
AddEquiv.toNatLinearEquiv_refl
theorem
: (AddEquiv.refl M).toNatLinearEquiv = LinearEquiv.refl ℕ M
@[simp]
theorem toNatLinearEquiv_refl : (AddEquiv.refl M).toNatLinearEquiv = LinearEquiv.refl ℕ M :=
rfl
AddEquiv.toNatLinearEquiv_trans
theorem
(e₂ : M₂ ≃+ M₃) : e.toNatLinearEquiv.trans e₂.toNatLinearEquiv = (e.trans e₂).toNatLinearEquiv
@[simp]
theorem toNatLinearEquiv_trans (e₂ : M₂ ≃+ M₃) :
e.toNatLinearEquiv.trans e₂.toNatLinearEquiv = (e.trans e₂).toNatLinearEquiv :=
rfl
AddEquiv.toIntLinearEquiv
definition
: M ≃ₗ[ℤ] M₂
/-- An additive equivalence between commutative additive groups is a linear
equivalence between ℤ-modules -/
def toIntLinearEquiv : M ≃ₗ[ℤ] M₂ :=
e.toLinearEquiv fun c a ↦ e.toAddMonoidHom.map_zsmul a c
AddEquiv.coe_toIntLinearEquiv
theorem
: ⇑e.toIntLinearEquiv = e
@[simp]
theorem coe_toIntLinearEquiv : ⇑e.toIntLinearEquiv = e :=
rfl
AddEquiv.toIntLinearEquiv_toAddEquiv
theorem
: ↑e.toIntLinearEquiv = e
@[simp]
theorem toIntLinearEquiv_toAddEquiv : ↑e.toIntLinearEquiv = e := by
ext
rfl
LinearEquiv.toAddEquiv_toIntLinearEquiv
theorem
(e : M ≃ₗ[ℤ] M₂) : AddEquiv.toIntLinearEquiv (e : M ≃+ M₂) = e
@[simp]
theorem _root_.LinearEquiv.toAddEquiv_toIntLinearEquiv (e : M ≃ₗ[ℤ] M₂) :
AddEquiv.toIntLinearEquiv (e : M ≃+ M₂) = e :=
DFunLike.coe_injective rfl
AddEquiv.toIntLinearEquiv_symm
theorem
: e.toIntLinearEquiv.symm = e.symm.toIntLinearEquiv
@[simp]
theorem toIntLinearEquiv_symm : e.toIntLinearEquiv.symm = e.symm.toIntLinearEquiv :=
rfl
AddEquiv.toIntLinearEquiv_refl
theorem
: (AddEquiv.refl M).toIntLinearEquiv = LinearEquiv.refl ℤ M
@[simp]
theorem toIntLinearEquiv_refl : (AddEquiv.refl M).toIntLinearEquiv = LinearEquiv.refl ℤ M :=
rfl
AddEquiv.toIntLinearEquiv_trans
theorem
(e₂ : M₂ ≃+ M₃) : e.toIntLinearEquiv.trans e₂.toIntLinearEquiv = (e.trans e₂).toIntLinearEquiv
@[simp]
theorem toIntLinearEquiv_trans (e₂ : M₂ ≃+ M₃) :
e.toIntLinearEquiv.trans e₂.toIntLinearEquiv = (e.trans e₂).toIntLinearEquiv :=
rfl
LinearMap.ringLmapEquivSelf
definition
[Module S M] [SMulCommClass R S M] : (R →ₗ[R] M) ≃ₗ[S] M
/-- 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 is 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].
-/
@[simps]
def ringLmapEquivSelf [Module S M] [SMulCommClass R S M] : (R →ₗ[R] M) ≃ₗ[S] M :=
{ applyₗ' S (1 : R) with
toFun := fun f ↦ f 1
invFun := smulRight (1 : R →ₗ[R] R)
left_inv := fun f ↦ by
ext
simp only [coe_smulRight, Module.End.one_apply, smul_eq_mul, ← map_smul f, mul_one]
right_inv := fun x ↦ by simp }
addMonoidHomLequivNat
definition
{A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A] [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
[AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B where
toFun := AddMonoidHom.toNatLinearMap
invFun := LinearMap.toAddMonoidHom
map_add' _ _ := rfl
map_smul' _ _ := rfl
left_inv _ := rfl
right_inv _ := rfl
addMonoidHomLequivInt
definition
{A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
[Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B where
toFun := AddMonoidHom.toIntLinearMap
invFun := LinearMap.toAddMonoidHom
map_add' _ _ := rfl
map_smul' _ _ := rfl
left_inv _ := rfl
right_inv _ := rfl
addMonoidEndRingEquivInt
definition
(A : Type*) [AddCommGroup A] : AddMonoid.End A ≃+* Module.End ℤ A
/-- Ring equivalence between additive group endomorphisms of an `AddCommGroup` `A` and
`ℤ`-module endomorphisms of `A.` -/
@[simps] def addMonoidEndRingEquivInt (A : Type*) [AddCommGroup A] :
AddMonoid.EndAddMonoid.End A ≃+* Module.End ℤ A :=
{ addMonoidHomLequivInt (B := A) ℤ with
map_mul' := fun _ _ ↦ rfl }
LinearEquiv.instZero
instance
: Zero (M ≃ₛₗ[σ₁₂] M₂)
/-- Between two zero modules, the zero map is an equivalence. -/
instance : Zero (M ≃ₛₗ[σ₁₂] M₂) :=
⟨{ (0 : M →ₛₗ[σ₁₂] M₂) with
toFun := 0
invFun := 0
right_inv := Subsingleton.elim _
left_inv := Subsingleton.elim _ }⟩
LinearEquiv.zero_symm
theorem
: (0 : M ≃ₛₗ[σ₁₂] M₂).symm = 0
@[simp]
theorem zero_symm : (0 : M ≃ₛₗ[σ₁₂] M₂).symm = 0 :=
rfl
LinearEquiv.coe_zero
theorem
: ⇑(0 : M ≃ₛₗ[σ₁₂] M₂) = 0
@[simp]
theorem coe_zero : ⇑(0 : M ≃ₛₗ[σ₁₂] M₂) = 0 :=
rfl
LinearEquiv.zero_apply
theorem
(x : M) : (0 : M ≃ₛₗ[σ₁₂] M₂) x = 0
theorem zero_apply (x : M) : (0 : M ≃ₛₗ[σ₁₂] M₂) x = 0 :=
rfl
LinearEquiv.instUnique
instance
: Unique (M ≃ₛₗ[σ₁₂] M₂)
/-- Between two zero modules, the zero map is the only equivalence. -/
instance : Unique (M ≃ₛₗ[σ₁₂] M₂) where
uniq _ := toLinearMap_injective (Subsingleton.elim _ _)
default := 0
LinearEquiv.uniqueOfSubsingleton
instance
[Subsingleton R] [Subsingleton R₂] : Unique (M ≃ₛₗ[σ₁₂] M₂)
instance uniqueOfSubsingleton [Subsingleton R] [Subsingleton R₂] : Unique (M ≃ₛₗ[σ₁₂] M₂) := by
haveI := Module.subsingleton R M
haveI := Module.subsingleton R₂ M₂
infer_instance
LinearEquiv.curry
definition
: (V × V₂ → M) ≃ₗ[R] V → V₂ → M
/-- Linear equivalence between a curried and uncurried function.
Differs from `TensorProduct.curry`. -/
protected def curry : (V × V₂ → M) ≃ₗ[R] V → V₂ → M :=
{ Equiv.curry _ _ _ with
map_add' := fun _ _ ↦ rfl
map_smul' := fun _ _ ↦ rfl }
LinearEquiv.coe_curry
theorem
: ⇑(LinearEquiv.curry R M V V₂) = curry
@[simp]
theorem coe_curry : ⇑(LinearEquiv.curry R M V V₂) = curry :=
rfl
LinearEquiv.coe_curry_symm
theorem
: ⇑(LinearEquiv.curry R M V V₂).symm = uncurry
@[simp]
theorem coe_curry_symm : ⇑(LinearEquiv.curry R M V V₂).symm = uncurry :=
rfl
LinearEquiv.ofLinear
definition
(h₁ : f.comp g = LinearMap.id) (h₂ : g.comp f = LinearMap.id) : M ≃ₛₗ[σ₁₂] M₂
/-- If a linear map has an inverse, it is a linear equivalence. -/
def ofLinear (h₁ : f.comp g = LinearMap.id) (h₂ : g.comp f = LinearMap.id) : M ≃ₛₗ[σ₁₂] M₂ :=
{ f with
invFun := g
left_inv := LinearMap.ext_iff.1 h₂
right_inv := LinearMap.ext_iff.1 h₁ }
LinearEquiv.ofLinear_apply
theorem
{h₁ h₂} (x : M) : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂) x = f x
@[simp]
theorem ofLinear_apply {h₁ h₂} (x : M) : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂) x = f x :=
rfl
LinearEquiv.ofLinear_symm_apply
theorem
{h₁ h₂} (x : M₂) : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm x = g x
@[simp]
theorem ofLinear_symm_apply {h₁ h₂} (x : M₂) : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm x = g x :=
rfl
LinearEquiv.ofLinear_toLinearMap
theorem
{h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂) = f
@[simp]
theorem ofLinear_toLinearMap {h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂) = f := rfl
LinearEquiv.ofLinear_symm_toLinearMap
theorem
{h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm = g
@[simp]
theorem ofLinear_symm_toLinearMap {h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm = g := rfl
LinearEquiv.neg
definition
: M ≃ₗ[R] M
/-- `x ↦ -x` as a `LinearEquiv` -/
def neg : M ≃ₗ[R] M :=
{ Equiv.neg M, (-LinearMap.id : M →ₗ[R] M) with }
LinearEquiv.coe_neg
theorem
: ⇑(neg R : M ≃ₗ[R] M) = -id
LinearEquiv.neg_apply
theorem
(x : M) : neg R x = -x
LinearEquiv.symm_neg
theorem
: (neg R : M ≃ₗ[R] M).symm = neg R
LinearEquiv.arrowCongrAddEquiv
definition
(e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃+ (M₂ →ₗ[R] M₂₂)
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives an
additive isomorphism between the two function spaces.
See also `LinearEquiv.arrowCongr` for the linear version of this isomorphism. -/
@[simps] def arrowCongrAddEquiv (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) :
(M₁ →ₗ[R] M₂₁) ≃+ (M₂ →ₗ[R] M₂₂) where
toFun f := e₂.comp (f.comp e₁.symm.toLinearMap)
invFun f := e₂.symm.comp (f.comp e₁.toLinearMap)
left_inv f := by
ext x
simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
right_inv f := by
ext x
simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
map_add' f g := by
ext x
simp only [map_add, add_apply, Function.comp_apply, coe_comp, coe_coe]
LinearEquiv.domMulActCongrRight
definition
[Semiring S] [Module S M₁] [SMulCommClass R S M₁] (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[Sᵈᵐᵃ] (M₁ →ₗ[R] M₂₂)
/-- A linear isomorphism between the domains an codomains of two spaces of linear maps gives a
linear isomorphism with respect to an action on the domains. -/
@[simps] def domMulActCongrRight [Semiring S] [Module S M₁] [SMulCommClass R S M₁]
(e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[Sᵈᵐᵃ] (M₁ →ₗ[R] M₂₂) where
__ := arrowCongrAddEquiv (.refl ..) e₂
map_smul' := DomMulAct.mk.forall_congr_right.mp fun _ _ ↦ by ext; simp
LinearEquiv.conjRingEquiv
definition
(e : M₁ ≃ₗ[R] M₂) : Module.End R M₁ ≃+* Module.End R M₂
/-- If `M` and `M₂` are linearly isomorphic then the endomorphism rings of `M` and `M₂`
are isomorphic.
See `LinearEquiv.conj` for the linear version of this isomorphism. -/
@[simps!] def conjRingEquiv (e : M₁ ≃ₗ[R] M₂) : Module.EndModule.End R M₁ ≃+* Module.End R M₂ where
__ := arrowCongrAddEquiv e e
map_mul' _ _ := by ext; simp [arrowCongrAddEquiv]
LinearEquiv.smulOfUnit
definition
(a : Rˣ) : M ≃ₗ[R] M
/-- Multiplying by a unit `a` of the ring `R` is a linear equivalence. -/
def smulOfUnit (a : Rˣ) : M ≃ₗ[R] M :=
DistribMulAction.toLinearEquiv R M a
LinearEquiv.arrowCongr
definition
{R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₂₁]
[AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂)
(e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces.
See `LinearEquiv.arrowCongrAddEquiv` for the additive version of this isomorphism that works
over a not necessarily commutative semiring. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
[AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
[Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂ where
__ := arrowCongrAddEquiv e₁ e₂
map_smul' c f := by ext; simp [arrowCongrAddEquiv]
LinearEquiv.arrowCongr_apply
theorem
{R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₂₁]
[AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂)
(f : M₁ →ₗ[R] M₂₁) (x : M₂) : arrowCongr e₁ e₂ f x = e₂ (f (e₁.symm x))
@[simp]
theorem arrowCongr_apply {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁]
[AddCommMonoid M₂] [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂]
[Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) (f : M₁ →ₗ[R] M₂₁)
(x : M₂) : arrowCongr e₁ e₂ f x = e₂ (f (e₁.symm x)) :=
rfl
LinearEquiv.arrowCongr_symm_apply
theorem
{R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂] [AddCommMonoid M₂₁]
[AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂)
(f : M₂ →ₗ[R] M₂₂) (x : M₁) : (arrowCongr e₁ e₂).symm f x = e₂.symm (f (e₁ x))
@[simp]
theorem arrowCongr_symm_apply {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁]
[AddCommMonoid M₂] [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂]
[Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) (f : M₂ →ₗ[R] M₂₂)
(x : M₁) : (arrowCongr e₁ e₂).symm f x = e₂.symm (f (e₁ x)) :=
rfl
LinearEquiv.arrowCongr_comp
theorem
{N N₂ N₃ : Sort _} [AddCommMonoid N] [AddCommMonoid N₂] [AddCommMonoid N₃] [Module R N] [Module R N₂] [Module R N₃]
(e₁ : M ≃ₗ[R] N) (e₂ : M₂ ≃ₗ[R] N₂) (e₃ : M₃ ≃ₗ[R] N₃) (f : M →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) :
arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f)
theorem arrowCongr_comp {N N₂ N₃ : Sort _} [AddCommMonoid N] [AddCommMonoid N₂] [AddCommMonoid N₃]
[Module R N] [Module R N₂] [Module R N₃] (e₁ : M ≃ₗ[R] N) (e₂ : M₂ ≃ₗ[R] N₂) (e₃ : M₃ ≃ₗ[R] N₃)
(f : M →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) :
arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f) := by
ext
simp only [symm_apply_apply, arrowCongr_apply, LinearMap.comp_apply]
LinearEquiv.arrowCongr_trans
theorem
{M₁ M₂ M₃ N₁ N₂ N₃ : Sort _} [AddCommMonoid M₁] [Module R M₁] [AddCommMonoid M₂] [Module R M₂] [AddCommMonoid M₃]
[Module R M₃] [AddCommMonoid N₁] [Module R N₁] [AddCommMonoid N₂] [Module R N₂] [AddCommMonoid N₃] [Module R N₃]
(e₁ : M₁ ≃ₗ[R] M₂) (e₂ : N₁ ≃ₗ[R] N₂) (e₃ : M₂ ≃ₗ[R] M₃) (e₄ : N₂ ≃ₗ[R] N₃) :
(arrowCongr e₁ e₂).trans (arrowCongr e₃ e₄) = arrowCongr (e₁.trans e₃) (e₂.trans e₄)
theorem arrowCongr_trans {M₁ M₂ M₃ N₁ N₂ N₃ : Sort _} [AddCommMonoid M₁] [Module R M₁]
[AddCommMonoid M₂] [Module R M₂] [AddCommMonoid M₃] [Module R M₃] [AddCommMonoid N₁]
[Module R N₁] [AddCommMonoid N₂] [Module R N₂] [AddCommMonoid N₃] [Module R N₃]
(e₁ : M₁ ≃ₗ[R] M₂) (e₂ : N₁ ≃ₗ[R] N₂) (e₃ : M₂ ≃ₗ[R] M₃) (e₄ : N₂ ≃ₗ[R] N₃) :
(arrowCongr e₁ e₂).trans (arrowCongr e₃ e₄) = arrowCongr (e₁.trans e₃) (e₂.trans e₄) :=
rfl
LinearEquiv.congrRight
definition
(f : M₂ ≃ₗ[R] M₃) : (M →ₗ[R] M₂) ≃ₗ[R] M →ₗ[R] M₃
/-- 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. -/
def congrRight (f : M₂ ≃ₗ[R] M₃) : (M →ₗ[R] M₂) ≃ₗ[R] M →ₗ[R] M₃ :=
arrowCongr (LinearEquiv.refl R M) f
LinearEquiv.conj
definition
(e : M ≃ₗ[R] M₂) : Module.End R M ≃ₗ[R] Module.End R M₂
/-- If `M` and `M₂` are linearly isomorphic then the two spaces of linear maps from `M` and `M₂` to
themselves are linearly isomorphic.
See `LinearEquiv.conjRingEquiv` for the isomorphism between endomorphism rings,
which works over a not necessarily commutative semiring. -/
-- TODO: upgrade to AlgEquiv (but this file currently cannot import AlgEquiv)
def conj (e : M ≃ₗ[R] M₂) : Module.EndModule.End R M ≃ₗ[R] Module.End R M₂ :=
arrowCongr e e
LinearEquiv.conj_apply
theorem
(e : M ≃ₗ[R] M₂) (f : Module.End R M) : e.conj f = ((↑e : M →ₗ[R] M₂).comp f).comp (e.symm : M₂ →ₗ[R] M)
theorem conj_apply (e : M ≃ₗ[R] M₂) (f : Module.End R M) :
e.conj f = ((↑e : M →ₗ[R] M₂).comp f).comp (e.symm : M₂ →ₗ[R] M) :=
rfl
LinearEquiv.conj_apply_apply
theorem
(e : M ≃ₗ[R] M₂) (f : Module.End R M) (x : M₂) : e.conj f x = e (f (e.symm x))
theorem conj_apply_apply (e : M ≃ₗ[R] M₂) (f : Module.End R M) (x : M₂) :
e.conj f x = e (f (e.symm x)) :=
rfl
LinearEquiv.symm_conj_apply
theorem
(e : M ≃ₗ[R] M₂) (f : Module.End R M₂) : e.symm.conj f = ((↑e.symm : M₂ →ₗ[R] M).comp f).comp (e : M →ₗ[R] M₂)
theorem symm_conj_apply (e : M ≃ₗ[R] M₂) (f : Module.End R M₂) :
e.symm.conj f = ((↑e.symm : M₂ →ₗ[R] M).comp f).comp (e : M →ₗ[R] M₂) :=
rfl
LinearEquiv.conj_comp
theorem
(e : M ≃ₗ[R] M₂) (f g : Module.End R M) : e.conj (g.comp f) = (e.conj g).comp (e.conj f)
theorem conj_comp (e : M ≃ₗ[R] M₂) (f g : Module.End R M) :
e.conj (g.comp f) = (e.conj g).comp (e.conj f) :=
arrowCongr_comp e e e f g
LinearEquiv.conj_trans
theorem
(e₁ : M ≃ₗ[R] M₂) (e₂ : M₂ ≃ₗ[R] M₃) : e₁.conj.trans e₂.conj = (e₁.trans e₂).conj
theorem conj_trans (e₁ : M ≃ₗ[R] M₂) (e₂ : M₂ ≃ₗ[R] M₃) :
e₁.conj.trans e₂.conj = (e₁.trans e₂).conj :=
rfl
LinearEquiv.conj_id
theorem
(e : M ≃ₗ[R] M₂) : e.conj LinearMap.id = LinearMap.id
@[simp]
theorem conj_id (e : M ≃ₗ[R] M₂) : e.conj LinearMap.id = LinearMap.id := by
ext
simp [conj_apply]
LinearEquiv.conj_refl
theorem
(f : Module.End R M) : (refl R M).conj f = f
@[simp]
theorem conj_refl (f : Module.End R M) : (refl R M).conj f = f := rfl
LinearEquiv.congrLeft
definition
{R} (S) [Semiring R] [Semiring S] [Module R M₂] [Module R M₃] [Module R M] [Module S M] [SMulCommClass R S M]
(e : M₂ ≃ₗ[R] M₃) : (M₂ →ₗ[R] M) ≃ₗ[S] (M₃ →ₗ[R] M)
/-- 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. -/
def congrLeft {R} (S) [Semiring R] [Semiring S] [Module R M₂] [Module R M₃] [Module R M]
[Module S M] [SMulCommClass R S M] (e : M₂ ≃ₗ[R] M₃) : (M₂ →ₗ[R] M) ≃ₗ[S] (M₃ →ₗ[R] M) where
__ := e.arrowCongrAddEquiv (.refl ..)
map_smul' _ _ := rfl
LinearEquiv.smulOfNeZero
definition
(a : K) (ha : a ≠ 0) : M ≃ₗ[K] M
/-- Multiplying by a nonzero element `a` of the field `K` is a linear equivalence. -/
@[simps!]
def smulOfNeZero (a : K) (ha : a ≠ 0) : M ≃ₗ[K] M :=
smulOfUnit <| Units.mk0 a ha
Equiv.toLinearEquiv
definition
(e : M ≃ M₂) (h : IsLinearMap R (e : M → M₂)) : M ≃ₗ[R] M₂
/-- An equivalence whose underlying function is linear is a linear equivalence. -/
def toLinearEquiv (e : M ≃ M₂) (h : IsLinearMap R (e : M → M₂)) : M ≃ₗ[R] M₂ :=
{ e, h.mk' e with }
LinearMap.funLeft
definition
(f : m → n) : (n → M) →ₗ[R] m → M
/-- Given an `R`-module `M` and a function `m → n` between arbitrary types,
construct a linear map `(n → M) →ₗ[R] (m → M)` -/
def funLeft (f : m → n) : (n → M) →ₗ[R] m → M where
toFun := (· ∘ f)
map_add' _ _ := rfl
map_smul' _ _ := rfl
LinearMap.funLeft_apply
theorem
(f : m → n) (g : n → M) (i : m) : funLeft R M f g i = g (f i)
@[simp]
theorem funLeft_apply (f : m → n) (g : n → M) (i : m) : funLeft R M f g i = g (f i) :=
rfl
LinearMap.funLeft_id
theorem
(g : n → M) : funLeft R M _root_.id g = g
@[simp]
theorem funLeft_id (g : n → M) : funLeft R M _root_.id g = g :=
rfl
LinearMap.funLeft_comp
theorem
(f₁ : n → p) (f₂ : m → n) : funLeft R M (f₁ ∘ f₂) = (funLeft R M f₂).comp (funLeft R M f₁)
LinearMap.funLeft_surjective_of_injective
theorem
(f : m → n) (hf : Injective f) : Surjective (funLeft R M f)
theorem funLeft_surjective_of_injective (f : m → n) (hf : Injective f) :
Surjective (funLeft R M f) :=
hf.surjective_comp_right
LinearMap.funLeft_injective_of_surjective
theorem
(f : m → n) (hf : Surjective f) : Injective (funLeft R M f)
theorem funLeft_injective_of_surjective (f : m → n) (hf : Surjective f) :
Injective (funLeft R M f) :=
hf.injective_comp_right
LinearEquiv.funCongrLeft
definition
(e : m ≃ n) : (n → M) ≃ₗ[R] m → M
/-- Given an `R`-module `M` and an equivalence `m ≃ n` between arbitrary types,
construct a linear equivalence `(n → M) ≃ₗ[R] (m → M)` -/
def funCongrLeft (e : m ≃ n) : (n → M) ≃ₗ[R] m → M :=
LinearEquiv.ofLinear (funLeft R M e) (funLeft R M e.symm)
(LinearMap.ext fun x ↦
funext fun i ↦ by rw [id_apply, ← funLeft_comp, Equiv.symm_comp_self, LinearMap.funLeft_id])
(LinearMap.ext fun x ↦
funext fun i ↦ by rw [id_apply, ← funLeft_comp, Equiv.self_comp_symm, LinearMap.funLeft_id])
LinearEquiv.funCongrLeft_apply
theorem
(e : m ≃ n) (x : n → M) : funCongrLeft R M e x = funLeft R M e x
@[simp]
theorem funCongrLeft_apply (e : m ≃ n) (x : n → M) : funCongrLeft R M e x = funLeft R M e x :=
rfl
LinearEquiv.funCongrLeft_id
theorem
: funCongrLeft R M (Equiv.refl n) = LinearEquiv.refl R (n → M)
@[simp]
theorem funCongrLeft_id : funCongrLeft R M (Equiv.refl n) = LinearEquiv.refl R (n → M) :=
rfl
LinearEquiv.funCongrLeft_comp
theorem
(e₁ : m ≃ n) (e₂ : n ≃ p) :
funCongrLeft R M (Equiv.trans e₁ e₂) = LinearEquiv.trans (funCongrLeft R M e₂) (funCongrLeft R M e₁)
@[simp]
theorem funCongrLeft_comp (e₁ : m ≃ n) (e₂ : n ≃ p) :
funCongrLeft R M (Equiv.trans e₁ e₂) =
LinearEquiv.trans (funCongrLeft R M e₂) (funCongrLeft R M e₁) :=
rfl
LinearEquiv.funCongrLeft_symm
theorem
(e : m ≃ n) : (funCongrLeft R M e).symm = funCongrLeft R M e.symm
@[simp]
theorem funCongrLeft_symm (e : m ≃ n) : (funCongrLeft R M e).symm = funCongrLeft R M e.symm :=
rfl
LinearEquiv.sumPiEquivProdPi
definition
(R : Type*) [Semiring R] (S T : Type*) (A : S ⊕ T → Type*) [∀ st, AddCommMonoid (A st)] [∀ st, Module R (A st)] :
(Π (st : S ⊕ T), A st) ≃ₗ[R] (Π (s : S), A (.inl s)) × (Π (t : T), A (.inr t))
/-- The product over `S ⊕ T` of a family of modules is isomorphic to the product of
(the product over `S`) and (the product over `T`).
This is `Equiv.sumPiEquivProdPi` as a `LinearEquiv`.
-/
@[simps -fullyApplied +simpRhs]
def sumPiEquivProdPi (R : Type*) [Semiring R] (S T : Type*) (A : S ⊕ T → Type*)
[∀ st, AddCommMonoid (A st)] [∀ st, Module R (A st)] :
(Π (st : S ⊕ T), A st) ≃ₗ[R] (Π (s : S), A (.inl s)) × (Π (t : T), A (.inr t)) where
__ := Equiv.sumPiEquivProdPi _
map_add' _ _ := rfl
map_smul' _ _ := rfl
LinearEquiv.piUnique
definition
{α : Type*} [Unique α] (R : Type*) [Semiring R] (f : α → Type*) [∀ x, AddCommMonoid (f x)] [∀ x, Module R (f x)] :
(Π t : α, f t) ≃ₗ[R] f default
/-- The product `Π t : α, f t` of a family of modules is linearly isomorphic to the module
`f ⬝` when `α` only contains `⬝`.
This is `Equiv.piUnique` as a `LinearEquiv`.
-/
@[simps -fullyApplied]
def piUnique {α : Type*} [Unique α] (R : Type*) [Semiring R] (f : α → Type*)
[∀ x, AddCommMonoid (f x)] [∀ x, Module R (f x)] : (Π t : α, f t) ≃ₗ[R] f default where
__ := Equiv.piUnique _
map_add' _ _ := rfl
map_smul' _ _ := rfl