Bilinear form #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines a bilinear form over a module. Basic ideas such as orthogonality are also introduced, as well as reflexivive, symmetric, non-degenerate and alternating bilinear forms. Adjoints of linear maps with respect to a bilinear form are also introduced.
A bilinear form on an R-(semi)module M, is a function from M x M to R, that is linear in both arguments. Comments will typically abbreviate "(semi)module" as just "module", but the definitions should be as general as possible.
The result that there exists an orthogonal basis with respect to a symmetric,
nondegenerate bilinear form can be found in quadratic_form.lean
with
exists_orthogonal_basis
.
Notations #
Given any term B of type bilin_form, due to a coercion, can use the notation B x y to refer to the function field, ie. B x y = B.bilin x y.
In this file we use the following type variables:
M
,M'
, ... are modules over the semiringR
,M₁
,M₁'
, ... are modules over the ringR₁
,M₂
,M₂'
, ... are modules over the commutative semiringR₂
,M₃
,M₃'
, ... are modules over the commutative ringR₃
,V
, ... is a vector space over the fieldK
.
References #
Tags #
Bilinear form,
- bilin : M → M → R
- bilin_add_left : ∀ (x y z : M), self.bilin (x + y) z = self.bilin x z + self.bilin y z
- bilin_smul_left : ∀ (a : R) (x y : M), self.bilin (a • x) y = a * self.bilin x y
- bilin_add_right : ∀ (x y z : M), self.bilin x (y + z) = self.bilin x y + self.bilin x z
- bilin_smul_right : ∀ (a : R) (x y : M), self.bilin x (a • y) = a * self.bilin x y
bilin_form R M
is the type of R
-bilinear functions M → M → R
.
Instances for bilin_form
Equations
- bilin_form.has_coe_to_fun = {coe := bilin_form.bilin _inst_3}
Equations
- bilin_form.has_zero = {zero := {bilin := λ (x y : M), 0, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}}
Equations
- bilin_form.has_add = {add := λ (B D : bilin_form R M), {bilin := λ (x y : M), ⇑B x y + ⇑D x y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}}
bilin_form R M
inherits the scalar action by α
on R
if this is compatible with
multiplication.
When R
itself is commutative, this provides an R
-action via algebra.id
.
Equations
- bilin_form.has_smul = {smul := λ (c : α) (B : bilin_form R M), {bilin := λ (x y : M), c • ⇑B x y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}}
Equations
- bilin_form.add_comm_monoid = function.injective.add_comm_monoid coe_fn bilin_form.coe_injective bilin_form.coe_zero bilin_form.coe_add bilin_form.add_comm_monoid._proof_2
Equations
- bilin_form.has_neg = {neg := λ (B : bilin_form R₁ M₁), {bilin := λ (x y : M₁), -⇑B x y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}}
Equations
- bilin_form.has_sub = {sub := λ (B D : bilin_form R₁ M₁), {bilin := λ (x y : M₁), ⇑B x y - ⇑D x y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}}
Equations
- bilin_form.add_comm_group = function.injective.add_comm_group coe_fn bilin_form.add_comm_group._proof_3 bilin_form.add_comm_group._proof_4 bilin_form.add_comm_group._proof_5 bilin_form.coe_neg bilin_form.coe_sub bilin_form.add_comm_group._proof_6 bilin_form.add_comm_group._proof_7
Equations
- bilin_form.inhabited = {default := 0}
coe_fn
as an add_monoid_hom
Equations
- bilin_form.coe_fn_add_monoid_hom = {to_fun := coe_fn bilin_form.has_coe_to_fun, map_zero' := _, map_add' := _}
Equations
- bilin_form.module = function.injective.module α bilin_form.coe_fn_add_monoid_hom bilin_form.coe_injective bilin_form.module._proof_1
Auxiliary construction for the flip of a bilinear form, obtained by exchanging the left and
right arguments. This version is a linear_map
; it is later upgraded to a linear_equiv
in flip_hom
.
Equations
- bilin_form.flip_hom_aux R₂ = {to_fun := λ (A : bilin_form R M), {bilin := λ (i j : M), ⇑A j i, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}, map_add' := _, map_smul' := _}
The flip of a bilinear form, obtained by exchanging the left and right arguments. This is a
less structured version of the equiv which applies to general (noncommutative) rings R
with a
distinguished commutative subring R₂
; over a commutative ring use flip
.
Equations
- bilin_form.flip_hom R₂ = {to_fun := (bilin_form.flip_hom_aux R₂).to_fun, map_add' := _, map_smul' := _, inv_fun := ⇑(bilin_form.flip_hom_aux R₂), left_inv := _, right_inv := _}
The flip of a bilinear form over a ring, obtained by exchanging the left and right arguments,
here considered as an ℕ
-linear equivalence, i.e. an additive equivalence.
The flip
of a bilinear form over a commutative ring, obtained by exchanging the left and
right arguments.
Auxiliary definition to define to_lin_hom
; see below.
Auxiliary definition to define to_lin_hom
; see below.
Equations
- A.to_lin_hom_aux₂ = {to_fun := A.to_lin_hom_aux₁, map_add' := _, map_smul' := _}
The linear map obtained from a bilin_form
by fixing the left co-ordinate and evaluating in
the right.
This is the most general version of the construction; it is R₂
-linear for some distinguished
commutative subsemiring R₂
of the scalar ring. Over a semiring with no particular distinguished
such subsemiring, use to_lin'
, which is ℕ
-linear. Over a commutative semiring, use to_lin
,
which is linear.
Equations
- bilin_form.to_lin_hom R₂ = {to_fun := bilin_form.to_lin_hom_aux₂ _inst_18, map_add' := _, map_smul' := _}
The linear map obtained from a bilin_form
by fixing the left co-ordinate and evaluating in
the right.
Over a commutative semiring, use to_lin
, which is linear rather than ℕ
-linear.
The linear map obtained from a bilin_form
by fixing the right co-ordinate and evaluating in
the left.
This is the most general version of the construction; it is R₂
-linear for some distinguished
commutative subsemiring R₂
of the scalar ring. Over semiring with no particular distinguished
such subsemiring, use to_lin'_flip
, which is ℕ
-linear. Over a commutative semiring, use
to_lin_flip
, which is linear.
Equations
The linear map obtained from a bilin_form
by fixing the right co-ordinate and evaluating in
the left.
Over a commutative semiring, use to_lin_flip
, which is linear rather than ℕ
-linear.
A map with two arguments that is linear in both is a bilinear form.
This is an auxiliary definition for the full linear equivalence linear_map.to_bilin
.
Equations
- f.to_bilin_aux = {bilin := λ (x y : M₂), ⇑(⇑f x) y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}
Bilinear forms are linearly equivalent to maps with two arguments that are linear in both.
Equations
- bilin_form.to_lin = {to_fun := (bilin_form.to_lin_hom R₂).to_fun, map_add' := _, map_smul' := _, inv_fun := linear_map.to_bilin_aux _inst_9, left_inv := _, right_inv := _}
A map with two arguments that is linear in both is linearly equivalent to bilinear form.
Equations
Apply a linear map on the output of a bilinear form.
Equations
- f.comp_bilin_form B = {bilin := λ (x y : M), ⇑f (⇑B x y), bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}
Apply a linear map on the left and right argument of a bilinear form.
Equations
- B.comp l r = {bilin := λ (x y : M), ⇑B (⇑l x) (⇑r y), bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}
Apply a linear map to the left argument of a bilinear form.
Equations
- B.comp_left f = B.comp f linear_map.id
Apply a linear map to the right argument of a bilinear form.
Equations
- B.comp_right f = B.comp linear_map.id f
Apply a linear equivalence on the arguments of a bilinear form.
lin_mul_lin f g
is the bilinear form mapping x
and y
to f x * g y
Equations
- bilin_form.lin_mul_lin f g = {bilin := λ (x y : M₂), ⇑f x * ⇑g y, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}
The proposition that two elements of a bilinear form space are orthogonal. For orthogonality
of an indexed set of elements, use bilin_form.is_Ortho
.
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
A set of orthogonal vectors v
with respect to some bilinear form B
is linearly independent
if for all i
, B (v i) (v i) ≠ 0
.
Two bilinear forms are equal when they are equal on all basis vectors.
Write out B x y
as a sum over B (b i) (b j)
if b
is a basis.
Reflexivity, symmetry, and alternativity #
The proposition that a bilinear form is symmetric
Instances for bilin_form.is_symm
The proposition that a bilinear form is alternating
Linear adjoints #
Given a pair of modules equipped with bilinear forms, this is the condition for a pair of maps between them to be mutually adjoint.
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.
Equations
- B.is_pair_self_adjoint F f = B.is_adjoint_pair F f f
The set of pair-self-adjoint endomorphisms are a submodule of the type of all endomorphisms.
Equations
- B₂.is_pair_self_adjoint_submodule F₂ = {carrier := {f : module.End R₂ M₂ | B₂.is_pair_self_adjoint F₂ f}, add_mem' := _, zero_mem' := _, smul_mem' := _}
An endomorphism of a module is self-adjoint with respect to a bilinear form if it serves as an adjoint for itself.
Equations
- B.is_self_adjoint f = B.is_adjoint_pair B f f
An endomorphism of a module is skew-adjoint with respect to a bilinear form if its negation serves as an adjoint.
Equations
- B₁.is_skew_adjoint f = B₁.is_adjoint_pair 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.)
Equations
The set of skew-adjoint endomorphisms of a module with bilinear form is a submodule. (In fact it is a Lie subalgebra.)
Equations
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.
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.
The restriction of a bilinear form on a submodule.
Equations
- B.restrict W = {bilin := λ (a b : ↥W), ⇑B ↑a ↑b, bilin_add_left := _, bilin_smul_left := _, bilin_add_right := _, bilin_smul_right := _}
The restriction of a symmetric bilinear form on a submodule is also symmetric.
A nondegenerate bilinear form is a bilinear form such that the only element that is orthogonal
to every other element is 0
; i.e., for all nonzero m
in M
, there exists n
in M
with
B m n ≠ 0
.
Note that for general (neither symmetric nor antisymmetric) bilinear forms this definition has a
chirality; in addition to this "left" nondegeneracy condition one could define a "right"
nondegeneracy condition that in the situation described, B n m ≠ 0
. This variant definition is
not currently provided in mathlib. In finite dimension either definition implies the other.
In a non-trivial module, zero is not non-degenerate.
A bilinear form is nondegenerate if and only if it has a trivial kernel.
The restriction of a reflexive bilinear form B
onto a submodule W
is
nondegenerate if disjoint W (B.orthogonal W)
.
An orthogonal basis with respect to a nondegenerate bilinear form has no self-orthogonal elements.
Given an orthogonal basis with respect to a bilinear form, the bilinear form is nondegenerate iff the basis has no elements which are self-orthogonal.
A subspace is complement to its orthogonal complement with respect to some reflexive bilinear form if that bilinear form restricted on to the subspace is nondegenerate.
A subspace is complement to its orthogonal complement with respect to some reflexive bilinear form if and only if that bilinear form restricted on to the subspace is nondegenerate.
Given a nondegenerate bilinear form B
on a finite-dimensional vector space, B.to_dual
is
the linear equivalence between a vector space and its dual with the underlying linear map
B.to_lin
.
Equations
- B.to_dual b = (⇑bilin_form.to_lin B).linear_equiv_of_injective _ bilin_form.to_dual._proof_13
The B
-dual basis B.dual_basis hB b
to a finite basis b
satisfies
B (B.dual_basis hB b i) (b j) = B (b i) (B.dual_basis hB b j) = if i = j then 1 else 0
,
where B
is a nondegenerate (symmetric) bilinear form and b
is a finite basis.
Equations
- B.dual_basis hB b = b.dual_basis.map (B.to_dual hB).symm
We note that we cannot use bilin_form.restrict_nondegenerate_iff_is_compl_orthogonal
for the
lemma below since the below lemma does not require V
to be finite dimensional. However,
bilin_form.restrict_nondegenerate_iff_is_compl_orthogonal
does not require B
to be nondegenerate
on the whole space.
The restriction of a reflexive, non-degenerate bilinear form on the orthogonal complement of the span of a singleton is also non-degenerate.
Given bilinear forms B₁, B₂
where B₂
is nondegenerate, symm_comp_of_nondegenerate
is the linear map B₂.to_lin⁻¹ ∘ B₁.to_lin
.
Equations
- B₁.symm_comp_of_nondegenerate B₂ b₂ = (B₂.to_dual b₂).symm.to_linear_map.comp (⇑bilin_form.to_lin B₁)
Given the nondegenerate bilinear form B
and the linear map φ
,
left_adjoint_of_nondegenerate
provides the left adjoint of φ
with respect to B
.
The lemma proving this property is bilin_form.is_adjoint_pair_left_adjoint_of_nondegenerate
.
Equations
- B.left_adjoint_of_nondegenerate b φ = (B.comp_right φ).symm_comp_of_nondegenerate B b
Given the nondegenerate bilinear form B
, the linear map φ
has a unique left adjoint given by
bilin_form.left_adjoint_of_nondegenerate
.