File: Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean

full_name: «_aux_Mathlib_Analysis_InnerProductSpace_GramSchmidtOrtho___macroRules_term⟪_,_⟫_1»
code: local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
goal: Lean.Macro

full_name: gramSchmidt
code: /-- The Gram-Schmidt process takes a set of vectors as input
and outputs a set of orthogonal vectors which have the same span. -/
noncomputable def gramSchmidt [IsWellOrder ι (· < ·)] (f : ι → E) (n : ι) : E 
goal: E

full_name: gramSchmidt_def
code: /-- This lemma uses `∑ i in` instead of `∑ i :`. -/
theorem gramSchmidt_def (f : ι → E) (n : ι) :
    gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, orthogonalProjection (𝕜 ∙ gramSchmidt 𝕜 f i) (f n) 
goal: gramSchmidt 𝕜 f n = f n - ∑ i ∈ Finset.Iio n, ↑((orthogonalProjection (Submodule.span 𝕜 {gramSchmidt 𝕜 f i})) (f n))

full_name: gramSchmidt_def'
code: theorem gramSchmidt_def' (f : ι → E) (n : ι) :
    f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, orthogonalProjection (𝕜 ∙ gramSchmidt 𝕜 f i) (f n) 
goal: f n = gramSchmidt 𝕜 f n + ∑ i ∈ Finset.Iio n, ↑((orthogonalProjection (Submodule.span 𝕜 {gramSchmidt 𝕜 f i})) (f n))

full_name: gramSchmidt_def''
code: theorem gramSchmidt_def'' (f : ι → E) (n : ι) :
    f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n,
      (⟪gramSchmidt 𝕜 f i, f n⟫ / (‖gramSchmidt 𝕜 f i‖ : 𝕜) ^ 2) • gramSchmidt 𝕜 f i 
goal: f n =
  gramSchmidt 𝕜 f n + ∑ i ∈ Finset.Iio n, (⟪gramSchmidt 𝕜 f i, f n⟫_𝕜 / ↑‖gramSchmidt 𝕜 f i‖ ^ 2) • gramSchmidt 𝕜 f i

full_name: gramSchmidt_zero
code: @[simp]
theorem gramSchmidt_zero {ι : Type*} [LinearOrder ι] [LocallyFiniteOrder ι] [OrderBot ι]
    [IsWellOrder ι (· < ·)] (f : ι → E) : gramSchmidt 𝕜 f ⊥ = f ⊥ 
goal: gramSchmidt 𝕜 f ⊥ = f ⊥

full_name: gramSchmidt_orthogonal
code: /-- **Gram-Schmidt Orthogonalisation**:
`gramSchmidt` produces an orthogonal system of vectors. -/
theorem gramSchmidt_orthogonal (f : ι → E) {a b : ι} (h₀ : a ≠ b) :
    ⟪gramSchmidt 𝕜 f a, gramSchmidt 𝕜 f b⟫ = 0 
goal: ⟪gramSchmidt 𝕜 f a, gramSchmidt 𝕜 f b⟫_𝕜 = 0

full_name: gramSchmidt_pairwise_orthogonal
code: /-- This is another version of `gramSchmidt_orthogonal` using `Pairwise` instead. -/
theorem gramSchmidt_pairwise_orthogonal (f : ι → E) :
    Pairwise fun a b => ⟪gramSchmidt 𝕜 f a, gramSchmidt 𝕜 f b⟫ = 0 
goal: Pairwise fun a b => ⟪gramSchmidt 𝕜 f a, gramSchmidt 𝕜 f b⟫_𝕜 = 0

full_name: gramSchmidt_inv_triangular
code: theorem gramSchmidt_inv_triangular (v : ι → E) {i j : ι} (hij : i < j) :
    ⟪gramSchmidt 𝕜 v j, v i⟫ = 0 
goal: ⟪gramSchmidt 𝕜 v j, v i⟫_𝕜 = 0

full_name: mem_span_gramSchmidt
code: theorem mem_span_gramSchmidt (f : ι → E) {i j : ι} (hij : i ≤ j) :
    f i ∈ span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic j) 
goal: f i ∈ Submodule.span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic j)

full_name: gramSchmidt_mem_span
code: theorem gramSchmidt_mem_span (f : ι → E) :
    ∀ {j i}, i ≤ j → gramSchmidt 𝕜 f i ∈ span 𝕜 (f '' Set.Iic j) 
goal: i ≤ j → gramSchmidt 𝕜 f i ∈ Submodule.span 𝕜 (f '' Set.Iic j)

full_name: span_gramSchmidt_Iic
code: theorem span_gramSchmidt_Iic (f : ι → E) (c : ι) :
    span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic c) = span 𝕜 (f '' Set.Iic c) 
goal: Submodule.span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic c) = Submodule.span 𝕜 (f '' Set.Iic c)

full_name: span_gramSchmidt_Iio
code: theorem span_gramSchmidt_Iio (f : ι → E) (c : ι) :
    span 𝕜 (gramSchmidt 𝕜 f '' Set.Iio c) = span 𝕜 (f '' Set.Iio c) 
goal: Submodule.span 𝕜 (gramSchmidt 𝕜 f '' Set.Iio c) = Submodule.span 𝕜 (f '' Set.Iio c)

full_name: span_gramSchmidt
code: /-- `gramSchmidt` preserves span of vectors. -/
theorem span_gramSchmidt (f : ι → E) : span 𝕜 (range (gramSchmidt 𝕜 f)) = span 𝕜 (range f) 
goal: Submodule.span 𝕜 (Set.range (gramSchmidt 𝕜 f)) = Submodule.span 𝕜 (Set.range f)

full_name: gramSchmidt_of_orthogonal
code: theorem gramSchmidt_of_orthogonal {f : ι → E} (hf : Pairwise fun i j => ⟪f i, f j⟫ = 0) :
    gramSchmidt 𝕜 f = f 
goal: gramSchmidt 𝕜 f = f

full_name: gramSchmidt_ne_zero_coe
code: theorem gramSchmidt_ne_zero_coe {f : ι → E} (n : ι)
    (h₀ : LinearIndependent 𝕜 (f ∘ ((↑) : Set.Iic n → ι))) : gramSchmidt 𝕜 f n ≠ 0 
goal: gramSchmidt 𝕜 f n ≠ 0

full_name: gramSchmidt_ne_zero
code: /-- If the input vectors of `gramSchmidt` are linearly independent,
then the output vectors are non-zero. -/
theorem gramSchmidt_ne_zero {f : ι → E} (n : ι) (h₀ : LinearIndependent 𝕜 f) :
    gramSchmidt 𝕜 f n ≠ 0 
goal: gramSchmidt 𝕜 f n ≠ 0

full_name: gramSchmidt_triangular
code: /-- `gramSchmidt` produces a triangular matrix of vectors when given a basis. -/
theorem gramSchmidt_triangular {i j : ι} (hij : i < j) (b : Basis ι 𝕜 E) :
    b.repr (gramSchmidt 𝕜 b i) j = 0 
goal: (b.repr (gramSchmidt 𝕜 (⇑b) i)) j = 0

full_name: gramSchmidt_linearIndependent
code: /-- `gramSchmidt` produces linearly independent vectors when given linearly independent vectors. -/
theorem gramSchmidt_linearIndependent {f : ι → E} (h₀ : LinearIndependent 𝕜 f) :
    LinearIndependent 𝕜 (gramSchmidt 𝕜 f) 
goal: LinearIndependent 𝕜 (gramSchmidt 𝕜 f)

full_name: gramSchmidtBasis
code: /-- When given a basis, `gramSchmidt` produces a basis. -/
noncomputable def gramSchmidtBasis (b : Basis ι 𝕜 E) : Basis ι 𝕜 E 
goal: Basis ι 𝕜 E

full_name: coe_gramSchmidtBasis
code: theorem coe_gramSchmidtBasis (b : Basis ι 𝕜 E) : (gramSchmidtBasis b : ι → E) = gramSchmidt 𝕜 b 
goal: ⇑(gramSchmidtBasis b) = gramSchmidt 𝕜 ⇑b

full_name: gramSchmidtNormed
code: /-- the normalized `gramSchmidt`
(i.e each vector in `gramSchmidtNormed` has unit length.) -/
noncomputable def gramSchmidtNormed (f : ι → E) (n : ι) : E 
goal: E

full_name: gramSchmidtNormed_unit_length_coe
code: theorem gramSchmidtNormed_unit_length_coe {f : ι → E} (n : ι)
    (h₀ : LinearIndependent 𝕜 (f ∘ ((↑) : Set.Iic n → ι))) : ‖gramSchmidtNormed 𝕜 f n‖ = 1 
goal: ‖gramSchmidtNormed 𝕜 f n‖ = 1

full_name: gramSchmidtNormed_unit_length
code: theorem gramSchmidtNormed_unit_length {f : ι → E} (n : ι) (h₀ : LinearIndependent 𝕜 f) :
    ‖gramSchmidtNormed 𝕜 f n‖ = 1 
goal: ‖gramSchmidtNormed 𝕜 f n‖ = 1

full_name: gramSchmidtNormed_unit_length'
code: theorem gramSchmidtNormed_unit_length' {f : ι → E} {n : ι} (hn : gramSchmidtNormed 𝕜 f n ≠ 0) :
    ‖gramSchmidtNormed 𝕜 f n‖ = 1 
goal: ‖gramSchmidtNormed 𝕜 f n‖ = 1

full_name: gramSchmidt_orthonormal
code: /-- **Gram-Schmidt Orthonormalization**:
`gramSchmidtNormed` applied to a linearly independent set of vectors produces an orthornormal
system of vectors. -/
theorem gramSchmidt_orthonormal {f : ι → E} (h₀ : LinearIndependent 𝕜 f) :
    Orthonormal 𝕜 (gramSchmidtNormed 𝕜 f) 
goal: Orthonormal 𝕜 (gramSchmidtNormed 𝕜 f)

full_name: gramSchmidt_orthonormal'
code: /-- **Gram-Schmidt Orthonormalization**:
`gramSchmidtNormed` produces an orthornormal system of vectors after removing the vectors which
become zero in the process. -/
theorem gramSchmidt_orthonormal' (f : ι → E) :
    Orthonormal 𝕜 fun i : { i | gramSchmidtNormed 𝕜 f i ≠ 0 } => gramSchmidtNormed 𝕜 f i 
goal: Orthonormal 𝕜 fun i => gramSchmidtNormed 𝕜 f ↑i

full_name: span_gramSchmidtNormed
code: theorem span_gramSchmidtNormed (f : ι → E) (s : Set ι) :
    span 𝕜 (gramSchmidtNormed 𝕜 f '' s) = span 𝕜 (gramSchmidt 𝕜 f '' s) 
goal: Submodule.span 𝕜 (gramSchmidtNormed 𝕜 f '' s) = Submodule.span 𝕜 (gramSchmidt 𝕜 f '' s)

full_name: span_gramSchmidtNormed_range
code: theorem span_gramSchmidtNormed_range (f : ι → E) :
    span 𝕜 (range (gramSchmidtNormed 𝕜 f)) = span 𝕜 (range (gramSchmidt 𝕜 f)) 
goal: Submodule.span 𝕜 (Set.range (gramSchmidtNormed 𝕜 f)) = Submodule.span 𝕜 (Set.range (gramSchmidt 𝕜 f))

full_name: gramSchmidtOrthonormalBasis
code: /-- 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. -/
noncomputable def gramSchmidtOrthonormalBasis : OrthonormalBasis ι 𝕜 E 
goal: OrthonormalBasis ι 𝕜 E

full_name: gramSchmidtOrthonormalBasis_apply
code: theorem gramSchmidtOrthonormalBasis_apply {f : ι → E} {i : ι} (hi : gramSchmidtNormed 𝕜 f i ≠ 0) :
    gramSchmidtOrthonormalBasis h f i = gramSchmidtNormed 𝕜 f i 
goal: (gramSchmidtOrthonormalBasis h f) i = gramSchmidtNormed 𝕜 f i

full_name: gramSchmidtOrthonormalBasis_apply_of_orthogonal
code: theorem gramSchmidtOrthonormalBasis_apply_of_orthogonal {f : ι → E}
    (hf : Pairwise fun i j => ⟪f i, f j⟫ = 0) {i : ι} (hi : f i ≠ 0) :
    gramSchmidtOrthonormalBasis h f i = (‖f i‖⁻¹ : 𝕜) • f i 
goal: (gramSchmidtOrthonormalBasis h f) i = (↑‖f i‖)⁻¹ • f i

full_name: inner_gramSchmidtOrthonormalBasis_eq_zero
code: theorem inner_gramSchmidtOrthonormalBasis_eq_zero {f : ι → E} {i : ι}
    (hi : gramSchmidtNormed 𝕜 f i = 0) (j : ι) : ⟪gramSchmidtOrthonormalBasis h f i, f j⟫ = 0 
goal: ⟪(gramSchmidtOrthonormalBasis h f) i, f j⟫_𝕜 = 0

full_name: gramSchmidtOrthonormalBasis_inv_triangular
code: theorem gramSchmidtOrthonormalBasis_inv_triangular {i j : ι} (hij : i < j) :
    ⟪gramSchmidtOrthonormalBasis h f j, f i⟫ = 0 
goal: ⟪(gramSchmidtOrthonormalBasis h f) j, f i⟫_𝕜 = 0

full_name: gramSchmidtOrthonormalBasis_inv_triangular'
code: theorem gramSchmidtOrthonormalBasis_inv_triangular' {i j : ι} (hij : i < j) :
    (gramSchmidtOrthonormalBasis h f).repr (f i) j = 0 
goal: (gramSchmidtOrthonormalBasis h f).repr (f i) j = 0

full_name: gramSchmidtOrthonormalBasis_inv_blockTriangular
code: /-- 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 gramSchmidtOrthonormalBasis_inv_blockTriangular :
    ((gramSchmidtOrthonormalBasis h f).toBasis.toMatrix f).BlockTriangular id 
goal: ((gramSchmidtOrthonormalBasis h f).toBasis.toMatrix f).BlockTriangular id

full_name: gramSchmidtOrthonormalBasis_det
code: theorem gramSchmidtOrthonormalBasis_det [DecidableEq ι] :
    (gramSchmidtOrthonormalBasis h f).toBasis.det f =
      ∏ i, ⟪gramSchmidtOrthonormalBasis h f i, f i⟫ 
goal: (gramSchmidtOrthonormalBasis h f).toBasis.det f = ∏ i : ι, ⟪(gramSchmidtOrthonormalBasis h f) i, f i⟫_𝕜