@@ -9,7 +9,10 @@ import linear_algebra.basic
9
9
/-!
10
10
# Basics on bilinear maps
11
11
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₂`.
13
16
14
17
## Main declarations
15
18
@@ -30,35 +33,55 @@ namespace linear_map
30
33
31
34
section semiring
32
35
36
+ -- the `ₗ` subscript variables are for special cases about linear (as opposed to semilinear) maps
33
37
variables {R : Type *} [semiring R] {S : Type *} [semiring S]
38
+ variables {R₂ : Type *} [semiring R₂] {S₂ : Type *} [semiring S₂]
34
39
variables {M : Type *} {N : Type *} {P : Type *}
40
+ variables {Nₗ : Type *} {Pₗ : Type *}
35
41
variables {M' : Type *} {N' : Type *} {P' : Type *}
36
42
37
43
variables [add_comm_monoid M] [add_comm_monoid N] [add_comm_monoid P]
44
+ variables [add_comm_monoid Nₗ] [add_comm_monoid Pₗ]
38
45
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
43
68
44
69
variables (R S)
45
70
/-- Create a bilinear map from a function that is linear in each component.
46
71
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ₗ )
48
73
(H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
49
74
(H2 : ∀ (c:R) m n, f (c • m) n = c • f m n)
50
75
(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
55
78
variables {R S}
56
79
57
80
@[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
60
83
61
- theorem ext₂ {f g : M →ₗ[R ] N →ₗ[S ] P}
84
+ theorem ext₂ {f g : M →ₛₗ[ρ₁₂ ] N →ₛₗ[σ₁₂ ] P}
62
85
(H : ∀ m n, f m n = g m n) : f = g :=
63
86
linear_map.ext (λ m, linear_map.ext $ λ n, H m n)
64
87
@@ -68,115 +91,139 @@ local attribute [instance] smul_comm_class.symm
68
91
69
92
/-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map from `M × N` to
70
93
`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)
73
96
(λ n₁ n₂ m, (f m).map_add _ _)
74
- (λ c n m, (f m).map_smul _ _)
97
+ (λ c n m, (f m).map_smulₛₗ _ _)
75
98
(λ 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)
77
100
78
101
end
79
102
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
81
104
82
105
open_locale big_operators
83
106
84
107
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 :=
86
109
ext₂ $ λ m n, show flip f n m = flip g n m, by rw H
87
110
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 :=
89
112
(flip f y).map_zero
90
113
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 :=
92
115
(flip f y).map_neg _
93
116
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 :=
95
118
(flip f z).map_sub _ _
96
119
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 :=
98
121
(flip f y).map_add _ _
99
122
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 :=
101
124
(flip f y).map_smul _ _
102
125
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) :
104
130
f (∑ i in t, x i) y = ∑ i in t, f (x i) y :=
105
131
(flip f y).map_sum
106
132
107
133
end semiring
108
134
109
135
section comm_semiring
110
136
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₄]
112
139
variables {M : Type *} {N : Type *} {P : Type *} {Q : Type *}
140
+ variables {Nₗ : Type *} {Pₗ : Type *} {Qₗ : Type *}
113
141
114
142
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 σ₄₂ σ₂₃ σ₄₃]
116
149
117
150
variables (R)
118
151
119
152
/-- Create a bilinear map from a function that is linear in each component.
120
153
121
154
This is a shorthand for `mk₂'` for the common case when `R = S`. -/
122
- def mk₂ (f : M → N → P )
155
+ def mk₂ (f : M → Nₗ → Pₗ )
123
156
(H1 : ∀ m₁ m₂ n, f (m₁ + m₂) n = f m₁ n + f m₂ n)
124
157
(H2 : ∀ (c:R) m n, f (c • m) n = c • f m n)
125
158
(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ₗ :=
127
160
mk₂' R R f H1 H2 H3 H4
128
161
129
162
@[simp] theorem mk₂_apply
130
- (f : M → N → P ) {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
132
165
133
166
variables (R M N P)
134
167
/-- Given a linear map from `M` to linear maps from `N` to `P`, i.e., a bilinear map `M → N → P`,
135
168
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 :=
137
170
{ to_fun := flip, map_add' := λ _ _, rfl, map_smul' := λ _ _, rfl }
138
171
variables {R M N P}
139
172
140
- variables (f : M →ₗ[R ] N →ₗ[R ] P)
173
+ variables (f : M →ₛₗ[σ₁₃ ] N →ₛₗ[σ₂₃ ] P)
141
174
142
175
@[simp] theorem lflip_apply (m : M) (n : N) : lflip R M N P f n m = f m n := rfl
143
176
144
- variables (R P )
177
+ variables (R Pₗ )
145
178
/-- 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ₗ :=
147
180
flip $ linear_map.comp (flip id) f
148
181
149
- variables {R P }
182
+ variables {R Pₗ }
150
183
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
153
186
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ₗ)
155
200
/-- 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ₗ ,
158
203
map_add' := λ f f', ext₂ $ λ g x, g.map_add _ _,
159
204
map_smul' := λ (c : R) f, ext₂ $ λ g x, g.map_smul _ _ }
160
- variables {R M N P }
205
+ variables {R M Nₗ Pₗ }
161
206
162
207
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
165
210
end
166
211
167
212
/-- Composing a linear map `Q → N` and a bilinear map `M → N → P` to
168
213
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
170
215
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) :
172
218
f.compl₂ g m q = f m (g q) := rfl
219
+ omit σ₄₃
173
220
174
221
/-- Composing a linear map `P → Q` and a bilinear map `M → N → P` to
175
222
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
178
225
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ₗ ) :
180
227
f.compr₂ g m n = g (f m n) := rfl
181
228
182
229
variables (R M)
0 commit comments