Inner product spaces #
This file defines inner product spaces. We do not formally define Hilbert spaces, but they can be
obtained using the set of assumptions
[NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [CompleteSpace E]
.
An inner product space is a vector space endowed with an inner product. It generalizes the notion of
dot product in ℝ^n
and provides the means of defining the length of a vector and the angle between
two vectors. In particular vectors x
and y
are orthogonal if their inner product equals zero.
We define both the real and complex cases at the same time using the RCLike
typeclass.
Rather than defining the norm on an inner product space to be √(re ⟪x, x⟫)
, we assume that a norm
is given, and add a hypothesis stating that ‖x‖ ^ 2 = re (inner x x)
. This makes it possible to
handle spaces where the norm is equal, but not defeq, to the square root of the
inner product. Defining a norm starting from an inner product is handled via the
InnerProductSpace.Core
structure.
This file is intended to contain the minimal amount of machinery needed to define inner product
spaces, and to construct a normed space from an inner product space. Many more general lemmas can
be found in Analysis.InnerProductSpace.Basic
. For the specific construction of an inner product
structure on n → 𝕜
for 𝕜 = ℝ
or ℂ
, see EuclideanSpace
in
Analysis.InnerProductSpace.PiL2
.
Main results #
- We define the class
InnerProductSpace 𝕜 E
extendingNormedSpace 𝕜 E
with a number of basic properties, most notably the Cauchy-Schwarz inequality. Here𝕜
is understood to be eitherℝ
orℂ
, through theRCLike
typeclass.
Notation #
We globally denote the real and complex inner products by ⟪·, ·⟫_ℝ
and ⟪·, ·⟫_ℂ
respectively.
We also provide two notation namespaces: RealInnerProductSpace
, ComplexInnerProductSpace
,
which respectively introduce the plain notation ⟪·, ·⟫
for the real and complex inner product.
Implementation notes #
We choose the convention that inner products are conjugate linear in the first argument and linear in the second.
Tags #
inner product space, Hilbert space, norm
References #
- [Clément & Martin, The Lax-Milgram Theorem. A detailed proof to be formalized in Coq]
- [Clément & Martin, A Coq formal proof of the Lax–Milgram theorem]
The Coq code is available at the following address: http://www.lri.fr/~sboldo/elfic/index.html
The inner product with values in 𝕜
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3
command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The inner product with values in ℝ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The inner product with values in ℂ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A (pre) inner product space is a vector space with an additional operation called inner product.
The (semi)norm could be derived from the inner product, instead we require the existence of a
seminorm and the fact that ‖x‖^2 = re ⟪x, x⟫
to be able to put instances on 𝕂
or product spaces.
Note that NormedSpace
does not assume that ‖x‖=0
implies x=0
(it is rather a seminorm).
To construct a seminorm from an inner product, see PreInnerProductSpace.ofCore
.
- smul : 𝕜 → E → E
- inner : E → E → 𝕜
The inner product induces the norm.
- conj_symm (x y : E) : (starRingEnd 𝕜) (inner y x) = inner x y
The inner product is hermitian, taking the
conj
swaps the arguments. The inner product is additive in the first coordinate.
The inner product is conjugate linear in the first coordinate.
Instances
Constructing a normed space structure from an inner product #
In the definition of an inner product space, we require the existence of a norm, which is equal
(but maybe not defeq) to the square root of the scalar product. This makes it possible to put
an inner product space structure on spaces with a preexisting norm (for instance ℝ
), with good
properties. However, sometimes, one would like to define the norm starting only from a well-behaved
scalar product. This is what we implement in this paragraph, starting from a structure
InnerProductSpace.Core
stating that we have a nice scalar product.
Our goal here is not to develop a whole theory with all the supporting API, as this will be done
below for InnerProductSpace
. Instead, we implement the bare minimum to go as directly as
possible to the construction of the norm and the proof of the triangular inequality.
Warning: Do not use this Core
structure if the space you are interested in already has a norm
instance defined on it, otherwise this will create a second non-defeq norm instance!
A structure requiring that a scalar product is positive semidefinite and symmetric.
- inner : F → F → 𝕜
- conj_symm (x y : F) : (starRingEnd 𝕜) (inner y x) = inner x y
The inner product is hermitian, taking the
conj
swaps the arguments. The inner product is positive (semi)definite.
The inner product is additive in the first coordinate.
The inner product is conjugate linear in the first coordinate.
Instances
A structure requiring that a scalar product is positive definite. Some theorems that
require this assumptions are put under section InnerProductSpace.Core
.
- inner : F → F → 𝕜
The inner product is positive definite.
Instances
Equations
- instCoreOfCore 𝕜 F = { inner := inner, conj_symm := ⋯, nonneg_re := ⋯, add_left := ⋯, smul_left := ⋯ }
Define PreInnerProductSpace.Core
from PreInnerProductSpace
. Defined to reuse lemmas about
PreInnerProductSpace.Core
for PreInnerProductSpace
s. Note that the Seminorm
instance provided
by PreInnerProductSpace.Core.norm
is propositionally but not definitionally equal to the original
norm.
Equations
- PreInnerProductSpace.toCore = { toInner := InnerProductSpace.toInner, conj_symm := ⋯, nonneg_re := ⋯, add_left := ⋯, smul_left := ⋯ }
Instances For
Define InnerProductSpace.Core
from InnerProductSpace
. Defined to reuse lemmas about
InnerProductSpace.Core
for InnerProductSpace
s. Note that the Norm
instance provided by
InnerProductSpace.Core.norm
is propositionally but not definitionally equal to the original
norm.
Equations
- InnerProductSpace.toCore = { toInner := InnerProductSpace.toInner, conj_symm := ⋯, nonneg_re := ⋯, add_left := ⋯, smul_left := ⋯, definite := ⋯ }
Instances For
Inner product defined by the PreInnerProductSpace.Core
structure. We can't reuse
PreInnerProductSpace.Core.toInner
because it takes PreInnerProductSpace.Core
as an explicit
argument.
Equations
- InnerProductSpace.Core.toPreInner' = c.toInner
Instances For
The norm squared function for PreInnerProductSpace.Core
structure.
Equations
- InnerProductSpace.Core.normSq x = RCLike.re (inner x x)
Instances For
An auxiliary equality useful to prove the Cauchy–Schwarz inequality. Here we use the standard argument involving the discriminant of quadratic form.
Another auxiliary equality related with the Cauchy–Schwarz inequality: the square of the
seminorm of ⟪x, y⟫ • x - ⟪x, x⟫ • y
is equal to ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2 - ‖⟪x, y⟫‖ ^ 2)
.
We use InnerProductSpace.ofCore.normSq x
etc (defeq to is_R_or_C.re ⟪x, x⟫
) instead of ‖x‖ ^ 2
etc to avoid extra rewrites when applying it to an InnerProductSpace
.
Cauchy–Schwarz inequality.
We need this for the PreInnerProductSpace.Core
structure to prove the triangle inequality below
when showing the core is a normed group and to take the quotient.
(This is not intended for general use; see Analysis.InnerProductSpace.Basic
for a variety of
versions of Cauchy-Schwartz for an inner product space, rather than a PreInnerProductSpace.Core
).
(Semi)norm constructed from an PreInnerProductSpace.Core
structure, defined to be the square
root of the scalar product.
Instances For
Seminormed group structure constructed from an PreInnerProductSpace.Core
structure
Equations
Instances For
Normed space (which is actually a seminorm) structure constructed from an
PreInnerProductSpace.Core
structure
Equations
- InnerProductSpace.Core.toSeminormedSpace = NormedSpace.mk ⋯
Instances For
Inner product defined by the InnerProductSpace.Core
structure. We can't reuse
InnerProductSpace.Core.toInner
because it takes InnerProductSpace.Core
as an explicit
argument.
Equations
- InnerProductSpace.Core.toInner' = cd.toInner
Instances For
Normed group structure constructed from an InnerProductSpace.Core
structure
Equations
Instances For
Normed space structure constructed from an InnerProductSpace.Core
structure
Equations
- InnerProductSpace.Core.toNormedSpace = NormedSpace.mk ⋯
Instances For
Given an InnerProductSpace.Core
structure on a space, one can use it to turn
the space into an inner product space. The NormedAddCommGroup
structure is expected
to already be defined with InnerProductSpace.ofCore.toNormedAddCommGroup
.
Equations
- InnerProductSpace.ofCore cd = InnerProductSpace.mk ⋯ ⋯ ⋯ ⋯