@@ -6,6 +6,8 @@ Authors: Andreas Swerdlow
6
6
import algebra.module.linear_map
7
7
import linear_algebra.bilinear_map
8
8
import linear_algebra.matrix.basis
9
+ import linear_algebra.dual
10
+ import linear_algebra.linear_pmap
9
11
10
12
/-!
11
13
# Sesquilinear form
@@ -52,24 +54,38 @@ variables [comm_semiring R] [comm_semiring R₁] [add_comm_monoid M₁] [module
52
54
/-- The proposition that two elements of a sesquilinear form space are orthogonal -/
53
55
def is_ortho (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R) (x y) : Prop := B x y = 0
54
56
55
- lemma is_ortho_def {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R} {x y} :
56
- B.is_ortho x y ↔ B x y = 0 := iff.rfl
57
+ lemma is_ortho_def {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R} {x y} : B.is_ortho x y ↔ B x y = 0 := iff.rfl
57
58
58
59
lemma is_ortho_zero_left (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R) (x) : is_ortho B (0 : M₁) x :=
59
- by { dunfold is_ortho, rw [ map_zero B, zero_apply] }
60
+ by { dunfold is_ortho, rw [ map_zero B, zero_apply] }
60
61
61
62
lemma is_ortho_zero_right (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R) (x) : is_ortho B x (0 : M₂) :=
62
- map_zero (B x)
63
+ map_zero (B x)
64
+
65
+ lemma is_ortho_flip {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R} {x y} :
66
+ B.is_ortho x y ↔ B.flip.is_ortho y x :=
67
+ by simp_rw [is_ortho_def, flip_apply]
63
68
64
69
/-- A set of vectors `v` is orthogonal with respect to some bilinear form `B` if and only
65
70
if for all `i ≠ j`, `B (v i) (v j) = 0`. For orthogonality between two elements, use
66
71
`bilin_form.is_ortho` -/
67
- def is_Ortho {n : Type *} (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) (v : n → M₁) : Prop :=
72
+ def is_Ortho (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) (v : n → M₁) : Prop :=
68
73
pairwise (B.is_ortho on v)
69
74
70
- lemma is_Ortho_def {n : Type *} { B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R} {v : n → M₁} :
75
+ lemma is_Ortho_def {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R} {v : n → M₁} :
71
76
B.is_Ortho v ↔ ∀ i j : n, i ≠ j → B (v i) (v j) = 0 := iff.rfl
72
77
78
+ lemma is_Ortho_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
79
+ B.is_Ortho v ↔ B.flip.is_Ortho v :=
80
+ begin
81
+ simp_rw is_Ortho_def,
82
+ split; intros h i j hij,
83
+ { rw flip_apply,
84
+ exact h j i (ne.symm hij) },
85
+ simp_rw flip_apply at h,
86
+ exact h j i (ne.symm hij),
87
+ end
88
+
73
89
end comm_ring
74
90
section field
75
91
@@ -127,14 +143,15 @@ end
127
143
128
144
end field
129
145
130
- variables [comm_ring R] [add_comm_group M] [module R M]
131
- [comm_ring R₁] [add_comm_group M₁] [module R₁ M₁]
132
- {I : R →+* R} {I₁ : R₁ →+* R} {I₂ : R₁ →+* R}
133
- {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R}
134
- {B' : M →ₗ[R] M →ₛₗ[I] R}
135
146
136
147
/-! ### Reflexive bilinear forms -/
137
148
149
+ section reflexive
150
+
151
+ variables [comm_semiring R] [comm_semiring R₁] [add_comm_monoid M₁] [module R₁ M₁]
152
+ {I₁ : R₁ →+* R} {I₂ : R₁ →+* R}
153
+ {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R}
154
+
138
155
/-- The proposition that a sesquilinear form is reflexive -/
139
156
def is_refl (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R) : Prop :=
140
157
∀ (x y), B x y = 0 → B y x = 0
@@ -148,28 +165,56 @@ lemma eq_zero : ∀ {x y}, B x y = 0 → B y x = 0 := λ x y, H x y
148
165
lemma ortho_comm {x y} : is_ortho B x y ↔ is_ortho B y x := ⟨eq_zero H, eq_zero H⟩
149
166
150
167
end is_refl
168
+ end reflexive
151
169
152
170
/-! ### Symmetric bilinear forms -/
153
171
172
+ section symmetric
173
+
174
+ variables [comm_semiring R] [add_comm_monoid M] [module R M]
175
+ {I : R →+* R} {B : M →ₛₗ[I] M →ₗ[R] R}
176
+
154
177
/-- The proposition that a sesquilinear form is symmetric -/
155
- def is_symm (B : M →ₗ[R ] M →ₛₗ[I ] R) : Prop :=
178
+ def is_symm (B : M →ₛₗ[I ] M →ₗ[R ] R) : Prop :=
156
179
∀ (x y), I (B x y) = B y x
157
180
158
181
namespace is_symm
159
182
160
- variable (H : B'.is_symm)
161
- include H
183
+ protected lemma eq (H : B.is_symm) (x y) : I (B x y) = B y x := H x y
162
184
163
- protected lemma eq (x y ) : (I (B' x y)) = B' y x := H x y
185
+ lemma is_refl (H : B.is_symm ) : B.is_refl := λ x y H1, by { rw ←H.eq, simp [H1] }
164
186
165
- lemma is_refl : B'.is_refl := λ x y H1, by { rw [←H], simp [H1] }
187
+ lemma ortho_comm (H : B.is_symm) {x y} : is_ortho B x y ↔ is_ortho B y x := H.is_refl.ortho_comm
166
188
167
- lemma ortho_comm {x y} : is_ortho B' x y ↔ is_ortho B' y x := H.is_refl.ortho_comm
189
+ lemma dom_restrict_symm (H : B.is_symm) (p : submodule R M) : (B.dom_restrict₁₂ p p).is_symm :=
190
+ begin
191
+ intros x y,
192
+ simp_rw dom_restrict₁₂_apply,
193
+ exact H x y,
194
+ end
168
195
169
196
end is_symm
170
197
198
+ lemma is_symm_iff_eq_flip {B : M →ₗ[R] M →ₗ[R] R} : B.is_symm ↔ B = B.flip :=
199
+ begin
200
+ split; intro h,
201
+ { ext,
202
+ rw [←h, flip_apply, ring_hom.id_apply] },
203
+ intros x y,
204
+ conv_lhs { rw h },
205
+ rw [flip_apply, ring_hom.id_apply],
206
+ end
207
+
208
+ end symmetric
209
+
210
+
171
211
/-! ### Alternating bilinear forms -/
172
212
213
+ section alternating
214
+
215
+ variables [comm_ring R] [comm_semiring R₁] [add_comm_monoid M₁] [module R₁ M₁]
216
+ {I₁ : R₁ →+* R} {I₂ : R₁ →+* R} {I : R₁ →+* R} {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R}
217
+
173
218
/-- The proposition that a sesquilinear form is alternating -/
174
219
def is_alt (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R) : Prop := ∀ x, B x x = 0
175
220
@@ -199,6 +244,21 @@ lemma ortho_comm {x y} : is_ortho B x y ↔ is_ortho B y x := H.is_refl.ortho_co
199
244
200
245
end is_alt
201
246
247
+ lemma is_alt_iff_eq_neg_flip [no_zero_divisors R] [char_zero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
248
+ B.is_alt ↔ B = -B.flip :=
249
+ begin
250
+ split; intro h,
251
+ { ext,
252
+ simp_rw [neg_apply, flip_apply],
253
+ exact (h.neg _ _).symm },
254
+ intros x,
255
+ let h' := congr_fun₂ h x x,
256
+ simp only [neg_apply, flip_apply, ←add_eq_zero_iff_eq_neg] at h',
257
+ exact add_self_eq_zero.mp h',
258
+ end
259
+
260
+ end alternating
261
+
202
262
end linear_map
203
263
204
264
namespace submodule
0 commit comments