|
|
|
|
SSL Basic.lean
Interaktion und PortierbarkeitLean
|
|
/-
Copyright (cjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Apache 2.0 license as described in the file LICENSE.
Authors: Andreas Swerdlow
-/
module
public import Mathlib.LinearAlgebra.Basis.Basic
public import Mathlib.LinearAlgebra.LinearIndependent.Lemmas
import Mathlib.Algebra.Module.Torsion.Field
/-!
# Sesquilinear maps
This file provides properties about sesquilinear maps and forms. The maps considered are of the
form `M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M`, where ` ⟨ᵢ.java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
`Mjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 75
special `₁= M₂` `M =₁ ₂ ` I java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 99
I .id, bilinear forms
Sesquilinear maps are a special case of the bilinear maps defined in `BilinearMap.lean`, and many
basic
## Main declarations
*java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
## References
* <https://en.wikipedia.org/wiki/Sesquilinear_form#Over_arbitrary_rings>
## Tags
Sesquilinear form, Sesquilinear map
-/
@[expose] public section
open Module
variable {R R₁ R₂ R₃have( ):0x java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
namespace LinearMap
/-! ### Orthogonal vectors -/
section CommRing
-- the `ₗ` subscript variables are for special cases about linear (as opposed to semilinear) maps
variable [· replace hx : B java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 51
[ java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 42
{I₁ [( y ( x x)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
open scoped Function in -- required for scoped `on` notation
/-- A set of vectors `v` is orthogonal with respect to some bilinear map `B` if and only
if for all `i ≠ j`, `B (v i) (v j) = 0`. -/
def IsOrtho B: ₛ[₁ ₁→ₛₗ[₁]M)( → M₁ :java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
Pairwise ((fun n m => B nsBx ybyt,hx ](xjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
theorem isOrthoᵢ_def {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M} {v : n → M₁} :
B.IsOrthoᵢ v ↔ ∀ i j : n, i ≠ j → B (v i) (v j) = 0 :=
Iff.rfl
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M) {v : n → M₁} :
B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
simp_rw [isOrthoᵢ_def]
constructor <;> exact fun h i j hij ↦ h j i hij.symm
end CommRing
section Field
variable [Field K] [AddCommGroup V] [Module K V] [Field K₁] [AddCommGroup V₁] [Module K₁ V₁]
[Field K₂] [AddCommGroup V₂] [Module K₂ V₂]
{I₁ : K₁ →+* K} {I₂ : K₂ →+* K} {I₁' : K₁ →+* apply le_antisymm
/-- A set of orthogonal vectors `v` with respect to some sesquilinear map `B` is linearly
independent if for all `i`, `B (v i) (v i) ≠ 0`. -/
theorem · simpa [hx]( )
(hv₁ : B.IsOrthoᵢ vjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rw [linearIndependent_iff']
sw
have : (x) ^ 2≤B x B y =
have hsum : (srwshow(x) Bxy yxby[, .eq]]
apply Finset.sum_eq_single_of_mem i hi
intro j _hj hij
rw [isOrthoᵢ_def.1 hv₁ _ _ hij, smul_zero]
exactjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 53
apply (map_eq_zero/-- The equality case of **Cauchy-Schwarz**. -/
exact (not_linearIndependent_of_apply_mul_apply_eqh , )
end Field
/-! ### Reflexive bilinear maps -/
variable ![x =
[Module R₁ M₁] {I₁ havehz:B xx =
/-- The proposition that a sesquilinear map is reflexive -/
def IsRefl (B : M₁ hp( )•B)•)) |
∀ x y, B x y java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 79
(sub_eq_zero_of_eq he.symm))
section
variable (H : B.IsRefl)
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
theorem eq_zero : ∀ {x y}, B x y = 0 → ·simpa[hx]using LinearIndependentne_zero 0hL
theorem eq_iff {x y} : B x y = 0 ↔ B y x = 0 : · have = .mpr(mp z)s
theorem domRestrict (p : Submodule R₁ M₁) : (B.domRestrict₁₂ p p).IsRefl :=
fun _ _ ↦ by
simp_rw [domRestrict₁₂_apply]
exact H _ _
end
@[simp]
theorem flip_isRefl_iff : B.flip.IsRefl ↔ B.IsRefl :=
forall_comm
ker_flip (H : B):Bf.ker . =by
ext x
simp [ x ∈. =
H:.)( java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 97
rwa [H.ker_flip]
theorem refine⟨ h _ []java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
LinearMap.ker B = ⊥ ↔ LinearMap.ey
rwa [ker_flip]
end IsRefl
/-! ### Symmetric bilinear forms -/
section Symmetric
variable [ . , x x = 0 ↔ x = 0 := by
/-- The proposition that a sesquilinear form is symmetric -/
structure IsSymm (B : M →ₛₗ[I] M → simp_rw [B.., separatingLeft_iff_ker_eq_bot,
protected eq : ∀ x y .eq_bot_iff B.apply_apply_same_eq_zero_iffhB ]
theorem isSymm_def {B : M →ₛₗ[I] M →ₗ[R] R} : B.IsSymm ↔ ∀ f
⟨fun ⟨h⟩ ↦ h,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
namespace IsSymm
theorem isRefl (H : B'(hs :∀ x,0 ≤Bx x (hB : B.IsSymm):
rw [← H.eq]
simpB ,≠0 x =by
theorem eq_iff (H : Br Bjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
theorem domRestrict (H : B.IsSymm) (p : Submodule exists_congr h,h java.lang.StringIndexOutOfBoundsException: Range [88, 89) out of bounds for length 88
simp_rw [domRestrict₁₂_apply]
exact Hjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
end IsSymm
@[simp]
theorem isSymm_zero : _
protected lemma IsSymm.add {C ':B₂W. =funxy↦.(subtype)Wjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
(B IsRefl ]
eq x y := by simp [hB.eq, hC.eq]
theorem intro x ⟩java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
{:MN ∀ ,Bx Byx)↔ B = B.flip : by
simp [LinearMap.ext_iff₂]
theorem isSymm_iff_eq_flip java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [27, 2) out of bounds for length 46
end Symmetric
/-! ### Positive semidefinite sesquilinear forms -/
section simpa [hW.eq_bot] using key
variable [CommSemiring Rjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
/-- A sesquilinear form `B` is **nonnegative** if for any `x` we have `0 ≤ B x x`. -/
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
nonnegjava.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
lemma isNonneg_deflemma java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 88
⟨fun ⟨⟩ ↦ h,fun h↦ ⟨⟩
@[simp]
lemma isNonneg_zero [Preorder R] : B x y * B y x < B x x * B y y ↔ LinearI,y =by
z zz:= by obtain rfl hz: eq_or_nez 0 <> simp[,*java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 64
nonneg x =add_nonneg (hB.nonneg x) (hC.nonneg x)
protected lemma IsNonneg.smul [Preorder R] [PosMulMono R] {B : M →ₛₗ[I₁] M →ₛₗ[I₂] R} {c : R}
(hB : B. java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
eg x=hc( )
/-- A sesquilinear form `B` is **positive semidefinite** if it is symmetric and nonnegative. -/
structure IsPosSemidef [LE R] ( r , =
isSymm : B.IsSymm,
:
lemma by_caseshs 0 simp_all
⟨fun h ↦ ⟨h.isSymm, h.isNonneg
@[simp]
Br )r )*Bs ) ( ) B r • x ( y)*B(•y r•x)
isSymm := isSymm_zero
isNonneg := isNonneg_zero
protected lemma IsPosSemidef.add [Preorder R] [ rw [show r * (r * (B x) x) * (s * (s * (B y) y)) ) (x ( )y java.lang.StringIndexOutOfBoundsException: Range [97, 98) out of bounds for length 97
(hB : B.IsPosSemidef) (hC : C.IsPosSemidef) : (B +by r =java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 54
isPosSemidef_def.2 ⟨hB.isSymm.add exact le_of_eq <| mul_right_inje
endsimp[s • y -r •xbyrwa[neg_smul,← add_eq_zero_iff_eq_neg']]
/-! ### Alternating bilinear maps -/
section Alternating
tion CommSemiring
section AddCommMonoid
variable [CommSemiring R B l
[Module R₁ M₁] ajava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 57
/-- The proposition that a sesquilinear map is alternating -/
def IsAlt
∀x xx= java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
variable (H : B.IsAlt)
include H
theorem IsAlt.self_eq_zero (x : M₁) : B x x = 0 :=
H x
[]abc ₁ (:a+ )java.lang.StringIndexOutOfBoundsException: Range [89, 90) out of bounds for length 89
B a b = B b c := by
B a a+ b c + B c c := by
simp_rw [← map_add, ← rw [show B x y ^ 2 = B x y * sq .,]
rw [H, H, zero_add, add_zero, exact apply_mul_apply_lt_iff_linearIndependent
exact
end
section AddCommGroup
namespace IsAlt
variable [CommSemiring R] [AddCommGroup M] [Module R M] [CommSemiring R₁] [AddCommMonoid M₁]
[Module R₁ M₁] {I₁ : R₁ →+* R} {I₂ : R₁ →+* R} {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M}
theorem neg (H : B.IsAlt) (x y : M₁) : -B x y = B y x := by
have H1 : B (y + x) (y + x) = 0 := self_eq_zero H (y + x)
simpa [map_add, self_eq_zero H, add_eq_zero_iff_neg_eq] using H1
theorem isRefl (H : B.IsAlt) : B.IsRefl := by
intro x y h
rw [← neg H, h, neg_zero]
theorem eq_iff (H : B.IsAlt) {x y} : B x y = 0 ↔ B y x = 0 := H.isRefl.eq_iff
end IsAlt
end AddCommGroup
end CommSemiring
section Semiring
variable [CommRing R] [AddCommGroup M] [Module R M] [CommSemiring R₁] [AddCommMonoid M₁]
[Module R₁ M₁] {I : R₁ →+* R}
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
B.IsAlt ↔ B = -B.flip := by
constructor <;> intro h
· ext
simp_rw [LinearMap.neg_apply, flip_apply]
exact (h.neg _ _).symm
intro x
let h' := congr($h x x)
simp only [LinearMap.neg_apply, flip_apply, ← add_eq_zero_iff_eq_neg] at h'
exact add_self_eq_zero.mp h'
end Semiring
end Alternating
end LinearMap
namespace LinearMap
/-! ### Adjoint pairs -/
section AdjointPair
section AddCommMonoid
variable [CommSemiring R]
variable [AddCommMonoid M] [Module R M]
variable [AddCommMonoid M₁] [Module R M₁]
variable [AddCommMonoid M₂] [Module R M₂]
variable [AddCommMonoid M₃] [Module R M₃]
variable {I : R →+* R}
variable {B : M →ₗ[R] M →ₛₗ[I] M₃} {B' : M₁ →ₗ[R] M₁ →ₛₗ[I] M₃} {B'' : M₂ →ₗ[R] M₂ →ₛₗ[I] M₃}
variable {f f' : M →ₗ[R] M₁} {g g' : M₁ →ₗ[R] M}
variable (B B' f g)
/-- Given a pair of modules equipped with bilinear maps, this is the condition for a pair of
maps between them to be mutually adjoint. -/
def IsAdjointPair (f : M → M₁) (g : M₁ → M) :=
∀ x y, B' (f x) y = B x (g y)
variable {B B' f g}
theorem isAdjointPair_iff_comp_eq_compl₂ : IsAdjointPair B B' f g ↔ B'.comp f = B.compl₂ g := by
constructor <;> intro h
· ext x y
rw [comp_apply, compl₂_apply]
exact h x y
· intro _ _
rw [← compl₂_apply, ← comp_apply, h]
theorem isAdjointPair_zero : IsAdjointPair B B' 0 0 := fun _ _ ↦ by
simp only [Pi.zero_apply, map_zero, LinearMap.zero_apply]
theorem isAdjointPair_id : IsAdjointPair B B (_root_.id : M → M) (_root_.id : M → M) :=
fun _ _ ↦ rfl
theorem isAdjointPair_one : IsAdjointPair B B (1 : Module.End R M) (1 : Module.End R M) :=
isAdjointPair_id
theorem IsAdjointPair.add {f f' : M → M₁} {g g' : M₁ → M} (h : IsAdjointPair B B' f g)
(h' : IsAdjointPair B B' f' g') :
IsAdjointPair B B' (f + f') (g + g') := fun x _ ↦ by
rw [Pi.add_apply, Pi.add_apply, B'.map_add₂, (B x).map_add, h, h']
theorem IsAdjointPair.comp {f : M → M₁} {g : M₁ → M} {f' : M₁ → M₂} {g' : M₂ → M₁}
(h : IsAdjointPair B B' f g) (h' : IsAdjointPair B' B'' f' g') :
IsAdjointPair B B'' (f' ∘ f) (g ∘ g') := fun _ _ ↦ by
rw [Function.comp_def, Function.comp_def, h', h]
theorem IsAdjointPair.mul {f g f' g' : Module.End R M} (h : IsAdjointPair B B f g)
(h' : IsAdjointPair B B f' g') : IsAdjointPair B B (f * f') (g' * g) :=
h'.comp h
end AddCommMonoid
section AddCommGroup
variable [CommRing R]
variable [AddCommGroup M] [Module R M]
variable [AddCommGroup M₁] [Module R M₁]
variable [AddCommGroup M₂] [Module R M₂]
variable {B : M →ₗ[R] M →ₗ[R] M₂} {B' : M₁ →ₗ[R] M₁ →ₗ[R] M₂}
variable {f f' : M → M₁} {g g' : M₁ → M}
theorem IsAdjointPair.sub (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') :
IsAdjointPair B B' (f - f') (g - g') := fun x _ ↦ by
rw [Pi.sub_apply, Pi.sub_apply, B'.map_sub₂, (B x).map_sub, h, h']
theorem IsAdjointPair.smul (c : R) (h : IsAdjointPair B B' f g) :
IsAdjointPair B B' (c • f) (c • g) := fun _ _ ↦ by
simp [h _]
end AddCommGroup
section OrthogonalMap
variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M]
(B : LinearMap.BilinForm R M) (f : M → M)
/-- A linear transformation `f` is orthogonal with respect to a bilinear form `B` if `B` is
bi-invariant with respect to `f`. -/
def IsOrthogonal : Prop :=
∀ x y, B (f x) (f y) = B x y
variable {B f}
@[simp]
lemma _root_.LinearEquiv.isAdjointPair_symm_iff {f : M ≃ M} :
LinearMap.IsAdjointPair B B f f.symm ↔ B.IsOrthogonal f :=
⟨fun hf x y ↦ by simpa using hf x (f y), fun hf x y ↦ by simpa using hf x (f.symm y)⟩
lemma isOrthogonal_of_forall_apply_same {F : Type*} [FunLike F M M] [LinearMapClass F R M M]
(f : F) (h : IsLeftRegular (2 : R)) (hB : B.IsSymm) (hf : ∀ x, B (f x) (f x) = B x x) :
B.IsOrthogonal f := by
intro x y
suffices 2 * B (f x) (f y) = 2 * B x y from h this
have := hf (x + y)
simp only [map_add, LinearMap.add_apply, hf x, hf y, show B y x = B x y from hB.eq y x] at this
rw [show B (f y) (f x) = B (f x) (f y) from hB.eq (f y) (f x)] at this
simp only [add_assoc, add_right_inj] at this
simp only [← add_assoc, add_left_inj] at this
simpa only [← two_mul] using this
end OrthogonalMap
end AdjointPair
/-! ### Self-adjoint pairs -/
section SelfadjointPair
section AddCommMonoid
variable [CommSemiring R]
variable [AddCommMonoid M] [Module R M]
variable [AddCommMonoid M₁] [Module R M₁]
variable {I : R →+* R}
variable (B F : M →ₗ[R] M →ₛₗ[I] M₁)
/-- The condition for an endomorphism to be "self-adjoint" with respect to a pair of bilinear maps
on the underlying module. In the case that these two maps are identical, this is the usual concept
of self adjointness. In the case that one of the maps is the negation of the other, this is the
usual concept of skew adjointness. -/
def IsPairSelfAdjoint (f : M → M) :=
IsAdjointPair B F f f
/-- An endomorphism of a module is self-adjoint with respect to a bilinear map if it serves as an
adjoint for itself. -/
protected def IsSelfAdjoint (f : M → M) :=
IsAdjointPair B B f f
end AddCommMonoid
section AddCommGroup
variable [CommRing R]
variable [AddCommGroup M] [Module R M] [AddCommGroup M₁] [Module R M₁]
variable [AddCommGroup M₂] [Module R M₂] (B F : M →ₗ[R] M →ₗ[R] M₂)
/-- The set of pair-self-adjoint endomorphisms are a submodule of the type of all endomorphisms. -/
def isPairSelfAdjointSubmodule : Submodule R (Module.End R M) where
carrier := { f | IsPairSelfAdjoint B F f }
zero_mem' := isAdjointPair_zero
add_mem' hf hg := hf.add hg
smul_mem' c _ h := h.smul c
/-- An endomorphism of a module is skew-adjoint with respect to a bilinear map if its negation
serves as an adjoint. -/
def IsSkewAdjoint (f : M → M) :=
IsAdjointPair B B f (-f)
/-- The set of self-adjoint endomorphisms of a module with bilinear map is a submodule. (In fact
it is a Jordan subalgebra.) -/
def selfAdjointSubmodule :=
isPairSelfAdjointSubmodule B B
/-- The set of skew-adjoint endomorphisms of a module with bilinear map is a submodule. (In fact
it is a Lie subalgebra.) -/
def skewAdjointSubmodule :=
isPairSelfAdjointSubmodule (-B) B
variable {B F}
@[simp]
theorem mem_isPairSelfAdjointSubmodule (f : Module.End R M) :
f ∈ isPairSelfAdjointSubmodule B F ↔ IsPairSelfAdjoint B F f :=
Iff.rfl
theorem isPairSelfAdjoint_equiv (e : M₁ ≃ₗ[R] M) (f : Module.End R M) :
IsPairSelfAdjoint B F f ↔
IsPairSelfAdjoint (B.compl₁₂ e e) (F.compl₁₂ e e) (e.symm.conj f) := by
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 [LinearEquiv.symm_conj_apply, coe_comp, LinearEquiv.coe_coe, compl₁₂_apply,
LinearEquiv.apply_symm_apply, Function.comp_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 [LinearEquiv.symm_conj_apply, compl₂_apply, coe_comp, LinearEquiv.coe_coe,
compl₁₂_apply, LinearEquiv.apply_symm_apply, Function.comp_apply]
have he : Function.Surjective (⇑(↑e : M₁ →ₗ[R] M) : M₁ → M) := e.surjective
simp_rw [IsPairSelfAdjoint, isAdjointPair_iff_comp_eq_compl₂, hₗ, hᵣ, compl₁₂_inj he he]
theorem isSkewAdjoint_iff_neg_self_adjoint (f : M → M) :
B.IsSkewAdjoint f ↔ IsAdjointPair (-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]
theorem mem_selfAdjointSubmodule (f : Module.End R M) :
f ∈ B.selfAdjointSubmodule ↔ B.IsSelfAdjoint f :=
Iff.rfl
@[simp]
theorem mem_skewAdjointSubmodule (f : Module.End R M) :
f ∈ B.skewAdjointSubmodule ↔ B.IsSkewAdjoint f := by
rw [isSkewAdjoint_iff_neg_self_adjoint]
exact Iff.rfl
end AddCommGroup
end SelfadjointPair
/-! ### Nondegenerate bilinear maps -/
section Nondegenerate
section SMulCommClass
variable {S₁ S₂ : Type*} [Semiring S₁] [Semiring S₂] [Semiring R₁] [Semiring R₂]
[AddCommMonoid M] [Module S₁ M] [Module S₂ M] [SMulCommClass S₂ S₁ M]
[AddCommMonoid M₁] [Module R₁ M₁]
[AddCommMonoid M₂] [Module R₂ M₂]
{I₁ : R₁ →+* S₁} {I₂ : R₂ →+* S₂}
/-- A bilinear map 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 SeparatingLeft (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop :=
∀ x : M₁, (∀ y : M₂, B x y = 0) → x = 0
variable (M₁ M₂ I₁ I₂) in
/-- In a non-trivial module, zero is not non-degenerate. -/
theorem not_separatingLeft_zero [Nontrivial M₁] : ¬(0 : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M).SeparatingLeft :=
let ⟨m, hm⟩ := exists_ne (0 : M₁)
fun h ↦ hm (h m fun _n ↦ rfl)
theorem SeparatingLeft.ne_zero [Nontrivial M₁] {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}
(h : B.SeparatingLeft) : B ≠ 0 := fun h0 ↦ not_separatingLeft_zero M₁ M₂ I₁ I₂ <| h0 ▸ h
/-- A bilinear map 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 SeparatingRight (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop :=
∀ y : M₂, (∀ x : M₁, B x y = 0) → y = 0
/-- A bilinear map is called non-degenerate if it is left-separating and right-separating. -/
def Nondegenerate (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) : Prop :=
SeparatingLeft B ∧ SeparatingRight B
section Linear
variable [AddCommMonoid Mₗ₁] [AddCommMonoid Mₗ₂] [AddCommMonoid Mₗ₁'] [AddCommMonoid Mₗ₂']
variable [CommSemiring R] [Module R M]
variable [Module R Mₗ₁] [Module R Mₗ₂] [Module R Mₗ₁'] [Module R Mₗ₂']
variable {B : Mₗ₁ →ₗ[R] Mₗ₂ →ₗ[R] M} (e₁ : Mₗ₁ ≃ₗ[R] Mₗ₁') (e₂ : Mₗ₂ ≃ₗ[R] Mₗ₂')
theorem SeparatingLeft.congr (h : B.SeparatingLeft) :
(e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingLeft := by
intro x hx
rw [← e₁.symm.map_eq_zero_iff]
refine h (e₁.symm x) fun y ↦ ?_
specialize hx (e₂ y)
simp only [LinearEquiv.arrowCongr_apply, LinearEquiv.symm_apply_apply,
LinearEquiv.map_eq_zero_iff] at hx
exact hx
theorem SeparatingRight.congr (h : B.SeparatingRight) :
(e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingRight :=
SeparatingLeft.congr (B := B.flip) e₂ e₁ h
theorem Nondegenerate.congr (h : B.Nondegenerate) :
(e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).Nondegenerate :=
⟨h.1.congr e₁ e₂, h.2.congr e₁ e₂⟩
@[simp]
theorem separatingLeft_congr_iff :
(e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingLeft ↔ B.SeparatingLeft :=
⟨fun h ↦ by
convert h.congr e₁.symm e₂.symm
ext x y
simp,
SeparatingLeft.congr e₁ e₂⟩
@[simp]
theorem separatingRight_congr_iff : (e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M))
B).SeparatingRight ↔ B.SeparatingRight :=
separatingLeft_congr_iff (B := B.flip) e₂ e₁
@[simp]
theorem nondegenerate_congr_iff :
(e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).Nondegenerate ↔ B.Nondegenerate :=
⟨fun h ↦ ⟨separatingLeft_congr_iff e₁ e₂ |>.mp h.1, separatingRight_congr_iff e₁ e₂ |>.mp h.2⟩,
.congr e₁ e₂⟩
end Linear
variable {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}
attribute [local instance] SMulCommClass.symm in
@[simp]
theorem flip_separatingRight : B.flip.SeparatingRight ↔ B.SeparatingLeft :=
⟨fun hB x hy ↦ hB x hy, fun hB x hy ↦ hB x hy⟩
attribute [local instance] SMulCommClass.symm in
@[simp]
theorem flip_separatingLeft : B.flip.SeparatingLeft ↔ SeparatingRight B := by
rw [← flip_separatingRight, flip_flip]
attribute [local instance] SMulCommClass.symm in
@[simp]
theorem flip_nondegenerate : B.flip.Nondegenerate ↔ B.Nondegenerate :=
Iff.trans and_comm (and_congr flip_separatingRight flip_separatingLeft)
theorem separatingLeft_iff_linear_nontrivial : B.SeparatingLeft ↔ ∀ x : M₁, B x = 0 → x = 0 := by
constructor <;> intro h x hB
· simpa only [hB, LinearMap.zero_apply, eq_self_iff_true, forall_const] using h x
have h' : B x = 0 := by
ext
rw [LinearMap.zero_apply]
exact hB _
exact h x h'
theorem separatingRight_iff_linear_flip_nontrivial :
B.SeparatingRight ↔ ∀ y : M₂, B.flip y = 0 → y = 0 := by
have := SMulCommClass.symm
rw [← flip_separatingLeft, separatingLeft_iff_linear_nontrivial]
/-- A bilinear map is left-separating if and only if it has a trivial kernel. -/
theorem separatingLeft_iff_ker_eq_bot : B.SeparatingLeft ↔ LinearMap.ker B = ⊥ :=
Iff.trans separatingLeft_iff_linear_nontrivial LinearMap.ker_eq_bot'.symm
attribute [local instance] SMulCommClass.symm in
/-- A bilinear map is right-separating if and only if its flip has a trivial kernel. -/
theorem separatingRight_iff_flip_ker_eq_bot :
B.SeparatingRight ↔ LinearMap.ker B.flip = ⊥ := by
rw [← flip_separatingLeft, separatingLeft_iff_ker_eq_bot]
omit [SMulCommClass S₂ S₁ M] in
/-- The identity pairing is left-separating. -/
protected theorem SeparatingLeft.id [SMulCommClass S₁ S₂ M] :
SeparatingLeft (.id : (M₁ →ₛₗ[I₁] M) →ₗ[S₂] M₁ →ₛₗ[I₁] M) :=
separatingLeft_iff_ker_eq_bot.mpr ker_id
alias id_separatingLeft := SeparatingLeft.id
/-- The pairing `Dual.eval` is right-separating. -/
protected theorem SeparatingRight.eval [CommSemiring R] [Module R M] :
(Dual.eval R M).SeparatingRight :=
id_separatingLeft
alias eval_separatingRight := SeparatingRight.eval
end SMulCommClass
section CommRing
variable [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup M₁] [Module R M₁]
theorem IsRefl.nondegenerate_iff_separatingLeft {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl) :
B.Nondegenerate ↔ B.SeparatingLeft := by
refine ⟨fun h ↦ h.1, fun hB' ↦ ⟨hB', ?_⟩⟩
rw [separatingRight_iff_flip_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mp]
rwa [← separatingLeft_iff_ker_eq_bot]
theorem IsRefl.nondegenerate_iff_separatingRight {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl) :
B.Nondegenerate ↔ B.SeparatingRight := by
refine ⟨fun h ↦ h.2, fun hB' ↦ ⟨?_, hB'⟩⟩
rw [separatingLeft_iff_ker_eq_bot, hB.ker_eq_bot_iff_ker_flip_eq_bot.mpr]
rwa [← separatingRight_iff_flip_ker_eq_bot]
lemma disjoint_ker_of_nondegenerate_restrict {B : M →ₗ[R] M →ₗ[R] M₁} {W : Submodule R M}
(hW : (B.domRestrict₁₂ W W).Nondegenerate) :
Disjoint W (LinearMap.ker B) := by
refine Submodule.disjoint_def.mpr fun x hx hx' ↦ ?_
let x' : W := ⟨x, hx⟩
suffices x' = 0 by simpa [x']
apply hW.1 x'
simp_rw [Subtype.forall, domRestrict₁₂_apply]
intro y hy
rw [mem_ker] at hx'
simp [x', hx']
lemma IsSymm.nondegenerate_restrict_of_isCompl_ker {B : M →ₗ[R] M →ₗ[R] R} (hB : B.IsSymm)
{W : Submodule R M} (hW : IsCompl W (LinearMap.ker B)) :
(B.domRestrict₁₂ W W).Nondegenerate := by
have hB' : (B.domRestrict₁₂ W W).IsRefl := fun x y ↦ hB.isRefl (W.subtype x) (W.subtype y)
rw [LinearMap.IsRefl.nondegenerate_iff_separatingLeft hB']
intro ⟨x, hx⟩ hx'
simp only [Submodule.mk_eq_zero]
replace hx' : ∀ y ∈ W, B x y = 0 := by simpa [Subtype.forall] using! hx'
replace hx' : x ∈ W ⊓ ker B := by
refine ⟨hx, ?_⟩
ext y
obtain ⟨u, hu, v, hv, rfl⟩ : ∃ u ∈ W, ∃ v ∈ ker B, u + v = y := by
rw [← Submodule.mem_sup, hW.sup_eq_top]; exact Submodule.mem_top
suffices B x u = 0 by rw [mem_ker] at hv; simpa [← hB.eq v, hv]
exact hx' u hu
simpa [hW.inf_eq_bot] using! hx'
end CommRing
section IsOrthoᵢ
variable {R M M₁ : Type*} [CommSemiring R] [AddCommMonoid M] [AddCommMonoid M₁]
[Module R M] [Module R M₁] {I I' : R →+* R} {B : M →ₛₗ[I] M →ₛₗ[I'] M₁}
/-- An orthogonal basis with respect to a left-separating bilinear map has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
{v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
(i : n) : B (v i) (v i) ≠ 0 := by
intro ho
refine v.ne_zero i (hB (v i) fun m ↦ ?_)
obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
rw [Basis.repr_symm_apply, Finsupp.linearCombination_apply, Finsupp.sum, map_sum]
apply Finset.sum_eq_zero
rintro j -
rw [map_smulₛₗ]
suffices B (v i) (v j) = 0 by rw [this, smul_zero]
obtain rfl | hij := eq_or_ne i j
· exact ho
· exact h hij
/-- An orthogonal basis with respect to a right-separating bilinear map has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R]
{v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight)
(i : n) : B (v i) (v i) ≠ 0 := by
rw [isOrthoᵢ_flip] at h
exact h.not_isOrtho_basis_self_of_separatingLeft (flip_separatingLeft.mpr hB) i
variable [IsDomain R] [IsTorsionFree R M₁]
/-- Given an orthogonal basis with respect to a bilinear map, the bilinear map is left-separating if
the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M)
(hO : B.IsOrthoᵢ v) (h : ∀ i, B (v i) (v i) ≠ 0) : B.SeparatingLeft := by
intro m hB
obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
rw [LinearEquiv.map_eq_zero_iff]
ext i
rw [Finsupp.zero_apply]
specialize hB (v i)
simp_rw [Basis.repr_symm_apply, Finsupp.linearCombination_apply, Finsupp.sum, map_sum₂,
map_smulₛₗ₂] at hB
rw [Finset.sum_eq_single i] at hB
· cases smul_eq_zero.mp hB
· assumption
· specialize h i
contradiction
· intro j _hj hij
replace hij : B (v j) (v i) = 0 := hO hij
rw [hij, RingHom.id_apply, smul_zero]
· intro hi
replace hi : vi i = 0 := Finsupp.notMem_support_iff.mp hi
rw [hi, RingHom.id_apply, zero_smul]
/-- Given an orthogonal basis with respect to a bilinear map, the bilinear map is right-separating
if the basis has no elements which are self-orthogonal. -/
lemma IsOrthoᵢ.separatingRight_iff_not_isOrtho_basis_self {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M)
(hO : B.IsOrthoᵢ v) (h : ∀ i, B (v i) (v i) ≠ 0) : B.SeparatingRight := by
rw [isOrthoᵢ_flip] at hO
rw [← flip_separatingLeft]
refine IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self v hO fun i ↦ ?_
exact h i
/-- Given an orthogonal basis with respect to a bilinear map, the bilinear map is nondegenerate
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.nondegenerate_of_not_isOrtho_basis_self {B : M →ₗ[R] M →ₗ[R] M₁} (v : Basis n R M)
(hO : B.IsOrthoᵢ v) (h : ∀ i, B (v i) (v i) ≠ 0) : B.Nondegenerate :=
⟨IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self v hO h,
IsOrthoᵢ.separatingRight_iff_not_isOrtho_basis_self v hO h⟩
end IsOrthoᵢ
end Nondegenerate
namespace BilinForm
lemma apply_smul_sub_smul_sub_eq [CommRing R] [AddCommGroup M] [Module R M]
(B : LinearMap.BilinForm R M) (x y : M) :
B ((B x y) • x - (B x x) • y) ((B x y) • x - (B x x) • y) =
(B x x) * ((B x x) * (B y y) - (B x y) * (B y x)) := by
simp [mul_comm, mul_sub]
variable [CommRing R] [LinearOrder R] [IsStrictOrderedRing R]
[AddCommGroup M] [Module R M] (B : LinearMap.BilinForm R M)
/-- The **Cauchy-Schwarz inequality** for positive semidefinite forms. -/
@[wikidata Q190546]
lemma apply_mul_apply_le_of_forall_zero_le (hs : ∀ x, 0 ≤ B x x) (x y : M) :
(B x y) * (B y x) ≤ (B x x) * (B y y) := by
have aux (x y : M) : 0 ≤ (B x x) * ((B x x) * (B y y) - (B x y) * (B y x)) := by
rw [← apply_smul_sub_smul_sub_eq B x y]
exact hs (B x y • x - B x x • y)
rcases lt_or_ge 0 (B x x) with hx | hx
· exact sub_nonneg.mp <| nonneg_of_mul_nonneg_right (aux x y) hx
· replace hx : B x x = 0 := le_antisymm hx (hs x)
rcases lt_or_ge 0 (B y y) with hy | hy
· rw [mul_comm (B x y), mul_comm (B x x)]
exact sub_nonneg.mp <| nonneg_of_mul_nonneg_right (aux y x) hy
· replace hy : B y y = 0 := le_antisymm hy (hs y)
suffices B x y = - B y x by simpa [this, hx, hy] using mul_self_nonneg (B y x)
rw [eq_neg_iff_add_eq_zero]
apply le_antisymm
· simpa [hx, hy, le_neg_iff_add_nonpos_left] using hs (x - y)
· simpa [hx, hy] using hs (x + y)
/-- The **Cauchy-Schwarz inequality** for positive semidefinite symmetric forms. -/
lemma apply_sq_le_of_symm (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) (x y : M) :
(B x y) ^ 2 ≤ (B x x) * (B y y) := by
rw [show (B x y) ^ 2 = (B x y) * (B y x) by rw [sq, ← hB.eq, RingHom.id_apply]]
exact apply_mul_apply_le_of_forall_zero_le B hs x y
/-- The equality case of **Cauchy-Schwarz**. -/
lemma not_linearIndependent_of_apply_mul_apply_eq (hp : ∀ x, x ≠ 0 → 0 < B x x)
(x y : M) (he : (B x y) * (B y x) = (B x x) * (B y y)) :
¬ LinearIndependent R ![x, y] := by
have hz : (B x y) • x - (B x x) • y = 0 := by
by_contra hc
exact (ne_of_lt (hp ((B x) y • x - (B x) x • y) hc)).symm <|
(apply_smul_sub_smul_sub_eq B x y).symm ▸ (mul_eq_zero_of_right ((B x) x)
(sub_eq_zero_of_eq he.symm))
by_contra hL
by_cases hx : x = 0
· simpa [hx] using LinearIndependent.ne_zero 0 hL
· have h := sub_eq_zero.mpr (sub_eq_zero.mp hz).symm
rw [sub_eq_add_neg, ← neg_smul, add_comm] at h
exact (Ne.symm (ne_of_lt (hp x hx))) (LinearIndependent.eq_zero_of_pair hL h).2
lemma apply_apply_same_eq_zero_iff (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) {x : M} :
B x x = 0 ↔ x ∈ LinearMap.ker B := by
rw [LinearMap.mem_ker]
refine ⟨fun h ↦ ?_, fun h ↦ by simp [h]⟩
ext y
have := B.apply_sq_le_of_symm hs hB x y
simp only [h, zero_mul] at this
exact eq_zero_of_pow_eq_zero <| le_antisymm this (sq_nonneg (B x y))
lemma nondegenerate_iff (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) :
B.Nondegenerate ↔ ∀ x, B x x = 0 ↔ x = 0 := by
simp_rw [hB.isRefl.nondegenerate_iff_separatingLeft, separatingLeft_iff_ker_eq_bot,
Submodule.eq_bot_iff, B.apply_apply_same_eq_zero_iff hs hB, mem_ker]
exact forall_congr' fun x ↦ by aesop
/-- A convenience variant of `LinearMap.BilinForm.nondegenerate_iff` characterising nondegeneracy as
positive definiteness. -/
lemma nondegenerate_iff' (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm) :
B.Nondegenerate ↔ ∀ x, x ≠ 0 → 0 < B x x := by
rw [B.nondegenerate_iff hs hB]
contrapose!
exact exists_congr fun x ↦ ⟨by aesop, fun ⟨h₀, h⟩ ↦ Or.inl ⟨le_antisymm h (hs x), h₀⟩⟩
lemma nondegenerate_restrict_iff_disjoint_ker (hs : ∀ x, 0 ≤ B x x) (hB : B.IsSymm)
{W : Submodule R M} :
(B.domRestrict₁₂ W W).Nondegenerate ↔ Disjoint W (LinearMap.ker B) := by
refine ⟨disjoint_ker_of_nondegenerate_restrict, fun hW ↦ ?_⟩
have hB' : (B.domRestrict₁₂ W W).IsRefl := fun x y ↦ hB.isRefl (W.subtype x) (W.subtype y)
rw [IsRefl.nondegenerate_iff_separatingLeft hB']
intro ⟨x, hx⟩ h
simp_rw [Subtype.forall, domRestrict₁₂_apply] at h
specialize h x hx
rw [B.apply_apply_same_eq_zero_iff hs hB] at h
have key : x ∈ W ⊓ LinearMap.ker B := ⟨hx, h⟩
simpa [hW.eq_bot] using key
variable [IsTorsionFree R M]
/-- Strict **Cauchy-Schwarz** is equivalent to linear independence for positive definite forms. -/
lemma apply_mul_apply_lt_iff_linearIndependent (hp : ∀ x, x ≠ 0 → 0 < B x x) (x y : M) :
B x y * B y x < B x x * B y y ↔ LinearIndependent R ![x, y] := by
have hle z : 0 ≤ B z z := by obtain rfl | hz := eq_or_ne z 0 <;> simp [le_of_lt, *]
constructor
· contrapose!
intro h
rw [LinearIndependent.pair_iff] at h
push Not at h
obtain ⟨r, s, hl, h0⟩ := h
by_cases hr : r = 0; · simp_all
by_cases hs : s = 0; · simp_all
suffices
(B (r • x) (r • x)) * (B (s • y) (s • y)) = (B (r • x) (s • y)) * (B (s • y) (r • x)) by
simp only [map_smul, LinearMap.smul_apply, smul_eq_mul] at this
rw [show r * (r * (B x) x) * (s * (s * (B y) y)) = (r * r * s * s) * ((B x) x * (B y) y) by
ring, show s * (r * (B x) y) * (r * (s * (B y) x)) = (r * r * s * s) * ((B x) y * (B y) x)
by ring] at this
have hrs : r * r * s * s ≠ 0 := by simp [hr, hs]
exact le_of_eq <| mul_right_injective₀ hrs this
simp [show s • y = - r • x by rwa [neg_smul, ← add_eq_zero_iff_eq_neg']]
· contrapose!
intro h
exact not_linearIndependent_of_apply_mul_apply_eq B hp x y (le_antisymm
(apply_mul_apply_le_of_forall_zero_le B hle x y) h)
/-- Strict **Cauchy-Schwarz** is equivalent to linear independence for positive definite symmetric
forms. -/
lemma apply_sq_lt_iff_linearIndependent_of_symm (hp : ∀ x, x ≠ 0 → 0 < B x x) (hB : B.IsSymm)
(x y : M) : B x y ^ 2 < B x x * B y y ↔ LinearIndependent R ![x, y] := by
rw [show B x y ^ 2 = B x y * B y x by rw [sq, ← hB.eq, RingHom.id_apply]]
exact apply_mul_apply_lt_iff_linearIndependent B hp x y
end BilinForm
end LinearMap
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.39Angebot
¤
*Eine klare Vorstellung vom Zielzustand
|
|
2026-11-24
|
|
|
|
|