The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V16. Normed spaces and functional analysis

Mathlib.Analysis.InnerProductSpace.Defs

92 declarations. Mathlib docs Β· Source

Inner product spaces

This file defines inner product spaces. Hilbert spaces can be obtained using the set of assumptions [RCLike π•œ] [NormedAddCommGroup E] [InnerProductSpace π•œ E] [CompleteSpace E]. For convenience, a variable alias HilbertSpace is provided so that one can write variable? [HilbertSpace π•œ E] and get this as a suggestion.

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 βŸͺ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 extending NormedSpace π•œ E with a number of basic properties, most notably the Cauchy-Schwarz inequality. Here π•œ is understood to be either ℝ or β„‚, through the RCLike 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

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!

def InnerProductSpace.ctorIdx E1 #

{π•œ : Type u_4} β†’ {E : Type u_5} β†’ {inst : RCLike π•œ} β†’ {inst_1 : SeminormedAddCommGroup E} β†’ InnerProductSpace π•œ E β†’ β„•

theorem InnerProductSpace.Core.mk.inj E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} {inst : RCLike π•œ} {inst_1 : AddCommGroup F} {inst_2 : Module π•œ F}
  {toCore : PreInnerProductSpace.Core π•œ F} {definite : βˆ€ (x : F), inner π•œ x x = 0 β†’ x = 0}
  {toCore_1 : PreInnerProductSpace.Core π•œ F} {definite_1 : βˆ€ (x : F), inner π•œ x x = 0 β†’ x = 0},
  { toCore := toCore, definite := definite } = { toCore := toCore_1, definite := definite_1 } β†’ toCore = toCore_1

def InnerProductSpace.Core.ctorIdx E1 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    {inst : RCLike π•œ} β†’ {inst_1 : AddCommGroup F} β†’ {inst_2 : Module π•œ F} β†’ InnerProductSpace.Core π•œ F β†’ β„•

def Inner.ctorIdx E1 #

{π•œ : Type u_4} β†’ {E : Type u_5} β†’ Inner π•œ E β†’ β„•

def PreInnerProductSpace.Core.ctorIdx E1 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    {inst : RCLike π•œ} β†’ {inst_1 : AddCommGroup F} β†’ {inst_2 : Module π•œ F} β†’ PreInnerProductSpace.Core π•œ F β†’ β„•

def HilbertSpace.ctorIdx E1 #

{π•œ : Type u_4} β†’
  {E : Type u_5} β†’
    {inst : RCLike π•œ} β†’
      {inst_1 : NormedAddCommGroup E} β†’
        {inst_2 : InnerProductSpace π•œ E} β†’ {inst_3 : CompleteSpace E} β†’ HilbertSpace π•œ E β†’ β„•

theorem PreInnerProductSpace.Core.mk.injEq E0 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F] (toInner : Inner π•œ F)
  (conj_inner_symm : βˆ€ (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y)
  (re_inner_nonneg : βˆ€ (x : F), 0 ≀ RCLike.re (inner π•œ x x))
  (add_left : βˆ€ (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z)
  (smul_left : βˆ€ (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y) (toInner_1 : Inner π•œ F)
  (conj_inner_symm_1 : βˆ€ (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y)
  (re_inner_nonneg_1 : βˆ€ (x : F), 0 ≀ RCLike.re (inner π•œ x x))
  (add_left_1 : βˆ€ (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z)
  (smul_left_1 : βˆ€ (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y),
  ({ toInner := toInner, conj_inner_symm := conj_inner_symm, re_inner_nonneg := re_inner_nonneg, add_left := add_left,
        smul_left := smul_left } =
      { toInner := toInner_1, conj_inner_symm := conj_inner_symm_1, re_inner_nonneg := re_inner_nonneg_1,
        add_left := add_left_1, smul_left := smul_left_1 }) =
    (toInner = toInner_1)

theorem InnerProductSpace.Core.mk.injEq E0 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (toCore : PreInnerProductSpace.Core π•œ F) (definite : βˆ€ (x : F), inner π•œ x x = 0 β†’ x = 0)
  (toCore_1 : PreInnerProductSpace.Core π•œ F) (definite_1 : βˆ€ (x : F), inner π•œ x x = 0 β†’ x = 0),
  ({ toCore := toCore, definite := definite } = { toCore := toCore_1, definite := definite_1 }) = (toCore = toCore_1)

theorem PreInnerProductSpace.Core.mk.inj E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} {inst : RCLike π•œ} {inst_1 : AddCommGroup F} {inst_2 : Module π•œ F} {toInner : Inner π•œ F}
  {conj_inner_symm : βˆ€ (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y}
  {re_inner_nonneg : βˆ€ (x : F), 0 ≀ RCLike.re (inner π•œ x x)}
  {add_left : βˆ€ (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z}
  {smul_left : βˆ€ (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y} {toInner_1 : Inner π•œ F}
  {conj_inner_symm_1 : βˆ€ (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y}
  {re_inner_nonneg_1 : βˆ€ (x : F), 0 ≀ RCLike.re (inner π•œ x x)}
  {add_left_1 : βˆ€ (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z}
  {smul_left_1 : βˆ€ (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y},
  { toInner := toInner, conj_inner_symm := conj_inner_symm, re_inner_nonneg := re_inner_nonneg, add_left := add_left,
        smul_left := smul_left } =
      { toInner := toInner_1, conj_inner_symm := conj_inner_symm_1, re_inner_nonneg := re_inner_nonneg_1,
        add_left := add_left_1, smul_left := smul_left_1 } β†’
    toInner = toInner_1

class Inner E1 #

Type u_4 β†’ Type u_5 β†’ Type (max u_4 u_5)

Syntactic typeclass for types endowed with an inner product

ctor Inner.mk E0 #

{π•œ : Type u_4} β†’ {E : Type u_5} β†’ (E β†’ E β†’ π•œ) β†’ Inner π•œ E

abbrev Inner.inner E1 #

(π•œ : Type u_4) β†’ {E : Type u_5} β†’ [self : Inner π•œ E] β†’ E β†’ E β†’ π•œ

The inner product function.

def InnerProductSpace.Β«termβŸͺ_,_⟫__Β» E1 #

Lean.ParserDescr

The inner product with values in π•œ.

def RealInnerProductSpace.Β«termβŸͺ_,_⟫» E1 #

Lean.ParserDescr

The inner product with values in ℝ.

def ComplexInnerProductSpace.Β«termβŸͺ_,_⟫» E1 #

Lean.ParserDescr

The inner product with values in β„‚.

class InnerProductSpace E3 #

(π•œ : Type u_4) β†’ (E : Type u_5) β†’ [RCLike π•œ] β†’ [SeminormedAddCommGroup E] β†’ Type (max u_4 u_5)

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.

instance InnerProductSpace.toNormedSpace E0 #

{π•œ : Type u_4} β†’
  {E : Type u_5} β†’
    {inst : RCLike π•œ} β†’ {inst_1 : SeminormedAddCommGroup E} β†’ [self : InnerProductSpace π•œ E] β†’ NormedSpace π•œ E

ctor InnerProductSpace.mk E0 #

{π•œ : Type u_4} β†’
  {E : Type u_5} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : SeminormedAddCommGroup E] β†’
        [toNormedSpace : NormedSpace π•œ E] β†’
          [toInner : Inner π•œ E] β†’
            (βˆ€ (x : E), β€–xβ€– ^ 2 = RCLike.re (inner π•œ x x)) β†’
              (βˆ€ (x y : E), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y) β†’
                (βˆ€ (x y z : E), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z) β†’
                  (βˆ€ (x y : E) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y) β†’ InnerProductSpace π•œ E

instance InnerProductSpace.toInner E0 #

{π•œ : Type u_4} β†’
  {E : Type u_5} β†’ {inst : RCLike π•œ} β†’ {inst_1 : SeminormedAddCommGroup E} β†’ [self : InnerProductSpace π•œ E] β†’ Inner π•œ E

theorem InnerProductSpace.norm_sq_eq_re_inner E1 #

βˆ€ {π•œ : Type u_4} {E : Type u_5} {inst : RCLike π•œ} {inst_1 : SeminormedAddCommGroup E} [self : InnerProductSpace π•œ E]
  (x : E), β€–xβ€– ^ 2 = RCLike.re (inner π•œ x x)

The inner product induces the norm.

theorem InnerProductSpace.conj_inner_symm E1 #

βˆ€ {π•œ : Type u_4} {E : Type u_5} {inst : RCLike π•œ} {inst_1 : SeminormedAddCommGroup E} [self : InnerProductSpace π•œ E]
  (x y : E), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y

The inner product is Hermitian, taking the conj swaps the arguments.

theorem InnerProductSpace.add_left E1 #

βˆ€ {π•œ : Type u_4} {E : Type u_5} {inst : RCLike π•œ} {inst_1 : SeminormedAddCommGroup E} [self : InnerProductSpace π•œ E]
  (x y z : E), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z

The inner product is additive in the first coordinate.

theorem InnerProductSpace.smul_left E1 #

βˆ€ {π•œ : Type u_4} {E : Type u_5} {inst : RCLike π•œ} {inst_1 : SeminormedAddCommGroup E} [self : InnerProductSpace π•œ E]
  (x y : E) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y

The inner product is conjugate linear in the first coordinate.

class PreInnerProductSpace.Core E1 #

(π•œ : Type u_4) β†’ (F : Type u_5) β†’ [inst : RCLike π•œ] β†’ [inst_1 : AddCommGroup F] β†’ [Module π•œ F] β†’ Type (max u_4 u_5)

A structure requiring that a scalar product is positive semidefinite and symmetric.

abbrev PreInnerProductSpace.Core.toInner E1 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    [inst : RCLike π•œ] β†’ [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ PreInnerProductSpace.Core π•œ F β†’ Inner π•œ F

ctor PreInnerProductSpace.Core.mk E0 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [inst_2 : Module π•œ F] β†’
          (toInner : Inner π•œ F) β†’
            (βˆ€ (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y) β†’
              (βˆ€ (x : F), 0 ≀ RCLike.re (inner π•œ x x)) β†’
                (βˆ€ (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z) β†’
                  (βˆ€ (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y) β†’
                    PreInnerProductSpace.Core π•œ F

theorem PreInnerProductSpace.Core.conj_inner_symm E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (self : PreInnerProductSpace.Core π•œ F) (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y

The inner product is Hermitian, taking the conj swaps the arguments.

theorem PreInnerProductSpace.Core.re_inner_nonneg E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (self : PreInnerProductSpace.Core π•œ F) (x : F), 0 ≀ RCLike.re (inner π•œ x x)

The inner product is positive (semi)definite.

theorem PreInnerProductSpace.Core.add_left E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (self : PreInnerProductSpace.Core π•œ F) (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z

The inner product is additive in the first coordinate.

theorem PreInnerProductSpace.Core.smul_left E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (self : PreInnerProductSpace.Core π•œ F) (x y : F) (r : π•œ), inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y

The inner product is conjugate linear in the first coordinate.

class InnerProductSpace.Core E1 #

(π•œ : Type u_4) β†’ (F : Type u_5) β†’ [inst : RCLike π•œ] β†’ [inst_1 : AddCommGroup F] β†’ [Module π•œ F] β†’ Type (max u_4 u_5)

A structure requiring that a scalar product is positive definite. Some theorems that require these assumptions are put under section InnerProductSpace.Core.

abbrev InnerProductSpace.Core.toCore E1 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ InnerProductSpace.Core π•œ F β†’ PreInnerProductSpace.Core π•œ F

ctor InnerProductSpace.Core.mk E0 #

{π•œ : Type u_4} β†’
  {F : Type u_5} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [inst_2 : Module π•œ F] β†’
          (toCore : PreInnerProductSpace.Core π•œ F) β†’ (βˆ€ (x : F), inner π•œ x x = 0 β†’ x = 0) β†’ InnerProductSpace.Core π•œ F

theorem InnerProductSpace.Core.definite E1 #

βˆ€ {π•œ : Type u_4} {F : Type u_5} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (self : InnerProductSpace.Core π•œ F) (x : F), inner π•œ x x = 0 β†’ x = 0

The inner product is positive definite.

instance instCoreOfCore E0 #

(π•œ : Type u_4) β†’
  (F : Type u_5) β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [inst_2 : Module π•œ F] β†’ [cd : InnerProductSpace.Core π•œ F] β†’ PreInnerProductSpace.Core π•œ F

def PreInnerProductSpace.toCore E1 #

{π•œ : Type u_1} β†’
  {E : Type u_2} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : SeminormedAddCommGroup E] β†’ [c : InnerProductSpace π•œ E] β†’ PreInnerProductSpace.Core π•œ E

Define PreInnerProductSpace.Core from InnerProductSpace. Defined to reuse lemmas about PreInnerProductSpace.Core for PreInnerProductSpaces. Note that the Seminorm instance provided by PreInnerProductSpace.Core.norm is propositionally but not definitionally equal to the original norm.

def InnerProductSpace.toCore E1 #

{π•œ : Type u_1} β†’
  {E : Type u_2} β†’
    [inst : RCLike π•œ] β†’ [inst_1 : NormedAddCommGroup E] β†’ [c : InnerProductSpace π•œ E] β†’ InnerProductSpace.Core π•œ E

Define InnerProductSpace.Core from InnerProductSpace. Defined to reuse lemmas about InnerProductSpace.Core for InnerProductSpaces. Note that the Norm instance provided by InnerProductSpace.Core.norm is propositionally but not definitionally equal to the original norm.

def InnerProductSpace.Core.toPreInner' E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [c : PreInnerProductSpace.Core π•œ F] β†’ Inner π•œ F

Inner product defined by the PreInnerProductSpace.Core structure. We can't reuse PreInnerProductSpace.Core.toInner because it takes PreInnerProductSpace.Core as an explicit argument.

def InnerProductSpace.Core.normSq E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’ [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [c : PreInnerProductSpace.Core π•œ F] β†’ F β†’ ℝ

The norm squared function for PreInnerProductSpace.Core structure.

theorem InnerProductSpace.Core.inner_conj_symm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), (starRingEnd π•œ) (inner π•œ y x) = inner π•œ x y

theorem InnerProductSpace.Core.inner_self_nonneg E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] {x : F}, 0 ≀ RCLike.re (inner π•œ x x)

theorem InnerProductSpace.Core.inner_self_im E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), RCLike.im (inner π•œ x x) = 0

theorem InnerProductSpace.Core.inner_add_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y z : F), inner π•œ (x + y) z = inner π•œ x z + inner π•œ y z

theorem InnerProductSpace.Core.inner_add_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y z : F), inner π•œ x (y + z) = inner π•œ x y + inner π•œ x z

theorem InnerProductSpace.Core.ofReal_normSq_eq_inner_self E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), ↑(InnerProductSpace.Core.normSq x) = inner π•œ x x

theorem InnerProductSpace.Core.inner_re_symm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), RCLike.re (inner π•œ x y) = RCLike.re (inner π•œ y x)

theorem InnerProductSpace.Core.inner_im_symm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), RCLike.im (inner π•œ x y) = -RCLike.im (inner π•œ y x)

theorem InnerProductSpace.Core.inner_smul_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F) {r : π•œ}, inner π•œ (r β€’ x) y = (starRingEnd π•œ) r * inner π•œ x y

theorem InnerProductSpace.Core.inner_smul_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F) {r : π•œ}, inner π•œ x (r β€’ y) = r * inner π•œ x y

theorem InnerProductSpace.Core.inner_zero_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), inner π•œ 0 x = 0

theorem InnerProductSpace.Core.inner_zero_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), inner π•œ x 0 = 0

theorem InnerProductSpace.Core.inner_self_of_eq_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] {x : F}, x = 0 β†’ inner π•œ x x = 0

theorem InnerProductSpace.Core.normSq_eq_zero_of_eq_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] {x : F}, x = 0 β†’ InnerProductSpace.Core.normSq x = 0

theorem InnerProductSpace.Core.ne_zero_of_inner_self_ne_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] {x : F}, inner π•œ x x β‰  0 β†’ x β‰  0

theorem InnerProductSpace.Core.inner_self_ofReal_re E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), ↑(RCLike.re (inner π•œ x x)) = inner π•œ x x

theorem InnerProductSpace.Core.norm_inner_symm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), β€–inner π•œ x yβ€– = β€–inner π•œ y xβ€–

theorem InnerProductSpace.Core.inner_neg_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), inner π•œ (-x) y = -inner π•œ x y

theorem InnerProductSpace.Core.inner_neg_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), inner π•œ x (-y) = -inner π•œ x y

theorem InnerProductSpace.Core.inner_sub_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y z : F), inner π•œ (x - y) z = inner π•œ x z - inner π•œ y z

theorem InnerProductSpace.Core.inner_sub_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y z : F), inner π•œ x (y - z) = inner π•œ x y - inner π•œ x z

theorem InnerProductSpace.Core.inner_mul_symm_re_eq_norm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), RCLike.re (inner π•œ x y * inner π•œ y x) = β€–inner π•œ x y * inner π•œ y xβ€–

theorem InnerProductSpace.Core.inner_add_add_self E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F),
  inner π•œ (x + y) (x + y) = inner π•œ x x + inner π•œ x y + inner π•œ y x + inner π•œ y y

Expand βŸͺx + y, x + y⟫

theorem InnerProductSpace.Core.inner_sub_sub_self E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F),
  inner π•œ (x - y) (x - y) = inner π•œ x x - inner π•œ x y - inner π•œ y x + inner π•œ y y

theorem InnerProductSpace.Core.inner_smul_ofReal_left E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F) {t : ℝ}, inner π•œ (↑t β€’ x) y = inner π•œ x y * ↑t

theorem InnerProductSpace.Core.inner_smul_ofReal_right E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F) {t : ℝ}, inner π•œ x (↑t β€’ y) = inner π•œ x y * ↑t

theorem InnerProductSpace.Core.re_inner_smul_ofReal_smul_self E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F) {t : ℝ},
  RCLike.re (inner π•œ (↑t β€’ x) (↑t β€’ x)) = InnerProductSpace.Core.normSq x * t * t

theorem InnerProductSpace.Core.cauchy_schwarz_aux' E2 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F) (t : ℝ),
  0 ≀ InnerProductSpace.Core.normSq x * t * t + 2 * RCLike.re (inner π•œ x y) * t + InnerProductSpace.Core.normSq y

An auxiliary equality useful to prove the Cauchy–Schwarz inequality. Here we use the standard argument involving the discriminant of quadratic form.

theorem InnerProductSpace.Core.cauchy_schwarz_aux E0 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F),
  InnerProductSpace.Core.normSq (inner π•œ x y β€’ x - inner π•œ x x β€’ y) =
    InnerProductSpace.Core.normSq x *
      (InnerProductSpace.Core.normSq x * InnerProductSpace.Core.normSq y - β€–inner π•œ x yβ€– ^ 2)

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.

theorem InnerProductSpace.Core.inner_mul_inner_self_le E2 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F),
  β€–inner π•œ x yβ€– * β€–inner π•œ y xβ€– ≀ RCLike.re (inner π•œ x x) * RCLike.re (inner π•œ y y)

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-Schwarz for an inner product space, rather than a PreInnerProductSpace.Core).

def InnerProductSpace.Core.toNorm E3 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’ [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [c : PreInnerProductSpace.Core π•œ F] β†’ Norm F

(Semi)norm constructed from a PreInnerProductSpace.Core structure, defined to be the square root of the scalar product.

theorem InnerProductSpace.Core.norm_eq_sqrt_re_inner E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), β€–xβ€– = √(RCLike.re (inner π•œ x x))

theorem InnerProductSpace.Core.inner_self_eq_norm_mul_norm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), RCLike.re (inner π•œ x x) = β€–xβ€– * β€–xβ€–

theorem InnerProductSpace.Core.sqrt_normSq_eq_norm E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x : F), √(InnerProductSpace.Core.normSq x) = β€–xβ€–

theorem InnerProductSpace.Core.norm_inner_le_norm E2 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [c : PreInnerProductSpace.Core π•œ F] (x y : F), β€–inner π•œ x yβ€– ≀ β€–xβ€– * β€–yβ€–

Cauchy–Schwarz inequality with norm

def InnerProductSpace.Core.toSeminormedAddCommGroup E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [c : PreInnerProductSpace.Core π•œ F] β†’ SeminormedAddCommGroup F

Seminormed group structure constructed from a PreInnerProductSpace.Core structure

def InnerProductSpace.Core.toNormedSpace E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [c : PreInnerProductSpace.Core π•œ F] β†’ NormedSpace π•œ F

Normed space (which is actually a seminorm in general) structure constructed from a PreInnerProductSpace.Core structure

theorem InnerProductSpace.Core.toSeminormedSpaceCore E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (c : PreInnerProductSpace.Core π•œ F), SeminormedSpace.Core π•œ F

Seminormed space core structure constructed from a PreInnerProductSpace.Core structure

def InnerProductSpace.Core.toInner' E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [cd : InnerProductSpace.Core π•œ F] β†’ Inner π•œ F

Inner product defined by the InnerProductSpace.Core structure. We can't reuse InnerProductSpace.Core.toInner because it takes InnerProductSpace.Core as an explicit argument.

theorem InnerProductSpace.Core.inner_self_eq_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [cd : InnerProductSpace.Core π•œ F] {x : F}, inner π•œ x x = 0 ↔ x = 0

theorem InnerProductSpace.Core.normSq_eq_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [cd : InnerProductSpace.Core π•œ F] {x : F}, InnerProductSpace.Core.normSq x = 0 ↔ x = 0

theorem InnerProductSpace.Core.inner_self_ne_zero E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [cd : InnerProductSpace.Core π•œ F] {x : F}, inner π•œ x x β‰  0 ↔ x β‰  0

def InnerProductSpace.Core.toNormedAddCommGroup E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ [cd : InnerProductSpace.Core π•œ F] β†’ NormedAddCommGroup F

Normed group structure constructed from an InnerProductSpace.Core structure

theorem InnerProductSpace.Core.toNormedSpaceCore E1 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  (cd : InnerProductSpace.Core π•œ F), NormedSpace.Core π•œ F

Normed space core structure constructed from an InnerProductSpace.Core structure

theorem InnerProductSpace.Core.topology_eq E0 #

βˆ€ {π•œ : Type u_1} {F : Type u_3} [inst : RCLike π•œ] [inst_1 : AddCommGroup F] [inst_2 : Module π•œ F]
  [cd : InnerProductSpace.Core π•œ F] [tF : TopologicalSpace F] [IsTopologicalAddGroup F] [ContinuousConstSMul π•œ F],
  ContinuousAt (fun v ↦ inner π•œ v v) 0 β†’
    Bornology.IsVonNBounded π•œ {v | RCLike.re (inner π•œ v v) < 1} β†’
      tF = PseudoMetricSpace.toUniformSpace.toTopologicalSpace

In a topological vector space, if the unit ball of a continuous inner product is von Neumann bounded, then the inner product defines the same topology as the original one.

def InnerProductSpace.Core.toNormedAddCommGroupOfTopology E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [inst_2 : Module π•œ F] β†’
          [cd : InnerProductSpace.Core π•œ F] β†’
            [tF : TopologicalSpace F] β†’
              [IsTopologicalAddGroup F] β†’
                [ContinuousConstSMul π•œ F] β†’
                  ContinuousAt (fun v ↦ inner π•œ v v) 0 β†’
                    Bornology.IsVonNBounded π•œ {v | RCLike.re (inner π•œ v v) < 1} β†’ NormedAddCommGroup F

Normed space structure constructed from an InnerProductSpace.Core structure, adjusting the topology to make sure it is defeq to an already existing topology.

def InnerProductSpace.Core.toNormedSpaceOfTopology E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [inst_2 : Module π•œ F] β†’
          [cd : InnerProductSpace.Core π•œ F] β†’
            [tF : TopologicalSpace F] β†’
              [inst_3 : IsTopologicalAddGroup F] β†’
                [inst_4 : ContinuousConstSMul π•œ F] β†’
                  (h : ContinuousAt (fun v ↦ inner π•œ v v) 0) β†’
                    (h' : Bornology.IsVonNBounded π•œ {v | RCLike.re (inner π•œ v v) < 1}) β†’ NormedSpace π•œ F

Normed space structure constructed from an InnerProductSpace.Core structure, adjusting the topology to make sure it is defeq to an already existing topology.

def InnerProductSpace.ofCore E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’ [inst_2 : Module π•œ F] β†’ (cd : PreInnerProductSpace.Core π•œ F) β†’ InnerProductSpace π•œ F

Given a PreInnerProductSpace.Core structure on a space, one can use it to turn the space into a pre-inner product space (i.e., SeminormedAddCommGroup and InnerProductSpace). The SeminormedAddCommGroup structure is expected to already be defined with InnerProductSpace.ofCore.toSeminormedAddCommGroup.

def InnerProductSpace.ofCoreOfTopology E1 #

{π•œ : Type u_1} β†’
  {F : Type u_3} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : AddCommGroup F] β†’
        [hF : Module π•œ F] β†’
          [inst_2 : TopologicalSpace F] β†’
            [inst_3 : IsTopologicalAddGroup F] β†’
              [inst_4 : ContinuousConstSMul π•œ F] β†’
                (cd : InnerProductSpace.Core π•œ F) β†’
                  (h : ContinuousAt (fun v ↦ inner π•œ v v) 0) β†’
                    (h' : Bornology.IsVonNBounded π•œ {v | RCLike.re (inner π•œ v v) < 1}) β†’ InnerProductSpace π•œ F

Given an InnerProductSpace.Core structure on a space with a topology, 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.toNormedAddCommGroupOfTopology.

structure HilbertSpace E1 #

(π•œ : Type u_4) β†’
  (E : Type u_5) β†’
    [inst : RCLike π•œ] β†’ [inst_1 : NormedAddCommGroup E] β†’ [InnerProductSpace π•œ E] β†’ [CompleteSpace E] β†’ Type

A Hilbert space is a complete normed inner product space.

ctor HilbertSpace.mk E0 #

{π•œ : Type u_4} β†’
  {E : Type u_5} β†’
    [inst : RCLike π•œ] β†’
      [inst_1 : NormedAddCommGroup E] β†’ [inst_2 : InnerProductSpace π•œ E] β†’ [inst_3 : CompleteSpace E] β†’ HilbertSpace π•œ E

instance PUnit.instInnerProductSpace E0 #

{π•œ : Type u_1} β†’ [inst : RCLike π•œ] β†’ InnerProductSpace π•œ PUnit.{u_4 + 1}

theorem PUnit.inner_eq_zero E0 #

βˆ€ {π•œ : Type u_1} [inst : RCLike π•œ] (x y : PUnit.{u_4 + 1}), inner π•œ x y = 0