-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Merged by Bors] - chore: rename SemilinearMapClass.semilinearMap to LinearMap.ofClass #43376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4996b16
351e453
6fd0951
6d0e811
22c4dea
a944082
38994ef
cb16955
4b21aa9
70efd45
b0a36e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,31 +158,20 @@ theorem map_smul_inv {σ' : S →+* R} [RingHomInvPair σ σ'] (c : S) (x : M) : | |
|
|
||
| /-- Reinterpret an element of a type of semilinear maps as a semilinear map. -/ | ||
| @[coe] | ||
| def semilinearMap : M →ₛₗ[σ] M₃ where | ||
| def _root_.LinearMap.ofClass : M →ₛₗ[σ] M₃ where | ||
| toFun := f | ||
| map_add' := map_add f | ||
| map_smul' := map_smulₛₗ f | ||
|
|
||
| /-- Reinterpret an element of a type of semilinear maps as a semilinear map. -/ | ||
| instance instCoeToSemilinearMap : CoeHead F (M →ₛₗ[σ] M₃) where | ||
| coe f := semilinearMap f | ||
| coe f := LinearMap.ofClass f | ||
|
|
||
| end SemilinearMapClass | ||
|
|
||
| namespace LinearMapClass | ||
| variable {F : Type*} [Semiring R] [AddCommMonoid M₁] [AddCommMonoid M₂] [Module R M₁] [Module R M₂] | ||
| (f : F) [FunLike F M₁ M₂] [LinearMapClass F R M₁ M₂] | ||
|
|
||
| /-- Reinterpret an element of a type of linear maps as a linear map. -/ | ||
| abbrev _root_.LinearMap.ofClass : M₁ →ₗ[R] M₂ := SemilinearMapClass.semilinearMap f | ||
|
|
||
| @[deprecated (since := "2026-09-03")] alias linearMap := LinearMap.ofClass | ||
|
|
||
| /-- Reinterpret an element of a type of linear maps as a linear map. -/ | ||
| instance instCoeToLinearMap : CoeHead F (M₁ →ₗ[R] M₂) where | ||
| coe f := SemilinearMapClass.semilinearMap f | ||
|
|
||
| end LinearMapClass | ||
| @[deprecated (since := "2026-09-03")] alias SemilinearMapClass.semilinearMap := | ||
| LinearMap.ofClass | ||
| @[deprecated (since := "2026-09-03")] alias LinearMapClass.linearMap := LinearMap.ofClass | ||
|
|
||
| namespace LinearMap | ||
|
|
||
|
|
@@ -210,10 +199,12 @@ instance semilinearMapClass : SemilinearMapClass (M →ₛₗ[σ] M₃) σ M M | |
| map_smulₛₗ := LinearMap.map_smul' | ||
|
|
||
| @[simp, norm_cast] | ||
| lemma coe_coe {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] {f : F} : | ||
| ⇑(f : M →ₛₗ[σ] M₃) = f := | ||
| lemma coe_ofClass {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] {f : F} : | ||
| ⇑(ofClass f) = f := | ||
| rfl | ||
|
|
||
| @[deprecated (since := "2026-09-07")] alias coe_coe := coe_ofClass | ||
|
|
||
| /-- The `DistribMulActionHom` underlying a `LinearMap`. -/ | ||
| def toDistribMulActionHom (f : M →ₛₗ[σ] M₃) : DistribMulActionHom σ.toMonoidHom M M₃ := | ||
| { f with map_zero' := show f 0 = 0 from map_zero f } | ||
|
|
@@ -254,17 +245,16 @@ theorem coe_addHom_mk {σ : R →+* S} (f : AddHom M M₃) (h) : | |
| ((LinearMap.mk f h : M →ₛₗ[σ] M₃) : AddHom M M₃) = f := | ||
| rfl | ||
|
|
||
| theorem coe_semilinearMap {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] (f : F) : | ||
| ((f : M →ₛₗ[σ] M₃) : M → M₃) = f := | ||
| rfl | ||
| @[deprecated (since := "2026-09-07")] alias coe_semilinearMap := coe_ofClass | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These statements were exact duplicates even before this PR. |
||
|
|
||
| theorem toLinearMap_injective {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] | ||
| {f g : F} (h : (f : M →ₛₗ[σ] M₃) = (g : M →ₛₗ[σ] M₃)) : | ||
| f = g := by | ||
| theorem ofClass_injective {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] | ||
| {f g : F} (h : ofClass f = ofClass g) : f = g := by | ||
| apply DFunLike.ext | ||
| intro m | ||
| exact DFunLike.congr_fun h m | ||
|
|
||
| @[deprecated (since := "2026-09-07")] alias toLinearMap_injective := ofClass_injective | ||
|
|
||
| /-- Identity map as a `LinearMap` -/ | ||
| @[instance_reducible] | ||
| def id : M →ₗ[R] M := | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -265,7 +265,7 @@ instance quotient (R) {A M} [Semiring R] [AddCommGroup M] [Ring A] [Module A M] | |
|
|
||
| /-- The range of a linear map from a finite module is finite. -/ | ||
| instance range [Module.Finite R M] (f : M →ₗ[R] N) : Module.Finite R f.range := | ||
| of_surjective (SemilinearMapClass.semilinearMap f).rangeRestrict | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This proof was just unnecessarily convoluted: the |
||
| of_surjective f.rangeRestrict | ||
| fun ⟨_, y, hy⟩ => ⟨y, Subtype.ext hy⟩ | ||
|
|
||
| /-- Pushforwards of finite submodules are finite. -/ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.