Documentation

Mathlib.Analysis.InnerProductSpace.GramSchmidtOrtho

Gram-Schmidt Orthogonalization and Orthonormalization #

In this file we introduce Gram-Schmidt Orthogonalization and Orthonormalization.

The Gram-Schmidt process takes a set of vectors as input and outputs a set of orthogonal vectors which have the same span.

Main results #

@[irreducible]
noncomputable def InnerProductSpace.gramSchmidt (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (n : ฮน) :
E

The Gram-Schmidt process takes a set of vectors as input and outputs a set of orthogonal vectors which have the same span.

Equations
    Instances For
      theorem InnerProductSpace.gramSchmidt_def (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (n : ฮน) :
      gramSchmidt ๐•œ f n = f n - โˆ‘ i โˆˆ Finset.Iio n, (Submodule.span ๐•œ {gramSchmidt ๐•œ f i}).starProjection (f n)

      This lemma uses โˆ‘ i in instead of โˆ‘ i :.

      theorem InnerProductSpace.gramSchmidt_def' (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (n : ฮน) :
      f n = gramSchmidt ๐•œ f n + โˆ‘ i โˆˆ Finset.Iio n, (Submodule.span ๐•œ {gramSchmidt ๐•œ f i}).starProjection (f n)
      theorem InnerProductSpace.gramSchmidt_def'' (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (n : ฮน) :
      f n = gramSchmidt ๐•œ f n + โˆ‘ i โˆˆ Finset.Iio n, (inner ๐•œ (gramSchmidt ๐•œ f i) (f n) / โ†‘โ€–gramSchmidt ๐•œ f iโ€– ^ 2) โ€ข gramSchmidt ๐•œ f i
      @[simp]
      theorem InnerProductSpace.gramSchmidt_bot (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_4} [LinearOrder ฮน] [LocallyFiniteOrder ฮน] [OrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
      @[simp]
      theorem InnerProductSpace.gramSchmidt_zero (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (n : ฮน) :
      gramSchmidt ๐•œ 0 n = 0
      theorem InnerProductSpace.gramSchmidt_orthogonal (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) {a b : ฮน} (hโ‚€ : a โ‰  b) :
      inner ๐•œ (gramSchmidt ๐•œ f a) (gramSchmidt ๐•œ f b) = 0

      Gram-Schmidt Orthogonalisation: gramSchmidt produces an orthogonal system of vectors.

      theorem InnerProductSpace.gramSchmidt_pairwise_orthogonal (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
      Pairwise fun (a b : ฮน) => inner ๐•œ (gramSchmidt ๐•œ f a) (gramSchmidt ๐•œ f b) = 0

      This is another version of gramSchmidt_orthogonal using Pairwise instead.

      theorem InnerProductSpace.gramSchmidt_inv_triangular (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (v : ฮน โ†’ E) {i j : ฮน} (hij : i < j) :
      inner ๐•œ (gramSchmidt ๐•œ v j) (v i) = 0
      theorem InnerProductSpace.mem_span_gramSchmidt (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) {i j : ฮน} (hij : i โ‰ค j) :
      f i โˆˆ Submodule.span ๐•œ (gramSchmidt ๐•œ f '' Set.Iic j)
      @[irreducible]
      theorem InnerProductSpace.gramSchmidt_mem_span (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) {j i : ฮน} :
      i โ‰ค j โ†’ gramSchmidt ๐•œ f i โˆˆ Submodule.span ๐•œ (f '' Set.Iic j)
      theorem InnerProductSpace.span_gramSchmidt_Iic (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (c : ฮน) :
      Submodule.span ๐•œ (gramSchmidt ๐•œ f '' Set.Iic c) = Submodule.span ๐•œ (f '' Set.Iic c)
      theorem InnerProductSpace.span_gramSchmidt_Iio (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (c : ฮน) :
      Submodule.span ๐•œ (gramSchmidt ๐•œ f '' Set.Iio c) = Submodule.span ๐•œ (f '' Set.Iio c)
      theorem InnerProductSpace.span_gramSchmidt (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
      Submodule.span ๐•œ (Set.range (gramSchmidt ๐•œ f)) = Submodule.span ๐•œ (Set.range f)

      gramSchmidt preserves span of vectors.

      theorem InnerProductSpace.gramSchmidt_of_orthogonal (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (hf : Pairwise fun (x1 x2 : ฮน) => inner ๐•œ (f x1) (f x2) = 0) :
      gramSchmidt ๐•œ f = f

      If given an orthogonal set of vectors, gramSchmidt fixes its input.

      theorem InnerProductSpace.gramSchmidt_ne_zero_coe {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (n : ฮน) (hโ‚€ : LinearIndependent ๐•œ (f โˆ˜ Subtype.val)) :
      gramSchmidt ๐•œ f n โ‰  0
      theorem InnerProductSpace.gramSchmidt_ne_zero {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (n : ฮน) (hโ‚€ : LinearIndependent ๐•œ f) :
      gramSchmidt ๐•œ f n โ‰  0

      If the input vectors of gramSchmidt are linearly independent, then the output vectors are non-zero.

      theorem InnerProductSpace.gramSchmidt_triangular {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {i j : ฮน} (hij : i < j) (b : Module.Basis ฮน ๐•œ E) :
      (b.repr (gramSchmidt ๐•œ (โ‡‘b) i)) j = 0

      gramSchmidt produces a triangular matrix of vectors when given a basis.

      theorem InnerProductSpace.gramSchmidt_linearIndependent {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (hโ‚€ : LinearIndependent ๐•œ f) :
      LinearIndependent ๐•œ (gramSchmidt ๐•œ f)

      gramSchmidt produces linearly independent vectors when given linearly independent vectors.

      noncomputable def InnerProductSpace.gramSchmidtBasis {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (b : Module.Basis ฮน ๐•œ E) :
      Module.Basis ฮน ๐•œ E

      When given a basis, gramSchmidt produces a basis.

      Equations
        Instances For
          theorem InnerProductSpace.coe_gramSchmidtBasis {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (b : Module.Basis ฮน ๐•œ E) :
          โ‡‘(gramSchmidtBasis b) = gramSchmidt ๐•œ โ‡‘b
          noncomputable def InnerProductSpace.gramSchmidtNormed (๐•œ : Type u_1) {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (n : ฮน) :
          E

          the normalized gramSchmidt (i.e each vector in gramSchmidtNormed has unit length.)

          Equations
            Instances For
              theorem InnerProductSpace.gramSchmidtNormed_unit_length_coe {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (n : ฮน) (hโ‚€ : LinearIndependent ๐•œ (f โˆ˜ Subtype.val)) :
              theorem InnerProductSpace.gramSchmidtNormed_unit_length {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (n : ฮน) (hโ‚€ : LinearIndependent ๐•œ f) :
              theorem InnerProductSpace.gramSchmidtNormed_unit_length' {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} {n : ฮน} (hn : gramSchmidtNormed ๐•œ f n โ‰  0) :
              theorem InnerProductSpace.gramSchmidtNormed_orthonormal {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (hโ‚€ : LinearIndependent ๐•œ f) :
              Orthonormal ๐•œ (gramSchmidtNormed ๐•œ f)

              Gram-Schmidt Orthonormalization: gramSchmidtNormed applied to a linearly independent set of vectors produces an orthornormal system of vectors.

              @[deprecated InnerProductSpace.gramSchmidtNormed_orthonormal (since := "2025-07-10")]
              theorem InnerProductSpace.gramSchmidt_orthonormal {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (hโ‚€ : LinearIndependent ๐•œ f) :
              Orthonormal ๐•œ (gramSchmidtNormed ๐•œ f)

              Alias of InnerProductSpace.gramSchmidtNormed_orthonormal.


              Gram-Schmidt Orthonormalization: gramSchmidtNormed applied to a linearly independent set of vectors produces an orthornormal system of vectors.

              theorem InnerProductSpace.gramSchmidtNormed_orthonormal' {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
              Orthonormal ๐•œ fun (i : โ†‘{i : ฮน | gramSchmidtNormed ๐•œ f i โ‰  0}) => gramSchmidtNormed ๐•œ f โ†‘i

              Gram-Schmidt Orthonormalization: gramSchmidtNormed produces an orthornormal system of vectors after removing the vectors which become zero in the process.

              @[deprecated InnerProductSpace.gramSchmidtNormed_orthonormal' (since := "2025-07-10")]
              theorem InnerProductSpace.gramSchmidt_orthonormal' {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
              Orthonormal ๐•œ fun (i : โ†‘{i : ฮน | gramSchmidtNormed ๐•œ f i โ‰  0}) => gramSchmidtNormed ๐•œ f โ†‘i

              Alias of InnerProductSpace.gramSchmidtNormed_orthonormal'.


              Gram-Schmidt Orthonormalization: gramSchmidtNormed produces an orthornormal system of vectors after removing the vectors which become zero in the process.

              theorem InnerProductSpace.span_gramSchmidtNormed {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) (s : Set ฮน) :
              Submodule.span ๐•œ (gramSchmidtNormed ๐•œ f '' s) = Submodule.span ๐•œ (gramSchmidt ๐•œ f '' s)
              theorem InnerProductSpace.span_gramSchmidtNormed_range {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] (f : ฮน โ†’ E) :
              Submodule.span ๐•œ (Set.range (gramSchmidtNormed ๐•œ f)) = Submodule.span ๐•œ (Set.range (gramSchmidt ๐•œ f))
              theorem InnerProductSpace.gramSchmidtNormed_linearIndependent {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] {f : ฮน โ†’ E} (hโ‚€ : LinearIndependent ๐•œ f) :
              LinearIndependent ๐•œ (gramSchmidtNormed ๐•œ f)

              gramSchmidtNormed produces linearly independent vectors when given linearly independent vectors.

              noncomputable def InnerProductSpace.gramSchmidtOrthonormalBasis {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) (f : ฮน โ†’ E) :
              OrthonormalBasis ฮน ๐•œ E

              Given an indexed family f : ฮน โ†’ E of vectors in an inner product space E, for which the size of the index set is the dimension of E, produce an orthonormal basis for E which agrees with the orthonormal set produced by the Gram-Schmidt orthonormalization process on the elements of ฮน for which this process gives a nonzero number.

              Equations
                Instances For
                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_apply {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) {f : ฮน โ†’ E} {i : ฮน} (hi : gramSchmidtNormed ๐•œ f i โ‰  0) :
                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_apply_of_orthogonal {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) {f : ฮน โ†’ E} (hf : Pairwise fun (i j : ฮน) => inner ๐•œ (f i) (f j) = 0) {i : ฮน} (hi : f i โ‰  0) :
                  theorem InnerProductSpace.inner_gramSchmidtOrthonormalBasis_eq_zero {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) {f : ฮน โ†’ E} {i : ฮน} (hi : gramSchmidtNormed ๐•œ f i = 0) (j : ฮน) :
                  inner ๐•œ ((gramSchmidtOrthonormalBasis h f) i) (f j) = 0
                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_inv_triangular {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) (f : ฮน โ†’ E) {i j : ฮน} (hij : i < j) :
                  inner ๐•œ ((gramSchmidtOrthonormalBasis h f) j) (f i) = 0
                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_inv_triangular' {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) (f : ฮน โ†’ E) {i j : ฮน} (hij : i < j) :
                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_inv_blockTriangular {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) (f : ฮน โ†’ E) :

                  Given an indexed family f : ฮน โ†’ E of vectors in an inner product space E, for which the size of the index set is the dimension of E, the matrix of coefficients of f with respect to the orthonormal basis gramSchmidtOrthonormalBasis constructed from f is upper-triangular.

                  theorem InnerProductSpace.gramSchmidtOrthonormalBasis_det {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_3} [LinearOrder ฮน] [LocallyFiniteOrderBot ฮน] [WellFoundedLT ฮน] [Fintype ฮน] [FiniteDimensional ๐•œ E] (h : Module.finrank ๐•œ E = Fintype.card ฮน) (f : ฮน โ†’ E) [DecidableEq ฮน] :
                  (gramSchmidtOrthonormalBasis h f).toBasis.det f = โˆ i : ฮน, inner ๐•œ ((gramSchmidtOrthonormalBasis h f) i) (f i)