Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2018 Andreas Swerdlow. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Andreas Swerdlow | |
-/ | |
import algebra.module.linear_map | |
import linear_algebra.bilinear_map | |
import linear_algebra.matrix.basis | |
import linear_algebra.linear_pmap | |
/-! | |
# Sesquilinear form | |
This files provides properties about sesquilinear forms. The maps considered are of the form | |
`Mβ βββ[Iβ] Mβ βββ[Iβ] R`, where `Iβ : Rβ β+* R` and `Iβ : Rβ β+* R` are ring homomorphisms and | |
`Mβ` is a module over `Rβ` and `Mβ` is a module over `Rβ`. | |
Sesquilinear forms are the special case that `Mβ = Mβ`, `Rβ = Rβ = R`, and `Iβ = ring_hom.id R`. | |
Taking additionally `Iβ = ring_hom.id R`, then one obtains bilinear forms. | |
These forms are a special case of the bilinear maps defined in `bilinear_map.lean` and all basic | |
lemmas about construction and elementary calculations are found there. | |
## Main declarations | |
* `is_ortho`: states that two vectors are orthogonal with respect to a sesquilinear form | |
* `is_symm`, `is_alt`: states that a sesquilinear form is symmetric and alternating, respectively | |
* `orthogonal_bilin`: provides the orthogonal complement with respect to sesquilinear form | |
## References | |
* <https://en.wikipedia.org/wiki/Sesquilinear_form#Over_arbitrary_rings> | |
## Tags | |
Sesquilinear form, | |
-/ | |
open_locale big_operators | |
variables {R Rβ Rβ Rβ M Mβ Mβ K Kβ Kβ V Vβ Vβ n: Type*} | |
namespace linear_map | |
/-! ### Orthogonal vectors -/ | |
section comm_ring | |
-- the `β` subscript variables are for special cases about linear (as opposed to semilinear) maps | |
variables [comm_semiring R] [comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
[comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
{Iβ : Rβ β+* R} {Iβ : Rβ β+* R} {Iβ' : Rβ β+* R} | |
/-- The proposition that two elements of a sesquilinear form space are orthogonal -/ | |
def is_ortho (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) (x y) : Prop := B x y = 0 | |
lemma is_ortho_def {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} {x y} : B.is_ortho x y β B x y = 0 := iff.rfl | |
lemma is_ortho_zero_left (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) (x) : is_ortho B (0 : Mβ) x := | |
by { dunfold is_ortho, rw [ map_zero B, zero_apply] } | |
lemma is_ortho_zero_right (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) (x) : is_ortho B x (0 : Mβ) := | |
map_zero (B x) | |
lemma is_ortho_flip {B : Mβ βββ[Iβ] Mβ βββ[Iβ'] R} {x y} : | |
B.is_ortho x y β B.flip.is_ortho y x := | |
by simp_rw [is_ortho_def, flip_apply] | |
/-- A set of vectors `v` is orthogonal with respect to some bilinear form `B` if and only | |
if for all `i β j`, `B (v i) (v j) = 0`. For orthogonality between two elements, use | |
`bilin_form.is_ortho` -/ | |
def is_Ortho (B : Mβ βββ[Iβ] Mβ βββ[Iβ'] R) (v : n β Mβ) : Prop := | |
pairwise (B.is_ortho on v) | |
lemma is_Ortho_def {B : Mβ βββ[Iβ] Mβ βββ[Iβ'] R} {v : n β Mβ} : | |
B.is_Ortho v β β i j : n, i β j β B (v i) (v j) = 0 := iff.rfl | |
lemma is_Ortho_flip (B : Mβ βββ[Iβ] Mβ βββ[Iβ'] R) {v : n β Mβ} : | |
B.is_Ortho v β B.flip.is_Ortho v := | |
begin | |
simp_rw is_Ortho_def, | |
split; intros h i j hij, | |
{ rw flip_apply, | |
exact h j i (ne.symm hij) }, | |
simp_rw flip_apply at h, | |
exact h j i (ne.symm hij), | |
end | |
end comm_ring | |
section field | |
variables [field K] [field Kβ] [add_comm_group Vβ] [module Kβ Vβ] | |
[field Kβ] [add_comm_group Vβ] [module Kβ Vβ] | |
{Iβ : Kβ β+* K} {Iβ : Kβ β+* K} {Iβ' : Kβ β+* K} | |
{Jβ : K β+* K} {Jβ : K β+* K} | |
-- todo: this also holds for [comm_ring R] [is_domain R] when Jβ is invertible | |
lemma ortho_smul_left {B : Vβ βββ[Iβ] Vβ βββ[Iβ] K} {x y} {a : Kβ} (ha : a β 0) : | |
(is_ortho B x y) β (is_ortho B (a β’ x) y) := | |
begin | |
dunfold is_ortho, | |
split; intro H, | |
{ rw [map_smulβββ, H, smul_zero]}, | |
{ rw [map_smulβββ, smul_eq_zero] at H, | |
cases H, | |
{ rw Iβ.map_eq_zero at H, trivial }, | |
{ exact H }} | |
end | |
-- todo: this also holds for [comm_ring R] [is_domain R] when Jβ is invertible | |
lemma ortho_smul_right {B : Vβ βββ[Iβ] Vβ βββ[Iβ] K} {x y} {a : Kβ} {ha : a β 0} : | |
(is_ortho B x y) β (is_ortho B x (a β’ y)) := | |
begin | |
dunfold is_ortho, | |
split; intro H, | |
{ rw [map_smulββ, H, smul_zero] }, | |
{ rw [map_smulββ, smul_eq_zero] at H, | |
cases H, | |
{ simp at H, | |
exfalso, | |
exact ha H }, | |
{ exact H }} | |
end | |
/-- A set of orthogonal vectors `v` with respect to some sesquilinear form `B` is linearly | |
independent if for all `i`, `B (v i) (v i) β 0`. -/ | |
lemma linear_independent_of_is_Ortho {B : Vβ βββ[Iβ] Vβ βββ[Iβ'] K} {v : n β Vβ} | |
(hvβ : B.is_Ortho v) (hvβ : β i, Β¬ B.is_ortho (v i) (v i)) : linear_independent Kβ v := | |
begin | |
classical, | |
rw linear_independent_iff', | |
intros s w hs i hi, | |
have : B (s.sum $ Ξ» (i : n), w i β’ v i) (v i) = 0, | |
{ rw [hs, map_zero, zero_apply] }, | |
have hsum : s.sum (Ξ» (j : n), Iβ(w j) * B (v j) (v i)) = Iβ(w i) * B (v i) (v i), | |
{ apply finset.sum_eq_single_of_mem i hi, | |
intros j hj hij, | |
rw [is_Ortho_def.1 hvβ _ _ hij, mul_zero], }, | |
simp_rw [B.map_sumβ, map_smulβββ, smul_eq_mul, hsum] at this, | |
apply Iβ.map_eq_zero.mp, | |
exact eq_zero_of_ne_zero_of_mul_right_eq_zero (hvβ i) this, | |
end | |
end field | |
/-! ### Reflexive bilinear forms -/ | |
section reflexive | |
variables [comm_semiring R] [comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
{Iβ : Rβ β+* R} {Iβ : Rβ β+* R} | |
{B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} | |
/-- The proposition that a sesquilinear form is reflexive -/ | |
def is_refl (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : Prop := | |
β (x y), B x y = 0 β B y x = 0 | |
namespace is_refl | |
variable (H : B.is_refl) | |
lemma eq_zero : β {x y}, B x y = 0 β B y x = 0 := Ξ» x y, H x y | |
lemma ortho_comm {x y} : is_ortho B x y β is_ortho B y x := β¨eq_zero H, eq_zero Hβ© | |
lemma dom_restrict_refl (H : B.is_refl) (p : submodule Rβ Mβ) : (B.dom_restrictββ p p).is_refl := | |
Ξ» _ _, by { simp_rw dom_restrictββ_apply, exact H _ _} | |
@[simp] lemma flip_is_refl_iff : B.flip.is_refl β B.is_refl := | |
β¨Ξ» h x y H, h y x ((B.flip_apply _ _).trans H), Ξ» h x y, h y xβ© | |
lemma ker_flip_eq_bot (H : B.is_refl) (h : B.ker = β₯) : B.flip.ker = β₯ := | |
begin | |
refine ker_eq_bot'.mpr (Ξ» _ hx, ker_eq_bot'.mp h _ _), | |
ext, | |
exact H _ _ (linear_map.congr_fun hx _), | |
end | |
lemma ker_eq_bot_iff_ker_flip_eq_bot (H : B.is_refl) : B.ker = β₯ β B.flip.ker = β₯ := | |
begin | |
refine β¨ker_flip_eq_bot H, Ξ» h, _β©, | |
exact (congr_arg _ B.flip_flip.symm).trans (ker_flip_eq_bot (flip_is_refl_iff.mpr H) h), | |
end | |
end is_refl | |
end reflexive | |
/-! ### Symmetric bilinear forms -/ | |
section symmetric | |
variables [comm_semiring R] [add_comm_monoid M] [module R M] | |
{I : R β+* R} {B : M βββ[I] M ββ[R] R} | |
/-- The proposition that a sesquilinear form is symmetric -/ | |
def is_symm (B : M βββ[I] M ββ[R] R) : Prop := | |
β (x y), I (B x y) = B y x | |
namespace is_symm | |
protected lemma eq (H : B.is_symm) (x y) : I (B x y) = B y x := H x y | |
lemma is_refl (H : B.is_symm) : B.is_refl := Ξ» x y H1, by { rw βH.eq, simp [H1] } | |
lemma ortho_comm (H : B.is_symm) {x y} : is_ortho B x y β is_ortho B y x := H.is_refl.ortho_comm | |
lemma dom_restrict_symm (H : B.is_symm) (p : submodule R M) : (B.dom_restrictββ p p).is_symm := | |
Ξ» _ _, by { simp_rw dom_restrictββ_apply, exact H _ _} | |
end is_symm | |
lemma is_symm_iff_eq_flip {B : M ββ[R] M ββ[R] R} : B.is_symm β B = B.flip := | |
begin | |
split; intro h, | |
{ ext, | |
rw [βh, flip_apply, ring_hom.id_apply] }, | |
intros x y, | |
conv_lhs { rw h }, | |
rw [flip_apply, ring_hom.id_apply], | |
end | |
end symmetric | |
/-! ### Alternating bilinear forms -/ | |
section alternating | |
variables [comm_ring R] [comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
{Iβ : Rβ β+* R} {Iβ : Rβ β+* R} {I : Rβ β+* R} {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} | |
/-- The proposition that a sesquilinear form is alternating -/ | |
def is_alt (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : Prop := β x, B x x = 0 | |
namespace is_alt | |
variable (H : B.is_alt) | |
include H | |
lemma self_eq_zero (x) : B x x = 0 := H x | |
lemma neg (x y) : - B x y = B y x := | |
begin | |
have H1 : B (y + x) (y + x) = 0, | |
{ exact self_eq_zero H (y + x) }, | |
simp [map_add, self_eq_zero H] at H1, | |
rw [add_eq_zero_iff_neg_eq] at H1, | |
exact H1, | |
end | |
lemma is_refl : B.is_refl := | |
begin | |
intros x y h, | |
rw [βneg H, h, neg_zero], | |
end | |
lemma ortho_comm {x y} : is_ortho B x y β is_ortho B y x := H.is_refl.ortho_comm | |
end is_alt | |
lemma is_alt_iff_eq_neg_flip [no_zero_divisors R] [char_zero R] {B : Mβ βββ[I] Mβ βββ[I] R} : | |
B.is_alt β B = -B.flip := | |
begin | |
split; intro h, | |
{ ext, | |
simp_rw [neg_apply, flip_apply], | |
exact (h.neg _ _).symm }, | |
intros x, | |
let h' := congr_funβ h x x, | |
simp only [neg_apply, flip_apply, βadd_eq_zero_iff_eq_neg] at h', | |
exact add_self_eq_zero.mp h', | |
end | |
end alternating | |
end linear_map | |
namespace submodule | |
/-! ### The orthogonal complement -/ | |
variables [comm_ring R] [comm_ring Rβ] [add_comm_group Mβ] [module Rβ Mβ] | |
{Iβ : Rβ β+* R} {Iβ : Rβ β+* R} | |
{B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} | |
/-- The orthogonal complement of a submodule `N` with respect to some bilinear form is the set of | |
elements `x` which are orthogonal to all elements of `N`; i.e., for all `y` in `N`, `B x y = 0`. | |
Note that for general (neither symmetric nor antisymmetric) bilinear forms this definition has a | |
chirality; in addition to this "left" orthogonal complement one could define a "right" orthogonal | |
complement for which, for all `y` in `N`, `B y x = 0`. This variant definition is not currently | |
provided in mathlib. -/ | |
def orthogonal_bilin (N : submodule Rβ Mβ) (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : submodule Rβ Mβ := | |
{ carrier := { m | β n β N, B.is_ortho n m }, | |
zero_mem' := Ξ» x _, B.is_ortho_zero_right x, | |
add_mem' := Ξ» x y hx hy n hn, | |
by rw [linear_map.is_ortho, map_add, show B n x = 0, by exact hx n hn, | |
show B n y = 0, by exact hy n hn, zero_add], | |
smul_mem' := Ξ» c x hx n hn, | |
by rw [linear_map.is_ortho, linear_map.map_smulββ, show B n x = 0, by exact hx n hn, | |
smul_zero] } | |
variables {N L : submodule Rβ Mβ} | |
@[simp] lemma mem_orthogonal_bilin_iff {m : Mβ} : | |
m β N.orthogonal_bilin B β β n β N, B.is_ortho n m := iff.rfl | |
lemma orthogonal_bilin_le (h : N β€ L) : L.orthogonal_bilin B β€ N.orthogonal_bilin B := | |
Ξ» _ hn l hl, hn l (h hl) | |
lemma le_orthogonal_bilin_orthogonal_bilin (b : B.is_refl) : | |
N β€ (N.orthogonal_bilin B).orthogonal_bilin B := | |
Ξ» n hn m hm, b _ _ (hm n hn) | |
end submodule | |
namespace linear_map | |
section orthogonal | |
variables [field K] [add_comm_group V] [module K V] | |
[field Kβ] [add_comm_group Vβ] [module Kβ Vβ] | |
{J : K β+* K} {Jβ : Kβ β+* K} {Jβ' : Kβ β+* K} | |
-- β This lemma only applies in fields as we require `a * b = 0 β a = 0 β¨ b = 0` | |
lemma span_singleton_inf_orthogonal_eq_bot | |
(B : Vβ βββ[Jβ] Vβ βββ[Jβ'] K) (x : Vβ) (hx : Β¬ B.is_ortho x x) : | |
(Kβ β x) β submodule.orthogonal_bilin (Kβ β x) B = β₯ := | |
begin | |
rw β finset.coe_singleton, | |
refine eq_bot_iff.2 (Ξ» y h, _), | |
rcases mem_span_finset.1 h.1 with β¨ΞΌ, rflβ©, | |
have := h.2 x _, | |
{ rw finset.sum_singleton at this β’, | |
suffices hΞΌzero : ΞΌ x = 0, | |
{ rw [hΞΌzero, zero_smul, submodule.mem_bot] }, | |
change B x (ΞΌ x β’ x) = 0 at this, rw [map_smulββ, smul_eq_mul] at this, | |
exact or.elim (zero_eq_mul.mp this.symm) | |
(Ξ» y, by { simp at y, exact y }) | |
(Ξ» hfalse, false.elim $ hx hfalse) }, | |
{ rw submodule.mem_span; exact Ξ» _ hp, hp $ finset.mem_singleton_self _ } | |
end | |
-- β This lemma only applies in fields since we use the `mul_eq_zero` | |
lemma orthogonal_span_singleton_eq_to_lin_ker {B : V ββ[K] V βββ[J] K} (x : V) : | |
submodule.orthogonal_bilin (K β x) B = (B x).ker := | |
begin | |
ext y, | |
simp_rw [submodule.mem_orthogonal_bilin_iff, linear_map.mem_ker, | |
submodule.mem_span_singleton ], | |
split, | |
{ exact Ξ» h, h x β¨1, one_smul _ _β© }, | |
{ rintro h _ β¨z, rflβ©, | |
rw [is_ortho, map_smulβββ, smul_eq_zero], | |
exact or.intro_right _ h } | |
end | |
-- todo: Generalize this to sesquilinear maps | |
lemma span_singleton_sup_orthogonal_eq_top {B : V ββ[K] V ββ[K] K} | |
{x : V} (hx : Β¬ B.is_ortho x x) : | |
(K β x) β submodule.orthogonal_bilin (K β x) B = β€ := | |
begin | |
rw orthogonal_span_singleton_eq_to_lin_ker, | |
exact (B x).span_singleton_sup_ker_eq_top hx, | |
end | |
-- todo: Generalize this to sesquilinear maps | |
/-- Given a bilinear form `B` and some `x` such that `B x x β 0`, the span of the singleton of `x` | |
is complement to its orthogonal complement. -/ | |
lemma is_compl_span_singleton_orthogonal {B : V ββ[K] V ββ[K] K} | |
{x : V} (hx : Β¬ B.is_ortho x x) : is_compl (K β x) (submodule.orthogonal_bilin (K β x) B) := | |
{ disjoint := eq_bot_iff.1 $ span_singleton_inf_orthogonal_eq_bot B x hx, | |
codisjoint := eq_top_iff.1 $ span_singleton_sup_orthogonal_eq_top hx } | |
end orthogonal | |
/-! ### Adjoint pairs -/ | |
section adjoint_pair | |
section add_comm_monoid | |
variables [comm_semiring R] | |
variables [add_comm_monoid M] [module R M] | |
variables [add_comm_monoid Mβ] [module R Mβ] | |
variables [add_comm_monoid Mβ] [module R Mβ] | |
variables {B F : M ββ[R] M ββ[R] R} {B' : Mβ ββ[R] Mβ ββ[R] R} {B'' : Mβ ββ[R] Mβ ββ[R] R} | |
variables {f f' : M ββ[R] Mβ} {g g' : Mβ ββ[R] M} | |
variables (B B' f g) | |
/-- Given a pair of modules equipped with bilinear forms, this is the condition for a pair of | |
maps between them to be mutually adjoint. -/ | |
def is_adjoint_pair := β x y, B' (f x) y = B x (g y) | |
variables {B B' f g} | |
lemma is_adjoint_pair_iff_comp_eq_complβ : | |
is_adjoint_pair B B' f g β B'.comp f = B.complβ g := | |
begin | |
split; intros h, | |
{ ext x y, rw [comp_apply, complβ_apply], exact h x y }, | |
{ intros _ _, rw [βcomplβ_apply, βcomp_apply, h] }, | |
end | |
lemma is_adjoint_pair_zero : is_adjoint_pair B B' 0 0 := | |
Ξ» _ _, by simp only [zero_apply, map_zero] | |
lemma is_adjoint_pair_id : is_adjoint_pair B B 1 1 := Ξ» x y, rfl | |
lemma is_adjoint_pair.add (h : is_adjoint_pair B B' f g) (h' : is_adjoint_pair B B' f' g') : | |
is_adjoint_pair B B' (f + f') (g + g') := | |
Ξ» x _, by rw [f.add_apply, g.add_apply, B'.map_addβ, (B x).map_add, h, h'] | |
lemma is_adjoint_pair.comp {f' : Mβ ββ[R] Mβ} {g' : Mβ ββ[R] Mβ} | |
(h : is_adjoint_pair B B' f g) (h' : is_adjoint_pair B' B'' f' g') : | |
is_adjoint_pair B B'' (f'.comp f) (g.comp g') := | |
Ξ» _ _, by rw [linear_map.comp_apply, linear_map.comp_apply, h', h] | |
lemma is_adjoint_pair.mul | |
{f g f' g' : module.End R M} (h : is_adjoint_pair B B f g) (h' : is_adjoint_pair B B f' g') : | |
is_adjoint_pair B B (f * f') (g' * g) := | |
h'.comp h | |
end add_comm_monoid | |
section add_comm_group | |
variables [comm_ring R] | |
variables [add_comm_group M] [module R M] | |
variables [add_comm_group Mβ] [module R Mβ] | |
variables {B F : M ββ[R] M ββ[R] R} {B' : Mβ ββ[R] Mβ ββ[R] R} | |
variables {f f' : M ββ[R] Mβ} {g g' : Mβ ββ[R] M} | |
lemma is_adjoint_pair.sub (h : is_adjoint_pair B B' f g) (h' : is_adjoint_pair B B' f' g') : | |
is_adjoint_pair B B' (f - f') (g - g') := | |
Ξ» x _, by rw [f.sub_apply, g.sub_apply, B'.map_subβ, (B x).map_sub, h, h'] | |
lemma is_adjoint_pair.smul (c : R) (h : is_adjoint_pair B B' f g) : | |
is_adjoint_pair B B' (c β’ f) (c β’ g) := | |
Ξ» _ _, by simp only [smul_apply, map_smul, smul_eq_mul, h _ _] | |
end add_comm_group | |
end adjoint_pair | |
/-! ### Self-adjoint pairs-/ | |
section selfadjoint_pair | |
section add_comm_monoid | |
variables [comm_semiring R] | |
variables [add_comm_monoid M] [module R M] | |
variables (B F : M ββ[R] M ββ[R] R) | |
/-- The condition for an endomorphism to be "self-adjoint" with respect to a pair of bilinear forms | |
on the underlying module. In the case that these two forms are identical, this is the usual concept | |
of self adjointness. In the case that one of the forms is the negation of the other, this is the | |
usual concept of skew adjointness. -/ | |
def is_pair_self_adjoint (f : module.End R M) := is_adjoint_pair B F f f | |
/-- An endomorphism of a module is self-adjoint with respect to a bilinear form if it serves as an | |
adjoint for itself. -/ | |
protected def is_self_adjoint (f : module.End R M) := is_adjoint_pair B B f f | |
end add_comm_monoid | |
section add_comm_group | |
variables [comm_ring R] | |
variables [add_comm_group M] [module R M] | |
variables [add_comm_group Mβ] [module R Mβ] | |
(B F : M ββ[R] M ββ[R] R) | |
/-- The set of pair-self-adjoint endomorphisms are a submodule of the type of all endomorphisms. -/ | |
def is_pair_self_adjoint_submodule : submodule R (module.End R M) := | |
{ carrier := { f | is_pair_self_adjoint B F f }, | |
zero_mem' := is_adjoint_pair_zero, | |
add_mem' := Ξ» f g hf hg, hf.add hg, | |
smul_mem' := Ξ» c f h, h.smul c, } | |
/-- An endomorphism of a module is skew-adjoint with respect to a bilinear form if its negation | |
serves as an adjoint. -/ | |
def is_skew_adjoint (f : module.End R M) := is_adjoint_pair B B f (-f) | |
/-- The set of self-adjoint endomorphisms of a module with bilinear form is a submodule. (In fact | |
it is a Jordan subalgebra.) -/ | |
def self_adjoint_submodule := is_pair_self_adjoint_submodule B B | |
/-- The set of skew-adjoint endomorphisms of a module with bilinear form is a submodule. (In fact | |
it is a Lie subalgebra.) -/ | |
def skew_adjoint_submodule := is_pair_self_adjoint_submodule (-B) B | |
variables {B F} | |
@[simp] lemma mem_is_pair_self_adjoint_submodule (f : module.End R M) : | |
f β is_pair_self_adjoint_submodule B F β is_pair_self_adjoint B F f := | |
iff.rfl | |
lemma is_pair_self_adjoint_equiv (e : Mβ ββ[R] M) (f : module.End R M) : | |
is_pair_self_adjoint B F f β | |
is_pair_self_adjoint (B.complββ βe βe) (F.complββ βe βe) (e.symm.conj f) := | |
begin | |
have hβ : (F.complββ (βe : Mβ ββ[R] M) (βe : Mβ ββ[R] M)).comp (e.symm.conj f) = | |
(F.comp f).complββ (βe : Mβ ββ[R] M) (βe : Mβ ββ[R] M) := | |
by { ext, simp only [linear_equiv.symm_conj_apply, coe_comp, linear_equiv.coe_coe, complββ_apply, | |
linear_equiv.apply_symm_apply], }, | |
have hα΅£ : (B.complββ (βe : Mβ ββ[R] M) (βe : Mβ ββ[R] M)).complβ (e.symm.conj f) = | |
(B.complβ f).complββ (βe : Mβ ββ[R] M) (βe : Mβ ββ[R] M) := | |
by { ext, simp only [linear_equiv.symm_conj_apply, complβ_apply, coe_comp, linear_equiv.coe_coe, | |
complββ_apply, linear_equiv.apply_symm_apply] }, | |
have he : function.surjective (β(βe : Mβ ββ[R] M) : Mβ β M) := e.surjective, | |
simp_rw [is_pair_self_adjoint, is_adjoint_pair_iff_comp_eq_complβ, hβ, hα΅£, | |
complββ_inj he he], | |
end | |
lemma is_skew_adjoint_iff_neg_self_adjoint (f : module.End R M) : | |
B.is_skew_adjoint f β is_adjoint_pair (-B) B f f := | |
show (β x y, B (f x) y = B x ((-f) y)) β β x y, B (f x) y = (-B) x (f y), | |
by simp | |
@[simp] lemma mem_self_adjoint_submodule (f : module.End R M) : | |
f β B.self_adjoint_submodule β B.is_self_adjoint f := iff.rfl | |
@[simp] lemma mem_skew_adjoint_submodule (f : module.End R M) : | |
f β B.skew_adjoint_submodule β B.is_skew_adjoint f := | |
by { rw is_skew_adjoint_iff_neg_self_adjoint, exact iff.rfl } | |
end add_comm_group | |
end selfadjoint_pair | |
/-! ### Nondegenerate bilinear forms -/ | |
section nondegenerate | |
section comm_semiring | |
variables [comm_semiring R] [comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
[comm_semiring Rβ] [add_comm_monoid Mβ] [module Rβ Mβ] | |
{Iβ : Rβ β+* R} {Iβ : Rβ β+* R} {Iβ' : Rβ β+* R} | |
/-- A bilinear form is called left-separating if | |
the only element that is left-orthogonal to every other element is `0`; i.e., | |
for every nonzero `x` in `Mβ`, there exists `y` in `Mβ` with `B x y β 0`.-/ | |
def separating_left (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : Prop := | |
β x : Mβ, (β y : Mβ, B x y = 0) β x = 0 | |
/-- A bilinear form is called right-separating if | |
the only element that is right-orthogonal to every other element is `0`; i.e., | |
for every nonzero `y` in `Mβ`, there exists `x` in `Mβ` with `B x y β 0`.-/ | |
def separating_right (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : Prop := | |
β y : Mβ, (β x : Mβ, B x y = 0) β y = 0 | |
/-- A bilinear form is called non-degenerate if it is left-separating and right-separating. -/ | |
def nondegenerate (B : Mβ βββ[Iβ] Mβ βββ[Iβ] R) : Prop := separating_left B β§ separating_right B | |
@[simp] lemma flip_separating_right {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.flip.separating_right β B.separating_left := β¨Ξ» hB x hy, hB x hy, Ξ» hB x hy, hB x hyβ© | |
@[simp] lemma flip_separating_left {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.flip.separating_left β separating_right B := by rw [βflip_separating_right, flip_flip] | |
@[simp] lemma flip_nondegenerate {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.flip.nondegenerate β B.nondegenerate := | |
iff.trans and.comm (and_congr flip_separating_right flip_separating_left) | |
lemma separating_left_iff_linear_nontrivial {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.separating_left β β x : Mβ, B x = 0 β x = 0 := | |
begin | |
split; intros h x hB, | |
{ let h' := h x, | |
simp only [hB, zero_apply, eq_self_iff_true, forall_const] at h', | |
exact h' }, | |
have h' : B x = 0 := by { ext, rw [zero_apply], exact hB _ }, | |
exact h x h', | |
end | |
lemma separating_right_iff_linear_flip_nontrivial {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.separating_right β β y : Mβ, B.flip y = 0 β y = 0 := | |
by rw [βflip_separating_left, separating_left_iff_linear_nontrivial] | |
/-- A bilinear form is left-separating if and only if it has a trivial kernel. -/ | |
theorem separating_left_iff_ker_eq_bot {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.separating_left β B.ker = β₯ := | |
iff.trans separating_left_iff_linear_nontrivial linear_map.ker_eq_bot'.symm | |
/-- A bilinear form is right-separating if and only if its flip has a trivial kernel. -/ | |
theorem separating_right_iff_flip_ker_eq_bot {B : Mβ βββ[Iβ] Mβ βββ[Iβ] R} : | |
B.separating_right β B.flip.ker = β₯ := | |
by rw [βflip_separating_left, separating_left_iff_ker_eq_bot] | |
end comm_semiring | |
section comm_ring | |
variables [comm_ring R] [add_comm_group M] [module R M] | |
{I I' : R β+* R} | |
lemma is_refl.nondegenerate_of_separating_left {B : M ββ[R] M ββ[R] R} | |
(hB : B.is_refl) (hB' : B.separating_left) : B.nondegenerate := | |
begin | |
refine β¨hB', _β©, | |
rw [separating_right_iff_flip_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mp], | |
rwa βseparating_left_iff_ker_eq_bot, | |
end | |
lemma is_refl.nondegenerate_of_separating_right {B : M ββ[R] M ββ[R] R} | |
(hB : B.is_refl) (hB' : B.separating_right) : B.nondegenerate := | |
begin | |
refine β¨_, hB'β©, | |
rw [separating_left_iff_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mpr], | |
rwa βseparating_right_iff_flip_ker_eq_bot, | |
end | |
/-- The restriction of a reflexive bilinear form `B` onto a submodule `W` is | |
nondegenerate if `W` has trivial intersection with its orthogonal complement, | |
that is `disjoint W (W.orthogonal_bilin B)`. -/ | |
lemma nondegenerate_restrict_of_disjoint_orthogonal | |
{B : M ββ[R] M ββ[R] R} (hB : B.is_refl) | |
{W : submodule R M} (hW : disjoint W (W.orthogonal_bilin B)) : | |
(B.dom_restrictββ W W).nondegenerate := | |
begin | |
refine (hB.dom_restrict_refl W).nondegenerate_of_separating_left _, | |
rintro β¨x, hxβ© bβ, | |
rw [submodule.mk_eq_zero, β submodule.mem_bot R], | |
refine hW β¨hx, Ξ» y hy, _β©, | |
specialize bβ β¨y, hyβ©, | |
simp_rw [dom_restrictββ_apply, submodule.coe_mk] at bβ, | |
rw hB.ortho_comm, | |
exact bβ, | |
end | |
/-- An orthogonal basis with respect to a left-separating bilinear form has no self-orthogonal | |
elements. -/ | |
lemma is_Ortho.not_is_ortho_basis_self_of_separating_left [nontrivial R] | |
{B : M βββ[I] M βββ[I'] R} {v : basis n R M} (h : B.is_Ortho v) (hB : B.separating_left) | |
(i : n) : Β¬B.is_ortho (v i) (v i) := | |
begin | |
intro ho, | |
refine v.ne_zero i (hB (v i) $ Ξ» m, _), | |
obtain β¨vi, rflβ© := v.repr.symm.surjective m, | |
rw [basis.repr_symm_apply, finsupp.total_apply, finsupp.sum, map_sum], | |
apply finset.sum_eq_zero, | |
rintros j -, | |
rw map_smulββ, | |
convert mul_zero _ using 2, | |
obtain rfl | hij := eq_or_ne i j, | |
{ exact ho }, | |
{ exact h i j hij }, | |
end | |
/-- An orthogonal basis with respect to a right-separating bilinear form has no self-orthogonal | |
elements. -/ | |
lemma is_Ortho.not_is_ortho_basis_self_of_separating_right [nontrivial R] | |
{B : M βββ[I] M βββ[I'] R} {v : basis n R M} (h : B.is_Ortho v) (hB : B.separating_right) | |
(i : n) : Β¬B.is_ortho (v i) (v i) := | |
begin | |
rw is_Ortho_flip at h, | |
rw is_ortho_flip, | |
exact h.not_is_ortho_basis_self_of_separating_left (flip_separating_left.mpr hB) i, | |
end | |
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating | |
if the basis has no elements which are self-orthogonal. -/ | |
lemma is_Ortho.separating_left_of_not_is_ortho_basis_self [no_zero_divisors R] | |
{B : M ββ[R] M ββ[R] R} (v : basis n R M) (hO : B.is_Ortho v) (h : β i, Β¬B.is_ortho (v i) (v i)) : | |
B.separating_left := | |
begin | |
intros m hB, | |
obtain β¨vi, rflβ© := v.repr.symm.surjective m, | |
rw linear_equiv.map_eq_zero_iff, | |
ext i, | |
rw [finsupp.zero_apply], | |
specialize hB (v i), | |
simp_rw [basis.repr_symm_apply, finsupp.total_apply, finsupp.sum, map_sumβ, map_smulβββ, | |
smul_eq_mul] at hB, | |
rw finset.sum_eq_single i at hB, | |
{ exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB, }, | |
{ intros j hj hij, convert mul_zero _ using 2, exact hO j i hij, }, | |
{ intros hi, convert zero_mul _ using 2, exact finsupp.not_mem_support_iff.mp hi } | |
end | |
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is right-separating | |
if the basis has no elements which are self-orthogonal. -/ | |
lemma is_Ortho.separating_right_iff_not_is_ortho_basis_self [no_zero_divisors R] | |
{B : M ββ[R] M ββ[R] R} (v : basis n R M) (hO : B.is_Ortho v) (h : β i, Β¬B.is_ortho (v i) (v i)) : | |
B.separating_right := | |
begin | |
rw is_Ortho_flip at hO, | |
rw [βflip_separating_left], | |
refine is_Ortho.separating_left_of_not_is_ortho_basis_self v hO (Ξ» i, _), | |
rw is_ortho_flip, | |
exact h i, | |
end | |
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is nondegenerate | |
if the basis has no elements which are self-orthogonal. -/ | |
lemma is_Ortho.nondegenerate_of_not_is_ortho_basis_self [no_zero_divisors R] | |
{B : M ββ[R] M ββ[R] R} (v : basis n R M) (hO : B.is_Ortho v) (h : β i, Β¬B.is_ortho (v i) (v i)) : | |
B.nondegenerate := | |
β¨is_Ortho.separating_left_of_not_is_ortho_basis_self v hO h, | |
is_Ortho.separating_right_iff_not_is_ortho_basis_self v hO hβ© | |
end comm_ring | |
end nondegenerate | |
end linear_map | |