PhysLean/HepLean/SpaceTime/LorentzVector/Real/Modules.lean

261 lines
8.7 KiB
Text
Raw Normal View History

2024-11-08 06:07:18 +00:00
/-
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 Real Lorentz vectors
We define the modules underlying real Lorentz vectors.
2024-11-08 06:13:03 +00:00
These definitions are preludes to the definitions of
`Lorentz.contr` and `Lorentz.co`.
2024-11-08 06:07:18 +00:00
-/
namespace Lorentz
noncomputable section
open Matrix
open MatrixGroups
open Complex
/-- The module for contravariant (up-index) real Lorentz vectors. -/
2024-11-08 07:11:57 +00:00
structure ContrMod (d : ) where
2024-11-08 06:07:18 +00:00
/-- The underlying value as a vector `Fin 1 ⊕ Fin d → `. -/
val : Fin 1 ⊕ Fin d →
2024-11-08 07:11:57 +00:00
namespace ContrMod
2024-11-08 06:07:18 +00:00
variable {d : }
/-- The equivalence between `ContrModule` and `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
def toFin1dFun : ContrMod d ≃ (Fin 1 ⊕ Fin d → ) where
2024-11-08 06:07:18 +00:00
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 d → `. -/
2024-11-08 07:11:57 +00:00
instance : AddCommMonoid (ContrMod d) := Equiv.addCommMonoid toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The instance of `AddCommGroup` on `ContrModule` defined via its equivalence
with `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
instance : AddCommGroup (ContrMod d) := Equiv.addCommGroup toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The instance of `Module` on `ContrModule` defined via its equivalence
with `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
instance : Module (ContrMod d) := Equiv.module toFin1dFun
2024-11-08 06:07:18 +00:00
@[ext]
2024-11-08 07:11:57 +00:00
lemma ext (ψ ψ' : ContrMod d) (h : ψ.val = ψ'.val) : ψ = ψ' := by
2024-11-08 06:07:18 +00:00
cases ψ
cases ψ'
subst h
rfl
@[simp]
2024-11-08 07:11:57 +00:00
lemma val_add (ψ ψ' : ContrMod d) : (ψ + ψ').val = ψ.val + ψ'.val := rfl
2024-11-08 06:07:18 +00:00
@[simp]
2024-11-08 07:11:57 +00:00
lemma val_smul (r : ) (ψ : ContrMod d) : (r • ψ).val = r • ψ.val := rfl
2024-11-08 06:07:18 +00:00
/-- The linear equivalence between `ContrModule` and `(Fin 1 ⊕ Fin d → )`. -/
2024-11-08 07:11:57 +00:00
def toFin1dEquiv : ContrMod d ≃ₗ[] (Fin 1 ⊕ Fin d → ) :=
2024-11-08 06:41:33 +00:00
Equiv.linearEquiv toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The underlying element of `Fin 1 ⊕ Fin d → ` of a element in `ContrModule` defined
through the linear equivalence `toFin1dEquiv`. -/
2024-11-08 07:11:57 +00:00
abbrev toFin1d (ψ : ContrMod d) := toFin1dEquiv ψ
2024-11-08 06:07:18 +00:00
2024-11-08 09:27:54 +00:00
/-!
## The standard basis.
-/
2024-11-08 06:41:33 +00:00
/-- The standard basis of `ContrModule` indexed by `Fin 1 ⊕ Fin d`. -/
@[simps!]
2024-11-08 07:11:57 +00:00
def stdBasis : Basis (Fin 1 ⊕ Fin d) (ContrMod d) := Basis.ofEquivFun toFin1dEquiv
2024-11-08 06:41:33 +00:00
2024-11-08 09:27:54 +00:00
@[simp]
lemma stdBasis_toFin1dEquiv_apply_same (μ : Fin 1 ⊕ Fin d) :
toFin1dEquiv (stdBasis μ) μ = 1 := by
simp only [stdBasis, Basis.ofEquivFun, Basis.coe_ofRepr, LinearEquiv.trans_symm,
LinearEquiv.symm_symm, LinearEquiv.trans_apply, Finsupp.linearEquivFunOnFinite_single]
rw [@LinearEquiv.apply_symm_apply]
exact Pi.single_eq_same μ 1
lemma stdBasis_toFin1dEquiv_apply_ne {μ ν : Fin 1 ⊕ Fin d} (h : μ ≠ ν) :
toFin1dEquiv (stdBasis μ) ν = 0 := by
simp only [stdBasis, Basis.ofEquivFun, Basis.coe_ofRepr, LinearEquiv.trans_symm,
LinearEquiv.symm_symm, LinearEquiv.trans_apply, Finsupp.linearEquivFunOnFinite_single]
rw [@LinearEquiv.apply_symm_apply]
exact Pi.single_eq_of_ne' h 1
/-- Decomposition of a contrvariant Lorentz vector into the standard basis. -/
lemma stdBasis_decomp (v : ContrMod d) : v = ∑ i, v.toFin1d i • stdBasis i := by
apply toFin1dEquiv.injective
simp only [map_sum, _root_.map_smul]
funext μ
rw [Fintype.sum_apply μ fun c => toFin1dEquiv v c • toFin1dEquiv (stdBasis c)]
change _ = ∑ x : Fin 1 ⊕ Fin d, toFin1dEquiv v x • (toFin1dEquiv (stdBasis x) μ)
rw [Finset.sum_eq_single_of_mem μ (Finset.mem_univ μ)]
· simp only [stdBasis_toFin1dEquiv_apply_same, smul_eq_mul, mul_one]
· intro b _ hbμ
rw [stdBasis_toFin1dEquiv_apply_ne hbμ]
simp only [smul_eq_mul, mul_zero]
/-!
2024-11-08 11:01:54 +00:00
## mulVec
-/
abbrev mulVec (M : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) ) (v : ContrMod d) :
ContrMod d := Matrix.toLinAlgEquiv stdBasis M v
scoped[Lorentz] notation M " *ᵥ " v => ContrMod.mulVec M v
@[simp]
lemma mulVec_toFin1d (M : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) ) (v : ContrMod d) :
(M *ᵥ v).toFin1d = M *ᵥ v.toFin1d := by
rfl
/-!
2024-11-08 09:27:54 +00:00
## The representation.
-/
2024-11-08 11:01:54 +00:00
2024-11-08 06:41:33 +00:00
/-- The representation of the Lorentz group acting on `ContrModule d`. -/
2024-11-08 07:11:57 +00:00
def rep : Representation (LorentzGroup d) (ContrMod d) where
2024-11-08 06:41:33 +00:00
toFun g := Matrix.toLinAlgEquiv stdBasis g
map_one' := (MulEquivClass.map_eq_one_iff (Matrix.toLinAlgEquiv stdBasis)).mpr rfl
map_mul' x y := by
simp only [lorentzGroupIsGroup_mul_coe, _root_.map_mul]
2024-11-08 09:27:54 +00:00
lemma rep_apply_toFin1d (g : LorentzGroup d) (ψ : ContrMod d) :
(rep g ψ).toFin1d = g.1 *ᵥ ψ.toFin1d := by
rfl
2024-11-08 07:11:57 +00:00
end ContrMod
2024-11-08 06:07:18 +00:00
/-- The module for covariant (up-index) complex Lorentz vectors. -/
2024-11-08 07:11:57 +00:00
structure CoMod (d : ) where
2024-11-08 06:07:18 +00:00
/-- The underlying value as a vector `Fin 1 ⊕ Fin d → `. -/
val : Fin 1 ⊕ Fin d →
2024-11-08 07:11:57 +00:00
namespace CoMod
2024-11-08 06:07:18 +00:00
variable {d : }
/-- The equivalence between `CoModule` and `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
def toFin1dFun : CoMod d ≃ (Fin 1 ⊕ Fin d → ) where
2024-11-08 06:07:18 +00:00
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 d → `. -/
2024-11-08 07:11:57 +00:00
instance : AddCommMonoid (CoMod d) := Equiv.addCommMonoid toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The instance of `AddCommGroup` on `CoModule` defined via its equivalence
with `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
instance : AddCommGroup (CoMod d) := Equiv.addCommGroup toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The instance of `Module` on `CoModule` defined via its equivalence
with `Fin 1 ⊕ Fin d → `. -/
2024-11-08 07:11:57 +00:00
instance : Module (CoMod d) := Equiv.module toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The linear equivalence between `CoModule` and `(Fin 1 ⊕ Fin d → )`. -/
2024-11-08 07:11:57 +00:00
def toFin1dEquiv : CoMod d ≃ₗ[] (Fin 1 ⊕ Fin d → ) :=
2024-11-08 06:41:33 +00:00
Equiv.linearEquiv toFin1dFun
2024-11-08 06:07:18 +00:00
/-- The underlying element of `Fin 1 ⊕ Fin d → ` of a element in `CoModule` defined
through the linear equivalence `toFin1dEquiv`. -/
2024-11-08 07:11:57 +00:00
abbrev toFin1d (ψ : CoMod d) := toFin1dEquiv ψ
2024-11-08 06:07:18 +00:00
2024-11-08 09:27:54 +00:00
/-!
## The standard basis.
-/
2024-11-08 06:41:33 +00:00
/-- The standard basis of `CoModule` indexed by `Fin 1 ⊕ Fin d`. -/
@[simps!]
2024-11-08 07:11:57 +00:00
def stdBasis : Basis (Fin 1 ⊕ Fin d) (CoMod d) := Basis.ofEquivFun toFin1dEquiv
2024-11-08 06:41:33 +00:00
@[simp]
2024-11-08 09:27:54 +00:00
lemma stdBasis_toFin1dEquiv_apply_same (μ : Fin 1 ⊕ Fin d) :
toFin1dEquiv (stdBasis μ) μ = 1 := by
simp only [stdBasis, Basis.ofEquivFun, Basis.coe_ofRepr, LinearEquiv.trans_symm,
LinearEquiv.symm_symm, LinearEquiv.trans_apply, Finsupp.linearEquivFunOnFinite_single]
rw [@LinearEquiv.apply_symm_apply]
exact Pi.single_eq_same μ 1
lemma stdBasis_toFin1dEquiv_apply_ne {μ ν : Fin 1 ⊕ Fin d} (h : μ ≠ ν) :
2024-11-08 09:27:54 +00:00
toFin1dEquiv (stdBasis μ) ν = 0 := by
simp only [stdBasis, Basis.ofEquivFun, Basis.coe_ofRepr, LinearEquiv.trans_symm,
LinearEquiv.symm_symm, LinearEquiv.trans_apply, Finsupp.linearEquivFunOnFinite_single]
rw [@LinearEquiv.apply_symm_apply]
exact Pi.single_eq_of_ne' h 1
/-- Decomposition of a covariant Lorentz vector into the standard basis. -/
lemma stdBasis_decomp (v : CoMod d) : v = ∑ i, v.toFin1d i • stdBasis i := by
apply toFin1dEquiv.injective
simp only [map_sum, _root_.map_smul]
funext μ
rw [Fintype.sum_apply μ fun c => toFin1dEquiv v c • toFin1dEquiv (stdBasis c)]
change _ = ∑ x : Fin 1 ⊕ Fin d, toFin1dEquiv v x • (toFin1dEquiv (stdBasis x) μ)
rw [Finset.sum_eq_single_of_mem μ (Finset.mem_univ μ)]
2024-11-08 09:27:54 +00:00
· simp only [stdBasis_toFin1dEquiv_apply_same, smul_eq_mul, mul_one]
· intro b _ hbμ
rw [stdBasis_toFin1dEquiv_apply_ne hbμ]
simp only [smul_eq_mul, mul_zero]
2024-11-08 09:27:54 +00:00
/-!
2024-11-08 11:01:54 +00:00
## mulVec
-/
abbrev mulVec (M : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) ) (v : CoMod d) :
CoMod d := Matrix.toLinAlgEquiv stdBasis M v
scoped[Lorentz] notation M " *ᵥ " v => CoMod.mulVec M v
@[simp]
lemma mulVec_toFin1d (M : Matrix (Fin 1 ⊕ Fin d) (Fin 1 ⊕ Fin d) ) (v : CoMod d) :
(M *ᵥ v).toFin1d = M *ᵥ v.toFin1d := by
rfl
/-!
2024-11-08 09:27:54 +00:00
## The representation
-/
2024-11-08 06:41:33 +00:00
/-- The representation of the Lorentz group acting on `CoModule d`. -/
2024-11-08 07:11:57 +00:00
def rep : Representation (LorentzGroup d) (CoMod d) where
2024-11-08 06:41:33 +00:00
toFun g := Matrix.toLinAlgEquiv stdBasis (LorentzGroup.transpose g⁻¹)
map_one' := by
simp only [inv_one, LorentzGroup.transpose_one, lorentzGroupIsGroup_one_coe, _root_.map_one]
map_mul' x y := by
simp only [_root_.mul_inv_rev, lorentzGroupIsGroup_inv, LorentzGroup.transpose_mul,
lorentzGroupIsGroup_mul_coe, _root_.map_mul]
2024-11-08 07:11:57 +00:00
end CoMod
2024-11-08 06:07:18 +00:00
end
end Lorentz