# mathlibdocumentation

analysis.normed_space.inner_product

# Inner Product Space #

This file defines inner product spaces and proves its basic properties.

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 `is_R_or_C` typeclass.

## Main results #

• We define the class `inner_product_space ๐ E` extending `normed_space ๐ E` with a number of basic properties, most notably the Cauchy-Schwarz inequality. Here `๐` is understood to be either `โ` or `โ`, through the `is_R_or_C` typeclass.
• We show that if `f i` is an inner product space for each `i`, then so is `ฮ  i, f i`
• We define `euclidean_space ๐ n` to be `n โ ๐` for any `fintype n`, and show that this an inner product space.
• Existence of orthogonal projection onto nonempty complete subspace: Let `u` be a point in an inner product space, and let `K` be a nonempty complete subspace. Then there exists a unique `v` in `K` that minimizes the distance `โฅu - vโฅ` to `u`. The point `v` is usually called the orthogonal projection of `u` onto `K`.
• We define `orthonormal`, a predicate on a function `v : ฮน โ E`. We prove the existence of a maximal orthonormal set, `exists_maximal_orthonormal`, and also prove that a maximal orthonormal set is a basis (`maximal_orthonormal_iff_basis_of_finite_dimensional`), if `E` is finite- dimensional, or in general (`maximal_orthonormal_iff_dense_span`) a set whose span is dense (i.e., a Hilbert basis, although we do not make that definition).

## Notation #

We globally denote the real and complex inner products by `โชยท, ยทโซ_โ` and `โชยท, ยทโซ_โ` respectively. We also provide two notation namespaces: `real_inner_product_space`, `complex_inner_product_space`, which respectively introduce the plain notation `โชยท, ยทโซ` for the the real and complex inner product.

The orthogonal complement of a submodule `K` is denoted by `Kแฎ`.

## Implementation notes #

We choose the convention that inner products are conjugate linear in the first argument and linear in the second.

## TODO #

• Fix the section on the existence of minimizers and orthogonal projections to make sure that it also applies in the complex case.

## Tags #

inner product 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

@[class]
structure has_inner (๐ : Type u_4) (E : Type u_5) :
Type (max u_4 u_5)
• inner : E โ E โ ๐

Syntactic typeclass for types endowed with an inner product

Instances
@[class]
structure inner_product_space (๐ : Type u_4) (E : Type u_5) [is_R_or_C ๐] :
Type (max u_4 u_5)

An inner product space is a vector space with an additional operation called inner product. The norm could be derived from the inner product, instead we require the existence of a norm and the fact that `โฅxโฅ^2 = re โชx, xโซ` to be able to put instances on `๐` or product spaces.

To construct a norm from an inner product, see `inner_product_space.of_core`.

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 `inner_product_space.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 `inner_product_space`. 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!

@[nolint, class]
structure inner_product_space.core (๐ : Type u_4) (F : Type u_5) [is_R_or_C ๐] [module ๐ F] :
Type (max u_4 u_5)

A structure requiring that a scalar product is positive definite and symmetric, from which one can construct an `inner_product_space` instance in `inner_product_space.of_core`.

def inner_product_space.of_core.to_has_inner {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] :
has_inner ๐ F

Inner product defined by the `inner_product_space.core` structure.

Equations
def inner_product_space.of_core.norm_sq {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x : F) :

The norm squared function for `inner_product_space.core` structure.

Equations
theorem inner_product_space.of_core.inner_conj_sym {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x y : F) :
theorem inner_product_space.of_core.inner_self_nonneg {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
theorem inner_product_space.of_core.inner_self_nonneg_im {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
theorem inner_product_space.of_core.inner_self_im_zero {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
theorem inner_product_space.of_core.inner_add_left {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y z : F} :
inner (x + y) z = z + z
theorem inner_product_space.of_core.inner_add_right {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y z : F} :
(y + z) = y + z
theorem inner_product_space.of_core.inner_norm_sq_eq_inner_self {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x : F) :
theorem inner_product_space.of_core.inner_re_symm {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
theorem inner_product_space.of_core.inner_im_symm {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
theorem inner_product_space.of_core.inner_smul_left {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} {r : ๐} :
inner (r โข x) y = * y
theorem inner_product_space.of_core.inner_smul_right {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} {r : ๐} :
(r โข y) = r * y
theorem inner_product_space.of_core.inner_zero_left {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
x = 0
theorem inner_product_space.of_core.inner_zero_right {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
0 = 0
theorem inner_product_space.of_core.inner_self_eq_zero {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
x = 0 โ x = 0
theorem inner_product_space.of_core.inner_self_re_to_K {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
theorem inner_product_space.of_core.inner_abs_conj_sym {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
theorem inner_product_space.of_core.inner_neg_left {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
inner (-x) y = - y
theorem inner_product_space.of_core.inner_neg_right {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
(-y) = - y
theorem inner_product_space.of_core.inner_sub_left {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y z : F} :
inner (x - y) z = z - z
theorem inner_product_space.of_core.inner_sub_right {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y z : F} :
(y - z) = y - z
theorem inner_product_space.of_core.inner_mul_conj_re_abs {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
theorem inner_product_space.of_core.inner_add_add_self {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
inner (x + y) (x + y) = x + y + x + y

Expand `inner (x + y) (x + y)`

theorem inner_product_space.of_core.inner_sub_sub_self {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x y : F} :
inner (x - y) (x - y) = x - y - x + y
theorem inner_product_space.of_core.inner_mul_inner_self_le {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x y : F) :

CauchyโSchwarz inequality. This proof follows "Proof 2" on Wikipedia. We need this for the `core` structure to prove the triangle inequality below when showing the core is a normed group.

def inner_product_space.of_core.to_has_norm {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] :

Norm constructed from a `inner_product_space.core` structure, defined to be the square root of the scalar product.

Equations
theorem inner_product_space.of_core.norm_eq_sqrt_inner {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x : F) :
theorem inner_product_space.of_core.inner_self_eq_norm_sq {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x : F) :
theorem inner_product_space.of_core.sqrt_norm_sq_eq_norm {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] {x : F} :
theorem inner_product_space.of_core.abs_inner_le_norm {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] (x y : F) :

CauchyโSchwarz inequality with norm

def inner_product_space.of_core.to_normed_group {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] :

Normed group structure constructed from an `inner_product_space.core` structure

Equations
def inner_product_space.of_core.to_normed_space {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] [c : F] :
normed_space ๐ F

Normed space structure constructed from a `inner_product_space.core` structure

Equations
def inner_product_space.of_core {๐ : Type u_1} {F : Type u_3} [is_R_or_C ๐] [module ๐ F] (c : F) :
F

Given a `inner_product_space.core` structure on a space, one can use it to turn the space into an inner product space, constructing the norm out of the inner product

Equations

### Properties of inner product spaces #

@[simp]
theorem inner_conj_sym {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :
theorem real_inner_comm {F : Type u_3} (x y : F) :
x = y
theorem inner_eq_zero_sym {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
y = 0 โ x = 0
@[simp]
theorem inner_self_nonneg_im {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_self_im_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_add_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y z : E} :
inner (x + y) z = z + z
theorem inner_add_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y z : E} :
(y + z) = y + z
theorem inner_re_symm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
theorem inner_im_symm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
theorem inner_smul_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} {r : ๐} :
inner (r โข x) y = * y
theorem real_inner_smul_left {F : Type u_3} {x y : F} {r : โ} :
inner (r โข x) y = r * y
theorem inner_smul_real_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} {r : โ} :
theorem inner_smul_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} {r : ๐} :
(r โข y) = r * y
theorem real_inner_smul_right {F : Type u_3} {x y : F} {r : โ} :
(r โข y) = r * y
theorem inner_smul_real_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} {r : โ} :
def sesq_form_of_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] :
sesq_form ๐ E

The inner product as a sesquilinear form.

Equations
@[simp]
theorem sesq_form_of_inner_sesq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :
= x
def bilin_form_of_real_inner {F : Type u_3}  :

The real inner product as a bilinear form.

Equations
@[simp]
theorem bilin_form_of_real_inner_apply {F : Type u_3} (แพฐ แพฐ_1 : F) :
แพฐ_1 = inner แพฐ แพฐ_1
theorem sum_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} (s : finset ฮน) (f : ฮน โ E) (x : E) :
inner (โ (i : ฮน) in s, f i) x = โ (i : ฮน) in s, inner (f i) x

An inner product with a sum on the left.

theorem inner_sum {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} (s : finset ฮน) (f : ฮน โ E) (x : E) :
(โ (i : ฮน) in s, f i) = โ (i : ฮน) in s, (f i)

An inner product with a sum on the right.

theorem finsupp.sum_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} (l : ฮน โโ ๐) (v : ฮน โ E) (x : E) :
inner (l.sum (ฮป (i : ฮน) (a : ๐), a โข v i)) x = l.sum (ฮป (i : ฮน) (a : ๐), โข inner (v i) x)

An inner product with a sum on the left, `finsupp` version.

theorem finsupp.inner_sum {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} (l : ฮน โโ ๐) (v : ฮน โ E) (x : E) :
(l.sum (ฮป (i : ฮน) (a : ๐), a โข v i)) = l.sum (ฮป (i : ฮน) (a : ๐), a โข (v i))

An inner product with a sum on the right, `finsupp` version.

@[simp]
theorem inner_zero_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
x = 0
theorem inner_re_zero_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
@[simp]
theorem inner_zero_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
0 = 0
theorem inner_re_zero_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_self_nonneg {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem real_inner_self_nonneg {F : Type u_3} {x : F} :
@[simp]
theorem inner_self_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
x = 0 โ x = 0
@[simp]
theorem inner_self_nonpos {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem real_inner_self_nonpos {F : Type u_3} {x : F} :
x โค 0 โ x = 0
@[simp]
theorem inner_self_re_to_K {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_self_eq_norm_sq_to_K {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x : E) :
x =
theorem inner_self_re_abs {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_self_abs_to_K {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem real_inner_self_abs {F : Type u_3} {x : F} :
abs (inner x x) = x
theorem inner_abs_conj_sym {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
@[simp]
theorem inner_neg_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
inner (-x) y = - y
@[simp]
theorem inner_neg_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
(-y) = - y
theorem inner_neg_neg {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
inner (-x) (-y) = y
@[simp]
theorem inner_self_conj {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} :
theorem inner_sub_left {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y z : E} :
inner (x - y) z = z - z
theorem inner_sub_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y z : E} :
(y - z) = y - z
theorem inner_mul_conj_re_abs {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
theorem inner_add_add_self {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
inner (x + y) (x + y) = x + y + x + y

Expand `โชx + y, x + yโซ`

inner (x + y) (x + y) = x + 2 * y + y

Expand `โชx + y, x + yโซ_โ`

theorem inner_sub_sub_self {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
inner (x - y) (x - y) = x - y - x + y
theorem real_inner_sub_sub_self {F : Type u_3} {x y : F} :
inner (x - y) (x - y) = x - 2 * y + y

Expand `โชx - y, x - yโซ_โ`

theorem parallelogram_law {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
inner (x + y) (x + y) + inner (x - y) (x - y) = 2 * (inner x x + y)

Parallelogram law

theorem inner_mul_inner_self_le {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

CauchyโSchwarz inequality. This proof follows "Proof 2" on Wikipedia.

theorem real_inner_mul_inner_self_le {F : Type u_3} (x y : F) :
(inner x y) * y โค (inner x x) * y

CauchyโSchwarz inequality for real inner products.

theorem linear_independent_of_ne_zero_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} {v : ฮน โ E} (hz : โ (i : ฮน), v i โ  0) (ho : โ (i j : ฮน), i โ  j โ inner (v i) (v j) = 0) :
v

A family of vectors is linearly independent if they are nonzero and orthogonal.

def orthonormal (๐ : Type u_1) {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} (v : ฮน โ E) :
Prop

An orthonormal set of vectors in an `inner_product_space`

Equations
theorem orthonormal_iff_ite {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} :
orthonormal ๐ v โ โ (i j : ฮน), inner (v i) (v j) = ite (i = j) 1 0

`if ... then ... else` characterization of an indexed set of vectors being orthonormal. (Inner product equals Kronecker delta.)

theorem orthonormal_subtype_iff_ite {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {s : set E} :
orthonormal ๐ coe โ โ (v : E), v โ s โ โ (w : E), w โ s โ w = ite (v = w) 1 0

`if ... then ... else` characterization of a set of vectors being orthonormal. (Inner product equals Kronecker delta.)

theorem orthonormal.inner_right_finsupp {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} (hv : orthonormal ๐ v) (l : ฮน โโ ๐) (i : ฮน) :
inner (v i) (โ E ๐ v) l) = โl i

The inner product of a linear combination of a set of orthonormal vectors with one of those vectors picks out the coefficient of that vector.

theorem orthonormal.inner_right_fintype {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} [fintype ฮน] {v : ฮน โ E} (hv : orthonormal ๐ v) (l : ฮน โ ๐) (i : ฮน) :
inner (v i) (โ (i : ฮน), l i โข v i) = l i

The inner product of a linear combination of a set of orthonormal vectors with one of those vectors picks out the coefficient of that vector.

theorem orthonormal.inner_left_finsupp {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} (hv : orthonormal ๐ v) (l : ฮน โโ ๐) (i : ฮน) :
inner (โ E ๐ v) l) (v i) = โis_R_or_C.conj (โl i)

The inner product of a linear combination of a set of orthonormal vectors with one of those vectors picks out the coefficient of that vector.

theorem orthonormal.inner_left_fintype {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} [fintype ฮน] {v : ฮน โ E} (hv : orthonormal ๐ v) (l : ฮน โ ๐) (i : ฮน) :
inner (โ (i : ฮน), l i โข v i) (v i) = โis_R_or_C.conj (l i)

The inner product of a linear combination of a set of orthonormal vectors with one of those vectors picks out the coefficient of that vector.

theorem orthonormal.linear_independent {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} (hv : orthonormal ๐ v) :
v

An orthonormal set is linearly independent.

theorem orthonormal.comp {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {ฮน' : Type u_3} {v : ฮน โ E} (hv : orthonormal ๐ v) (f : ฮน' โ ฮน) (hf : function.injective f) :
orthonormal ๐ (v โ f)

A subfamily of an orthonormal family (i.e., a composition with an injective map) is an orthonormal family.

theorem orthonormal.inner_finsupp_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} (hv : orthonormal ๐ v) {s : set ฮน} {i : ฮน} (hi : i โ s) {l : ฮน โโ ๐} (hl : l โ ๐ s) :
inner (โ E ๐ v) l) (v i) = 0

A linear combination of some subset of an orthonormal set is orthogonal to other members of the set.

theorem orthonormal_empty (๐ : Type u_1) (E : Type u_2) [is_R_or_C ๐] [ E] :
orthonormal ๐ (ฮป (x : โฅโ), โx)
theorem orthonormal_Union_of_directed {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮท : Type u_3} {s : ฮท โ set E} (hs : s) (h : โ (i : ฮท), orthonormal ๐ (ฮป (x : โฅ(s i)), โx)) :
orthonormal ๐ (ฮป (x : โฅโ (i : ฮท), s i), โx)
theorem orthonormal_sUnion_of_directed {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {s : set (set E)} (hs : s) (h : โ (a : set E), a โ s โ orthonormal ๐ (ฮป (x : โฅa), โx)) :
orthonormal ๐ (ฮป (x : โฅโโs), โx)
theorem exists_maximal_orthonormal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {s : set E} (hs : orthonormal ๐ coe) :
โ (w : set E) (H : w โ s), orthonormal ๐ coe โง โ (u : set E), u โ w โ orthonormal ๐ coe โ u = w

Given an orthonormal set `v` of vectors in `E`, there exists a maximal orthonormal set containing it.

theorem orthonormal.ne_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} {v : ฮน โ E} (hv : orthonormal ๐ v) (i : ฮน) :
v i โ  0
def basis_of_orthonormal_of_card_eq_finrank {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} [fintype ฮน] [nonempty ฮน] {v : ฮน โ E} (hv : orthonormal ๐ v) (card_eq : = ) :
basis ฮน ๐ E

A family of orthonormal vectors with the correct cardinality forms a basis.

Equations
@[simp]
theorem coe_basis_of_orthonormal_of_card_eq_finrank {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} [fintype ฮน] [nonempty ฮน] {v : ฮน โ E} (hv : orthonormal ๐ v) (card_eq : = ) :
โ card_eq) = v
theorem norm_eq_sqrt_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x : E) :
theorem norm_eq_sqrt_real_inner {F : Type u_3} (x : F) :
theorem inner_self_eq_norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x : E) :
theorem real_inner_self_eq_norm_sq {F : Type u_3} (x : F) :
x =
theorem norm_add_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Expand the square

theorem norm_add_pow_two {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Alias of `norm_add_sq`.

theorem norm_add_sq_real {F : Type u_3} {x y : F} :

Expand the square

theorem norm_add_pow_two_real {F : Type u_3} {x y : F} :

Alias of `norm_add_sq_real`.

theorem norm_add_mul_self {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Expand the square

theorem norm_add_mul_self_real {F : Type u_3} {x y : F} :

Expand the square

theorem norm_sub_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Expand the square

theorem norm_sub_pow_two {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Alias of `norm_sub_sq`.

theorem norm_sub_sq_real {F : Type u_3} {x y : F} :

Expand the square

theorem norm_sub_pow_two_real {F : Type u_3} {x y : F} :

Alias of `norm_sub_sq_real`.

theorem norm_sub_mul_self {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :

Expand the square

theorem norm_sub_mul_self_real {F : Type u_3} {x y : F} :

Expand the square

theorem abs_inner_le_norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

CauchyโSchwarz inequality with norm

theorem abs_real_inner_le_norm {F : Type u_3} (x y : F) :

CauchyโSchwarz inequality with norm

theorem real_inner_le_norm {F : Type u_3} (x y : F) :

CauchyโSchwarz inequality with norm

theorem parallelogram_law_with_norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
theorem re_inner_eq_norm_add_mul_self_sub_norm_mul_self_sub_norm_mul_self_div_two {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

Polarization identity: The real part of the inner product, in terms of the norm.

theorem re_inner_eq_norm_mul_self_add_norm_mul_self_sub_norm_sub_mul_self_div_two {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

Polarization identity: The real part of the inner product, in terms of the norm.

theorem re_inner_eq_norm_add_mul_self_sub_norm_sub_mul_self_div_four {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

Polarization identity: The real part of the inner product, in terms of the norm.

Polarization identity: The imaginary part of the inner product, in terms of the norm.

theorem inner_eq_sum_norm_sq_div_four {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

Polarization identity: The inner product, in terms of the norm.

@[simp]
theorem linear_isometry.inner_map_map {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโแตข[๐] E') (x y : E) :
inner (โf x) (โf y) = y

A linear isometry preserves the inner product.

@[simp]
theorem linear_isometry_equiv.inner_map_map {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโแตข[๐] E') (x y : E) :
inner (โf x) (โf y) = y

A linear isometric equivalence preserves the inner product.

def linear_map.isometry_of_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :

A linear map that preserves the inner product is a linear isometry.

Equations
@[simp]
theorem linear_map.coe_isometry_of_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :
@[simp]
theorem linear_map.isometry_of_inner_to_linear_map {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :
= f
def linear_equiv.isometry_of_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :

A linear equivalence that preserves the inner product is a linear isometric equivalence.

Equations
@[simp]
theorem linear_equiv.coe_isometry_of_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :
@[simp]
theorem linear_equiv.isometry_of_inner_to_linear_equiv {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {E' : Type u_4} [ E'] (f : E โโ[๐] E') (h : โ (x y : E), inner (โf x) (โf y) = y) :

Polarization identity: The real inner product, in terms of the norm.

Polarization identity: The real inner product, in terms of the norm.

Pythagorean theorem, if-and-only-if vector inner product form.

theorem norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) (h : y = 0) :

Pythagorean theorem, vector inner product form.

theorem norm_add_sq_eq_norm_sq_add_norm_sq_real {F : Type u_3} {x y : F} (h : y = 0) :

Pythagorean theorem, vector inner product form.

Pythagorean theorem, subtracting vectors, if-and-only-if vector inner product form.

theorem norm_sub_sq_eq_norm_sq_add_norm_sq_real {F : Type u_3} {x y : F} (h : y = 0) :

Pythagorean theorem, subtracting vectors, vector inner product form.

theorem real_inner_add_sub_eq_zero_iff {F : Type u_3} (x y : F) :
inner (x + y) (x - y) = 0 โ

The sum and difference of two vectors are orthogonal if and only if they have the same norm.

theorem abs_real_inner_div_norm_mul_norm_le_one {F : Type u_3} (x y : F) :

The real inner product of two vectors, divided by the product of their norms, has absolute value at most 1.

theorem real_inner_smul_self_left {F : Type u_3} (x : F) (r : โ) :
inner (r โข x) x = r *

The inner product of a vector with a multiple of itself.

theorem real_inner_smul_self_right {F : Type u_3} (x : F) (r : โ) :
(r โข x) = r *

The inner product of a vector with a multiple of itself.

theorem abs_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x : E} {r : ๐} (hx : x โ  0) (hr : r โ  0) :

The inner product of a nonzero vector with a nonzero multiple of itself, divided by the product of their norms, has absolute value 1.

The inner product of a nonzero vector with a nonzero multiple of itself, divided by the product of their norms, has absolute value 1.

theorem real_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_pos_mul {F : Type u_3} {x : F} {r : โ} (hx : x โ  0) (hr : 0 < r) :

The inner product of a nonzero vector with a positive multiple of itself, divided by the product of their norms, has value 1.

theorem real_inner_div_norm_mul_norm_eq_neg_one_of_ne_zero_of_neg_mul {F : Type u_3} {x : F} {r : โ} (hx : x โ  0) (hr : r < 0) :

The inner product of a nonzero vector with a negative multiple of itself, divided by the product of their norms, has value -1.

theorem abs_inner_div_norm_mul_norm_eq_one_iff {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :

The inner product of two vectors, divided by the product of their norms, has absolute value 1 if and only if they are nonzero and one is a multiple of the other. One form of equality case for Cauchy-Schwarz.

theorem abs_real_inner_div_norm_mul_norm_eq_one_iff {F : Type u_3} (x y : F) :
abs (inner x y / = 1 โ x โ  0 โง โ (r : โ), r โ  0 โง y = r โข x

The inner product of two vectors, divided by the product of their norms, has absolute value 1 if and only if they are nonzero and one is a multiple of the other. One form of equality case for Cauchy-Schwarz.

theorem abs_inner_eq_norm_iff {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) (hx0 : x โ  0) (hy0 : y โ  0) :
is_R_or_C.abs (inner x y) = โ โ (r : ๐), r โ  0 โง y = r โข x

If the inner product of two vectors is equal to the product of their norms, then the two vectors are multiples of each other. One form of the equality case for Cauchy-Schwarz. Compare `inner_eq_norm_mul_iff`, which takes the stronger hypothesis `โชx, yโซ = โฅxโฅ * โฅyโฅ`.

theorem real_inner_div_norm_mul_norm_eq_one_iff {F : Type u_3} (x y : F) :
y / = 1 โ x โ  0 โง โ (r : โ), 0 < r โง y = r โข x

The inner product of two vectors, divided by the product of their norms, has value 1 if and only if they are nonzero and one is a positive multiple of the other.

theorem real_inner_div_norm_mul_norm_eq_neg_one_iff {F : Type u_3} (x y : F) :
y / = -1 โ x โ  0 โง โ (r : โ), r < 0 โง y = r โข x

The inner product of two vectors, divided by the product of their norms, has value -1 if and only if they are nonzero and one is a negative multiple of the other.

theorem inner_eq_norm_mul_iff {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} :
y = โ =

If the inner product of two vectors is equal to the product of their norms (i.e., `โชx, yโซ = โฅxโฅ * โฅyโฅ`), then the two vectors are nonnegative real multiples of each other. One form of the equality case for Cauchy-Schwarz. Compare `abs_inner_eq_norm_iff`, which takes the weaker hypothesis `abs โชx, yโซ = โฅxโฅ * โฅyโฅ`.

theorem inner_eq_norm_mul_iff_real {F : Type u_3} {x y : F} :
y = โ =

If the inner product of two vectors is equal to the product of their norms (i.e., `โชx, yโซ = โฅxโฅ * โฅyโฅ`), then the two vectors are nonnegative real multiples of each other. One form of the equality case for Cauchy-Schwarz. Compare `abs_inner_eq_norm_iff`, which takes the weaker hypothesis `abs โชx, yโซ = โฅxโฅ * โฅyโฅ`.

theorem inner_eq_norm_mul_iff_of_norm_one {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {x y : E} (hx : โฅxโฅ = 1) (hy : โฅyโฅ = 1) :
y = 1 โ x = y

If the inner product of two unit vectors is `1`, then the two vectors are equal. One form of the equality case for Cauchy-Schwarz.

theorem inner_lt_norm_mul_iff_real {F : Type u_3} {x y : F} :
theorem inner_lt_one_iff_real_of_norm_one {F : Type u_3} {x y : F} (hx : โฅxโฅ = 1) (hy : โฅyโฅ = 1) :
y < 1 โ x โ  y

If the inner product of two unit vectors is strictly less than `1`, then the two vectors are distinct. One form of the equality case for Cauchy-Schwarz.

theorem inner_sum_smul_sum_smul_of_sum_eq_zero {F : Type u_3} {ฮนโ : Type u_1} {sโ : finset ฮนโ} {wโ : ฮนโ โ โ} (vโ : ฮนโ โ F) (hโ : โ (i : ฮนโ) in sโ, wโ i = 0) {ฮนโ : Type u_2} {sโ : finset ฮนโ} {wโ : ฮนโ โ โ} (vโ : ฮนโ โ F) (hโ : โ (i : ฮนโ) in sโ, wโ i = 0) :
inner (โ (iโ : ฮนโ) in sโ, wโ iโ โข vโ iโ) (โ (iโ : ฮนโ) in sโ, wโ iโ โข vโ iโ) = (-โ (iโ : ฮนโ) in sโ, โ (iโ : ฮนโ) in sโ, ((wโ iโ) * wโ iโ) * โฅvโ iโ - vโ iโโฅ * โฅvโ iโ - vโ iโโฅ) / 2

The inner product of two weighted sums, where the weights in each sum add to 0, in terms of the norms of pairwise differences.

def inner_right {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (v : E) :
E โL[๐] ๐

The inner product with a fixed left element, as a continuous linear map. This can be upgraded to a continuous map which is jointly conjugate-linear in the left argument and linear in the right argument, once (TODO) conjugate-linear maps have been defined.

Equations
@[simp]
theorem inner_right_coe {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (v : E) :
โ(inner_right v) = ฮป (w : E), w
@[simp]
theorem inner_right_apply {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (v w : E) :

### Inner product space structure on product spaces #

@[protected, instance]
def pi_Lp.inner_product_space {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_2} [fintype ฮน] (f : ฮน โ Type u_3) [ฮ  (i : ฮน), (f i)] :
f)
Equations
@[simp]
theorem pi_Lp.inner_apply {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_2} [fintype ฮน] {f : ฮน โ Type u_3} [ฮ  (i : ฮน), (f i)] (x y : f) :
y = โ (i : ฮน), inner (x i) (y i)
theorem pi_Lp.norm_eq_of_L2 {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_2} [fintype ฮน] {f : ฮน โ Type u_3} [ฮ  (i : ฮน), (f i)] (x : f) :
โฅxโฅ = real.sqrt (โ (i : ฮน), โฅx iโฅ ^ 2)
@[protected, instance]
def is_R_or_C.inner_product_space {๐ : Type u_1} [is_R_or_C ๐] :
๐

A field `๐` satisfying `is_R_or_C` is itself a `๐`-inner product space.

Equations
@[simp]
theorem is_R_or_C.inner_apply {๐ : Type u_1} [is_R_or_C ๐] (x y : ๐) :
y = * y
@[nolint]
def euclidean_space (๐ : Type u_1) [is_R_or_C ๐] (n : Type u_2) [fintype n] :
Type (max u_2 u_1)

The standard real/complex Euclidean space, functions on a finite type. For an `n`-dimensional space use `euclidean_space ๐ (fin n)`.

Equations
theorem euclidean_space.norm_eq {๐ : Type u_1} [is_R_or_C ๐] {n : Type u_2} [fintype n] (x : euclidean_space ๐ n) :
โฅxโฅ = real.sqrt (โ (i : n), โฅx iโฅ ^ 2)

### Inner product space structure on subspaces #

@[protected, instance]
def submodule.inner_product_space {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (W : submodule ๐ E) :

Induced inner product on a submodule.

Equations
@[simp]
theorem submodule.coe_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (W : submodule ๐ E) (x y : โฅW) :

The inner product on submodules is the same as on the ambient space.

def has_inner.is_R_or_C_to_real (๐ : Type u_1) (E : Type u_2) [is_R_or_C ๐] [ E] :

A general inner product implies a real inner product. This is not registered as an instance since it creates problems with the case `๐ = โ`.

Equations
def inner_product_space.is_R_or_C_to_real (๐ : Type u_1) (E : Type u_2) [is_R_or_C ๐] [ E] :

A general inner product space structure implies a real inner product structure. This is not registered as an instance since it creates problems with the case `๐ = โ`, but in can be used in a proof to obtain a real inner product space structure from a given `๐`-inner product space structure.

Equations
theorem real_inner_eq_re_inner (๐ : Type u_1) {E : Type u_2} [is_R_or_C ๐] [ E] (x y : E) :
@[protected, instance]
def inner_product_space.complex_to_real {G : Type u_4}  :

A complex inner product implies a real inner product

Equations

### Derivative of the inner product #

In this section we prove that the inner product and square of the norm in an inner space are infinitely `โ`-smooth. In order to state these results, we need a `normed_space โ E` instance. Though we can deduce this structure from `inner_product_space ๐ E`, this instance may be not definitionally equal to some other โnaturalโ instance. So, we assume `[normed_space โ E]` and `[is_scalar_tower โ ๐ E]`. In both interesting cases `๐ = โ` and `๐ = โ` we have these instances.

theorem is_bounded_bilinear_map_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] :
(ฮป (p : E ร E), inner p.fst p.snd)
def fderiv_inner_clm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] (p : E ร E) :
E ร E โL[โ] ๐

Derivative of the inner product.

Equations
@[simp]
theorem fderiv_inner_clm_apply {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] (p x : E ร E) :
x = inner p.fst x.snd + inner x.fst p.snd
theorem times_cont_diff_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {n : with_top โ} :
(ฮป (p : E ร E), inner p.fst p.snd)
theorem times_cont_diff_at_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {p : E ร E} {n : with_top โ} :
(ฮป (p : E ร E), inner p.fst p.snd) p
theorem differentiable_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] :
(ฮป (p : E ร E), inner p.fst p.snd)
theorem times_cont_diff_within_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {x : G} {n : with_top โ} (hf : x) (hg : x) :
(ฮป (x : G), inner (f x) (g x)) s x
theorem times_cont_diff_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {x : G} {n : with_top โ} (hf : x) (hg : x) :
(ฮป (x : G), inner (f x) (g x)) x
theorem times_cont_diff_on.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {n : with_top โ} (hf : s) (hg : s) :
(ฮป (x : G), inner (f x) (g x)) s
theorem times_cont_diff.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {n : with_top โ} (hf : f) (hg : g) :
(ฮป (x : G), inner (f x) (g x))
theorem has_fderiv_within_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {f' g' : G โL[โ] E} {s : set G} {x : G} (hf : s x) (hg : s x) :
has_fderiv_within_at (ฮป (t : G), inner (f t) (g t)) ((fderiv_inner_clm (f x, g x)).comp (f'.prod g')) s x
theorem has_fderiv_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {f' g' : G โL[โ] E} {x : G} (hf : f' x) (hg : g' x) :
has_fderiv_at (ฮป (t : G), inner (f t) (g t)) ((fderiv_inner_clm (f x, g x)).comp (f'.prod g')) x
theorem has_deriv_within_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {f g : โ โ E} {f' g' : E} {s : set โ} {x : โ} (hf : s x) (hg : s x) :
has_deriv_within_at (ฮป (t : โ), inner (f t) (g t)) (inner (f x) g' + inner f' (g x)) s x
theorem has_deriv_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {f g : โ โ E} {f' g' : E} {x : โ} :
f' x โ g' x โ has_deriv_at (ฮป (t : โ), inner (f t) (g t)) (inner (f x) g' + inner f' (g x)) x
theorem differentiable_within_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {x : G} (hf : x) (hg : x) :
(ฮป (x : G), inner (f x) (g x)) s x
theorem differentiable_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {x : G} (hf : x) (hg : x) :
(ฮป (x : G), inner (f x) (g x)) x
theorem differentiable_on.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} (hf : s) (hg : s) :
(ฮป (x : G), inner (f x) (g x)) s
theorem differentiable.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} (hf : f) (hg : g) :
(ฮป (x : G), inner (f x) (g x))
theorem fderiv_inner_apply {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {x : G} (hf : x) (hg : x) (y : G) :
โ (ฮป (t : G), inner (f t) (g t)) x) y = inner (f x) (โ g x) y) + inner (โ f x) y) (g x)
theorem deriv_inner_apply {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {f g : โ โ E} {x : โ} (hf : x) (hg : x) :
deriv (ฮป (t : โ), inner (f t) (g t)) x = inner (f x) (deriv g x) + inner (deriv f x) (g x)
theorem times_cont_diff_norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {n : with_top โ} :
(ฮป (x : E), โฅxโฅ ^ 2)
theorem times_cont_diff.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {n : with_top โ} (hf : f) :
(ฮป (x : G), โฅf xโฅ ^ 2)
theorem times_cont_diff_within_at.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {x : G} {n : with_top โ} (hf : x) :
(ฮป (y : G), โฅf yโฅ ^ 2) s x
theorem times_cont_diff_at.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {x : G} {n : with_top โ} (hf : x) :
(ฮป (y : G), โฅf yโฅ ^ 2) x
theorem times_cont_diff_at_norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {n : with_top โ} {x : E} (hx : x โ  0) :
theorem times_cont_diff_at.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {x : G} {n : with_top โ} (hf : x) (h0 : f x โ  0) :
(ฮป (y : G), โฅf yโฅ) x
theorem times_cont_diff_at.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {x : G} {n : with_top โ} (hf : x) (hg : x) (hne : f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) x
theorem times_cont_diff_within_at.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {x : G} {n : with_top โ} (hf : x) (h0 : f x โ  0) :
(ฮป (y : G), โฅf yโฅ) s x
theorem times_cont_diff_within_at.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {x : G} {n : with_top โ} (hf : x) (hg : x) (hne : f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) s x
theorem times_cont_diff_on.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {n : with_top โ} (hf : s) :
(ฮป (y : G), โฅf yโฅ ^ 2) s
theorem times_cont_diff_on.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {n : with_top โ} (hf : s) (h0 : โ (x : G), x โ s โ f x โ  0) :
(ฮป (y : G), โฅf yโฅ) s
theorem times_cont_diff_on.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {n : with_top โ} (hf : s) (hg : s) (hne : โ (x : G), x โ s โ f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) s
theorem times_cont_diff.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {n : with_top โ} (hf : f) (h0 : โ (x : G), f x โ  0) :
(ฮป (y : G), โฅf yโฅ)
theorem times_cont_diff.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {n : with_top โ} (hf : f) (hg : g) (hne : โ (x : G), f x โ  g x) :
(ฮป (y : G), dist (f y) (g y))
theorem differentiable_at.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {x : G} (hf : x) :
(ฮป (y : G), โฅf yโฅ ^ 2) x
theorem differentiable_at.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {x : G} (hf : x) (h0 : f x โ  0) :
(ฮป (y : G), โฅf yโฅ) x
theorem differentiable_at.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {x : G} (hf : x) (hg : x) (hne : f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) x
theorem differentiable.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} (hf : f) :
(ฮป (y : G), โฅf yโฅ ^ 2)
theorem differentiable.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} (hf : f) (h0 : โ (x : G), f x โ  0) :
(ฮป (y : G), โฅf yโฅ)
theorem differentiable.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} (hf : f) (hg : g) (hne : โ (x : G), f x โ  g x) :
(ฮป (y : G), dist (f y) (g y))
theorem differentiable_within_at.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {x : G} (hf : x) :
(ฮป (y : G), โฅf yโฅ ^ 2) s x
theorem differentiable_within_at.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} {x : G} (hf : x) (h0 : f x โ  0) :
(ฮป (y : G), โฅf yโฅ) s x
theorem differentiable_within_at.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} {x : G} (hf : x) (hg : x) (hne : f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) s x
theorem differentiable_on.norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} (hf : s) :
(ฮป (y : G), โฅf yโฅ ^ 2) s
theorem differentiable_on.norm {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f : G โ E} {s : set G} (hf : s) (h0 : โ (x : G), x โ s โ f x โ  0) :
(ฮป (y : G), โฅf yโฅ) s
theorem differentiable_on.dist {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] [ E] [ ๐ E] {G : Type u_4} [normed_group G] [ G] {f g : G โ E} {s : set G} (hf : s) (hg : s) (hne : โ (x : G), x โ s โ f x โ  g x) :
(ฮป (y : G), dist (f y) (g y)) s

### Continuity and measurability of the inner product #

Since the inner product is `โ`-smooth, it is continuous. We do not need a `[normed_space โ E]` structure to state this fact and its corollaries, so we introduce them in the proof instead.

theorem continuous_inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] :
continuous (ฮป (p : E ร E), inner p.fst p.snd)
theorem filter.tendsto.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} {f g : ฮฑ โ E} {l : filter ฮฑ} {x y : E} (hf : (๐ x)) (hg : (๐ y)) :
filter.tendsto (ฮป (t : ฮฑ), inner (f t) (g t)) l (๐ (inner x y))
theorem measurable.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} [measurable_space ฮฑ] [measurable_space ๐] [borel_space ๐] {f g : ฮฑ โ E} (hf : measurable f) (hg : measurable g) :
measurable (ฮป (t : ฮฑ), inner (f t) (g t))
theorem ae_measurable.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} [measurable_space ฮฑ] [measurable_space ๐] [borel_space ๐] {ฮผ : measure_theory.measure ฮฑ} {f g : ฮฑ โ E} (hf : ฮผ) (hg : ฮผ) :
ae_measurable (ฮป (x : ฮฑ), inner (f x) (g x)) ฮผ
theorem continuous_within_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} {f g : ฮฑ โ E} {x : ฮฑ} {s : set ฮฑ} (hf : x) (hg : x) :
continuous_within_at (ฮป (t : ฮฑ), inner (f t) (g t)) s x
theorem continuous_at.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} {f g : ฮฑ โ E} {x : ฮฑ} (hf : x) (hg : x) :
continuous_at (ฮป (t : ฮฑ), inner (f t) (g t)) x
theorem continuous_on.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} {f g : ฮฑ โ E} {s : set ฮฑ} (hf : s) (hg : s) :
continuous_on (ฮป (t : ฮฑ), inner (f t) (g t)) s
theorem continuous.inner {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮฑ : Type u_4} {f g : ฮฑ โ E} (hf : continuous f) (hg : continuous g) :
continuous (ฮป (t : ฮฑ), inner (f t) (g t))
@[protected, instance]
def euclidean_space.finite_dimensional {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_4} [fintype ฮน] :
(euclidean_space ๐ ฮน)
@[protected, instance]
def euclidean_space.inner_product_space {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_4} [fintype ฮน] :
(euclidean_space ๐ ฮน)
Equations
@[simp]
theorem finrank_euclidean_space {๐ : Type u_1} [is_R_or_C ๐] {ฮน : Type u_4} [fintype ฮน] :
(euclidean_space ๐ ฮน) =
theorem finrank_euclidean_space_fin {๐ : Type u_1} [is_R_or_C ๐] {n : โ} :
(euclidean_space ๐ (fin n)) = n
def basis.isometry_euclidean_of_orthonormal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_4} [fintype ฮน] (v : basis ฮน ๐ E) (hv : orthonormal ๐ โv) :
E โโแตข[๐] euclidean_space ๐ ฮน

An orthonormal basis on a fintype `ฮน` for an inner product space induces an isometry with `euclidean_space ๐ ฮน`.

Equations

`โ` is isometric to โยฒ with the Euclidean inner product.

Equations
@[simp]

### Orthogonal projection in inner product spaces #

theorem exists_norm_eq_infi_of_complete_convex {F : Type u_3} {K : set F} (ne : K.nonempty) (hโ : is_complete K) (hโ : convex K) (u : F) :
โ (v : F) (H : v โ K), โฅu - vโฅ = โจ (w : โฅK), โฅu - โwโฅ

Existence of minimizers Let `u` be a point in a real inner product space, and let `K` be a nonempty complete convex subset. Then there exists a (unique) `v` in `K` that minimizes the distance `โฅu - vโฅ` to `u`.

theorem norm_eq_infi_iff_real_inner_le_zero {F : Type u_3} {K : set F} (h : convex K) {u v : F} (hv : v โ K) :
(โฅu - vโฅ = โจ (w : โฅK), โฅu - โwโฅ) โ โ (w : F), w โ K โ inner (u - v) (w - v) โค 0

Characterization of minimizers for the projection on a convex set in a real inner product space.

theorem exists_norm_eq_infi_of_complete_subspace {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (h : is_complete โK) (u : E) :
โ (v : E) (H : v โ K), โฅu - vโฅ = โจ (w : โฅโK), โฅu - โwโฅ

Existence of projections on complete subspaces. Let `u` be a point in an inner product space, and let `K` be a nonempty complete subspace. Then there exists a (unique) `v` in `K` that minimizes the distance `โฅu - vโฅ` to `u`. This point `v` is usually called the orthogonal projection of `u` onto `K`.

theorem norm_eq_infi_iff_real_inner_eq_zero {F : Type u_3} (K : F) {u v : F} (hv : v โ K) :
(โฅu - vโฅ = โจ (w : โฅโK), โฅu - โwโฅ) โ โ (w : F), w โ K โ inner (u - v) w = 0

Characterization of minimizers in the projection on a subspace, in the real case. Let `u` be a point in a real inner product space, and let `K` be a nonempty subspace. Then point `v` minimizes the distance `โฅu - vโฅ` over points in `K` if and only if for all `w โ K`, `โชu - v, wโซ = 0` (i.e., `u - v` is orthogonal to the subspace `K`). This is superceded by `norm_eq_infi_iff_inner_eq_zero` that gives the same conclusion over any `is_R_or_C` field.

theorem norm_eq_infi_iff_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) {u v : E} (hv : v โ K) :
(โฅu - vโฅ = โจ (w : โฅโK), โฅu - โwโฅ) โ โ (w : E), w โ K โ inner (u - v) w = 0

Characterization of minimizers in the projection on a subspace. Let `u` be a point in an inner product space, and let `K` be a nonempty subspace. Then point `v` minimizes the distance `โฅu - vโฅ` over points in `K` if and only if for all `w โ K`, `โชu - v, wโซ = 0` (i.e., `u - v` is orthogonal to the subspace `K`)

def orthogonal_projection_fn {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (v : E) :
E

The orthogonal projection onto a complete subspace, as an unbundled function. This definition is only intended for use in setting up the bundled version `orthogonal_projection` and should not be used once that is defined.

Equations
theorem orthogonal_projection_fn_mem {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (v : E) :

The unbundled orthogonal projection is in the given subspace. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem orthogonal_projection_fn_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (v w : E) (H : w โ K) :
inner (v - w = 0

The characterization of the unbundled orthogonal projection. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v : E} (hvm : v โ K) (hvo : โ (w : E), w โ K โ inner (u - v) w = 0) :

The unbundled orthogonal projection is the unique point in `K` with the orthogonality property. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem orthogonal_projection_fn_norm_sq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (v : E) :
def orthogonal_projection {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :
E โL[๐] โฅK

The orthogonal projection onto a complete subspace.

Equations
@[simp]
theorem orthogonal_projection_fn_eq {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (v : E) :
@[simp]
theorem orthogonal_projection_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (v w : E) (H : w โ K) :
inner (v - โ v)) w = 0

The characterization of the orthogonal projection.

theorem eq_orthogonal_projection_of_mem_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v : E} (hvm : v โ K) (hvo : โ (w : E), w โ K โ inner (u - v) w = 0) :
โ u) = v

The orthogonal projection is the unique point in `K` with the orthogonality property.

theorem eq_orthogonal_projection_of_eq_submodule {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {K' : submodule ๐ E} (h : K = K') (u : E) :

The orthogonal projections onto equal subspaces are coerced back to the same point in `E`.

@[simp]
theorem orthogonal_projection_mem_subspace_eq_self {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (v : โฅK) :
= v

The orthogonal projection sends elements of `K` to themselves.

@[simp]
theorem orthogonal_projection_bot {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] :

The orthogonal projection onto the trivial submodule is the zero map.

theorem orthogonal_projection_norm_le {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :

The orthogonal projection has norm `โค 1`.

theorem smul_orthogonal_projection_singleton (๐ : Type u_1) {E : Type u_2} [is_R_or_C ๐] [ E] {v : E} (w : E) :
theorem orthogonal_projection_singleton (๐ : Type u_1) {E : Type u_2} [is_R_or_C ๐] [ E] {v : E} (w : E) :

Formula for orthogonal projection onto a single vector.

theorem orthogonal_projection_unit_singleton (๐ : Type u_1) {E : Type u_2} [is_R_or_C ๐] [ E] {v : E} (hv : โฅvโฅ = 1) (w : E) :

Formula for orthogonal projection onto a single unit vector.

def submodule.orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :
submodule ๐ E

The subspace of vectors orthogonal to a given subspace.

Equations
theorem submodule.mem_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (v : E) :
v โ Kแฎ โ โ (u : E), u โ K โ v = 0

When a vector is in `Kแฎ`.

theorem submodule.mem_orthogonal' {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (v : E) :
v โ Kแฎ โ โ (u : E), u โ K โ u = 0

When a vector is in `Kแฎ`, with the inner product the other way round.

theorem submodule.inner_right_of_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v : E} (hu : u โ K) (hv : v โ Kแฎ) :
v = 0

A vector in `K` is orthogonal to one in `Kแฎ`.

theorem submodule.inner_left_of_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v : E} (hu : u โ K) (hv : v โ Kแฎ) :
u = 0

A vector in `Kแฎ` is orthogonal to one in `K`.

theorem inner_right_of_mem_orthogonal_singleton {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (u : E) {v : E} (hv : v โ (submodule.span ๐ {u})แฎ) :
v = 0

A vector in `(๐ โ u)แฎ` is orthogonal to `u`.

theorem inner_left_of_mem_orthogonal_singleton {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (u : E) {v : E} (hv : v โ (submodule.span ๐ {u})แฎ) :
u = 0

A vector in `(๐ โ u)แฎ` is orthogonal to `u`.

theorem submodule.inf_orthogonal_eq_bot {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :

`K` and `Kแฎ` have trivial intersection.

theorem submodule.orthogonal_disjoint {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :

`K` and `Kแฎ` have trivial intersection.

theorem orthogonal_eq_inter {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :
Kแฎ = โจ (v : โฅK), .ker

`Kแฎ` can be characterized as the intersection of the kernels of the operations of inner product with each of the elements of `K`.

theorem submodule.is_closed_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :

The orthogonal complement of any submodule `K` is closed.

@[protected, instance]
def submodule.orthogonal.complete_space {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :

In a complete space, the orthogonal complement of any submodule `K` is complete.

theorem submodule.orthogonal_gc (๐ : Type u_1) (E : Type u_2) [is_R_or_C ๐] [ E] :

`submodule.orthogonal` gives a `galois_connection` between `submodule ๐ E` and its `order_dual`.

theorem submodule.orthogonal_le {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {Kโ Kโ : submodule ๐ E} (h : Kโ โค Kโ) :
Kโแฎ โค Kโแฎ

`submodule.orthogonal` reverses the `โค` ordering of two subspaces.

theorem submodule.orthogonal_orthogonal_monotone {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {Kโ Kโ : submodule ๐ E} (h : Kโ โค Kโ) :

`submodule.orthogonal.orthogonal` preserves the `โค` ordering of two subspaces.

theorem submodule.le_orthogonal_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) :

`K` is contained in `Kแฎแฎ`.

theorem submodule.inf_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (Kโ Kโ : submodule ๐ E) :
Kโแฎ โ Kโแฎ = (Kโ โ Kโ)แฎ

The inf of two orthogonal subspaces equals the subspace orthogonal to the sup.

theorem submodule.infi_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {ฮน : Type u_3} (K : ฮน โ submodule ๐ E) :
(โจ (i : ฮน), (K i)แฎ) = (supr K)แฎ

The inf of an indexed family of orthogonal subspaces equals the subspace orthogonal to the sup.

theorem submodule.Inf_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (s : set (submodule ๐ E)) :
(โจ (K : submodule ๐ E) (H : K โ s), Kแฎ) = (Sup s)แฎ

The inf of a set of orthogonal subspaces equals the subspace orthogonal to the sup.

theorem submodule.sup_orthogonal_inf_of_is_complete {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {Kโ Kโ : submodule ๐ E} (h : Kโ โค Kโ) (hc : is_complete โKโ) :
Kโ โ Kโแฎ โ Kโ = Kโ

If `Kโ` is complete and contained in `Kโ`, `Kโ` and `Kโแฎ โ Kโ` span `Kโ`.

theorem submodule.sup_orthogonal_of_is_complete {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (h : is_complete โK) :

If `K` is complete, `K` and `Kแฎ` span the whole space.

theorem submodule.sup_orthogonal_of_complete_space {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E}  :

If `K` is complete, `K` and `Kแฎ` span the whole space. Version using `complete_space`.

theorem submodule.exists_sum_mem_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (v : E) :
โ (y : E) (H : y โ K) (z : E) (H : z โ Kแฎ), v = y + z

If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kแฎ`.

@[simp]
theorem submodule.orthogonal_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :

If `K` is complete, then the orthogonal complement of its orthogonal complement is itself.

theorem submodule.orthogonal_orthogonal_eq_closure {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :
theorem submodule.is_compl_orthogonal_of_is_complete {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (h : is_complete โK) :

If `K` is complete, `K` and `Kแฎ` are complements of each other.

@[simp]
theorem submodule.top_orthogonal_eq_bot {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] :
@[simp]
theorem submodule.bot_orthogonal_eq_top {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] :
@[simp]
theorem submodule.orthogonal_eq_bot_iff {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} (hK : is_complete โK) :
@[simp]
theorem submodule.orthogonal_eq_top_iff {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} :
theorem eq_orthogonal_projection_of_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v : E} (hv : v โ K) (hvo : u - v โ Kแฎ) :
โ u) = v

A point in `K` with the orthogonality property (here characterized in terms of `Kแฎ`) must be the orthogonal projection.

theorem eq_orthogonal_projection_of_mem_orthogonal' {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {u v z : E} (hv : v โ K) (hz : z โ Kแฎ) (hu : u = v + z) :
โ u) = v

A point in `K` with the orthogonality property (here characterized in terms of `Kแฎ`) must be the orthogonal projection.

theorem orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {v : E} (hv : v โ Kแฎ) :
= 0

The orthogonal projection onto `K` of an element of `Kแฎ` is zero.

theorem orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] {K : submodule ๐ E} {v : E} (hv : v โ K) :
= 0

The orthogonal projection onto `Kแฎ` of an element of `K` is zero.

theorem orthogonal_projection_orthogonal_complement_singleton_eq_zero {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (v : E) :

The orthogonal projection onto `(๐ โ v)แฎ` of `v` is zero.

theorem eq_sum_orthogonal_projection_self_orthogonal_complement {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E) (w : E) :
w = โ w) + โ w)

In a complete space `E`, a vector splits as the sum of its orthogonal projections onto a complete submodule `K` and onto the orthogonal complement of `K`.

theorem id_eq_sum_orthogonal_projection_self_orthogonal_complement {๐ : Type u_1} {E : Type u_2} [is_R_or_C ๐] [ E] (K : submodule ๐ E)  :
E = + K