2024-06-28 07:53:20 +02:00
|
|
|
|
--import Mathlib.Algebra.BigOperators.Basic
|
2024-06-29 09:01:53 +02:00
|
|
|
|
import Mathlib.LinearAlgebra.TensorProduct.Basic
|
2024-06-26 12:28:39 +02:00
|
|
|
|
import Mathlib.Analysis.InnerProductSpace.Basic
|
|
|
|
|
import Mathlib.Analysis.InnerProductSpace.Dual
|
|
|
|
|
import Mathlib.Analysis.InnerProductSpace.PiL2
|
|
|
|
|
|
|
|
|
|
open BigOperators
|
|
|
|
|
open Finset
|
2024-06-29 09:01:53 +02:00
|
|
|
|
open scoped TensorProduct
|
2024-06-26 12:28:39 +02:00
|
|
|
|
|
|
|
|
|
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
|
|
|
|
|
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
lemma OrthonormalBasis.sum_repr'
|
|
|
|
|
{𝕜 : Type*} [RCLike 𝕜]
|
|
|
|
|
{E : Type*} [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
|
2024-06-28 07:53:20 +02:00
|
|
|
|
[Fintype ι]
|
2024-06-29 09:01:53 +02:00
|
|
|
|
(b : OrthonormalBasis ι 𝕜 E)
|
2024-06-28 07:53:20 +02:00
|
|
|
|
(v : E) :
|
2024-06-29 09:01:53 +02:00
|
|
|
|
v = ∑ i, ⟪b i, v⟫_𝕜 • (b i) := by
|
|
|
|
|
nth_rw 1 [← (b.sum_repr v)]
|
|
|
|
|
simp_rw [b.repr_apply_apply v]
|
2024-06-28 07:53:20 +02:00
|
|
|
|
|
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
noncomputable def InnerProductSpace.canonicalTensor
|
|
|
|
|
(E : Type u_2) [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
|
|
|
|
|
: E ⊗[ℝ] E := by
|
|
|
|
|
let v := stdOrthonormalBasis ℝ E
|
|
|
|
|
exact ∑ i, (v i) ⊗ₜ[ℝ] (v i)
|
2024-06-28 07:53:20 +02:00
|
|
|
|
|
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
theorem InnerProductSpace.InvariantTensor
|
|
|
|
|
(E : Type*) [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
|
|
|
|
|
(v₂ : OrthonormalBasis (Fin (FiniteDimensional.finrank ℝ E)) ℝ E)
|
|
|
|
|
: InnerProductSpace.canonicalTensor E = ∑ i, (v₂ i) ⊗ₜ[ℝ] (v₂ i) := by
|
2024-06-28 07:53:20 +02:00
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
unfold InnerProductSpace.canonicalTensor
|
2024-06-28 07:53:20 +02:00
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
let v₁ := stdOrthonormalBasis ℝ E
|
2024-06-28 07:53:20 +02:00
|
|
|
|
simp
|
|
|
|
|
|
|
|
|
|
conv =>
|
|
|
|
|
right
|
|
|
|
|
arg 2
|
|
|
|
|
intro i
|
2024-06-29 09:01:53 +02:00
|
|
|
|
rw [v₁.sum_repr' (v₂ i)]
|
|
|
|
|
simp_rw [TensorProduct.sum_tmul, TensorProduct.tmul_sum, TensorProduct.smul_tmul_smul]
|
|
|
|
|
|
2024-06-28 07:53:20 +02:00
|
|
|
|
conv =>
|
|
|
|
|
right
|
|
|
|
|
rw [Finset.sum_comm]
|
|
|
|
|
arg 2
|
|
|
|
|
intro y
|
2024-06-29 09:01:53 +02:00
|
|
|
|
rw [Finset.sum_comm]
|
|
|
|
|
arg 2
|
|
|
|
|
intro x
|
2024-06-28 07:53:20 +02:00
|
|
|
|
rw [← Finset.sum_smul]
|
2024-06-29 09:01:53 +02:00
|
|
|
|
arg 1
|
|
|
|
|
arg 2
|
|
|
|
|
intro i
|
|
|
|
|
rw [← real_inner_comm (v₁ x)]
|
|
|
|
|
simp_rw [OrthonormalBasis.sum_inner_mul_inner v₂]
|
2024-06-28 07:53:20 +02:00
|
|
|
|
|
2024-06-29 09:01:53 +02:00
|
|
|
|
have xx {r₀ : Fin (FiniteDimensional.finrank ℝ E)} : ∀ r₁ : Fin (FiniteDimensional.finrank ℝ E), r₁ ≠ r₀ → ⟪v₁ r₀, v₁ r₁⟫_ℝ • v₁ r₀ ⊗ₜ[ℝ] v₁ r₁ = 0 := by
|
2024-06-28 07:53:20 +02:00
|
|
|
|
intro r₁ hr₁
|
2024-06-29 09:01:53 +02:00
|
|
|
|
rw [orthonormal_iff_ite.1 v₁.orthonormal]
|
2024-06-28 07:53:20 +02:00
|
|
|
|
simp
|
|
|
|
|
tauto
|
2024-06-29 09:01:53 +02:00
|
|
|
|
simp_rw [Fintype.sum_eq_single _ xx]
|
|
|
|
|
simp_rw [orthonormal_iff_ite.1 v₁.orthonormal]
|
2024-06-28 07:53:20 +02:00
|
|
|
|
simp
|