refactor: Move complex vec

This commit is contained in:
jstoobysmith 2024-11-09 17:41:00 +00:00
parent e3ad445866
commit 236e99bd33
13 changed files with 23 additions and 23 deletions

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.MinkowskiMatrix
import HepLean.Lorentz.MinkowskiMatrix
import Mathlib.Algebra.Lie.Classical
import HepLean.Lorentz.RealVector.Basic
/-!

View file

@ -0,0 +1,155 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import Mathlib.Data.Complex.Exponential
import Mathlib.Analysis.InnerProductSpace.PiL2
import HepLean.SpaceTime.SL2C.Basic
import HepLean.Lorentz.ComplexVector.Modules
import HepLean.Meta.Informal
import Mathlib.RepresentationTheory.Rep
import HepLean.SpaceTime.PauliMatrices.SelfAdjoint
/-!
# Complex Lorentz vectors
We define complex Lorentz vectors in 4d space-time as representations of SL(2, C).
-/
noncomputable section
open Matrix
open MatrixGroups
open Complex
open TensorProduct
open SpaceTime
namespace Lorentz
/-- The representation of `SL(2, )` on complex vectors corresponding to contravariant
Lorentz vectors. In index notation these have an up index `ψⁱ`. -/
def complexContr : Rep SL(2, ) := Rep.of ContrModule.SL2CRep
/-- The representation of `SL(2, )` on complex vectors corresponding to contravariant
Lorentz vectors. In index notation these have a down index `ψⁱ`. -/
def complexCo : Rep SL(2, ) := Rep.of CoModule.SL2CRep
/-- The standard basis of complex contravariant Lorentz vectors. -/
def complexContrBasis : Basis (Fin 1 ⊕ Fin 3) complexContr :=
Basis.ofEquivFun ContrModule.toFin13Equiv
@[simp]
lemma complexContrBasis_toFin13 (i :Fin 1 ⊕ Fin 3) :
(complexContrBasis i).toFin13 = Pi.single i 1 := by
simp only [complexContrBasis, Basis.coe_ofEquivFun]
rfl
@[simp]
lemma complexContrBasis_ρ_apply (M : SL(2,)) (i j : Fin 1 ⊕ Fin 3) :
(LinearMap.toMatrix complexContrBasis complexContrBasis) (complexContr.ρ M) i j =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M)) i j := by
rw [LinearMap.toMatrix_apply]
simp only [complexContrBasis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply, transpose_apply]
change (((LorentzGroup.toComplex (SL2C.toLorentzGroup M))) *ᵥ (Pi.single j 1)) i = _
simp only [mulVec_single, transpose_apply, mul_one]
lemma complexContrBasis_ρ_val (M : SL(2,)) (v : complexContr) :
((complexContr.ρ M) v).val =
LorentzGroup.toComplex (SL2C.toLorentzGroup M) *ᵥ v.val := by
rfl
/-- The standard basis of complex contravariant Lorentz vectors indexed by `Fin 4`. -/
def complexContrBasisFin4 : Basis (Fin 4) complexContr :=
Basis.reindex complexContrBasis finSumFinEquiv
/-- The standard basis of complex covariant Lorentz vectors. -/
def complexCoBasis : Basis (Fin 1 ⊕ Fin 3) complexCo :=
Basis.ofEquivFun CoModule.toFin13Equiv
@[simp]
lemma complexCoBasis_toFin13 (i :Fin 1 ⊕ Fin 3) : (complexCoBasis i).toFin13 = Pi.single i 1 := by
simp only [complexCoBasis, Basis.coe_ofEquivFun]
rfl
@[simp]
lemma complexCoBasis_ρ_apply (M : SL(2,)) (i j : Fin 1 ⊕ Fin 3) :
(LinearMap.toMatrix complexCoBasis complexCoBasis) (complexCo.ρ M) i j =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ i j := by
rw [LinearMap.toMatrix_apply]
simp only [complexCoBasis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply, transpose_apply]
change ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ *ᵥ (Pi.single j 1)) i = _
simp only [mulVec_single, transpose_apply, mul_one]
/-- The standard basis of complex covariant Lorentz vectors indexed by `Fin 4`. -/
def complexCoBasisFin4 : Basis (Fin 4) complexCo :=
Basis.reindex complexCoBasis finSumFinEquiv
/-!
## Relation to real
-/
/-- The semilinear map including real Lorentz vectors into complex contravariant
lorentz vectors. -/
def inclCongrRealLorentz : ContrMod 3 →ₛₗ[Complex.ofRealHom] complexContr where
toFun v := {val := ofReal ∘ v.toFin1d}
map_add' x y := by
apply Lorentz.ContrModule.ext
rw [Lorentz.ContrModule.val_add]
funext i
simp only [Function.comp_apply, ofRealHom_eq_coe, Pi.add_apply, map_add]
simp only [ofRealHom_eq_coe, ofReal_add]
map_smul' c x := by
apply Lorentz.ContrModule.ext
rw [Lorentz.ContrModule.val_smul]
funext i
simp only [Function.comp_apply, ofRealHom_eq_coe, Pi.smul_apply, _root_.map_smul]
simp only [smul_eq_mul, ofRealHom_eq_coe, ofReal_mul]
lemma inclCongrRealLorentz_val (v : ContrMod 3) :
(inclCongrRealLorentz v).val = ofRealHom ∘ v.toFin1d := rfl
lemma complexContrBasis_of_real (i : Fin 1 ⊕ Fin 3) :
(complexContrBasis i) = inclCongrRealLorentz (ContrMod.stdBasis i) := by
apply Lorentz.ContrModule.ext
simp only [complexContrBasis, Basis.coe_ofEquivFun, inclCongrRealLorentz,
LinearMap.coe_mk, AddHom.coe_mk]
ext j
simp only [Function.comp_apply]
change (Pi.single i 1) j = _
by_cases h : i = j
· subst h
rw [ContrMod.toFin1d, ContrMod.stdBasis_toFin1dEquiv_apply_same]
simp
· rw [ContrMod.toFin1d, ContrMod.stdBasis_toFin1dEquiv_apply_ne h]
simp [h]
lemma inclCongrRealLorentz_ρ (M : SL(2, )) (v : ContrMod 3) :
(complexContr.ρ M) (inclCongrRealLorentz v) =
inclCongrRealLorentz ((Contr 3).ρ (SL2C.toLorentzGroup M) v) := by
apply Lorentz.ContrModule.ext
rw [complexContrBasis_ρ_val, inclCongrRealLorentz_val, inclCongrRealLorentz_val]
rw [LorentzGroup.toComplex_mulVec_ofReal]
apply congrArg
simp only [SL2C.toLorentzGroup_apply_coe]
change _ = ContrMod.toFin1d ((SL2C.toLorentzGroup M) *ᵥ v)
simp only [SL2C.toLorentzGroup_apply_coe, ContrMod.mulVec_toFin1d]
/-! TODO: Rename.-/
lemma SL2CRep_ρ_basis (M : SL(2, )) (i : Fin 1 ⊕ Fin 3) :
(complexContr.ρ M) (complexContrBasis i) =
∑ j, (SL2C.toLorentzGroup M).1 j i •
complexContrBasis j := by
rw [complexContrBasis_of_real, inclCongrRealLorentz_ρ]
rw [Contr.ρ_stdBasis, map_sum]
apply congrArg
funext j
simp only [LinearMap.map_smulₛₗ, ofRealHom_eq_coe, coe_smul]
rw [complexContrBasis_of_real]
/-! TODO: Include relation to real Lorentz vectors.-/
end Lorentz
end

View file

@ -0,0 +1,166 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Lorentz.ComplexVector.Basic
/-!
# Contraction of Lorentz vectors
-/
noncomputable section
open Matrix
open MatrixGroups
open Complex
open TensorProduct
open SpaceTime
open CategoryTheory.MonoidalCategory
namespace Lorentz
/-- The bi-linear map corresponding to contraction of a contravariant Lorentz vector with a
covariant Lorentz vector. -/
def contrCoContrBi : complexContr →ₗ[] complexCo →ₗ[] where
toFun ψ := {
toFun := fun φ => ψ.toFin13 ⬝ᵥ φ.toFin13,
map_add' := by
intro φ φ'
simp only [map_add]
rw [dotProduct_add]
map_smul' := by
intro r φ
simp only [LinearEquiv.map_smul]
rw [dotProduct_smul]
rfl}
map_add' ψ ψ':= by
refine LinearMap.ext (fun φ => ?_)
simp only [map_add, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply]
rw [add_dotProduct]
map_smul' r ψ := by
refine LinearMap.ext (fun φ => ?_)
simp only [LinearEquiv.map_smul, LinearMap.coe_mk, AddHom.coe_mk]
rw [smul_dotProduct]
rfl
/-- The bi-linear map corresponding to contraction of a covariant Lorentz vector with a
contravariant Lorentz vector. -/
def contrContrCoBi : complexCo →ₗ[] complexContr →ₗ[] where
toFun φ := {
toFun := fun ψ => φ.toFin13 ⬝ᵥ ψ.toFin13,
map_add' := by
intro ψ ψ'
simp only [map_add]
rw [dotProduct_add]
map_smul' := by
intro r ψ
simp only [LinearEquiv.map_smul]
rw [dotProduct_smul]
rfl}
map_add' φ φ' := by
refine LinearMap.ext (fun ψ => ?_)
simp only [map_add, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply]
rw [add_dotProduct]
map_smul' r φ := by
refine LinearMap.ext (fun ψ => ?_)
simp only [LinearEquiv.map_smul, LinearMap.coe_mk, AddHom.coe_mk]
rw [smul_dotProduct]
rfl
/-- The linear map from complexContr ⊗ complexCo to given by
summing over components of contravariant Lorentz vector and
covariant Lorentz vector in the
standard basis (i.e. the dot product).
In terms of index notation this is the contraction is ψⁱ φᵢ. -/
def contrCoContraction : complexContr ⊗ complexCo ⟶ 𝟙_ (Rep SL(2,)) where
hom := TensorProduct.lift contrCoContrBi
comm M := TensorProduct.ext' fun ψ φ => by
change ((LorentzGroup.toComplex (SL2C.toLorentzGroup M)) *ᵥ ψ.toFin13) ⬝ᵥ
((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ *ᵥ φ.toFin13) = ψ.toFin13 ⬝ᵥ φ.toFin13
rw [dotProduct_mulVec, vecMul_transpose, mulVec_mulVec]
rw [inv_mul_of_invertible (LorentzGroup.toComplex (SL2C.toLorentzGroup M))]
simp
lemma contrCoContraction_hom_tmul (ψ : complexContr) (φ : complexCo) :
contrCoContraction.hom (ψ ⊗ₜ φ) = ψ.toFin13 ⬝ᵥ φ.toFin13 := by
rfl
lemma contrCoContraction_basis (i j : Fin 4) :
contrCoContraction.hom (complexContrBasisFin4 i ⊗ₜ complexCoBasisFin4 j) =
if i.1 = j.1 then (1 : ) else 0 := by
rw [contrCoContraction_hom_tmul]
simp only [Action.instMonoidalCategory_tensorUnit_V, complexContrBasisFin4, Basis.coe_reindex,
Function.comp_apply, complexContrBasis_toFin13, complexCoBasisFin4, complexCoBasis_toFin13,
dotProduct_single, mul_one]
rw [Pi.single_apply]
refine ite_congr ?h₁ (congrFun rfl) (congrFun rfl)
simp only [EmbeddingLike.apply_eq_iff_eq, Fin.ext_iff, eq_iff_iff, eq_comm]
lemma contrCoContraction_basis' (i j : Fin 1 ⊕ Fin 3) :
contrCoContraction.hom (complexContrBasis i ⊗ₜ complexCoBasis j) =
if i = j then (1 : ) else 0 := by
rw [contrCoContraction_hom_tmul]
simp only [Action.instMonoidalCategory_tensorUnit_V, complexContrBasisFin4, Basis.coe_reindex,
Function.comp_apply, complexContrBasis_toFin13, complexCoBasisFin4, complexCoBasis_toFin13,
dotProduct_single, mul_one]
rw [Pi.single_apply]
refine ite_congr ?h₁ (congrFun rfl) (congrFun rfl)
exact Eq.propIntro (fun a => id (Eq.symm a)) fun a => id (Eq.symm a)
/-- The linear map from complexCo ⊗ complexContr to given by
summing over components of covariant Lorentz vector and
contravariant Lorentz vector in the
standard basis (i.e. the dot product).
In terms of index notation this is the contraction is φᵢ ψⁱ. -/
def coContrContraction : complexCo ⊗ complexContr ⟶ 𝟙_ (Rep SL(2,)) where
hom := TensorProduct.lift contrContrCoBi
comm M := TensorProduct.ext' fun φ ψ => by
change ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ *ᵥ φ.toFin13) ⬝ᵥ
((LorentzGroup.toComplex (SL2C.toLorentzGroup M)) *ᵥ ψ.toFin13) = φ.toFin13 ⬝ᵥ ψ.toFin13
rw [dotProduct_mulVec, mulVec_transpose, vecMul_vecMul]
rw [inv_mul_of_invertible (LorentzGroup.toComplex (SL2C.toLorentzGroup M))]
simp
lemma coContrContraction_hom_tmul (φ : complexCo) (ψ : complexContr) :
coContrContraction.hom (φ ⊗ₜ ψ) = φ.toFin13 ⬝ᵥ ψ.toFin13 := by
rfl
lemma coContrContraction_basis (i j : Fin 4) :
coContrContraction.hom (complexCoBasisFin4 i ⊗ₜ complexContrBasisFin4 j) =
if i.1 = j.1 then (1 : ) else 0 := by
rw [coContrContraction_hom_tmul]
simp only [Action.instMonoidalCategory_tensorUnit_V, complexCoBasisFin4, Basis.coe_reindex,
Function.comp_apply, complexCoBasis_toFin13, complexContrBasisFin4, complexContrBasis_toFin13,
dotProduct_single, mul_one]
rw [Pi.single_apply]
refine ite_congr ?h₁ (congrFun rfl) (congrFun rfl)
simp only [EmbeddingLike.apply_eq_iff_eq, Fin.ext_iff, eq_iff_iff, eq_comm]
lemma coContrContraction_basis' (i j : Fin 1 ⊕ Fin 3) :
coContrContraction.hom (complexCoBasis i ⊗ₜ complexContrBasis j) =
if i = j then (1 : ) else 0 := by
rw [coContrContraction_hom_tmul]
simp only [Action.instMonoidalCategory_tensorUnit_V, complexCoBasisFin4, Basis.coe_reindex,
Function.comp_apply, complexCoBasis_toFin13, complexContrBasisFin4, complexContrBasis_toFin13,
dotProduct_single, mul_one]
rw [Pi.single_apply]
refine ite_congr ?h₁ (congrFun rfl) (congrFun rfl)
simp only [EmbeddingLike.apply_eq_iff_eq, Fin.ext_iff, eq_iff_iff, eq_comm]
/-!
## Symmetry
-/
lemma contrCoContraction_tmul_symm (φ : complexContr) (ψ : complexCo) :
contrCoContraction.hom (φ ⊗ₜ ψ) = coContrContraction.hom (ψ ⊗ₜ φ) := by
rw [contrCoContraction_hom_tmul, coContrContraction_hom_tmul, dotProduct_comm]
lemma coContrContraction_tmul_symm (φ : complexCo) (ψ : complexContr) :
coContrContraction.hom (φ ⊗ₜ ψ) = contrCoContraction.hom (ψ ⊗ₜ φ) := by
rw [contrCoContraction_tmul_symm]
end Lorentz
end

View file

@ -0,0 +1,192 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Lorentz.ComplexVector.Two
import HepLean.Lorentz.MinkowskiMatrix
import HepLean.Lorentz.ComplexVector.Contraction
import HepLean.Lorentz.ComplexVector.Unit
/-!
# Metric for complex Lorentz vectors
-/
noncomputable section
open Matrix
open MatrixGroups
open Complex
open TensorProduct
open SpaceTime
open CategoryTheory.MonoidalCategory
namespace Lorentz
/-- The metric `ηᵃᵃ` as an element of `(complexContr ⊗ complexContr).V`. -/
def contrMetricVal : (complexContr ⊗ complexContr).V :=
contrContrToMatrix.symm ((@minkowskiMatrix 3).map ofRealHom)
/-- The expansion of `contrMetricVal` into basis vectors. -/
lemma contrMetricVal_expand_tmul : contrMetricVal =
complexContrBasis (Sum.inl 0) ⊗ₜ[] complexContrBasis (Sum.inl 0)
- complexContrBasis (Sum.inr 0) ⊗ₜ[] complexContrBasis (Sum.inr 0)
- complexContrBasis (Sum.inr 1) ⊗ₜ[] complexContrBasis (Sum.inr 1)
- complexContrBasis (Sum.inr 2) ⊗ₜ[] complexContrBasis (Sum.inr 2) := by
simp only [Action.instMonoidalCategory_tensorObj_V, contrMetricVal, Fin.isValue]
erw [contrContrToMatrix_symm_expand_tmul]
simp only [map_apply, ofRealHom_eq_coe, coe_smul, Fintype.sum_sum_type, Finset.univ_unique,
Fin.default_eq_zero, Fin.isValue, Finset.sum_singleton, Fin.sum_univ_three, ne_eq, reduceCtorEq,
not_false_eq_true, minkowskiMatrix.off_diag_zero, zero_smul, add_zero, zero_add, Sum.inr.injEq,
zero_ne_one, Fin.reduceEq, one_ne_zero]
rw [minkowskiMatrix.inl_0_inl_0, minkowskiMatrix.inr_i_inr_i,
minkowskiMatrix.inr_i_inr_i, minkowskiMatrix.inr_i_inr_i]
simp only [Fin.isValue, one_smul, neg_smul]
rfl
/-- The metric `ηᵃᵃ` as a morphism `𝟙_ (Rep SL(2,)) ⟶ complexContr ⊗ complexContr`,
making its invariance under the action of `SL(2,)`. -/
def contrMetric : 𝟙_ (Rep SL(2,)) ⟶ complexContr ⊗ complexContr where
hom := {
toFun := fun a =>
let a' : := a
a' • contrMetricVal,
map_add' := fun x y => by
simp only [add_smul],
map_smul' := fun m x => by
simp only [smul_smul]
rfl}
comm M := by
ext x : 2
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.tensorUnit_ρ', CategoryTheory.Category.id_comp, Action.tensor_ρ', ModuleCat.coe_comp,
Function.comp_apply]
let x' : := x
change x' • contrMetricVal =
(TensorProduct.map (complexContr.ρ M) (complexContr.ρ M)) (x' • contrMetricVal)
simp only [Action.instMonoidalCategory_tensorObj_V, _root_.map_smul]
apply congrArg
simp only [Action.instMonoidalCategory_tensorObj_V, contrMetricVal]
erw [contrContrToMatrix_ρ_symm]
apply congrArg
simp only [LorentzGroup.toComplex_mul_minkowskiMatrix_mul_transpose]
lemma contrMetric_apply_one : contrMetric.hom (1 : ) = contrMetricVal := by
change contrMetric.hom.toFun (1 : ) = contrMetricVal
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
contrMetric, AddHom.toFun_eq_coe, AddHom.coe_mk, one_smul]
/-- The metric `ηᵢᵢ` as an element of `(complexCo ⊗ complexCo).V`. -/
def coMetricVal : (complexCo ⊗ complexCo).V :=
coCoToMatrix.symm ((@minkowskiMatrix 3).map ofRealHom)
/-- The expansion of `coMetricVal` into basis vectors. -/
lemma coMetricVal_expand_tmul : coMetricVal =
complexCoBasis (Sum.inl 0) ⊗ₜ[] complexCoBasis (Sum.inl 0)
- complexCoBasis (Sum.inr 0) ⊗ₜ[] complexCoBasis (Sum.inr 0)
- complexCoBasis (Sum.inr 1) ⊗ₜ[] complexCoBasis (Sum.inr 1)
- complexCoBasis (Sum.inr 2) ⊗ₜ[] complexCoBasis (Sum.inr 2) := by
simp only [Action.instMonoidalCategory_tensorObj_V, coMetricVal, Fin.isValue]
erw [coCoToMatrix_symm_expand_tmul]
simp only [map_apply, ofRealHom_eq_coe, coe_smul, Fintype.sum_sum_type, Finset.univ_unique,
Fin.default_eq_zero, Fin.isValue, Finset.sum_singleton, Fin.sum_univ_three, ne_eq, reduceCtorEq,
not_false_eq_true, minkowskiMatrix.off_diag_zero, zero_smul, add_zero, zero_add, Sum.inr.injEq,
zero_ne_one, Fin.reduceEq, one_ne_zero]
rw [minkowskiMatrix.inl_0_inl_0, minkowskiMatrix.inr_i_inr_i,
minkowskiMatrix.inr_i_inr_i, minkowskiMatrix.inr_i_inr_i]
simp only [Fin.isValue, one_smul, neg_smul]
rfl
/-- The metric `ηᵢᵢ` as a morphism `𝟙_ (Rep SL(2,)) ⟶ complexCo ⊗ complexCo`,
making its invariance under the action of `SL(2,)`. -/
def coMetric : 𝟙_ (Rep SL(2,)) ⟶ complexCo ⊗ complexCo where
hom := {
toFun := fun a =>
let a' : := a
a' • coMetricVal,
map_add' := fun x y => by
simp only [add_smul],
map_smul' := fun m x => by
simp only [smul_smul]
rfl}
comm M := by
ext x : 2
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.tensorUnit_ρ', CategoryTheory.Category.id_comp, Action.tensor_ρ', ModuleCat.coe_comp,
Function.comp_apply]
let x' : := x
change x' • coMetricVal =
(TensorProduct.map (complexCo.ρ M) (complexCo.ρ M)) (x' • coMetricVal)
simp only [Action.instMonoidalCategory_tensorObj_V, _root_.map_smul]
apply congrArg
simp only [Action.instMonoidalCategory_tensorObj_V, coMetricVal]
erw [coCoToMatrix_ρ_symm]
apply congrArg
rw [LorentzGroup.toComplex_inv]
simp only [lorentzGroupIsGroup_inv, SL2C.toLorentzGroup_apply_coe,
LorentzGroup.toComplex_transpose_mul_minkowskiMatrix_mul_self]
lemma coMetric_apply_one : coMetric.hom (1 : ) = coMetricVal := by
change coMetric.hom.toFun (1 : ) = coMetricVal
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
coMetric, AddHom.toFun_eq_coe, AddHom.coe_mk, one_smul]
/-!
## Contraction of metrics
-/
lemma contrCoContraction_apply_metric : (β_ complexContr complexCo).hom.hom
((complexContr.V ◁ (λ_ complexCo.V).hom)
((complexContr.V ◁ contrCoContraction.hom ▷ complexCo.V)
((complexContr.V ◁ (α_ complexContr.V complexCo.V complexCo.V).inv)
((α_ complexContr.V complexContr.V (complexCo.V ⊗ complexCo.V)).hom
(contrMetric.hom (1 : ) ⊗ₜ[] coMetric.hom (1 : )))))) =
coContrUnit.hom (1 : ) := by
rw [contrMetric_apply_one, coMetric_apply_one]
rw [contrMetricVal_expand_tmul, coMetricVal_expand_tmul]
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Fin.isValue, tmul_sub, add_tmul, neg_tmul, map_sub, map_add, map_neg, tmul_sub, sub_tmul]
have h1 (x1 x2 : complexContr) (y1 y2 :complexCo) :
(complexContr.V ◁ (λ_ complexCo.V).hom)
((complexContr.V ◁ contrCoContraction.hom ▷ complexCo.V) (((complexContr.V ◁
(α_ complexContr.V complexCo.V complexCo.V).inv)
((α_ complexContr.V complexContr.V (complexCo.V ⊗ complexCo.V)).hom
((x1 ⊗ₜ[] x2) ⊗ₜ[] y1 ⊗ₜ[] y2)))))
= x1 ⊗ₜ[] ((λ_ complexCo.V).hom ((contrCoContraction.hom (x2 ⊗ₜ[] y1)) ⊗ₜ[] y2)) := rfl
repeat rw (config := { transparency := .instances }) [h1]
repeat rw [contrCoContraction_basis']
simp only [Fin.isValue, ↓reduceIte, ModuleCat.MonoidalCategory.leftUnitor_hom_apply, one_smul,
reduceCtorEq, zero_tmul, map_zero, tmul_zero, sub_zero, zero_sub, Sum.inr.injEq, one_ne_zero,
Fin.reduceEq, sub_neg_eq_add, zero_ne_one, sub_self]
erw [coContrUnit_apply_one, coContrUnitVal_expand_tmul]
rfl
lemma coContrContraction_apply_metric : (β_ complexCo complexContr).hom.hom
((complexCo.V ◁ (λ_ complexContr.V).hom)
((complexCo.V ◁ coContrContraction.hom ▷ complexContr.V)
((complexCo.V ◁ (α_ complexCo.V complexContr.V complexContr.V).inv)
((α_ complexCo.V complexCo.V (complexContr.V ⊗ complexContr.V)).hom
(coMetric.hom (1 : ) ⊗ₜ[] contrMetric.hom (1 : )))))) =
contrCoUnit.hom (1 : ) := by
rw [coMetric_apply_one, contrMetric_apply_one]
rw [coMetricVal_expand_tmul, contrMetricVal_expand_tmul]
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Fin.isValue, tmul_sub, add_tmul, neg_tmul, map_sub, map_add, map_neg, tmul_sub, sub_tmul]
have h1 (x1 x2 : complexCo) (y1 y2 :complexContr) :
(complexCo.V ◁ (λ_ complexContr.V).hom)
((complexCo.V ◁ coContrContraction.hom ▷ complexContr.V) (((complexCo.V ◁
(α_ complexCo.V complexContr.V complexContr.V).inv)
((α_ complexCo.V complexCo.V (complexContr.V ⊗ complexContr.V)).hom
((x1 ⊗ₜ[] x2) ⊗ₜ[] y1 ⊗ₜ[] y2)))))
= x1 ⊗ₜ[] ((λ_ complexContr.V).hom ((coContrContraction.hom (x2 ⊗ₜ[] y1)) ⊗ₜ[] y2)) := rfl
repeat rw (config := { transparency := .instances }) [h1]
repeat rw [coContrContraction_basis']
simp only [Fin.isValue, ↓reduceIte, ModuleCat.MonoidalCategory.leftUnitor_hom_apply, one_smul,
reduceCtorEq, zero_tmul, map_zero, tmul_zero, sub_zero, zero_sub, Sum.inr.injEq, one_ne_zero,
Fin.reduceEq, sub_neg_eq_add, zero_ne_one, sub_self]
erw [contrCoUnit_apply_one, contrCoUnitVal_expand_tmul]
rfl
end Lorentz
end

View file

@ -0,0 +1,164 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Meta.Informal
import HepLean.SpaceTime.SL2C.Basic
import Mathlib.RepresentationTheory.Rep
import Mathlib.Logic.Equiv.TransferInstance
/-!
## Modules associated with complex Lorentz vectors
We define the modules underlying complex Lorentz vectors.
These definitions are preludes to the definitions of
`Lorentz.complexContr` and `Lorentz.complexCo`.
-/
namespace Lorentz
noncomputable section
open Matrix
open MatrixGroups
open Complex
/-- The module for contravariant (up-index) complex Lorentz vectors. -/
structure ContrModule where
/-- The underlying value as a vector `Fin 1 ⊕ Fin 3 → `. -/
val : Fin 1 ⊕ Fin 3 →
namespace ContrModule
/-- The equivalence between `ContrModule` and `Fin 1 ⊕ Fin 3 → `. -/
def toFin13Fun : ContrModule ≃ (Fin 1 ⊕ Fin 3 → ) where
toFun v := v.val
invFun f := ⟨f⟩
left_inv _ := rfl
right_inv _ := rfl
/-- The instance of `AddCommMonoid` on `ContrModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : AddCommMonoid ContrModule := Equiv.addCommMonoid toFin13Fun
/-- The instance of `AddCommGroup` on `ContrModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : AddCommGroup ContrModule := Equiv.addCommGroup toFin13Fun
/-- The instance of `Module` on `ContrModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : Module ContrModule := Equiv.module toFin13Fun
@[ext]
lemma ext (ψ ψ' : ContrModule) (h : ψ.val = ψ'.val) : ψ = ψ' := by
cases ψ
cases ψ'
subst h
rfl
@[simp]
lemma val_add (ψ ψ' : ContrModule) : (ψ + ψ').val = ψ.val + ψ'.val := rfl
@[simp]
lemma val_smul (r : ) (ψ : ContrModule) : (r • ψ).val = r • ψ.val := rfl
/-- The linear equivalence between `ContrModule` and `(Fin 1 ⊕ Fin 3 → )`. -/
@[simps!]
def toFin13Equiv : ContrModule ≃ₗ[] (Fin 1 ⊕ Fin 3 → ) :=
Equiv.linearEquiv toFin13Fun
/-- The underlying element of `Fin 1 ⊕ Fin 3 → ` of a element in `ContrModule` defined
through the linear equivalence `toFin13Equiv`. -/
abbrev toFin13 (ψ : ContrModule) := toFin13Equiv ψ
/-- The representation of the Lorentz group on `ContrModule`. -/
def lorentzGroupRep : Representation (LorentzGroup 3) ContrModule where
toFun M := {
toFun := fun v => toFin13Equiv.symm (LorentzGroup.toComplex M *ᵥ v.toFin13),
map_add' := by
intro ψ ψ'
simp [mulVec_add]
map_smul' := by
intro r ψ
simp [mulVec_smul]}
map_one' := by
ext i
simp
map_mul' M N := by
ext i
simp
/-- The representation of the SL(2, ) on `ContrModule` induced by the representation of the
Lorentz group. -/
def SL2CRep : Representation SL(2, ) ContrModule :=
MonoidHom.comp lorentzGroupRep SpaceTime.SL2C.toLorentzGroup
end ContrModule
/-- The module for covariant (up-index) complex Lorentz vectors. -/
structure CoModule where
/-- The underlying value as a vector `Fin 1 ⊕ Fin 3 → `. -/
val : Fin 1 ⊕ Fin 3 →
namespace CoModule
/-- The equivalence between `CoModule` and `Fin 1 ⊕ Fin 3 → `. -/
def toFin13Fun : CoModule ≃ (Fin 1 ⊕ Fin 3 → ) where
toFun v := v.val
invFun f := ⟨f⟩
left_inv _ := rfl
right_inv _ := rfl
/-- The instance of `AddCommMonoid` on `CoModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : AddCommMonoid CoModule := Equiv.addCommMonoid toFin13Fun
/-- The instance of `AddCommGroup` on `CoModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : AddCommGroup CoModule := Equiv.addCommGroup toFin13Fun
/-- The instance of `Module` on `CoModule` defined via its equivalence
with `Fin 1 ⊕ Fin 3 → `. -/
instance : Module CoModule := Equiv.module toFin13Fun
/-- The linear equivalence between `CoModule` and `(Fin 1 ⊕ Fin 3 → )`. -/
@[simps!]
def toFin13Equiv : CoModule ≃ₗ[] (Fin 1 ⊕ Fin 3 → ) :=
Equiv.linearEquiv toFin13Fun
/-- The underlying element of `Fin 1 ⊕ Fin 3 → ` of a element in `CoModule` defined
through the linear equivalence `toFin13Equiv`. -/
abbrev toFin13 (ψ : CoModule) := toFin13Equiv ψ
/-- The representation of the Lorentz group on `CoModule`. -/
def lorentzGroupRep : Representation (LorentzGroup 3) CoModule where
toFun M := {
toFun := fun v => toFin13Equiv.symm ((LorentzGroup.toComplex M)⁻¹ᵀ *ᵥ v.toFin13),
map_add' := by
intro ψ ψ'
simp [mulVec_add]
map_smul' := by
intro r ψ
simp [mulVec_smul]}
map_one' := by
ext i
simp
map_mul' M N := by
ext1 x
simp only [SpecialLinearGroup.coe_mul, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.mul_apply,
LinearEquiv.apply_symm_apply, mulVec_mulVec, EmbeddingLike.apply_eq_iff_eq]
refine (congrFun (congrArg _ ?_) _)
simp only [_root_.map_mul]
rw [Matrix.mul_inv_rev]
exact transpose_mul _ _
/-- The representation of the SL(2, ) on `ContrModule` induced by the representation of the
Lorentz group. -/
def SL2CRep : Representation SL(2, ) CoModule :=
MonoidHom.comp lorentzGroupRep SpaceTime.SL2C.toLorentzGroup
end CoModule
end
end Lorentz

View file

@ -0,0 +1,319 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Lorentz.ComplexVector.Basic
import Mathlib.LinearAlgebra.TensorProduct.Matrix
/-!
# Tensor products of two complex Lorentz vectors
-/
noncomputable section
open Matrix
open MatrixGroups
open Complex
open TensorProduct
open SpaceTime
open CategoryTheory.MonoidalCategory
namespace Lorentz
/-- Equivalence of `complexContr ⊗ complexContr` to `4 x 4` complex matrices. -/
def contrContrToMatrix : (complexContr ⊗ complexContr).V ≃ₗ[]
Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) :=
(Basis.tensorProduct complexContrBasis complexContrBasis).repr ≪≫ₗ
Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)) ≪≫ₗ
LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)
/-- Expanding `contrContrToMatrix` in terms of the standard basis. -/
lemma contrContrToMatrix_symm_expand_tmul (M : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) :
contrContrToMatrix.symm M =
∑ i, ∑ j, M i j • (complexContrBasis i ⊗ₜ[] complexContrBasis j) := by
simp only [Action.instMonoidalCategory_tensorObj_V, contrContrToMatrix, LinearEquiv.trans_symm,
LinearEquiv.trans_apply, Basis.repr_symm_apply]
rw [Finsupp.linearCombination_apply_of_mem_supported (s := Finset.univ)]
· erw [Finset.sum_product]
refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_))
erw [Basis.tensorProduct_apply complexContrBasis complexContrBasis i j]
rfl
· simp
/-- Equivalence of `complexCo ⊗ complexCo` to `4 x 4` complex matrices. -/
def coCoToMatrix : (complexCo ⊗ complexCo).V ≃ₗ[]
Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) :=
(Basis.tensorProduct complexCoBasis complexCoBasis).repr ≪≫ₗ
Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)) ≪≫ₗ
LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)
/-- Expanding `coCoToMatrix` in terms of the standard basis. -/
lemma coCoToMatrix_symm_expand_tmul (M : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) :
coCoToMatrix.symm M = ∑ i, ∑ j, M i j • (complexCoBasis i ⊗ₜ[] complexCoBasis j) := by
simp only [Action.instMonoidalCategory_tensorObj_V, coCoToMatrix, LinearEquiv.trans_symm,
LinearEquiv.trans_apply, Basis.repr_symm_apply]
rw [Finsupp.linearCombination_apply_of_mem_supported (s := Finset.univ)]
· erw [Finset.sum_product]
refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_))
erw [Basis.tensorProduct_apply complexCoBasis complexCoBasis i j]
rfl
· simp
/-- Equivalence of `complexContr ⊗ complexCo` to `4 x 4` complex matrices. -/
def contrCoToMatrix : (complexContr ⊗ complexCo).V ≃ₗ[]
Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) :=
(Basis.tensorProduct complexContrBasis complexCoBasis).repr ≪≫ₗ
Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)) ≪≫ₗ
LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)
/-- Expansion of `contrCoToMatrix` in terms of the standard basis. -/
lemma contrCoToMatrix_symm_expand_tmul (M : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) :
contrCoToMatrix.symm M = ∑ i, ∑ j, M i j • (complexContrBasis i ⊗ₜ[] complexCoBasis j) := by
simp only [Action.instMonoidalCategory_tensorObj_V, contrCoToMatrix, LinearEquiv.trans_symm,
LinearEquiv.trans_apply, Basis.repr_symm_apply]
rw [Finsupp.linearCombination_apply_of_mem_supported (s := Finset.univ)]
· erw [Finset.sum_product]
refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_))
erw [Basis.tensorProduct_apply complexContrBasis complexCoBasis i j]
rfl
· simp
/-- Equivalence of `complexCo ⊗ complexContr` to `4 x 4` complex matrices. -/
def coContrToMatrix : (complexCo ⊗ complexContr).V ≃ₗ[]
Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) :=
(Basis.tensorProduct complexCoBasis complexContrBasis).repr ≪≫ₗ
Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)) ≪≫ₗ
LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)
/-- Expansion of `coContrToMatrix` in terms of the standard basis. -/
lemma coContrToMatrix_symm_expand_tmul (M : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) :
coContrToMatrix.symm M = ∑ i, ∑ j, M i j • (complexCoBasis i ⊗ₜ[] complexContrBasis j) := by
simp only [Action.instMonoidalCategory_tensorObj_V, coContrToMatrix, LinearEquiv.trans_symm,
LinearEquiv.trans_apply, Basis.repr_symm_apply]
rw [Finsupp.linearCombination_apply_of_mem_supported (s := Finset.univ)]
· erw [Finset.sum_product]
refine Finset.sum_congr rfl (fun i _ => Finset.sum_congr rfl (fun j _ => ?_))
erw [Basis.tensorProduct_apply complexCoBasis complexContrBasis i j]
rfl
· simp
/-!
## Group actions
-/
lemma contrContrToMatrix_ρ (v : (complexContr ⊗ complexContr).V) (M : SL(2,)) :
contrContrToMatrix (TensorProduct.map (complexContr.ρ M) (complexContr.ρ M) v) =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M)) * contrContrToMatrix v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))ᵀ := by
nth_rewrite 1 [contrContrToMatrix]
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.trans_apply]
trans (LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)) ((LinearMap.toMatrix
(complexContrBasis.tensorProduct complexContrBasis)
(complexContrBasis.tensorProduct complexContrBasis)
(TensorProduct.map (complexContr.ρ M) (complexContr.ρ M)))
*ᵥ ((Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)))
((complexContrBasis.tensorProduct complexContrBasis).repr v)))
· apply congrArg
have h1 := (LinearMap.toMatrix_mulVec_repr (complexContrBasis.tensorProduct complexContrBasis)
(complexContrBasis.tensorProduct complexContrBasis)
(TensorProduct.map (complexContr.ρ M) (complexContr.ρ M)) v)
erw [h1]
rfl
rw [TensorProduct.toMatrix_map]
funext i j
change ∑ k, ((kroneckerMap (fun x1 x2 => x1 * x2)
((LinearMap.toMatrix complexContrBasis complexContrBasis) (complexContr.ρ M))
((LinearMap.toMatrix complexContrBasis complexContrBasis) (complexContr.ρ M)) (i, j) k)
* contrContrToMatrix v k.1 k.2) = _
erw [Finset.sum_product]
simp_rw [kroneckerMap_apply, Matrix.mul_apply, Matrix.transpose_apply]
have h1 : ∑ x, (∑ x1, LorentzGroup.toComplex (SL2C.toLorentzGroup M) i x1 *
contrContrToMatrix v x1 x) * LorentzGroup.toComplex (SL2C.toLorentzGroup M) j x
= ∑ x, ∑ x1, (LorentzGroup.toComplex (SL2C.toLorentzGroup M) i x1
* contrContrToMatrix v x1 x) * LorentzGroup.toComplex (SL2C.toLorentzGroup M) j x := by
congr
funext x
rw [Finset.sum_mul]
erw [h1]
rw [Finset.sum_comm]
congr
funext x
congr
funext x1
simp only [complexContrBasis_ρ_apply, transpose_apply, Action.instMonoidalCategory_tensorObj_V]
ring
lemma coCoToMatrix_ρ (v : (complexCo ⊗ complexCo).V) (M : SL(2,)) :
coCoToMatrix (TensorProduct.map (complexCo.ρ M) (complexCo.ρ M) v) =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ * coCoToMatrix v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ := by
nth_rewrite 1 [coCoToMatrix]
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.trans_apply]
trans (LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)) ((LinearMap.toMatrix
(complexCoBasis.tensorProduct complexCoBasis)
(complexCoBasis.tensorProduct complexCoBasis)
(TensorProduct.map (complexCo.ρ M) (complexCo.ρ M))
*ᵥ ((Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)))
((complexCoBasis.tensorProduct complexCoBasis).repr v))))
· apply congrArg
have h1 := (LinearMap.toMatrix_mulVec_repr (complexCoBasis.tensorProduct complexCoBasis)
(complexCoBasis.tensorProduct complexCoBasis)
(TensorProduct.map (complexCo.ρ M) (complexCo.ρ M)) v)
erw [h1]
rfl
rw [TensorProduct.toMatrix_map]
funext i j
change ∑ k, ((kroneckerMap (fun x1 x2 => x1 * x2)
((LinearMap.toMatrix complexCoBasis complexCoBasis) (complexCo.ρ M))
((LinearMap.toMatrix complexCoBasis complexCoBasis) (complexCo.ρ M)) (i, j) k)
* coCoToMatrix v k.1 k.2) = _
erw [Finset.sum_product]
simp_rw [kroneckerMap_apply, Matrix.mul_apply, Matrix.transpose_apply]
have h1 : ∑ x, (∑ x1, (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x1 i *
coCoToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x j
= ∑ x, ∑ x1, ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x1 i
* coCoToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x j := by
congr
funext x
rw [Finset.sum_mul]
erw [h1]
rw [Finset.sum_comm]
congr
funext x
congr
funext x1
simp only [complexCoBasis_ρ_apply, transpose_apply, Action.instMonoidalCategory_tensorObj_V]
ring
lemma contrCoToMatrix_ρ (v : (complexContr ⊗ complexCo).V) (M : SL(2,)) :
contrCoToMatrix (TensorProduct.map (complexContr.ρ M) (complexCo.ρ M) v) =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M)) * contrCoToMatrix v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ := by
nth_rewrite 1 [contrCoToMatrix]
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.trans_apply]
trans (LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)) ((LinearMap.toMatrix
(complexContrBasis.tensorProduct complexCoBasis)
(complexContrBasis.tensorProduct complexCoBasis)
(TensorProduct.map (complexContr.ρ M) (complexCo.ρ M))
*ᵥ ((Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)))
((complexContrBasis.tensorProduct complexCoBasis).repr v))))
· apply congrArg
have h1 := (LinearMap.toMatrix_mulVec_repr (complexContrBasis.tensorProduct complexCoBasis)
(complexContrBasis.tensorProduct complexCoBasis)
(TensorProduct.map (complexContr.ρ M) (complexCo.ρ M)) v)
erw [h1]
rfl
rw [TensorProduct.toMatrix_map]
funext i j
change ∑ k, ((kroneckerMap (fun x1 x2 => x1 * x2)
((LinearMap.toMatrix complexContrBasis complexContrBasis) (complexContr.ρ M))
((LinearMap.toMatrix complexCoBasis complexCoBasis) (complexCo.ρ M)) (i, j) k)
* contrCoToMatrix v k.1 k.2) = _
erw [Finset.sum_product]
simp_rw [kroneckerMap_apply, Matrix.mul_apply]
have h1 : ∑ x, (∑ x1, LorentzGroup.toComplex (SL2C.toLorentzGroup M) i x1 *
contrCoToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x j
= ∑ x, ∑ x1, (LorentzGroup.toComplex (SL2C.toLorentzGroup M) i x1
* contrCoToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x j := by
congr
funext x
rw [Finset.sum_mul]
erw [h1]
rw [Finset.sum_comm]
congr
funext x
congr
funext x1
simp only [complexContrBasis_ρ_apply, complexCoBasis_ρ_apply, transpose_apply,
Action.instMonoidalCategory_tensorObj_V]
ring
lemma coContrToMatrix_ρ (v : (complexCo ⊗ complexContr).V) (M : SL(2,)) :
coContrToMatrix (TensorProduct.map (complexCo.ρ M) (complexContr.ρ M) v) =
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ * coContrToMatrix v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))ᵀ := by
nth_rewrite 1 [coContrToMatrix]
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.trans_apply]
trans (LinearEquiv.curry (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3)) ((LinearMap.toMatrix
(complexCoBasis.tensorProduct complexContrBasis)
(complexCoBasis.tensorProduct complexContrBasis)
(TensorProduct.map (complexCo.ρ M) (complexContr.ρ M))
*ᵥ ((Finsupp.linearEquivFunOnFinite ((Fin 1 ⊕ Fin 3) × (Fin 1 ⊕ Fin 3)))
((complexCoBasis.tensorProduct complexContrBasis).repr v))))
· apply congrArg
have h1 := (LinearMap.toMatrix_mulVec_repr (complexCoBasis.tensorProduct complexContrBasis)
(complexCoBasis.tensorProduct complexContrBasis)
(TensorProduct.map (complexCo.ρ M) (complexContr.ρ M)) v)
erw [h1]
rfl
rw [TensorProduct.toMatrix_map]
funext i j
change ∑ k, ((kroneckerMap (fun x1 x2 => x1 * x2)
((LinearMap.toMatrix complexCoBasis complexCoBasis) (complexCo.ρ M))
((LinearMap.toMatrix complexContrBasis complexContrBasis) (complexContr.ρ M)) (i, j) k)
* coContrToMatrix v k.1 k.2) = _
erw [Finset.sum_product]
simp_rw [kroneckerMap_apply, Matrix.mul_apply, Matrix.transpose_apply]
have h1 : ∑ x, (∑ x1, (LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x1 i *
coContrToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M)) j x
= ∑ x, ∑ x1, ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ x1 i
* coContrToMatrix v x1 x) * (LorentzGroup.toComplex (SL2C.toLorentzGroup M)) j x := by
congr
funext x
rw [Finset.sum_mul]
erw [h1]
rw [Finset.sum_comm]
congr
funext x
congr
funext x1
simp only [complexCoBasis_ρ_apply, complexContrBasis_ρ_apply, transpose_apply,
Action.instMonoidalCategory_tensorObj_V]
ring
/-!
## The symm version of the group actions.
-/
lemma contrContrToMatrix_ρ_symm (v : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) (M : SL(2,)) :
TensorProduct.map (complexContr.ρ M) (complexContr.ρ M) (contrContrToMatrix.symm v) =
contrContrToMatrix.symm ((LorentzGroup.toComplex (SL2C.toLorentzGroup M)) * v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))ᵀ) := by
have h1 := contrContrToMatrix_ρ (contrContrToMatrix.symm v) M
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.apply_symm_apply] at h1
rw [← h1]
simp
lemma coCoToMatrix_ρ_symm (v : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) (M : SL(2,)) :
TensorProduct.map (complexCo.ρ M) (complexCo.ρ M) (coCoToMatrix.symm v) =
coCoToMatrix.symm ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ * v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹) := by
have h1 := coCoToMatrix_ρ (coCoToMatrix.symm v) M
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.apply_symm_apply] at h1
rw [← h1]
simp
lemma contrCoToMatrix_ρ_symm (v : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) (M : SL(2,)) :
TensorProduct.map (complexContr.ρ M) (complexCo.ρ M) (contrCoToMatrix.symm v) =
contrCoToMatrix.symm ((LorentzGroup.toComplex (SL2C.toLorentzGroup M)) * v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹) := by
have h1 := contrCoToMatrix_ρ (contrCoToMatrix.symm v) M
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.apply_symm_apply] at h1
rw [← h1]
simp
lemma coContrToMatrix_ρ_symm (v : Matrix (Fin 1 ⊕ Fin 3) (Fin 1 ⊕ Fin 3) ) (M : SL(2,)) :
TensorProduct.map (complexCo.ρ M) (complexContr.ρ M) (coContrToMatrix.symm v) =
coContrToMatrix.symm ((LorentzGroup.toComplex (SL2C.toLorentzGroup M))⁻¹ᵀ * v *
(LorentzGroup.toComplex (SL2C.toLorentzGroup M))ᵀ) := by
have h1 := coContrToMatrix_ρ (coContrToMatrix.symm v) M
simp only [Action.instMonoidalCategory_tensorObj_V, LinearEquiv.apply_symm_apply] at h1
rw [← h1]
simp
end Lorentz
end

View file

@ -0,0 +1,223 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Lorentz.ComplexVector.Two
import HepLean.Lorentz.ComplexVector.Contraction
/-!
# Unit for complex Lorentz vectors
-/
noncomputable section
open Matrix
open MatrixGroups
open Complex
open TensorProduct
open SpaceTime
open CategoryTheory.MonoidalCategory
namespace Lorentz
/-- The contra-co unit for complex lorentz vectors. Usually denoted `δⁱᵢ`. -/
def contrCoUnitVal : (complexContr ⊗ complexCo).V :=
contrCoToMatrix.symm 1
/-- Expansion of `contrCoUnitVal` into basis. -/
lemma contrCoUnitVal_expand_tmul : contrCoUnitVal =
complexContrBasis (Sum.inl 0) ⊗ₜ[] complexCoBasis (Sum.inl 0)
+ complexContrBasis (Sum.inr 0) ⊗ₜ[] complexCoBasis (Sum.inr 0)
+ complexContrBasis (Sum.inr 1) ⊗ₜ[] complexCoBasis (Sum.inr 1)
+ complexContrBasis (Sum.inr 2) ⊗ₜ[] complexCoBasis (Sum.inr 2) := by
simp only [Action.instMonoidalCategory_tensorObj_V, contrCoUnitVal, Fin.isValue]
erw [contrCoToMatrix_symm_expand_tmul]
simp only [Fintype.sum_sum_type, Finset.univ_unique, Fin.default_eq_zero, Fin.isValue,
Finset.sum_singleton, Fin.sum_univ_three, ne_eq, reduceCtorEq, not_false_eq_true, one_apply_ne,
zero_smul, add_zero, one_apply_eq, one_smul, zero_add, Sum.inr.injEq, zero_ne_one, Fin.reduceEq,
one_ne_zero]
rfl
/-- The contra-co unit for complex lorentz vectors as a morphism
`𝟙_ (Rep SL(2,)) ⟶ complexContr ⊗ complexCo`, manifesting the invaraince under
the `SL(2, )` action. -/
def contrCoUnit : 𝟙_ (Rep SL(2,)) ⟶ complexContr ⊗ complexCo where
hom := {
toFun := fun a =>
let a' : := a
a' • contrCoUnitVal,
map_add' := fun x y => by
simp only [add_smul],
map_smul' := fun m x => by
simp only [smul_smul]
rfl}
comm M := by
ext x : 2
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.tensorUnit_ρ', CategoryTheory.Category.id_comp, Action.tensor_ρ', ModuleCat.coe_comp,
Function.comp_apply]
let x' : := x
change x' • contrCoUnitVal =
(TensorProduct.map (complexContr.ρ M) (complexCo.ρ M)) (x' • contrCoUnitVal)
simp only [Action.instMonoidalCategory_tensorObj_V, _root_.map_smul]
apply congrArg
simp only [Action.instMonoidalCategory_tensorObj_V, contrCoUnitVal]
erw [contrCoToMatrix_ρ_symm]
apply congrArg
simp
lemma contrCoUnit_apply_one : contrCoUnit.hom (1 : ) = contrCoUnitVal := by
change contrCoUnit.hom.toFun (1 : ) = contrCoUnitVal
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
contrCoUnit, AddHom.toFun_eq_coe, AddHom.coe_mk, one_smul]
/-- The co-contra unit for complex lorentz vectors. Usually denoted `δᵢⁱ`. -/
def coContrUnitVal : (complexCo ⊗ complexContr).V :=
coContrToMatrix.symm 1
/-- Expansion of `coContrUnitVal` into basis. -/
lemma coContrUnitVal_expand_tmul : coContrUnitVal =
complexCoBasis (Sum.inl 0) ⊗ₜ[] complexContrBasis (Sum.inl 0)
+ complexCoBasis (Sum.inr 0) ⊗ₜ[] complexContrBasis (Sum.inr 0)
+ complexCoBasis (Sum.inr 1) ⊗ₜ[] complexContrBasis (Sum.inr 1)
+ complexCoBasis (Sum.inr 2) ⊗ₜ[] complexContrBasis (Sum.inr 2) := by
simp only [Action.instMonoidalCategory_tensorObj_V, coContrUnitVal, Fin.isValue]
erw [coContrToMatrix_symm_expand_tmul]
simp only [Fintype.sum_sum_type, Finset.univ_unique, Fin.default_eq_zero, Fin.isValue,
Finset.sum_singleton, Fin.sum_univ_three, ne_eq, reduceCtorEq, not_false_eq_true, one_apply_ne,
zero_smul, add_zero, one_apply_eq, one_smul, zero_add, Sum.inr.injEq, zero_ne_one, Fin.reduceEq,
one_ne_zero]
rfl
/-- The co-contra unit for complex lorentz vectors as a morphism
`𝟙_ (Rep SL(2,)) ⟶ complexCo ⊗ complexContr`, manifesting the invaraince under
the `SL(2, )` action. -/
def coContrUnit : 𝟙_ (Rep SL(2,)) ⟶ complexCo ⊗ complexContr where
hom := {
toFun := fun a =>
let a' : := a
a' • coContrUnitVal,
map_add' := fun x y => by
simp only [add_smul],
map_smul' := fun m x => by
simp only [smul_smul]
rfl}
comm M := by
ext x : 2
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.tensorUnit_ρ', CategoryTheory.Category.id_comp, Action.tensor_ρ', ModuleCat.coe_comp,
Function.comp_apply]
let x' : := x
change x' • coContrUnitVal =
(TensorProduct.map (complexCo.ρ M) (complexContr.ρ M)) (x' • coContrUnitVal)
simp only [Action.instMonoidalCategory_tensorObj_V, _root_.map_smul]
apply congrArg
simp only [Action.instMonoidalCategory_tensorObj_V, coContrUnitVal]
erw [coContrToMatrix_ρ_symm]
apply congrArg
symm
refine transpose_eq_one.mp ?h.h.h.a
simp
lemma coContrUnit_apply_one : coContrUnit.hom (1 : ) = coContrUnitVal := by
change coContrUnit.hom.toFun (1 : ) = coContrUnitVal
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
coContrUnit, AddHom.toFun_eq_coe, AddHom.coe_mk, one_smul]
/-!
## Contraction of the units
-/
/-- Contraction on the right with `contrCoUnit` does nothing. -/
lemma contr_contrCoUnit (x : complexCo) :
(λ_ complexCo).hom.hom
((coContrContraction ▷ complexCo).hom
((α_ _ _ complexCo).inv.hom
(x ⊗ₜ[] contrCoUnit.hom (1 : )))) = x := by
obtain ⟨c, hc⟩ := (mem_span_range_iff_exists_fun ).mp (Basis.mem_span complexCoBasis x)
subst hc
rw [contrCoUnit_apply_one, contrCoUnitVal_expand_tmul]
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.instMonoidalCategory_leftUnitor_hom_hom, Action.instMonoidalCategory_whiskerRight_hom,
Action.instMonoidalCategory_associator_inv_hom, CategoryTheory.Equivalence.symm_inverse,
Action.functorCategoryEquivalence_functor, Action.FunctorCategoryEquivalence.functor_obj_obj,
Fintype.sum_sum_type, Finset.univ_unique, Fin.default_eq_zero, Fin.isValue,
Finset.sum_singleton, Fin.sum_univ_three, tmul_add, add_tmul, smul_tmul, tmul_smul, map_add,
_root_.map_smul]
have h1' (x y : CoeSort.coe complexCo) (z : CoeSort.coe complexContr) :
(α_ complexCo.V complexContr.V complexCo.V).inv (x ⊗ₜ[] z ⊗ₜ[] y) = (x ⊗ₜ[] z) ⊗ₜ[] y := rfl
repeat rw [h1']
have h1'' (y : CoeSort.coe complexCo)
(z : CoeSort.coe complexCo ⊗[] CoeSort.coe complexContr) :
(coContrContraction.hom ▷ complexCo.V) (z ⊗ₜ[] y) = (coContrContraction.hom z) ⊗ₜ[] y := rfl
repeat rw (config := { transparency := .instances }) [h1'']
repeat rw [coContrContraction_basis']
simp only [Fin.isValue, leftUnitor, ModuleCat.MonoidalCategory.leftUnitor, ModuleCat.of_coe,
CategoryTheory.Iso.trans_hom, LinearEquiv.toModuleIso_hom, ModuleCat.ofSelfIso_hom,
CategoryTheory.Category.comp_id, Action.instMonoidalCategory_tensorUnit_V, ↓reduceIte,
reduceCtorEq, zero_tmul, map_zero, smul_zero, add_zero, Sum.inr.injEq, one_ne_zero,
Fin.reduceEq, zero_add, zero_ne_one]
erw [TensorProduct.lid_tmul, TensorProduct.lid_tmul, TensorProduct.lid_tmul,
TensorProduct.lid_tmul]
simp only [Fin.isValue, one_smul]
repeat rw [add_assoc]
/-- Contraction on the right with `coContrUnit`. -/
lemma contr_coContrUnit (x : complexContr) :
(λ_ complexContr).hom.hom
((contrCoContraction ▷ complexContr).hom
((α_ _ _ complexContr).inv.hom
(x ⊗ₜ[] coContrUnit.hom (1 : )))) = x := by
obtain ⟨c, hc⟩ := (mem_span_range_iff_exists_fun ).mp (Basis.mem_span complexContrBasis x)
subst hc
rw [coContrUnit_apply_one, coContrUnitVal_expand_tmul]
simp only [Action.instMonoidalCategory_tensorObj_V, Action.instMonoidalCategory_tensorUnit_V,
Action.instMonoidalCategory_leftUnitor_hom_hom, Action.instMonoidalCategory_whiskerRight_hom,
Action.instMonoidalCategory_associator_inv_hom, CategoryTheory.Equivalence.symm_inverse,
Action.functorCategoryEquivalence_functor, Action.FunctorCategoryEquivalence.functor_obj_obj,
Fintype.sum_sum_type, Finset.univ_unique, Fin.default_eq_zero, Fin.isValue,
Finset.sum_singleton, Fin.sum_univ_three, tmul_add, add_tmul, smul_tmul, tmul_smul, map_add,
_root_.map_smul]
have h1' (x y : CoeSort.coe complexContr) (z : CoeSort.coe complexCo) :
(α_ complexContr.V complexCo.V complexContr.V).inv
(x ⊗ₜ[] z ⊗ₜ[] y) = (x ⊗ₜ[] z) ⊗ₜ[] y := rfl
repeat rw [h1']
have h1'' (y : CoeSort.coe complexContr)
(z : CoeSort.coe complexContr ⊗[] CoeSort.coe complexCo) :
(contrCoContraction.hom ▷ complexContr.V) (z ⊗ₜ[] y) =
(contrCoContraction.hom z) ⊗ₜ[] y := rfl
repeat rw (config := { transparency := .instances }) [h1'']
repeat rw [contrCoContraction_basis']
simp only [Fin.isValue, Action.instMonoidalCategory_tensorUnit_V, ↓reduceIte, reduceCtorEq,
zero_tmul, map_zero, smul_zero, add_zero, Sum.inr.injEq, one_ne_zero, Fin.reduceEq, zero_add,
zero_ne_one]
erw [TensorProduct.lid_tmul, TensorProduct.lid_tmul, TensorProduct.lid_tmul,
TensorProduct.lid_tmul]
simp only [Fin.isValue, one_smul]
repeat rw [add_assoc]
/-!
## Symmetry properties of the units
-/
open CategoryTheory
lemma contrCoUnit_symm :
(contrCoUnit.hom (1 : )) = (complexContr ◁ 𝟙 _).hom ((β_ complexCo complexContr).hom.hom
(coContrUnit.hom (1 : ))) := by
rw [contrCoUnit_apply_one, contrCoUnitVal_expand_tmul]
rw [coContrUnit_apply_one, coContrUnitVal_expand_tmul]
rfl
lemma coContrUnit_symm :
(coContrUnit.hom (1 : )) = (complexCo ◁ 𝟙 _).hom ((β_ complexContr complexCo).hom.hom
(contrCoUnit.hom (1 : ))) := by
rw [coContrUnit_apply_one, coContrUnitVal_expand_tmul]
rw [contrCoUnit_apply_one, contrCoUnitVal_expand_tmul]
rfl
end Lorentz
end

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.MinkowskiMatrix
import HepLean.Lorentz.MinkowskiMatrix
/-!
# The Lorentz Group

View file

@ -0,0 +1,152 @@
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import Mathlib.Data.Complex.Exponential
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Algebra.Lie.Classical
/-!
# The Minkowski matrix
-/
open Matrix
open InnerProductSpace
/-!
# The definition of the Minkowski Matrix
-/
/-- The `d.succ`-dimensional real matrix of the form `diag(1, -1, -1, -1, ...)`. -/
def minkowskiMatrix {d : } : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) :=
LieAlgebra.Orthogonal.indefiniteDiagonal (Fin 1) (Fin d)
namespace minkowskiMatrix
variable {d : }
/-- Notation for `minkowskiMatrix`. -/
scoped[minkowskiMatrix] notation "η" => minkowskiMatrix
@[simp]
lemma sq : @minkowskiMatrix d * minkowskiMatrix = 1 := by
simp only [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, diagonal_mul_diagonal]
ext1 i j
rcases i with i | i <;> rcases j with j | j
· simp only [diagonal, of_apply, Sum.inl.injEq, Sum.elim_inl, mul_one]
split
· rename_i h
subst h
simp_all only [one_apply_eq]
· simp_all only [ne_eq, Sum.inl.injEq, not_false_eq_true, one_apply_ne]
· rfl
· rfl
· simp only [diagonal, of_apply, Sum.inr.injEq, Sum.elim_inr, mul_neg, mul_one, neg_neg]
split
· rename_i h
subst h
simp_all only [one_apply_eq]
· simp_all only [ne_eq, Sum.inr.injEq, not_false_eq_true, one_apply_ne]
@[simp]
lemma eq_transpose : minkowskiMatrixᵀ = @minkowskiMatrix d := by
simp only [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, diagonal_transpose]
@[simp]
lemma det_eq_neg_one_pow_d : (@minkowskiMatrix d).det = (- 1) ^ d := by
simp [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal]
@[simp]
lemma η_apply_mul_η_apply_diag (μ : Fin 1 ⊕ Fin d) : η μ μ * η μ μ = 1 := by
match μ with
| Sum.inl _ => simp [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal]
| Sum.inr _ => simp [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal]
lemma as_block : @minkowskiMatrix d =
Matrix.fromBlocks (1 : Matrix (Fin 1) (Fin 1) ) 0 0 (-1 : Matrix (Fin d) (Fin d) ) := by
rw [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, ← fromBlocks_diagonal]
refine fromBlocks_inj.mpr ?_
simp only [diagonal_one, true_and]
funext i j
rw [← diagonal_neg]
rfl
@[simp]
lemma off_diag_zero {μ ν : Fin 1 ⊕ Fin d} (h : μ ≠ ν) : η μ ν = 0 := by
simp only [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal]
exact diagonal_apply_ne _ h
lemma inl_0_inl_0 : @minkowskiMatrix d (Sum.inl 0) (Sum.inl 0) = 1 := by
rfl
lemma inr_i_inr_i (i : Fin d) : @minkowskiMatrix d (Sum.inr i) (Sum.inr i) = -1 := by
simp only [minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal]
simp_all only [diagonal_apply_eq, Sum.elim_inr]
@[simp]
lemma mulVec_inl_0 (v : (Fin 1 ⊕ Fin d) → ) :
(η *ᵥ v) (Sum.inl 0)= v (Sum.inl 0) := by
simp only [mulVec, minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, mulVec_diagonal]
simp only [Fin.isValue, diagonal_dotProduct, Sum.elim_inl, one_mul]
@[simp]
lemma mulVec_inr_i (v : (Fin 1 ⊕ Fin d) → ) (i : Fin d) :
(η *ᵥ v) (Sum.inr i)= - v (Sum.inr i) := by
simp only [mulVec, minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, mulVec_diagonal]
simp only [diagonal_dotProduct, Sum.elim_inr, neg_mul, one_mul]
variable (Λ Λ' : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) )
/-- The dual of a matrix with respect to the Minkowski metric. -/
def dual : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) := η * Λᵀ * η
@[simp]
lemma dual_id : @dual d 1 = 1 := by
simpa only [dual, transpose_one, mul_one] using minkowskiMatrix.sq
@[simp]
lemma dual_mul : dual (Λ * Λ') = dual Λ' * dual Λ := by
simp only [dual, transpose_mul]
trans η * Λ'ᵀ * (η * η) * Λᵀ * η
· noncomm_ring [minkowskiMatrix.sq]
· noncomm_ring
@[simp]
lemma dual_dual : dual (dual Λ) = Λ := by
simp only [dual, transpose_mul, transpose_transpose, eq_transpose]
trans (η * η) * Λ * (η * η)
· noncomm_ring
· noncomm_ring [minkowskiMatrix.sq]
@[simp]
lemma dual_eta : @dual d η = η := by
simp only [dual, eq_transpose]
noncomm_ring [minkowskiMatrix.sq]
@[simp]
lemma dual_transpose : dual Λᵀ = (dual Λ)ᵀ := by
simp only [dual, transpose_transpose, transpose_mul, eq_transpose]
noncomm_ring
@[simp]
lemma det_dual : (dual Λ).det = Λ.det := by
simp only [dual, det_mul, minkowskiMatrix.det_eq_neg_one_pow_d, det_transpose]
group
norm_cast
simp
lemma dual_apply (μ ν : Fin 1 ⊕ Fin d) :
dual Λ μ ν = η μ μ * Λ ν μ * η ν ν := by
simp only [dual, minkowskiMatrix, LieAlgebra.Orthogonal.indefiniteDiagonal, mul_diagonal,
diagonal_mul, transpose_apply, diagonal_apply_eq]
lemma dual_apply_minkowskiMatrix (μ ν : Fin 1 ⊕ Fin d) :
dual Λ μ ν * η ν ν = η μ μ * Λ ν μ := by
rw [dual_apply, mul_assoc]
simp
end minkowskiMatrix