Skip to content

Commit 8472f0d

Browse files
committed
chore(Analysis/InnerProductSpace): move lemma and golf (#40478)
1 parent 738e543 commit 8472f0d

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

Mathlib/Analysis/InnerProductSpace/Adjoint.lean

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,13 +1059,3 @@ theorem LinearIsometry.adjoint_comp_self' {E E' : Type*}
10591059
haveI := FiniteDimensional.complete 𝕜 E'
10601060
ext x
10611061
exact congr($(f.adjoint_comp_self) x)
1062-
1063-
theorem LinearIsometryEquiv.toMatrix_mem_unitaryGroup {ι E E' : Type*} [Fintype ι] [DecidableEq ι]
1064-
[NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E']
1065-
(f : E ≃ₗᵢ[𝕜] E') (b : OrthonormalBasis ι 𝕜 E) (b' : OrthonormalBasis ι 𝕜 E') :
1066-
f.toMatrix b.toBasis b'.toBasis ∈ Matrix.unitaryGroup ι 𝕜 := by
1067-
have : FiniteDimensional 𝕜 E := Module.Basis.finiteDimensional_of_finite b.toBasis
1068-
have : FiniteDimensional 𝕜 E' := Module.Basis.finiteDimensional_of_finite b'.toBasis
1069-
simp [Matrix.mem_unitaryGroup_iff, Matrix.star_eq_conjTranspose, ← LinearMap.toMatrix_adjoint,
1070-
← LinearMap.toMatrix_comp, LinearIsometryEquiv.adjoint_toLinearMap_eq_symm,
1071-
-OrthonormalBasis.coe_toBasis]

Mathlib/Analysis/InnerProductSpace/PiL2.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,9 @@ protected theorem map_apply {G : Type*} [NormedAddCommGroup G] [InnerProductSpac
588588
(b : OrthonormalBasis ι 𝕜 E) (L : E ≃ₗᵢ[𝕜] G) (i : ι) : b.map L i = L (b i) :=
589589
rfl
590590

591+
lemma coe_map {G : Type*} [NormedAddCommGroup G] [InnerProductSpace 𝕜 G]
592+
(b : OrthonormalBasis ι 𝕜 E) (L : E ≃ₗᵢ[𝕜] G) : ⇑(b.map L) = L ∘ b := rfl
593+
591594
@[simp]
592595
protected theorem toBasis_map {G : Type*} [NormedAddCommGroup G] [InnerProductSpace 𝕜 G]
593596
(b : OrthonormalBasis ι 𝕜 E) (L : E ≃ₗᵢ[𝕜] G) :
@@ -970,6 +973,12 @@ theorem OrthonormalBasis.det_to_matrix_orthonormalBasis : ‖a.toBasis.det b‖
970973
norm_cast at this
971974
rwa [pow_eq_one_iff_of_nonneg (norm_nonneg _) two_ne_zero] at this
972975

976+
open OrthonormalBasis in
977+
theorem LinearIsometryEquiv.toMatrix_mem_unitaryGroup {G : Type*} [NormedAddCommGroup G]
978+
[InnerProductSpace 𝕜 G] (f : E ≃ₗᵢ[𝕜] G) (b : OrthonormalBasis ι 𝕜 E)
979+
(b' : OrthonormalBasis ι 𝕜 G) : f.toMatrix b.toBasis b'.toBasis ∈ Matrix.unitaryGroup ι 𝕜 := by
980+
simp [LinearMap.toMatrix_eq_basisToMatrix, ← coe_map, toMatrix_orthonormalBasis_mem_unitary]
981+
973982
end
974983

975984
section Real

Mathlib/LinearAlgebra/Matrix/Basis.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,5 +273,8 @@ theorem toMatrix_map (b : Basis ι R M) (f : M ≃ₗ[R] N) (v : ι → N) :
273273
ext
274274
simp only [toMatrix_apply, Basis.map, LinearEquiv.trans_apply, (· ∘ ·)]
275275

276+
lemma _root_.LinearMap.toMatrix_eq_basisToMatrix [Fintype ι] [DecidableEq ι] [Finite κ] :
277+
f.toMatrix b c = c.toMatrix (f ∘ b) := by ext; simp [LinearMap.toMatrix_apply, toMatrix_apply]
278+
276279
end Module.Basis
277280
end MulLinearMapToMatrix

0 commit comments

Comments
 (0)