Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit d98b8e0

Browse files
committed
feat(linear_algebra/bilinear_map): semilinearize bilinear maps (#10373)
This PR generalizes most of `linear_algebra/bilinear_map` to semilinear maps. Along the way, we introduce an instance for `module S (E →ₛₗ[σ] F)`, with `σ : R →+* S`. This allows us to define "semibilinear" maps of type `E →ₛₗ[σ] F →ₛₗ[ρ] G`, where `E`, `F` and `G` are modules over `R₁`, `R₂` and `R₃` respectively, and `σ : R₁ →+* R₃` and `ρ : R₂ →+* R₃`. See `mk₂'ₛₗ` to see how to construct such a map. Co-authored-by: Frédéric Dupuis <31101893+dupuisf@users.noreply.github.com>
1 parent 8f07d75 commit d98b8e0

File tree

2 files changed

+121
-68
lines changed

2 files changed

+121
-68
lines changed

src/algebra/module/linear_map.lean

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ open_locale big_operators
5757

5858
universes u u' v w x y z
5959
variables {R : Type*} {R₁ : Type*} {R₂ : Type*} {R₃ : Type*}
60-
variables {k : Type*} {S : Type*} {T : Type*}
60+
variables {k : Type*} {S : Type*} {S₃ : Type*} {T : Type*}
6161
variables {M : Type*} {M₁ : Type*} {M₂ : Type*} {M₃ : Type*}
6262
variables {N₁ : Type*} {N₂ : Type*} {N₃ : Type*} {ι : Type*}
6363

@@ -585,56 +585,62 @@ instance : add_comm_group (M →ₛₗ[σ₁₂] N₂) :=
585585

586586
end arithmetic
587587

588-
-- TODO: generalize this section to semilinear maps where possible
589588
section actions
590589

591-
variables [semiring R] [add_comm_monoid M] [add_comm_monoid M₂] [add_comm_monoid M₃]
592-
variables [module R M] [module R M₂] [module R M₃]
590+
variables [semiring R] [semiring R₂] [semiring R₃]
591+
variables [add_comm_monoid M] [add_comm_monoid M₂] [add_comm_monoid M₃]
592+
variables [module R M] [module R₂ M₂] [module R₃ M₃]
593+
variables {σ₁₂ : R →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : R →+* R₃} [ring_hom_comp_triple σ₁₂ σ₂₃ σ₁₃]
593594

594595
section has_scalar
595-
variables [monoid S] [distrib_mul_action S M₂] [smul_comm_class R S M₂]
596-
variables [monoid T] [distrib_mul_action T M₂] [smul_comm_class R T M₂]
596+
variables [monoid S] [distrib_mul_action S M₂] [smul_comm_class R₂ S M₂]
597+
variables [monoid S₃] [distrib_mul_action S₃ M₃] [smul_comm_class R₃ S₃ M₃]
598+
variables [monoid T] [distrib_mul_action T M₂] [smul_comm_class R₂ T M₂]
597599

598-
instance : has_scalar S (M →ₗ[R] M₂) :=
600+
instance : has_scalar S (M →ₛₗ[σ₁₂] M₂) :=
599601
⟨λ a f, { to_fun := a • f,
600602
map_add' := λ x y, by simp only [pi.smul_apply, f.map_add, smul_add],
601-
map_smul' := λ c x, by simp [pi.smul_apply, f.map_smul, smul_comm c] }⟩
603+
map_smul' := λ c x, by simp [pi.smul_apply, smul_comm (σ₁₂ c)] }⟩
602604

603-
@[simp] lemma smul_apply (a : S) (f : M →ₗ[R] M₂) (x : M) : (a • f) x = a • f x := rfl
605+
@[simp] lemma smul_apply (a : S) (f : M →ₛₗ[σ₁₂] M₂) (x : M) : (a • f) x = a • f x := rfl
604606

605-
lemma coe_smul (a : S) (f : M →ₗ[R] M₂) : ⇑(a • f) = a • f := rfl
607+
lemma coe_smul (a : S) (f : M →ₛₗ[σ₁₂] M₂) : ⇑(a • f) = a • f := rfl
606608

607-
instance [smul_comm_class S T M₂] : smul_comm_class S T (M →ₗ[R] M₂) :=
609+
instance [smul_comm_class S T M₂] : smul_comm_class S T (M →ₛₗ[σ₁₂] M₂) :=
608610
⟨λ a b f, ext $ λ x, smul_comm _ _ _⟩
609611

610612
-- example application of this instance: if S -> T -> R are homomorphisms of commutative rings and
611613
-- M and M₂ are R-modules then the S-module and T-module structures on Hom_R(M,M₂) are compatible.
612-
instance [has_scalar S T] [is_scalar_tower S T M₂] : is_scalar_tower S T (M →ₗ[R] M₂) :=
614+
instance [has_scalar S T] [is_scalar_tower S T M₂] : is_scalar_tower S T (M →ₛₗ[σ₁₂] M₂) :=
613615
{ smul_assoc := λ _ _ _, ext $ λ _, smul_assoc _ _ _ }
614616

615-
instance : distrib_mul_action S (M →ₗ[R] M₂) :=
617+
instance : distrib_mul_action S (M →ₛₗ[σ₁₂] M₂) :=
616618
{ one_smul := λ f, ext $ λ _, one_smul _ _,
617619
mul_smul := λ c c' f, ext $ λ _, mul_smul _ _ _,
618620
smul_add := λ c f g, ext $ λ x, smul_add _ _ _,
619621
smul_zero := λ c, ext $ λ x, smul_zero _ }
620622

621-
theorem smul_comp (a : S) (g : M₃ →ₗ[R] M₂) (f : M →ₗ[R] M₃) : (a • g).comp f = a • (g.comp f) :=
622-
rfl
623+
include σ₁₃
624+
theorem smul_comp (a : S₃) (g : M₂ →ₛₗ[σ₂₃] M₃) (f : M →ₛₗ[σ₁₂] M₂) :
625+
(a • g).comp f = a • (g.comp f) := rfl
626+
omit σ₁₃
623627

624-
theorem comp_smul [distrib_mul_action S M₃] [smul_comm_class R S M₃] [compatible_smul M₃ M₂ S R]
628+
-- TODO: generalize this to semilinear maps
629+
theorem comp_smul [module R M₂] [module R M₃] [smul_comm_class R S M₂] [distrib_mul_action S M₃]
630+
[smul_comm_class R S M₃] [compatible_smul M₃ M₂ S R]
625631
(g : M₃ →ₗ[R] M₂) (a : S) (f : M →ₗ[R] M₃) : g.comp (a • f) = a • (g.comp f) :=
626632
ext $ λ x, g.map_smul_of_tower _ _
627633

628634
end has_scalar
629635

630636
section module
631-
variables [semiring S] [module S M₂] [smul_comm_class R S M₂]
637+
variables [semiring S] [module S M₂] [smul_comm_class R S M₂]
632638

633-
instance : module S (M →ₗ[R] M₂) :=
639+
instance : module S (M →ₛₗ[σ₁₂] M₂) :=
634640
{ add_smul := λ a b f, ext $ λ x, add_smul _ _ _,
635641
zero_smul := λ f, ext $ λ x, zero_smul _ _ }
636642

637-
instance [no_zero_smul_divisors S M₂] : no_zero_smul_divisors S (M →ₗ[R] M₂) :=
643+
instance [no_zero_smul_divisors S M₂] : no_zero_smul_divisors S (M →ₛₗ[σ₁₂] M₂) :=
638644
coe_injective.no_zero_smul_divisors _ rfl coe_smul
639645

640646
end module

src/linear_algebra/bilinear_map.lean

Lines changed: 96 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import linear_algebra.basic
99
/-!
1010
# Basics on bilinear maps
1111
12-
This file provides basics on bilinear maps.
12+
This file provides basics on bilinear maps. The most general form considered are maps that are
13+
semilinear in both arguments. They are of type `M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P`, where `M` and `N`
14+
are modules over `R` and `S` respectively, `P` is a module over both `R₂` and `S₂` with
15+
commuting actions, and `ρ₁₂ : R →+* R₂` and `σ₁₂ : S →+* S₂`.
1316
1417
## Main declarations
1518
@@ -30,35 +33,55 @@ namespace linear_map
3033

3134
section semiring
3235

36+
-- the `ₗ` subscript variables are for special cases about linear (as opposed to semilinear) maps
3337
variables {R : Type*} [semiring R] {S : Type*} [semiring S]
38+
variables {R₂ : Type*} [semiring R₂] {S₂ : Type*} [semiring S₂]
3439
variables {M : Type*} {N : Type*} {P : Type*}
40+
variables {Nₗ : Type*} {Pₗ : Type*}
3541
variables {M' : Type*} {N' : Type*} {P' : Type*}
3642

3743
variables [add_comm_monoid M] [add_comm_monoid N] [add_comm_monoid P]
44+
variables [add_comm_monoid Nₗ] [add_comm_monoid Pₗ]
3845
variables [add_comm_group M'] [add_comm_group N'] [add_comm_group P']
39-
variables [module R M] [module S N] [module R P] [module S P]
40-
variables [module R M'] [module S N'] [module R P'] [module S P']
41-
variables [smul_comm_class S R P] [smul_comm_class S R P']
42-
include R
46+
variables [module R M] [module S N] [module R₂ P] [module S₂ P]
47+
variables [module R Pₗ] [module S Pₗ]
48+
variables [module R M'] [module S N'] [module R₂ P'] [module S₂ P']
49+
variables [smul_comm_class S₂ R₂ P] [smul_comm_class S R Pₗ] [smul_comm_class S₂ R₂ P']
50+
variables {ρ₁₂ : R →+* R₂} {σ₁₂ : S →+* S₂}
51+
52+
variables (ρ₁₂ σ₁₂)
53+
/-- Create a bilinear map from a function that is semilinear in each component.
54+
See `mk₂'` and `mk₂` for the linear case. -/
55+
def mk₂'ₛₗ (f : M → N → P)
56+
(H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
57+
(H2 : ∀ (c:R) m n, f (c • m) n = (ρ₁₂ c) • f m n)
58+
(H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
59+
(H4 : ∀ (c:S) m n, f m (c • n) = (σ₁₂ c) • f m n) : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P :=
60+
{ to_fun := λ m, { to_fun := f m, map_add' := H3 m, map_smul' := λ c, H4 c m},
61+
map_add' := λ m₁ m₂, linear_map.ext $ H1 m₁ m₂,
62+
map_smul' := λ c m, linear_map.ext $ H2 c m }
63+
variables {ρ₁₂ σ₁₂}
64+
65+
@[simp] theorem mk₂'ₛₗ_apply
66+
(f : M → N → P) {H1 H2 H3 H4} (m : M) (n : N) :
67+
(mk₂'ₛₗ ρ₁₂ σ₁₂ f H1 H2 H3 H4 : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) m n = f m n := rfl
4368

4469
variables (R S)
4570
/-- Create a bilinear map from a function that is linear in each component.
4671
See `mk₂` for the special case where both arguments come from modules over the same ring. -/
47-
def mk₂' (f : M → N → P)
72+
def mk₂' (f : M → N → Pₗ)
4873
(H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
4974
(H2 : ∀ (c:R) m n, f (c • m) n = c • f m n)
5075
(H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
51-
(H4 : ∀ (c:S) m n, f m (c • n) = c • f m n) : M →ₗ[R] N →ₗ[S] P :=
52-
{ to_fun := λ m, { to_fun := f m, map_add' := H3 m, map_smul' := λ c, H4 c m},
53-
map_add' := λ m₁ m₂, linear_map.ext $ H1 m₁ m₂,
54-
map_smul' := λ c m, linear_map.ext $ H2 c m }
76+
(H4 : ∀ (c:S) m n, f m (c • n) = c • f m n) : M →ₗ[R] N →ₗ[S] Pₗ :=
77+
mk₂'ₛₗ (ring_hom.id R) (ring_hom.id S) f H1 H2 H3 H4
5578
variables {R S}
5679

5780
@[simp] theorem mk₂'_apply
58-
(f : M → N → P) {H1 H2 H3 H4} (m : M) (n : N) :
59-
(mk₂' R S f H1 H2 H3 H4 : M →ₗ[R] N →ₗ[S] P) m n = f m n := rfl
81+
(f : M → N → Pₗ) {H1 H2 H3 H4} (m : M) (n : N) :
82+
(mk₂' R S f H1 H2 H3 H4 : M →ₗ[R] N →ₗ[S] Pₗ) m n = f m n := rfl
6083

61-
theorem ext₂ {f g : M →ₗ[R] N →ₗ[S] P}
84+
theorem ext₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P}
6285
(H : ∀ m n, f m n = g m n) : f = g :=
6386
linear_map.ext (λ m, linear_map.ext $ λ n, H m n)
6487

@@ -68,115 +91,139 @@ local attribute [instance] smul_comm_class.symm
6891

6992
/-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map from `M × N` to
7093
`P`, change the order of variables and get a linear map from `N` to linear maps from `M` to `P`. -/
71-
def flip (f : M →ₗ[R] N →ₗ[S] P) : N →ₗ[S] M →ₗ[R] P :=
72-
mk₂' S R (λ n m, f m n)
94+
def flip (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) : N →ₛₗ[σ₁₂] M →ₛₗ[ρ₁₂] P :=
95+
mk₂'ₛₗ σ₁₂ ρ₁₂ (λ n m, f m n)
7396
(λ n₁ n₂ m, (f m).map_add _ _)
74-
(λ c n m, (f m).map_smul _ _)
97+
(λ c n m, (f m).map_smulₛₗ _ _)
7598
(λ n m₁ m₂, by rw f.map_add; refl)
76-
(λ c n m, by rw f.map_smul; refl)
99+
(λ c n m, by rw f.map_smulₛₗ; refl)
77100

78101
end
79102

80-
@[simp] theorem flip_apply (f : M →ₗ[R] N →ₗ[S] P) (m : M) (n : N) : flip f n m = f m n := rfl
103+
@[simp] theorem flip_apply (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (m : M) (n : N) : flip f n m = f m n := rfl
81104

82105
open_locale big_operators
83106

84107
variables {R}
85-
theorem flip_inj {f g : M →ₗ[R] N →ₗ[S] P} (H : flip f = flip g) : f = g :=
108+
theorem flip_inj {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (H : flip f = flip g) : f = g :=
86109
ext₂ $ λ m n, show flip f n m = flip g n m, by rw H
87110

88-
theorem map_zero₂ (f : M →ₗ[R] N →ₗ[S] P) (y) : f 0 y = 0 :=
111+
theorem map_zero₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (y) : f 0 y = 0 :=
89112
(flip f y).map_zero
90113

91-
theorem map_neg₂ (f : M' →ₗ[R] N →ₗ[S] P') (x y) : f (-x) y = -f x y :=
114+
theorem map_neg₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y) : f (-x) y = -f x y :=
92115
(flip f y).map_neg _
93116

94-
theorem map_sub₂ (f : M' →ₗ[R] N →ₗ[S] P') (x y z) : f (x - y) z = f x z - f y z :=
117+
theorem map_sub₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y z) : f (x - y) z = f x z - f y z :=
95118
(flip f z).map_sub _ _
96119

97-
theorem map_add₂ (f : M →ₗ[R] N →ₗ[S] P) (x₁ x₂ y) : f (x₁ + x₂) y = f x₁ y + f x₂ y :=
120+
theorem map_add₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (x₁ x₂ y) : f (x₁ + x₂) y = f x₁ y + f x₂ y :=
98121
(flip f y).map_add _ _
99122

100-
theorem map_smul₂ (f : M →ₗ[R] N →ₗ[S] P) (r : R) (x y) : f (r • x) y = r • f x y :=
123+
theorem map_smul₂ (f : M →ₗ[R] N →ₗ[S] Pₗ) (r : R) (x y) : f (r • x) y = r • f x y :=
101124
(flip f y).map_smul _ _
102125

103-
theorem map_sum₂ {ι : Type*} (f : M →ₗ[R] N →ₗ[S] P) (t : finset ι) (x : ι → M) (y) :
126+
theorem map_smulₛₗ₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (r : R) (x y) : f (r • x) y = (ρ₁₂ r) • f x y :=
127+
(flip f y).map_smulₛₗ _ _
128+
129+
theorem map_sum₂ {ι : Type*} (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (t : finset ι) (x : ι → M) (y) :
104130
f (∑ i in t, x i) y = ∑ i in t, f (x i) y :=
105131
(flip f y).map_sum
106132

107133
end semiring
108134

109135
section comm_semiring
110136

111-
variables {R : Type*} [comm_semiring R]
137+
variables {R : Type*} [comm_semiring R] {R₂ : Type*} [comm_semiring R₂]
138+
variables {R₃ : Type*} [comm_semiring R₃] {R₄ : Type*} [comm_semiring R₄]
112139
variables {M : Type*} {N : Type*} {P : Type*} {Q : Type*}
140+
variables {Nₗ : Type*} {Pₗ : Type*} {Qₗ : Type*}
113141

114142
variables [add_comm_monoid M] [add_comm_monoid N] [add_comm_monoid P] [add_comm_monoid Q]
115-
variables [module R M] [module R N] [module R P] [module R Q]
143+
variables [add_comm_monoid Nₗ] [add_comm_monoid Pₗ] [add_comm_monoid Qₗ]
144+
variables [module R M] [module R₂ N] [module R₃ P] [module R₄ Q]
145+
variables [module R Nₗ] [module R Pₗ] [module R Qₗ]
146+
variables {σ₁₂ : R →+* R₂} {σ₂₃ : R₂ →+* R₃} {σ₁₃ : R →+* R₃}
147+
variables {σ₄₂ : R₄ →+* R₂} {σ₄₃ : R₄ →+* R₃}
148+
variables [ring_hom_comp_triple σ₁₂ σ₂₃ σ₁₃] [ring_hom_comp_triple σ₄₂ σ₂₃ σ₄₃]
116149

117150
variables (R)
118151

119152
/-- Create a bilinear map from a function that is linear in each component.
120153
121154
This is a shorthand for `mk₂'` for the common case when `R = S`. -/
122-
def mk₂ (f : M → NP)
155+
def mk₂ (f : M → NₗPₗ)
123156
(H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
124157
(H2 : ∀ (c:R) m n, f (c • m) n = c • f m n)
125158
(H3 : ∀ m n₁ n₂, f m (n₁ + n₂) = f m n₁ + f m n₂)
126-
(H4 : ∀ (c:R) m n, f m (c • n) = c • f m n) : M →ₗ[R] N →ₗ[R] P :=
159+
(H4 : ∀ (c:R) m n, f m (c • n) = c • f m n) : M →ₗ[R] Nₗ →ₗ[R] Pₗ :=
127160
mk₂' R R f H1 H2 H3 H4
128161

129162
@[simp] theorem mk₂_apply
130-
(f : M → NP) {H1 H2 H3 H4} (m : M) (n : N) :
131-
(mk₂ R f H1 H2 H3 H4 : M →ₗ[R] N →ₗ[R] P) m n = f m n := rfl
163+
(f : M → NₗPₗ) {H1 H2 H3 H4} (m : M) (n : Nₗ) :
164+
(mk₂ R f H1 H2 H3 H4 : M →ₗ[R] Nₗ →ₗ[R] Pₗ) m n = f m n := rfl
132165

133166
variables (R M N P)
134167
/-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map `M → N → P`,
135168
change the order of variables and get a linear map from `N` to linear maps from `M` to `P`. -/
136-
def lflip : (M →ₗ[R] N →ₗ[R] P) →ₗ[R] N →ₗ[R] M →ₗ[R] P :=
169+
def lflip : (M →ₛₗ[σ₁₃] N →ₛₗ[σ₂₃] P) →ₗ[R] N →ₛₗ[σ₂₃] M →ₛₗ[σ₁₃] P :=
137170
{ to_fun := flip, map_add' := λ _ _, rfl, map_smul' := λ _ _, rfl }
138171
variables {R M N P}
139172

140-
variables (f : M →ₗ[R] N →ₗ[R] P)
173+
variables (f : M →ₛₗ[σ₁₃] N →ₛₗ[σ₂₃] P)
141174

142175
@[simp] theorem lflip_apply (m : M) (n : N) : lflip R M N P f n m = f m n := rfl
143176

144-
variables (R P)
177+
variables (R Pₗ)
145178
/-- Composing a linear map `M → N` and a linear map `N → P` to form a linear map `M → P`. -/
146-
def lcomp (f : M →ₗ[R] N) : (N →ₗ[R] P) →ₗ[R] M →ₗ[R] P :=
179+
def lcomp (f : M →ₗ[R] Nₗ) : (Nₗ →ₗ[R] Pₗ) →ₗ[R] M →ₗ[R] Pₗ :=
147180
flip $ linear_map.comp (flip id) f
148181

149-
variables {R P}
182+
variables {R Pₗ}
150183

151-
@[simp] theorem lcomp_apply (f : M →ₗ[R] N) (g : N →ₗ[R] P) (x : M) :
152-
lcomp R P f g x = g (f x) := rfl
184+
@[simp] theorem lcomp_apply (f : M →ₗ[R] Nₗ) (g : Nₗ →ₗ[R] Pₗ) (x : M) :
185+
lcomp R Pₗ f g x = g (f x) := rfl
153186

154-
variables (R M N P)
187+
variables (P σ₂₃)
188+
/-- Composing a semilinear map `M → N` and a semilinear map `N → P` to form a semilinear map
189+
`M → P` is itself a linear map. -/
190+
def lcompₛₗ (f : M →ₛₗ[σ₁₂] N) : (N →ₛₗ[σ₂₃] P) →ₗ[R₃] M →ₛₗ[σ₁₃] P :=
191+
flip $ linear_map.comp (flip id) f
192+
variables {P σ₂₃}
193+
194+
include σ₁₃
195+
@[simp] theorem lcompₛₗ_apply (f : M →ₛₗ[σ₁₂] N) (g : N →ₛₗ[σ₂₃] P) (x : M) :
196+
lcompₛₗ P σ₂₃ f g x = g (f x) := rfl
197+
omit σ₁₃
198+
199+
variables (R M Nₗ Pₗ)
155200
/-- Composing a linear map `M → N` and a linear map `N → P` to form a linear map `M → P`. -/
156-
def llcomp : (N →ₗ[R] P) →ₗ[R] (M →ₗ[R] N) →ₗ[R] M →ₗ[R] P :=
157-
flip { to_fun := lcomp R P,
201+
def llcomp : (Nₗ →ₗ[R] Pₗ) →ₗ[R] (M →ₗ[R] Nₗ) →ₗ[R] M →ₗ[R] Pₗ :=
202+
flip { to_fun := lcomp R Pₗ,
158203
map_add' := λ f f', ext₂ $ λ g x, g.map_add _ _,
159204
map_smul' := λ (c : R) f, ext₂ $ λ g x, g.map_smul _ _ }
160-
variables {R M N P}
205+
variables {R M Nₗ Pₗ}
161206

162207
section
163-
@[simp] theorem llcomp_apply (f : N →ₗ[R] P) (g : M →ₗ[R] N) (x : M) :
164-
llcomp R M N P f g x = f (g x) := rfl
208+
@[simp] theorem llcomp_apply (f : Nₗ →ₗ[R] Pₗ) (g : M →ₗ[R] Nₗ) (x : M) :
209+
llcomp R M Nₗ Pₗ f g x = f (g x) := rfl
165210
end
166211

167212
/-- Composing a linear map `Q → N` and a bilinear map `M → N → P` to
168213
form a bilinear map `M → Q → P`. -/
169-
def compl₂ (g : Q →ₗ[R] N) : M →ₗ[R] Q →ₗ[R] P := (lcomp R _ g).comp f
214+
def compl₂ (g : Q →ₛₗ[σ₄₂] N) : M →ₛₗ[σ₁₃] Q →ₛₗ[σ₄₃] P := (lcompₛₗ _ _ g).comp f
170215

171-
@[simp] theorem compl₂_apply (g : Q →ₗ[R] N) (m : M) (q : Q) :
216+
include σ₄₃
217+
@[simp] theorem compl₂_apply (g : Q →ₛₗ[σ₄₂] N) (m : M) (q : Q) :
172218
f.compl₂ g m q = f m (g q) := rfl
219+
omit σ₄₃
173220

174221
/-- Composing a linear map `P → Q` and a bilinear map `M → N → P` to
175222
form a bilinear map `M → N → Q`. -/
176-
def compr₂ (g : P →ₗ[R] Q) : M →ₗ[R] N →ₗ[R] Q :=
177-
linear_map.comp (llcomp R N P Q g) f
223+
def compr₂ (f : M →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Pₗ →ₗ[R] Qₗ) : M →ₗ[R] Nₗ →ₗ[R] Qₗ :=
224+
(llcomp R Nₗ Pₗ Qₗ g) ∘ₗ f
178225

179-
@[simp] theorem compr₂_apply (g : P →ₗ[R] Q) (m : M) (n : N) :
226+
@[simp] theorem compr₂_apply (f : M →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Pₗ →ₗ[R] Qₗ) (m : M) (n : Nₗ) :
180227
f.compr₂ g m n = g (f m n) := rfl
181228

182229
variables (R M)

0 commit comments

Comments
 (0)