-- Mathlib/LinearAlgebra/Matrix/LDL.lean
theorem LDL.lowerInv_eq_gramSchmidtBasis :
    LDL.lowerInv hS =
      ((Pi.basisFun 𝕜 n).toMatrix
          (@gramSchmidtBasis 𝕜 (n → 𝕜) _ (_ :) (InnerProductSpace.ofMatrix hS.transpose) n _ _ _
            (Pi.basisFun 𝕜 n)))ᵀ

Proof state:
case a
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
i j : n
⊢ gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j

Tactic:
rfl

Result:
no goals

Proof state:
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
⊢ lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ

Tactic:
letI := InnerProductSpace.ofMatrix hS.transpose

Result:
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
⊢ lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ

Proof state:
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
⊢ lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ

Tactic:
letI := NormedAddCommGroup.ofMatrix hS.transpose

Result:
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
⊢ lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ

Proof state:
case a
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
i j : n
⊢ lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j

Tactic:
rw [LDL.lowerInv, Basis.coePiBasisFun.toMatrix_eq_transpose, coe_gramSchmidtBasis]

Result:
case a
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
i j : n
⊢ gramSchmidt 𝕜 (⇑(Pi.basisFun 𝕜 n)) i j = (gramSchmidt 𝕜 ⇑(Pi.basisFun 𝕜 n))ᵀᵀ i j

Proof state:
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
⊢ lowerInv hS = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ

Tactic:
ext i j

Result:
case a
𝕜 : Type u_1
inst✝⁴ : RCLike 𝕜
n : Type u_2
inst✝³ : LinearOrder n
inst✝² : WellFoundedLT n
inst✝¹ : LocallyFiniteOrderBot n
S : Matrix n n 𝕜
inst✝ : Fintype n
hS : S.PosDef
this✝ : NormedAddCommGroup (n → 𝕜) := NormedAddCommGroup.ofMatrix ⋯
this : InnerProductSpace 𝕜 (n → 𝕜) := InnerProductSpace.ofMatrix ⋯
i j : n
⊢ lowerInv hS i j = ((Pi.basisFun 𝕜 n).toMatrix ⇑(gramSchmidtBasis (Pi.basisFun 𝕜 n)))ᵀ i j