Skip to content

Commit 963a074

Browse files
committed
feat: port Algebra.Module.Algebra (#2370)
1 parent 1666fe0 commit 963a074

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import Mathlib.Algebra.Homology.ComplexShape
9797
import Mathlib.Algebra.IndicatorFunction
9898
import Mathlib.Algebra.Invertible
9999
import Mathlib.Algebra.IsPrimePow
100+
import Mathlib.Algebra.Module.Algebra
100101
import Mathlib.Algebra.Module.Basic
101102
import Mathlib.Algebra.Module.BigOperators
102103
import Mathlib.Algebra.Module.Equiv
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/-
2+
Copyright (c) 2022 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Scott Morrison
5+
6+
! This file was ported from Lean 3 source module algebra.module.algebra
7+
! leanprover-community/mathlib commit e97cf15cd1aec9bd5c193b2ffac5a6dc9118912b
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.Algebra.Module.Basic
12+
import Mathlib.Algebra.Algebra.Basic
13+
14+
/-!
15+
# Additional facts about modules over algebras.
16+
-/
17+
18+
19+
namespace LinearMap
20+
21+
section RestrictScalars
22+
23+
variable (k : Type _) [CommSemiring k] (A : Type _) [Semiring A] [Algebra k A]
24+
25+
variable (M : Type _) [AddCommMonoid M] [Module k M] [Module A M] [IsScalarTower k A M]
26+
27+
variable (N : Type _) [AddCommMonoid N] [Module k N] [Module A N] [IsScalarTower k A N]
28+
29+
/-- Restriction of scalars for linear maps between modules over a `k`-algebra is itself `k`-linear.
30+
-/
31+
@[simps]
32+
def restrictScalarsLinearMap : (M →ₗ[A] N) →ₗ[k] M →ₗ[k] N where
33+
toFun := LinearMap.restrictScalars k
34+
map_add' _ _ := rfl
35+
map_smul' _ _ := rfl
36+
#align linear_map.restrict_scalars_linear_map LinearMap.restrictScalarsLinearMap
37+
38+
end RestrictScalars
39+
40+
end LinearMap

0 commit comments

Comments
 (0)