From d3e97485cbde5df96c4295a261957b15035326cc Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:12:06 +0100 Subject: [PATCH 01/48] feat: Create LeftHanded.lean --- .../Relativity/Fermions/Weyl/LeftHanded.lean | 166 ++++++++++++++++++ .../Tensors/ComplexTensor/Weyl/Basic.lean | 77 -------- .../Tensors/ComplexTensor/Weyl/Modules.lean | 52 ------ 3 files changed, 166 insertions(+), 129 deletions(-) create mode 100644 Physlib/Relativity/Fermions/Weyl/LeftHanded.lean diff --git a/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean new file mode 100644 index 000000000..f324e55b5 --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean @@ -0,0 +1,166 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Physlib.Meta.TODO.Basic +public import Physlib.Relativity.SL2C.Basic +public import Physlib.Meta.Informal.Basic +public import Physlib.Meta.TODO.Basic +/-! + +## Left handed Weyl fermions + + +In this file we define Left handed Weyl fermions. +These sit in the fundamental repsentation of `SL(2,ℂ)`, +and we consider them to have up indices `ψ^α` with `α = 1,2`. + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +section LeftHanded + +/-- The module in which left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ +structure LeftHandedWeyl where + /-- The underlying value in `Fin 2 → ℂ`. -/ + val : Fin 2 → ℂ + +namespace LeftHandedWeyl +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct + +/-! + +## Underlying module structure + +-/ + +/-- The equivalence between `LeftHandedWeyl` and `Fin 2 → ℂ`. -/ +def toFin2ℂFun : LeftHandedWeyl ≃ (Fin 2 → ℂ) where + toFun v := v.val + invFun f := ⟨f⟩ + left_inv _ := rfl + right_inv _ := rfl + +/-- The instance of `AddCommMonoid` on `LeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommMonoid LeftHandedWeyl := Equiv.addCommMonoid toFin2ℂFun + +/-- The instance of `AddCommGroup` on `LeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommGroup LeftHandedWeyl := Equiv.addCommGroup toFin2ℂFun + +/-- The instance of `Module` on `LeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : Module ℂ LeftHandedWeyl := Equiv.module ℂ toFin2ℂFun + +/-- The linear equivalence between `LeftHandedWeyl` and `(Fin 2 → ℂ)`. -/ +@[simps!] +def toFin2ℂEquiv : LeftHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where + toFun := toFin2ℂFun + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl + invFun := toFin2ℂFun.symm + left_inv := fun _ => rfl + right_inv := fun _ => rfl + +/-- The underlying element of `Fin 2 → ℂ` of a element in `LeftHandedWeyl` defined + through the linear equivalence `toFin2ℂEquiv`. -/ +abbrev toFin2ℂ (ψ : LeftHandedWeyl) := toFin2ℂEquiv ψ + +lemma toFin2ℂ_eq_val (ψ : LeftHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl + +/-! + +## Basis + +-/ + +/-- The standard basis on left-handed Weyl fermions. -/ +def basis : Basis (Fin 2) ℂ LeftHandedWeyl := Basis.ofEquivFun + (Equiv.linearEquiv ℂ LeftHandedWeyl.toFin2ℂFun) + +lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by + simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, + EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, + LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, + Equiv.addEquiv_symm_apply] + change Pi.single i 1 j = _ + simp [Pi.single_apply] + +lemma eq_sum_basis (ψ : LeftHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by + conv_lhs => rw [← basis.sum_repr ψ] + rfl + +lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by + ext j + simp [basis_apply, Pi.single_apply] + +/-! + +## Representation + +-/ + +/-- The vector space ℂ^2 carrying the fundamental representation of SL(2,C). + In index notation corresponds to a Weyl fermion with indices ψ^a. -/ +def rep : Representation ℂ SL(2,ℂ) LeftHandedWeyl where + toFun := fun M => { + toFun := fun (ψ : LeftHandedWeyl) => + LeftHandedWeyl.toFin2ℂEquiv.symm (M.1 *ᵥ ψ.toFin2ℂ), + map_add' := by + intro ψ ψ' + simp [mulVec_add] + map_smul' := by + intro r ψ + simp [mulVec_smul]} + map_one' := by + ext i + simp + map_mul' := fun M N => by + simp only [SpecialLinearGroup.coe_mul] + ext1 x + simp only [LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, LinearEquiv.apply_symm_apply, + mulVec_mulVec] + +lemma rep_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : rep M ψ = ⟨M.1 *ᵥ ψ.1⟩ := rfl + +lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : + rep M ψ = ∑ i, (∑ j, M.1 i j * ψ.1 j) • basis i := by + rw [eq_sum_basis (rep M ψ)] + rfl + +lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : + rep M (basis i) = ∑ j, M.1 j i • basis j := by + rw [rep_apply_eq_sum_basis] + congr + funext j + simp [basis_apply] + +lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = M.1 := by + ext i j + rw [LinearMap.toMatrix_apply] + simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] + change (M.1 *ᵥ (Pi.single j 1)) i = _ + simp + +lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : + basis.repr (rep M (basis i)) j = M.1 j i := by + fin_cases j <;> simp [rep_apply_basis] + +end LeftHandedWeyl + +end LeftHanded + +end +end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean index c8f4007b6..b9ba08b6b 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean @@ -28,83 +28,6 @@ open MatrixGroups open Complex open TensorProduct -/-! - -## Left-handed Weyl fermions - --/ - -namespace LeftHandedWeyl - -/-- The standard basis on left-handed Weyl fermions. -/ -def basis : Basis (Fin 2) ℂ LeftHandedWeyl := Basis.ofEquivFun - (Equiv.linearEquiv ℂ LeftHandedWeyl.toFin2ℂFun) - -lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by - simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, - EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, - LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, - Equiv.addEquiv_symm_apply] - change Pi.single i 1 j = _ - simp [Pi.single_apply] - -lemma eq_sum_basis (ψ : LeftHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by - conv_lhs => rw [← basis.sum_repr ψ] - rfl - -lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by - ext j - simp [basis_apply, Pi.single_apply] - -/-- The vector space ℂ^2 carrying the fundamental representation of SL(2,C). - In index notation corresponds to a Weyl fermion with indices ψ^a. -/ -def rep : Representation ℂ SL(2,ℂ) LeftHandedWeyl where - toFun := fun M => { - toFun := fun (ψ : LeftHandedWeyl) => - LeftHandedWeyl.toFin2ℂEquiv.symm (M.1 *ᵥ ψ.toFin2ℂ), - map_add' := by - intro ψ ψ' - simp [mulVec_add] - map_smul' := by - intro r ψ - simp [mulVec_smul]} - map_one' := by - ext i - simp - map_mul' := fun M N => by - simp only [SpecialLinearGroup.coe_mul] - ext1 x - simp only [LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, LinearEquiv.apply_symm_apply, - mulVec_mulVec] - -lemma rep_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : rep M ψ = ⟨M.1 *ᵥ ψ.1⟩ := rfl - -lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : - rep M ψ = ∑ i, (∑ j, M.1 i j * ψ.1 j) • basis i := by - rw [eq_sum_basis (rep M ψ)] - rfl - -lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : - rep M (basis i) = ∑ j, M.1 j i • basis j := by - rw [rep_apply_eq_sum_basis] - congr - funext j - simp [basis_apply] - -lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = M.1 := by - ext i j - rw [LinearMap.toMatrix_apply] - simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] - change (M.1 *ᵥ (Pi.single j 1)) i = _ - simp - -lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : - basis.repr (rep M (basis i)) j = M.1 j i := by - fin_cases j <;> simp [rep_apply_basis] - -end LeftHandedWeyl - - /-! ## Dual Left-handed Weyl fermions diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean index 3ff1a9408..8e789994e 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean @@ -26,58 +26,6 @@ types of fermions. namespace Fermion noncomputable section -TODO "Make a directory in ./Physlib/Relativity called Fermions for these files. - Make this file (currently ..../Modules.lean) the Basic file, and include the basic module - definitions for the different types of Weyl fermions." - -section LeftHanded - -/-- The module in which left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ -structure LeftHandedWeyl where - /-- The underlying value in `Fin 2 → ℂ`. -/ - val : Fin 2 → ℂ - -namespace LeftHandedWeyl - -/-- The equivalence between `LeftHandedWeyl` and `Fin 2 → ℂ`. -/ -def toFin2ℂFun : LeftHandedWeyl ≃ (Fin 2 → ℂ) where - toFun v := v.val - invFun f := ⟨f⟩ - left_inv _ := rfl - right_inv _ := rfl - -/-- The instance of `AddCommMonoid` on `LeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommMonoid LeftHandedWeyl := Equiv.addCommMonoid toFin2ℂFun - -/-- The instance of `AddCommGroup` on `LeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommGroup LeftHandedWeyl := Equiv.addCommGroup toFin2ℂFun - -/-- The instance of `Module` on `LeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : Module ℂ LeftHandedWeyl := Equiv.module ℂ toFin2ℂFun - -/-- The linear equivalence between `LeftHandedWeyl` and `(Fin 2 → ℂ)`. -/ -@[simps!] -def toFin2ℂEquiv : LeftHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where - toFun := toFin2ℂFun - map_add' := fun _ _ => rfl - map_smul' := fun _ _ => rfl - invFun := toFin2ℂFun.symm - left_inv := fun _ => rfl - right_inv := fun _ => rfl - -/-- The underlying element of `Fin 2 → ℂ` of a element in `LeftHandedWeyl` defined - through the linear equivalence `toFin2ℂEquiv`. -/ -abbrev toFin2ℂ (ψ : LeftHandedWeyl) := toFin2ℂEquiv ψ - -lemma toFin2ℂ_eq_val (ψ : LeftHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl - -end LeftHandedWeyl - -end LeftHanded - /-- The module in which dual-left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ structure DualLeftHandedWeyl where /-- The underlying value in `Fin 2 → ℂ`. -/ From 9323e93b03c2006f9f36a4f95ab1681a6c4a7694 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:15:10 +0100 Subject: [PATCH 02/48] feat: Create DualLeftHanded.lean --- .../Fermions/Weyl/DualLeftHanded.lean | 162 ++++++++++++++++++ .../Tensors/ComplexTensor/Weyl/Basic.lean | 76 -------- .../Tensors/ComplexTensor/Weyl/Modules.lean | 44 ----- 3 files changed, 162 insertions(+), 120 deletions(-) create mode 100644 Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean diff --git a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean new file mode 100644 index 000000000..9298ccec7 --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean @@ -0,0 +1,162 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Physlib.Meta.TODO.Basic +public import Physlib.Relativity.SL2C.Basic +public import Physlib.Meta.Informal.Basic +public import Physlib.Meta.TODO.Basic +/-! + +## Dual left handed Weyl fermions + + +In this file we define dual Left handed Weyl fermions. +These sit in the dual of the fundamental repsentation of `SL(2,ℂ)`, +and we consider them to have down indices `ψ_α` with `α = 1,2`. + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +/-- The module in which dual-left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ +structure DualLeftHandedWeyl where + /-- The underlying value in `Fin 2 → ℂ`. -/ + val : Fin 2 → ℂ + +namespace DualLeftHandedWeyl +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct + +/-! + +## Underlying module structure + +-/ + +/-- The equivalence between `DualLeftHandedWeyl` and `Fin 2 → ℂ`. -/ +def toFin2ℂFun : DualLeftHandedWeyl ≃ (Fin 2 → ℂ) where + toFun v := v.val + invFun f := ⟨f⟩ + left_inv _ := rfl + right_inv _ := rfl + +/-- The instance of `AddCommMonoid` on `DualLeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommMonoid DualLeftHandedWeyl := Equiv.addCommMonoid toFin2ℂFun + +/-- The instance of `AddCommGroup` on `DualLeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommGroup DualLeftHandedWeyl := Equiv.addCommGroup toFin2ℂFun + +/-- The instance of `Module` on `DualLeftHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : Module ℂ DualLeftHandedWeyl := Equiv.module ℂ toFin2ℂFun + +/-- The linear equivalence between `DualLeftHandedWeyl` and `(Fin 2 → ℂ)`. -/ +@[simps!] +def toFin2ℂEquiv : DualLeftHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where + toFun := toFin2ℂFun + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl + invFun := toFin2ℂFun.symm + left_inv := fun _ => rfl + right_inv := fun _ => rfl + +/-- The underlying element of `Fin 2 → ℂ` of a element in `DualLeftHandedWeyl` defined + through the linear equivalence `toFin2ℂEquiv`. -/ +abbrev toFin2ℂ (ψ : DualLeftHandedWeyl) := toFin2ℂEquiv ψ + +lemma toFin2ℂ_eq_val (ψ : DualLeftHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl + +/-! + +## Basis + +-/ + +/-- The standard basis on dual-left-handed Weyl fermions. -/ +def basis : Basis (Fin 2) ℂ DualLeftHandedWeyl := Basis.ofEquivFun + (Equiv.linearEquiv ℂ DualLeftHandedWeyl.toFin2ℂFun) + +lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by + simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, + EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, + LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, + Equiv.addEquiv_symm_apply] + change Pi.single i 1 j = _ + simp [Pi.single_apply] + +lemma eq_sum_basis (ψ : DualLeftHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by + conv_lhs => rw [← basis.sum_repr ψ] + rfl + +lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by + ext j + simp [basis_apply, Pi.single_apply] + +/-! + +## Representation + +-/ + +/-- The vector space ℂ^2 carrying the representation of SL(2,C) given by + M → (M⁻¹)ᵀ. In index notation corresponds to a left-handed Weyl fermion with indices ψ_a. -/ +def rep : Representation ℂ SL(2,ℂ) DualLeftHandedWeyl where + toFun := fun M => { + toFun := fun (ψ : DualLeftHandedWeyl) => + DualLeftHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹)ᵀ *ᵥ ψ.toFin2ℂ), + map_add' := by + intro ψ ψ' + simp [mulVec_add] + map_smul' := by + intro r ψ + simp [mulVec_smul]} + map_one' := by + ext i + simp + map_mul' := fun M N => by + ext1 x + simp only [SpecialLinearGroup.coe_mul, LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, + LinearEquiv.apply_symm_apply, mulVec_mulVec, EmbeddingLike.apply_eq_iff_eq] + refine (congrFun (congrArg _ ?_) _) + rw [Matrix.mul_inv_rev] + exact transpose_mul _ _ + +lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : DualLeftHandedWeyl) : + rep M ψ = ∑ i, (∑ j, M.1⁻¹ j i * ψ.1 j) • basis i := by + rw [eq_sum_basis (rep M ψ)] + rfl + +lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : + rep M (basis i) = ∑ j, M.1⁻¹ i j • basis j := by + rw [rep_apply_eq_sum_basis] + congr + funext j + simp [basis_apply] + +lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = (M.1⁻¹)ᵀ := by + ext i j + rw [LinearMap.toMatrix_apply] + simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] + change ((M.1⁻¹)ᵀ *ᵥ (Pi.single j 1)) i = _ + simp + +lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : + basis.repr (rep M (basis i)) j = M.1⁻¹ i j := by + fin_cases j <;> simp [rep_apply_basis] + +end DualLeftHandedWeyl + +end +end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean index b9ba08b6b..941d93c9d 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean @@ -30,82 +30,6 @@ open TensorProduct /-! -## Dual Left-handed Weyl fermions - --/ - -namespace DualLeftHandedWeyl - -/-- The standard basis on dual-left-handed Weyl fermions. -/ -def basis : Basis (Fin 2) ℂ DualLeftHandedWeyl := Basis.ofEquivFun - (Equiv.linearEquiv ℂ DualLeftHandedWeyl.toFin2ℂFun) - -lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by - simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, - EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, - LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, - Equiv.addEquiv_symm_apply] - change Pi.single i 1 j = _ - simp [Pi.single_apply] - -lemma eq_sum_basis (ψ : DualLeftHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by - conv_lhs => rw [← basis.sum_repr ψ] - rfl - -lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by - ext j - simp [basis_apply, Pi.single_apply] - -/-- The vector space ℂ^2 carrying the representation of SL(2,C) given by - M → (M⁻¹)ᵀ. In index notation corresponds to a left-handed Weyl fermion with indices ψ_a. -/ -def rep : Representation ℂ SL(2,ℂ) DualLeftHandedWeyl where - toFun := fun M => { - toFun := fun (ψ : DualLeftHandedWeyl) => - DualLeftHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹)ᵀ *ᵥ ψ.toFin2ℂ), - map_add' := by - intro ψ ψ' - simp [mulVec_add] - map_smul' := by - intro r ψ - simp [mulVec_smul]} - map_one' := by - ext i - simp - map_mul' := fun M N => by - ext1 x - simp only [SpecialLinearGroup.coe_mul, LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, - LinearEquiv.apply_symm_apply, mulVec_mulVec, EmbeddingLike.apply_eq_iff_eq] - refine (congrFun (congrArg _ ?_) _) - rw [Matrix.mul_inv_rev] - exact transpose_mul _ _ - -lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : DualLeftHandedWeyl) : - rep M ψ = ∑ i, (∑ j, M.1⁻¹ j i * ψ.1 j) • basis i := by - rw [eq_sum_basis (rep M ψ)] - rfl - -lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : - rep M (basis i) = ∑ j, M.1⁻¹ i j • basis j := by - rw [rep_apply_eq_sum_basis] - congr - funext j - simp [basis_apply] - -lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = (M.1⁻¹)ᵀ := by - ext i j - rw [LinearMap.toMatrix_apply] - simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] - change ((M.1⁻¹)ᵀ *ᵥ (Pi.single j 1)) i = _ - simp - -lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : - basis.repr (rep M (basis i)) j = M.1⁻¹ i j := by - fin_cases j <;> simp [rep_apply_basis] - -end DualLeftHandedWeyl - -/-! - ## Right-handed Weyl fermions -/ diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean index 8e789994e..8db5346a5 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean @@ -26,50 +26,6 @@ types of fermions. namespace Fermion noncomputable section -/-- The module in which dual-left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ -structure DualLeftHandedWeyl where - /-- The underlying value in `Fin 2 → ℂ`. -/ - val : Fin 2 → ℂ - -namespace DualLeftHandedWeyl - -/-- The equivalence between `DualLeftHandedWeyl` and `Fin 2 → ℂ`. -/ -def toFin2ℂFun : DualLeftHandedWeyl ≃ (Fin 2 → ℂ) where - toFun v := v.val - invFun f := ⟨f⟩ - left_inv _ := rfl - right_inv _ := rfl - -/-- The instance of `AddCommMonoid` on `DualLeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommMonoid DualLeftHandedWeyl := Equiv.addCommMonoid toFin2ℂFun - -/-- The instance of `AddCommGroup` on `DualLeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommGroup DualLeftHandedWeyl := Equiv.addCommGroup toFin2ℂFun - -/-- The instance of `Module` on `DualLeftHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : Module ℂ DualLeftHandedWeyl := Equiv.module ℂ toFin2ℂFun - -/-- The linear equivalence between `DualLeftHandedWeyl` and `(Fin 2 → ℂ)`. -/ -@[simps!] -def toFin2ℂEquiv : DualLeftHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where - toFun := toFin2ℂFun - map_add' := fun _ _ => rfl - map_smul' := fun _ _ => rfl - invFun := toFin2ℂFun.symm - left_inv := fun _ => rfl - right_inv := fun _ => rfl - -/-- The underlying element of `Fin 2 → ℂ` of a element in `DualLeftHandedWeyl` defined - through the linear equivalence `toFin2ℂEquiv`. -/ -abbrev toFin2ℂ (ψ : DualLeftHandedWeyl) := toFin2ℂEquiv ψ - -lemma toFin2ℂ_eq_val (ψ : DualLeftHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl - -end DualLeftHandedWeyl - section RightHanded From 21e4c48d141642bc7c91555c7a7dd64ac8baa6b4 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:18:21 +0100 Subject: [PATCH 03/48] feat: Create RightHanded.lean --- .../Relativity/Fermions/Weyl/RightHanded.lean | 162 ++++++++++++++++++ .../Tensors/ComplexTensor/Weyl/Basic.lean | 75 -------- .../Tensors/ComplexTensor/Weyl/Modules.lean | 49 ------ 3 files changed, 162 insertions(+), 124 deletions(-) create mode 100644 Physlib/Relativity/Fermions/Weyl/RightHanded.lean diff --git a/Physlib/Relativity/Fermions/Weyl/RightHanded.lean b/Physlib/Relativity/Fermions/Weyl/RightHanded.lean new file mode 100644 index 000000000..bf8ec86aa --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/RightHanded.lean @@ -0,0 +1,162 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Physlib.Meta.TODO.Basic +public import Physlib.Relativity.SL2C.Basic +public import Physlib.Meta.Informal.Basic +public import Physlib.Meta.TODO.Basic +/-! + +## Right handed Weyl fermions + + +In this file we define Right handed Weyl fermions. +These sit in the fundamental repsentation of `SL(2,ℂ)`, +and we consider them to have up indices `ψ^{\dot α}` with `α = 1,2`. + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +/-- The module in which right handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ +structure RightHandedWeyl where + /-- The underlying value in `Fin 2 → ℂ`. -/ + val : Fin 2 → ℂ + +namespace RightHandedWeyl +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct + +/-! + +## Underlying module structure + +-/ + +/-- The equivalence between `RightHandedWeyl` and `Fin 2 → ℂ`. -/ +def toFin2ℂFun : RightHandedWeyl ≃ (Fin 2 → ℂ) where + toFun v := v.val + invFun f := ⟨f⟩ + left_inv _ := rfl + right_inv _ := rfl + +/-- The instance of `AddCommMonoid` on `RightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommMonoid RightHandedWeyl := Equiv.addCommMonoid toFin2ℂFun + +/-- The instance of `AddCommGroup` on `RightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommGroup RightHandedWeyl := Equiv.addCommGroup toFin2ℂFun + +/-- The instance of `Module` on `RightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : Module ℂ RightHandedWeyl := Equiv.module ℂ toFin2ℂFun + +/-- The linear equivalence between `RightHandedWeyl` and `(Fin 2 → ℂ)`. -/ +@[simps!] +def toFin2ℂEquiv : RightHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where + toFun := toFin2ℂFun + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl + invFun := toFin2ℂFun.symm + left_inv := fun _ => rfl + right_inv := fun _ => rfl + +/-- The underlying element of `Fin 2 → ℂ` of a element in `RightHandedWeyl` defined + through the linear equivalence `toFin2ℂEquiv`. -/ +abbrev toFin2ℂ (ψ : RightHandedWeyl) := toFin2ℂEquiv ψ + +lemma toFin2ℂ_eq_val (ψ : RightHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl + +/-! + +## Basis + +-/ + +/-- The standard basis on right-handed Weyl fermions. -/ +def basis : Basis (Fin 2) ℂ RightHandedWeyl := Basis.ofEquivFun + (Equiv.linearEquiv ℂ RightHandedWeyl.toFin2ℂFun) + +lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by + simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, + EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, + LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, + Equiv.addEquiv_symm_apply] + change Pi.single i 1 j = _ + simp [Pi.single_apply] + +lemma eq_sum_basis (ψ : RightHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by + conv_lhs => rw [← basis.sum_repr ψ] + rfl + +lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by + ext j + simp [basis_apply, Pi.single_apply] + +/-! + +## Representation + +-/ + +/-- The vector space ℂ^2 carrying the conjugate representation of SL(2,C). + In index notation corresponds to a Weyl fermion with indices ψ^{dot a}. -/ +def rep : Representation ℂ SL(2,ℂ) RightHandedWeyl where + toFun := fun M => { + toFun := fun (ψ : RightHandedWeyl) => + RightHandedWeyl.toFin2ℂEquiv.symm (M.1.map star *ᵥ ψ.toFin2ℂ), + map_add' := by + intro ψ ψ' + simp [mulVec_add] + map_smul' := by + intro r ψ + simp [mulVec_smul]} + map_one' := by + ext i + simp + map_mul' := fun M N => by + ext1 x + simp only [SpecialLinearGroup.coe_mul, RCLike.star_def, Matrix.map_mul, LinearMap.coe_mk, + AddHom.coe_mk, Module.End.mul_apply, LinearEquiv.apply_symm_apply, mulVec_mulVec] + +lemma rep_apply (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : rep M ψ = ⟨M.1.map star *ᵥ ψ.1⟩ := rfl + +lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : + rep M ψ = ∑ i, (∑ j, M.1.map star i j * ψ.1 j) • basis i := by + rw [eq_sum_basis (rep M ψ)] + rfl + +lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : + rep M (basis i) = ∑ j, M.1.map star j i • basis j := by + rw [rep_apply_eq_sum_basis] + congr + funext j + simp [basis_apply] + +lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = M.1.map star := by + ext i j + rw [LinearMap.toMatrix_apply] + simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] + change (M.1.map star *ᵥ (Pi.single j 1)) i = _ + simp + +lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : + basis.repr (rep M (basis i)) j = star (M.1 j i) := by + fin_cases j <;> simp [rep_apply_basis] + + +end RightHandedWeyl + +end +end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean index 941d93c9d..33d2f2ffc 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean @@ -30,81 +30,6 @@ open TensorProduct /-! -## Right-handed Weyl fermions - --/ - -namespace RightHandedWeyl - -/-- The standard basis on right-handed Weyl fermions. -/ -def basis : Basis (Fin 2) ℂ RightHandedWeyl := Basis.ofEquivFun - (Equiv.linearEquiv ℂ RightHandedWeyl.toFin2ℂFun) - -lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by - simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, - EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, - LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, - Equiv.addEquiv_symm_apply] - change Pi.single i 1 j = _ - simp [Pi.single_apply] - -lemma eq_sum_basis (ψ : RightHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by - conv_lhs => rw [← basis.sum_repr ψ] - rfl - -lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by - ext j - simp [basis_apply, Pi.single_apply] - -/-- The vector space ℂ^2 carrying the conjugate representation of SL(2,C). - In index notation corresponds to a Weyl fermion with indices ψ^{dot a}. -/ -def rep : Representation ℂ SL(2,ℂ) RightHandedWeyl where - toFun := fun M => { - toFun := fun (ψ : RightHandedWeyl) => - RightHandedWeyl.toFin2ℂEquiv.symm (M.1.map star *ᵥ ψ.toFin2ℂ), - map_add' := by - intro ψ ψ' - simp [mulVec_add] - map_smul' := by - intro r ψ - simp [mulVec_smul]} - map_one' := by - ext i - simp - map_mul' := fun M N => by - ext1 x - simp only [SpecialLinearGroup.coe_mul, RCLike.star_def, Matrix.map_mul, LinearMap.coe_mk, - AddHom.coe_mk, Module.End.mul_apply, LinearEquiv.apply_symm_apply, mulVec_mulVec] - -lemma rep_apply (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : rep M ψ = ⟨M.1.map star *ᵥ ψ.1⟩ := rfl - -lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : - rep M ψ = ∑ i, (∑ j, M.1.map star i j * ψ.1 j) • basis i := by - rw [eq_sum_basis (rep M ψ)] - rfl - -lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : - rep M (basis i) = ∑ j, M.1.map star j i • basis j := by - rw [rep_apply_eq_sum_basis] - congr - funext j - simp [basis_apply] - -lemma rep_toMatrix (M : SL(2,ℂ)) : (LinearMap.toMatrix basis basis) (rep M) = M.1.map star := by - ext i j - rw [LinearMap.toMatrix_apply] - simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] - change (M.1.map star *ᵥ (Pi.single j 1)) i = _ - simp - -lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : - basis.repr (rep M (basis i)) j = star (M.1 j i) := by - fin_cases j <;> simp [rep_apply_basis] - -end RightHandedWeyl - -/-! - ## Dual Right-handed Weyl fermions -/ diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean index 8db5346a5..247619538 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean @@ -26,55 +26,6 @@ types of fermions. namespace Fermion noncomputable section - -section RightHanded - -/-- The module in which right handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ -structure RightHandedWeyl where - /-- The underlying value in `Fin 2 → ℂ`. -/ - val : Fin 2 → ℂ - -namespace RightHandedWeyl - -/-- The equivalence between `RightHandedWeyl` and `Fin 2 → ℂ`. -/ -def toFin2ℂFun : RightHandedWeyl ≃ (Fin 2 → ℂ) where - toFun v := v.val - invFun f := ⟨f⟩ - left_inv _ := rfl - right_inv _ := rfl - -/-- The instance of `AddCommMonoid` on `RightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommMonoid RightHandedWeyl := Equiv.addCommMonoid toFin2ℂFun - -/-- The instance of `AddCommGroup` on `RightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommGroup RightHandedWeyl := Equiv.addCommGroup toFin2ℂFun - -/-- The instance of `Module` on `RightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : Module ℂ RightHandedWeyl := Equiv.module ℂ toFin2ℂFun - -/-- The linear equivalence between `RightHandedWeyl` and `(Fin 2 → ℂ)`. -/ -@[simps!] -def toFin2ℂEquiv : RightHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where - toFun := toFin2ℂFun - map_add' := fun _ _ => rfl - map_smul' := fun _ _ => rfl - invFun := toFin2ℂFun.symm - left_inv := fun _ => rfl - right_inv := fun _ => rfl - -/-- The underlying element of `Fin 2 → ℂ` of a element in `RightHandedWeyl` defined - through the linear equivalence `toFin2ℂEquiv`. -/ -abbrev toFin2ℂ (ψ : RightHandedWeyl) := toFin2ℂEquiv ψ - -lemma toFin2ℂ_eq_val (ψ : RightHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl - -end RightHandedWeyl - -end RightHanded - section DualRightHanded /-- The module in which dual-right handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ From d15f09db30979808ab72d3bce7399244988c57e8 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:21:33 +0100 Subject: [PATCH 04/48] feat: Create DualRightHanded.lean --- .../Fermions/Weyl/DualRightHanded.lean | 169 ++++++++++++++++++ .../Tensors/ComplexTensor/Weyl/Basic.lean | 71 -------- .../Tensors/ComplexTensor/Weyl/Modules.lean | 48 ----- 3 files changed, 169 insertions(+), 119 deletions(-) create mode 100644 Physlib/Relativity/Fermions/Weyl/DualRightHanded.lean diff --git a/Physlib/Relativity/Fermions/Weyl/DualRightHanded.lean b/Physlib/Relativity/Fermions/Weyl/DualRightHanded.lean new file mode 100644 index 000000000..277ce9bc0 --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/DualRightHanded.lean @@ -0,0 +1,169 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Mathlib.Analysis.Complex.Basic +public import Physlib.Meta.TODO.Basic +public import Physlib.Relativity.SL2C.Basic +public import Physlib.Meta.Informal.Basic +public import Physlib.Meta.TODO.Basic +/-! + +## Dual right handed Weyl fermions + + +In this file we define dual right handed Weyl fermions. +These sit in the dual-conjugate representation of `SL(2,ℂ)`, +and we consider them to have down indices `ψ_\dot α}` with `α = 1,2`. + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +/-- The module in which dual-right handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ +structure DualRightHandedWeyl where + /-- The underlying value in `Fin 2 → ℂ`. -/ + val : Fin 2 → ℂ + +namespace DualRightHandedWeyl +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct + +/-! + +## Underlying module structure + +-/ + +/-- The equivalence between `DualRightHandedWeyl` and `Fin 2 → ℂ`. -/ +def toFin2ℂFun : DualRightHandedWeyl ≃ (Fin 2 → ℂ) where + toFun v := v.val + invFun f := ⟨f⟩ + left_inv _ := rfl + right_inv _ := rfl + +/-- The instance of `AddCommMonoid` on `DualRightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommMonoid DualRightHandedWeyl := Equiv.addCommMonoid toFin2ℂFun + +/-- The instance of `AddCommGroup` on `DualRightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : AddCommGroup DualRightHandedWeyl := Equiv.addCommGroup toFin2ℂFun + +/-- The instance of `Module` on `DualRightHandedWeyl` defined via its equivalence + with `Fin 2 → ℂ`. -/ +instance : Module ℂ DualRightHandedWeyl := Equiv.module ℂ toFin2ℂFun + +/-- The linear equivalence between `DualRightHandedWeyl` and `(Fin 2 → ℂ)`. -/ +@[simps!] +def toFin2ℂEquiv : DualRightHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where + toFun := toFin2ℂFun + map_add' := fun _ _ => rfl + map_smul' := fun _ _ => rfl + invFun := toFin2ℂFun.symm + left_inv := fun _ => rfl + right_inv := fun _ => rfl + +/-- The underlying element of `Fin 2 → ℂ` of a element in `DualRightHandedWeyl` defined + through the linear equivalence `toFin2ℂEquiv`. -/ +abbrev toFin2ℂ (ψ : DualRightHandedWeyl) := toFin2ℂEquiv ψ + +lemma toFin2ℂ_eq_val (ψ : DualRightHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl + +/-! + +## Basis + +-/ + + +/-- The standard basis on dual-right-handed Weyl fermions. -/ +def basis : Basis (Fin 2) ℂ DualRightHandedWeyl := Basis.ofEquivFun + (Equiv.linearEquiv ℂ DualRightHandedWeyl.toFin2ℂFun) + + +lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by + simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, + EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, + LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, + Equiv.addEquiv_symm_apply] + change Pi.single i 1 j = _ + simp [Pi.single_apply] + +lemma eq_sum_basis (ψ : DualRightHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by + conv_lhs => rw [← basis.sum_repr ψ] + rfl + +lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by + ext j + simp [basis_apply, Pi.single_apply] + +/-! + +## Representation + +-/ + + +/-- The vector space ℂ^2 carrying the representation of SL(2,C) given by + M → (M⁻¹)^†. + In index notation this corresponds to a Weyl fermion with index `ψ_{dot a}`. -/ +def rep : Representation ℂ SL(2,ℂ) DualRightHandedWeyl where + toFun := fun M => { + toFun := fun (ψ : DualRightHandedWeyl) => + DualRightHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹).conjTranspose *ᵥ ψ.toFin2ℂ), + map_add' := by + intro ψ ψ' + simp [mulVec_add] + map_smul' := by + intro r ψ + simp [mulVec_smul]} + map_one' := by + ext i + simp + map_mul' := fun M N => by + ext1 x + simp only [SpecialLinearGroup.coe_mul, LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, + LinearEquiv.apply_symm_apply, mulVec_mulVec, EmbeddingLike.apply_eq_iff_eq] + refine (congrFun (congrArg _ ?_) _) + rw [Matrix.mul_inv_rev] + exact conjTranspose_mul _ _ + +lemma rep_apply (M : SL(2,ℂ)) (ψ : DualRightHandedWeyl) : + rep M ψ = ⟨(M.1⁻¹).conjTranspose *ᵥ ψ.1⟩ := rfl + +lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : DualRightHandedWeyl) : + rep M ψ = ∑ i, (∑ j, (M.1⁻¹).conjTranspose i j * ψ.1 j) • basis i := by + rw [eq_sum_basis (rep M ψ)] + rfl + +lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : + rep M (basis i) = ∑ j, (M.1⁻¹).conjTranspose j i • basis j := by + rw [rep_apply_eq_sum_basis] + congr + funext j + simp [basis_apply] + +lemma rep_toMatrix (M : SL(2,ℂ)) : + (LinearMap.toMatrix basis basis) (rep M) = (M.1⁻¹).conjTranspose := by + ext i j + rw [LinearMap.toMatrix_apply] + simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] + change ((M.1⁻¹).conjTranspose *ᵥ (Pi.single j 1)) i = _ + simp + +lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : + basis.repr (rep M (basis i)) j = star (M.1⁻¹ i j) := by + fin_cases j <;> simp [rep_apply_basis] + +end DualRightHandedWeyl +end +end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean index 33d2f2ffc..44baa15b9 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean @@ -36,77 +36,6 @@ open TensorProduct namespace DualRightHandedWeyl -/-- The standard basis on dual-right-handed Weyl fermions. -/ -def basis : Basis (Fin 2) ℂ DualRightHandedWeyl := Basis.ofEquivFun - (Equiv.linearEquiv ℂ DualRightHandedWeyl.toFin2ℂFun) - - -lemma basis_apply (i j : Fin 2) : (basis i).1 j = if j = i then 1 else 0 := by - simp only [basis, Equiv.linearEquiv, AddEquiv.toEquiv_eq_coe, Equiv.toFun_as_coe, - EquivLike.coe_coe, Equiv.invFun_as_coe, AddEquiv.coe_toEquiv_symm, Basis.coe_ofEquivFun, - LinearEquiv.symm_mk, LinearMap.coe_mk, AddHom.coe_mk, LinearEquiv.coe_mk, - Equiv.addEquiv_symm_apply] - change Pi.single i 1 j = _ - simp [Pi.single_apply] - -lemma eq_sum_basis (ψ : DualRightHandedWeyl) : ψ = ∑ i, ψ.1 i • basis i := by - conv_lhs => rw [← basis.sum_repr ψ] - rfl - -lemma basis_val (i : Fin 2) : (basis i).val = Pi.single i 1 := by - ext j - simp [basis_apply, Pi.single_apply] -/-- The vector space ℂ^2 carrying the representation of SL(2,C) given by - M → (M⁻¹)^†. - In index notation this corresponds to a Weyl fermion with index `ψ_{dot a}`. -/ -def rep : Representation ℂ SL(2,ℂ) DualRightHandedWeyl where - toFun := fun M => { - toFun := fun (ψ : DualRightHandedWeyl) => - DualRightHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹).conjTranspose *ᵥ ψ.toFin2ℂ), - map_add' := by - intro ψ ψ' - simp [mulVec_add] - map_smul' := by - intro r ψ - simp [mulVec_smul]} - map_one' := by - ext i - simp - map_mul' := fun M N => by - ext1 x - simp only [SpecialLinearGroup.coe_mul, LinearMap.coe_mk, AddHom.coe_mk, Module.End.mul_apply, - LinearEquiv.apply_symm_apply, mulVec_mulVec, EmbeddingLike.apply_eq_iff_eq] - refine (congrFun (congrArg _ ?_) _) - rw [Matrix.mul_inv_rev] - exact conjTranspose_mul _ _ - -lemma rep_apply (M : SL(2,ℂ)) (ψ : DualRightHandedWeyl) : - rep M ψ = ⟨(M.1⁻¹).conjTranspose *ᵥ ψ.1⟩ := rfl - -lemma rep_apply_eq_sum_basis (M : SL(2,ℂ)) (ψ : DualRightHandedWeyl) : - rep M ψ = ∑ i, (∑ j, (M.1⁻¹).conjTranspose i j * ψ.1 j) • basis i := by - rw [eq_sum_basis (rep M ψ)] - rfl - -lemma rep_apply_basis (M : SL(2,ℂ)) (i : Fin 2) : - rep M (basis i) = ∑ j, (M.1⁻¹).conjTranspose j i • basis j := by - rw [rep_apply_eq_sum_basis] - congr - funext j - simp [basis_apply] - -lemma rep_toMatrix (M : SL(2,ℂ)) : - (LinearMap.toMatrix basis basis) (rep M) = (M.1⁻¹).conjTranspose := by - ext i j - rw [LinearMap.toMatrix_apply] - simp only [basis, Basis.coe_ofEquivFun, Basis.ofEquivFun_repr_apply] - change ((M.1⁻¹).conjTranspose *ᵥ (Pi.single j 1)) i = _ - simp - -lemma rep_apply_basis_repr (M : SL(2,ℂ)) (i j : Fin 2) : - basis.repr (rep M (basis i)) j = star (M.1⁻¹ i j) := by - fin_cases j <;> simp [rep_apply_basis] - end DualRightHandedWeyl /-! diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean index 247619538..72d1459f0 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean @@ -26,53 +26,5 @@ types of fermions. namespace Fermion noncomputable section -section DualRightHanded - -/-- The module in which dual-right handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ -structure DualRightHandedWeyl where - /-- The underlying value in `Fin 2 → ℂ`. -/ - val : Fin 2 → ℂ - -namespace DualRightHandedWeyl - -/-- The equivalence between `DualRightHandedWeyl` and `Fin 2 → ℂ`. -/ -def toFin2ℂFun : DualRightHandedWeyl ≃ (Fin 2 → ℂ) where - toFun v := v.val - invFun f := ⟨f⟩ - left_inv _ := rfl - right_inv _ := rfl - -/-- The instance of `AddCommMonoid` on `DualRightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommMonoid DualRightHandedWeyl := Equiv.addCommMonoid toFin2ℂFun - -/-- The instance of `AddCommGroup` on `DualRightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : AddCommGroup DualRightHandedWeyl := Equiv.addCommGroup toFin2ℂFun - -/-- The instance of `Module` on `DualRightHandedWeyl` defined via its equivalence - with `Fin 2 → ℂ`. -/ -instance : Module ℂ DualRightHandedWeyl := Equiv.module ℂ toFin2ℂFun - -/-- The linear equivalence between `DualRightHandedWeyl` and `(Fin 2 → ℂ)`. -/ -@[simps!] -def toFin2ℂEquiv : DualRightHandedWeyl ≃ₗ[ℂ] (Fin 2 → ℂ) where - toFun := toFin2ℂFun - map_add' := fun _ _ => rfl - map_smul' := fun _ _ => rfl - invFun := toFin2ℂFun.symm - left_inv := fun _ => rfl - right_inv := fun _ => rfl - -/-- The underlying element of `Fin 2 → ℂ` of a element in `DualRightHandedWeyl` defined - through the linear equivalence `toFin2ℂEquiv`. -/ -abbrev toFin2ℂ (ψ : DualRightHandedWeyl) := toFin2ℂEquiv ψ - -lemma toFin2ℂ_eq_val (ψ : DualRightHandedWeyl) : ψ.toFin2ℂ = ψ.val := rfl - -end DualRightHandedWeyl - -end DualRightHanded - end end Fermion From 6557ded78a1bb0139c22857f1ecdfde99faa7963 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:21:42 +0100 Subject: [PATCH 05/48] fix: Documentation --- Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean | 2 +- Physlib/Relativity/Fermions/Weyl/LeftHanded.lean | 2 +- Physlib/Relativity/Fermions/Weyl/RightHanded.lean | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean index 9298ccec7..0687b6cb5 100644 --- a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean +++ b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean @@ -16,7 +16,7 @@ public import Physlib.Meta.TODO.Basic In this file we define dual Left handed Weyl fermions. -These sit in the dual of the fundamental repsentation of `SL(2,ℂ)`, +These sit in the dual of the fundamental representation of `SL(2,ℂ)`, and we consider them to have down indices `ψ_α` with `α = 1,2`. -/ diff --git a/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean index f324e55b5..c7136388c 100644 --- a/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean +++ b/Physlib/Relativity/Fermions/Weyl/LeftHanded.lean @@ -16,7 +16,7 @@ public import Physlib.Meta.TODO.Basic In this file we define Left handed Weyl fermions. -These sit in the fundamental repsentation of `SL(2,ℂ)`, +These sit in the fundamental representation of `SL(2,ℂ)`, and we consider them to have up indices `ψ^α` with `α = 1,2`. -/ diff --git a/Physlib/Relativity/Fermions/Weyl/RightHanded.lean b/Physlib/Relativity/Fermions/Weyl/RightHanded.lean index bf8ec86aa..6a3f1eaf9 100644 --- a/Physlib/Relativity/Fermions/Weyl/RightHanded.lean +++ b/Physlib/Relativity/Fermions/Weyl/RightHanded.lean @@ -16,7 +16,7 @@ public import Physlib.Meta.TODO.Basic In this file we define Right handed Weyl fermions. -These sit in the fundamental repsentation of `SL(2,ℂ)`, +These sit in the conjugate representation of `SL(2,ℂ)`, and we consider them to have up indices `ψ^{\dot α}` with `α = 1,2`. -/ From cb9e25ffcddf19c775b35b8bc9d4b41e0ce6330c Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:22:53 +0100 Subject: [PATCH 06/48] docs: Add reference --- Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean index 0687b6cb5..6884f71db 100644 --- a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean +++ b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean @@ -19,6 +19,12 @@ In this file we define dual Left handed Weyl fermions. These sit in the dual of the fundamental representation of `SL(2,ℂ)`, and we consider them to have down indices `ψ_α` with `α = 1,2`. +### References + +A good reference for the material in this file is: +https://particle.physics.ucdavis.edu/modernsusy/slides/slideimages/spinorfeynrules.pdf +Although a different index convention is used there. + -/ @[expose] public section From 1e17593e48c18010e01017b993831515931dec13 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:24:36 +0100 Subject: [PATCH 07/48] feat: Create Duals.lean --- Physlib/Relativity/Fermions/Weyl/Duals.lean | 149 ++++++++++++++++++ .../Tensors/ComplexTensor/Weyl/Basic.lean | 128 --------------- 2 files changed, 149 insertions(+), 128 deletions(-) create mode 100644 Physlib/Relativity/Fermions/Weyl/Duals.lean diff --git a/Physlib/Relativity/Fermions/Weyl/Duals.lean b/Physlib/Relativity/Fermions/Weyl/Duals.lean new file mode 100644 index 000000000..8189a6197 --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/Duals.lean @@ -0,0 +1,149 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded +/-! + +# Duals for fermions + +In this file we give the relationship between Weyl fermions +and their duals. + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct + +/-! + +## Duals of Weyl fermions + +The dual of `LeftHandedWeyl` is `DualLeftHandedWeyl`, and the dual of `RightHandedWeyl` is +`DualRightHandedWeyl`. + +-/ + +/-- The morphism between the representation `leftHanded` and the representation + `dualLeftHanded` defined by multiplying an element of + `leftHanded` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. -/ +def LeftHandedWeyl.dual : LeftHandedWeyl.rep.IntertwiningMap DualLeftHandedWeyl.rep where + toFun := fun ψ => DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) + map_add' := by + intro ψ ψ' + simp only [mulVec_add, LinearEquiv.map_add] + map_smul' := by + intro a ψ + simp only [mulVec_smul, LinearEquiv.map_smul] + rfl + isIntertwining' := by + intro M + refine LinearMap.ext (fun ψ => ?_) + change DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ M.1 *ᵥ ψ.val) = + DualLeftHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹)ᵀ *ᵥ !![0, 1; -1, 0] *ᵥ ψ.val) + apply congrArg + rw [mulVec_mulVec, mulVec_mulVec, Lorentz.SL2C.inverse_coe, eta_fin_two M.1] + refine congrFun (congrArg _ ?_) _ + rw [SpecialLinearGroup.coe_inv, Matrix.adjugate_fin_two, + Matrix.mul_fin_two, eta_fin_two !![M.1 1 1, -M.1 0 1; -M.1 1 0, M.1 0 0]ᵀ] + simp + +lemma LeftHandedWeyl.dual_hom_apply (ψ : LeftHandedWeyl) : + LeftHandedWeyl.dual ψ = + DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) := rfl + +/-- The morphism from `dualLeftHanded` to + `leftHanded` defined by multiplying an element of + DualLeftHandedWeyl by the matrix `εₐ₁ₐ₂ = !![0, -1; 1, 0]`. -/ +def DualLeftHandedWeyl.dual : DualLeftHandedWeyl.rep.IntertwiningMap LeftHandedWeyl.rep where + toFun := fun ψ => + LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) + map_add' := by + intro ψ ψ' + simp only [map_add] + rw [mulVec_add, LinearEquiv.map_add] + map_smul' := by + intro a ψ + simp only [LinearEquiv.map_smul] + rw [mulVec_smul, LinearEquiv.map_smul] + rfl + isIntertwining' := by + intro M + refine LinearMap.ext (fun ψ => ?_) + change LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ (M.1⁻¹)ᵀ *ᵥ ψ.val) = + LeftHandedWeyl.toFin2ℂEquiv.symm (M.1 *ᵥ !![0, -1; 1, 0] *ᵥ ψ.val) + rw [EquivLike.apply_eq_iff_eq, mulVec_mulVec, mulVec_mulVec, Lorentz.SL2C.inverse_coe, + eta_fin_two M.1] + refine congrFun (congrArg _ ?_) _ + rw [SpecialLinearGroup.coe_inv, Matrix.adjugate_fin_two, + Matrix.mul_fin_two, eta_fin_two !![M.1 1 1, -M.1 0 1; -M.1 1 0, M.1 0 0]ᵀ] + simp + +lemma DualLeftHandedWeyl.dual_hom_apply (ψ : DualLeftHandedWeyl) : + DualLeftHandedWeyl.dual ψ = + LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) := rfl + +/-- The equivalence between the representation `leftHanded` and the representation + `dualLeftHanded` defined by multiplying an element of + `leftHanded` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. -/ +def LeftHandedWeyl.dualEquiv : LeftHandedWeyl.rep.Equiv DualLeftHandedWeyl.rep := by + refine Representation.Equiv.mk' LeftHandedWeyl.dual DualLeftHandedWeyl.dual ?_ ?_ + · intro x + simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, + Representation.IntertwiningMap.coe_toLinearMap] + rw [DualLeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.dual_hom_apply] + rw [DualLeftHandedWeyl.toFin2ℂ, LinearEquiv.apply_symm_apply, mulVec_mulVec] + rw [show (!![0, -1; (1 : ℂ), 0] * !![0, 1; -1, 0]) = 1 by simpa using Eq.symm one_fin_two] + rw [one_mulVec] + rfl + · intro ψ + simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, + Representation.IntertwiningMap.coe_toLinearMap] + rw [DualLeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.toFin2ℂ, + LinearEquiv.apply_symm_apply, mulVec_mulVec] + rw [show (!![0, (1 : ℂ); -1, 0] * !![0, -1; 1, 0]) = 1 by simpa using Eq.symm one_fin_two] + rw [one_mulVec] + rfl + +/-- `leftHandedDualEquiv` acting on an element `ψ : leftHanded` corresponds + to multiplying `ψ` by the matrix `!![0, 1; -1, 0]`. -/ +lemma LeftHandedWeyl.dualEquiv_hom_hom_apply (ψ : LeftHandedWeyl) : + LeftHandedWeyl.dualEquiv ψ = + DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) := rfl + +/-- The inverse of `leftHandedDualEquiv` acting on an element`ψ : dualLeftHanded` corresponds + to multiplying `ψ` by the matrix `!![0, -1; 1, 0]`. -/ +lemma LeftHandedWeyl.dualEquiv_inv_hom_apply (ψ : DualLeftHandedWeyl) : + LeftHandedWeyl.dualEquiv.symm ψ = + LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) := rfl + +/-- The linear equivalence between `rightHandedWeyl` and `DualRightHandedWeyl` given by multiplying +an element of `rightHandedWeyl` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. +-/ +informal_definition RightHandedWeyl.dualEquiv where + deps := [``RightHandedWeyl, ``DualRightHandedWeyl] + tag := "6VZR4" + +/-- The linear equivalence `rightHandedWeylDualEquiv` is equivariant with respect to the action of +`SL(2,C)` on `rightHandedWeyl` and `DualRightHandedWeyl`. +-/ +informal_lemma RightHandedWeyl.dualEquiv_equivariant where + deps := [``RightHandedWeyl.dualEquiv] + tag := "6VZSG" + +end + +end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean index 44baa15b9..e010ca8c9 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean @@ -28,132 +28,4 @@ open MatrixGroups open Complex open TensorProduct -/-! - -## Dual Right-handed Weyl fermions - --/ - -namespace DualRightHandedWeyl - -end DualRightHandedWeyl - -/-! - -## Duals of Weyl fermions - -The dual of `LeftHandedWeyl` is `DualLeftHandedWeyl`, and the dual of `RightHandedWeyl` is -`DualRightHandedWeyl`. - --/ - -/-- The morphism between the representation `leftHanded` and the representation - `dualLeftHanded` defined by multiplying an element of - `leftHanded` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. -/ -def LeftHandedWeyl.dual : LeftHandedWeyl.rep.IntertwiningMap DualLeftHandedWeyl.rep where - toFun := fun ψ => DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) - map_add' := by - intro ψ ψ' - simp only [mulVec_add, LinearEquiv.map_add] - map_smul' := by - intro a ψ - simp only [mulVec_smul, LinearEquiv.map_smul] - rfl - isIntertwining' := by - intro M - refine LinearMap.ext (fun ψ => ?_) - change DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ M.1 *ᵥ ψ.val) = - DualLeftHandedWeyl.toFin2ℂEquiv.symm ((M.1⁻¹)ᵀ *ᵥ !![0, 1; -1, 0] *ᵥ ψ.val) - apply congrArg - rw [mulVec_mulVec, mulVec_mulVec, Lorentz.SL2C.inverse_coe, eta_fin_two M.1] - refine congrFun (congrArg _ ?_) _ - rw [SpecialLinearGroup.coe_inv, Matrix.adjugate_fin_two, - Matrix.mul_fin_two, eta_fin_two !![M.1 1 1, -M.1 0 1; -M.1 1 0, M.1 0 0]ᵀ] - simp - -lemma LeftHandedWeyl.dual_hom_apply (ψ : LeftHandedWeyl) : - LeftHandedWeyl.dual ψ = - DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) := rfl - -/-- The morphism from `dualLeftHanded` to - `leftHanded` defined by multiplying an element of - DualLeftHandedWeyl by the matrix `εₐ₁ₐ₂ = !![0, -1; 1, 0]`. -/ -def DualLeftHandedWeyl.dual : DualLeftHandedWeyl.rep.IntertwiningMap LeftHandedWeyl.rep where - toFun := fun ψ => - LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) - map_add' := by - intro ψ ψ' - simp only [map_add] - rw [mulVec_add, LinearEquiv.map_add] - map_smul' := by - intro a ψ - simp only [LinearEquiv.map_smul] - rw [mulVec_smul, LinearEquiv.map_smul] - rfl - isIntertwining' := by - intro M - refine LinearMap.ext (fun ψ => ?_) - change LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ (M.1⁻¹)ᵀ *ᵥ ψ.val) = - LeftHandedWeyl.toFin2ℂEquiv.symm (M.1 *ᵥ !![0, -1; 1, 0] *ᵥ ψ.val) - rw [EquivLike.apply_eq_iff_eq, mulVec_mulVec, mulVec_mulVec, Lorentz.SL2C.inverse_coe, - eta_fin_two M.1] - refine congrFun (congrArg _ ?_) _ - rw [SpecialLinearGroup.coe_inv, Matrix.adjugate_fin_two, - Matrix.mul_fin_two, eta_fin_two !![M.1 1 1, -M.1 0 1; -M.1 1 0, M.1 0 0]ᵀ] - simp - -lemma DualLeftHandedWeyl.dual_hom_apply (ψ : DualLeftHandedWeyl) : - DualLeftHandedWeyl.dual ψ = - LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) := rfl - -/-- The equivalence between the representation `leftHanded` and the representation - `dualLeftHanded` defined by multiplying an element of - `leftHanded` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. -/ -def LeftHandedWeyl.dualEquiv : LeftHandedWeyl.rep.Equiv DualLeftHandedWeyl.rep := by - refine Representation.Equiv.mk' LeftHandedWeyl.dual DualLeftHandedWeyl.dual ?_ ?_ - · intro x - simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, - Representation.IntertwiningMap.coe_toLinearMap] - rw [DualLeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.dual_hom_apply] - rw [DualLeftHandedWeyl.toFin2ℂ, LinearEquiv.apply_symm_apply, mulVec_mulVec] - rw [show (!![0, -1; (1 : ℂ), 0] * !![0, 1; -1, 0]) = 1 by simpa using Eq.symm one_fin_two] - rw [one_mulVec] - rfl - · intro ψ - simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, - Representation.IntertwiningMap.coe_toLinearMap] - rw [DualLeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.dual_hom_apply, LeftHandedWeyl.toFin2ℂ, - LinearEquiv.apply_symm_apply, mulVec_mulVec] - rw [show (!![0, (1 : ℂ); -1, 0] * !![0, -1; 1, 0]) = 1 by simpa using Eq.symm one_fin_two] - rw [one_mulVec] - rfl - -/-- `leftHandedDualEquiv` acting on an element `ψ : leftHanded` corresponds - to multiplying `ψ` by the matrix `!![0, 1; -1, 0]`. -/ -lemma LeftHandedWeyl.dualEquiv_hom_hom_apply (ψ : LeftHandedWeyl) : - LeftHandedWeyl.dualEquiv ψ = - DualLeftHandedWeyl.toFin2ℂEquiv.symm (!![0, 1; -1, 0] *ᵥ ψ.toFin2ℂ) := rfl - -/-- The inverse of `leftHandedDualEquiv` acting on an element`ψ : dualLeftHanded` corresponds - to multiplying `ψ` by the matrix `!![0, -1; 1, 0]`. -/ -lemma LeftHandedWeyl.dualEquiv_inv_hom_apply (ψ : DualLeftHandedWeyl) : - LeftHandedWeyl.dualEquiv.symm ψ = - LeftHandedWeyl.toFin2ℂEquiv.symm (!![0, -1; 1, 0] *ᵥ ψ.toFin2ℂ) := rfl - -/-- The linear equivalence between `rightHandedWeyl` and `DualRightHandedWeyl` given by multiplying -an element of `rightHandedWeyl` by the matrix `εᵃ⁰ᵃ¹ = !![0, 1; -1, 0]]`. --/ -informal_definition RightHandedWeyl.dualEquiv where - deps := [``RightHandedWeyl, ``DualRightHandedWeyl] - tag := "6VZR4" - -/-- The linear equivalence `rightHandedWeylDualEquiv` is equivariant with respect to the action of -`SL(2,C)` on `rightHandedWeyl` and `DualRightHandedWeyl`. --/ -informal_lemma RightHandedWeyl.dualEquiv_equivariant where - deps := [``RightHandedWeyl.dualEquiv] - tag := "6VZSG" - -end - end Fermion From 852e4202c4dab3958f15e1323ed2804b1bd3c3ac Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:25:03 +0100 Subject: [PATCH 08/48] feat: Delete now empty files --- .../Tensors/ComplexTensor/Weyl/Basic.lean | 31 ------------------- .../Tensors/ComplexTensor/Weyl/Modules.lean | 30 ------------------ 2 files changed, 61 deletions(-) delete mode 100644 Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean delete mode 100644 Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean deleted file mode 100644 index e010ca8c9..000000000 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Basic.lean +++ /dev/null @@ -1,31 +0,0 @@ -/- -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 --/ -module - -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Modules -public import Physlib.Relativity.SL2C.Basic -public import Physlib.Meta.Informal.Basic -public import Physlib.Meta.TODO.Basic -/-! - -# Weyl fermions - -A good reference for the material in this file is: -https://particle.physics.ucdavis.edu/modernsusy/slides/slideimages/spinorfeynrules.pdf - --/ - -@[expose] public section - -namespace Fermion -noncomputable section - -open Module Matrix -open MatrixGroups -open Complex -open TensorProduct - -end Fermion diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean b/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean deleted file mode 100644 index 72d1459f0..000000000 --- a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Modules.lean +++ /dev/null @@ -1,30 +0,0 @@ -/- -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 --/ -module - -public import Mathlib.Analysis.Complex.Basic -public import Physlib.Meta.TODO.Basic -/-! - -## Modules associated with Fermions - -Weyl fermions live in the vector space `ℂ^2`, defined here as `Fin 2 → ℂ`. -However if we simply define the Module of Weyl fermions as `Fin 2 → ℂ` we get casting problems, -where e.g. left-handed fermions can be cast to right-handed fermions etc. -To overcome this, for each type of Weyl fermion we define a structure that wraps `Fin 2 → ℂ`, -and these structures we define the instance of a module. This prevents casting between different -types of fermions. - - --/ - -@[expose] public section - -namespace Fermion -noncomputable section - -end -end Fermion From 6a299a87bbb884a34971f20de3af29cafdf84d15 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:25:33 +0100 Subject: [PATCH 09/48] feat: Move auxillary files --- .../{Tensors/ComplexTensor => Fermions}/Weyl/Contraction.lean | 0 .../{Tensors/ComplexTensor => Fermions}/Weyl/Metric.lean | 0 .../Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Two.lean | 0 .../Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Unit.lean | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename Physlib/Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Contraction.lean (100%) rename Physlib/Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Metric.lean (100%) rename Physlib/Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Two.lean (100%) rename Physlib/Relativity/{Tensors/ComplexTensor => Fermions}/Weyl/Unit.lean (100%) diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Contraction.lean b/Physlib/Relativity/Fermions/Weyl/Contraction.lean similarity index 100% rename from Physlib/Relativity/Tensors/ComplexTensor/Weyl/Contraction.lean rename to Physlib/Relativity/Fermions/Weyl/Contraction.lean diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Metric.lean b/Physlib/Relativity/Fermions/Weyl/Metric.lean similarity index 100% rename from Physlib/Relativity/Tensors/ComplexTensor/Weyl/Metric.lean rename to Physlib/Relativity/Fermions/Weyl/Metric.lean diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Two.lean b/Physlib/Relativity/Fermions/Weyl/Two.lean similarity index 100% rename from Physlib/Relativity/Tensors/ComplexTensor/Weyl/Two.lean rename to Physlib/Relativity/Fermions/Weyl/Two.lean diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Weyl/Unit.lean b/Physlib/Relativity/Fermions/Weyl/Unit.lean similarity index 100% rename from Physlib/Relativity/Tensors/ComplexTensor/Weyl/Unit.lean rename to Physlib/Relativity/Fermions/Weyl/Unit.lean From c9c10026fee9bfb98cd939a9ed17ed5e1b0164bb Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:30:21 +0100 Subject: [PATCH 10/48] feat: Update imports --- Physlib.lean | 14 ++++++++------ .../StandardModel/Fermions/QuarkDoublet.lean | 5 ++++- Physlib/Relativity/Fermions/Weyl/Contraction.lean | 5 ++++- Physlib/Relativity/Fermions/Weyl/Metric.lean | 2 +- Physlib/Relativity/Fermions/Weyl/Two.lean | 5 ++++- Physlib/Relativity/Fermions/Weyl/Unit.lean | 4 ++-- Physlib/Relativity/PauliMatrices/AsTensor.lean | 2 +- .../Relativity/Tensors/ComplexTensor/Basic.lean | 2 +- 8 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Physlib.lean b/Physlib.lean index 8ac15a401..2187dc782 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -359,12 +359,14 @@ public import Physlib.Relativity.Tensors.ComplexTensor.Units.Symm public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Basic public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Contraction public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Modules -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Basic -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Contraction -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Metric -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Modules -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Two -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Unit +public import Physlib.Relativity.Fermions.Weyl.Contraction +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.Metric +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.Two +public import Physlib.Relativity.Fermions.Weyl.Unit public import Physlib.Relativity.Tensors.ComponentIdx.Basic public import Physlib.Relativity.Tensors.ComponentIdx.Contraction public import Physlib.Relativity.Tensors.ComponentIdx.Product diff --git a/Physlib/Particles/StandardModel/Fermions/QuarkDoublet.lean b/Physlib/Particles/StandardModel/Fermions/QuarkDoublet.lean index 3363a4380..b8f620937 100644 --- a/Physlib/Particles/StandardModel/Fermions/QuarkDoublet.lean +++ b/Physlib/Particles/StandardModel/Fermions/QuarkDoublet.lean @@ -6,7 +6,10 @@ Authors: Joseph Tooby-Smith module public import Physlib.Particles.StandardModel.Basic -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Basic +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded /-! # The type corresponding to quark doublets diff --git a/Physlib/Relativity/Fermions/Weyl/Contraction.lean b/Physlib/Relativity/Fermions/Weyl/Contraction.lean index e1b9cc659..bf2001a74 100644 --- a/Physlib/Relativity/Fermions/Weyl/Contraction.lean +++ b/Physlib/Relativity/Fermions/Weyl/Contraction.lean @@ -5,7 +5,10 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Basic +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded /-! # Contraction of Weyl fermions diff --git a/Physlib/Relativity/Fermions/Weyl/Metric.lean b/Physlib/Relativity/Fermions/Weyl/Metric.lean index ea042b91e..6e6ae5df8 100644 --- a/Physlib/Relativity/Fermions/Weyl/Metric.lean +++ b/Physlib/Relativity/Fermions/Weyl/Metric.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Unit +public import Physlib.Relativity.Fermions.Weyl.Unit /-! # Metrics of Weyl fermions diff --git a/Physlib/Relativity/Fermions/Weyl/Two.lean b/Physlib/Relativity/Fermions/Weyl/Two.lean index 1d0d5a982..ca8e4636d 100644 --- a/Physlib/Relativity/Fermions/Weyl/Two.lean +++ b/Physlib/Relativity/Fermions/Weyl/Two.lean @@ -5,7 +5,10 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Basic +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded /-! # Tensor product of two Weyl fermion diff --git a/Physlib/Relativity/Fermions/Weyl/Unit.lean b/Physlib/Relativity/Fermions/Weyl/Unit.lean index 38f5c77b8..70786f175 100644 --- a/Physlib/Relativity/Fermions/Weyl/Unit.lean +++ b/Physlib/Relativity/Fermions/Weyl/Unit.lean @@ -5,8 +5,8 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Two -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Contraction +public import Physlib.Relativity.Fermions.Weyl.Two +public import Physlib.Relativity.Fermions.Weyl.Contraction /-! # Units of Weyl fermions diff --git a/Physlib/Relativity/PauliMatrices/AsTensor.lean b/Physlib/Relativity/PauliMatrices/AsTensor.lean index 9c29bc6d8..c2d84e1f4 100644 --- a/Physlib/Relativity/PauliMatrices/AsTensor.lean +++ b/Physlib/Relativity/PauliMatrices/AsTensor.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Two +public import Physlib.Relativity.Fermions.Weyl.Two public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Basic /-! diff --git a/Physlib/Relativity/Tensors/ComplexTensor/Basic.lean b/Physlib/Relativity/Tensors/ComplexTensor/Basic.lean index 472983f5f..73cda373e 100644 --- a/Physlib/Relativity/Tensors/ComplexTensor/Basic.lean +++ b/Physlib/Relativity/Tensors/ComplexTensor/Basic.lean @@ -6,7 +6,7 @@ Authors: Joseph Tooby-Smith, Nikolai Kashcheev module public import Physlib.Relativity.Tensors.ComplexTensor.Metrics.Pre -public import Physlib.Relativity.Tensors.ComplexTensor.Weyl.Metric +public import Physlib.Relativity.Fermions.Weyl.Metric /-! ## Complex Lorentz tensors From 102686d69c5b30f320123661717208c404f3fb1e Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:00:12 +0100 Subject: [PATCH 11/48] refactor: Sort Physlib.lean --- Physlib.lean | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Physlib.lean b/Physlib.lean index 2187dc782..b8b4d91db 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -320,6 +320,14 @@ public import Physlib.QuantumMechanics.OneDimension.ReflectionlessPotential.Basi public import Physlib.QuantumMechanics.PlanckConstant public import Physlib.Relativity.Bispinors.Basic public import Physlib.Relativity.CliffordAlgebra +public import Physlib.Relativity.Fermions.Weyl.Contraction +public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded +public import Physlib.Relativity.Fermions.Weyl.DualRightHanded +public import Physlib.Relativity.Fermions.Weyl.LeftHanded +public import Physlib.Relativity.Fermions.Weyl.Metric +public import Physlib.Relativity.Fermions.Weyl.RightHanded +public import Physlib.Relativity.Fermions.Weyl.Two +public import Physlib.Relativity.Fermions.Weyl.Unit public import Physlib.Relativity.LorentzAlgebra.Basic public import Physlib.Relativity.LorentzAlgebra.Basis public import Physlib.Relativity.LorentzAlgebra.ExponentialMap @@ -359,14 +367,6 @@ public import Physlib.Relativity.Tensors.ComplexTensor.Units.Symm public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Basic public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Contraction public import Physlib.Relativity.Tensors.ComplexTensor.Vector.Pre.Modules -public import Physlib.Relativity.Fermions.Weyl.Contraction -public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded -public import Physlib.Relativity.Fermions.Weyl.DualRightHanded -public import Physlib.Relativity.Fermions.Weyl.LeftHanded -public import Physlib.Relativity.Fermions.Weyl.Metric -public import Physlib.Relativity.Fermions.Weyl.RightHanded -public import Physlib.Relativity.Fermions.Weyl.Two -public import Physlib.Relativity.Fermions.Weyl.Unit public import Physlib.Relativity.Tensors.ComponentIdx.Basic public import Physlib.Relativity.Tensors.ComponentIdx.Contraction public import Physlib.Relativity.Tensors.ComponentIdx.Product From 1feb79c2f2fd48d779d98c18347e420f7f4b7ef9 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:43:12 +0100 Subject: [PATCH 12/48] Add import for Duals in Physlib.lean --- Physlib.lean | 1 + 1 file changed, 1 insertion(+) diff --git a/Physlib.lean b/Physlib.lean index b8b4d91db..65a000eb1 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -323,6 +323,7 @@ public import Physlib.Relativity.CliffordAlgebra public import Physlib.Relativity.Fermions.Weyl.Contraction public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded public import Physlib.Relativity.Fermions.Weyl.DualRightHanded +public import Physlib.Relativity.Fermions.Weyl.Duals public import Physlib.Relativity.Fermions.Weyl.LeftHanded public import Physlib.Relativity.Fermions.Weyl.Metric public import Physlib.Relativity.Fermions.Weyl.RightHanded From 434114661dbf448559aa5744f057fb3dceb8f9ca Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:26:03 +0100 Subject: [PATCH 13/48] feat: Claudes first attempt (I gave it some starters) Prompt: I want you to: 1. Fill out the sorries in this file. 2. Define a instance of a `Star` on `potentialAlgebra` defined by conjugating Left and Right weyl fermions, and using CliffordAlgebra.reverse 3. Define a representation of the Lorentz group on potentialAlgebra. 4. Define the majorana mass for a LeftHandedWeyl. 5. Show it is Lorentz invariant. Co-Authored-By: Claude --- Physlib.lean | 1 + Physlib/Relativity/Fermions/Weyl/Metric.lean | 7 + .../Fermions/Weyl/PotentialAlgebra.lean | 592 ++++++++++++++++++ 3 files changed, 600 insertions(+) create mode 100644 Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean diff --git a/Physlib.lean b/Physlib.lean index 65a000eb1..3142dc696 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -326,6 +326,7 @@ public import Physlib.Relativity.Fermions.Weyl.DualRightHanded public import Physlib.Relativity.Fermions.Weyl.Duals public import Physlib.Relativity.Fermions.Weyl.LeftHanded public import Physlib.Relativity.Fermions.Weyl.Metric +public import Physlib.Relativity.Fermions.Weyl.PotentialAlgebra public import Physlib.Relativity.Fermions.Weyl.RightHanded public import Physlib.Relativity.Fermions.Weyl.Two public import Physlib.Relativity.Fermions.Weyl.Unit diff --git a/Physlib/Relativity/Fermions/Weyl/Metric.lean b/Physlib/Relativity/Fermions/Weyl/Metric.lean index 6e6ae5df8..cf6b3ea46 100644 --- a/Physlib/Relativity/Fermions/Weyl/Metric.lean +++ b/Physlib/Relativity/Fermions/Weyl/Metric.lean @@ -118,6 +118,13 @@ lemma leftMetric_apply_one : leftMetric (1 : ℂ) = leftMetricVal := by change (1 : ℂ) • leftMetricVal = leftMetricVal simp only [one_smul] +/-- The metric `εᵃᵃ` is invariant under the action of `SL(2,ℂ)`. -/ +lemma leftMetricVal_rep (M : SL(2,ℂ)) : + TensorProduct.map (LeftHandedWeyl.rep M) (LeftHandedWeyl.rep M) leftMetricVal = + leftMetricVal := by + have h := LinearMap.congr_fun (leftMetric.isIntertwining' M) (1 : ℂ) + simpa [leftMetric_apply_one, Representation.tprod_apply] using h.symm + /-- The metric `εₐₐ` as an element of `(dualLeftHanded ⊗ dualLeftHanded).V`. -/ def dualLeftMetricVal : (DualLeftHandedWeyl ⊗[ℂ] DualLeftHandedWeyl) := dualLeftdualLeftToMatrix.symm metricRaw diff --git a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean new file mode 100644 index 000000000..4b7581e72 --- /dev/null +++ b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean @@ -0,0 +1,592 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.Relativity.Fermions.Weyl.Metric +public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation +public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic +public import Mathlib.LinearAlgebra.ExteriorAlgebra.OfAlternating +/-! + +# The potential algebra of Weyl fermions + +## i. Overview + +Fermions anticommute. Thus a potential built out of a Weyl fermion is not a polynomial in the +components of that fermion, but an element of the exterior (Grassmann) algebra generated by them. + +In this file we consider a single left-handed Weyl fermion `ψ^α` together with its conjugate, +the right-handed Weyl fermion `ψ̄^{\dot α}`. The `potentialAlgebra` is the exterior algebra +generated by the components of these two fields. It carries a `Star` operation, which conjugates +the fermions and reverses the order of the generators, and an action of `SL(2,ℂ)`, the double +cover of the Lorentz group. + +As an example we define the Majorana mass term of the left-handed Weyl fermion, and show that it +is invariant under the action of `SL(2,ℂ)` and fixed by the `Star` operation. + +## ii. Key results + +- `Fermion.LeftHandedWeyl.conjugate` : the conjugate of a left-handed Weyl fermion. +- `Fermion.potentialAlgebra` : the exterior algebra generated by `ψ^α` and `ψ̄^{\dot α}`. +- `Fermion.potentialAlgebra.instStarRing` : the star operation on the potential algebra. +- `Fermion.potentialAlgebra.rep` : the action of `SL(2,ℂ)` on the potential algebra. +- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of `ψ^α`. +- `Fermion.potentialAlgebra.rep_majoranaMass` : the Majorana mass term is Lorentz invariant. +- `Fermion.potentialAlgebra.star_majoranaMass` : the Majorana mass term is real. + +## iii. Table of contents + +- A. Conjugation of Weyl fermions + - A.1. The conjugate of a right-handed Weyl fermion + - A.2. The conjugate of a left-handed Weyl fermion + - A.3. Conjugation of the Weyl fermion generators +- B. The action of `SL(2,ℂ)` on the Weyl fermion generators +- C. The conjugate of a `ℂ`-algebra +- D. The potential algebra + - D.1. Basic instances on the potential algebra + - D.2. The generators of the potential algebra +- E. The star operation on the potential algebra +- F. The action of `SL(2,ℂ)` on the potential algebra +- G. The Majorana mass term + +## iv. References + +- Dreiner, Haber and Martin, *Two-component spinor techniques and Feynman rules for quantum field + theory and supersymmetry*, https://arxiv.org/abs/0812.1594 + +-/ + +@[expose] public section + +namespace Fermion +noncomputable section + +open Module Matrix +open MatrixGroups +open Complex +open TensorProduct +open CategoryTheory.MonoidalCategory + +/-! + +## A. Conjugation of Weyl fermions + +Complex conjugation of the components of a Weyl fermion exchanges left- and right-handed +Weyl fermions. It is a conjugate-linear map, that is, a semilinear map with respect to +`starRingEnd ℂ`. + +-/ + +/-! + +### A.1. The conjugate of a right-handed Weyl fermion + +-/ + +namespace RightHandedWeyl + +/-- The conjugate `ψ̄^α` of a right-handed Weyl fermion `ψ^{\dot α}`, defined by complex + conjugating each component. It is a left-handed Weyl fermion. -/ +def conjugate : RightHandedWeyl →ₛₗ[starRingEnd ℂ] LeftHandedWeyl where + toFun ψ := ⟨fun i => star (ψ.val i)⟩ + map_add' ψ1 ψ2 := by + apply LeftHandedWeyl.toFin2ℂFun.injective + funext i + exact star_add _ _ + map_smul' c ψ := by + apply LeftHandedWeyl.toFin2ℂFun.injective + funext i + exact star_mul' c (ψ.val i) + +@[simp] +lemma conjugate_val (ψ : RightHandedWeyl) (i : Fin 2) : (conjugate ψ).val i = star (ψ.val i) := rfl + +/-- Conjugation intertwines the representation of `SL(2,ℂ)` on right-handed Weyl fermions with + the representation on left-handed Weyl fermions. -/ +lemma conjugate_rep (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : + conjugate (rep M ψ) = LeftHandedWeyl.rep M (conjugate ψ) := by + apply LeftHandedWeyl.toFin2ℂFun.injective + funext i + change star ((M.1.map star *ᵥ ψ.val) i) = (M.1 *ᵥ fun j => star (ψ.val j)) i + simp [mulVec, dotProduct, star_mul'] + +end RightHandedWeyl + +/-! + +### A.2. The conjugate of a left-handed Weyl fermion + +-/ + +namespace LeftHandedWeyl + +/-- The conjugate `ψ̄^{\dot α}` of a left-handed Weyl fermion `ψ^α`, defined by complex + conjugating each component. It is a right-handed Weyl fermion. -/ +def conjugate : LeftHandedWeyl →ₛₗ[starRingEnd ℂ] RightHandedWeyl where + toFun ψ := ⟨fun i => star (ψ.val i)⟩ + map_add' ψ1 ψ2 := by + apply RightHandedWeyl.toFin2ℂFun.injective + funext i + exact star_add _ _ + map_smul' c ψ := by + apply RightHandedWeyl.toFin2ℂFun.injective + funext i + exact star_mul' c (ψ.val i) + +@[simp] +lemma conjugate_val (ψ : LeftHandedWeyl) (i : Fin 2) : (conjugate ψ).val i = star (ψ.val i) := rfl + +@[simp] +lemma conjugate_conjugate (ψ : LeftHandedWeyl) : + RightHandedWeyl.conjugate (conjugate ψ) = ψ := by + apply toFin2ℂFun.injective + funext i + exact star_star (ψ.val i) + +/-- Conjugation intertwines the representation of `SL(2,ℂ)` on left-handed Weyl fermions with + the representation on right-handed Weyl fermions. -/ +lemma conjugate_rep (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : + conjugate (rep M ψ) = RightHandedWeyl.rep M (conjugate ψ) := by + apply RightHandedWeyl.toFin2ℂFun.injective + funext i + change star ((M.1 *ᵥ ψ.val) i) = (M.1.map star *ᵥ fun j => star (ψ.val j)) i + simp [mulVec, dotProduct, star_mul'] + +end LeftHandedWeyl + +@[simp] +lemma RightHandedWeyl.conjugate_conjugate (ψ : RightHandedWeyl) : + LeftHandedWeyl.conjugate (conjugate ψ) = ψ := by + apply toFin2ℂFun.injective + funext i + exact star_star (ψ.val i) + +/-! + +### A.3. Conjugation of the Weyl fermion generators + +The generators of the potential algebra of a left-handed Weyl fermion `ψ^α` are the components +of `ψ^α` together with the components of its conjugate `ψ̄^{\dot α}`. They therefore live in +`LeftHandedWeyl × RightHandedWeyl`, on which conjugation acts by exchanging the two factors. + +-/ + +/-- Conjugation of the pair `(ψ^α, ψ̄^{\dot α})` of Weyl fermion generators, exchanging the + left-handed and the right-handed fermion. -/ +def conjugateFields : + LeftHandedWeyl × RightHandedWeyl →ₛₗ[starRingEnd ℂ] LeftHandedWeyl × RightHandedWeyl where + toFun ψ := (RightHandedWeyl.conjugate ψ.2, LeftHandedWeyl.conjugate ψ.1) + map_add' ψ φ := by simp + map_smul' c ψ := by simp + +@[simp] +lemma conjugateFields_apply (ψ : LeftHandedWeyl × RightHandedWeyl) : + conjugateFields ψ = (RightHandedWeyl.conjugate ψ.2, LeftHandedWeyl.conjugate ψ.1) := rfl + +@[simp] +lemma conjugateFields_conjugateFields (ψ : LeftHandedWeyl × RightHandedWeyl) : + conjugateFields (conjugateFields ψ) = ψ := by + simp + +/-! + +## B. The action of `SL(2,ℂ)` on the Weyl fermion generators + +-/ + +/-- The representation of `SL(2,ℂ)` on the Weyl fermion generators `(ψ^α, ψ̄^{\dot α})`, + acting by the fundamental representation on the left-handed fermion and by the conjugate + representation on the right-handed fermion. -/ +def repFields : Representation ℂ SL(2,ℂ) (LeftHandedWeyl × RightHandedWeyl) where + toFun M := (LeftHandedWeyl.rep M).prodMap (RightHandedWeyl.rep M) + map_one' := by + refine LinearMap.ext fun ψ => ?_ + simp + map_mul' M N := by + refine LinearMap.ext fun ψ => ?_ + simp [Module.End.mul_apply] + +@[simp] +lemma repFields_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : + repFields M ψ = (LeftHandedWeyl.rep M ψ.1, RightHandedWeyl.rep M ψ.2) := rfl + +/-- Conjugation of the Weyl fermion generators commutes with the action of `SL(2,ℂ)`. -/ +lemma conjugateFields_repFields (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : + conjugateFields (repFields M ψ) = repFields M (conjugateFields ψ) := by + simp [RightHandedWeyl.conjugate_rep, LeftHandedWeyl.conjugate_rep] + +/-! + +## C. The conjugate of a `ℂ`-algebra + +To define a conjugate-linear algebra map out of an exterior algebra we use its universal property, +which produces `ℂ`-algebra maps. A conjugate-linear algebra map `A → A` is precisely a +`ℂ`-algebra map `A →ₐ[ℂ] ConjAlg A`, where `ConjAlg A` is `A` with the `ℂ`-action twisted by +complex conjugation. + +-/ + +TODO "The construction `ConjAlg` of the conjugate of a `ℂ`-algebra is not specific to fermions. + It should be generalised to an arbitrary star ring of scalars and moved to a mathematics file." + +/-- The `ℂ`-algebra `A` with its `ℂ`-algebra structure twisted by complex conjugation. + A conjugate-linear algebra map `A → A` is the same thing as a `ℂ`-algebra map + `A →ₐ[ℂ] ConjAlg A`. -/ +def ConjAlg (A : Type) : Type := A + +namespace ConjAlg + +variable {A : Type} + +/-- The identity map from a `ℂ`-algebra to its conjugate. -/ +def of (x : A) : ConjAlg A := x + +/-- The identity map from the conjugate of a `ℂ`-algebra back to that algebra. -/ +def val (x : ConjAlg A) : A := x + +@[simp] +lemma val_of (x : A) : val (of x) = x := rfl + +variable [Ring A] + +instance : Ring (ConjAlg A) := inferInstanceAs (Ring A) + +@[simp] +lemma val_add (x y : ConjAlg A) : val (x + y) = val x + val y := rfl + +@[simp] +lemma val_mul (x y : ConjAlg A) : val (x * y) = val x * val y := rfl + +variable [Algebra ℂ A] + +instance : Algebra ℂ (ConjAlg A) := + RingHom.toAlgebra' ((algebraMap ℂ A).comp (starRingEnd ℂ) : ℂ →+* ConjAlg A) + fun c x => Algebra.commutes ((starRingEnd ℂ) c) (val x) + +@[simp] +lemma val_algebraMap (c : ℂ) : + val (algebraMap ℂ (ConjAlg A) c) = algebraMap ℂ A ((starRingEnd ℂ) c) := rfl + +lemma smul_of (c : ℂ) (x : A) : c • of x = of ((starRingEnd ℂ) c • x) := by + rw [Algebra.smul_def, Algebra.smul_def] + rfl + +end ConjAlg + +/-! + +## D. The potential algebra + +-/ + +/-- The potential algebra of a left-handed Weyl fermion `ψ^α`: the exterior (Grassmann) algebra + generated by the components of `ψ^α` and of its conjugate `ψ̄^{\dot α}`. + The potential of a theory of a single Weyl fermion is an element of this algebra. -/ +def potentialAlgebra : Type := ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl) + +namespace potentialAlgebra + +/-! + +### D.1. Basic instances on the potential algebra + +-/ + +instance : Ring potentialAlgebra := + inferInstanceAs (Ring (ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl))) + +instance : Algebra ℂ potentialAlgebra := + inferInstanceAs (Algebra ℂ (ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl))) + +/-! + +### D.2. The generators of the potential algebra + +-/ + +/-- The inclusion of the Weyl fermion generators `(ψ^α, ψ̄^{\dot α})` into the potential + algebra. -/ +def ι : LeftHandedWeyl × RightHandedWeyl →ₗ[ℂ] potentialAlgebra := ExteriorAlgebra.ι ℂ + +lemma ι_sq_zero (ψ : LeftHandedWeyl × RightHandedWeyl) : ι ψ * ι ψ = 0 := + ExteriorAlgebra.ι_sq_zero ψ + +/-- The generators of the potential algebra anticommute, corresponding to the fact that + fermions anticommute. -/ +lemma ι_mul_ι_swap (ψ φ : LeftHandedWeyl × RightHandedWeyl) : ι ψ * ι φ = - (ι φ * ι ψ) := by + have h := CliffordAlgebra.ι_mul_ι_add_swap + (Q := (0 : QuadraticForm ℂ (LeftHandedWeyl × RightHandedWeyl))) ψ φ + simp only [QuadraticMap.polar, QuadraticMap.zero_apply, sub_zero, map_zero] at h + exact eq_neg_of_add_eq_zero_left h + +/-- The generators of the potential algebra coming from the left-handed Weyl fermion `ψ^α`. -/ +def ιLeft : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra := ι ∘ₗ LinearMap.inl ℂ _ _ + +/-- The generators of the potential algebra coming from the right-handed Weyl + fermion `ψ̄^{\dot α}`. -/ +def ιRight : RightHandedWeyl →ₗ[ℂ] potentialAlgebra := ι ∘ₗ LinearMap.inr ℂ _ _ + +lemma ιLeft_apply (ψ : LeftHandedWeyl) : ιLeft ψ = ι (ψ, 0) := rfl + +lemma ιRight_apply (ψ : RightHandedWeyl) : ιRight ψ = ι (0, ψ) := rfl + +/-- The potential algebra is generated, as an algebra, by the image of `ι`. -/ +@[elab_as_elim] +lemma induction {C : potentialAlgebra → Prop} + (algebraMap : ∀ c : ℂ, C (algebraMap ℂ potentialAlgebra c)) + (ι : ∀ ψ, C (potentialAlgebra.ι ψ)) + (mul : ∀ a b, C a → C b → C (a * b)) + (add : ∀ a b, C a → C b → C (a + b)) (x : potentialAlgebra) : C x := + ExteriorAlgebra.induction algebraMap ι mul add x + +/-! + +## E. The star operation on the potential algebra + +The star operation on the potential algebra conjugates the Weyl fermions, exchanging `ψ^α` and +`ψ̄^{\dot α}`, and reverses the order of the Grassmann generators. The reversal is +`CliffordAlgebra.reverse`, and makes the star operation into an anti-automorphism. + +-/ + +/-- Reversal of the order of the Grassmann generators in the potential algebra. -/ +def reverse : potentialAlgebra →ₗ[ℂ] potentialAlgebra := CliffordAlgebra.reverse + +@[simp] +lemma reverse_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : reverse (ι ψ) = ι ψ := + CliffordAlgebra.reverse_ι ψ + +@[simp] +lemma reverse_algebraMap (c : ℂ) : + reverse (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra c := + CliffordAlgebra.reverse.commutes c + +@[simp] +lemma reverse_mul (x y : potentialAlgebra) : reverse (x * y) = reverse y * reverse x := + CliffordAlgebra.reverse.map_mul x y + +/-- Conjugation of the Weyl fermions, as a `ℂ`-algebra map from the potential algebra to its + conjugate algebra. Equivalently, a conjugate-linear algebra map on the potential algebra. -/ +def conjHom : potentialAlgebra →ₐ[ℂ] ConjAlg potentialAlgebra := + ExteriorAlgebra.lift ℂ ⟨{ + toFun := fun ψ => ConjAlg.of (ι (conjugateFields ψ)) + map_add' := fun ψ φ => by + rw [map_add, map_add] + rfl + map_smul' := fun c ψ => by + rw [map_smulₛₗ, map_smul, RingHom.id_apply, ConjAlg.smul_of] }, + fun ψ => ι_sq_zero _⟩ + +@[simp] +lemma conjHom_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : + conjHom (ι ψ) = ConjAlg.of (ι (conjugateFields ψ)) := + ExteriorAlgebra.lift_ι_apply _ _ _ ψ + +/-- The conjugation of an element of the potential algebra: conjugate the Weyl fermions and + reverse the order of the Grassmann generators. -/ +def conjugate (x : potentialAlgebra) : potentialAlgebra := reverse (ConjAlg.val (conjHom x)) + +lemma conjugate_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : + conjugate (ι ψ) = ι (conjugateFields ψ) := by + show reverse (ConjAlg.val (conjHom (ι ψ))) = _ + rw [conjHom_ι, ConjAlg.val_of, reverse_ι] + +lemma conjugate_algebraMap (c : ℂ) : + conjugate (algebraMap ℂ potentialAlgebra c) = + algebraMap ℂ potentialAlgebra ((starRingEnd ℂ) c) := by + show reverse (ConjAlg.val (conjHom (algebraMap ℂ potentialAlgebra c))) = _ + rw [AlgHom.commutes, ConjAlg.val_algebraMap, reverse_algebraMap] + +lemma conjugate_mul (x y : potentialAlgebra) : + conjugate (x * y) = conjugate y * conjugate x := by + show reverse (ConjAlg.val (conjHom (x * y))) = _ + rw [map_mul, ConjAlg.val_mul, reverse_mul] + rfl + +lemma conjugate_add (x y : potentialAlgebra) : + conjugate (x + y) = conjugate x + conjugate y := by + show reverse (ConjAlg.val (conjHom (x + y))) = _ + rw [map_add, ConjAlg.val_add, map_add] + rfl + +lemma conjugate_conjugate (x : potentialAlgebra) : conjugate (conjugate x) = x := by + induction x using potentialAlgebra.induction with + | algebraMap c => rw [conjugate_algebraMap, conjugate_algebraMap, starRingEnd_self_apply] + | ι ψ => rw [conjugate_ι, conjugate_ι, conjugateFields_conjugateFields] + | mul a b ha hb => rw [conjugate_mul, conjugate_mul, ha, hb] + | add a b ha hb => rw [conjugate_add, conjugate_add, ha, hb] + +instance instStarRing : StarRing potentialAlgebra where + star := conjugate + star_involutive := conjugate_conjugate + star_mul := conjugate_mul + star_add := conjugate_add + +lemma star_def (x : potentialAlgebra) : star x = conjugate x := rfl + +@[simp] +lemma star_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : star (ι ψ) = ι (conjugateFields ψ) := + conjugate_ι ψ + +@[simp] +lemma star_ιLeft (ψ : LeftHandedWeyl) : star (ιLeft ψ) = ιRight (LeftHandedWeyl.conjugate ψ) := by + rw [ιLeft_apply, star_ι, ιRight_apply] + simp + +@[simp] +lemma star_ιRight (ψ : RightHandedWeyl) : star (ιRight ψ) = ιLeft (RightHandedWeyl.conjugate ψ) := by + rw [ιRight_apply, star_ι, ιLeft_apply] + simp + +@[simp] +lemma star_algebraMap (c : ℂ) : + star (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra ((starRingEnd ℂ) c) := + conjugate_algebraMap c + +/-- The star operation on the potential algebra is conjugate-linear. -/ +instance : StarModule ℂ potentialAlgebra where + star_smul c x := by + rw [Algebra.smul_def, star_mul, star_algebraMap, ← Algebra.commutes, ← Algebra.smul_def] + rfl + +/-! + +## F. The action of `SL(2,ℂ)` on the potential algebra + +-/ + +/-- The representation of `SL(2,ℂ)`, the double cover of the Lorentz group, on the potential + algebra, induced by its action on the Weyl fermion generators. -/ +def rep : Representation ℂ SL(2,ℂ) potentialAlgebra where + toFun M := (ExteriorAlgebra.map (repFields M)).toLinearMap + map_one' := by + refine LinearMap.ext fun x => ?_ + rw [map_one] + simp [Module.End.one_eq_id] + rfl + map_mul' M N := by + refine LinearMap.ext fun x => ?_ + rw [map_mul] + exact (AlgHom.congr_fun (ExteriorAlgebra.map_comp_map _ _) x).symm + +@[simp] +lemma rep_ι (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : + rep M (ι ψ) = ι (repFields M ψ) := + ExteriorAlgebra.map_apply_ι _ _ + +@[simp] +lemma rep_mul (M : SL(2,ℂ)) (x y : potentialAlgebra) : rep M (x * y) = rep M x * rep M y := + map_mul (ExteriorAlgebra.map (repFields M)) x y + +@[simp] +lemma rep_algebraMap (M : SL(2,ℂ)) (c : ℂ) : + rep M (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra c := + AlgHom.commutes (ExteriorAlgebra.map (repFields M)) c + +@[simp] +lemma rep_ιLeft (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : + rep M (ιLeft ψ) = ιLeft (LeftHandedWeyl.rep M ψ) := by + rw [ιLeft_apply, rep_ι, ιLeft_apply] + simp + +/-- The star operation on the potential algebra commutes with the action of `SL(2,ℂ)`. -/ +lemma rep_star (M : SL(2,ℂ)) (x : potentialAlgebra) : rep M (star x) = star (rep M x) := by + induction x using potentialAlgebra.induction with + | algebraMap c => rw [star_algebraMap, rep_algebraMap, rep_algebraMap, star_algebraMap] + | ι ψ => rw [star_ι, rep_ι, rep_ι, star_ι, conjugateFields_repFields] + | mul a b ha hb => rw [star_mul, rep_mul, rep_mul, ha, hb, star_mul] + | add a b ha hb => rw [star_add, map_add, map_add, ha, hb, star_add] + +/-! + +## G. The Majorana mass term + +The Majorana mass term of a left-handed Weyl fermion is `m ε_{αβ} ψ^α ψ^β` plus its conjugate. +Since the generators anticommute, this bilinear does not vanish, and it is Lorentz invariant +because the metric `ε` is. + +-/ + +/-- The multiplication of two left-handed generators, as a linear map on + `LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl`. -/ +def leftWedge : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl →ₗ[ℂ] potentialAlgebra := + TensorProduct.lift (((LinearMap.mul ℂ potentialAlgebra).comp ιLeft).compl₂ ιLeft) + +@[simp] +lemma leftWedge_tmul (ψ φ : LeftHandedWeyl) : leftWedge (ψ ⊗ₜ[ℂ] φ) = ιLeft ψ * ιLeft φ := rfl + +lemma rep_leftWedge (M : SL(2,ℂ)) (x : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl) : + rep M (leftWedge x) = + leftWedge (TensorProduct.map (LeftHandedWeyl.rep M) (LeftHandedWeyl.rep M) x) := by + induction x with + | zero => simp + | tmul ψ φ => simp + | add a b ha hb => simp [ha, hb] + +/-- The Lorentz invariant bilinear `ε_{αβ} ψ^α ψ^β` of a left-handed Weyl fermion, as an element + of the potential algebra. -/ +def leftBilinear : potentialAlgebra := leftWedge leftMetricVal + +/-- The bilinear `ε_{αβ} ψ^α ψ^β` is invariant under the action of `SL(2,ℂ)`. -/ +lemma rep_leftBilinear (M : SL(2,ℂ)) : rep M leftBilinear = leftBilinear := by + rw [leftBilinear, rep_leftWedge, leftMetricVal_rep] + +/-- In terms of the basis, the bilinear `ε_{αβ} ψ^α ψ^β` is `- 2 ψ^1 ψ^2`. It is non-zero + precisely because the generators anticommute. -/ +lemma leftBilinear_eq_smul : leftBilinear = + (-2 : ℂ) • (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := by + have h : ιLeft (LeftHandedWeyl.basis 1) * ιLeft (LeftHandedWeyl.basis 0) = + - (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := + ι_mul_ι_swap _ _ + rw [leftBilinear, leftMetricVal_expand_tmul, map_add, map_neg, leftWedge_tmul, leftWedge_tmul, h] + module + +/-- The bilinear `ε_{αβ} ψ^α ψ^β` is non-zero. For a commuting field the same expression would + vanish by the antisymmetry of `ε`. -/ +lemma leftBilinear_ne_zero : leftBilinear ≠ 0 := by + /- The alternating form `(v, w) ↦ det ![v.1, w.1]` on the generators lifts to a linear + functional on the potential algebra which is non-zero on `leftBilinear`. -/ + let form : (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin 2]→ₗ[ℂ] ℂ := + Matrix.detRowAlternating.compLinearMap + (LeftHandedWeyl.toFin2ℂEquiv.toLinearMap ∘ₗ LinearMap.fst ℂ LeftHandedWeyl RightHandedWeyl) + let f : ∀ i, (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin i]→ₗ[ℂ] ℂ := + Function.update (fun _ => 0) 2 form + have hprod : ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1) = + ExteriorAlgebra.ιMulti ℂ 2 + ![(LeftHandedWeyl.basis 0, 0), (LeftHandedWeyl.basis 1, 0)] := by + rw [ExteriorAlgebra.ιMulti_apply] + simp [ιLeft_apply, ι] + rfl + let F : potentialAlgebra →ₗ[ℂ] ℂ := ExteriorAlgebra.liftAlternating f + have hmulti : F (ExteriorAlgebra.ιMulti ℂ 2 + ![(LeftHandedWeyl.basis 0, 0), (LeftHandedWeyl.basis 1, 0)]) = 1 := by + show ExteriorAlgebra.liftAlternating f _ = 1 + rw [ExteriorAlgebra.liftAlternating_apply_ιMulti] + simp only [f, Function.update_self, form, AlternatingMap.compLinearMap_apply] + show Matrix.det _ = 1 + simp [Matrix.det_fin_two, LeftHandedWeyl.toFin2ℂFun, LeftHandedWeyl.basis_apply] + have hF : F leftBilinear = -2 := by + rw [leftBilinear_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] + intro h + rw [h, map_zero] at hF + norm_num at hF + +/-- The Majorana mass term, of complex mass `m`, of a left-handed Weyl fermion. It is the sum of + the bilinear `m ε_{αβ} ψ^α ψ^β` and its conjugate. -/ +def majoranaMass (m : ℂ) : potentialAlgebra := m • leftBilinear + star (m • leftBilinear) + +/-- The Majorana mass term is real, that is, it is fixed by the star operation. -/ +lemma star_majoranaMass (m : ℂ) : star (majoranaMass m) = majoranaMass m := by + rw [majoranaMass, star_add, star_star, add_comm] + +/-- The Majorana mass term is invariant under the action of `SL(2,ℂ)`, that is, + it is Lorentz invariant. -/ +lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) : rep M (majoranaMass m) = majoranaMass m := by + rw [majoranaMass, map_add, rep_star, map_smul, rep_leftBilinear] + +end potentialAlgebra +end +end Fermion From 5fa0d6cb372140d0efb4925263c8de55972ed10c Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:36:44 +0100 Subject: [PATCH 14/48] attempt2 : not much better Your definition of majoranaMass is wrong. In particular it does not even take in a fermion as an argument. I wouldn't not define leftBilinear as it does not make any sense - again also no fermions there. > Really you should be using contractions. and the dual maps Co-Authored-By: Claude --- .../Fermions/Weyl/PotentialAlgebra.lean | 151 +++++++++++------- 1 file changed, 97 insertions(+), 54 deletions(-) diff --git a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean index 4b7581e72..65f3a0ea5 100644 --- a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean +++ b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean @@ -18,14 +18,14 @@ public import Mathlib.LinearAlgebra.ExteriorAlgebra.OfAlternating Fermions anticommute. Thus a potential built out of a Weyl fermion is not a polynomial in the components of that fermion, but an element of the exterior (Grassmann) algebra generated by them. -In this file we consider a single left-handed Weyl fermion `ψ^α` together with its conjugate, -the right-handed Weyl fermion `ψ̄^{\dot α}`. The `potentialAlgebra` is the exterior algebra -generated by the components of these two fields. It carries a `Star` operation, which conjugates -the fermions and reverses the order of the generators, and an action of `SL(2,ℂ)`, the double -cover of the Lorentz group. +The `potentialAlgebra` is the exterior algebra generated by a left-handed Weyl fermion `ψ^α` +together with its conjugate, the right-handed Weyl fermion `ψ̄^{\dot α}`. It carries a `Star` +operation, which conjugates the fermions and reverses the order of the generators, and an action +of `SL(2,ℂ)`, the double cover of the Lorentz group. -As an example we define the Majorana mass term of the left-handed Weyl fermion, and show that it -is invariant under the action of `SL(2,ℂ)` and fixed by the `Star` operation. +A left-handed Weyl fermion of such a theory is a linear map +`LeftHandedWeyl →ₗ[ℂ] potentialAlgebra`. As an example we define the Majorana mass term of such a +fermion, and show that it is Lorentz invariant and fixed by the `Star` operation. ## ii. Key results @@ -33,7 +33,7 @@ is invariant under the action of `SL(2,ℂ)` and fixed by the `Star` operation. - `Fermion.potentialAlgebra` : the exterior algebra generated by `ψ^α` and `ψ̄^{\dot α}`. - `Fermion.potentialAlgebra.instStarRing` : the star operation on the potential algebra. - `Fermion.potentialAlgebra.rep` : the action of `SL(2,ℂ)` on the potential algebra. -- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of `ψ^α`. +- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of a left-handed Weyl fermion. - `Fermion.potentialAlgebra.rep_majoranaMass` : the Majorana mass term is Lorentz invariant. - `Fermion.potentialAlgebra.star_majoranaMass` : the Majorana mass term is real. @@ -50,7 +50,8 @@ is invariant under the action of `SL(2,ℂ)` and fixed by the `Star` operation. - D.2. The generators of the potential algebra - E. The star operation on the potential algebra - F. The action of `SL(2,ℂ)` on the potential algebra -- G. The Majorana mass term +- G. Left-handed Weyl fermions of the theory +- H. The Majorana mass term ## iv. References @@ -502,53 +503,86 @@ lemma rep_star (M : SL(2,ℂ)) (x : potentialAlgebra) : rep M (star x) = star (r /-! -## G. The Majorana mass term +## G. Left-handed Weyl fermions of the theory -The Majorana mass term of a left-handed Weyl fermion is `m ε_{αβ} ψ^α ψ^β` plus its conjugate. -Since the generators anticommute, this bilinear does not vanish, and it is Lorentz invariant -because the metric `ε` is. +A left-handed Weyl fermion of a theory whose potentials live in `potentialAlgebra` is a linear +map `ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra`, taking each spinor direction to a Grassmann-odd +element of the potential algebra. Such fermions carry the representation +`LeftHandedWeyl.rep.linHom rep` of `SL(2,ℂ)`. The tautological fermion is `ιLeft`, whose +components are the left-handed generators of the potential algebra. -/ -/-- The multiplication of two left-handed generators, as a linear map on - `LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl`. -/ -def leftWedge : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl →ₗ[ℂ] potentialAlgebra := - TensorProduct.lift (((LinearMap.mul ℂ potentialAlgebra).comp ιLeft).compl₂ ιLeft) +/-- The representation of `SL(2,ℂ)` on the left-handed Weyl fermions of the theory. -/ +def repFermionLeft : Representation ℂ SL(2,ℂ) (LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) := + LeftHandedWeyl.rep.linHom rep -@[simp] -lemma leftWedge_tmul (ψ φ : LeftHandedWeyl) : leftWedge (ψ ⊗ₜ[ℂ] φ) = ιLeft ψ * ιLeft φ := rfl - -lemma rep_leftWedge (M : SL(2,ℂ)) (x : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl) : - rep M (leftWedge x) = - leftWedge (TensorProduct.map (LeftHandedWeyl.rep M) (LeftHandedWeyl.rep M) x) := by - induction x with - | zero => simp - | tmul ψ φ => simp - | add a b ha hb => simp [ha, hb] - -/-- The Lorentz invariant bilinear `ε_{αβ} ψ^α ψ^β` of a left-handed Weyl fermion, as an element - of the potential algebra. -/ -def leftBilinear : potentialAlgebra := leftWedge leftMetricVal - -/-- The bilinear `ε_{αβ} ψ^α ψ^β` is invariant under the action of `SL(2,ℂ)`. -/ -lemma rep_leftBilinear (M : SL(2,ℂ)) : rep M leftBilinear = leftBilinear := by - rw [leftBilinear, rep_leftWedge, leftMetricVal_rep] - -/-- In terms of the basis, the bilinear `ε_{αβ} ψ^α ψ^β` is `- 2 ψ^1 ψ^2`. It is non-zero - precisely because the generators anticommute. -/ -lemma leftBilinear_eq_smul : leftBilinear = +lemma repFermionLeft_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + repFermionLeft M ψ = (rep M) ∘ₗ ψ ∘ₗ LeftHandedWeyl.rep M⁻¹ := rfl + +/-- The tautological left-handed Weyl fermion, whose components are the left-handed generators + of the potential algebra, is invariant under `SL(2,ℂ)`. -/ +lemma repFermionLeft_ιLeft (M : SL(2,ℂ)) : repFermionLeft M ιLeft = ιLeft := by + refine LinearMap.ext fun ψ => ?_ + rw [repFermionLeft_apply] + simp only [LinearMap.comp_apply, rep_ιLeft, ← Module.End.mul_apply, ← map_mul, + mul_inv_cancel, map_one, Module.End.one_apply] + +/-! + +## H. The Majorana mass term + +The Majorana mass term of a left-handed Weyl fermion `ψ` is `m ε^{αβ} ψ_α ψ_β` plus its +conjugate. It is obtained by contracting the metric `ε` with two copies of `ψ` and multiplying +the resulting elements of the potential algebra. Since the components of `ψ` anticommute, the +bilinear does not vanish, and it is Lorentz invariant because the metric is. + +-/ + +/-- The bilinear `ε^{αβ} ψ_α φ_β` of two left-handed Weyl fermions, obtained by contracting the + metric `leftMetricVal` with `ψ` and `φ`, and multiplying the results in the potential + algebra. -/ +def leftBilinear (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : potentialAlgebra := + LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ψ φ leftMetricVal) + +lemma leftBilinear_eq (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + leftBilinear ψ φ = - (ψ (LeftHandedWeyl.basis 0) * φ (LeftHandedWeyl.basis 1)) + + ψ (LeftHandedWeyl.basis 1) * φ (LeftHandedWeyl.basis 0) := by + rw [leftBilinear, leftMetricVal_expand_tmul] + simp + +/-- Acting with `SL(2,ℂ)` on the potential algebra can be moved through the bilinear. -/ +lemma rep_leftBilinear (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + rep M (leftBilinear ψ φ) = leftBilinear ((rep M) ∘ₗ ψ) ((rep M) ∘ₗ φ) := by + simp [leftBilinear_eq, map_add, map_neg] + +/-- Acting with `SL(2,ℂ)` on the spinor index of both fermions leaves the bilinear unchanged, + since the metric `ε` is invariant. -/ +lemma leftBilinear_comp_rep (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + leftBilinear (ψ ∘ₗ LeftHandedWeyl.rep M) (φ ∘ₗ LeftHandedWeyl.rep M) = leftBilinear ψ φ := by + rw [leftBilinear, leftBilinear, TensorProduct.map_comp, LinearMap.comp_apply, leftMetricVal_rep] + +/-- The bilinear of two left-handed Weyl fermions transforms as a scalar of the potential + algebra under `SL(2,ℂ)`. -/ +lemma leftBilinear_repFermionLeft (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + leftBilinear (repFermionLeft M ψ) (repFermionLeft M φ) = rep M (leftBilinear ψ φ) := by + rw [repFermionLeft_apply, repFermionLeft_apply, ← rep_leftBilinear, leftBilinear_comp_rep] + +/-- In terms of the basis, the bilinear of the tautological fermion with itself is + `- 2 ψ^1 ψ^2`. It is non-zero precisely because the components of `ψ` anticommute. -/ +lemma leftBilinear_ιLeft_eq_smul : leftBilinear ιLeft ιLeft = (-2 : ℂ) • (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := by have h : ιLeft (LeftHandedWeyl.basis 1) * ιLeft (LeftHandedWeyl.basis 0) = - (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := ι_mul_ι_swap _ _ - rw [leftBilinear, leftMetricVal_expand_tmul, map_add, map_neg, leftWedge_tmul, leftWedge_tmul, h] + rw [leftBilinear_eq, h] module -/-- The bilinear `ε_{αβ} ψ^α ψ^β` is non-zero. For a commuting field the same expression would - vanish by the antisymmetry of `ε`. -/ -lemma leftBilinear_ne_zero : leftBilinear ≠ 0 := by +/-- The bilinear of the tautological fermion with itself is non-zero. For a commuting field the + same expression would vanish by the antisymmetry of `ε`. -/ +lemma leftBilinear_ιLeft_ne_zero : leftBilinear ιLeft ιLeft ≠ 0 := by /- The alternating form `(v, w) ↦ det ![v.1, w.1]` on the generators lifts to a linear - functional on the potential algebra which is non-zero on `leftBilinear`. -/ + functional on the potential algebra which is non-zero on the bilinear. -/ let form : (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin 2]→ₗ[ℂ] ℂ := Matrix.detRowAlternating.compLinearMap (LeftHandedWeyl.toFin2ℂEquiv.toLinearMap ∘ₗ LinearMap.fst ℂ LeftHandedWeyl RightHandedWeyl) @@ -568,24 +602,33 @@ lemma leftBilinear_ne_zero : leftBilinear ≠ 0 := by simp only [f, Function.update_self, form, AlternatingMap.compLinearMap_apply] show Matrix.det _ = 1 simp [Matrix.det_fin_two, LeftHandedWeyl.toFin2ℂFun, LeftHandedWeyl.basis_apply] - have hF : F leftBilinear = -2 := by - rw [leftBilinear_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] + have hF : F (leftBilinear ιLeft ιLeft) = -2 := by + rw [leftBilinear_ιLeft_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] intro h rw [h, map_zero] at hF norm_num at hF -/-- The Majorana mass term, of complex mass `m`, of a left-handed Weyl fermion. It is the sum of - the bilinear `m ε_{αβ} ψ^α ψ^β` and its conjugate. -/ -def majoranaMass (m : ℂ) : potentialAlgebra := m • leftBilinear + star (m • leftBilinear) +/-- The Majorana mass term, of complex mass `m`, of a left-handed Weyl fermion `ψ`. It is the sum + of the bilinear `m ε^{αβ} ψ_α ψ_β` and its conjugate. -/ +def majoranaMass (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : potentialAlgebra := + m • leftBilinear ψ ψ + star (m • leftBilinear ψ ψ) /-- The Majorana mass term is real, that is, it is fixed by the star operation. -/ -lemma star_majoranaMass (m : ℂ) : star (majoranaMass m) = majoranaMass m := by +lemma star_majoranaMass (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + star (majoranaMass m ψ) = majoranaMass m ψ := by rw [majoranaMass, star_add, star_star, add_comm] -/-- The Majorana mass term is invariant under the action of `SL(2,ℂ)`, that is, - it is Lorentz invariant. -/ -lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) : rep M (majoranaMass m) = majoranaMass m := by - rw [majoranaMass, map_add, rep_star, map_smul, rep_leftBilinear] +/-- The Majorana mass term is Lorentz invariant: transforming the fermion by `M` is the same as + transforming the resulting element of the potential algebra by `M`. -/ +lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : + majoranaMass m (repFermionLeft M ψ) = rep M (majoranaMass m ψ) := by + rw [majoranaMass, majoranaMass, leftBilinear_repFermionLeft, map_add, rep_star, map_smul] + +/-- The Majorana mass term of the tautological left-handed Weyl fermion is invariant under the + action of `SL(2,ℂ)` on the potential algebra. -/ +lemma rep_majoranaMass_ιLeft (M : SL(2,ℂ)) (m : ℂ) : + rep M (majoranaMass m ιLeft) = majoranaMass m ιLeft := by + rw [← rep_majoranaMass, repFermionLeft_ιLeft] end potentialAlgebra end From 9d7f6ec566fc66228f56e7a04fe9d120f55288e5 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 10 Jul 2026 15:27:56 +0100 Subject: [PATCH 15/48] More additions Co-Authored-By: Claude --- .../Fermions/Weyl/PotentialAlgebra.lean | 225 ++++++++++-------- 1 file changed, 132 insertions(+), 93 deletions(-) diff --git a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean index 65f3a0ea5..c6198c68e 100644 --- a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean +++ b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean @@ -23,9 +23,10 @@ together with its conjugate, the right-handed Weyl fermion `ψ̄^{\dot α}`. It operation, which conjugates the fermions and reverses the order of the generators, and an action of `SL(2,ℂ)`, the double cover of the Lorentz group. -A left-handed Weyl fermion of such a theory is a linear map -`LeftHandedWeyl →ₗ[ℂ] potentialAlgebra`. As an example we define the Majorana mass term of such a -fermion, and show that it is Lorentz invariant and fixed by the `Star` operation. +The components of the fermion field `ψ^α` are the Grassmann-odd generators of the potential +algebra itself, and a potential is an element of the algebra. As an example we define the +Majorana mass term of the left-handed fermion field, and show that it is Lorentz invariant and +fixed by the `Star` operation. ## ii. Key results @@ -33,7 +34,8 @@ fermion, and show that it is Lorentz invariant and fixed by the `Star` operation - `Fermion.potentialAlgebra` : the exterior algebra generated by `ψ^α` and `ψ̄^{\dot α}`. - `Fermion.potentialAlgebra.instStarRing` : the star operation on the potential algebra. - `Fermion.potentialAlgebra.rep` : the action of `SL(2,ℂ)` on the potential algebra. -- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of a left-handed Weyl fermion. +- `Fermion.potentialAlgebra.leftSelfContract` : the self contraction `ψψ` of the fermion field. +- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of the fermion field. - `Fermion.potentialAlgebra.rep_majoranaMass` : the Majorana mass term is Lorentz invariant. - `Fermion.potentialAlgebra.star_majoranaMass` : the Majorana mass term is real. @@ -48,10 +50,10 @@ fermion, and show that it is Lorentz invariant and fixed by the `Star` operation - D. The potential algebra - D.1. Basic instances on the potential algebra - D.2. The generators of the potential algebra + - D.3. The left- and right-handed field subspaces - E. The star operation on the potential algebra - F. The action of `SL(2,ℂ)` on the potential algebra -- G. Left-handed Weyl fermions of the theory -- H. The Majorana mass term +- G. Majorana masses ## iv. References @@ -345,6 +347,50 @@ lemma induction {C : potentialAlgebra → Prop} /-! +### D.3. The left- and right-handed field subspaces + +The elements of the potential algebra containing exactly one factor of a left-handed +generator `θ_α`, that is, the image of `ιLeft`, form a submodule canonically isomorphic to +`LeftHandedWeyl`. This subspace carries the two Grassmann-odd degrees of freedom of the +left-handed fermion field. Similarly for the right-handed field. + +-/ + +/-- The subspace of the potential algebra spanned by the left-handed generators `θ_α`. It + carries the two Grassmann-odd degrees of freedom of the left-handed fermion field. -/ +def leftFields : Submodule ℂ potentialAlgebra := LinearMap.range ιLeft + +/-- The subspace of the potential algebra spanned by the right-handed generators + `θ̄_{\dot α}`. It carries the two Grassmann-odd degrees of freedom of the right-handed + fermion field. -/ +def rightFields : Submodule ℂ potentialAlgebra := LinearMap.range ιRight + +lemma ιLeft_injective : Function.Injective ιLeft := + ExteriorAlgebra.ι_leftInverse.injective.comp LinearMap.inl_injective + +lemma ιRight_injective : Function.Injective ιRight := + ExteriorAlgebra.ι_leftInverse.injective.comp LinearMap.inr_injective + +/-- The linear equivalence between `LeftHandedWeyl` and the subspace of the potential algebra + carrying the degrees of freedom of the left-handed fermion field. -/ +def leftFieldsEquiv : LeftHandedWeyl ≃ₗ[ℂ] leftFields := + LinearEquiv.ofInjective ιLeft ιLeft_injective + +/-- The linear equivalence between `RightHandedWeyl` and the subspace of the potential algebra + carrying the degrees of freedom of the right-handed fermion field. -/ +def rightFieldsEquiv : RightHandedWeyl ≃ₗ[ℂ] rightFields := + LinearEquiv.ofInjective ιRight ιRight_injective + +/-- Members of the left-handed field subspace anticommute. -/ +lemma mul_swap_of_mem_leftFields {x y : potentialAlgebra} + (hx : x ∈ leftFields) (hy : y ∈ leftFields) : x * y = - (y * x) := by + obtain ⟨ψ, rfl⟩ := hx + obtain ⟨φ, rfl⟩ := hy + rw [ιLeft_apply, ιLeft_apply] + exact ι_mul_ι_swap _ _ + +/-! + ## E. The star operation on the potential algebra The star operation on the potential algebra conjugates the Weyl fermions, exchanging `ψ^α` and @@ -438,7 +484,8 @@ lemma star_ιLeft (ψ : LeftHandedWeyl) : star (ιLeft ψ) = ιRight (LeftHanded simp @[simp] -lemma star_ιRight (ψ : RightHandedWeyl) : star (ιRight ψ) = ιLeft (RightHandedWeyl.conjugate ψ) := by +lemma star_ιRight (ψ : RightHandedWeyl) : + star (ιRight ψ) = ιLeft (RightHandedWeyl.conjugate ψ) := by rw [ιRight_apply, star_ι, ιLeft_apply] simp @@ -493,6 +540,19 @@ lemma rep_ιLeft (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : rw [ιLeft_apply, rep_ι, ιLeft_apply] simp +/-- The star operation exchanges the left- and right-handed field subspaces. -/ +lemma star_mem_rightFields {x : potentialAlgebra} (hx : x ∈ leftFields) : + star x ∈ rightFields := by + obtain ⟨ψ, rfl⟩ := hx + exact ⟨LeftHandedWeyl.conjugate ψ, (star_ιLeft ψ).symm⟩ + +/-- The action of `SL(2,ℂ)` preserves the left-handed field subspace: the field transforms + into itself under the Lorentz group. -/ +lemma rep_mem_leftFields (M : SL(2,ℂ)) {x : potentialAlgebra} (hx : x ∈ leftFields) : + rep M x ∈ leftFields := by + obtain ⟨ψ, rfl⟩ := hx + exact ⟨LeftHandedWeyl.rep M ψ, (rep_ιLeft M ψ).symm⟩ + /-- The star operation on the potential algebra commutes with the action of `SL(2,ℂ)`. -/ lemma rep_star (M : SL(2,ℂ)) (x : potentialAlgebra) : rep M (star x) = star (rep M x) := by induction x using potentialAlgebra.induction with @@ -503,86 +563,73 @@ lemma rep_star (M : SL(2,ℂ)) (x : potentialAlgebra) : rep M (star x) = star (r /-! -## G. Left-handed Weyl fermions of the theory +## G. Majorana masses -A left-handed Weyl fermion of a theory whose potentials live in `potentialAlgebra` is a linear -map `ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra`, taking each spinor direction to a Grassmann-odd -element of the potential algebra. Such fermions carry the representation -`LeftHandedWeyl.rep.linHom rep` of `SL(2,ℂ)`. The tautological fermion is `ιLeft`, whose -components are the left-handed generators of the potential algebra. - --/ +In the potential-algebra formalism the components of the fermion field `ψ^α` are the +Grassmann-odd generators `ιLeft (LeftHandedWeyl.basis α)` of the potential algebra itself. +A potential is a function of the field, that is, an element of the algebra; it does not take +a value of the field as an argument. Indeed, the contraction of the metric with two copies of +a commuting (c-number) spinor vanishes identically, since `ε` is antisymmetric while products +of commuting components are symmetric. -/-- The representation of `SL(2,ℂ)` on the left-handed Weyl fermions of the theory. -/ -def repFermionLeft : Representation ℂ SL(2,ℂ) (LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) := - LeftHandedWeyl.rep.linHom rep +The self contraction `ψψ = ε_{αβ} ψ^α ψ^β` of the fermion field is obtained by contracting +the metric with two copies of the field and multiplying the results in the potential algebra. +It is non-zero precisely because the components of the field anticommute, and it is invariant +under `SL(2,ℂ)` because the metric is. -lemma repFermionLeft_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - repFermionLeft M ψ = (rep M) ∘ₗ ψ ∘ₗ LeftHandedWeyl.rep M⁻¹ := rfl - -/-- The tautological left-handed Weyl fermion, whose components are the left-handed generators - of the potential algebra, is invariant under `SL(2,ℂ)`. -/ -lemma repFermionLeft_ιLeft (M : SL(2,ℂ)) : repFermionLeft M ιLeft = ιLeft := by - refine LinearMap.ext fun ψ => ?_ - rw [repFermionLeft_apply] - simp only [LinearMap.comp_apply, rep_ιLeft, ← Module.End.mul_apply, ← map_mul, - mul_inv_cancel, map_one, Module.End.one_apply] - -/-! - -## H. The Majorana mass term - -The Majorana mass term of a left-handed Weyl fermion `ψ` is `m ε^{αβ} ψ_α ψ_β` plus its -conjugate. It is obtained by contracting the metric `ε` with two copies of `ψ` and multiplying -the resulting elements of the potential algebra. Since the components of `ψ` anticommute, the -bilinear does not vanish, and it is Lorentz invariant because the metric is. +The Majorana mass term of mass `m` is `m ψψ` together with its conjugate, which makes it real. -/ -/-- The bilinear `ε^{αβ} ψ_α φ_β` of two left-handed Weyl fermions, obtained by contracting the - metric `leftMetricVal` with `ψ` and `φ`, and multiplying the results in the potential - algebra. -/ -def leftBilinear (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : potentialAlgebra := - LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ψ φ leftMetricVal) - -lemma leftBilinear_eq (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - leftBilinear ψ φ = - (ψ (LeftHandedWeyl.basis 0) * φ (LeftHandedWeyl.basis 1)) - + ψ (LeftHandedWeyl.basis 1) * φ (LeftHandedWeyl.basis 0) := by - rw [leftBilinear, leftMetricVal_expand_tmul] - simp - -/-- Acting with `SL(2,ℂ)` on the potential algebra can be moved through the bilinear. -/ -lemma rep_leftBilinear (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - rep M (leftBilinear ψ φ) = leftBilinear ((rep M) ∘ₗ ψ) ((rep M) ∘ₗ φ) := by - simp [leftBilinear_eq, map_add, map_neg] - -/-- Acting with `SL(2,ℂ)` on the spinor index of both fermions leaves the bilinear unchanged, - since the metric `ε` is invariant. -/ -lemma leftBilinear_comp_rep (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - leftBilinear (ψ ∘ₗ LeftHandedWeyl.rep M) (φ ∘ₗ LeftHandedWeyl.rep M) = leftBilinear ψ φ := by - rw [leftBilinear, leftBilinear, TensorProduct.map_comp, LinearMap.comp_apply, leftMetricVal_rep] - -/-- The bilinear of two left-handed Weyl fermions transforms as a scalar of the potential - algebra under `SL(2,ℂ)`. -/ -lemma leftBilinear_repFermionLeft (M : SL(2,ℂ)) (ψ φ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - leftBilinear (repFermionLeft M ψ) (repFermionLeft M φ) = rep M (leftBilinear ψ φ) := by - rw [repFermionLeft_apply, repFermionLeft_apply, ← rep_leftBilinear, leftBilinear_comp_rep] - -/-- In terms of the basis, the bilinear of the tautological fermion with itself is - `- 2 ψ^1 ψ^2`. It is non-zero precisely because the components of `ψ` anticommute. -/ -lemma leftBilinear_ιLeft_eq_smul : leftBilinear ιLeft ιLeft = +/-- The contraction of the metric with two copies of a commuting spinor vanishes: a Majorana + mass cannot be built from a c-number left-handed Weyl fermion. -/ +lemma metricRaw_contract_comm_eq_zero (ψ : LeftHandedWeyl) : + ∑ α, ∑ β, metricRaw α β * ψ.val α * ψ.val β = 0 := by + simp only [metricRaw, Fin.sum_univ_two, of_apply, cons_val', cons_val_zero, cons_val_one, + empty_val', cons_val_fin_one] + ring + +/-- The self contraction `ψψ = ε_{αβ} ψ^α ψ^β` of the left-handed fermion field, obtained by + contracting the metric `leftMetricVal` with two copies of the field `ιLeft`, and multiplying + the resulting elements of the potential algebra. -/ +def leftSelfContract : potentialAlgebra := + LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft leftMetricVal) + +/-- The self contraction expanded as a sum over components of the metric. -/ +lemma leftSelfContract_eq_sum : leftSelfContract = + ∑ α, ∑ β, (- metricRaw α β) • + (ιLeft (LeftHandedWeyl.basis α) * ιLeft (LeftHandedWeyl.basis β)) := by + rw [leftSelfContract, leftMetricVal_expand_tmul] + simp [metricRaw, Fin.sum_univ_two] + +/-- The self contraction of the left-handed fermion field is invariant under the action of + `SL(2,ℂ)`, that is, it is Lorentz invariant. -/ +lemma rep_leftSelfContract (M : SL(2,ℂ)) : rep M leftSelfContract = leftSelfContract := by + have h (x : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl) : + rep M (LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft x)) = + LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft + (TensorProduct.map (LeftHandedWeyl.rep M) (LeftHandedWeyl.rep M) x)) := by + induction x with + | zero => simp + | tmul ψ φ => simp + | add a b ha hb => simp [ha, hb] + rw [leftSelfContract, h, leftMetricVal_rep] + +/-- In terms of the basis, the self contraction of the fermion field is `- 2 ψ^1 ψ^2`. -/ +lemma leftSelfContract_eq_smul : leftSelfContract = (-2 : ℂ) • (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := by have h : ιLeft (LeftHandedWeyl.basis 1) * ιLeft (LeftHandedWeyl.basis 0) = - (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := ι_mul_ι_swap _ _ - rw [leftBilinear_eq, h] + rw [leftSelfContract, leftMetricVal_expand_tmul] + simp only [map_add, map_neg, TensorProduct.map_tmul, LinearMap.mul'_apply, h] module -/-- The bilinear of the tautological fermion with itself is non-zero. For a commuting field the - same expression would vanish by the antisymmetry of `ε`. -/ -lemma leftBilinear_ιLeft_ne_zero : leftBilinear ιLeft ιLeft ≠ 0 := by +/-- The self contraction of the fermion field is non-zero. It would vanish if the components + of the field commuted, by the antisymmetry of `ε`. -/ +lemma leftSelfContract_ne_zero : leftSelfContract ≠ 0 := by /- The alternating form `(v, w) ↦ det ![v.1, w.1]` on the generators lifts to a linear - functional on the potential algebra which is non-zero on the bilinear. -/ + functional on the potential algebra which is non-zero on the self contraction. -/ let form : (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin 2]→ₗ[ℂ] ℂ := Matrix.detRowAlternating.compLinearMap (LeftHandedWeyl.toFin2ℂEquiv.toLinearMap ∘ₗ LinearMap.fst ℂ LeftHandedWeyl RightHandedWeyl) @@ -602,33 +649,25 @@ lemma leftBilinear_ιLeft_ne_zero : leftBilinear ιLeft ιLeft ≠ 0 := by simp only [f, Function.update_self, form, AlternatingMap.compLinearMap_apply] show Matrix.det _ = 1 simp [Matrix.det_fin_two, LeftHandedWeyl.toFin2ℂFun, LeftHandedWeyl.basis_apply] - have hF : F (leftBilinear ιLeft ιLeft) = -2 := by - rw [leftBilinear_ιLeft_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] + have hF : F leftSelfContract = -2 := by + rw [leftSelfContract_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] intro h rw [h, map_zero] at hF norm_num at hF -/-- The Majorana mass term, of complex mass `m`, of a left-handed Weyl fermion `ψ`. It is the sum - of the bilinear `m ε^{αβ} ψ_α ψ_β` and its conjugate. -/ -def majoranaMass (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : potentialAlgebra := - m • leftBilinear ψ ψ + star (m • leftBilinear ψ ψ) +/-- The Majorana mass term, of complex mass `m`, of the left-handed fermion field. It is the + sum of the self contraction `m ψψ` and its conjugate. -/ +def majoranaMass (m : ℂ) : potentialAlgebra := + m • leftSelfContract + star (m • leftSelfContract) /-- The Majorana mass term is real, that is, it is fixed by the star operation. -/ -lemma star_majoranaMass (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - star (majoranaMass m ψ) = majoranaMass m ψ := by +lemma star_majoranaMass (m : ℂ) : star (majoranaMass m) = majoranaMass m := by rw [majoranaMass, star_add, star_star, add_comm] -/-- The Majorana mass term is Lorentz invariant: transforming the fermion by `M` is the same as - transforming the resulting element of the potential algebra by `M`. -/ -lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) (ψ : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra) : - majoranaMass m (repFermionLeft M ψ) = rep M (majoranaMass m ψ) := by - rw [majoranaMass, majoranaMass, leftBilinear_repFermionLeft, map_add, rep_star, map_smul] - -/-- The Majorana mass term of the tautological left-handed Weyl fermion is invariant under the - action of `SL(2,ℂ)` on the potential algebra. -/ -lemma rep_majoranaMass_ιLeft (M : SL(2,ℂ)) (m : ℂ) : - rep M (majoranaMass m ιLeft) = majoranaMass m ιLeft := by - rw [← rep_majoranaMass, repFermionLeft_ιLeft] +/-- The Majorana mass term is invariant under the action of `SL(2,ℂ)`, that is, + it is Lorentz invariant. -/ +lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) : rep M (majoranaMass m) = majoranaMass m := by + rw [majoranaMass, map_add, rep_star, map_smul, rep_leftSelfContract] end potentialAlgebra end From 2c20b5d7472448e6299a5030a7ef613eba45e850 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:58:09 +0100 Subject: [PATCH 16/48] feat: Major rewrite of the file (human driven) Co-Authored-By: Claude --- .../Fermions/Weyl/PotentialAlgebra.lean | 837 ++++++------------ 1 file changed, 250 insertions(+), 587 deletions(-) diff --git a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean index c6198c68e..04f2085b3 100644 --- a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean +++ b/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean @@ -8,57 +8,35 @@ module public import Physlib.Relativity.Fermions.Weyl.Metric public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic -public import Mathlib.LinearAlgebra.ExteriorAlgebra.OfAlternating +public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis /-! # The potential algebra of Weyl fermions ## i. Overview -Fermions anticommute. Thus a potential built out of a Weyl fermion is not a polynomial in the -components of that fermion, but an element of the exterior (Grassmann) algebra generated by them. - -The `potentialAlgebra` is the exterior algebra generated by a left-handed Weyl fermion `ψ^α` -together with its conjugate, the right-handed Weyl fermion `ψ̄^{\dot α}`. It carries a `Star` -operation, which conjugates the fermions and reverses the order of the generators, and an action -of `SL(2,ℂ)`, the double cover of the Lorentz group. - -The components of the fermion field `ψ^α` are the Grassmann-odd generators of the potential -algebra itself, and a potential is an element of the algebra. As an example we define the -Majorana mass term of the left-handed fermion field, and show that it is Lorentz invariant and -fixed by the `Star` operation. - -## ii. Key results - -- `Fermion.LeftHandedWeyl.conjugate` : the conjugate of a left-handed Weyl fermion. -- `Fermion.potentialAlgebra` : the exterior algebra generated by `ψ^α` and `ψ̄^{\dot α}`. -- `Fermion.potentialAlgebra.instStarRing` : the star operation on the potential algebra. -- `Fermion.potentialAlgebra.rep` : the action of `SL(2,ℂ)` on the potential algebra. -- `Fermion.potentialAlgebra.leftSelfContract` : the self contraction `ψψ` of the fermion field. -- `Fermion.potentialAlgebra.majoranaMass` : the Majorana mass term of the fermion field. -- `Fermion.potentialAlgebra.rep_majoranaMass` : the Majorana mass term is Lorentz invariant. -- `Fermion.potentialAlgebra.star_majoranaMass` : the Majorana mass term is real. - -## iii. Table of contents - -- A. Conjugation of Weyl fermions - - A.1. The conjugate of a right-handed Weyl fermion - - A.2. The conjugate of a left-handed Weyl fermion - - A.3. Conjugation of the Weyl fermion generators -- B. The action of `SL(2,ℂ)` on the Weyl fermion generators -- C. The conjugate of a `ℂ`-algebra -- D. The potential algebra - - D.1. Basic instances on the potential algebra - - D.2. The generators of the potential algebra - - D.3. The left- and right-handed field subspaces -- E. The star operation on the potential algebra -- F. The action of `SL(2,ℂ)` on the potential algebra -- G. Majorana masses - -## iv. References - -- Dreiner, Haber and Martin, *Two-component spinor techniques and Feynman rules for quantum field - theory and supersymmetry*, https://arxiv.org/abs/0812.1594 +In this file are primary objective is to look at the potential +of a single left-handed Weyl fermion, correctly taking account +of the anti-commuting nature of the fermion. + +Two facts about the potential, which we take as a given, are that: +1. It is written in terms of the components of the left-handed Weyl fermion and its conjugate. +2. Within the potential the components anti-commute. +The first of these, tells us that we should be working with the dual of the left-handed Weyl fermion +and its conjugate (since the duals are the linear functionals which pick +out the components of the fermion). The second of these tells us that we should be working with an +exterior algebra. + +Thus, the type in which the potential lives is +`ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We call this type +`PotentialAlgebra` and define it and its properties in this file. + +On `PotentialAlgebra` we define a representation of the Lorentz group, and prove that that +if the potential is invariant under the Lorentz group it must be of the form +`c + m1 * ψ 0 * ψ 1 + m2 * barψ 0 * barψ 1 + λ * ψ 0 * ψ 1 * barψ 0 * barψ 1`, +which is true to all orders. + +There is as of yet no reality condition on this potential. This is a TODO. -/ @@ -75,600 +53,285 @@ open CategoryTheory.MonoidalCategory /-! -## A. Conjugation of Weyl fermions - -Complex conjugation of the components of a Weyl fermion exchanges left- and right-handed -Weyl fermions. It is a conjugate-linear map, that is, a semilinear map with respect to -`starRingEnd ℂ`. - --/ - -/-! - -### A.1. The conjugate of a right-handed Weyl fermion - --/ - -namespace RightHandedWeyl - -/-- The conjugate `ψ̄^α` of a right-handed Weyl fermion `ψ^{\dot α}`, defined by complex - conjugating each component. It is a left-handed Weyl fermion. -/ -def conjugate : RightHandedWeyl →ₛₗ[starRingEnd ℂ] LeftHandedWeyl where - toFun ψ := ⟨fun i => star (ψ.val i)⟩ - map_add' ψ1 ψ2 := by - apply LeftHandedWeyl.toFin2ℂFun.injective - funext i - exact star_add _ _ - map_smul' c ψ := by - apply LeftHandedWeyl.toFin2ℂFun.injective - funext i - exact star_mul' c (ψ.val i) - -@[simp] -lemma conjugate_val (ψ : RightHandedWeyl) (i : Fin 2) : (conjugate ψ).val i = star (ψ.val i) := rfl - -/-- Conjugation intertwines the representation of `SL(2,ℂ)` on right-handed Weyl fermions with - the representation on left-handed Weyl fermions. -/ -lemma conjugate_rep (M : SL(2,ℂ)) (ψ : RightHandedWeyl) : - conjugate (rep M ψ) = LeftHandedWeyl.rep M (conjugate ψ) := by - apply LeftHandedWeyl.toFin2ℂFun.injective - funext i - change star ((M.1.map star *ᵥ ψ.val) i) = (M.1 *ᵥ fun j => star (ψ.val j)) i - simp [mulVec, dotProduct, star_mul'] - -end RightHandedWeyl - -/-! - -### A.2. The conjugate of a left-handed Weyl fermion - --/ - -namespace LeftHandedWeyl - -/-- The conjugate `ψ̄^{\dot α}` of a left-handed Weyl fermion `ψ^α`, defined by complex - conjugating each component. It is a right-handed Weyl fermion. -/ -def conjugate : LeftHandedWeyl →ₛₗ[starRingEnd ℂ] RightHandedWeyl where - toFun ψ := ⟨fun i => star (ψ.val i)⟩ - map_add' ψ1 ψ2 := by - apply RightHandedWeyl.toFin2ℂFun.injective - funext i - exact star_add _ _ - map_smul' c ψ := by - apply RightHandedWeyl.toFin2ℂFun.injective - funext i - exact star_mul' c (ψ.val i) - -@[simp] -lemma conjugate_val (ψ : LeftHandedWeyl) (i : Fin 2) : (conjugate ψ).val i = star (ψ.val i) := rfl - -@[simp] -lemma conjugate_conjugate (ψ : LeftHandedWeyl) : - RightHandedWeyl.conjugate (conjugate ψ) = ψ := by - apply toFin2ℂFun.injective - funext i - exact star_star (ψ.val i) - -/-- Conjugation intertwines the representation of `SL(2,ℂ)` on left-handed Weyl fermions with - the representation on right-handed Weyl fermions. -/ -lemma conjugate_rep (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : - conjugate (rep M ψ) = RightHandedWeyl.rep M (conjugate ψ) := by - apply RightHandedWeyl.toFin2ℂFun.injective - funext i - change star ((M.1 *ᵥ ψ.val) i) = (M.1.map star *ᵥ fun j => star (ψ.val j)) i - simp [mulVec, dotProduct, star_mul'] - -end LeftHandedWeyl - -@[simp] -lemma RightHandedWeyl.conjugate_conjugate (ψ : RightHandedWeyl) : - LeftHandedWeyl.conjugate (conjugate ψ) = ψ := by - apply toFin2ℂFun.injective - funext i - exact star_star (ψ.val i) - -/-! - -### A.3. Conjugation of the Weyl fermion generators - -The generators of the potential algebra of a left-handed Weyl fermion `ψ^α` are the components -of `ψ^α` together with the components of its conjugate `ψ̄^{\dot α}`. They therefore live in -`LeftHandedWeyl × RightHandedWeyl`, on which conjugation acts by exchanging the two factors. - --/ - -/-- Conjugation of the pair `(ψ^α, ψ̄^{\dot α})` of Weyl fermion generators, exchanging the - left-handed and the right-handed fermion. -/ -def conjugateFields : - LeftHandedWeyl × RightHandedWeyl →ₛₗ[starRingEnd ℂ] LeftHandedWeyl × RightHandedWeyl where - toFun ψ := (RightHandedWeyl.conjugate ψ.2, LeftHandedWeyl.conjugate ψ.1) - map_add' ψ φ := by simp - map_smul' c ψ := by simp - -@[simp] -lemma conjugateFields_apply (ψ : LeftHandedWeyl × RightHandedWeyl) : - conjugateFields ψ = (RightHandedWeyl.conjugate ψ.2, LeftHandedWeyl.conjugate ψ.1) := rfl - -@[simp] -lemma conjugateFields_conjugateFields (ψ : LeftHandedWeyl × RightHandedWeyl) : - conjugateFields (conjugateFields ψ) = ψ := by - simp - -/-! - -## B. The action of `SL(2,ℂ)` on the Weyl fermion generators +## A. The Potential algebra for Weyl fermions -/ -/-- The representation of `SL(2,ℂ)` on the Weyl fermion generators `(ψ^α, ψ̄^{\dot α})`, - acting by the fundamental representation on the left-handed fermion and by the conjugate - representation on the right-handed fermion. -/ -def repFields : Representation ℂ SL(2,ℂ) (LeftHandedWeyl × RightHandedWeyl) where - toFun M := (LeftHandedWeyl.rep M).prodMap (RightHandedWeyl.rep M) - map_one' := by - refine LinearMap.ext fun ψ => ?_ - simp - map_mul' M N := by - refine LinearMap.ext fun ψ => ?_ - simp [Module.End.mul_apply] - -@[simp] -lemma repFields_apply (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : - repFields M ψ = (LeftHandedWeyl.rep M ψ.1, RightHandedWeyl.rep M ψ.2) := rfl +abbrev PotentialAlgebra : Type := ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl) -/-- Conjugation of the Weyl fermion generators commutes with the action of `SL(2,ℂ)`. -/ -lemma conjugateFields_repFields (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : - conjugateFields (repFields M ψ) = repFields M (conjugateFields ψ) := by - simp [RightHandedWeyl.conjugate_rep, LeftHandedWeyl.conjugate_rep] +namespace PotentialAlgebra /-! -## C. The conjugate of a `ℂ`-algebra - -To define a conjugate-linear algebra map out of an exterior algebra we use its universal property, -which produces `ℂ`-algebra maps. A conjugate-linear algebra map `A → A` is precisely a -`ℂ`-algebra map `A →ₐ[ℂ] ConjAlg A`, where `ConjAlg A` is `A` with the `ℂ`-action twisted by -complex conjugation. +### A.1. The coordinate elements of the potential algebra -/ -TODO "The construction `ConjAlg` of the conjugate of a `ℂ`-algebra is not specific to fermions. - It should be generalised to an arbitrary star ring of scalars and moved to a mathematics file." - -/-- The `ℂ`-algebra `A` with its `ℂ`-algebra structure twisted by complex conjugation. - A conjugate-linear algebra map `A → A` is the same thing as a `ℂ`-algebra map - `A →ₐ[ℂ] ConjAlg A`. -/ -def ConjAlg (A : Type) : Type := A +/-- The coordinate element corresponding to the i-th basis vector as a member + of the potential algebra. -/ +def ψ (i : Fin 2) : PotentialAlgebra := + (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (DualLeftHandedWeyl.basis i)) -namespace ConjAlg +/-- The coordinate element corresponding to the conjugate i-th basis vector as a member + of the potential algebra. -/ +def barψ (i : Fin 2) : PotentialAlgebra := + (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (DualRightHandedWeyl.basis i)) -variable {A : Type} +@[simp] lemma ψ_mul_self (i : Fin 2) : ψ i * ψ i = 0 := ExteriorAlgebra.ι_sq_zero _ -/-- The identity map from a `ℂ`-algebra to its conjugate. -/ -def of (x : A) : ConjAlg A := x +@[simp] lemma ψ_one_mul_ψ_zero_swap : ψ 1 * ψ 0 = - ψ 0 * ψ 1 := by + rw [neg_mul, eq_neg_iff_add_eq_zero] + exact ExteriorAlgebra.ι_add_mul_swap _ _ -/-- The identity map from the conjugate of a `ℂ`-algebra back to that algebra. -/ -def val (x : ConjAlg A) : A := x +@[simp] lemma barψ_mul_self (i : Fin 2) : barψ i * barψ i = 0 := ExteriorAlgebra.ι_sq_zero _ -@[simp] -lemma val_of (x : A) : val (of x) = x := rfl +@[simp] lemma barψ_one_mul_barψ_zero_swap : barψ 1 * barψ 0 = - barψ 0 * barψ 1 := by + rw [neg_mul, eq_neg_iff_add_eq_zero] + exact ExteriorAlgebra.ι_add_mul_swap _ _ -variable [Ring A] - -instance : Ring (ConjAlg A) := inferInstanceAs (Ring A) - -@[simp] -lemma val_add (x y : ConjAlg A) : val (x + y) = val x + val y := rfl - -@[simp] -lemma val_mul (x y : ConjAlg A) : val (x * y) = val x * val y := rfl - -variable [Algebra ℂ A] - -instance : Algebra ℂ (ConjAlg A) := - RingHom.toAlgebra' ((algebraMap ℂ A).comp (starRingEnd ℂ) : ℂ →+* ConjAlg A) - fun c x => Algebra.commutes ((starRingEnd ℂ) c) (val x) - -@[simp] -lemma val_algebraMap (c : ℂ) : - val (algebraMap ℂ (ConjAlg A) c) = algebraMap ℂ A ((starRingEnd ℂ) c) := rfl - -lemma smul_of (c : ℂ) (x : A) : c • of x = of ((starRingEnd ℂ) c • x) := by - rw [Algebra.smul_def, Algebra.smul_def] - rfl - -end ConjAlg - -/-! - -## D. The potential algebra - --/ - -/-- The potential algebra of a left-handed Weyl fermion `ψ^α`: the exterior (Grassmann) algebra - generated by the components of `ψ^α` and of its conjugate `ψ̄^{\dot α}`. - The potential of a theory of a single Weyl fermion is an element of this algebra. -/ -def potentialAlgebra : Type := ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl) - -namespace potentialAlgebra /-! -### D.1. Basic instances on the potential algebra +### A.2. Basis -/ -instance : Ring potentialAlgebra := - inferInstanceAs (Ring (ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl))) -instance : Algebra ℂ potentialAlgebra := - inferInstanceAs (Algebra ℂ (ExteriorAlgebra ℂ (LeftHandedWeyl × RightHandedWeyl))) +/-- The basis of the potential algebra. -/ +def basis : Basis (Finset (Fin 4)) ℂ PotentialAlgebra := + Module.Basis.ExteriorAlgebra ((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex + finSumFinEquiv) /-! -### D.2. The generators of the potential algebra +## A.3. The representation on the potential algebra -/ -/-- The inclusion of the Weyl fermion generators `(ψ^α, ψ̄^{\dot α})` into the potential - algebra. -/ -def ι : LeftHandedWeyl × RightHandedWeyl →ₗ[ℂ] potentialAlgebra := ExteriorAlgebra.ι ℂ - -lemma ι_sq_zero (ψ : LeftHandedWeyl × RightHandedWeyl) : ι ψ * ι ψ = 0 := - ExteriorAlgebra.ι_sq_zero ψ - -/-- The generators of the potential algebra anticommute, corresponding to the fact that - fermions anticommute. -/ -lemma ι_mul_ι_swap (ψ φ : LeftHandedWeyl × RightHandedWeyl) : ι ψ * ι φ = - (ι φ * ι ψ) := by - have h := CliffordAlgebra.ι_mul_ι_add_swap - (Q := (0 : QuadraticForm ℂ (LeftHandedWeyl × RightHandedWeyl))) ψ φ - simp only [QuadraticMap.polar, QuadraticMap.zero_apply, sub_zero, map_zero] at h - exact eq_neg_of_add_eq_zero_left h - -/-- The generators of the potential algebra coming from the left-handed Weyl fermion `ψ^α`. -/ -def ιLeft : LeftHandedWeyl →ₗ[ℂ] potentialAlgebra := ι ∘ₗ LinearMap.inl ℂ _ _ - -/-- The generators of the potential algebra coming from the right-handed Weyl - fermion `ψ̄^{\dot α}`. -/ -def ιRight : RightHandedWeyl →ₗ[ℂ] potentialAlgebra := ι ∘ₗ LinearMap.inr ℂ _ _ - -lemma ιLeft_apply (ψ : LeftHandedWeyl) : ιLeft ψ = ι (ψ, 0) := rfl - -lemma ιRight_apply (ψ : RightHandedWeyl) : ιRight ψ = ι (0, ψ) := rfl - -/-- The potential algebra is generated, as an algebra, by the image of `ι`. -/ -@[elab_as_elim] -lemma induction {C : potentialAlgebra → Prop} - (algebraMap : ∀ c : ℂ, C (algebraMap ℂ potentialAlgebra c)) - (ι : ∀ ψ, C (potentialAlgebra.ι ψ)) - (mul : ∀ a b, C a → C b → C (a * b)) - (add : ∀ a b, C a → C b → C (a + b)) (x : potentialAlgebra) : C x := - ExteriorAlgebra.induction algebraMap ι mul add x +/-- The representation of the Lorentz group on `PotentialAlgebra`. -/ +def rep : Representation ℂ SL(2, ℂ) PotentialAlgebra where + toFun Λ := (ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap + (DualRightHandedWeyl.rep Λ))).toLinearMap + map_one' := by + simp only [map_one, End.one_eq_id, LinearMap.prodMap_id, ExteriorAlgebra.map_id, + AlgHom.toLinearMap_id] + map_mul' Λ1 Λ2 := by + simp only [map_mul, End.mul_eq_comp, ← LinearMap.prodMap_comp, ← ExteriorAlgebra.map_comp_map, + AlgHom.comp_toLinearMap] + +lemma rep_apply (Λ : SL(2, ℂ)) (V : PotentialAlgebra) : + rep Λ V = ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap + (DualRightHandedWeyl.rep Λ)) V := rfl + +lemma rep_mul (Λ : SL(2, ℂ)) (V W : PotentialAlgebra) : + rep Λ (V * W) = rep Λ V * rep Λ W:= by + simp [rep] + +lemma rep_apply_ψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : + rep Λ (ψ i) = ∑ j, Λ⁻¹ i j • ψ j := by + simp [rep, ψ, DualLeftHandedWeyl.rep_apply_basis, ← map_smul, ← map_add, + -SpecialLinearGroup.coe_inv, Lorentz.SL2C.inverse_coe] + +lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : + rep Λ (barψ i) = ∑ j, star (Λ⁻¹ i j) • barψ j := by + simp [rep, barψ, DualRightHandedWeyl.rep_apply_basis, ← map_smul, ← map_add, + -SpecialLinearGroup.coe_inv, Lorentz.SL2C.inverse_coe] /-! -### D.3. The left- and right-handed field subspaces - -The elements of the potential algebra containing exactly one factor of a left-handed -generator `θ_α`, that is, the image of `ιLeft`, form a submodule canonically isomorphic to -`LeftHandedWeyl`. This subspace carries the two Grassmann-odd degrees of freedom of the -left-handed fermion field. Similarly for the right-handed field. +## B. Invariance under the Lorentz group -/ -/-- The subspace of the potential algebra spanned by the left-handed generators `θ_α`. It - carries the two Grassmann-odd degrees of freedom of the left-handed fermion field. -/ -def leftFields : Submodule ℂ potentialAlgebra := LinearMap.range ιLeft - -/-- The subspace of the potential algebra spanned by the right-handed generators - `θ̄_{\dot α}`. It carries the two Grassmann-odd degrees of freedom of the right-handed - fermion field. -/ -def rightFields : Submodule ℂ potentialAlgebra := LinearMap.range ιRight - -lemma ιLeft_injective : Function.Injective ιLeft := - ExteriorAlgebra.ι_leftInverse.injective.comp LinearMap.inl_injective - -lemma ιRight_injective : Function.Injective ιRight := - ExteriorAlgebra.ι_leftInverse.injective.comp LinearMap.inr_injective -/-- The linear equivalence between `LeftHandedWeyl` and the subspace of the potential algebra - carrying the degrees of freedom of the left-handed fermion field. -/ -def leftFieldsEquiv : LeftHandedWeyl ≃ₗ[ℂ] leftFields := - LinearEquiv.ofInjective ιLeft ιLeft_injective +def IsInvariant (V : PotentialAlgebra) : Prop := ∀ Λ, rep Λ V = V -/-- The linear equivalence between `RightHandedWeyl` and the subspace of the potential algebra - carrying the degrees of freedom of the right-handed fermion field. -/ -def rightFieldsEquiv : RightHandedWeyl ≃ₗ[ℂ] rightFields := - LinearEquiv.ofInjective ιRight ιRight_injective +lemma IsInvariant.eq_iff {V : PotentialAlgebra} : + IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl -/-- Members of the left-handed field subspace anticommute. -/ -lemma mul_swap_of_mem_leftFields {x y : potentialAlgebra} - (hx : x ∈ leftFields) (hy : y ∈ leftFields) : x * y = - (y * x) := by - obtain ⟨ψ, rfl⟩ := hx - obtain ⟨φ, rfl⟩ := hy - rw [ιLeft_apply, ιLeft_apply] - exact ι_mul_ι_swap _ _ +lemma IsInvariant.add {V W : PotentialAlgebra} (hV : IsInvariant V) (hW : IsInvariant W) : + IsInvariant (V + W) := by + intro Λ + simp_all [IsInvariant.eq_iff] -/-! - -## E. The star operation on the potential algebra +lemma IsInvariant.smul {V : PotentialAlgebra} (hV : IsInvariant V) (c : ℂ) : + IsInvariant (c • V) := by + intro Λ + simp_all [IsInvariant.eq_iff] -The star operation on the potential algebra conjugates the Weyl fermions, exchanging `ψ^α` and -`ψ̄^{\dot α}`, and reverses the order of the Grassmann generators. The reversal is -`CliffordAlgebra.reverse`, and makes the star operation into an anti-automorphism. +lemma IsInvariant.mul {V W : PotentialAlgebra} (hV : IsInvariant V) (hW : IsInvariant W) : + IsInvariant (V * W) := by + intro Λ + simp_all [IsInvariant.eq_iff, rep_mul] --/ - -/-- Reversal of the order of the Grassmann generators in the potential algebra. -/ -def reverse : potentialAlgebra →ₗ[ℂ] potentialAlgebra := CliffordAlgebra.reverse - -@[simp] -lemma reverse_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : reverse (ι ψ) = ι ψ := - CliffordAlgebra.reverse_ι ψ - -@[simp] -lemma reverse_algebraMap (c : ℂ) : - reverse (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra c := - CliffordAlgebra.reverse.commutes c - -@[simp] -lemma reverse_mul (x y : potentialAlgebra) : reverse (x * y) = reverse y * reverse x := - CliffordAlgebra.reverse.map_mul x y - -/-- Conjugation of the Weyl fermions, as a `ℂ`-algebra map from the potential algebra to its - conjugate algebra. Equivalently, a conjugate-linear algebra map on the potential algebra. -/ -def conjHom : potentialAlgebra →ₐ[ℂ] ConjAlg potentialAlgebra := - ExteriorAlgebra.lift ℂ ⟨{ - toFun := fun ψ => ConjAlg.of (ι (conjugateFields ψ)) - map_add' := fun ψ φ => by - rw [map_add, map_add] - rfl - map_smul' := fun c ψ => by - rw [map_smulₛₗ, map_smul, RingHom.id_apply, ConjAlg.smul_of] }, - fun ψ => ι_sq_zero _⟩ - -@[simp] -lemma conjHom_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : - conjHom (ι ψ) = ConjAlg.of (ι (conjugateFields ψ)) := - ExteriorAlgebra.lift_ι_apply _ _ _ ψ - -/-- The conjugation of an element of the potential algebra: conjugate the Weyl fermions and - reverse the order of the Grassmann generators. -/ -def conjugate (x : potentialAlgebra) : potentialAlgebra := reverse (ConjAlg.val (conjHom x)) - -lemma conjugate_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : - conjugate (ι ψ) = ι (conjugateFields ψ) := by - show reverse (ConjAlg.val (conjHom (ι ψ))) = _ - rw [conjHom_ι, ConjAlg.val_of, reverse_ι] - -lemma conjugate_algebraMap (c : ℂ) : - conjugate (algebraMap ℂ potentialAlgebra c) = - algebraMap ℂ potentialAlgebra ((starRingEnd ℂ) c) := by - show reverse (ConjAlg.val (conjHom (algebraMap ℂ potentialAlgebra c))) = _ - rw [AlgHom.commutes, ConjAlg.val_algebraMap, reverse_algebraMap] - -lemma conjugate_mul (x y : potentialAlgebra) : - conjugate (x * y) = conjugate y * conjugate x := by - show reverse (ConjAlg.val (conjHom (x * y))) = _ - rw [map_mul, ConjAlg.val_mul, reverse_mul] - rfl - -lemma conjugate_add (x y : potentialAlgebra) : - conjugate (x + y) = conjugate x + conjugate y := by - show reverse (ConjAlg.val (conjHom (x + y))) = _ - rw [map_add, ConjAlg.val_add, map_add] - rfl - -lemma conjugate_conjugate (x : potentialAlgebra) : conjugate (conjugate x) = x := by - induction x using potentialAlgebra.induction with - | algebraMap c => rw [conjugate_algebraMap, conjugate_algebraMap, starRingEnd_self_apply] - | ι ψ => rw [conjugate_ι, conjugate_ι, conjugateFields_conjugateFields] - | mul a b ha hb => rw [conjugate_mul, conjugate_mul, ha, hb] - | add a b ha hb => rw [conjugate_add, conjugate_add, ha, hb] - -instance instStarRing : StarRing potentialAlgebra where - star := conjugate - star_involutive := conjugate_conjugate - star_mul := conjugate_mul - star_add := conjugate_add - -lemma star_def (x : potentialAlgebra) : star x = conjugate x := rfl - -@[simp] -lemma star_ι (ψ : LeftHandedWeyl × RightHandedWeyl) : star (ι ψ) = ι (conjugateFields ψ) := - conjugate_ι ψ - -@[simp] -lemma star_ιLeft (ψ : LeftHandedWeyl) : star (ιLeft ψ) = ιRight (LeftHandedWeyl.conjugate ψ) := by - rw [ιLeft_apply, star_ι, ιRight_apply] - simp - -@[simp] -lemma star_ιRight (ψ : RightHandedWeyl) : - star (ιRight ψ) = ιLeft (RightHandedWeyl.conjugate ψ) := by - rw [ιRight_apply, star_ι, ιLeft_apply] - simp - -@[simp] -lemma star_algebraMap (c : ℂ) : - star (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra ((starRingEnd ℂ) c) := - conjugate_algebraMap c - -/-- The star operation on the potential algebra is conjugate-linear. -/ -instance : StarModule ℂ potentialAlgebra where - star_smul c x := by - rw [Algebra.smul_def, star_mul, star_algebraMap, ← Algebra.commutes, ← Algebra.smul_def] - rfl +lemma IsInvariant.one : IsInvariant 1 := by + intro Λ + simp [rep] /-! -## F. The action of `SL(2,ℂ)` on the potential algebra +## B.1. Specific terms which are invariant -/ -/-- The representation of `SL(2,ℂ)`, the double cover of the Lorentz group, on the potential - algebra, induced by its action on the Weyl fermion generators. -/ -def rep : Representation ℂ SL(2,ℂ) potentialAlgebra where - toFun M := (ExteriorAlgebra.map (repFields M)).toLinearMap - map_one' := by - refine LinearMap.ext fun x => ?_ - rw [map_one] - simp [Module.End.one_eq_id] - rfl - map_mul' M N := by - refine LinearMap.ext fun x => ?_ - rw [map_mul] - exact (AlgHom.congr_fun (ExteriorAlgebra.map_comp_map _ _) x).symm - -@[simp] -lemma rep_ι (M : SL(2,ℂ)) (ψ : LeftHandedWeyl × RightHandedWeyl) : - rep M (ι ψ) = ι (repFields M ψ) := - ExteriorAlgebra.map_apply_ι _ _ - -@[simp] -lemma rep_mul (M : SL(2,ℂ)) (x y : potentialAlgebra) : rep M (x * y) = rep M x * rep M y := - map_mul (ExteriorAlgebra.map (repFields M)) x y - -@[simp] -lemma rep_algebraMap (M : SL(2,ℂ)) (c : ℂ) : - rep M (algebraMap ℂ potentialAlgebra c) = algebraMap ℂ potentialAlgebra c := - AlgHom.commutes (ExteriorAlgebra.map (repFields M)) c - -@[simp] -lemma rep_ιLeft (M : SL(2,ℂ)) (ψ : LeftHandedWeyl) : - rep M (ιLeft ψ) = ιLeft (LeftHandedWeyl.rep M ψ) := by - rw [ιLeft_apply, rep_ι, ιLeft_apply] - simp - -/-- The star operation exchanges the left- and right-handed field subspaces. -/ -lemma star_mem_rightFields {x : potentialAlgebra} (hx : x ∈ leftFields) : - star x ∈ rightFields := by - obtain ⟨ψ, rfl⟩ := hx - exact ⟨LeftHandedWeyl.conjugate ψ, (star_ιLeft ψ).symm⟩ - -/-- The action of `SL(2,ℂ)` preserves the left-handed field subspace: the field transforms - into itself under the Lorentz group. -/ -lemma rep_mem_leftFields (M : SL(2,ℂ)) {x : potentialAlgebra} (hx : x ∈ leftFields) : - rep M x ∈ leftFields := by - obtain ⟨ψ, rfl⟩ := hx - exact ⟨LeftHandedWeyl.rep M ψ, (rep_ιLeft M ψ).symm⟩ - -/-- The star operation on the potential algebra commutes with the action of `SL(2,ℂ)`. -/ -lemma rep_star (M : SL(2,ℂ)) (x : potentialAlgebra) : rep M (star x) = star (rep M x) := by - induction x using potentialAlgebra.induction with - | algebraMap c => rw [star_algebraMap, rep_algebraMap, rep_algebraMap, star_algebraMap] - | ι ψ => rw [star_ι, rep_ι, rep_ι, star_ι, conjugateFields_repFields] - | mul a b ha hb => rw [star_mul, rep_mul, rep_mul, ha, hb, star_mul] - | add a b ha hb => rw [star_add, map_add, map_add, ha, hb, star_add] +lemma ψ_zero_mul_ψ_one_isInvariant : IsInvariant (ψ 0 * ψ 1) := by + intro Λ + simp [rep_mul, rep_apply_ψ_eq_sum, mul_add, add_mul] + trans (Λ.1.adjugate 1 1 • Λ.1.adjugate 0 0 - Λ.1.adjugate 1 0 • Λ.1.adjugate 0 1) • (ψ 0 * ψ 1) + · module + simp only [Fin.isValue, adjugate_fin_two, of_apply, cons_val', cons_val_one, cons_val_fin_one, + cons_val_zero, smul_eq_mul, mul_neg, neg_mul, neg_neg] + trans Λ.1.det • (ψ 0 * ψ 1) + · congr + simp only [Matrix.det_fin_two] + ring + · simp + +lemma barψ_zero_mul_barψ_one_isInvariant : IsInvariant (barψ 0 * barψ 1) := by + intro Λ + simp [rep_mul, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, smul_smul, + ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add] + trans (starRingEnd ℂ) Λ.1.det • (barψ 0 * barψ 1) + · simp only [Matrix.det_fin_two] + ring_nf + · simp + +lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by + intro Λ + simp [rep_mul, rep_apply_barψ_eq_sum, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, smul_smul, + ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add, mul_assoc] + trans (starRingEnd ℂ) Λ.1.det • ((rep Λ) (ψ 0) * ((rep Λ) (ψ 1) * (barψ 0 * barψ 1))) + · simp only [Matrix.det_fin_two] + ring_nf + simp [rep_apply_ψ_eq_sum, mul_add, add_mul, ← mul_assoc, mul_add, add_mul, adjugate_fin_two, smul_smul, + ← add_smul, ← neg_smul] + trans Λ.1.det • (ψ 0 * ψ 1 * barψ 0 * barψ 1) + · simp only [Matrix.det_fin_two] + ring_nf + · simp /-! -## G. Majorana masses - -In the potential-algebra formalism the components of the fermion field `ψ^α` are the -Grassmann-odd generators `ιLeft (LeftHandedWeyl.basis α)` of the potential algebra itself. -A potential is a function of the field, that is, an element of the algebra; it does not take -a value of the field as an argument. Indeed, the contraction of the metric with two copies of -a commuting (c-number) spinor vanishes identically, since `ε` is antisymmetric while products -of commuting components are symmetric. - -The self contraction `ψψ = ε_{αβ} ψ^α ψ^β` of the fermion field is obtained by contracting -the metric with two copies of the field and multiplying the results in the potential algebra. -It is non-zero precisely because the components of the field anticommute, and it is invariant -under `SL(2,ℂ)` because the metric is. - -The Majorana mass term of mass `m` is `m ψψ` together with its conjugate, which makes it real. +## B.2. Terms which must be zero fo an invariant potential -/ +/-- If `V` is invariant, then all terms with an odd number of factors vanish. -/ +lemma even_of_isInvariant {V : PotentialAlgebra} {s : Finset (Fin 4)} (h : IsInvariant V) + (hs : Odd s.card) : basis.repr V s = 0 := by + suffices h : basis.repr V s = (-1 : ℂ) ^ s.card * basis.repr V s by + simpa [hs.neg_one_pow, CharZero.eq_neg_self_iff] using h + let Λ := (-1 : SL(2, ℂ)) + suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep Λ (basis t) = (-1 : ℂ) ^ t.card • basis t by + conv_lhs => rw [← h Λ, ← basis.sum_repr V, map_sum] + simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm] + intro t + have hF : (DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ) + = -LinearMap.id := by + have hinv : (-(1 : Matrix (Fin 2) (Fin 2) ℂ))⁻¹ = -1 := Matrix.inv_eq_left_inv (by simp) + refine (DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).ext fun i => ?_ + rcases i with i | i <;> fin_cases i <;> + simp [DualLeftHandedWeyl.rep_apply_basis, DualRightHandedWeyl.rep_apply_basis, Λ, hinv] + have hmap (n : ℕ) (g : Fin n → DualLeftHandedWeyl × DualRightHandedWeyl) : + ExteriorAlgebra.ιMulti ℂ n (-g) = (-1 : ℂ) ^ n • ExteriorAlgebra.ιMulti ℂ n g := by + rw [show -g = fun i => (-1 : ℂ) • g i from funext fun i => by simp, + AlternatingMap.map_smul_univ] + simp + rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), rep_apply] + simp only [ExteriorAlgebra.ιMulti_family] + rw [ExteriorAlgebra.map_apply_ιMulti, hF] + exact hmap _ _ + +/-- If `V` is invariant, then the mixed terms `ψ i * barψ j` have coefficient zero. -/ +lemma zero_two_term_zero_of_isInvariant {V : PotentialAlgebra} (h : IsInvariant V) : + basis.repr V {0, 2} = 0 ∧ basis.repr V {0, 3} = 0 + ∧ basis.repr V {1, 2} = 0 ∧ basis.repr V {1, 3} = 0 := by + let Λ : SL(2, ℂ):= ⟨!![2 * I, 0; 0, -(I / 2)], by + simp [Matrix.det_fin_two_of]; linear_combination -Complex.I_sq⟩ + let d : Fin 4 → ℂ := ![-(I / 2), 2 * I, I / 2, -(2 * I)] + suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep Λ (basis t) = (∏ k ∈ t, d k) • basis t by + have hzero (a b : Fin 4) (hab : a ≠ b) (hd : d a * d b ≠ 1) : + basis.repr V {a, b} = 0 := by + have h1 : basis.repr V {a, b} = (d a * d b) * basis.repr V {a, b} := by + conv_lhs => rw [← h Λ, ← basis.sum_repr V, map_sum] + simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm, Finset.prod_pair hab] + by_contra hne + exact hd (mul_right_cancel₀ hne (by linear_combination -h1)) + refine ⟨hzero 0 2 (by decide) ?_, hzero 0 3 (by decide) ?_, + hzero 1 2 (by decide) ?_, hzero 1 3 (by decide) ?_⟩ <;> + simp only [d, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons, + Matrix.cons_val_two, Matrix.cons_val_three, Matrix.tail_cons] + · rw [show -(I / 2) * (I / 2) = 1 / 4 from by linear_combination (-(1 : ℂ)/4) * Complex.I_sq] + norm_num + · rw [show -(I / 2) * -(2 * I) = -1 from by linear_combination Complex.I_sq] + norm_num + · rw [show 2 * I * (I / 2) = -1 from by linear_combination Complex.I_sq] + norm_num + · rw [show 2 * I * -(2 * I) = 4 from by linear_combination (-4 : ℂ) * Complex.I_sq] + norm_num + intro t + have hinv : (!![2 * I, 0; 0, -(I / 2)])⁻¹ = !![-(I / 2), 0; 0, 2 * I] := + Matrix.inv_eq_left_inv (by ext i j; fin_cases i <;> fin_cases j <;> + simp [Matrix.mul_apply, Fin.sum_univ_two] <;> linear_combination -Complex.I_sq) + have hv (k : Fin 4) : ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) + (((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex finSumFinEquiv) k) + = d k • ((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex + finSumFinEquiv) k := by + fin_cases k <;> + simp [DualLeftHandedWeyl.rep_apply_basis, DualRightHandedWeyl.rep_apply_basis, Λ, d, hinv, + Matrix.cons_val_two, Matrix.cons_val_three, Matrix.tail_cons, Complex.conj_ofNat, neg_div, + show (finSumFinEquiv (m := 2) (n := 2)).symm 0 = Sum.inl 0 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 1 = Sum.inl 1 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 2 = Sum.inr 0 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 3 = Sum.inr 1 from rfl] + have hmap (n : ℕ) (c : Fin n → ℂ) (g : Fin n → DualLeftHandedWeyl × DualRightHandedWeyl) + (hcg : ∀ i, ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) (g i) + = c i • g i) : + ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) + (ExteriorAlgebra.ιMulti ℂ n g) = (∏ i, c i) • ExteriorAlgebra.ιMulti ℂ n g := by + rw [ExteriorAlgebra.map_apply_ιMulti, show ⇑((DualLeftHandedWeyl.rep Λ).prodMap + (DualRightHandedWeyl.rep Λ)) ∘ g = fun i => c i • g i from funext fun i => hcg i, + AlternatingMap.map_smul_univ] + rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), rep_apply] + simp only [ExteriorAlgebra.ιMulti_family, Set.powersetCard.ofFinEmbEquiv_symm_apply] + refine (hmap _ _ _ fun i => hv _).trans ?_ + congr 1 + rw [← Finset.prod_coe_sort t d] + exact Fintype.prod_equiv (t.orderIsoOfFin rfl).toEquiv _ _ fun i => by + simp [Finset.coe_orderIsoOfFin_apply] + +lemma isInvariant_iff {V : PotentialAlgebra} : + IsInvariant V ↔ ∃ (c m1 m2 ρ : ℂ), V = c • 1 + m1 • (ψ 0 * ψ 1) + m2 • (barψ 0 * barψ 1) + + ρ • (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by + constructor + · intro h + rw [← basis.sum_repr V] + refine ⟨basis.repr V ∅, basis.repr V {0, 1}, basis.repr V {2, 3}, basis.repr V {0, 1, 2, 3}, ?_⟩ + rw [show (Finset.univ : Finset (Finset (Fin 4))) = + {∅, {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}, + {0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}} by decide] + repeat rw [Finset.sum_insert (by decide)] + rw [Finset.sum_singleton] + rw [even_of_isInvariant (s := {0}) h (by decide), even_of_isInvariant (s := {1}) h (by decide), + even_of_isInvariant (s := {2}) h (by decide), even_of_isInvariant (s := {3}) h (by decide), + even_of_isInvariant (s := {0, 1, 2}) h (by decide), + even_of_isInvariant (s := {0, 1, 3}) h (by decide), + even_of_isInvariant (s := {0, 2, 3}) h (by decide), + even_of_isInvariant (s := {1, 2, 3}) h (by decide), + (zero_two_term_zero_of_isInvariant h).1, (zero_two_term_zero_of_isInvariant h).2.1, + (zero_two_term_zero_of_isInvariant h).2.2.1, (zero_two_term_zero_of_isInvariant h).2.2.2] + simp [add_assoc] + congr + all_goals + rw [basis, ExteriorAlgebra.basis_apply]; + simp [ExteriorAlgebra.ιMulti_apply, + Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, + ψ, barψ, mul_assoc]; + try rfl + · rintro ⟨c, m1, m2, ρ, rfl⟩ + apply_rules [IsInvariant.add, IsInvariant.smul, IsInvariant.one, + ψ_zero_mul_ψ_one_isInvariant, barψ_zero_mul_barψ_one_isInvariant, quartic_isInvariant] + +end PotentialAlgebra -/-- The contraction of the metric with two copies of a commuting spinor vanishes: a Majorana - mass cannot be built from a c-number left-handed Weyl fermion. -/ -lemma metricRaw_contract_comm_eq_zero (ψ : LeftHandedWeyl) : - ∑ α, ∑ β, metricRaw α β * ψ.val α * ψ.val β = 0 := by - simp only [metricRaw, Fin.sum_univ_two, of_apply, cons_val', cons_val_zero, cons_val_one, - empty_val', cons_val_fin_one] - ring - -/-- The self contraction `ψψ = ε_{αβ} ψ^α ψ^β` of the left-handed fermion field, obtained by - contracting the metric `leftMetricVal` with two copies of the field `ιLeft`, and multiplying - the resulting elements of the potential algebra. -/ -def leftSelfContract : potentialAlgebra := - LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft leftMetricVal) - -/-- The self contraction expanded as a sum over components of the metric. -/ -lemma leftSelfContract_eq_sum : leftSelfContract = - ∑ α, ∑ β, (- metricRaw α β) • - (ιLeft (LeftHandedWeyl.basis α) * ιLeft (LeftHandedWeyl.basis β)) := by - rw [leftSelfContract, leftMetricVal_expand_tmul] - simp [metricRaw, Fin.sum_univ_two] - -/-- The self contraction of the left-handed fermion field is invariant under the action of - `SL(2,ℂ)`, that is, it is Lorentz invariant. -/ -lemma rep_leftSelfContract (M : SL(2,ℂ)) : rep M leftSelfContract = leftSelfContract := by - have h (x : LeftHandedWeyl ⊗[ℂ] LeftHandedWeyl) : - rep M (LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft x)) = - LinearMap.mul' ℂ potentialAlgebra (TensorProduct.map ιLeft ιLeft - (TensorProduct.map (LeftHandedWeyl.rep M) (LeftHandedWeyl.rep M) x)) := by - induction x with - | zero => simp - | tmul ψ φ => simp - | add a b ha hb => simp [ha, hb] - rw [leftSelfContract, h, leftMetricVal_rep] - -/-- In terms of the basis, the self contraction of the fermion field is `- 2 ψ^1 ψ^2`. -/ -lemma leftSelfContract_eq_smul : leftSelfContract = - (-2 : ℂ) • (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := by - have h : ιLeft (LeftHandedWeyl.basis 1) * ιLeft (LeftHandedWeyl.basis 0) = - - (ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1)) := - ι_mul_ι_swap _ _ - rw [leftSelfContract, leftMetricVal_expand_tmul] - simp only [map_add, map_neg, TensorProduct.map_tmul, LinearMap.mul'_apply, h] - module - -/-- The self contraction of the fermion field is non-zero. It would vanish if the components - of the field commuted, by the antisymmetry of `ε`. -/ -lemma leftSelfContract_ne_zero : leftSelfContract ≠ 0 := by - /- The alternating form `(v, w) ↦ det ![v.1, w.1]` on the generators lifts to a linear - functional on the potential algebra which is non-zero on the self contraction. -/ - let form : (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin 2]→ₗ[ℂ] ℂ := - Matrix.detRowAlternating.compLinearMap - (LeftHandedWeyl.toFin2ℂEquiv.toLinearMap ∘ₗ LinearMap.fst ℂ LeftHandedWeyl RightHandedWeyl) - let f : ∀ i, (LeftHandedWeyl × RightHandedWeyl) [⋀^Fin i]→ₗ[ℂ] ℂ := - Function.update (fun _ => 0) 2 form - have hprod : ιLeft (LeftHandedWeyl.basis 0) * ιLeft (LeftHandedWeyl.basis 1) = - ExteriorAlgebra.ιMulti ℂ 2 - ![(LeftHandedWeyl.basis 0, 0), (LeftHandedWeyl.basis 1, 0)] := by - rw [ExteriorAlgebra.ιMulti_apply] - simp [ιLeft_apply, ι] - rfl - let F : potentialAlgebra →ₗ[ℂ] ℂ := ExteriorAlgebra.liftAlternating f - have hmulti : F (ExteriorAlgebra.ιMulti ℂ 2 - ![(LeftHandedWeyl.basis 0, 0), (LeftHandedWeyl.basis 1, 0)]) = 1 := by - show ExteriorAlgebra.liftAlternating f _ = 1 - rw [ExteriorAlgebra.liftAlternating_apply_ιMulti] - simp only [f, Function.update_self, form, AlternatingMap.compLinearMap_apply] - show Matrix.det _ = 1 - simp [Matrix.det_fin_two, LeftHandedWeyl.toFin2ℂFun, LeftHandedWeyl.basis_apply] - have hF : F leftSelfContract = -2 := by - rw [leftSelfContract_eq_smul, map_smul, hprod, hmulti, smul_eq_mul, mul_one] - intro h - rw [h, map_zero] at hF - norm_num at hF - -/-- The Majorana mass term, of complex mass `m`, of the left-handed fermion field. It is the - sum of the self contraction `m ψψ` and its conjugate. -/ -def majoranaMass (m : ℂ) : potentialAlgebra := - m • leftSelfContract + star (m • leftSelfContract) - -/-- The Majorana mass term is real, that is, it is fixed by the star operation. -/ -lemma star_majoranaMass (m : ℂ) : star (majoranaMass m) = majoranaMass m := by - rw [majoranaMass, star_add, star_star, add_comm] - -/-- The Majorana mass term is invariant under the action of `SL(2,ℂ)`, that is, - it is Lorentz invariant. -/ -lemma rep_majoranaMass (M : SL(2,ℂ)) (m : ℂ) : rep M (majoranaMass m) = majoranaMass m := by - rw [majoranaMass, map_add, rep_star, map_smul, rep_leftSelfContract] - -end potentialAlgebra end end Fermion From 2fd955842ea821495efc951534fc6b8b395c55d9 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:59:20 +0100 Subject: [PATCH 17/48] refactor: Rename --- Physlib.lean | 1 + ...alAlgebra.lean => EffectivePotential.lean} | 58 +++++++++---------- 2 files changed, 30 insertions(+), 29 deletions(-) rename Physlib/Relativity/Fermions/Weyl/{PotentialAlgebra.lean => EffectivePotential.lean} (88%) diff --git a/Physlib.lean b/Physlib.lean index 3142dc696..c19a4e94d 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -324,6 +324,7 @@ public import Physlib.Relativity.Fermions.Weyl.Contraction public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded public import Physlib.Relativity.Fermions.Weyl.DualRightHanded public import Physlib.Relativity.Fermions.Weyl.Duals +public import Physlib.Relativity.Fermions.Weyl.EffectivePotential public import Physlib.Relativity.Fermions.Weyl.LeftHanded public import Physlib.Relativity.Fermions.Weyl.Metric public import Physlib.Relativity.Fermions.Weyl.PotentialAlgebra diff --git a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean similarity index 88% rename from Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean rename to Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean index 04f2085b3..9eb83f384 100644 --- a/Physlib/Relativity/Fermions/Weyl/PotentialAlgebra.lean +++ b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean @@ -7,11 +7,10 @@ module public import Physlib.Relativity.Fermions.Weyl.Metric public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation -public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis /-! -# The potential algebra of Weyl fermions +# The effective potential of Weyl fermions ## i. Overview @@ -19,7 +18,7 @@ In this file are primary objective is to look at the potential of a single left-handed Weyl fermion, correctly taking account of the anti-commuting nature of the fermion. -Two facts about the potential, which we take as a given, are that: +Two facts about the (effective) potential, which we take as a given, are that: 1. It is written in terms of the components of the left-handed Weyl fermion and its conjugate. 2. Within the potential the components anti-commute. The first of these, tells us that we should be working with the dual of the left-handed Weyl fermion @@ -29,7 +28,7 @@ exterior algebra. Thus, the type in which the potential lives is `ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We call this type -`PotentialAlgebra` and define it and its properties in this file. +`EffectivePotential` and define it and its properties in this file. On `PotentialAlgebra` we define a representation of the Lorentz group, and prove that that if the potential is invariant under the Lorentz group it must be of the form @@ -57,9 +56,11 @@ open CategoryTheory.MonoidalCategory -/ -abbrev PotentialAlgebra : Type := ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl) +/-- The type corresponding to the effective potential of a + left-handed Weyl fermion. -/ +abbrev EffectivePotential : Type := ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl) -namespace PotentialAlgebra +namespace EffectivePotential /-! @@ -68,13 +69,13 @@ namespace PotentialAlgebra -/ /-- The coordinate element corresponding to the i-th basis vector as a member - of the potential algebra. -/ -def ψ (i : Fin 2) : PotentialAlgebra := + of the effective potential. -/ +def ψ (i : Fin 2) : EffectivePotential := (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (DualLeftHandedWeyl.basis i)) /-- The coordinate element corresponding to the conjugate i-th basis vector as a member - of the potential algebra. -/ -def barψ (i : Fin 2) : PotentialAlgebra := + of the effective potential. -/ +def barψ (i : Fin 2) : EffectivePotential := (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (DualRightHandedWeyl.basis i)) @[simp] lemma ψ_mul_self (i : Fin 2) : ψ i * ψ i = 0 := ExteriorAlgebra.ι_sq_zero _ @@ -96,9 +97,8 @@ def barψ (i : Fin 2) : PotentialAlgebra := -/ - -/-- The basis of the potential algebra. -/ -def basis : Basis (Finset (Fin 4)) ℂ PotentialAlgebra := +/-- The basis of the effective potential. -/ +def basis : Basis (Finset (Fin 4)) ℂ EffectivePotential := Module.Basis.ExteriorAlgebra ((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex finSumFinEquiv) @@ -109,7 +109,7 @@ def basis : Basis (Finset (Fin 4)) ℂ PotentialAlgebra := -/ /-- The representation of the Lorentz group on `PotentialAlgebra`. -/ -def rep : Representation ℂ SL(2, ℂ) PotentialAlgebra where +def rep : Representation ℂ SL(2, ℂ) EffectivePotential where toFun Λ := (ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ))).toLinearMap map_one' := by @@ -119,11 +119,11 @@ def rep : Representation ℂ SL(2, ℂ) PotentialAlgebra where simp only [map_mul, End.mul_eq_comp, ← LinearMap.prodMap_comp, ← ExteriorAlgebra.map_comp_map, AlgHom.comp_toLinearMap] -lemma rep_apply (Λ : SL(2, ℂ)) (V : PotentialAlgebra) : +lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : rep Λ V = ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) V := rfl -lemma rep_mul (Λ : SL(2, ℂ)) (V W : PotentialAlgebra) : +lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : rep Λ (V * W) = rep Λ V * rep Λ W:= by simp [rep] @@ -144,22 +144,22 @@ lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : -/ -def IsInvariant (V : PotentialAlgebra) : Prop := ∀ Λ, rep Λ V = V +def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V -lemma IsInvariant.eq_iff {V : PotentialAlgebra} : +lemma IsInvariant.eq_iff {V : EffectivePotential} : IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl -lemma IsInvariant.add {V W : PotentialAlgebra} (hV : IsInvariant V) (hW : IsInvariant W) : +lemma IsInvariant.add {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : IsInvariant (V + W) := by intro Λ simp_all [IsInvariant.eq_iff] -lemma IsInvariant.smul {V : PotentialAlgebra} (hV : IsInvariant V) (c : ℂ) : +lemma IsInvariant.smul {V : EffectivePotential} (hV : IsInvariant V) (c : ℂ) : IsInvariant (c • V) := by intro Λ simp_all [IsInvariant.eq_iff] -lemma IsInvariant.mul {V W : PotentialAlgebra} (hV : IsInvariant V) (hW : IsInvariant W) : +lemma IsInvariant.mul {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : IsInvariant (V * W) := by intro Λ simp_all [IsInvariant.eq_iff, rep_mul] @@ -198,13 +198,13 @@ lemma barψ_zero_mul_barψ_one_isInvariant : IsInvariant (barψ 0 * barψ 1) := lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by intro Λ - simp [rep_mul, rep_apply_barψ_eq_sum, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, smul_smul, - ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add, mul_assoc] + simp [rep_mul, rep_apply_barψ_eq_sum, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, + smul_smul, ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add, mul_assoc] trans (starRingEnd ℂ) Λ.1.det • ((rep Λ) (ψ 0) * ((rep Λ) (ψ 1) * (barψ 0 * barψ 1))) · simp only [Matrix.det_fin_two] ring_nf - simp [rep_apply_ψ_eq_sum, mul_add, add_mul, ← mul_assoc, mul_add, add_mul, adjugate_fin_two, smul_smul, - ← add_smul, ← neg_smul] + simp [rep_apply_ψ_eq_sum, mul_add, add_mul, ← mul_assoc, mul_add, add_mul, + adjugate_fin_two, smul_smul, ← add_smul, ← neg_smul] trans Λ.1.det • (ψ 0 * ψ 1 * barψ 0 * barψ 1) · simp only [Matrix.det_fin_two] ring_nf @@ -216,7 +216,7 @@ lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by -/ /-- If `V` is invariant, then all terms with an odd number of factors vanish. -/ -lemma even_of_isInvariant {V : PotentialAlgebra} {s : Finset (Fin 4)} (h : IsInvariant V) +lemma even_of_isInvariant {V : EffectivePotential} {s : Finset (Fin 4)} (h : IsInvariant V) (hs : Odd s.card) : basis.repr V s = 0 := by suffices h : basis.repr V s = (-1 : ℂ) ^ s.card * basis.repr V s by simpa [hs.neg_one_pow, CharZero.eq_neg_self_iff] using h @@ -242,7 +242,7 @@ lemma even_of_isInvariant {V : PotentialAlgebra} {s : Finset (Fin 4)} (h : IsInv exact hmap _ _ /-- If `V` is invariant, then the mixed terms `ψ i * barψ j` have coefficient zero. -/ -lemma zero_two_term_zero_of_isInvariant {V : PotentialAlgebra} (h : IsInvariant V) : +lemma zero_two_term_zero_of_isInvariant {V : EffectivePotential} (h : IsInvariant V) : basis.repr V {0, 2} = 0 ∧ basis.repr V {0, 3} = 0 ∧ basis.repr V {1, 2} = 0 ∧ basis.repr V {1, 3} = 0 := by let Λ : SL(2, ℂ):= ⟨!![2 * I, 0; 0, -(I / 2)], by @@ -299,7 +299,7 @@ lemma zero_two_term_zero_of_isInvariant {V : PotentialAlgebra} (h : IsInvariant exact Fintype.prod_equiv (t.orderIsoOfFin rfl).toEquiv _ _ fun i => by simp [Finset.coe_orderIsoOfFin_apply] -lemma isInvariant_iff {V : PotentialAlgebra} : +lemma isInvariant_iff {V : EffectivePotential} : IsInvariant V ↔ ∃ (c m1 m2 ρ : ℂ), V = c • 1 + m1 • (ψ 0 * ψ 1) + m2 • (barψ 0 * barψ 1) + ρ • (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by constructor @@ -331,7 +331,7 @@ lemma isInvariant_iff {V : PotentialAlgebra} : apply_rules [IsInvariant.add, IsInvariant.smul, IsInvariant.one, ψ_zero_mul_ψ_one_isInvariant, barψ_zero_mul_barψ_one_isInvariant, quartic_isInvariant] -end PotentialAlgebra +end EffectivePotential end end Fermion From 98d74b623f108ec43527c4d0663b28a92731b59a Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:49:57 +0100 Subject: [PATCH 18/48] refactor: Lint --- Physlib.lean | 1 - Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Physlib.lean b/Physlib.lean index c19a4e94d..b27c9f117 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -327,7 +327,6 @@ public import Physlib.Relativity.Fermions.Weyl.Duals public import Physlib.Relativity.Fermions.Weyl.EffectivePotential public import Physlib.Relativity.Fermions.Weyl.LeftHanded public import Physlib.Relativity.Fermions.Weyl.Metric -public import Physlib.Relativity.Fermions.Weyl.PotentialAlgebra public import Physlib.Relativity.Fermions.Weyl.RightHanded public import Physlib.Relativity.Fermions.Weyl.Two public import Physlib.Relativity.Fermions.Weyl.Unit diff --git a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean index 9eb83f384..56123a33b 100644 --- a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean +++ b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean @@ -212,7 +212,7 @@ lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by /-! -## B.2. Terms which must be zero fo an invariant potential +## B.2. Terms which must be zero in an invariant potential -/ /-- If `V` is invariant, then all terms with an odd number of factors vanish. -/ From e7561cf94efd02b195e2600d5c8e7ec0700e099c Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 13 Jul 2026 14:13:56 +0100 Subject: [PATCH 19/48] refactor: Add lemma about duals. --- Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean index 6884f71db..96025fd99 100644 --- a/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean +++ b/Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean @@ -32,6 +32,8 @@ Although a different index convention is used there. namespace Fermion noncomputable section +TODO "Relate `DualLeftHandedWeyl` to `LeftHandedWeyl` via `Module.dual`." + /-- The module in which dual-left handed fermions live. This is equivalent to `Fin 2 → ℂ`. -/ structure DualLeftHandedWeyl where /-- The underlying value in `Fin 2 → ℂ`. -/ From c9ca4970de19bb69da577f2aaf658c213e348e76 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 05:43:47 +0100 Subject: [PATCH 20/48] feat: Improve doc-strings --- Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean index 56123a33b..35e74ec00 100644 --- a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean +++ b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean @@ -20,6 +20,7 @@ of the anti-commuting nature of the fermion. Two facts about the (effective) potential, which we take as a given, are that: 1. It is written in terms of the components of the left-handed Weyl fermion and its conjugate. + (For this effective potential, we do not consider derivatives.) 2. Within the potential the components anti-commute. The first of these, tells us that we should be working with the dual of the left-handed Weyl fermion and its conjugate (since the duals are the linear functionals which pick @@ -90,7 +91,6 @@ def barψ (i : Fin 2) : EffectivePotential := rw [neg_mul, eq_neg_iff_add_eq_zero] exact ExteriorAlgebra.ι_add_mul_swap _ _ - /-! ### A.2. Basis @@ -144,6 +144,8 @@ lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : -/ +/-- An effective potential is Lorentz invariant if it is stable under the + action of the Lorentz group. -/ def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V lemma IsInvariant.eq_iff {V : EffectivePotential} : From 79d72afbc11319de87e143e82a92380950495273 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:14:10 +0100 Subject: [PATCH 21/48] feat: Add termOfList, and update types --- Physlib/Mathematics/ConjModule.lean | 31 ++- .../Fermions/Weyl/EffectivePotential.lean | 228 +++++++++++------- 2 files changed, 170 insertions(+), 89 deletions(-) diff --git a/Physlib/Mathematics/ConjModule.lean b/Physlib/Mathematics/ConjModule.lean index 3b2ce7039..109c4030a 100644 --- a/Physlib/Mathematics/ConjModule.lean +++ b/Physlib/Mathematics/ConjModule.lean @@ -9,7 +9,7 @@ public import Mathlib.Algebra.Module.Equiv.Defs public import Mathlib.Algebra.Star.Module public import Mathlib.LinearAlgebra.Basis.Defs public import Mathlib.Tactic.Ring - +public import Mathlib.RepresentationTheory.Basic /-! # The conjugate module @@ -89,16 +89,16 @@ noncomputable def starFinsupp : (ι →₀ k) ≃ₛₗ[starRingEnd k] (ι → /-- A basis of `M` transported to a basis of `ConjModule M`: the same basis vectors, with coordinates conjugated (`(Basis.conj b).repr v = star ∘ b.repr v`). -/ -noncomputable def _root_.Basis.conj (b : Basis ι k M) : Basis ι k (ConjModule M) := +noncomputable def _root_.Module.Basis.conj (b : Basis ι k M) : Basis ι k (ConjModule M) := Basis.ofRepr (((conjEquiv (k := k) (M := M)).symm.trans b.repr).trans starFinsupp) /-- Coordinates in `Basis.conj b` are the `star` of the coordinates in `b`. -/ -@[simp] lemma _root_.Basis.conj_repr_apply (b : Basis ι k M) (v : ConjModule M) (i : ι) : +@[simp] lemma _root_.Module.Basis.conj_repr_apply (b : Basis ι k M) (v : ConjModule M) (i : ι) : (Basis.conj b).repr v i = star (b.repr ((conjEquiv (k := k) (M := M)).symm v) i) := rfl /-- The basis vectors of `Basis.conj b` are those of `b`, viewed through `conjEquiv`. -/ -@[simp] lemma _root_.Basis.conj_apply (b : Basis ι k M) (i : ι) : +@[simp] lemma _root_.Module.Basis.conj_apply (b : Basis ι k M) (i : ι) : Basis.conj b i = conjEquiv (k := k) (M := M) (b i) := by apply (Basis.conj b).repr.injective ext j @@ -106,6 +106,29 @@ noncomputable def _root_.Basis.conj (b : Basis ι k M) : Basis ι k (ConjModule · subst h; simp [Basis.conj_repr_apply] · simp [Basis.conj_repr_apply, Finsupp.single_eq_of_ne, h] +/-! + +## The conjugate of a representation + +-/ + +/-- The conjugate of a representation `ρ` of `G` on `M`: the same maps `ρ g`, acting on +`ConjModule M` through `conjEquiv`. -/ +def _root_.Representation.conj {G} [Group G] (ρ : Representation k G M) : + Representation k G (ConjModule M) where + toFun g := { + toFun := conjEquiv (k := k) (M := M) ∘ ρ g ∘ (conjEquiv (k := k) (M := M)).symm + map_add' x y := (ρ g).map_add x y + map_smul' a m := (ρ g).map_smul (star a) m } + map_one' := LinearMap.ext fun _ => + congrArg (conjEquiv (k := k)) (LinearMap.congr_fun (map_one ρ) _) + map_mul' g h := LinearMap.ext fun _ => + congrArg (conjEquiv (k := k)) (LinearMap.congr_fun (map_mul ρ g h) _) + +lemma _root_.Representation.conj_apply {G} [Group G] (ρ : Representation k G M) (g : G) + (m : ConjModule M) : + ρ.conj g m = conjEquiv (k := k) (M := M) (ρ g ((conjEquiv (k := k) (M := M)).symm m)) := rfl + end ConjModule end diff --git a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean index 35e74ec00..949955994 100644 --- a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean +++ b/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean @@ -8,6 +8,7 @@ module public import Physlib.Relativity.Fermions.Weyl.Metric public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis +public import Physlib.Mathematics.ConjModule /-! # The effective potential of Weyl fermions @@ -28,8 +29,13 @@ out the components of the fermion). The second of these tells us that we should exterior algebra. Thus, the type in which the potential lives is -`ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We call this type -`EffectivePotential` and define it and its properties in this file. +`ExteriorAlgebra ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl))`. +We call this type `EffectivePotential` and define it and its properties in this file. +Note that `Module.Dual ℂ LeftHandedWeyl` is equivalent to `DualLeftHandedWeyl` and +`Module.Dual ℂ (ConjModule LeftHandedWeyl)` is equivalent to `DualRightHandedWeyl`, +so we could equivalently define the effective potential as +`ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We have done the +former here as it generalises to other cases. On `PotentialAlgebra` we define a representation of the Lorentz group, and prove that that if the potential is invariant under the Lorentz group it must be of the form @@ -59,7 +65,8 @@ open CategoryTheory.MonoidalCategory /-- The type corresponding to the effective potential of a left-handed Weyl fermion. -/ -abbrev EffectivePotential : Type := ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl) +abbrev EffectivePotential : Type := ExteriorAlgebra ℂ + (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) namespace EffectivePotential @@ -72,12 +79,12 @@ namespace EffectivePotential /-- The coordinate element corresponding to the i-th basis vector as a member of the effective potential. -/ def ψ (i : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (DualLeftHandedWeyl.basis i)) + (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis i)) /-- The coordinate element corresponding to the conjugate i-th basis vector as a member of the effective potential. -/ def barψ (i : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (DualRightHandedWeyl.basis i)) + (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis i)) @[simp] lemma ψ_mul_self (i : Fin 2) : ψ i * ψ i = 0 := ExteriorAlgebra.ι_sq_zero _ @@ -91,27 +98,70 @@ def barψ (i : Fin 2) : EffectivePotential := rw [neg_mul, eq_neg_iff_add_eq_zero] exact ExteriorAlgebra.ι_add_mul_swap _ _ +@[simp] +lemma append_apply_zero_eq : Fin.append ψ barψ 0 = ψ 0 := rfl + +@[simp] +lemma append_apply_one_eq : Fin.append ψ barψ 1 = ψ 1 := rfl + +@[simp] +lemma append_apply_two_eq : Fin.append ψ barψ 2 = barψ 0 := rfl + +@[simp] +lemma append_apply_three_eq : Fin.append ψ barψ 3 = barψ 1 := rfl + +/-! + +### A.2. Of a list +-/ + +def termOfList (l : List (Fin 4)) : EffectivePotential := + (l.map (Fin.append ψ barψ)).prod + +@[simp] +lemma termOfList_nil : termOfList [] = 1 := by simp [termOfList] + +lemma termOfList_cons (l : List (Fin 4)) (i : Fin 4) : + termOfList (i :: l) = (Fin.append ψ barψ i) * termOfList l := by + simp only [termOfList, List.map_cons, List.prod_cons] + /-! -### A.2. Basis +### A.3. Basis -/ /-- The basis of the effective potential. -/ def basis : Basis (Finset (Fin 4)) ℂ EffectivePotential := - Module.Basis.ExteriorAlgebra ((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex - finSumFinEquiv) + Module.Basis.ExteriorAlgebra ((LeftHandedWeyl.basis.dualBasis.prod + LeftHandedWeyl.basis.conj.dualBasis).reindex finSumFinEquiv) + +lemma basis_eq_termOfList (s : Finset (Fin 4)) : basis s = termOfList (s.sort (· ≤ ·)) := by + have happend : Fin.append ψ barψ = fun j => (ExteriorAlgebra.ι ℂ) + (((LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex + finSumFinEquiv) j) := by + funext j + fin_cases j <;> + simp [ψ, barψ, Fin.append, Fin.addCases, Basis.prod_apply, + show (finSumFinEquiv (m := 2) (n := 2)).symm 0 = Sum.inl 0 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 1 = Sum.inl 1 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 2 = Sum.inr 0 from rfl, + show (finSumFinEquiv (m := 2) (n := 2)).symm 3 = Sum.inr 1 from rfl] + rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), termOfList, happend] + simp only [ExteriorAlgebra.ιMulti_family, Set.powersetCard.ofFinEmbEquiv_symm_apply, + ExteriorAlgebra.ιMulti_apply] + refine congrArg List.prod (List.ext_getElem (by simp) fun i h1 h2 => ?_) + simp [Finset.orderEmbOfFin_apply] /-! - -## A.3. The representation on the potential algebra - +### A.4. The representation on the potential algebra -/ + /-- The representation of the Lorentz group on `PotentialAlgebra`. -/ def rep : Representation ℂ SL(2, ℂ) EffectivePotential where - toFun Λ := (ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap - (DualRightHandedWeyl.rep Λ))).toLinearMap + toFun Λ := (ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap + (LeftHandedWeyl.rep.conj.dual Λ))).toLinearMap map_one' := by simp only [map_one, End.one_eq_id, LinearMap.prodMap_id, ExteriorAlgebra.map_id, AlgHom.toLinearMap_id] @@ -120,8 +170,12 @@ def rep : Representation ℂ SL(2, ℂ) EffectivePotential where AlgHom.comp_toLinearMap] lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : - rep Λ V = ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap - (DualRightHandedWeyl.rep Λ)) V := rfl + rep Λ V = ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap + (LeftHandedWeyl.rep.conj.dual Λ)) V := rfl + +@[simp] +lemma rep_apply_one (Λ : SL(2, ℂ)) : rep Λ 1 = 1 := by + simp [rep_apply] lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : rep Λ (V * W) = rep Λ V * rep Λ W:= by @@ -129,13 +183,50 @@ lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : lemma rep_apply_ψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : rep Λ (ψ i) = ∑ j, Λ⁻¹ i j • ψ j := by - simp [rep, ψ, DualLeftHandedWeyl.rep_apply_basis, ← map_smul, ← map_add, - -SpecialLinearGroup.coe_inv, Lorentz.SL2C.inverse_coe] + simp only [ψ, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, Representation.dual_apply, + ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, ← map_smul, Prod.smul_mk, + smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, + ExteriorAlgebra.ι_inj, Prod.mk.injEq, and_true] + refine LeftHandedWeyl.basis.ext fun l => ?_ + fin_cases i <;> fin_cases l <;> + simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, + -SpecialLinearGroup.coe_inv] lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : rep Λ (barψ i) = ∑ j, star (Λ⁻¹ i j) • barψ j := by - simp [rep, barψ, DualRightHandedWeyl.rep_apply_basis, ← map_smul, ← map_add, - -SpecialLinearGroup.coe_inv, Lorentz.SL2C.inverse_coe] + simp only [barψ, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, + ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, + Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, + ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] + refine LeftHandedWeyl.basis.conj.ext fun l => ?_ + fin_cases i <;> fin_cases l <;> + simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, + -SpecialLinearGroup.coe_inv, Representation.conj_apply] + +lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List (Fin 4)) : + rep Λ (termOfList l) = ((l.map (Fin.append ψ barψ)).map (rep Λ)).prod := by + induction l with + | nil => simp + | cons i l ih => + simp [termOfList_cons, rep_mul, ih] + +lemma rep_neg_apply_append (Λ : SL(2, ℂ)) (i : Fin 4) : + rep (- Λ) (Fin.append ψ barψ i) = (-1 : ℂ) • rep Λ (Fin.append ψ barψ i) := by + fin_cases i + all_goals + simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum] + abel + +lemma rep_neg_apply_termOfList (Λ : SL(2, ℂ)) (l : List (Fin 4)) : + rep (- Λ) (termOfList l) = ((-1 : ℂ) ^ l.length) • rep Λ (termOfList l) := by + induction l with + | nil => simp + | cons i l ih => + simp [termOfList_cons, rep_mul, ih, rep_neg_apply_append, pow_succ' (-1 : ℂ) l.length] + +lemma rep_neg_apply_basis (s : Finset (Fin 4)) (Λ : SL(2, ℂ)) : + rep (- Λ) (basis s) = (-1 : ℂ) ^ s.card • rep Λ (basis s) := by + simp [basis_eq_termOfList, rep_neg_apply_termOfList] /-! @@ -222,26 +313,11 @@ lemma even_of_isInvariant {V : EffectivePotential} {s : Finset (Fin 4)} (h : IsI (hs : Odd s.card) : basis.repr V s = 0 := by suffices h : basis.repr V s = (-1 : ℂ) ^ s.card * basis.repr V s by simpa [hs.neg_one_pow, CharZero.eq_neg_self_iff] using h - let Λ := (-1 : SL(2, ℂ)) - suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep Λ (basis t) = (-1 : ℂ) ^ t.card • basis t by - conv_lhs => rw [← h Λ, ← basis.sum_repr V, map_sum] + suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep (-1 : SL(2, ℂ)) (basis t) = + (-1 : ℂ) ^ t.card • basis t by + conv_lhs => rw [← h (-1 : SL(2, ℂ)), ← basis.sum_repr V, map_sum] simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm] - intro t - have hF : (DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ) - = -LinearMap.id := by - have hinv : (-(1 : Matrix (Fin 2) (Fin 2) ℂ))⁻¹ = -1 := Matrix.inv_eq_left_inv (by simp) - refine (DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).ext fun i => ?_ - rcases i with i | i <;> fin_cases i <;> - simp [DualLeftHandedWeyl.rep_apply_basis, DualRightHandedWeyl.rep_apply_basis, Λ, hinv] - have hmap (n : ℕ) (g : Fin n → DualLeftHandedWeyl × DualRightHandedWeyl) : - ExteriorAlgebra.ιMulti ℂ n (-g) = (-1 : ℂ) ^ n • ExteriorAlgebra.ιMulti ℂ n g := by - rw [show -g = fun i => (-1 : ℂ) • g i from funext fun i => by simp, - AlternatingMap.map_smul_univ] - simp - rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), rep_apply] - simp only [ExteriorAlgebra.ιMulti_family] - rw [ExteriorAlgebra.map_apply_ιMulti, hF] - exact hmap _ _ + simp [rep_neg_apply_basis] /-- If `V` is invariant, then the mixed terms `ψ i * barψ j` have coefficient zero. -/ lemma zero_two_term_zero_of_isInvariant {V : EffectivePotential} (h : IsInvariant V) : @@ -250,56 +326,38 @@ lemma zero_two_term_zero_of_isInvariant {V : EffectivePotential} (h : IsInvarian let Λ : SL(2, ℂ):= ⟨!![2 * I, 0; 0, -(I / 2)], by simp [Matrix.det_fin_two_of]; linear_combination -Complex.I_sq⟩ let d : Fin 4 → ℂ := ![-(I / 2), 2 * I, I / 2, -(2 * I)] + suffices Λ_basis_two : ∀ (a b : Fin 4) (hab : a ≠ b) (hd : d a * d b ≠ 1), + basis.repr V {a, b} = 0 by + refine ⟨Λ_basis_two 0 2 (by decide) ?_, Λ_basis_two 0 3 (by decide) ?_, + Λ_basis_two 1 2 (by decide) ?_, Λ_basis_two 1 3 (by decide) ?_⟩ + all_goals + simp [d] + ring_nf + simp + try grind suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep Λ (basis t) = (∏ k ∈ t, d k) • basis t by - have hzero (a b : Fin 4) (hab : a ≠ b) (hd : d a * d b ≠ 1) : - basis.repr V {a, b} = 0 := by - have h1 : basis.repr V {a, b} = (d a * d b) * basis.repr V {a, b} := by + intro a b hab hd + have h1 : basis.repr V {a, b} = (d a * d b) * basis.repr V {a, b} := by conv_lhs => rw [← h Λ, ← basis.sum_repr V, map_sum] simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm, Finset.prod_pair hab] - by_contra hne - exact hd (mul_right_cancel₀ hne (by linear_combination -h1)) - refine ⟨hzero 0 2 (by decide) ?_, hzero 0 3 (by decide) ?_, - hzero 1 2 (by decide) ?_, hzero 1 3 (by decide) ?_⟩ <;> - simp only [d, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons, - Matrix.cons_val_two, Matrix.cons_val_three, Matrix.tail_cons] - · rw [show -(I / 2) * (I / 2) = 1 / 4 from by linear_combination (-(1 : ℂ)/4) * Complex.I_sq] - norm_num - · rw [show -(I / 2) * -(2 * I) = -1 from by linear_combination Complex.I_sq] - norm_num - · rw [show 2 * I * (I / 2) = -1 from by linear_combination Complex.I_sq] - norm_num - · rw [show 2 * I * -(2 * I) = 4 from by linear_combination (-4 : ℂ) * Complex.I_sq] - norm_num - intro t - have hinv : (!![2 * I, 0; 0, -(I / 2)])⁻¹ = !![-(I / 2), 0; 0, 2 * I] := - Matrix.inv_eq_left_inv (by ext i j; fin_cases i <;> fin_cases j <;> - simp [Matrix.mul_apply, Fin.sum_univ_two] <;> linear_combination -Complex.I_sq) - have hv (k : Fin 4) : ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) - (((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex finSumFinEquiv) k) - = d k • ((DualLeftHandedWeyl.basis.prod DualRightHandedWeyl.basis).reindex - finSumFinEquiv) k := by - fin_cases k <;> - simp [DualLeftHandedWeyl.rep_apply_basis, DualRightHandedWeyl.rep_apply_basis, Λ, d, hinv, - Matrix.cons_val_two, Matrix.cons_val_three, Matrix.tail_cons, Complex.conj_ofNat, neg_div, - show (finSumFinEquiv (m := 2) (n := 2)).symm 0 = Sum.inl 0 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 1 = Sum.inl 1 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 2 = Sum.inr 0 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 3 = Sum.inr 1 from rfl] - have hmap (n : ℕ) (c : Fin n → ℂ) (g : Fin n → DualLeftHandedWeyl × DualRightHandedWeyl) - (hcg : ∀ i, ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) (g i) - = c i • g i) : - ExteriorAlgebra.map ((DualLeftHandedWeyl.rep Λ).prodMap (DualRightHandedWeyl.rep Λ)) - (ExteriorAlgebra.ιMulti ℂ n g) = (∏ i, c i) • ExteriorAlgebra.ιMulti ℂ n g := by - rw [ExteriorAlgebra.map_apply_ιMulti, show ⇑((DualLeftHandedWeyl.rep Λ).prodMap - (DualRightHandedWeyl.rep Λ)) ∘ g = fun i => c i • g i from funext fun i => hcg i, - AlternatingMap.map_smul_univ] - rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), rep_apply] - simp only [ExteriorAlgebra.ιMulti_family, Set.powersetCard.ofFinEmbEquiv_symm_apply] - refine (hmap _ _ _ fun i => hv _).trans ?_ - congr 1 - rw [← Finset.prod_coe_sort t d] - exact Fintype.prod_equiv (t.orderIsoOfFin rfl).toEquiv _ _ fun i => by - simp [Finset.coe_orderIsoOfFin_apply] + by_contra hne + exact hd (mul_right_cancel₀ hne (by linear_combination -h1)) + suffices Λ_termOfList : ∀ (l : List (Fin 4)), + rep Λ (termOfList l) = (l.map d).prod • termOfList l by + intro t + rw [basis_eq_termOfList, Λ_termOfList, ← Finset.prod_map_toList t, + ((Finset.sort_perm_toList t fun x1 x2 => x1 ≤ x2).map d).prod_eq] + suffices Λ_append : ∀ (i : Fin 4), rep Λ (Fin.append ψ barψ i) = d i • Fin.append ψ barψ i by + intro l + induction l with + | nil => simp + | cons i l ih => simp [termOfList_cons, rep_mul, ih, Λ_append, smul_smul, mul_comm] + intro i + fin_cases i + all_goals + simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum, d, adjugate_fin_two, Λ, + neg_smul, Complex.conj_ofNat] + try module lemma isInvariant_iff {V : EffectivePotential} : IsInvariant V ↔ ∃ (c m1 m2 ρ : ℂ), V = c • 1 + m1 • (ψ 0 * ψ 1) + m2 • (barψ 0 * barψ 1) + From e67ba270aa7cb5071d9bc545445dc9f58ec34a11 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:16:53 +0100 Subject: [PATCH 22/48] refactor: Move file --- Physlib.lean | 2 +- .../Weyl => Particles/PureFermionic}/EffectivePotential.lean | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename Physlib/{Relativity/Fermions/Weyl => Particles/PureFermionic}/EffectivePotential.lean (99%) diff --git a/Physlib.lean b/Physlib.lean index b27c9f117..5f64c438c 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -165,6 +165,7 @@ public import Physlib.Particles.FlavorPhysics.CKMMatrix.Rows public import Physlib.Particles.FlavorPhysics.CKMMatrix.StandardParameterization.Basic public import Physlib.Particles.FlavorPhysics.CKMMatrix.StandardParameterization.StandardParameters public import Physlib.Particles.NeutrinoPhysics.Basic +public import Physlib.Particles.PureFermionic.EffectivePotential public import Physlib.Particles.StandardModel.AnomalyCancellation.Basic public import Physlib.Particles.StandardModel.AnomalyCancellation.FamilyMaps public import Physlib.Particles.StandardModel.AnomalyCancellation.NoGrav.Basic @@ -324,7 +325,6 @@ public import Physlib.Relativity.Fermions.Weyl.Contraction public import Physlib.Relativity.Fermions.Weyl.DualLeftHanded public import Physlib.Relativity.Fermions.Weyl.DualRightHanded public import Physlib.Relativity.Fermions.Weyl.Duals -public import Physlib.Relativity.Fermions.Weyl.EffectivePotential public import Physlib.Relativity.Fermions.Weyl.LeftHanded public import Physlib.Relativity.Fermions.Weyl.Metric public import Physlib.Relativity.Fermions.Weyl.RightHanded diff --git a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean similarity index 99% rename from Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean rename to Physlib/Particles/PureFermionic/EffectivePotential.lean index 949955994..a56ec01e3 100644 --- a/Physlib/Relativity/Fermions/Weyl/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -11,11 +11,11 @@ public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis public import Physlib.Mathematics.ConjModule /-! -# The effective potential of Weyl fermions +# The effective potential for a left-handed Weyl fermion ## i. Overview -In this file are primary objective is to look at the potential +In this file our primary objective is to look at the potential of a single left-handed Weyl fermion, correctly taking account of the anti-commuting nature of the fermion. From df7bd337e6d02bc0a1234a5ef9c6706518c3d116 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 09:26:29 +0100 Subject: [PATCH 23/48] refactor: Clean up --- .../PureFermionic/EffectivePotential.lean | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index a56ec01e3..a8bdfe779 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -78,21 +78,21 @@ namespace EffectivePotential /-- The coordinate element corresponding to the i-th basis vector as a member of the effective potential. -/ -def ψ (i : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis i)) +def ψ (α : Fin 2) : EffectivePotential := + (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) /-- The coordinate element corresponding to the conjugate i-th basis vector as a member of the effective potential. -/ -def barψ (i : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis i)) +def barψ (α : Fin 2) : EffectivePotential := + (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) -@[simp] lemma ψ_mul_self (i : Fin 2) : ψ i * ψ i = 0 := ExteriorAlgebra.ι_sq_zero _ +@[simp] lemma ψ_mul_self (α : Fin 2) : ψ α * ψ α = 0 := ExteriorAlgebra.ι_sq_zero _ @[simp] lemma ψ_one_mul_ψ_zero_swap : ψ 1 * ψ 0 = - ψ 0 * ψ 1 := by rw [neg_mul, eq_neg_iff_add_eq_zero] exact ExteriorAlgebra.ι_add_mul_swap _ _ -@[simp] lemma barψ_mul_self (i : Fin 2) : barψ i * barψ i = 0 := ExteriorAlgebra.ι_sq_zero _ +@[simp] lemma barψ_mul_self (α : Fin 2) : barψ α * barψ α = 0 := ExteriorAlgebra.ι_sq_zero _ @[simp] lemma barψ_one_mul_barψ_zero_swap : barψ 1 * barψ 0 = - barψ 0 * barψ 1 := by rw [neg_mul, eq_neg_iff_add_eq_zero] @@ -115,14 +115,16 @@ lemma append_apply_three_eq : Fin.append ψ barψ 3 = barψ 1 := rfl ### A.2. Of a list -/ +/-- The term of the effective potential generated from a list + of `Fin 4`, which describe the components `[ψ 0, ψ 1, barψ 0, barψ 1]`. -/ def termOfList (l : List (Fin 4)) : EffectivePotential := (l.map (Fin.append ψ barψ)).prod @[simp] lemma termOfList_nil : termOfList [] = 1 := by simp [termOfList] -lemma termOfList_cons (l : List (Fin 4)) (i : Fin 4) : - termOfList (i :: l) = (Fin.append ψ barψ i) * termOfList l := by +lemma termOfList_cons (l : List (Fin 4)) (α : Fin 4) : + termOfList (α :: l) = (Fin.append ψ barψ α) * termOfList l := by simp only [termOfList, List.map_cons, List.prod_cons] /-! @@ -154,9 +156,10 @@ lemma basis_eq_termOfList (s : Finset (Fin 4)) : basis s = termOfList (s.sort ( simp [Finset.orderEmbOfFin_apply] /-! + ### A.4. The representation on the potential algebra --/ +-/ /-- The representation of the Lorentz group on `PotentialAlgebra`. -/ def rep : Representation ℂ SL(2, ℂ) EffectivePotential where @@ -182,7 +185,7 @@ lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : simp [rep] lemma rep_apply_ψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : - rep Λ (ψ i) = ∑ j, Λ⁻¹ i j • ψ j := by + rep Λ (ψ i) = ∑ (j : Fin 2), Λ⁻¹ i j • ψ j := by simp only [ψ, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, @@ -192,14 +195,14 @@ lemma rep_apply_ψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, -SpecialLinearGroup.coe_inv] -lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : - rep Λ (barψ i) = ∑ j, star (Λ⁻¹ i j) • barψ j := by +lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : + rep Λ (barψ α) = ∑ β, star (Λ⁻¹ α β) • barψ β := by simp only [barψ, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] refine LeftHandedWeyl.basis.conj.ext fun l => ?_ - fin_cases i <;> fin_cases l <;> + fin_cases α <;> fin_cases l <;> simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, -SpecialLinearGroup.coe_inv, Representation.conj_apply] @@ -210,9 +213,9 @@ lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List (Fin 4)) : | cons i l ih => simp [termOfList_cons, rep_mul, ih] -lemma rep_neg_apply_append (Λ : SL(2, ℂ)) (i : Fin 4) : - rep (- Λ) (Fin.append ψ barψ i) = (-1 : ℂ) • rep Λ (Fin.append ψ barψ i) := by - fin_cases i +lemma rep_neg_apply_append (Λ : SL(2, ℂ)) (α : Fin 4) : + rep (- Λ) (Fin.append ψ barψ α) = (-1 : ℂ) • rep Λ (Fin.append ψ barψ α) := by + fin_cases α all_goals simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum] abel @@ -234,7 +237,6 @@ lemma rep_neg_apply_basis (s : Finset (Fin 4)) (Λ : SL(2, ℂ)) : -/ - /-- An effective potential is Lorentz invariant if it is stable under the action of the Lorentz group. -/ def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V @@ -309,7 +311,7 @@ lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by -/ /-- If `V` is invariant, then all terms with an odd number of factors vanish. -/ -lemma even_of_isInvariant {V : EffectivePotential} {s : Finset (Fin 4)} (h : IsInvariant V) +lemma even_of_isInvariant {V : EffectivePotential} (s : Finset (Fin 4)) (h : IsInvariant V) (hs : Odd s.card) : basis.repr V s = 0 := by suffices h : basis.repr V s = (-1 : ℂ) ^ s.card * basis.repr V s by simpa [hs.neg_one_pow, CharZero.eq_neg_self_iff] using h @@ -371,12 +373,10 @@ lemma isInvariant_iff {V : EffectivePotential} : {0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}} by decide] repeat rw [Finset.sum_insert (by decide)] rw [Finset.sum_singleton] - rw [even_of_isInvariant (s := {0}) h (by decide), even_of_isInvariant (s := {1}) h (by decide), - even_of_isInvariant (s := {2}) h (by decide), even_of_isInvariant (s := {3}) h (by decide), - even_of_isInvariant (s := {0, 1, 2}) h (by decide), - even_of_isInvariant (s := {0, 1, 3}) h (by decide), - even_of_isInvariant (s := {0, 2, 3}) h (by decide), - even_of_isInvariant (s := {1, 2, 3}) h (by decide), + rw [even_of_isInvariant {0} h (by decide), even_of_isInvariant {1} h (by decide), + even_of_isInvariant {2} h (by decide), even_of_isInvariant {3} h (by decide), + even_of_isInvariant {0, 1, 2} h (by decide), even_of_isInvariant {0, 1, 3} h (by decide), + even_of_isInvariant {0, 2, 3} h (by decide), even_of_isInvariant {1, 2, 3} h (by decide), (zero_two_term_zero_of_isInvariant h).1, (zero_two_term_zero_of_isInvariant h).2.1, (zero_two_term_zero_of_isInvariant h).2.2.1, (zero_two_term_zero_of_isInvariant h).2.2.2] simp [add_assoc] From 75fa2260d5481f20de51fc8341ecf74129766fbe Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 12:24:53 +0100 Subject: [PATCH 24/48] feat: Add reality condition, --- Physlib/Mathematics/ConjModule.lean | 33 +++ .../PureFermionic/EffectivePotential.lean | 203 ++++++++++++++++++ 2 files changed, 236 insertions(+) diff --git a/Physlib/Mathematics/ConjModule.lean b/Physlib/Mathematics/ConjModule.lean index 109c4030a..0e1102274 100644 --- a/Physlib/Mathematics/ConjModule.lean +++ b/Physlib/Mathematics/ConjModule.lean @@ -53,6 +53,19 @@ conjugation ring endomorphism `starRingEnd k`. -/ instance instModule : Module k (ConjModule M) := Module.compHom M (starRingEnd k) +variable {A : Type*} [Ring A] + +instance : Ring (ConjModule A) := + let i1 : AddCommGroup (ConjModule A) := inferInstanceAs (AddCommGroup (ConjModule A)) + let i2 : Ring A := inferInstanceAs (Ring A) + { i1, i2 with } + +/-- The conjugate module of a `k`-algebra is a `k`-algebra: the same ring, with scalars +acting through `star`. -/ +instance instAlgebra [Algebra k A] : Algebra k (ConjModule A) := + Algebra.ofModule (fun r x y => smul_mul_assoc (β := A) (star r) x y) + (fun r x y => mul_smul_comm (β := A) (star r) x y) + end ConjModule /-- The canonical conjugate-linear equivalence `M ≃ₛₗ[starRingEnd k] ConjModule M`, the identity on @@ -65,6 +78,26 @@ def conjEquiv : M ≃ₛₗ[starRingEnd k] ConjModule M where left_inv _ := rfl right_inv _ := rfl +/-- The canonical conjugate-linear equivalence between the dual of a module `M` and + the dual of its conjugate. -/ +def conjDualEquiv : Module.Dual k M ≃ₛₗ[starRingEnd k] Module.Dual k (ConjModule M) where + toFun f := (starRingEnd k).toSemilinearMap.comp + (f.comp (conjEquiv (k := k) (M := M)).symm.toLinearMap) + invFun f := (starRingEnd k).toSemilinearMap.comp + (f.comp (conjEquiv (k := k) (M := M)).toLinearMap) + map_add' f g := by + ext x + simp + map_smul' r f := by + ext x + simp + left_inv f := by + ext x + simp + right_inv f := by + ext x + simp + namespace ConjModule /-- Conjugating twice returns the original module: the `k`-linear isomorphism diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index a8bdfe779..d5223472c 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -44,6 +44,11 @@ which is true to all orders. There is as of yet no reality condition on this potential. This is a TODO. +## References + +- https://physics.stackexchange.com/questions/506709 describes the mass term of a + Weyl fermion. + -/ @[expose] public section @@ -155,6 +160,8 @@ lemma basis_eq_termOfList (s : Finset (Fin 4)) : basis s = termOfList (s.sort ( refine congrArg List.prod (List.ext_getElem (by simp) fun i h1 h2 => ?_) simp [Finset.orderEmbOfFin_apply] +lemma basis_empty_eq_one : basis ∅ = 1 := by simp [basis_eq_termOfList] + /-! ### A.4. The representation on the potential algebra @@ -391,6 +398,202 @@ lemma isInvariant_iff {V : EffectivePotential} : apply_rules [IsInvariant.add, IsInvariant.smul, IsInvariant.one, ψ_zero_mul_ψ_one_isInvariant, barψ_zero_mul_barψ_one_isInvariant, quartic_isInvariant] +/-! + +## C. Coefficent list + +-/ + +/-- The coefficients of an effective potential relevant for invariant potentials, as a + linear map: the coefficients of `1`, `ψ 0 * ψ 1`, `barψ 0 * barψ 1` and + `ψ 0 * ψ 1 * barψ 0 * barψ 1`. -/ +def invCoeffList : EffectivePotential →ₗ[ℂ] (Fin 4 → ℂ) := + LinearMap.pi ![basis.coord ∅, basis.coord {0, 1}, basis.coord {2, 3}, basis.coord {0, 1, 2, 3}] + +@[simp] +lemma invCoeffList_one : invCoeffList 1 = ![1, 0, 0, 0] := by + rw [← basis_empty_eq_one] + ext i + fin_cases i <;> simp [invCoeffList] + +@[simp] +lemma invCoeffList_ψ_zero_mul_ψ_one : invCoeffList (ψ 0 * ψ 1) = ![0, 1, 0, 0] := by + trans invCoeffList (basis {0, 1}) + · congr + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, Finset.sort_insert, ψ] + rfl + ext i + fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] + · decide + · decide + +@[simp] +lemma invCoeffList_barψ_zero_mul_barψ_one : invCoeffList (barψ 0 * barψ 1) = ![0, 0, 1, 0] := by + trans invCoeffList (basis {2, 3}) + · congr + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, barψ] + rfl + ext i + fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] + · decide + · decide + +@[simp] +lemma invCoeffList_quartic : invCoeffList (ψ 0 * ψ 1 * barψ 0 * barψ 1) = ![0, 0, 0, 1] := by + trans invCoeffList (basis {0, 1, 2, 3}) + · congr + rw [basis, ExteriorAlgebra.basis_apply]; + simp [ExteriorAlgebra.ιMulti_apply, + Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, + ψ, barψ, mul_assoc]; + rfl + ext i + fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] + · decide + · decide + +lemma invCoeffList_injective {V1 V2 : EffectivePotential} (h1 : IsInvariant V1) + (h2 : IsInvariant V2) (h : invCoeffList V1 = invCoeffList V2) : V1 = V2 := by + obtain ⟨c1, m11, m21, ρ1, rfl⟩ := isInvariant_iff.1 h1 + obtain ⟨c2, m12, m22, ρ2, rfl⟩ := isInvariant_iff.1 h2 + simp at h + rcases h with ⟨rfl, rfl, rfl, rfl⟩ + rfl + +/-! + +## D. Conjugation + +-/ + +/-- The conjugation operator on the effective potential. + This takes the complex conjugate of the coefficients, swaps the generators `ψ α` and `barψ α`, and reverses the order of products. -/ +def conjugate : EffectivePotential →ₛₗ[starRingEnd ℂ] EffectivePotential := + let conjSwap : + (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + →ₛₗ[starRingEnd ℂ] + Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl) := + { toFun := Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap + map_add' p q := by simp [Prod.ext_iff] + map_smul' c p := by simp [Prod.ext_iff, map_smulₛₗ]} + CliffordAlgebra.reverse.comp <| + (conjEquiv (k := ℂ)).symm.comp <| + (ExteriorAlgebra.lift ℂ + ⟨(conjEquiv (k := ℂ)).comp ((ExteriorAlgebra.ι ℂ).comp conjSwap), + fun v => ExteriorAlgebra.ι_sq_zero _⟩).toLinearMap + +lemma conjugate_eq_comp_algebra_map : ∃ (A: EffectivePotential →ₐ[ℂ] ConjModule EffectivePotential), + conjugate = CliffordAlgebra.reverse.comp ((conjEquiv (k := ℂ)).symm.comp A.toLinearMap) := by + let conjSwap : + (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + →ₛₗ[starRingEnd ℂ] + Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl) := + { toFun := Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap + map_add' p q := by simp [Prod.ext_iff] + map_smul' c p := by simp [Prod.ext_iff, map_smulₛₗ]} + use ExteriorAlgebra.lift ℂ + ⟨(conjEquiv (k := ℂ)).comp ((ExteriorAlgebra.ι ℂ).comp conjSwap), + fun v => ExteriorAlgebra.ι_sq_zero _⟩ + rfl + +lemma conjugate_apply_ι (v : Dual ℂ LeftHandedWeyl × Dual ℂ (ConjModule LeftHandedWeyl)) : + conjugate (ExteriorAlgebra.ι ℂ v) = + (CliffordAlgebra.reverse <| conjEquiv (k := ℂ) <| + ExteriorAlgebra.ι ℂ <| Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap <| v) := by + simp [conjugate] + erw [AlgHom.toLinearMap_apply] + rw [ExteriorAlgebra.lift_ι_apply] + rfl + +@[simp] +lemma conjugate_one : conjugate 1 = 1 := by + simp [conjugate] + erw [AlgHom.toLinearMap_apply] + rw [map_one] + exact CliffordAlgebra.reverse.map_one + +@[simp] +lemma conjugate_algebraMap (c : ℂ) : conjugate (algebraMap ℂ EffectivePotential c) = + algebraMap ℂ EffectivePotential (starRingEnd ℂ c) := by + simp [Algebra.algebraMap_eq_smul_one] + +lemma conjugate_mul (V W : EffectivePotential) : + conjugate (V * W) = conjugate W * conjugate V := by + obtain ⟨A, hA⟩ := conjugate_eq_comp_algebra_map + simp [hA] + erw [AlgHom.coe_toLinearMap, AlgHom.toLinearMap_apply] + simp [conjEquiv] + erw [CliffordAlgebra.reverse.map_mul] + +@[simp] +lemma conjugate_conjugate (V : EffectivePotential) : conjugate (conjugate V) = V := by + induction' V using ExteriorAlgebra.induction with r v a b ha hb a b ha hb + · simp [conjugate_algebraMap] + · simp [conjugate_apply_ι, conjEquiv] + obtain ⟨fst, snd⟩ := v + simp_all only [Prod.swap_prod_mk, Prod.map_apply, LinearEquiv.symm_apply_apply, LinearEquiv.apply_symm_apply] + · simp [conjugate_mul, ha, hb] + · simp [ha, hb] + +lemma conjugate_injective : Function.Injective conjugate := by + intro V W h + have h' : conjugate (conjugate V) = conjugate (conjugate W) := by rw [h] + simp only [conjugate_conjugate] at h' + exact h' + +@[simp] +lemma conjugate_ψ (α : Fin 2) : conjugate (ψ α) = barψ α := by + simp [ψ, conjugate_apply_ι] + trans CliffordAlgebra.reverse (barψ α) + · congr 1 + simp only [conjEquiv, LinearEquiv.coe_mk, LinearMap.coe_mk, AddHom.coe_mk, barψ, + Basis.coe_dualBasis, LinearMap.coe_inr, ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] + rfl + simp [barψ] + +@[simp] +lemma conjugate_barψ (α : Fin 2) : conjugate (barψ α) = ψ α := by + apply conjugate_injective + simp [conjugate_ψ] + +/-! + +## E. Reality condition + +-/ + +/-- The effective potential is real if it is equal to its conjugate. -/ +def IsReal (V : EffectivePotential) : Prop := conjugate V = V + +lemma isReal_iff {V : EffectivePotential} : IsReal V ↔ conjugate V = V := by rfl + +/-- The necessary and sufficent condition for a real potential to be + invariant under the Lorentz group. -/ +lemma isInvariant_iff_of_isReal {V : EffectivePotential} (h : IsReal V) : + IsInvariant V ↔ ∃ (c : ℝ), ∃ (m : ℂ), ∃ (ρ : ℝ), V = + c • 1 + m • ψ 0 * ψ 1 - star m • barψ 0 * barψ 1 + ρ • (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by + rw [isInvariant_iff] + constructor + · rintro ⟨c, m1, m2, ρ, rfl⟩ + simp [isReal_iff, conjugate_mul, ← mul_assoc] at h + have h1 := congrArg invCoeffList h + simp at h1 + rcases h1 with ⟨h1, h2, rfl, h3⟩ + use c.re, m1, ρ.re + have hc : c = (c.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h1)] + have hρ : ρ = (ρ.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h3)] + rw [hc, hρ] + simp only [coe_smul, Fin.isValue, neg_smul, ofReal_re, Algebra.smul_mul_assoc, RCLike.star_def, + add_left_inj] + abel + · rintro ⟨c, m1, ρ, rfl⟩ + use c, m1, -star m1, ρ + simp + abel + end EffectivePotential end From 7e0c4af54b1894192e85963e412bfda823d7f70a Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:30:33 +0100 Subject: [PATCH 25/48] lemma: Add some small results --- .../PureFermionic/EffectivePotential.lean | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index d5223472c..ed76ac00a 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -9,6 +9,7 @@ public import Physlib.Relativity.Fermions.Weyl.Metric public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis public import Physlib.Mathematics.ConjModule +public import Mathlib.RingTheory.GradedAlgebra.Basic /-! # The effective potential for a left-handed Weyl fermion @@ -162,6 +163,30 @@ lemma basis_eq_termOfList (s : Finset (Fin 4)) : basis s = termOfList (s.sort ( lemma basis_empty_eq_one : basis ∅ = 1 := by simp [basis_eq_termOfList] +lemma ψ_zero_eq_basis : ψ 0 = basis {0} := by + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, ψ] + rfl + +lemma ψ_one_eq_basis : ψ 1 = basis {1} := by + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, ψ] + rfl + +lemma barψ_zero_eq_basis : barψ 0 = basis {2} := by + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, barψ] + rfl + +lemma barψ_one_eq_basis : barψ 1 = basis {3} := by + rw [basis, ExteriorAlgebra.basis_apply] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, barψ] + rfl + /-! ### A.4. The representation on the potential algebra @@ -434,7 +459,8 @@ lemma invCoeffList_barψ_zero_mul_barψ_one : invCoeffList (barψ 0 * barψ 1) = trans invCoeffList (basis {2, 3}) · congr rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, barψ] + simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, + Finset.orderEmbOfFin_apply, Finset.sort_insert, barψ] rfl ext i fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] @@ -470,7 +496,8 @@ lemma invCoeffList_injective {V1 V2 : EffectivePotential} (h1 : IsInvariant V1) -/ /-- The conjugation operator on the effective potential. - This takes the complex conjugate of the coefficients, swaps the generators `ψ α` and `barψ α`, and reverses the order of products. -/ + This takes the complex conjugate of the coefficients, swaps the generators `ψ α` and `barψ α`, + and reverses the order of products. -/ def conjugate : EffectivePotential →ₛₗ[starRingEnd ℂ] EffectivePotential := let conjSwap : (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) @@ -534,7 +561,8 @@ lemma conjugate_conjugate (V : EffectivePotential) : conjugate (conjugate V) = V · simp [conjugate_algebraMap] · simp [conjugate_apply_ι, conjEquiv] obtain ⟨fst, snd⟩ := v - simp_all only [Prod.swap_prod_mk, Prod.map_apply, LinearEquiv.symm_apply_apply, LinearEquiv.apply_symm_apply] + simp_all only [Prod.swap_prod_mk, Prod.map_apply, LinearEquiv.symm_apply_apply, + LinearEquiv.apply_symm_apply] · simp [conjugate_mul, ha, hb] · simp [ha, hb] From b30f9092e8e59edf437b4e1718e012728f5578fe Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:09:34 +0100 Subject: [PATCH 26/48] Update EffectivePotential.lean --- .../PureFermionic/EffectivePotential.lean | 363 +++++++++++++++--- 1 file changed, 299 insertions(+), 64 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index ed76ac00a..3fd708c8d 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -38,13 +38,11 @@ so we could equivalently define the effective potential as `ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We have done the former here as it generalises to other cases. -On `PotentialAlgebra` we define a representation of the Lorentz group, and prove that that +On `EffectivePotential` we define a representation of the Lorentz group, and prove that that if the potential is invariant under the Lorentz group it must be of the form `c + m1 * ψ 0 * ψ 1 + m2 * barψ 0 * barψ 1 + λ * ψ 0 * ψ 1 * barψ 0 * barψ 1`, which is true to all orders. -There is as of yet no reality condition on this potential. This is a TODO. - ## References - https://physics.stackexchange.com/questions/506709 describes the mass term of a @@ -65,7 +63,7 @@ open CategoryTheory.MonoidalCategory /-! -## A. The Potential algebra for Weyl fermions +## A. The effective potential for Weyl fermions -/ @@ -76,6 +74,110 @@ abbrev EffectivePotential : Type := ExteriorAlgebra ℂ namespace EffectivePotential +/-! + +### A. The representation on the effective potential + +-/ + +/-- The representation of the Lorentz group (here `SL(2, ℂ)`) on `EffectivePotential`. -/ +def rep : Representation ℂ SL(2, ℂ) EffectivePotential where + toFun Λ := (ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap + (LeftHandedWeyl.rep.conj.dual Λ))).toLinearMap + map_one' := by + simp only [map_one, End.one_eq_id, LinearMap.prodMap_id, ExteriorAlgebra.map_id, + AlgHom.toLinearMap_id] + map_mul' Λ1 Λ2 := by + simp only [map_mul, End.mul_eq_comp, ← LinearMap.prodMap_comp, ← ExteriorAlgebra.map_comp_map, + AlgHom.comp_toLinearMap] + +lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : + rep Λ V = ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap + (LeftHandedWeyl.rep.conj.dual Λ)) V := rfl + +@[simp] +lemma rep_apply_one (Λ : SL(2, ℂ)) : rep Λ 1 = 1 := by + simp [rep_apply] + +lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : + rep Λ (V * W) = rep Λ V * rep Λ W:= by + simp [rep] + +end EffectivePotential + +/-! + +### B. Field specification for the theory + +-/ + +inductive FieldSpecification : Type + | ψ (α : Fin 2) : FieldSpecification + | barψ (α : Fin 2) : FieldSpecification +deriving DecidableEq, Fintype + +namespace FieldSpecification + +open EffectivePotential + +def toEffectivePotential : FieldSpecification → EffectivePotential + | ψ (α : Fin 2) => + (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) + | barψ (α : Fin 2) => + (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) + +scoped notation "[" v "]ₑ" => toEffectivePotential v + +lemma toEffectivePotential_eq_ι : + (ψ : FieldSpecification) → ∃ v, [ψ]ₑ = ExteriorAlgebra.ι ℂ v + | ψ α => ⟨(LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)), by rfl⟩ + | barψ α => ⟨(LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)), by rfl⟩ + +lemma toEffectivePotential_ψ_eq (α : Fin 2) : [ψ α]ₑ = + ExteriorAlgebra.ι ℂ (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) := by rfl + +lemma toEffectivePotential_barψ_eq (α : Fin 2) : [barψ α]ₑ = + ExteriorAlgebra.ι ℂ (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) := by rfl + +@[simp] +lemma toEffectivePotential_mul_self (ψ : FieldSpecification) : [ψ]ₑ * [ψ]ₑ = 0 := by + obtain ⟨v, hv⟩ := toEffectivePotential_eq_ι ψ + simp [hv] + +lemma toEffectivePotential_mul_anti_commute (ψ χ : FieldSpecification) : + [ψ]ₑ * [χ]ₑ = - [χ]ₑ * [ψ]ₑ := by + obtain ⟨v, hv⟩ := toEffectivePotential_eq_ι ψ + obtain ⟨w, hw⟩ := toEffectivePotential_eq_ι χ + simp [hv, hw, neg_mul, eq_neg_iff_add_eq_zero] + +lemma rep_apply_toEffectivePotential_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : + rep Λ [ψ α]ₑ = ∑ (β : Fin 2), Λ⁻¹ α β • [ψ β]ₑ := by + simp only [toEffectivePotential_ψ_eq, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, + Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, + ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, + add_zero, ExteriorAlgebra.ι_inj, Prod.mk.injEq, and_true] + refine LeftHandedWeyl.basis.ext fun l => ?_ + fin_cases α <;> fin_cases l <;> + simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, + -SpecialLinearGroup.coe_inv] + +lemma rep_apply_toEffectivePotential_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : + rep Λ [barψ α]ₑ = ∑ β, star (Λ⁻¹ α β) • [barψ β]ₑ := by + simp only [toEffectivePotential_barψ_eq, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, + ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, + Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, + ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] + refine LeftHandedWeyl.basis.conj.ext fun l => ?_ + fin_cases α <;> fin_cases l <;> + simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, + -SpecialLinearGroup.coe_inv, Representation.conj_apply] + +end FieldSpecification + +namespace EffectivePotential + + + /-! ### A.1. The coordinate elements of the potential algebra @@ -104,17 +206,44 @@ def barψ (α : Fin 2) : EffectivePotential := rw [neg_mul, eq_neg_iff_add_eq_zero] exact ExteriorAlgebra.ι_add_mul_swap _ _ +abbrev ψbarψ : Fin 4 → EffectivePotential := Fin.append ψ barψ + +@[simp] +lemma ψbarψ_zero_eq_ψ_zero : ψbarψ 0 = ψ 0 := rfl + +@[simp] +lemma ψbarψ_one_eq_ψ_one : ψbarψ 1 = ψ 1 := rfl + @[simp] -lemma append_apply_zero_eq : Fin.append ψ barψ 0 = ψ 0 := rfl +lemma ψbarψ_two_eq_barψ_zero : ψbarψ 2 = barψ 0 := rfl @[simp] -lemma append_apply_one_eq : Fin.append ψ barψ 1 = ψ 1 := rfl +lemma ψbarψ_three_eq_barψ_one : ψbarψ 3 = barψ 1 := rfl @[simp] -lemma append_apply_two_eq : Fin.append ψ barψ 2 = barψ 0 := rfl +lemma ψbarψ_mul_self (α : Fin 4) : ψbarψ α * ψbarψ α = 0 := by + fin_cases α + · exact ψ_mul_self 0 + · exact ψ_mul_self 1 + · exact barψ_mul_self 0 + · exact barψ_mul_self 1 + +lemma ψbarψ_swap (α β : Fin 4) : ψbarψ α * ψbarψ β = - ψbarψ β * ψbarψ α := by + fin_cases α <;> fin_cases β <;> + simp [ψbarψ, neg_mul, eq_neg_iff_add_eq_zero] + <;> exact ExteriorAlgebra.ι_add_mul_swap _ _ @[simp] -lemma append_apply_three_eq : Fin.append ψ barψ 3 = barψ 1 := rfl +lemma ψbarψ_apply_zero_eq : ψbarψ 0 = ψ 0 := rfl + +@[simp] +lemma ψbarψ_apply_one_eq : ψbarψ 1 = ψ 1 := rfl + +@[simp] +lemma ψbarψ_apply_two_eq : ψbarψ 2 = barψ 0 := rfl + +@[simp] +lemma ψbarψ_apply_three_eq : ψbarψ 3 = barψ 1 := rfl /-! @@ -124,15 +253,40 @@ lemma append_apply_three_eq : Fin.append ψ barψ 3 = barψ 1 := rfl /-- The term of the effective potential generated from a list of `Fin 4`, which describe the components `[ψ 0, ψ 1, barψ 0, barψ 1]`. -/ def termOfList (l : List (Fin 4)) : EffectivePotential := - (l.map (Fin.append ψ barψ)).prod + (l.map ψbarψ).prod @[simp] lemma termOfList_nil : termOfList [] = 1 := by simp [termOfList] lemma termOfList_cons (l : List (Fin 4)) (α : Fin 4) : - termOfList (α :: l) = (Fin.append ψ barψ α) * termOfList l := by + termOfList (α :: l) = ψbarψ α * termOfList l := by simp only [termOfList, List.map_cons, List.prod_cons] +lemma termOfList_append (l₁ l₂ : List (Fin 4)) : + termOfList (l₁ ++ l₂) = termOfList l₁ * termOfList l₂ := by + simp [termOfList] + +lemma ψbarψ_mul_termOfList_mem (α : Fin 4) (l : List (Fin 4)) (h : α ∈ l) : + ψbarψ α * termOfList l = 0 := by + induction l with + | nil => simp at h + | cons β t ih => + rcases List.mem_cons.mp h with rfl | ha + · simp [termOfList_cons, ← mul_assoc] + · simp [termOfList_cons, ← mul_assoc, ψbarψ_swap α β] + simp [mul_assoc, ih ha] + +lemma termOfList_zero_of_not_nodup (l : List (Fin 4)) (h : ¬ l.Nodup) : + termOfList l = 0 := by + revert h + induction l with + | nil => intro h; exact absurd List.nodup_nil h + | cons a t ih => + intro h + rw [termOfList_cons] + by_cases hmem : a ∈ t + · exact ψbarψ_mul_termOfList_mem a t hmem + · rw [ih fun hn => h (List.nodup_cons.mpr ⟨hmem, hn⟩), mul_zero] /-! ### A.3. Basis @@ -187,45 +341,7 @@ lemma barψ_one_eq_basis : barψ 1 = basis {3} := by Finset.orderEmbOfFin_apply, barψ] rfl -/-! - -### A.4. The representation on the potential algebra - --/ - -/-- The representation of the Lorentz group on `PotentialAlgebra`. -/ -def rep : Representation ℂ SL(2, ℂ) EffectivePotential where - toFun Λ := (ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap - (LeftHandedWeyl.rep.conj.dual Λ))).toLinearMap - map_one' := by - simp only [map_one, End.one_eq_id, LinearMap.prodMap_id, ExteriorAlgebra.map_id, - AlgHom.toLinearMap_id] - map_mul' Λ1 Λ2 := by - simp only [map_mul, End.mul_eq_comp, ← LinearMap.prodMap_comp, ← ExteriorAlgebra.map_comp_map, - AlgHom.comp_toLinearMap] - -lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : - rep Λ V = ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap - (LeftHandedWeyl.rep.conj.dual Λ)) V := rfl -@[simp] -lemma rep_apply_one (Λ : SL(2, ℂ)) : rep Λ 1 = 1 := by - simp [rep_apply] - -lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : - rep Λ (V * W) = rep Λ V * rep Λ W:= by - simp [rep] - -lemma rep_apply_ψ_eq_sum (Λ : SL(2, ℂ)) (i : Fin 2) : - rep Λ (ψ i) = ∑ (j : Fin 2), Λ⁻¹ i j • ψ j := by - simp only [ψ, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, Representation.dual_apply, - ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, ← map_smul, Prod.smul_mk, - smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, - ExteriorAlgebra.ι_inj, Prod.mk.injEq, and_true] - refine LeftHandedWeyl.basis.ext fun l => ?_ - fin_cases i <;> fin_cases l <;> - simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, - -SpecialLinearGroup.coe_inv] lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : rep Λ (barψ α) = ∑ β, star (Λ⁻¹ α β) • barψ β := by @@ -263,6 +379,139 @@ lemma rep_neg_apply_basis (s : Finset (Fin 4)) (Λ : SL(2, ℂ)) : rep (- Λ) (basis s) = (-1 : ℂ) ^ s.card • rep Λ (basis s) := by simp [basis_eq_termOfList, rep_neg_apply_termOfList] +lemma rep_diagonal_apply_append (α : Fin 4) (c : ℂˣ) : + rep ⟨diagonal ![c, c⁻¹], by simp⟩ (Fin.append ψ barψ α) = + (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c] α) • Fin.append ψ barψ α := by + fin_cases α <;> simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum, Finset.univ_fin2] + all_goals simp [Finset.pair_comm] + +lemma rep_diagonal_apply_termOfList (l : List (Fin 4)) (c : ℂˣ) : + rep ⟨diagonal ![c, c⁻¹], by simp⟩ (termOfList l) = + ((l.map (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c])).prod) • termOfList l := by + induction l with + | nil => simp + | cons i l ih => + simp [termOfList_cons, rep_mul, ih, rep_diagonal_apply_append, smul_smul, mul_comm] + +lemma rep_diagonal_apply_basis (s : Finset (Fin 4)) (c : ℂˣ) : + rep ⟨diagonal ![c, c⁻¹], by simp⟩ (basis s) = + (∏ i ∈ s, (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c] i)) • basis s := by + rw [basis_eq_termOfList, rep_diagonal_apply_termOfList, ← Finset.prod_map_toList _, + ((Finset.sort_perm_toList _ fun x1 x2 => x1 ≤ x2).map _).prod_eq] + +/-! + +### A.5. Multidegrees + +Since ψ fields rotate among themselves under the action of the Lorentz group, +and barψ fields rotate among themselves, it is natural to decompose +the effective potential into submodules which have a fixed number of ψ and barψ +fields appearing in them. The submodules are closed under the action of the +Lorentz group. + +-/ + +def FieldSpecification.ofIndex : Fin 4 → FieldSpecification + | 0 => FieldSpecification.ψ + | 1 => FieldSpecification.ψ + | 2 => FieldSpecification.barψ + | 3 => FieldSpecification.barψ + +/-- The submodules of `EffectivePotential` which have a fixed number of + `ψ` and `barψ` fields appearing in them. -/ +def multiDegreeSubmodule (d : Multiset FieldSpecification) : Submodule ℂ EffectivePotential := + Submodule.span ℂ {V | ∃ s : Finset (Fin 4), + (↑(s.val.map FieldSpecification.ofIndex) : Multiset FieldSpecification) = d ∧ basis s = V} + +lemma basis_mem_multiDegreeSubmodule (s : Finset (Fin 4)) : + basis s ∈ multiDegreeSubmodule ↑(s.val.map FieldSpecification.ofIndex) := + Submodule.subset_span ⟨s, rfl, rfl⟩ + +lemma termOfList_mem_multiDegreeSubmodule (l : List (Fin 4)) : + termOfList l ∈ multiDegreeSubmodule ↑(l.map FieldSpecification.ofIndex) := + Submodule.subset_span ⟨l.toFinset, by simp [Multiset.coe_toFinset, Multiset.map_map], by + simp [basis_eq_termOfList]⟩ +lemma one_mem_multiDegreeSubmodule_zero : (1 : EffectivePotential) ∈ multiDegreeSubmodule 0 := + Submodule.subset_span ⟨∅, rfl, by simp [basis_empty_eq_one]⟩ + +lemma append_mem_multiDegreeSubmodule (α : Fin 4) : + Fin.append ψ barψ α ∈ multiDegreeSubmodule {FieldSpecification.ofIndex α} := + Submodule.subset_span ⟨{α}, rfl, by + fin_cases α <;> + simp [ψ_zero_eq_basis, barψ_zero_eq_basis, ψ_one_eq_basis, barψ_one_eq_basis]⟩ + +lemma ψ_mem_multiDegreeSubmodule (i : Fin 2) : + ψ i ∈ multiDegreeSubmodule {FieldSpecification.ψ} := by + fin_cases i + · exact append_mem_multiDegreeSubmodule 0 + · exact append_mem_multiDegreeSubmodule 1 + +lemma barψ_mem_multiDegreeSubmodule (i : Fin 2) : + barψ i ∈ multiDegreeSubmodule {FieldSpecification.barψ} := by + fin_cases i + · exact append_mem_multiDegreeSubmodule 2 + · exact append_mem_multiDegreeSubmodule 3 + +lemma rep_basis_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (s : Finset (Fin 4)) : + rep Λ (basis s) ∈ multiDegreeSubmodule ↑(s.val.map FieldSpecification.ofIndex) := by + sorry + +/-! + +### A.6. Stability of multidegrees under the group action + +-/ + +lemma rep_ψ_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (i : Fin 2) : + rep Λ (ψ i) ∈ multiDegreeSubmodule {FieldSpecification.ψ} := by + rw [rep_apply_ψ_eq_sum] + exact Submodule.sum_mem _ fun j _ => + Submodule.smul_mem _ _ (ψ_mem_multiDegreeSubmodule j) + +lemma rep_barψ_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (i : Fin 2) : + rep Λ (barψ i) ∈ multiDegreeSubmodule {FieldSpecification.barψ} := by + rw [rep_apply_barψ_eq_sum] + exact Submodule.sum_mem _ fun j _ => + Submodule.smul_mem _ _ (barψ_mem_multiDegreeSubmodule j) + +lemma rep_append_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (α : Fin 4) : + rep Λ (Fin.append ψ barψ α) ∈ multiDegreeSubmodule {FieldSpecification.ofIndex α} := + match α with + | 0 => rep_ψ_mem_multiDegreeSubmodule Λ 0 + | 1 => rep_ψ_mem_multiDegreeSubmodule Λ 1 + | 2 => rep_barψ_mem_multiDegreeSubmodule Λ 0 + | 3 => rep_barψ_mem_multiDegreeSubmodule Λ 1 + +lemma rep_termOfList_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (l : List (Fin 4)) : + rep Λ (termOfList l) ∈ multiDegreeSubmodule ↑(l.map FieldSpecification.ofIndex) := by + induction l with + | nil => simpa using one_mem_multiDegreeSubmodule_zero + | cons α l ih => + rw [termOfList_cons, rep_mul] + simpa [Multiset.singleton_add] using + mul_mem_multiDegreeSubmodule (rep_append_mem_multiDegreeSubmodule Λ α) ih + +/-- The multidegree submodules are stable under the action of the Lorentz group. -/ +lemma rep_mem_multiDegreeSubmodule {d : Multiset FieldSpecification} (Λ : SL(2, ℂ)) + {V : EffectivePotential} (hV : V ∈ multiDegreeSubmodule d) : + rep Λ V ∈ multiDegreeSubmodule d := by + induction hV using Submodule.span_induction with + | mem x hx => + obtain ⟨l, hl, rfl⟩ := hx + exact hl ▸ rep_termOfList_mem_multiDegreeSubmodule Λ l + | zero => simp + | add a b _ _ ha hb => rw [map_add]; exact add_mem ha hb + | smul c a _ ha => rw [map_smul]; exact Submodule.smul_mem _ _ ha + +/-- The multidegree submodules are sent to themselves under the action + of the Lorentz group. -/ +lemma multiDegreeSubmodule_map_rep (Λ : SL(2, ℂ)) (d : Multiset FieldSpecification) : + (multiDegreeSubmodule d).map (rep Λ) = multiDegreeSubmodule d := by + refine le_antisymm (Submodule.map_le_iff_le_comap.2 fun V hV => + rep_mem_multiDegreeSubmodule Λ hV) fun V hV => ?_ + refine ⟨rep Λ⁻¹ V, rep_mem_multiDegreeSubmodule Λ⁻¹ hV, ?_⟩ + rw [← Module.End.mul_apply, ← map_mul, mul_inv_cancel, map_one, Module.End.one_apply] + /-! ## B. Invariance under the Lorentz group @@ -376,22 +625,8 @@ lemma zero_two_term_zero_of_isInvariant {V : EffectivePotential} (h : IsInvarian simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm, Finset.prod_pair hab] by_contra hne exact hd (mul_right_cancel₀ hne (by linear_combination -h1)) - suffices Λ_termOfList : ∀ (l : List (Fin 4)), - rep Λ (termOfList l) = (l.map d).prod • termOfList l by - intro t - rw [basis_eq_termOfList, Λ_termOfList, ← Finset.prod_map_toList t, - ((Finset.sort_perm_toList t fun x1 x2 => x1 ≤ x2).map d).prod_eq] - suffices Λ_append : ∀ (i : Fin 4), rep Λ (Fin.append ψ barψ i) = d i • Fin.append ψ barψ i by - intro l - induction l with - | nil => simp - | cons i l ih => simp [termOfList_cons, rep_mul, ih, Λ_append, smul_smul, mul_comm] - intro i - fin_cases i - all_goals - simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum, d, adjugate_fin_two, Λ, - neg_smul, Complex.conj_ofNat] - try module + sorry + lemma isInvariant_iff {V : EffectivePotential} : IsInvariant V ↔ ∃ (c m1 m2 ρ : ℂ), V = c • 1 + m1 • (ψ 0 * ψ 1) + m2 • (barψ 0 * barψ 1) + From 294cbf02418c068a1ba0046c17429ca9e5cee784 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Wed, 15 Jul 2026 15:52:34 +0100 Subject: [PATCH 27/48] feat: Updated, but not complete --- .../PureFermionic/EffectivePotential.lean | 412 +++++++++++++++++- 1 file changed, 395 insertions(+), 17 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index 3fd708c8d..4bc6eb8b2 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -114,41 +114,56 @@ end EffectivePotential inductive FieldSpecification : Type | ψ (α : Fin 2) : FieldSpecification | barψ (α : Fin 2) : FieldSpecification -deriving DecidableEq, Fintype +deriving DecidableEq namespace FieldSpecification open EffectivePotential -def toEffectivePotential : FieldSpecification → EffectivePotential - | ψ (α : Fin 2) => - (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) - | barψ (α : Fin 2) => - (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) +instance : Fintype FieldSpecification where + elems := {ψ 0, ψ 1, barψ 0, barψ 1} + complete := by + intro x + match x with + | ψ 0 => simp + | ψ 1 => simp + | barψ 0 => simp + | barψ 1 => simp + +def toSumFin : FieldSpecification ≃ Fin 2 ⊕ Fin 2 where + toFun := fun | .ψ (α : Fin 2) => Sum.inl α | .barψ α => Sum.inr α + invFun := fun | .inl α => ψ α | .inr α => barψ α + left_inv ψ := by + fin_cases ψ <;> simp + right_inv x := by fin_cases x <;> simp + +def moduleBasis : Basis FieldSpecification ℂ + (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) := + (LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex toSumFin.symm + +def toEffectivePotential (ψ : FieldSpecification) : EffectivePotential := + ExteriorAlgebra.ι ℂ (moduleBasis ψ) scoped notation "[" v "]ₑ" => toEffectivePotential v -lemma toEffectivePotential_eq_ι : - (ψ : FieldSpecification) → ∃ v, [ψ]ₑ = ExteriorAlgebra.ι ℂ v - | ψ α => ⟨(LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)), by rfl⟩ - | barψ α => ⟨(LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)), by rfl⟩ +lemma toEffectivePotential_eq (ψ : FieldSpecification) : + toEffectivePotential ψ = ExteriorAlgebra.ι ℂ (moduleBasis ψ) := rfl lemma toEffectivePotential_ψ_eq (α : Fin 2) : [ψ α]ₑ = - ExteriorAlgebra.ι ℂ (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) := by rfl + ExteriorAlgebra.ι ℂ (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) := by + fin_cases α <;> simp [toEffectivePotential_eq, moduleBasis, toSumFin] lemma toEffectivePotential_barψ_eq (α : Fin 2) : [barψ α]ₑ = - ExteriorAlgebra.ι ℂ (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) := by rfl + ExteriorAlgebra.ι ℂ (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) := by + fin_cases α <;> simp [toEffectivePotential_eq, moduleBasis, toSumFin] @[simp] lemma toEffectivePotential_mul_self (ψ : FieldSpecification) : [ψ]ₑ * [ψ]ₑ = 0 := by - obtain ⟨v, hv⟩ := toEffectivePotential_eq_ι ψ - simp [hv] + simp [toEffectivePotential_eq] lemma toEffectivePotential_mul_anti_commute (ψ χ : FieldSpecification) : [ψ]ₑ * [χ]ₑ = - [χ]ₑ * [ψ]ₑ := by - obtain ⟨v, hv⟩ := toEffectivePotential_eq_ι ψ - obtain ⟨w, hw⟩ := toEffectivePotential_eq_ι χ - simp [hv, hw, neg_mul, eq_neg_iff_add_eq_zero] + simp [toEffectivePotential_eq, neg_mul, eq_neg_iff_add_eq_zero] lemma rep_apply_toEffectivePotential_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : rep Λ [ψ α]ₑ = ∑ (β : Fin 2), Λ⁻¹ α β • [ψ β]ₑ := by @@ -176,6 +191,369 @@ end FieldSpecification namespace EffectivePotential +open FieldSpecification + +/-! + +## Elements from a list of FieldSpecifications +-/ + +def termOfList (l : List FieldSpecification) : EffectivePotential := + (l.map toEffectivePotential).prod + +lemma termOfList_cons (ψ : FieldSpecification) (l : List FieldSpecification) : + termOfList (ψ :: l) = [ψ]ₑ * termOfList l := by simp [termOfList] + +@[simp] +lemma termOfList_nil : termOfList [] = 1 := by simp [termOfList] + +lemma termOfList_singleton (ψ : FieldSpecification) : termOfList [ψ] = [ψ]ₑ := by + simp [termOfList_cons] + +lemma termOfList_append (l1 l2 : List FieldSpecification) : + termOfList (l1 ++ l2) = termOfList l1 * termOfList l2 := by + simp [termOfList] + +lemma mul_termOfList_of_mem (ψ : FieldSpecification) (l : List FieldSpecification) + (hψ : ψ ∈ l) : [ψ]ₑ * termOfList l = 0 := by + induction l with + | nil => simp at hψ + | cons β t ih => + rcases List.mem_cons.mp hψ with rfl | ha + · simp [termOfList_cons, ← mul_assoc] + · simp [termOfList_cons, ← mul_assoc, toEffectivePotential_mul_anti_commute ψ β] + simp [mul_assoc, ih ha] + +lemma termOfList_zero_of_not_nodup (l : List FieldSpecification) (h : ¬ l.Nodup) : + termOfList l = 0 := by + revert h + induction l with + | nil => intro h; exact absurd List.nodup_nil h + | cons a t ih => + intro h + rw [termOfList_cons] + by_cases hmem : a ∈ t + · exact mul_termOfList_of_mem a t hmem + · rw [ih fun hn => h (List.nodup_cons.mpr ⟨hmem, hn⟩), mul_zero] + +lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List FieldSpecification) : + rep Λ (termOfList l) = ((l.map toEffectivePotential).map (rep Λ)).prod := by + induction l with + | nil => simp + | cons i l ih => + simp [termOfList_cons, rep_mul, ih] + +lemma mem_termOfList_span (V : EffectivePotential) : + V ∈ Submodule.span ℂ (Set.range termOfList) := by + induction V using ExteriorAlgebra.induction with + | algebraMap r => + rw [Algebra.algebraMap_eq_smul_one] + exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨[], termOfList_nil⟩) + | ι v => + rw [← Basis.sum_repr moduleBasis v, map_sum] + refine Submodule.sum_mem _ fun f _ => ?_ + rw [map_smul] + exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨[f], by simp [termOfList_singleton]; rfl⟩) + | mul a b ha hb => + induction ha using Submodule.span_induction with + | mem x hx => + obtain ⟨l1, rfl⟩ := hx + induction hb using Submodule.span_induction with + | mem y hy => + obtain ⟨l2, rfl⟩ := hy + exact Submodule.subset_span ⟨l1 ++ l2, termOfList_append l1 l2⟩ + | zero => simp + | add y z _ _ hy hz => rw [mul_add]; exact add_mem hy hz + | smul c y _ hy => rw [mul_smul_comm]; exact Submodule.smul_mem _ _ hy + | zero => simp + | add x y _ _ hx hy => rw [add_mul]; exact add_mem hx hy + | smul c x _ hx => rw [smul_mul_assoc]; exact Submodule.smul_mem _ _ hx + | add a b ha hb => exact add_mem ha hb + +lemma termOfList_perm {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : + ∃ c : ℂ, termOfList l1 = c • termOfList l2 := by + induction h with + | nil => exact ⟨1, by simp⟩ + | cons x _ ih => + obtain ⟨c, hc⟩ := ih + exact ⟨c, by rw [termOfList_cons, termOfList_cons, hc, mul_smul_comm]⟩ + | swap x y l => + refine ⟨-1, ?_⟩ + rw [termOfList_cons, termOfList_cons, termOfList_cons, termOfList_cons, ← mul_assoc, + toEffectivePotential_mul_anti_commute y x] + simp [mul_assoc] + | trans _ _ ih1 ih2 => + obtain ⟨c1, hc1⟩ := ih1 + obtain ⟨c2, hc2⟩ := ih2 + exact ⟨c1 * c2, by rw [hc1, hc2, smul_smul]⟩ + +lemma termOfList_eq_ιMulti (l : List FieldSpecification) : + termOfList l = ExteriorAlgebra.ιMulti ℂ l.length (fun i => moduleBasis (l.get i)) := by + induction l with + | nil => simp + | cons ψ l h => + simp [termOfList_cons, h] + rfl + +lemma termOfList_ofFn {n : ℕ} (g : Fin n → FieldSpecification) : + termOfList (List.ofFn g) = ExteriorAlgebra.ιMulti ℂ n (fun i => moduleBasis (g i)) := by + rw [ExteriorAlgebra.ιMulti_apply, termOfList, List.map_ofFn] + rfl + +/-! + +## Construction of a term from a tuple + +-/ + +def termOfTuple {n} (g : Fin n → FieldSpecification) : EffectivePotential := + termOfList (List.ofFn g) + +lemma termOfTuple_eq_ιMulti {n} (g : Fin n → FieldSpecification) : + termOfTuple g = ExteriorAlgebra.ιMulti ℂ n (fun i => moduleBasis (g i)) := by + rw [termOfTuple, termOfList_ofFn] + +lemma termOfTuple_perm {n} (g : Fin n → FieldSpecification) {i j : Fin n} (hij : i ≠ j) : + termOfTuple (g ∘ Equiv.swap i j) = - termOfTuple g := by + rw [termOfTuple_eq_ιMulti, termOfTuple_eq_ιMulti] + exact AlternatingMap.map_swap (ExteriorAlgebra.ιMulti ℂ n) (fun k => moduleBasis (g k)) hij + + +def termOfVectTuple {n} : + AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + EffectivePotential (Fin n) := ExteriorAlgebra.ιMulti ℂ n + +def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : + AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + EffectivePotential (Fin n) where + toMultilinearMap := + ∑ g : Fin n → FieldSpecification, + if Multiset.ofList (List.ofFn g) = s then + (LinearMap.toSpanSingleton ℂ EffectivePotential (termOfTuple g)).compMultilinearMap + ((MultilinearMap.mkPiAlgebra ℂ (Fin n) ℂ).compLinearMap fun i => moduleBasis.coord (g i)) + else 0 + map_eq_zero_of_eq' := by + sorry + +def coeff (s : Multiset FieldSpecification) : EffectivePotential →ₗ[ℂ] EffectivePotential := + ExteriorAlgebra.liftAlternating (coeffOfVectorTuple s) + +/-! + +## Submodules + +Without choosing an ordering on FieldSpecification we cannot +write down a basis of EffectivePotential. However, what we +can do it split EffectivePotential into submodules of dimension 1. +These submodules are determined by the set of field components which +appear in them. + +We will define the projection of an element in the effective +potential onto these submodules, and show that two elements of +the effective potential are equal if and only if all their projections +onto these submodules are equal. + +These are in general not invariant under the group action. +-/ + + +def SubmoduleOfSet (s : Multiset FieldSpecification) : Submodule ℂ EffectivePotential := + Submodule.span ℂ {V | ∃ (l : List FieldSpecification), Multiset.ofList l = s ∧ V = termOfList l} + +lemma termOfList_mem_submoduleOfSet (l : List FieldSpecification) : + termOfList l ∈ SubmoduleOfSet (Multiset.ofList l) := + Submodule.subset_span ⟨l, rfl, rfl⟩ + +lemma multiset_ofList_ofFn_comp_perm {n : ℕ} (g : Fin n → FieldSpecification) + (σ : Equiv.Perm (Fin n)) : + Multiset.ofList (List.ofFn (g ∘ σ)) = Multiset.ofList (List.ofFn g) := by + have hperm : (List.ofFn (⇑σ)).Perm (List.ofFn (id : Fin n → Fin n)) := + List.perm_of_nodup_nodup_toFinset_eq + (List.nodup_ofFn.mpr σ.injective) (List.nodup_ofFn.mpr fun _ _ h => h) + (by + ext k + simp only [List.mem_toFinset, List.mem_ofFn] + exact ⟨fun _ => ⟨k, rfl⟩, fun _ => ⟨σ.symm k, σ.apply_symm_apply k⟩⟩) + calc Multiset.ofList (List.ofFn (g ∘ σ)) + = Multiset.ofList ((List.ofFn (⇑σ)).map g) := by rw [List.map_ofFn] + _ = Multiset.ofList ((List.ofFn (id : Fin n → Fin n)).map g) := + Multiset.coe_eq_coe.2 (hperm.map g) + _ = Multiset.ofList (List.ofFn g) := by rw [List.map_ofFn]; rfl + +/-- The value of the projection onto `SubmoduleOfSet s` on a tuple of field specifications: + the term of the tuple if its multiset is `s`, and zero otherwise. -/ +def SubmoduleOfSet.tupleValue (s : Multiset FieldSpecification) {n : ℕ} + (g : Fin n → FieldSpecification) : SubmoduleOfSet s := + if h : Multiset.ofList (List.ofFn g) = s then + ⟨termOfList (List.ofFn g), h ▸ termOfList_mem_submoduleOfSet (List.ofFn g)⟩ else 0 + +lemma SubmoduleOfSet.tupleValue_comp_swap (s : Multiset FieldSpecification) {n : ℕ} + (g : Fin n → FieldSpecification) {i j : Fin n} (hij : i ≠ j) : + SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) = - SubmoduleOfSet.tupleValue s g := by + rw [SubmoduleOfSet.tupleValue, SubmoduleOfSet.tupleValue] + by_cases h : Multiset.ofList (List.ofFn g) = s + · rw [dif_pos h, dif_pos (by rw [multiset_ofList_ofFn_comp_perm]; exact h)] + apply Subtype.ext + show termOfList (List.ofFn (g ∘ Equiv.swap i j)) = -termOfList (List.ofFn g) + rw [termOfList_ofFn, termOfList_ofFn] + exact AlternatingMap.map_swap (ExteriorAlgebra.ιMulti ℂ n) + (fun k => moduleBasis (g k)) hij + · rw [dif_neg h, dif_neg (by rw [multiset_ofList_ofFn_comp_perm]; exact h), neg_zero] + +/-- The multilinear map underlying the projection onto `SubmoduleOfSet s` in degree `n`: + each tuple of vectors is expanded in `moduleBasis` and the coefficients of tuples of + field specifications with multiset `s` are collected. -/ +def SubmoduleOfSet.projMultilinear (s : Multiset FieldSpecification) (n : ℕ) : + MultilinearMap ℂ + (fun _ : Fin n => Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + (SubmoduleOfSet s) := + ∑ g : Fin n → FieldSpecification, + (LinearMap.toSpanSingleton ℂ (SubmoduleOfSet s) + (SubmoduleOfSet.tupleValue s g)).compMultilinearMap + ((MultilinearMap.mkPiAlgebra ℂ (Fin n) ℂ).compLinearMap fun i => moduleBasis.coord (g i)) + +lemma SubmoduleOfSet.projMultilinear_apply_basis (s : Multiset FieldSpecification) {n : ℕ} + (v : Fin n → FieldSpecification) : + SubmoduleOfSet.projMultilinear s n (fun i => moduleBasis (v i)) = + SubmoduleOfSet.tupleValue s v := by + rw [SubmoduleOfSet.projMultilinear, MultilinearMap.sum_apply] + simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, + MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply] + rw [Finset.sum_eq_single_of_mem v (Finset.mem_univ v)] + · have h1 : (∏ i, moduleBasis.coord (v i) (moduleBasis (v i))) = 1 := by + simp [Basis.coord_apply, Basis.repr_self] + rw [h1, one_smul] + · intro g _ hgv + obtain ⟨k, hk⟩ : ∃ k, g k ≠ v k := by + by_contra hcon + push Not at hcon + exact hgv (funext hcon) + have hzero : moduleBasis.coord (g k) (moduleBasis (v k)) = 0 := by + rw [Basis.coord_apply, Basis.repr_self, Finsupp.single_apply, if_neg (Ne.symm hk)] + rw [Finset.prod_eq_zero (Finset.mem_univ k) hzero, zero_smul] + +lemma SubmoduleOfSet.projMultilinear_map_eq_zero (s : Multiset FieldSpecification) {n : ℕ} + (v : Fin n → Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) + {i j : Fin n} (hv : v i = v j) (hij : i ≠ j) : + SubmoduleOfSet.projMultilinear s n v = 0 := by + have hvswap : ∀ k, v (Equiv.swap i j k) = v k := by + intro k + rcases eq_or_ne k i with rfl | hki + · rw [Equiv.swap_apply_left]; exact hv.symm + rcases eq_or_ne k j with rfl | hkj + · rw [Equiv.swap_apply_right]; exact hv + · rw [Equiv.swap_apply_of_ne_of_ne hki hkj] + have hinv : Function.Involutive + (fun g : Fin n → FieldSpecification => g ∘ ⇑(Equiv.swap i j)) := fun g => by + funext k + simp [Function.comp_apply, Equiv.swap_apply_self] + rw [SubmoduleOfSet.projMultilinear, MultilinearMap.sum_apply] + simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, + MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply] + set S := ∑ g : Fin n → FieldSpecification, + (∏ k, moduleBasis.coord (g k) (v k)) • SubmoduleOfSet.tupleValue s g with hS + have hre : S = ∑ g : Fin n → FieldSpecification, + (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) • + SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) := by + rw [hS] + refine Fintype.sum_equiv (Function.Involutive.toPerm _ hinv) _ _ fun g => ?_ + rw [Function.Involutive.coe_toPerm] + rw [show (g ∘ ⇑(Equiv.swap i j)) ∘ ⇑(Equiv.swap i j) = g from hinv g] + have hpair : ∀ g : Fin n → FieldSpecification, + (∏ k, moduleBasis.coord (g k) (v k)) • SubmoduleOfSet.tupleValue s g + + (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) • + SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) = 0 := by + intro g + have hcoef : (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) = + ∏ k, moduleBasis.coord (g k) (v k) := by + calc ∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k) + = ∏ k, moduleBasis.coord (g (Equiv.swap i j k)) (v (Equiv.swap i j k)) := + Finset.prod_congr rfl fun k _ => by rw [Function.comp_apply, hvswap] + _ = ∏ k, moduleBasis.coord (g k) (v k) := + Equiv.prod_comp (Equiv.swap i j) (fun k => moduleBasis.coord (g k) (v k)) + rw [hcoef, SubmoduleOfSet.tupleValue_comp_swap s g hij, smul_neg, add_neg_cancel] + have hSS : S + S = 0 := by + nth_rewrite 2 [hre] + rw [hS, ← Finset.sum_add_distrib] + exact Finset.sum_eq_zero fun g _ => hpair g + have h2 : (2 : ℂ) • S = 0 := by rw [two_smul]; exact hSS + have h3 : ((2 : ℂ)⁻¹ * 2) • S = 0 := by rw [mul_smul, h2, smul_zero] + rwa [show ((2 : ℂ)⁻¹ * 2) = 1 by norm_num, one_smul] at h3 + +/-- The alternating map underlying the projection onto `SubmoduleOfSet s` in degree `n`. -/ +def SubmoduleOfSet.projAlternating (s : Multiset FieldSpecification) (n : ℕ) : + (Module.Dual ℂ LeftHandedWeyl × + Module.Dual ℂ (ConjModule LeftHandedWeyl)) [⋀^Fin n]→ₗ[ℂ] SubmoduleOfSet s := + { SubmoduleOfSet.projMultilinear s n with + map_eq_zero_of_eq' := fun v _ _ hv hij => + SubmoduleOfSet.projMultilinear_map_eq_zero s v hv hij } + +lemma SubmoduleOfSet.projAlternating_apply (s : Multiset FieldSpecification) (n : ℕ) + (v : Fin n → Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) : + SubmoduleOfSet.projAlternating s n v = SubmoduleOfSet.projMultilinear s n v := rfl + +def SubmoduleOfSet.proj (s : Multiset FieldSpecification) : + EffectivePotential →ₗ[ℂ] SubmoduleOfSet s := + ExteriorAlgebra.liftAlternating (SubmoduleOfSet.projAlternating s) + +lemma SubmoduleOfSet.proj_apply_termOfList (s : Multiset FieldSpecification) + (l : List FieldSpecification) : + (SubmoduleOfSet.proj s (termOfList l) : EffectivePotential) = + if Multiset.ofList l = s then termOfList l else 0 := by + conv_lhs => rw [termOfList_eq_ιMulti] + rw [SubmoduleOfSet.proj, ExteriorAlgebra.liftAlternating_apply_ιMulti, + SubmoduleOfSet.projAlternating_apply, SubmoduleOfSet.projMultilinear_apply_basis] + simp only [SubmoduleOfSet.tupleValue, List.ofFn_get] + split_ifs with h + · rfl + · rfl + + +/-! + +## Gradings + +-/ + +variable {M : Type} [AddCommMonoid M] + + +def GradedSubmodule (g : FieldSpecification → M) (a : M) : Submodule ℂ EffectivePotential := + Submodule.span ℂ {V | ∃ (l : List FieldSpecification), (l.map g).sum = a ∧ V = termOfList l} + +lemma termOfList_mem_gradedSubmodule (g : FieldSpecification → M) (l : List FieldSpecification) : + termOfList l ∈ GradedSubmodule g ((l.map g).sum) := + Submodule.subset_span ⟨l, rfl, rfl⟩ + +lemma toEffectivePotential_mem_gradedSubmodule (g : FieldSpecification → M) + (f : FieldSpecification) : [f]ₑ ∈ GradedSubmodule g (g f) := by + simpa [termOfList_singleton] using termOfList_mem_gradedSubmodule g [f] + + +/-! + +## The irrep grading + +-/ + +def irrepGrading : FieldSpecification → ℤ × ℤ + | ψ _ => (1, 0) + | barψ _ => (0, 1) + +/-! + +## Mass dimension grading + +-/ + +def massDimGrading : FieldSpecification → ℚ := fun _ => 3/2 + + +/-! + +## Below here is old and WIP + +-/ /-! From 3826db6c3300fa9e3c51d30882f60f813e0ebddc Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 16 Jul 2026 08:32:26 +0100 Subject: [PATCH 28/48] feat: Add coeff --- .../PureFermionic/EffectivePotential.lean | 99 ++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index 4bc6eb8b2..2ca317a9a 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -130,6 +130,17 @@ instance : Fintype FieldSpecification where | barψ 0 => simp | barψ 1 => simp +/-! + +## Ordering on FieldSpecification + +We define an ordering on `FieldSpecification`. +This ordering is a choice, and nothing physical can depend on this choice. +We however make it as it simplifies the proofs of lots of lemmas, and +makes it easy to do more calculational aspects. + +-/ + def toSumFin : FieldSpecification ≃ Fin 2 ⊕ Fin 2 where toFun := fun | .ψ (α : Fin 2) => Sum.inl α | .barψ α => Sum.inr α invFun := fun | .inl α => ψ α | .inr α => barψ α @@ -137,6 +148,7 @@ def toSumFin : FieldSpecification ≃ Fin 2 ⊕ Fin 2 where fin_cases ψ <;> simp right_inv x := by fin_cases x <;> simp + def moduleBasis : Basis FieldSpecification ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) := (LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex toSumFin.symm @@ -333,11 +345,96 @@ def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : ((MultilinearMap.mkPiAlgebra ℂ (Fin n) ℂ).compLinearMap fun i => moduleBasis.coord (g i)) else 0 map_eq_zero_of_eq' := by - sorry + intro v i j hv hij + have hvswap : ∀ k, v (Equiv.swap i j k) = v k := by + intro k + rcases eq_or_ne k i with rfl | hki + · rw [Equiv.swap_apply_left]; exact hv.symm + rcases eq_or_ne k j with rfl | hkj + · rw [Equiv.swap_apply_right]; exact hv + · rw [Equiv.swap_apply_of_ne_of_ne hki hkj] + simp only [MultilinearMap.toFun_eq_coe, MultilinearMap.sum_apply] + refine Finset.sum_involution (fun g _ => g ∘ Equiv.swap i j) ?_ ?_ + (fun g _ => Finset.mem_univ _) ?_ + · intro g _ + have hms : Multiset.ofList (List.ofFn (g ∘ Equiv.swap i j)) = + Multiset.ofList (List.ofFn g) := + Multiset.coe_eq_coe.mpr ((Equiv.swap i j).ofFn_comp_perm g) + rw [hms] + split_ifs with h + · simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, + MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply, + Function.comp_apply] + have hprod : ∏ k, moduleBasis.coord (g (Equiv.swap i j k)) (v k) = + ∏ k, moduleBasis.coord (g k) (v k) := + calc ∏ k, moduleBasis.coord (g (Equiv.swap i j k)) (v k) + = ∏ k, moduleBasis.coord (g (Equiv.swap i j k)) (v (Equiv.swap i j k)) := + Finset.prod_congr rfl fun k _ => by rw [hvswap k] + _ = ∏ k, moduleBasis.coord (g k) (v k) := + Equiv.prod_comp (Equiv.swap i j) fun k => moduleBasis.coord (g k) (v k) + rw [hprod, termOfTuple_perm g hij, smul_neg, add_neg_cancel] + · simp + · intro g _ hfg hcontra + apply hfg + have hgji : g j = g i := by + simpa [Equiv.swap_apply_left] using congrFun hcontra i + have hterm : termOfTuple g = 0 := by + rw [termOfTuple_eq_ιMulti] + exact AlternatingMap.map_eq_zero_of_eq _ _ (by rw [hgji]) hij + split_ifs + · simp [hterm] + · simp + · intro g _ + funext k + simp [Function.comp, Equiv.swap_apply_self] def coeff (s : Multiset FieldSpecification) : EffectivePotential →ₗ[ℂ] EffectivePotential := ExteriorAlgebra.liftAlternating (coeffOfVectorTuple s) +lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) : + coeff s (termOfList l) = if Multiset.ofList l = s then termOfList l else 0 := by + have hterm : termOfTuple l.get = termOfList l := by rw [termOfTuple, List.ofFn_get] + rw [coeff, termOfList_eq_ιMulti, ExteriorAlgebra.liftAlternating_apply_ιMulti] + simp only [coeffOfVectorTuple, AlternatingMap.coe_mk, MultilinearMap.sum_apply] + refine (Finset.sum_eq_single l.get ?_ ?_).trans ?_ + · intro g _ hg + obtain ⟨i, hi⟩ := Function.ne_iff.mp hg + split_ifs with h + · simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, + MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply] + have hzero : ∏ k, moduleBasis.coord (g k) (moduleBasis (l.get k)) = 0 := + Finset.prod_eq_zero (Finset.mem_univ i) (by + rw [Basis.coord_apply, Basis.repr_self, Finsupp.single_eq_of_ne hi]) + rw [hzero, zero_smul] + · simp + · intro h + exact absurd (Finset.mem_univ _) h + · rw [List.ofFn_get] + split_ifs with h + · simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, + MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply, hterm] + have hprod : ∏ i, moduleBasis.coord (l.get i) (moduleBasis (l.get i)) = 1 := by simp + rw [hprod, one_smul] + exact termOfList_eq_ιMulti l + · simp + +lemma coeff_eq_zero_of_dup (s : Multiset FieldSpecification) (h : ¬ s.Nodup) + (V : EffectivePotential) : coeff s V = 0 := by + have hzero : coeffOfVectorTuple s = 0 := by + funext n + ext v + simp only [coeffOfVectorTuple, AlternatingMap.coe_mk, MultilinearMap.sum_apply] + refine Finset.sum_eq_zero fun g _ => ?_ + split_ifs with hs + · obtain ⟨i, j, hgij, hij⟩ := Function.not_injective_iff.mp fun hinj => + h (hs ▸ Multiset.coe_nodup.mpr (List.nodup_ofFn.mpr hinj)) + have hterm : termOfTuple g = 0 := by + rw [termOfTuple_eq_ιMulti] + exact AlternatingMap.map_eq_zero_of_eq _ _ (by rw [hgij]) hij + simp [hterm] + · simp + rw [coeff, hzero, map_zero, LinearMap.zero_apply] + /-! ## Submodules From ad55f01ae4b38bce39ac44f06b6ce5fc8fc43866 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:03:45 +0100 Subject: [PATCH 29/48] feat: UPdate with projections --- .../PureFermionic/EffectivePotential.lean | 1067 +++-------------- 1 file changed, 180 insertions(+), 887 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index 2ca317a9a..5cddef1b3 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -103,6 +103,39 @@ lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : rep Λ (V * W) = rep Λ V * rep Λ W:= by simp [rep] + +/-! + +## The invariance condition on + +-/ + +/-- An effective potential is Lorentz invariant if it is stable under the + action of the Lorentz group. -/ +def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V + +lemma IsInvariant.eq_iff {V : EffectivePotential} : + IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl + +lemma IsInvariant.add {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : + IsInvariant (V + W) := by + intro Λ + simp_all [IsInvariant.eq_iff] + +lemma IsInvariant.smul {V : EffectivePotential} (hV : IsInvariant V) (c : ℂ) : + IsInvariant (c • V) := by + intro Λ + simp_all [IsInvariant.eq_iff] + +lemma IsInvariant.mul {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : + IsInvariant (V * W) := by + intro Λ + simp_all [IsInvariant.eq_iff, rep_mul] + +lemma IsInvariant.one : IsInvariant 1 := by + intro Λ + simp [rep] + end EffectivePotential /-! @@ -199,6 +232,31 @@ lemma rep_apply_toEffectivePotential_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, -SpecialLinearGroup.coe_inv, Representation.conj_apply] +/-! + +## The irreps + +-/ + +inductive Irrep + | ψ + | barψ +deriving DecidableEq, Fintype + +def toIrrep : FieldSpecification → Irrep + | .ψ _ => .ψ + | .barψ _ => .barψ + +/-! + +## Mass dimension + +-/ + +def massDimension : FieldSpecification → ℕ + | .ψ _ => 3 / 2 + | .barψ _ => 3 / 2 + end FieldSpecification namespace EffectivePotential @@ -388,6 +446,18 @@ def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : funext k simp [Function.comp, Equiv.swap_apply_self] +/-! + +## Coefficents + +We can't define a basis on effective potential without choosing and ordering on the field +specification. To get around this, we can define the coefficient of an effective potential given a +multi-set of field specifications as a linear map which projects down onto a subspace spanned by +terms which are of the correct type. It actually projects down onto a one-dimensional subspace, and +this is where you can think of it as a coefficient. + +-/ + def coeff (s : Multiset FieldSpecification) : EffectivePotential →ₗ[ℂ] EffectivePotential := ExteriorAlgebra.liftAlternating (coeffOfVectorTuple s) @@ -418,919 +488,142 @@ lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSp exact termOfList_eq_ιMulti l · simp -lemma coeff_eq_zero_of_dup (s : Multiset FieldSpecification) (h : ¬ s.Nodup) - (V : EffectivePotential) : coeff s V = 0 := by - have hzero : coeffOfVectorTuple s = 0 := by - funext n - ext v - simp only [coeffOfVectorTuple, AlternatingMap.coe_mk, MultilinearMap.sum_apply] - refine Finset.sum_eq_zero fun g _ => ?_ - split_ifs with hs - · obtain ⟨i, j, hgij, hij⟩ := Function.not_injective_iff.mp fun hinj => - h (hs ▸ Multiset.coe_nodup.mpr (List.nodup_ofFn.mpr hinj)) - have hterm : termOfTuple g = 0 := by - rw [termOfTuple_eq_ιMulti] - exact AlternatingMap.map_eq_zero_of_eq _ _ (by rw [hgij]) hij - simp [hterm] - · simp - rw [coeff, hzero, map_zero, LinearMap.zero_apply] - -/-! - -## Submodules - -Without choosing an ordering on FieldSpecification we cannot -write down a basis of EffectivePotential. However, what we -can do it split EffectivePotential into submodules of dimension 1. -These submodules are determined by the set of field components which -appear in them. - -We will define the projection of an element in the effective -potential onto these submodules, and show that two elements of -the effective potential are equal if and only if all their projections -onto these submodules are equal. - -These are in general not invariant under the group action. --/ - - -def SubmoduleOfSet (s : Multiset FieldSpecification) : Submodule ℂ EffectivePotential := - Submodule.span ℂ {V | ∃ (l : List FieldSpecification), Multiset.ofList l = s ∧ V = termOfList l} - -lemma termOfList_mem_submoduleOfSet (l : List FieldSpecification) : - termOfList l ∈ SubmoduleOfSet (Multiset.ofList l) := - Submodule.subset_span ⟨l, rfl, rfl⟩ - -lemma multiset_ofList_ofFn_comp_perm {n : ℕ} (g : Fin n → FieldSpecification) - (σ : Equiv.Perm (Fin n)) : - Multiset.ofList (List.ofFn (g ∘ σ)) = Multiset.ofList (List.ofFn g) := by - have hperm : (List.ofFn (⇑σ)).Perm (List.ofFn (id : Fin n → Fin n)) := - List.perm_of_nodup_nodup_toFinset_eq - (List.nodup_ofFn.mpr σ.injective) (List.nodup_ofFn.mpr fun _ _ h => h) - (by - ext k - simp only [List.mem_toFinset, List.mem_ofFn] - exact ⟨fun _ => ⟨k, rfl⟩, fun _ => ⟨σ.symm k, σ.apply_symm_apply k⟩⟩) - calc Multiset.ofList (List.ofFn (g ∘ σ)) - = Multiset.ofList ((List.ofFn (⇑σ)).map g) := by rw [List.map_ofFn] - _ = Multiset.ofList ((List.ofFn (id : Fin n → Fin n)).map g) := - Multiset.coe_eq_coe.2 (hperm.map g) - _ = Multiset.ofList (List.ofFn g) := by rw [List.map_ofFn]; rfl - -/-- The value of the projection onto `SubmoduleOfSet s` on a tuple of field specifications: - the term of the tuple if its multiset is `s`, and zero otherwise. -/ -def SubmoduleOfSet.tupleValue (s : Multiset FieldSpecification) {n : ℕ} - (g : Fin n → FieldSpecification) : SubmoduleOfSet s := - if h : Multiset.ofList (List.ofFn g) = s then - ⟨termOfList (List.ofFn g), h ▸ termOfList_mem_submoduleOfSet (List.ofFn g)⟩ else 0 - -lemma SubmoduleOfSet.tupleValue_comp_swap (s : Multiset FieldSpecification) {n : ℕ} - (g : Fin n → FieldSpecification) {i j : Fin n} (hij : i ≠ j) : - SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) = - SubmoduleOfSet.tupleValue s g := by - rw [SubmoduleOfSet.tupleValue, SubmoduleOfSet.tupleValue] - by_cases h : Multiset.ofList (List.ofFn g) = s - · rw [dif_pos h, dif_pos (by rw [multiset_ofList_ofFn_comp_perm]; exact h)] - apply Subtype.ext - show termOfList (List.ofFn (g ∘ Equiv.swap i j)) = -termOfList (List.ofFn g) - rw [termOfList_ofFn, termOfList_ofFn] - exact AlternatingMap.map_swap (ExteriorAlgebra.ιMulti ℂ n) - (fun k => moduleBasis (g k)) hij - · rw [dif_neg h, dif_neg (by rw [multiset_ofList_ofFn_comp_perm]; exact h), neg_zero] - -/-- The multilinear map underlying the projection onto `SubmoduleOfSet s` in degree `n`: - each tuple of vectors is expanded in `moduleBasis` and the coefficients of tuples of - field specifications with multiset `s` are collected. -/ -def SubmoduleOfSet.projMultilinear (s : Multiset FieldSpecification) (n : ℕ) : - MultilinearMap ℂ - (fun _ : Fin n => Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - (SubmoduleOfSet s) := - ∑ g : Fin n → FieldSpecification, - (LinearMap.toSpanSingleton ℂ (SubmoduleOfSet s) - (SubmoduleOfSet.tupleValue s g)).compMultilinearMap - ((MultilinearMap.mkPiAlgebra ℂ (Fin n) ℂ).compLinearMap fun i => moduleBasis.coord (g i)) - -lemma SubmoduleOfSet.projMultilinear_apply_basis (s : Multiset FieldSpecification) {n : ℕ} - (v : Fin n → FieldSpecification) : - SubmoduleOfSet.projMultilinear s n (fun i => moduleBasis (v i)) = - SubmoduleOfSet.tupleValue s v := by - rw [SubmoduleOfSet.projMultilinear, MultilinearMap.sum_apply] - simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, - MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply] - rw [Finset.sum_eq_single_of_mem v (Finset.mem_univ v)] - · have h1 : (∏ i, moduleBasis.coord (v i) (moduleBasis (v i))) = 1 := by - simp [Basis.coord_apply, Basis.repr_self] - rw [h1, one_smul] - · intro g _ hgv - obtain ⟨k, hk⟩ : ∃ k, g k ≠ v k := by - by_contra hcon - push Not at hcon - exact hgv (funext hcon) - have hzero : moduleBasis.coord (g k) (moduleBasis (v k)) = 0 := by - rw [Basis.coord_apply, Basis.repr_self, Finsupp.single_apply, if_neg (Ne.symm hk)] - rw [Finset.prod_eq_zero (Finset.mem_univ k) hzero, zero_smul] - -lemma SubmoduleOfSet.projMultilinear_map_eq_zero (s : Multiset FieldSpecification) {n : ℕ} - (v : Fin n → Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - {i j : Fin n} (hv : v i = v j) (hij : i ≠ j) : - SubmoduleOfSet.projMultilinear s n v = 0 := by - have hvswap : ∀ k, v (Equiv.swap i j k) = v k := by - intro k - rcases eq_or_ne k i with rfl | hki - · rw [Equiv.swap_apply_left]; exact hv.symm - rcases eq_or_ne k j with rfl | hkj - · rw [Equiv.swap_apply_right]; exact hv - · rw [Equiv.swap_apply_of_ne_of_ne hki hkj] - have hinv : Function.Involutive - (fun g : Fin n → FieldSpecification => g ∘ ⇑(Equiv.swap i j)) := fun g => by - funext k - simp [Function.comp_apply, Equiv.swap_apply_self] - rw [SubmoduleOfSet.projMultilinear, MultilinearMap.sum_apply] - simp only [LinearMap.compMultilinearMap_apply, MultilinearMap.compLinearMap_apply, - MultilinearMap.mkPiAlgebra_apply, LinearMap.toSpanSingleton_apply] - set S := ∑ g : Fin n → FieldSpecification, - (∏ k, moduleBasis.coord (g k) (v k)) • SubmoduleOfSet.tupleValue s g with hS - have hre : S = ∑ g : Fin n → FieldSpecification, - (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) • - SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) := by - rw [hS] - refine Fintype.sum_equiv (Function.Involutive.toPerm _ hinv) _ _ fun g => ?_ - rw [Function.Involutive.coe_toPerm] - rw [show (g ∘ ⇑(Equiv.swap i j)) ∘ ⇑(Equiv.swap i j) = g from hinv g] - have hpair : ∀ g : Fin n → FieldSpecification, - (∏ k, moduleBasis.coord (g k) (v k)) • SubmoduleOfSet.tupleValue s g + - (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) • - SubmoduleOfSet.tupleValue s (g ∘ Equiv.swap i j) = 0 := by - intro g - have hcoef : (∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k)) = - ∏ k, moduleBasis.coord (g k) (v k) := by - calc ∏ k, moduleBasis.coord ((g ∘ Equiv.swap i j) k) (v k) - = ∏ k, moduleBasis.coord (g (Equiv.swap i j k)) (v (Equiv.swap i j k)) := - Finset.prod_congr rfl fun k _ => by rw [Function.comp_apply, hvswap] - _ = ∏ k, moduleBasis.coord (g k) (v k) := - Equiv.prod_comp (Equiv.swap i j) (fun k => moduleBasis.coord (g k) (v k)) - rw [hcoef, SubmoduleOfSet.tupleValue_comp_swap s g hij, smul_neg, add_neg_cancel] - have hSS : S + S = 0 := by - nth_rewrite 2 [hre] - rw [hS, ← Finset.sum_add_distrib] - exact Finset.sum_eq_zero fun g _ => hpair g - have h2 : (2 : ℂ) • S = 0 := by rw [two_smul]; exact hSS - have h3 : ((2 : ℂ)⁻¹ * 2) • S = 0 := by rw [mul_smul, h2, smul_zero] - rwa [show ((2 : ℂ)⁻¹ * 2) = 1 by norm_num, one_smul] at h3 - -/-- The alternating map underlying the projection onto `SubmoduleOfSet s` in degree `n`. -/ -def SubmoduleOfSet.projAlternating (s : Multiset FieldSpecification) (n : ℕ) : - (Module.Dual ℂ LeftHandedWeyl × - Module.Dual ℂ (ConjModule LeftHandedWeyl)) [⋀^Fin n]→ₗ[ℂ] SubmoduleOfSet s := - { SubmoduleOfSet.projMultilinear s n with - map_eq_zero_of_eq' := fun v _ _ hv hij => - SubmoduleOfSet.projMultilinear_map_eq_zero s v hv hij } - -lemma SubmoduleOfSet.projAlternating_apply (s : Multiset FieldSpecification) (n : ℕ) - (v : Fin n → Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) : - SubmoduleOfSet.projAlternating s n v = SubmoduleOfSet.projMultilinear s n v := rfl - -def SubmoduleOfSet.proj (s : Multiset FieldSpecification) : - EffectivePotential →ₗ[ℂ] SubmoduleOfSet s := - ExteriorAlgebra.liftAlternating (SubmoduleOfSet.projAlternating s) - -lemma SubmoduleOfSet.proj_apply_termOfList (s : Multiset FieldSpecification) - (l : List FieldSpecification) : - (SubmoduleOfSet.proj s (termOfList l) : EffectivePotential) = - if Multiset.ofList l = s then termOfList l else 0 := by - conv_lhs => rw [termOfList_eq_ιMulti] - rw [SubmoduleOfSet.proj, ExteriorAlgebra.liftAlternating_apply_ιMulti, - SubmoduleOfSet.projAlternating_apply, SubmoduleOfSet.projMultilinear_apply_basis] - simp only [SubmoduleOfSet.tupleValue, List.ofFn_get] - split_ifs with h - · rfl - · rfl - - -/-! - -## Gradings - --/ - -variable {M : Type} [AddCommMonoid M] - - -def GradedSubmodule (g : FieldSpecification → M) (a : M) : Submodule ℂ EffectivePotential := - Submodule.span ℂ {V | ∃ (l : List FieldSpecification), (l.map g).sum = a ∧ V = termOfList l} - -lemma termOfList_mem_gradedSubmodule (g : FieldSpecification → M) (l : List FieldSpecification) : - termOfList l ∈ GradedSubmodule g ((l.map g).sum) := - Submodule.subset_span ⟨l, rfl, rfl⟩ - -lemma toEffectivePotential_mem_gradedSubmodule (g : FieldSpecification → M) - (f : FieldSpecification) : [f]ₑ ∈ GradedSubmodule g (g f) := by - simpa [termOfList_singleton] using termOfList_mem_gradedSubmodule g [f] - - -/-! - -## The irrep grading - --/ - -def irrepGrading : FieldSpecification → ℤ × ℤ - | ψ _ => (1, 0) - | barψ _ => (0, 1) - -/-! - -## Mass dimension grading - --/ - -def massDimGrading : FieldSpecification → ℚ := fun _ => 3/2 - - -/-! - -## Below here is old and WIP - --/ - - -/-! - -### A.1. The coordinate elements of the potential algebra - --/ - -/-- The coordinate element corresponding to the i-th basis vector as a member - of the effective potential. -/ -def ψ (α : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) - -/-- The coordinate element corresponding to the conjugate i-th basis vector as a member - of the effective potential. -/ -def barψ (α : Fin 2) : EffectivePotential := - (ExteriorAlgebra.ι ℂ) (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) - -@[simp] lemma ψ_mul_self (α : Fin 2) : ψ α * ψ α = 0 := ExteriorAlgebra.ι_sq_zero _ - -@[simp] lemma ψ_one_mul_ψ_zero_swap : ψ 1 * ψ 0 = - ψ 0 * ψ 1 := by - rw [neg_mul, eq_neg_iff_add_eq_zero] - exact ExteriorAlgebra.ι_add_mul_swap _ _ - -@[simp] lemma barψ_mul_self (α : Fin 2) : barψ α * barψ α = 0 := ExteriorAlgebra.ι_sq_zero _ - -@[simp] lemma barψ_one_mul_barψ_zero_swap : barψ 1 * barψ 0 = - barψ 0 * barψ 1 := by - rw [neg_mul, eq_neg_iff_add_eq_zero] - exact ExteriorAlgebra.ι_add_mul_swap _ _ - -abbrev ψbarψ : Fin 4 → EffectivePotential := Fin.append ψ barψ - -@[simp] -lemma ψbarψ_zero_eq_ψ_zero : ψbarψ 0 = ψ 0 := rfl - -@[simp] -lemma ψbarψ_one_eq_ψ_one : ψbarψ 1 = ψ 1 := rfl - -@[simp] -lemma ψbarψ_two_eq_barψ_zero : ψbarψ 2 = barψ 0 := rfl - -@[simp] -lemma ψbarψ_three_eq_barψ_one : ψbarψ 3 = barψ 1 := rfl - -@[simp] -lemma ψbarψ_mul_self (α : Fin 4) : ψbarψ α * ψbarψ α = 0 := by - fin_cases α - · exact ψ_mul_self 0 - · exact ψ_mul_self 1 - · exact barψ_mul_self 0 - · exact barψ_mul_self 1 - -lemma ψbarψ_swap (α β : Fin 4) : ψbarψ α * ψbarψ β = - ψbarψ β * ψbarψ α := by - fin_cases α <;> fin_cases β <;> - simp [ψbarψ, neg_mul, eq_neg_iff_add_eq_zero] - <;> exact ExteriorAlgebra.ι_add_mul_swap _ _ - -@[simp] -lemma ψbarψ_apply_zero_eq : ψbarψ 0 = ψ 0 := rfl - -@[simp] -lemma ψbarψ_apply_one_eq : ψbarψ 1 = ψ 1 := rfl - -@[simp] -lemma ψbarψ_apply_two_eq : ψbarψ 2 = barψ 0 := rfl - -@[simp] -lemma ψbarψ_apply_three_eq : ψbarψ 3 = barψ 1 := rfl - -/-! - -### A.2. Of a list --/ - -/-- The term of the effective potential generated from a list - of `Fin 4`, which describe the components `[ψ 0, ψ 1, barψ 0, barψ 1]`. -/ -def termOfList (l : List (Fin 4)) : EffectivePotential := - (l.map ψbarψ).prod - @[simp] -lemma termOfList_nil : termOfList [] = 1 := by simp [termOfList] - -lemma termOfList_cons (l : List (Fin 4)) (α : Fin 4) : - termOfList (α :: l) = ψbarψ α * termOfList l := by - simp only [termOfList, List.map_cons, List.prod_cons] - -lemma termOfList_append (l₁ l₂ : List (Fin 4)) : - termOfList (l₁ ++ l₂) = termOfList l₁ * termOfList l₂ := by - simp [termOfList] - -lemma ψbarψ_mul_termOfList_mem (α : Fin 4) (l : List (Fin 4)) (h : α ∈ l) : - ψbarψ α * termOfList l = 0 := by - induction l with - | nil => simp at h - | cons β t ih => - rcases List.mem_cons.mp h with rfl | ha - · simp [termOfList_cons, ← mul_assoc] - · simp [termOfList_cons, ← mul_assoc, ψbarψ_swap α β] - simp [mul_assoc, ih ha] - -lemma termOfList_zero_of_not_nodup (l : List (Fin 4)) (h : ¬ l.Nodup) : - termOfList l = 0 := by - revert h - induction l with - | nil => intro h; exact absurd List.nodup_nil h - | cons a t ih => - intro h - rw [termOfList_cons] - by_cases hmem : a ∈ t - · exact ψbarψ_mul_termOfList_mem a t hmem - · rw [ih fun hn => h (List.nodup_cons.mpr ⟨hmem, hn⟩), mul_zero] -/-! - -### A.3. Basis - --/ - -/-- The basis of the effective potential. -/ -def basis : Basis (Finset (Fin 4)) ℂ EffectivePotential := - Module.Basis.ExteriorAlgebra ((LeftHandedWeyl.basis.dualBasis.prod - LeftHandedWeyl.basis.conj.dualBasis).reindex finSumFinEquiv) - -lemma basis_eq_termOfList (s : Finset (Fin 4)) : basis s = termOfList (s.sort (· ≤ ·)) := by - have happend : Fin.append ψ barψ = fun j => (ExteriorAlgebra.ι ℂ) - (((LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex - finSumFinEquiv) j) := by - funext j - fin_cases j <;> - simp [ψ, barψ, Fin.append, Fin.addCases, Basis.prod_apply, - show (finSumFinEquiv (m := 2) (n := 2)).symm 0 = Sum.inl 0 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 1 = Sum.inl 1 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 2 = Sum.inr 0 from rfl, - show (finSumFinEquiv (m := 2) (n := 2)).symm 3 = Sum.inr 1 from rfl] - rw [basis, ExteriorAlgebra.basis_apply_ofCard (s_card := rfl), termOfList, happend] - simp only [ExteriorAlgebra.ιMulti_family, Set.powersetCard.ofFinEmbEquiv_symm_apply, - ExteriorAlgebra.ιMulti_apply] - refine congrArg List.prod (List.ext_getElem (by simp) fun i h1 h2 => ?_) - simp [Finset.orderEmbOfFin_apply] - -lemma basis_empty_eq_one : basis ∅ = 1 := by simp [basis_eq_termOfList] - -lemma ψ_zero_eq_basis : ψ 0 = basis {0} := by - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, ψ] - rfl - -lemma ψ_one_eq_basis : ψ 1 = basis {1} := by - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, ψ] - rfl - -lemma barψ_zero_eq_basis : barψ 0 = basis {2} := by - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, barψ] - rfl - -lemma barψ_one_eq_basis : barψ 1 = basis {3} := by - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, barψ] - rfl - - - -lemma rep_apply_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : - rep Λ (barψ α) = ∑ β, star (Λ⁻¹ α β) • barψ β := by - simp only [barψ, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, - ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, - Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, - ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] - refine LeftHandedWeyl.basis.conj.ext fun l => ?_ - fin_cases α <;> fin_cases l <;> - simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, - -SpecialLinearGroup.coe_inv, Representation.conj_apply] - -lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List (Fin 4)) : - rep Λ (termOfList l) = ((l.map (Fin.append ψ barψ)).map (rep Λ)).prod := by - induction l with - | nil => simp - | cons i l ih => - simp [termOfList_cons, rep_mul, ih] - -lemma rep_neg_apply_append (Λ : SL(2, ℂ)) (α : Fin 4) : - rep (- Λ) (Fin.append ψ barψ α) = (-1 : ℂ) • rep Λ (Fin.append ψ barψ α) := by - fin_cases α - all_goals - simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum] - abel - -lemma rep_neg_apply_termOfList (Λ : SL(2, ℂ)) (l : List (Fin 4)) : - rep (- Λ) (termOfList l) = ((-1 : ℂ) ^ l.length) • rep Λ (termOfList l) := by - induction l with - | nil => simp - | cons i l ih => - simp [termOfList_cons, rep_mul, ih, rep_neg_apply_append, pow_succ' (-1 : ℂ) l.length] - -lemma rep_neg_apply_basis (s : Finset (Fin 4)) (Λ : SL(2, ℂ)) : - rep (- Λ) (basis s) = (-1 : ℂ) ^ s.card • rep Λ (basis s) := by - simp [basis_eq_termOfList, rep_neg_apply_termOfList] - -lemma rep_diagonal_apply_append (α : Fin 4) (c : ℂˣ) : - rep ⟨diagonal ![c, c⁻¹], by simp⟩ (Fin.append ψ barψ α) = - (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c] α) • Fin.append ψ barψ α := by - fin_cases α <;> simp [rep_apply_ψ_eq_sum, rep_apply_barψ_eq_sum, Finset.univ_fin2] - all_goals simp [Finset.pair_comm] - -lemma rep_diagonal_apply_termOfList (l : List (Fin 4)) (c : ℂˣ) : - rep ⟨diagonal ![c, c⁻¹], by simp⟩ (termOfList l) = - ((l.map (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c])).prod) • termOfList l := by - induction l with - | nil => simp - | cons i l ih => - simp [termOfList_cons, rep_mul, ih, rep_diagonal_apply_append, smul_smul, mul_comm] - -lemma rep_diagonal_apply_basis (s : Finset (Fin 4)) (c : ℂˣ) : - rep ⟨diagonal ![c, c⁻¹], by simp⟩ (basis s) = - (∏ i ∈ s, (![(c⁻¹).1, c.1, starRingEnd ℂ (c⁻¹).1, starRingEnd ℂ c] i)) • basis s := by - rw [basis_eq_termOfList, rep_diagonal_apply_termOfList, ← Finset.prod_map_toList _, - ((Finset.sort_perm_toList _ fun x1 x2 => x1 ≤ x2).map _).prod_eq] - -/-! - -### A.5. Multidegrees - -Since ψ fields rotate among themselves under the action of the Lorentz group, -and barψ fields rotate among themselves, it is natural to decompose -the effective potential into submodules which have a fixed number of ψ and barψ -fields appearing in them. The submodules are closed under the action of the -Lorentz group. - --/ - -def FieldSpecification.ofIndex : Fin 4 → FieldSpecification - | 0 => FieldSpecification.ψ - | 1 => FieldSpecification.ψ - | 2 => FieldSpecification.barψ - | 3 => FieldSpecification.barψ - -/-- The submodules of `EffectivePotential` which have a fixed number of - `ψ` and `barψ` fields appearing in them. -/ -def multiDegreeSubmodule (d : Multiset FieldSpecification) : Submodule ℂ EffectivePotential := - Submodule.span ℂ {V | ∃ s : Finset (Fin 4), - (↑(s.val.map FieldSpecification.ofIndex) : Multiset FieldSpecification) = d ∧ basis s = V} - -lemma basis_mem_multiDegreeSubmodule (s : Finset (Fin 4)) : - basis s ∈ multiDegreeSubmodule ↑(s.val.map FieldSpecification.ofIndex) := - Submodule.subset_span ⟨s, rfl, rfl⟩ - -lemma termOfList_mem_multiDegreeSubmodule (l : List (Fin 4)) : - termOfList l ∈ multiDegreeSubmodule ↑(l.map FieldSpecification.ofIndex) := - Submodule.subset_span ⟨l.toFinset, by simp [Multiset.coe_toFinset, Multiset.map_map], by - simp [basis_eq_termOfList]⟩ -lemma one_mem_multiDegreeSubmodule_zero : (1 : EffectivePotential) ∈ multiDegreeSubmodule 0 := - Submodule.subset_span ⟨∅, rfl, by simp [basis_empty_eq_one]⟩ - -lemma append_mem_multiDegreeSubmodule (α : Fin 4) : - Fin.append ψ barψ α ∈ multiDegreeSubmodule {FieldSpecification.ofIndex α} := - Submodule.subset_span ⟨{α}, rfl, by - fin_cases α <;> - simp [ψ_zero_eq_basis, barψ_zero_eq_basis, ψ_one_eq_basis, barψ_one_eq_basis]⟩ - -lemma ψ_mem_multiDegreeSubmodule (i : Fin 2) : - ψ i ∈ multiDegreeSubmodule {FieldSpecification.ψ} := by - fin_cases i - · exact append_mem_multiDegreeSubmodule 0 - · exact append_mem_multiDegreeSubmodule 1 - -lemma barψ_mem_multiDegreeSubmodule (i : Fin 2) : - barψ i ∈ multiDegreeSubmodule {FieldSpecification.barψ} := by - fin_cases i - · exact append_mem_multiDegreeSubmodule 2 - · exact append_mem_multiDegreeSubmodule 3 - -lemma rep_basis_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (s : Finset (Fin 4)) : - rep Λ (basis s) ∈ multiDegreeSubmodule ↑(s.val.map FieldSpecification.ofIndex) := by - sorry - -/-! - -### A.6. Stability of multidegrees under the group action - --/ - -lemma rep_ψ_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (i : Fin 2) : - rep Λ (ψ i) ∈ multiDegreeSubmodule {FieldSpecification.ψ} := by - rw [rep_apply_ψ_eq_sum] - exact Submodule.sum_mem _ fun j _ => - Submodule.smul_mem _ _ (ψ_mem_multiDegreeSubmodule j) - -lemma rep_barψ_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (i : Fin 2) : - rep Λ (barψ i) ∈ multiDegreeSubmodule {FieldSpecification.barψ} := by - rw [rep_apply_barψ_eq_sum] - exact Submodule.sum_mem _ fun j _ => - Submodule.smul_mem _ _ (barψ_mem_multiDegreeSubmodule j) - -lemma rep_append_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (α : Fin 4) : - rep Λ (Fin.append ψ barψ α) ∈ multiDegreeSubmodule {FieldSpecification.ofIndex α} := - match α with - | 0 => rep_ψ_mem_multiDegreeSubmodule Λ 0 - | 1 => rep_ψ_mem_multiDegreeSubmodule Λ 1 - | 2 => rep_barψ_mem_multiDegreeSubmodule Λ 0 - | 3 => rep_barψ_mem_multiDegreeSubmodule Λ 1 - -lemma rep_termOfList_mem_multiDegreeSubmodule (Λ : SL(2, ℂ)) (l : List (Fin 4)) : - rep Λ (termOfList l) ∈ multiDegreeSubmodule ↑(l.map FieldSpecification.ofIndex) := by - induction l with - | nil => simpa using one_mem_multiDegreeSubmodule_zero - | cons α l ih => - rw [termOfList_cons, rep_mul] - simpa [Multiset.singleton_add] using - mul_mem_multiDegreeSubmodule (rep_append_mem_multiDegreeSubmodule Λ α) ih - -/-- The multidegree submodules are stable under the action of the Lorentz group. -/ -lemma rep_mem_multiDegreeSubmodule {d : Multiset FieldSpecification} (Λ : SL(2, ℂ)) - {V : EffectivePotential} (hV : V ∈ multiDegreeSubmodule d) : - rep Λ V ∈ multiDegreeSubmodule d := by - induction hV using Submodule.span_induction with - | mem x hx => - obtain ⟨l, hl, rfl⟩ := hx - exact hl ▸ rep_termOfList_mem_multiDegreeSubmodule Λ l - | zero => simp - | add a b _ _ ha hb => rw [map_add]; exact add_mem ha hb - | smul c a _ ha => rw [map_smul]; exact Submodule.smul_mem _ _ ha - -/-- The multidegree submodules are sent to themselves under the action - of the Lorentz group. -/ -lemma multiDegreeSubmodule_map_rep (Λ : SL(2, ℂ)) (d : Multiset FieldSpecification) : - (multiDegreeSubmodule d).map (rep Λ) = multiDegreeSubmodule d := by - refine le_antisymm (Submodule.map_le_iff_le_comap.2 fun V hV => - rep_mem_multiDegreeSubmodule Λ hV) fun V hV => ?_ - refine ⟨rep Λ⁻¹ V, rep_mem_multiDegreeSubmodule Λ⁻¹ hV, ?_⟩ - rw [← Module.End.mul_apply, ← map_mul, mul_inv_cancel, map_one, Module.End.one_apply] - -/-! - -## B. Invariance under the Lorentz group - --/ - -/-- An effective potential is Lorentz invariant if it is stable under the - action of the Lorentz group. -/ -def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V - -lemma IsInvariant.eq_iff {V : EffectivePotential} : - IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl - -lemma IsInvariant.add {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : - IsInvariant (V + W) := by - intro Λ - simp_all [IsInvariant.eq_iff] - -lemma IsInvariant.smul {V : EffectivePotential} (hV : IsInvariant V) (c : ℂ) : - IsInvariant (c • V) := by - intro Λ - simp_all [IsInvariant.eq_iff] - -lemma IsInvariant.mul {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : - IsInvariant (V * W) := by - intro Λ - simp_all [IsInvariant.eq_iff, rep_mul] - -lemma IsInvariant.one : IsInvariant 1 := by - intro Λ - simp [rep] - -/-! - -## B.1. Specific terms which are invariant - --/ - -lemma ψ_zero_mul_ψ_one_isInvariant : IsInvariant (ψ 0 * ψ 1) := by - intro Λ - simp [rep_mul, rep_apply_ψ_eq_sum, mul_add, add_mul] - trans (Λ.1.adjugate 1 1 • Λ.1.adjugate 0 0 - Λ.1.adjugate 1 0 • Λ.1.adjugate 0 1) • (ψ 0 * ψ 1) - · module - simp only [Fin.isValue, adjugate_fin_two, of_apply, cons_val', cons_val_one, cons_val_fin_one, - cons_val_zero, smul_eq_mul, mul_neg, neg_mul, neg_neg] - trans Λ.1.det • (ψ 0 * ψ 1) - · congr - simp only [Matrix.det_fin_two] - ring - · simp - -lemma barψ_zero_mul_barψ_one_isInvariant : IsInvariant (barψ 0 * barψ 1) := by - intro Λ - simp [rep_mul, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, smul_smul, - ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add] - trans (starRingEnd ℂ) Λ.1.det • (barψ 0 * barψ 1) - · simp only [Matrix.det_fin_two] - ring_nf +lemma coeff_coeff_self {s : Multiset FieldSpecification} (V : EffectivePotential) : + coeff s (coeff s V) = coeff s V := by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp at hV' + obtain ⟨l, rfl⟩ := hV' + simp [coeff_apply_termOfList, apply_ite] + grind · simp - -lemma quartic_isInvariant : IsInvariant (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by - intro Λ - simp [rep_mul, rep_apply_barψ_eq_sum, rep_apply_barψ_eq_sum, mul_add, add_mul, adjugate_fin_two, - smul_smul, ← add_smul, ← neg_smul, ← map_mul, ← map_neg, ← map_add, mul_assoc] - trans (starRingEnd ℂ) Λ.1.det • ((rep Λ) (ψ 0) * ((rep Λ) (ψ 1) * (barψ 0 * barψ 1))) - · simp only [Matrix.det_fin_two] - ring_nf - simp [rep_apply_ψ_eq_sum, mul_add, add_mul, ← mul_assoc, mul_add, add_mul, - adjugate_fin_two, smul_smul, ← add_smul, ← neg_smul] - trans Λ.1.det • (ψ 0 * ψ 1 * barψ 0 * barψ 1) - · simp only [Matrix.det_fin_two] - ring_nf - · simp - -/-! - -## B.2. Terms which must be zero in an invariant potential - --/ -/-- If `V` is invariant, then all terms with an odd number of factors vanish. -/ -lemma even_of_isInvariant {V : EffectivePotential} (s : Finset (Fin 4)) (h : IsInvariant V) - (hs : Odd s.card) : basis.repr V s = 0 := by - suffices h : basis.repr V s = (-1 : ℂ) ^ s.card * basis.repr V s by - simpa [hs.neg_one_pow, CharZero.eq_neg_self_iff] using h - suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep (-1 : SL(2, ℂ)) (basis t) = - (-1 : ℂ) ^ t.card • basis t by - conv_lhs => rw [← h (-1 : SL(2, ℂ)), ← basis.sum_repr V, map_sum] - simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm] - simp [rep_neg_apply_basis] - -/-- If `V` is invariant, then the mixed terms `ψ i * barψ j` have coefficient zero. -/ -lemma zero_two_term_zero_of_isInvariant {V : EffectivePotential} (h : IsInvariant V) : - basis.repr V {0, 2} = 0 ∧ basis.repr V {0, 3} = 0 - ∧ basis.repr V {1, 2} = 0 ∧ basis.repr V {1, 3} = 0 := by - let Λ : SL(2, ℂ):= ⟨!![2 * I, 0; 0, -(I / 2)], by - simp [Matrix.det_fin_two_of]; linear_combination -Complex.I_sq⟩ - let d : Fin 4 → ℂ := ![-(I / 2), 2 * I, I / 2, -(2 * I)] - suffices Λ_basis_two : ∀ (a b : Fin 4) (hab : a ≠ b) (hd : d a * d b ≠ 1), - basis.repr V {a, b} = 0 by - refine ⟨Λ_basis_two 0 2 (by decide) ?_, Λ_basis_two 0 3 (by decide) ?_, - Λ_basis_two 1 2 (by decide) ?_, Λ_basis_two 1 3 (by decide) ?_⟩ - all_goals - simp [d] - ring_nf + · simp [hx, hy] + · simp [hx] + +lemma coeff_eq_termOfList {s : Multiset FieldSpecification} + (V : EffectivePotential) {l : List FieldSpecification} (hl : Multiset.ofList l = s) : + ∃ c : ℂ, coeff s V = c • termOfList l := by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp at hV' + obtain ⟨l', rfl⟩ := hV' + simp [coeff_apply_termOfList] + split_ifs + · rename_i hi + refine termOfList_perm ?_ + rw [← Multiset.coe_eq_coe] + simp_all + · use 0 simp - try grind - suffices Λ_basis : ∀ (t : Finset (Fin 4)), rep Λ (basis t) = (∏ k ∈ t, d k) • basis t by - intro a b hab hd - have h1 : basis.repr V {a, b} = (d a * d b) * basis.repr V {a, b} := by - conv_lhs => rw [← h Λ, ← basis.sum_repr V, map_sum] - simp [Λ_basis, Finsupp.single_apply, smul_smul, mul_comm, Finset.prod_pair hab] + · use 0 + simp + · obtain ⟨c1, hx⟩ := hx + obtain ⟨c2, hy⟩ := hy + use (c1 + c2) + simp [hx, hy] + module + · obtain ⟨c1, hx⟩ := hx + use a • c1 + simp [hx, smul_smul] + +/-- The support of an effective potential: the set of multisets of field specifications + for which the corresponding coefficient is non-zero. -/ +def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := + Set.Finite.toFinset (s := {s | coeff s V ≠ 0}) <| by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hV' + obtain ⟨l, rfl⟩ := hV' + refine (Set.finite_singleton (Multiset.ofList l)).subset ?_ + intro s hs + simp at hs + rw [coeff_apply_termOfList] at hs + rw [Set.mem_singleton_iff] by_contra hne - exact hd (mul_right_cancel₀ hne (by linear_combination -h1)) + exact hs (if_neg fun h => hne h.symm) + · refine Set.finite_empty.subset ?_ + intro s hs + simp at hs + · refine (hx.union hy).subset ?_ + intro s hs + simp at hs + grind + · refine hx.subset ?_ + intro s hs + simp at hs + grind + +lemma mem_support_iff {V : EffectivePotential} {s : Multiset FieldSpecification} : + s ∈ support V ↔ coeff s V ≠ 0 := by simp [support] + +lemma support_add {V W : EffectivePotential} : + support (V + W) ⊆ support V ∪ support W := by sorry +lemma eq_sum_support_coeff (V : EffectivePotential) : V = ∑ s ∈ support V, coeff s V := by + sorry -lemma isInvariant_iff {V : EffectivePotential} : - IsInvariant V ↔ ∃ (c m1 m2 ρ : ℂ), V = c • 1 + m1 • (ψ 0 * ψ 1) + m2 • (barψ 0 * barψ 1) + - ρ • (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by - constructor - · intro h - rw [← basis.sum_repr V] - refine ⟨basis.repr V ∅, basis.repr V {0, 1}, basis.repr V {2, 3}, basis.repr V {0, 1, 2, 3}, ?_⟩ - rw [show (Finset.univ : Finset (Finset (Fin 4))) = - {∅, {0}, {1}, {2}, {3}, {0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}, - {0, 1, 2}, {0, 1, 3}, {0, 2, 3}, {1, 2, 3}, {0, 1, 2, 3}} by decide] - repeat rw [Finset.sum_insert (by decide)] - rw [Finset.sum_singleton] - rw [even_of_isInvariant {0} h (by decide), even_of_isInvariant {1} h (by decide), - even_of_isInvariant {2} h (by decide), even_of_isInvariant {3} h (by decide), - even_of_isInvariant {0, 1, 2} h (by decide), even_of_isInvariant {0, 1, 3} h (by decide), - even_of_isInvariant {0, 2, 3} h (by decide), even_of_isInvariant {1, 2, 3} h (by decide), - (zero_two_term_zero_of_isInvariant h).1, (zero_two_term_zero_of_isInvariant h).2.1, - (zero_two_term_zero_of_isInvariant h).2.2.1, (zero_two_term_zero_of_isInvariant h).2.2.2] - simp [add_assoc] - congr - all_goals - rw [basis, ExteriorAlgebra.basis_apply]; - simp [ExteriorAlgebra.ιMulti_apply, - Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, - ψ, barψ, mul_assoc]; - try rfl - · rintro ⟨c, m1, m2, ρ, rfl⟩ - apply_rules [IsInvariant.add, IsInvariant.smul, IsInvariant.one, - ψ_zero_mul_ψ_one_isInvariant, barψ_zero_mul_barψ_one_isInvariant, quartic_isInvariant] +/-- A general result related to whether a multiset of field specifications is excluded from +the support of an effective potential due to a selection rule based on the group action. -/ +lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant v) + {s : Multiset FieldSpecification} + (selection_rule : ∃ g : SL(2, ℂ), ∃ l : List FieldSpecification, ∃ c : ℂˣ, + rep g (termOfList l) = c • termOfList l ∧ Multiset.ofList l = s ∧ c ≠ 1) : + s ∉ support V := by + sorry /-! -## C. Coefficent list - --/ - -/-- The coefficients of an effective potential relevant for invariant potentials, as a - linear map: the coefficients of `1`, `ψ 0 * ψ 1`, `barψ 0 * barψ 1` and - `ψ 0 * ψ 1 * barψ 0 * barψ 1`. -/ -def invCoeffList : EffectivePotential →ₗ[ℂ] (Fin 4 → ℂ) := - LinearMap.pi ![basis.coord ∅, basis.coord {0, 1}, basis.coord {2, 3}, basis.coord {0, 1, 2, 3}] - -@[simp] -lemma invCoeffList_one : invCoeffList 1 = ![1, 0, 0, 0] := by - rw [← basis_empty_eq_one] - ext i - fin_cases i <;> simp [invCoeffList] - -@[simp] -lemma invCoeffList_ψ_zero_mul_ψ_one : invCoeffList (ψ 0 * ψ 1) = ![0, 1, 0, 0] := by - trans invCoeffList (basis {0, 1}) - · congr - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, Finset.sort_insert, ψ] - rfl - ext i - fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] - · decide - · decide -@[simp] -lemma invCoeffList_barψ_zero_mul_barψ_one : invCoeffList (barψ 0 * barψ 1) = ![0, 0, 1, 0] := by - trans invCoeffList (basis {2, 3}) - · congr - rw [basis, ExteriorAlgebra.basis_apply] - simp [ExteriorAlgebra.ιMulti_apply, Set.powersetCard.ofFinEmbEquiv_symm_apply, - Finset.orderEmbOfFin_apply, Finset.sort_insert, barψ] - rfl - ext i - fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] - · decide - · decide +## Coefficents of irrep terms -@[simp] -lemma invCoeffList_quartic : invCoeffList (ψ 0 * ψ 1 * barψ 0 * barψ 1) = ![0, 0, 0, 1] := by - trans invCoeffList (basis {0, 1, 2, 3}) - · congr - rw [basis, ExteriorAlgebra.basis_apply]; - simp [ExteriorAlgebra.ιMulti_apply, - Set.powersetCard.ofFinEmbEquiv_symm_apply, Finset.orderEmbOfFin_apply, Finset.sort_insert, - ψ, barψ, mul_assoc]; - rfl - ext i - fin_cases i <;> simp [invCoeffList, Finsupp.single_apply] - · decide - · decide - -lemma invCoeffList_injective {V1 V2 : EffectivePotential} (h1 : IsInvariant V1) - (h2 : IsInvariant V2) (h : invCoeffList V1 = invCoeffList V2) : V1 = V2 := by - obtain ⟨c1, m11, m21, ρ1, rfl⟩ := isInvariant_iff.1 h1 - obtain ⟨c2, m12, m22, ρ2, rfl⟩ := isInvariant_iff.1 h2 - simp at h - rcases h with ⟨rfl, rfl, rfl, rfl⟩ - rfl - -/-! - -## D. Conjugation -/ -/-- The conjugation operator on the effective potential. - This takes the complex conjugate of the coefficients, swaps the generators `ψ α` and `barψ α`, - and reverses the order of products. -/ -def conjugate : EffectivePotential →ₛₗ[starRingEnd ℂ] EffectivePotential := - let conjSwap : - (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - →ₛₗ[starRingEnd ℂ] - Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl) := - { toFun := Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap - map_add' p q := by simp [Prod.ext_iff] - map_smul' c p := by simp [Prod.ext_iff, map_smulₛₗ]} - CliffordAlgebra.reverse.comp <| - (conjEquiv (k := ℂ)).symm.comp <| - (ExteriorAlgebra.lift ℂ - ⟨(conjEquiv (k := ℂ)).comp ((ExteriorAlgebra.ι ℂ).comp conjSwap), - fun v => ExteriorAlgebra.ι_sq_zero _⟩).toLinearMap - -lemma conjugate_eq_comp_algebra_map : ∃ (A: EffectivePotential →ₐ[ℂ] ConjModule EffectivePotential), - conjugate = CliffordAlgebra.reverse.comp ((conjEquiv (k := ℂ)).symm.comp A.toLinearMap) := by - let conjSwap : - (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - →ₛₗ[starRingEnd ℂ] - Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl) := - { toFun := Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap - map_add' p q := by simp [Prod.ext_iff] - map_smul' c p := by simp [Prod.ext_iff, map_smulₛₗ]} - use ExteriorAlgebra.lift ℂ - ⟨(conjEquiv (k := ℂ)).comp ((ExteriorAlgebra.ι ℂ).comp conjSwap), - fun v => ExteriorAlgebra.ι_sq_zero _⟩ - rfl -lemma conjugate_apply_ι (v : Dual ℂ LeftHandedWeyl × Dual ℂ (ConjModule LeftHandedWeyl)) : - conjugate (ExteriorAlgebra.ι ℂ v) = - (CliffordAlgebra.reverse <| conjEquiv (k := ℂ) <| - ExteriorAlgebra.ι ℂ <| Prod.map conjDualEquiv.symm conjDualEquiv ∘ Prod.swap <| v) := by - simp [conjugate] - erw [AlgHom.toLinearMap_apply] - rw [ExteriorAlgebra.lift_ι_apply] - rfl -@[simp] -lemma conjugate_one : conjugate 1 = 1 := by - simp [conjugate] - erw [AlgHom.toLinearMap_apply] - rw [map_one] - exact CliffordAlgebra.reverse.map_one +def irrepCoeff (i : Multiset Irrep) : EffectivePotential →ₗ[ℂ] EffectivePotential where + toFun := fun V => ∑ s ∈ support V, if Multiset.map toIrrep s = i then coeff s V else 0 + map_add' := by + intro V W + sorry + map_smul' := by + intro c V + sorry -@[simp] -lemma conjugate_algebraMap (c : ℂ) : conjugate (algebraMap ℂ EffectivePotential c) = - algebraMap ℂ EffectivePotential (starRingEnd ℂ c) := by - simp [Algebra.algebraMap_eq_smul_one] - -lemma conjugate_mul (V W : EffectivePotential) : - conjugate (V * W) = conjugate W * conjugate V := by - obtain ⟨A, hA⟩ := conjugate_eq_comp_algebra_map - simp [hA] - erw [AlgHom.coe_toLinearMap, AlgHom.toLinearMap_apply] - simp [conjEquiv] - erw [CliffordAlgebra.reverse.map_mul] - -@[simp] -lemma conjugate_conjugate (V : EffectivePotential) : conjugate (conjugate V) = V := by - induction' V using ExteriorAlgebra.induction with r v a b ha hb a b ha hb - · simp [conjugate_algebraMap] - · simp [conjugate_apply_ι, conjEquiv] - obtain ⟨fst, snd⟩ := v - simp_all only [Prod.swap_prod_mk, Prod.map_apply, LinearEquiv.symm_apply_apply, - LinearEquiv.apply_symm_apply] - · simp [conjugate_mul, ha, hb] - · simp [ha, hb] - -lemma conjugate_injective : Function.Injective conjugate := by - intro V W h - have h' : conjugate (conjugate V) = conjugate (conjugate W) := by rw [h] - simp only [conjugate_conjugate] at h' - exact h' +def irrepSupport (V : EffectivePotential) : Finset (Multiset Irrep) := + (support V).image (Multiset.map toIrrep) -@[simp] -lemma conjugate_ψ (α : Fin 2) : conjugate (ψ α) = barψ α := by - simp [ψ, conjugate_apply_ι] - trans CliffordAlgebra.reverse (barψ α) - · congr 1 - simp only [conjEquiv, LinearEquiv.coe_mk, LinearMap.coe_mk, AddHom.coe_mk, barψ, - Basis.coe_dualBasis, LinearMap.coe_inr, ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] - rfl - simp [barψ] +lemma irrepCoeff_rep {i : Multiset Irrep} {V : EffectivePotential} (g : SL(2, ℂ)) : + rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by + sorry -@[simp] -lemma conjugate_barψ (α : Fin 2) : conjugate (barψ α) = ψ α := by - apply conjugate_injective - simp [conjugate_ψ] +lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EffectivePotential} (hV : IsInvariant V) : + irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by + sorry /-! -## E. Reality condition +## Mass dimension -/ -/-- The effective potential is real if it is equal to its conjugate. -/ -def IsReal (V : EffectivePotential) : Prop := conjugate V = V - -lemma isReal_iff {V : EffectivePotential} : IsReal V ↔ conjugate V = V := by rfl - -/-- The necessary and sufficent condition for a real potential to be - invariant under the Lorentz group. -/ -lemma isInvariant_iff_of_isReal {V : EffectivePotential} (h : IsReal V) : - IsInvariant V ↔ ∃ (c : ℝ), ∃ (m : ℂ), ∃ (ρ : ℝ), V = - c • 1 + m • ψ 0 * ψ 1 - star m • barψ 0 * barψ 1 + ρ • (ψ 0 * ψ 1 * barψ 0 * barψ 1) := by - rw [isInvariant_iff] - constructor - · rintro ⟨c, m1, m2, ρ, rfl⟩ - simp [isReal_iff, conjugate_mul, ← mul_assoc] at h - have h1 := congrArg invCoeffList h - simp at h1 - rcases h1 with ⟨h1, h2, rfl, h3⟩ - use c.re, m1, ρ.re - have hc : c = (c.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h1)] - have hρ : ρ = (ρ.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h3)] - rw [hc, hρ] - simp only [coe_smul, Fin.isValue, neg_smul, ofReal_re, Algebra.smul_mul_assoc, RCLike.star_def, - add_left_inj] - abel - · rintro ⟨c, m1, ρ, rfl⟩ - use c, m1, -star m1, ρ - simp - abel +def massDimCoeff (n : ℚ) : EffectivePotential →ₗ[ℂ] EffectivePotential where + toFun := fun V => ∑ s ∈ support V, if (s.map massDimension).sum = n then coeff s V else 0 + map_add' := by + intro V W + sorry + map_smul' := by + intro c V + sorry + +def massDimSupport (V : EffectivePotential) : Finset ℚ := + (support V).image (fun s => (s.map massDimension).sum) + +lemma eq_sum_massDimCoeff (V : EffectivePotential) : + V = ∑ n ∈ massDimSupport V, massDimCoeff n V := by + sorry end EffectivePotential From e17d0be07b174596b6634a7f0b8f89b6ed002df4 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Thu, 16 Jul 2026 11:00:45 +0100 Subject: [PATCH 30/48] feat: Add parts --- .../PureFermionic/EffectivePotential.lean | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index 5cddef1b3..1c42da782 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -313,6 +313,18 @@ lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List FieldSpecification) | cons i l ih => simp [termOfList_cons, rep_mul, ih] +lemma rep_scale_termOfList_of_rep_scale_toEffectivePotential (Λ : SL(2, ℂ)) + (h : ∀ ψ, ∃ c : ℂ, rep Λ [ψ]ₑ = c • [ψ]ₑ) (l : List FieldSpecification) : + ∃ c : ℂ, rep Λ (termOfList l) = c • termOfList l := by + induction l with + | nil => exact ⟨1, by simp⟩ + | cons ψ t ih => + obtain ⟨cψ, hcψ⟩ := h ψ + obtain ⟨ct, hct⟩ := ih + refine ⟨cψ * ct, ?_⟩ + simp [termOfList_cons, rep_mul, hcψ, hct] + module + lemma mem_termOfList_span (V : EffectivePotential) : V ∈ Submodule.span ℂ (Set.range termOfList) := by induction V using ExteriorAlgebra.induction with @@ -527,6 +539,13 @@ lemma coeff_eq_termOfList {s : Multiset FieldSpecification} use a • c1 simp [hx, smul_smul] +lemma coeff_eq_exists_termOfList (s : Multiset FieldSpecification) + (V : EffectivePotential) : + ∃ l, ∃ c : ℂ, coeff s V = c • termOfList l := by + obtain ⟨c, hl⟩ := coeff_eq_termOfList V (s := s) (l := Multiset.toList s) (by simp) + use Multiset.toList s + use c + /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := @@ -554,6 +573,10 @@ def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := simp at hs grind +@[simp] +lemma support_zero_eq_empty : support (0 : EffectivePotential) = ∅ := by + simp [support] + lemma mem_support_iff {V : EffectivePotential} {s : Multiset FieldSpecification} : s ∈ support V ↔ coeff s V ≠ 0 := by simp [support] @@ -561,15 +584,26 @@ lemma support_add {V W : EffectivePotential} : support (V + W) ⊆ support V ∪ support W := by sorry +lemma support_smul {V : EffectivePotential} (c : ℂ) : + support (c • V) ⊆ support V := by + sorry + lemma eq_sum_support_coeff (V : EffectivePotential) : V = ∑ s ∈ support V, coeff s V := by sorry +lemma mem_support_termOfList_iff {l : List FieldSpecification} (s : Multiset FieldSpecification): + s ∈ support (termOfList l) ↔ s = Multiset.ofList l ∧ termOfList l ≠ 0 := by + simp [support, coeff_apply_termOfList] + grind + /-- A general result related to whether a multiset of field specifications is excluded from the support of an effective potential due to a selection rule based on the group action. -/ -lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant v) +lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant V) {s : Multiset FieldSpecification} - (selection_rule : ∃ g : SL(2, ℂ), ∃ l : List FieldSpecification, ∃ c : ℂˣ, - rep g (termOfList l) = c • termOfList l ∧ Multiset.ofList l = s ∧ c ≠ 1) : + (selection_rule : ∃ g : SL(2, ℂ), + + ∃ l : List FieldSpecification, ∃ c : ℂ, + rep g (termOfList l) = c • termOfList l ∧ Multiset.ofList l = s) : s ∉ support V := by sorry @@ -581,8 +615,6 @@ lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant v) -/ - - def irrepCoeff (i : Multiset Irrep) : EffectivePotential →ₗ[ℂ] EffectivePotential where toFun := fun V => ∑ s ∈ support V, if Multiset.map toIrrep s = i then coeff s V else 0 map_add' := by From 7020d6bfee95e9c837a7fdb74befa184d2934ece Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 06:29:38 +0100 Subject: [PATCH 31/48] feat: Add results --- .../PureFermionic/EffectivePotential.lean | 115 ++++++++++++++++-- 1 file changed, 106 insertions(+), 9 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index 1c42da782..d1f8c4d56 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -352,22 +352,27 @@ lemma mem_termOfList_span (V : EffectivePotential) : | smul c x _ hx => rw [smul_mul_assoc]; exact Submodule.smul_mem _ _ hx | add a b ha hb => exact add_mem ha hb -lemma termOfList_perm {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : - ∃ c : ℂ, termOfList l1 = c • termOfList l2 := by +lemma termOfList_perm_neq_zero {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : + ∃ c : ℂ, termOfList l1 = c • termOfList l2 ∧ c ≠ 0 := by induction h with | nil => exact ⟨1, by simp⟩ | cons x _ ih => - obtain ⟨c, hc⟩ := ih - exact ⟨c, by rw [termOfList_cons, termOfList_cons, hc, mul_smul_comm]⟩ + obtain ⟨c, hc1, hc2⟩ := ih + exact ⟨c, by rw [termOfList_cons, termOfList_cons, hc1, mul_smul_comm], hc2⟩ | swap x y l => refine ⟨-1, ?_⟩ rw [termOfList_cons, termOfList_cons, termOfList_cons, termOfList_cons, ← mul_assoc, toEffectivePotential_mul_anti_commute y x] simp [mul_assoc] | trans _ _ ih1 ih2 => - obtain ⟨c1, hc1⟩ := ih1 - obtain ⟨c2, hc2⟩ := ih2 - exact ⟨c1 * c2, by rw [hc1, hc2, smul_smul]⟩ + obtain ⟨c1, hc1, hc1'⟩ := ih1 + obtain ⟨c2, hc2, hc2'⟩ := ih2 + exact ⟨c1 * c2, by rw [hc1, hc2, smul_smul], by grind⟩ + +lemma termOfList_perm {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : + ∃ c : ℂ, termOfList l1 = c • termOfList l2 := by + obtain ⟨c, h1, h2⟩ := termOfList_perm_neq_zero h + exact ⟨c, h1⟩ lemma termOfList_eq_ιMulti (l : List FieldSpecification) : termOfList l = ExteriorAlgebra.ιMulti ℂ l.length (fun i => moduleBasis (l.get i)) := by @@ -546,6 +551,40 @@ lemma coeff_eq_exists_termOfList (s : Multiset FieldSpecification) use Multiset.toList s use c +/-- If the action of `g` is to permute the fields, + then it defines a relation between the coefficients of the effective potential. -/ +lemma coeff_eq_perm (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) + (hg : ∀ ψ, rep g [ψ]ₑ = [σ ψ]ₑ) (s : Multiset FieldSpecification) + (V : EffectivePotential) (hV : IsInvariant V) : + coeff (s.map σ) V = rep g (coeff s V) := by + have hterm : ∀ l : List FieldSpecification, + rep g (termOfList l) = termOfList (l.map σ) := by + intro l + induction l with + | nil => simp + | cons a l ih => + rw [termOfList_cons, rep_mul, hg, ih, List.map_cons, termOfList_cons] + have hcomm : ∀ W : EffectivePotential, + coeff (s.map σ) (rep g W) = rep g (coeff s W) := by + intro W + induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hW' + obtain ⟨l, rfl⟩ := hW' + rw [hterm, coeff_apply_termOfList, coeff_apply_termOfList] + have hcond : Multiset.ofList (List.map σ l) = Multiset.map σ s ↔ + Multiset.ofList l = s := by + rw [← Multiset.map_coe] + exact ⟨fun hc => Multiset.map_injective σ.injective hc, fun hc => by rw [hc]⟩ + by_cases hc : Multiset.ofList l = s + · rw [if_pos (hcond.mpr hc), if_pos hc, hterm] + · rw [if_neg (fun hcon => hc (hcond.mp hcon)), if_neg hc, map_zero] + · simp + · simp [map_add, hx, hy] + · simp [map_smul, hx] + conv_lhs => rw [← hV g] + exact hcomm V + /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := @@ -586,7 +625,11 @@ lemma support_add {V W : EffectivePotential} : lemma support_smul {V : EffectivePotential} (c : ℂ) : support (c • V) ⊆ support V := by - sorry + simp [support] + +lemma support_smul_neq_zero {V : EffectivePotential} (c : ℂ) (hc : c ≠ 0) : + support (c • V) = support V := by + simp [support, hc] lemma eq_sum_support_coeff (V : EffectivePotential) : V = ∑ s ∈ support V, coeff s V := by sorry @@ -601,11 +644,65 @@ the support of an effective potential due to a selection rule based on the group lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant V) {s : Multiset FieldSpecification} (selection_rule : ∃ g : SL(2, ℂ), - ∃ l : List FieldSpecification, ∃ c : ℂ, rep g (termOfList l) = c • termOfList l ∧ Multiset.ofList l = s) : s ∉ support V := by sorry +/-! + +## + +-/ + +/-- Under the action of `g` an operator with field content specified by `s` mixes + into operators with field content given by this Finset. -/ +def repSupport (s : Multiset FieldSpecification) (g : SL(2, ℂ)) : + Finset (Multiset FieldSpecification) := + support (rep g (termOfList (Multiset.toList s))) + +lemma repSupport_eq_termOfList {s : Multiset FieldSpecification} (g : SL(2, ℂ)) + (l : List FieldSpecification) (hl : Multiset.ofList l = s) : + repSupport s g = support (rep g (termOfList l)) := by + simp [repSupport] + obtain ⟨c, h1, hc⟩ := termOfList_perm_neq_zero (l1 := Multiset.toList s) (l2 := l) + (by apply Multiset.coe_eq_coe.mp; simp [hl]) + simp [h1] + apply support_smul_neq_zero + exact hc + +lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecification} + (g : SL(2, ℂ)) (h : ∀ ψ : FieldSpecification, repSupport {ψ} g ⊆ {{ψ}}) : + repSupport s g ⊆ {s} := by + have hsingle : ∀ ψ : FieldSpecification, ∃ c : ℂ, + rep g (termOfList [ψ]) = c • termOfList [ψ] := by + intro ψ + have hsup := h ψ + rw [repSupport_eq_termOfList g [ψ] (by simp)] at hsup + rcases Finset.subset_singleton_iff.mp hsup with h0 | h1 + · refine ⟨0, ?_⟩ + rw [eq_sum_support_coeff (rep g (termOfList [ψ])), h0] + simp + · obtain ⟨c, hc⟩ := coeff_eq_termOfList (s := {ψ}) (rep g (termOfList [ψ])) + (l := [ψ]) (by simp) + refine ⟨c, ?_⟩ + rw [eq_sum_support_coeff (rep g (termOfList [ψ])), h1, Finset.sum_singleton, hc] + have hlist : ∀ l : List FieldSpecification, ∃ c : ℂ, + rep g (termOfList l) = c • termOfList l := by + intro l + induction l with + | nil => exact ⟨1, by simp⟩ + | cons a l ih => + obtain ⟨c, hc⟩ := ih + obtain ⟨ca, hca⟩ := hsingle a + refine ⟨ca * c, ?_⟩ + rw [show a :: l = [a] ++ l from rfl, termOfList_append, rep_mul, hca, hc, + smul_mul_smul_comm] + obtain ⟨c, hc⟩ := hlist s.toList + intro t ht + rw [repSupport, hc] at ht + have ht' := support_smul c ht + rw [mem_support_termOfList_iff] at ht' + simpa using ht'.1 /-! From 664a923a8b05ef069cbafecc7b93e0ef34487b61 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 06:55:53 +0100 Subject: [PATCH 32/48] feat: More selection rules --- .../PureFermionic/EffectivePotential.lean | 62 ++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EffectivePotential.lean index d1f8c4d56..974ae3c67 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EffectivePotential.lean @@ -553,7 +553,7 @@ lemma coeff_eq_exists_termOfList (s : Multiset FieldSpecification) /-- If the action of `g` is to permute the fields, then it defines a relation between the coefficients of the effective potential. -/ -lemma coeff_eq_perm (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) +lemma coeff_perm_selection_rule (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) (hg : ∀ ψ, rep g [ψ]ₑ = [σ ψ]ₑ) (s : Multiset FieldSpecification) (V : EffectivePotential) (hV : IsInvariant V) : coeff (s.map σ) V = rep g (coeff s V) := by @@ -585,6 +585,59 @@ lemma coeff_eq_perm (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) conv_lhs => rw [← hV g] exact hcomm V +lemma coeff_U1_selection_rule {V : EffectivePotential} (hV : IsInvariant V) + (g : SL(2, ℂ)) (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [ψ]ₑ) + (s : Multiset FieldSpecification) (hs : (s.map d).prod ≠ 1) : + coeff s V = 0 := by + have hterm : ∀ l : List FieldSpecification, + rep g (termOfList l) = (l.map d).prod • termOfList l := by + intro l + induction l with + | nil => simp + | cons a l ih => + rw [termOfList_cons, rep_mul, hg, ih, List.map_cons, List.prod_cons, + smul_mul_smul_comm] + have hcomm : ∀ W : EffectivePotential, + coeff s (rep g W) = (s.map d).prod • coeff s W := by + intro W + induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hW' + obtain ⟨l, rfl⟩ := hW' + rw [hterm, map_smul, coeff_apply_termOfList] + by_cases hc : Multiset.ofList l = s + · rw [if_pos hc, ← hc, Multiset.map_coe, Multiset.prod_coe] + · simp [if_neg hc] + · simp + · simp [map_add, hx, hy] + · simp only [map_smul, hx] + rw [smul_comm] + have hfix : coeff s V = (s.map d).prod • coeff s V := by + conv_lhs => rw [← hV g] + exact hcomm V + have h1 : (1 - (s.map d).prod) • coeff s V = 0 := by + rw [sub_smul, one_smul, ← hfix, sub_self] + rcases smul_eq_zero.mp h1 with h | h + · exact absurd (sub_eq_zero.mp h).symm hs + · exact h + +/-- The selection rule on coefficients coming from the anti-symmetry of fermionic fields. -/ +lemma coeff_fermionic_selection_rule {V : EffectivePotential} (hV : IsInvariant V) + (s : Multiset FieldSpecification) (hs : ¬ s.Nodup) : + coeff s V = 0 := by + sorry + +/-- The selection rule on coefficients saying that + every term with an odd number of fermions is zero. -/ +lemma coeff_odd_selection_rule {V : EffectivePotential} (hV : IsInvariant V) + (s : Multiset FieldSpecification) (hs : Odd s.card) : + coeff s V = 0 := by + refine coeff_U1_selection_rule hV (g := -1) (d := fun ψ => -1) ?_ s ?_ + · intro ψ + sorry + · simp + sorry + /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := @@ -754,6 +807,13 @@ lemma eq_sum_massDimCoeff (V : EffectivePotential) : V = ∑ n ∈ massDimSupport V, massDimCoeff n V := by sorry +/-! + +## Constraining the effective potential + +-/ + + end EffectivePotential end From 4f77c4968d3a093282a5e72c988abc7046c0bdce Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 08:38:39 +0100 Subject: [PATCH 33/48] refactor: update name --- ...ntial.lean => EFTLagrangianExclDeriv.lean} | 135 ++++++++++-------- 1 file changed, 78 insertions(+), 57 deletions(-) rename Physlib/Particles/PureFermionic/{EffectivePotential.lean => EFTLagrangianExclDeriv.lean} (87%) diff --git a/Physlib/Particles/PureFermionic/EffectivePotential.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean similarity index 87% rename from Physlib/Particles/PureFermionic/EffectivePotential.lean rename to Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 974ae3c67..3fb0ca13e 100644 --- a/Physlib/Particles/PureFermionic/EffectivePotential.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -69,10 +69,10 @@ open CategoryTheory.MonoidalCategory /-- The type corresponding to the effective potential of a left-handed Weyl fermion. -/ -abbrev EffectivePotential : Type := ExteriorAlgebra ℂ +abbrev EFTLagrangianExclDeriv : Type := ExteriorAlgebra ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) -namespace EffectivePotential +namespace EFTLagrangianExclDeriv /-! @@ -81,7 +81,7 @@ namespace EffectivePotential -/ /-- The representation of the Lorentz group (here `SL(2, ℂ)`) on `EffectivePotential`. -/ -def rep : Representation ℂ SL(2, ℂ) EffectivePotential where +def rep : Representation ℂ SL(2, ℂ) EFTLagrangianExclDeriv where toFun Λ := (ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap (LeftHandedWeyl.rep.conj.dual Λ))).toLinearMap map_one' := by @@ -91,7 +91,7 @@ def rep : Representation ℂ SL(2, ℂ) EffectivePotential where simp only [map_mul, End.mul_eq_comp, ← LinearMap.prodMap_comp, ← ExteriorAlgebra.map_comp_map, AlgHom.comp_toLinearMap] -lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : +lemma rep_apply (Λ : SL(2, ℂ)) (V : EFTLagrangianExclDeriv) : rep Λ V = ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap (LeftHandedWeyl.rep.conj.dual Λ)) V := rfl @@ -99,7 +99,7 @@ lemma rep_apply (Λ : SL(2, ℂ)) (V : EffectivePotential) : lemma rep_apply_one (Λ : SL(2, ℂ)) : rep Λ 1 = 1 := by simp [rep_apply] -lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : +lemma rep_mul (Λ : SL(2, ℂ)) (V W : EFTLagrangianExclDeriv) : rep Λ (V * W) = rep Λ V * rep Λ W:= by simp [rep] @@ -112,22 +112,22 @@ lemma rep_mul (Λ : SL(2, ℂ)) (V W : EffectivePotential) : /-- An effective potential is Lorentz invariant if it is stable under the action of the Lorentz group. -/ -def IsInvariant (V : EffectivePotential) : Prop := ∀ Λ, rep Λ V = V +def IsInvariant (V : EFTLagrangianExclDeriv) : Prop := ∀ Λ, rep Λ V = V -lemma IsInvariant.eq_iff {V : EffectivePotential} : +lemma IsInvariant.eq_iff {V : EFTLagrangianExclDeriv} : IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl -lemma IsInvariant.add {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : +lemma IsInvariant.add {V W : EFTLagrangianExclDeriv} (hV : IsInvariant V) (hW : IsInvariant W) : IsInvariant (V + W) := by intro Λ simp_all [IsInvariant.eq_iff] -lemma IsInvariant.smul {V : EffectivePotential} (hV : IsInvariant V) (c : ℂ) : +lemma IsInvariant.smul {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (c : ℂ) : IsInvariant (c • V) := by intro Λ simp_all [IsInvariant.eq_iff] -lemma IsInvariant.mul {V W : EffectivePotential} (hV : IsInvariant V) (hW : IsInvariant W) : +lemma IsInvariant.mul {V W : EFTLagrangianExclDeriv} (hV : IsInvariant V) (hW : IsInvariant W) : IsInvariant (V * W) := by intro Λ simp_all [IsInvariant.eq_iff, rep_mul] @@ -136,7 +136,7 @@ lemma IsInvariant.one : IsInvariant 1 := by intro Λ simp [rep] -end EffectivePotential +end EFTLagrangianExclDeriv /-! @@ -151,7 +151,7 @@ deriving DecidableEq namespace FieldSpecification -open EffectivePotential +open EFTLagrangianExclDeriv instance : Fintype FieldSpecification where elems := {ψ 0, ψ 1, barψ 0, barψ 1} @@ -186,7 +186,7 @@ def moduleBasis : Basis FieldSpecification ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) := (LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex toSumFin.symm -def toEffectivePotential (ψ : FieldSpecification) : EffectivePotential := +def toEffectivePotential (ψ : FieldSpecification) : EFTLagrangianExclDeriv := ExteriorAlgebra.ι ℂ (moduleBasis ψ) scoped notation "[" v "]ₑ" => toEffectivePotential v @@ -259,7 +259,7 @@ def massDimension : FieldSpecification → ℕ end FieldSpecification -namespace EffectivePotential +namespace EFTLagrangianExclDeriv open FieldSpecification @@ -268,7 +268,7 @@ open FieldSpecification ## Elements from a list of FieldSpecifications -/ -def termOfList (l : List FieldSpecification) : EffectivePotential := +def termOfList (l : List FieldSpecification) : EFTLagrangianExclDeriv := (l.map toEffectivePotential).prod lemma termOfList_cons (ψ : FieldSpecification) (l : List FieldSpecification) : @@ -313,6 +313,16 @@ lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List FieldSpecification) | cons i l ih => simp [termOfList_cons, rep_mul, ih] +lemma rep_termOfList_of_monomial (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) + (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [σ ψ]ₑ) + (l : List FieldSpecification) : + rep g (termOfList l) = (l.map d).prod • termOfList (l.map σ):= by + induction l with + | nil => simp + | cons a l ih => + rw [termOfList_cons, rep_mul, hg, ih] + simp [termOfList_cons, smul_smul, mul_comm] + lemma rep_scale_termOfList_of_rep_scale_toEffectivePotential (Λ : SL(2, ℂ)) (h : ∀ ψ, ∃ c : ℂ, rep Λ [ψ]ₑ = c • [ψ]ₑ) (l : List FieldSpecification) : ∃ c : ℂ, rep Λ (termOfList l) = c • termOfList l := by @@ -325,7 +335,7 @@ lemma rep_scale_termOfList_of_rep_scale_toEffectivePotential (Λ : SL(2, ℂ)) simp [termOfList_cons, rep_mul, hcψ, hct] module -lemma mem_termOfList_span (V : EffectivePotential) : +lemma mem_termOfList_span (V : EFTLagrangianExclDeriv) : V ∈ Submodule.span ℂ (Set.range termOfList) := by induction V using ExteriorAlgebra.induction with | algebraMap r => @@ -393,7 +403,7 @@ lemma termOfList_ofFn {n : ℕ} (g : Fin n → FieldSpecification) : -/ -def termOfTuple {n} (g : Fin n → FieldSpecification) : EffectivePotential := +def termOfTuple {n} (g : Fin n → FieldSpecification) : EFTLagrangianExclDeriv := termOfList (List.ofFn g) lemma termOfTuple_eq_ιMulti {n} (g : Fin n → FieldSpecification) : @@ -408,15 +418,15 @@ lemma termOfTuple_perm {n} (g : Fin n → FieldSpecification) {i j : Fin n} (hij def termOfVectTuple {n} : AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - EffectivePotential (Fin n) := ExteriorAlgebra.ιMulti ℂ n + EFTLagrangianExclDeriv (Fin n) := ExteriorAlgebra.ιMulti ℂ n def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) - EffectivePotential (Fin n) where + EFTLagrangianExclDeriv (Fin n) where toMultilinearMap := ∑ g : Fin n → FieldSpecification, if Multiset.ofList (List.ofFn g) = s then - (LinearMap.toSpanSingleton ℂ EffectivePotential (termOfTuple g)).compMultilinearMap + (LinearMap.toSpanSingleton ℂ EFTLagrangianExclDeriv (termOfTuple g)).compMultilinearMap ((MultilinearMap.mkPiAlgebra ℂ (Fin n) ℂ).compLinearMap fun i => moduleBasis.coord (g i)) else 0 map_eq_zero_of_eq' := by @@ -475,7 +485,7 @@ this is where you can think of it as a coefficient. -/ -def coeff (s : Multiset FieldSpecification) : EffectivePotential →ₗ[ℂ] EffectivePotential := +def coeff (s : Multiset FieldSpecification) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := ExteriorAlgebra.liftAlternating (coeffOfVectorTuple s) lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) : @@ -505,8 +515,15 @@ lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSp exact termOfList_eq_ιMulti l · simp +lemma coeff_one (s : Multiset FieldSpecification) : coeff s 1 = if s = ∅ then 1 else 0 := by + trans coeff s (termOfList []) + · simp + · rw [coeff_apply_termOfList] + simp + grind + @[simp] -lemma coeff_coeff_self {s : Multiset FieldSpecification} (V : EffectivePotential) : +lemma coeff_coeff_self {s : Multiset FieldSpecification} (V : EFTLagrangianExclDeriv) : coeff s (coeff s V) = coeff s V := by induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy a x _ hx @@ -519,7 +536,7 @@ lemma coeff_coeff_self {s : Multiset FieldSpecification} (V : EffectivePotential · simp [hx] lemma coeff_eq_termOfList {s : Multiset FieldSpecification} - (V : EffectivePotential) {l : List FieldSpecification} (hl : Multiset.ofList l = s) : + (V : EFTLagrangianExclDeriv) {l : List FieldSpecification} (hl : Multiset.ofList l = s) : ∃ c : ℂ, coeff s V = c • termOfList l := by induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy a x _ hx @@ -545,47 +562,51 @@ lemma coeff_eq_termOfList {s : Multiset FieldSpecification} simp [hx, smul_smul] lemma coeff_eq_exists_termOfList (s : Multiset FieldSpecification) - (V : EffectivePotential) : + (V : EFTLagrangianExclDeriv) : ∃ l, ∃ c : ℂ, coeff s V = c • termOfList l := by obtain ⟨c, hl⟩ := coeff_eq_termOfList V (s := s) (l := Multiset.toList s) (by simp) use Multiset.toList s use c +lemma coeff_monomial_selection_rule (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) + (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [σ ψ]ₑ) + (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv) (hV : IsInvariant V) : + coeff (s.map σ) V = rep g (coeff s V) := by + suffices h : ∀ W, coeff (s.map σ) (rep g W) = rep g (coeff s W) by + specialize h V + rw [hV g] at h + exact h + intro W + induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hW' + obtain ⟨l, rfl⟩ := hW' + rw [rep_termOfList_of_monomial g σ d hg, map_smul, + coeff_apply_termOfList, coeff_apply_termOfList] + have hcond : Multiset.ofList (List.map σ l) = Multiset.map σ s ↔ + Multiset.ofList l = s := by + rw [← Multiset.map_coe] + exact ⟨fun hc => Multiset.map_injective σ.injective hc, fun hc => by rw [hc]⟩ + split_ifs with h1 h2 h2 + · rw [rep_termOfList_of_monomial g σ d hg] + · exact absurd (hcond.mp h1) h2 + · exact absurd (hcond.mpr h2) h1 + · simp + · simp + · simp [hx, hy] + · simp [hx] + /-- If the action of `g` is to permute the fields, then it defines a relation between the coefficients of the effective potential. -/ lemma coeff_perm_selection_rule (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) (hg : ∀ ψ, rep g [ψ]ₑ = [σ ψ]ₑ) (s : Multiset FieldSpecification) - (V : EffectivePotential) (hV : IsInvariant V) : + (V : EFTLagrangianExclDeriv) (hV : IsInvariant V) : coeff (s.map σ) V = rep g (coeff s V) := by - have hterm : ∀ l : List FieldSpecification, - rep g (termOfList l) = termOfList (l.map σ) := by - intro l - induction l with - | nil => simp - | cons a l ih => - rw [termOfList_cons, rep_mul, hg, ih, List.map_cons, termOfList_cons] - have hcomm : ∀ W : EffectivePotential, - coeff (s.map σ) (rep g W) = rep g (coeff s W) := by - intro W - induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy - a x _ hx - · simp only [Set.mem_range] at hW' - obtain ⟨l, rfl⟩ := hW' - rw [hterm, coeff_apply_termOfList, coeff_apply_termOfList] - have hcond : Multiset.ofList (List.map σ l) = Multiset.map σ s ↔ - Multiset.ofList l = s := by - rw [← Multiset.map_coe] - exact ⟨fun hc => Multiset.map_injective σ.injective hc, fun hc => by rw [hc]⟩ - by_cases hc : Multiset.ofList l = s - · rw [if_pos (hcond.mpr hc), if_pos hc, hterm] - · rw [if_neg (fun hcon => hc (hcond.mp hcon)), if_neg hc, map_zero] - · simp - · simp [map_add, hx, hy] - · simp [map_smul, hx] - conv_lhs => rw [← hV g] - exact hcomm V + apply coeff_monomial_selection_rule g σ (fun _ => 1) ?_ s V hV + intro ψ + simpa using hg ψ -lemma coeff_U1_selection_rule {V : EffectivePotential} (hV : IsInvariant V) +lemma coeff_U1_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (g : SL(2, ℂ)) (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [ψ]ₑ) (s : Multiset FieldSpecification) (hs : (s.map d).prod ≠ 1) : coeff s V = 0 := by @@ -597,7 +618,7 @@ lemma coeff_U1_selection_rule {V : EffectivePotential} (hV : IsInvariant V) | cons a l ih => rw [termOfList_cons, rep_mul, hg, ih, List.map_cons, List.prod_cons, smul_mul_smul_comm] - have hcomm : ∀ W : EffectivePotential, + have hcomm : ∀ W : EFTLagrangianExclDeriv, coeff s (rep g W) = (s.map d).prod • coeff s W := by intro W induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy @@ -622,14 +643,14 @@ lemma coeff_U1_selection_rule {V : EffectivePotential} (hV : IsInvariant V) · exact h /-- The selection rule on coefficients coming from the anti-symmetry of fermionic fields. -/ -lemma coeff_fermionic_selection_rule {V : EffectivePotential} (hV : IsInvariant V) +lemma coeff_fermionic_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (s : Multiset FieldSpecification) (hs : ¬ s.Nodup) : coeff s V = 0 := by sorry /-- The selection rule on coefficients saying that every term with an odd number of fermions is zero. -/ -lemma coeff_odd_selection_rule {V : EffectivePotential} (hV : IsInvariant V) +lemma coeff_odd_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (s : Multiset FieldSpecification) (hs : Odd s.card) : coeff s V = 0 := by refine coeff_U1_selection_rule hV (g := -1) (d := fun ψ => -1) ?_ s ?_ @@ -814,7 +835,7 @@ lemma eq_sum_massDimCoeff (V : EffectivePotential) : -/ -end EffectivePotential +end EFTLagrangianExclDeriv end end Fermion From 73f9282178edb2fa3defba3b88aa789be91ddbd7 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 08:47:28 +0100 Subject: [PATCH 34/48] fix: build --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 124 ++++++++---------- 1 file changed, 54 insertions(+), 70 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 3fb0ca13e..9adbba52a 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -31,14 +31,14 @@ exterior algebra. Thus, the type in which the potential lives is `ExteriorAlgebra ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl))`. -We call this type `EffectivePotential` and define it and its properties in this file. +We call this type `EFTLagrangianExclDeriv` and define it and its properties in this file. Note that `Module.Dual ℂ LeftHandedWeyl` is equivalent to `DualLeftHandedWeyl` and `Module.Dual ℂ (ConjModule LeftHandedWeyl)` is equivalent to `DualRightHandedWeyl`, so we could equivalently define the effective potential as `ExteriorAlgebra ℂ (DualLeftHandedWeyl × DualRightHandedWeyl)`. We have done the former here as it generalises to other cases. -On `EffectivePotential` we define a representation of the Lorentz group, and prove that that +On `EFTLagrangianExclDeriv` we define a representation of the Lorentz group, and prove that that if the potential is invariant under the Lorentz group it must be of the form `c + m1 * ψ 0 * ψ 1 + m2 * barψ 0 * barψ 1 + λ * ψ 0 * ψ 1 * barψ 0 * barψ 1`, which is true to all orders. @@ -80,7 +80,7 @@ namespace EFTLagrangianExclDeriv -/ -/-- The representation of the Lorentz group (here `SL(2, ℂ)`) on `EffectivePotential`. -/ +/-- The representation of the Lorentz group (here `SL(2, ℂ)`) on `EFTLagrangianExclDeriv`. -/ def rep : Representation ℂ SL(2, ℂ) EFTLagrangianExclDeriv where toFun Λ := (ExteriorAlgebra.map ((LeftHandedWeyl.rep.dual Λ).prodMap (LeftHandedWeyl.rep.conj.dual Λ))).toLinearMap @@ -186,33 +186,33 @@ def moduleBasis : Basis FieldSpecification ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) := (LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex toSumFin.symm -def toEffectivePotential (ψ : FieldSpecification) : EFTLagrangianExclDeriv := +def toEFTLagrangianExclDeriv (ψ : FieldSpecification) : EFTLagrangianExclDeriv := ExteriorAlgebra.ι ℂ (moduleBasis ψ) -scoped notation "[" v "]ₑ" => toEffectivePotential v +scoped notation "[" v "]ₑ" => toEFTLagrangianExclDeriv v -lemma toEffectivePotential_eq (ψ : FieldSpecification) : - toEffectivePotential ψ = ExteriorAlgebra.ι ℂ (moduleBasis ψ) := rfl +lemma toEFTLagrangianExclDeriv_eq (ψ : FieldSpecification) : + toEFTLagrangianExclDeriv ψ = ExteriorAlgebra.ι ℂ (moduleBasis ψ) := rfl -lemma toEffectivePotential_ψ_eq (α : Fin 2) : [ψ α]ₑ = +lemma toEFTLagrangianExclDeriv_ψ_eq (α : Fin 2) : [ψ α]ₑ = ExteriorAlgebra.ι ℂ (LinearMap.inl ℂ _ _ (LeftHandedWeyl.basis.dualBasis α)) := by - fin_cases α <;> simp [toEffectivePotential_eq, moduleBasis, toSumFin] + fin_cases α <;> simp [toEFTLagrangianExclDeriv_eq, moduleBasis, toSumFin] -lemma toEffectivePotential_barψ_eq (α : Fin 2) : [barψ α]ₑ = +lemma toEFTLagrangianExclDeriv_barψ_eq (α : Fin 2) : [barψ α]ₑ = ExteriorAlgebra.ι ℂ (LinearMap.inr ℂ _ _ (LeftHandedWeyl.basis.conj.dualBasis α)) := by - fin_cases α <;> simp [toEffectivePotential_eq, moduleBasis, toSumFin] + fin_cases α <;> simp [toEFTLagrangianExclDeriv_eq, moduleBasis, toSumFin] @[simp] -lemma toEffectivePotential_mul_self (ψ : FieldSpecification) : [ψ]ₑ * [ψ]ₑ = 0 := by - simp [toEffectivePotential_eq] +lemma toEFTLagrangianExclDeriv_mul_self (ψ : FieldSpecification) : [ψ]ₑ * [ψ]ₑ = 0 := by + simp [toEFTLagrangianExclDeriv_eq] -lemma toEffectivePotential_mul_anti_commute (ψ χ : FieldSpecification) : +lemma toEFTLagrangianExclDeriv_mul_anti_commute (ψ χ : FieldSpecification) : [ψ]ₑ * [χ]ₑ = - [χ]ₑ * [ψ]ₑ := by - simp [toEffectivePotential_eq, neg_mul, eq_neg_iff_add_eq_zero] + simp [toEFTLagrangianExclDeriv_eq, neg_mul, eq_neg_iff_add_eq_zero] -lemma rep_apply_toEffectivePotential_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : +lemma rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : rep Λ [ψ α]ₑ = ∑ (β : Fin 2), Λ⁻¹ α β • [ψ β]ₑ := by - simp only [toEffectivePotential_ψ_eq, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, + simp only [toEFTLagrangianExclDeriv_ψ_eq, Basis.coe_dualBasis, LinearMap.coe_inl, rep_apply, Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, ExteriorAlgebra.ι_inj, Prod.mk.injEq, and_true] @@ -221,9 +221,9 @@ lemma rep_apply_toEffectivePotential_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : simp [Module.Dual.transpose_apply, LeftHandedWeyl.rep_apply_basis, -SpecialLinearGroup.coe_inv] -lemma rep_apply_toEffectivePotential_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : +lemma rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : rep Λ [barψ α]ₑ = ∑ β, star (Λ⁻¹ α β) • [barψ β]ₑ := by - simp only [toEffectivePotential_barψ_eq, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, + simp only [toEFTLagrangianExclDeriv_barψ_eq, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] @@ -269,7 +269,7 @@ open FieldSpecification -/ def termOfList (l : List FieldSpecification) : EFTLagrangianExclDeriv := - (l.map toEffectivePotential).prod + (l.map toEFTLagrangianExclDeriv).prod lemma termOfList_cons (ψ : FieldSpecification) (l : List FieldSpecification) : termOfList (ψ :: l) = [ψ]ₑ * termOfList l := by simp [termOfList] @@ -291,7 +291,7 @@ lemma mul_termOfList_of_mem (ψ : FieldSpecification) (l : List FieldSpecificati | cons β t ih => rcases List.mem_cons.mp hψ with rfl | ha · simp [termOfList_cons, ← mul_assoc] - · simp [termOfList_cons, ← mul_assoc, toEffectivePotential_mul_anti_commute ψ β] + · simp [termOfList_cons, ← mul_assoc, toEFTLagrangianExclDeriv_mul_anti_commute ψ β] simp [mul_assoc, ih ha] lemma termOfList_zero_of_not_nodup (l : List FieldSpecification) (h : ¬ l.Nodup) : @@ -307,7 +307,7 @@ lemma termOfList_zero_of_not_nodup (l : List FieldSpecification) (h : ¬ l.Nodup · rw [ih fun hn => h (List.nodup_cons.mpr ⟨hmem, hn⟩), mul_zero] lemma rep_termOfList_eq_map_rep (Λ : SL(2, ℂ)) (l : List FieldSpecification) : - rep Λ (termOfList l) = ((l.map toEffectivePotential).map (rep Λ)).prod := by + rep Λ (termOfList l) = ((l.map toEFTLagrangianExclDeriv).map (rep Λ)).prod := by induction l with | nil => simp | cons i l ih => @@ -323,7 +323,7 @@ lemma rep_termOfList_of_monomial (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecific rw [termOfList_cons, rep_mul, hg, ih] simp [termOfList_cons, smul_smul, mul_comm] -lemma rep_scale_termOfList_of_rep_scale_toEffectivePotential (Λ : SL(2, ℂ)) +lemma rep_scale_termOfList_of_rep_scale_toEFTLagrangianExclDeriv (Λ : SL(2, ℂ)) (h : ∀ ψ, ∃ c : ℂ, rep Λ [ψ]ₑ = c • [ψ]ₑ) (l : List FieldSpecification) : ∃ c : ℂ, rep Λ (termOfList l) = c • termOfList l := by induction l with @@ -372,7 +372,7 @@ lemma termOfList_perm_neq_zero {l1 l2 : List FieldSpecification} (h : l1.Perm l2 | swap x y l => refine ⟨-1, ?_⟩ rw [termOfList_cons, termOfList_cons, termOfList_cons, termOfList_cons, ← mul_assoc, - toEffectivePotential_mul_anti_commute y x] + toEFTLagrangianExclDeriv_mul_anti_commute y x] simp [mul_assoc] | trans _ _ ih1 ih2 => obtain ⟨c1, hc1, hc1'⟩ := ih1 @@ -610,35 +610,20 @@ lemma coeff_U1_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (g : SL(2, ℂ)) (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [ψ]ₑ) (s : Multiset FieldSpecification) (hs : (s.map d).prod ≠ 1) : coeff s V = 0 := by - have hterm : ∀ l : List FieldSpecification, - rep g (termOfList l) = (l.map d).prod • termOfList l := by - intro l - induction l with - | nil => simp - | cons a l ih => - rw [termOfList_cons, rep_mul, hg, ih, List.map_cons, List.prod_cons, - smul_mul_smul_comm] - have hcomm : ∀ W : EFTLagrangianExclDeriv, - coeff s (rep g W) = (s.map d).prod • coeff s W := by - intro W - induction' mem_termOfList_span W using Submodule.span_induction with W' hW' x y _ _ hx hy - a x _ hx - · simp only [Set.mem_range] at hW' - obtain ⟨l, rfl⟩ := hW' - rw [hterm, map_smul, coeff_apply_termOfList] - by_cases hc : Multiset.ofList l = s - · rw [if_pos hc, ← hc, Multiset.map_coe, Multiset.prod_coe] - · simp [if_neg hc] - · simp - · simp [map_add, hx, hy] - · simp only [map_smul, hx] - rw [smul_comm] - have hfix : coeff s V = (s.map d).prod • coeff s V := by - conv_lhs => rw [← hV g] - exact hcomm V - have h1 : (1 - (s.map d).prod) • coeff s V = 0 := by - rw [sub_smul, one_smul, ← hfix, sub_self] - rcases smul_eq_zero.mp h1 with h | h + have h1 : coeff s V = rep g (coeff s V) := by + simpa using coeff_monomial_selection_rule g (Equiv.refl FieldSpecification) d + (by simpa using hg) s V hV + have hfix : rep g (coeff s V) = (s.map d).prod • coeff s V := by + obtain ⟨c, hl⟩ := coeff_eq_termOfList V (s := s) (l := Multiset.toList s) (by simp) + have hprod : ((Multiset.toList s).map d).prod = (s.map d).prod := by + rw [← Multiset.coe_toList s] + simp + rw [hl, map_smul, + rep_termOfList_of_monomial g (Equiv.refl FieldSpecification) d (by simpa using hg)] + simp [smul_smul, hprod, mul_comm] + have h2 : (1 - (s.map d).prod) • coeff s V = 0 := by + rw [sub_smul, one_smul, ← hfix, ← h1, sub_self] + rcases smul_eq_zero.mp h2 with h | h · exact absurd (sub_eq_zero.mp h).symm hs · exact h @@ -651,8 +636,7 @@ lemma coeff_fermionic_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvari /-- The selection rule on coefficients saying that every term with an odd number of fermions is zero. -/ lemma coeff_odd_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) - (s : Multiset FieldSpecification) (hs : Odd s.card) : - coeff s V = 0 := by + (s : Multiset FieldSpecification) (hs : Odd s.card) : coeff s V = 0 := by refine coeff_U1_selection_rule hV (g := -1) (d := fun ψ => -1) ?_ s ?_ · intro ψ sorry @@ -661,7 +645,7 @@ lemma coeff_odd_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ -def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := +def support (V : EFTLagrangianExclDeriv) : Finset (Multiset FieldSpecification) := Set.Finite.toFinset (s := {s | coeff s V ≠ 0}) <| by induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy a x _ hx @@ -687,25 +671,25 @@ def support (V : EffectivePotential) : Finset (Multiset FieldSpecification) := grind @[simp] -lemma support_zero_eq_empty : support (0 : EffectivePotential) = ∅ := by +lemma support_zero_eq_empty : support (0 : EFTLagrangianExclDeriv) = ∅ := by simp [support] -lemma mem_support_iff {V : EffectivePotential} {s : Multiset FieldSpecification} : +lemma mem_support_iff {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} : s ∈ support V ↔ coeff s V ≠ 0 := by simp [support] -lemma support_add {V W : EffectivePotential} : +lemma support_add {V W : EFTLagrangianExclDeriv} : support (V + W) ⊆ support V ∪ support W := by sorry -lemma support_smul {V : EffectivePotential} (c : ℂ) : +lemma support_smul {V : EFTLagrangianExclDeriv} (c : ℂ) : support (c • V) ⊆ support V := by simp [support] -lemma support_smul_neq_zero {V : EffectivePotential} (c : ℂ) (hc : c ≠ 0) : +lemma support_smul_neq_zero {V : EFTLagrangianExclDeriv} (c : ℂ) (hc : c ≠ 0) : support (c • V) = support V := by simp [support, hc] -lemma eq_sum_support_coeff (V : EffectivePotential) : V = ∑ s ∈ support V, coeff s V := by +lemma eq_sum_support_coeff (V : EFTLagrangianExclDeriv) : V = ∑ s ∈ support V, coeff s V := by sorry lemma mem_support_termOfList_iff {l : List FieldSpecification} (s : Multiset FieldSpecification): @@ -715,7 +699,7 @@ lemma mem_support_termOfList_iff {l : List FieldSpecification} (s : Multiset Fie /-- A general result related to whether a multiset of field specifications is excluded from the support of an effective potential due to a selection rule based on the group action. -/ -lemma support_selection_rule {V : EffectivePotential} (hV : IsInvariant V) +lemma support_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) {s : Multiset FieldSpecification} (selection_rule : ∃ g : SL(2, ℂ), ∃ l : List FieldSpecification, ∃ c : ℂ, @@ -786,7 +770,7 @@ lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecifi -/ -def irrepCoeff (i : Multiset Irrep) : EffectivePotential →ₗ[ℂ] EffectivePotential where +def irrepCoeff (i : Multiset Irrep) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv where toFun := fun V => ∑ s ∈ support V, if Multiset.map toIrrep s = i then coeff s V else 0 map_add' := by intro V W @@ -795,15 +779,15 @@ def irrepCoeff (i : Multiset Irrep) : EffectivePotential →ₗ[ℂ] EffectivePo intro c V sorry -def irrepSupport (V : EffectivePotential) : Finset (Multiset Irrep) := +def irrepSupport (V : EFTLagrangianExclDeriv) : Finset (Multiset Irrep) := (support V).image (Multiset.map toIrrep) -lemma irrepCoeff_rep {i : Multiset Irrep} {V : EffectivePotential} (g : SL(2, ℂ)) : +lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2, ℂ)) : rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by sorry -lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EffectivePotential} (hV : IsInvariant V) : +lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) : irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by sorry /-! @@ -812,7 +796,7 @@ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EffectivePotential} (hV : -/ -def massDimCoeff (n : ℚ) : EffectivePotential →ₗ[ℂ] EffectivePotential where +def massDimCoeff (n : ℚ) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv where toFun := fun V => ∑ s ∈ support V, if (s.map massDimension).sum = n then coeff s V else 0 map_add' := by intro V W @@ -821,10 +805,10 @@ def massDimCoeff (n : ℚ) : EffectivePotential →ₗ[ℂ] EffectivePotential w intro c V sorry -def massDimSupport (V : EffectivePotential) : Finset ℚ := +def massDimSupport (V : EFTLagrangianExclDeriv) : Finset ℚ := (support V).image (fun s => (s.map massDimension).sum) -lemma eq_sum_massDimCoeff (V : EffectivePotential) : +lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : V = ∑ n ∈ massDimSupport V, massDimCoeff n V := by sorry From 5517c2d167ce55f676130daf70e7e11b2e8d3df4 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:01:24 +0100 Subject: [PATCH 35/48] feat: fill in sorry --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 69 +++++++++++++++---- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 9adbba52a..b323a5e89 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -415,7 +415,6 @@ lemma termOfTuple_perm {n} (g : Fin n → FieldSpecification) {i j : Fin n} (hij rw [termOfTuple_eq_ιMulti, termOfTuple_eq_ιMulti] exact AlternatingMap.map_swap (ExteriorAlgebra.ιMulti ℂ n) (fun k => moduleBasis (g k)) hij - def termOfVectTuple {n} : AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) EFTLagrangianExclDeriv (Fin n) := ExteriorAlgebra.ιMulti ℂ n @@ -677,9 +676,14 @@ lemma support_zero_eq_empty : support (0 : EFTLagrangianExclDeriv) = ∅ := by lemma mem_support_iff {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} : s ∈ support V ↔ coeff s V ≠ 0 := by simp [support] +lemma coeff_eq_zero_of_not_mem_support {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} + (h : s ∉ support V) : coeff s V = 0 := by + simpa [support, Set.Finite.mem_toFinset] using h + lemma support_add {V W : EFTLagrangianExclDeriv} : support (V + W) ⊆ support V ∪ support W := by - sorry + simp [support] + grind lemma support_smul {V : EFTLagrangianExclDeriv} (c : ℂ) : support (c • V) ⊆ support V := by @@ -689,23 +693,59 @@ lemma support_smul_neq_zero {V : EFTLagrangianExclDeriv} (c : ℂ) (hc : c ≠ 0 support (c • V) = support V := by simp [support, hc] -lemma eq_sum_support_coeff (V : EFTLagrangianExclDeriv) : V = ∑ s ∈ support V, coeff s V := by - sorry - lemma mem_support_termOfList_iff {l : List FieldSpecification} (s : Multiset FieldSpecification): s ∈ support (termOfList l) ↔ s = Multiset.ofList l ∧ termOfList l ≠ 0 := by simp [support, coeff_apply_termOfList] grind -/-- A general result related to whether a multiset of field specifications is excluded from -the support of an effective potential due to a selection rule based on the group action. -/ -lemma support_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) - {s : Multiset FieldSpecification} - (selection_rule : ∃ g : SL(2, ℂ), - ∃ l : List FieldSpecification, ∃ c : ℂ, - rep g (termOfList l) = c • termOfList l ∧ Multiset.ofList l = s) : - s ∉ support V := by - sorry +lemma support_termOfList_subset (l : List FieldSpecification) : + support (termOfList l) ⊆ {Multiset.ofList l} := by + intro s hs + simp [mem_support_termOfList_iff] at hs + simp [hs.1] + +lemma eq_sum_support_coeff (V : EFTLagrangianExclDeriv) : V = ∑ s ∈ support V, coeff s V := by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hV' + obtain ⟨l, rfl⟩ := hV' + trans ∑ s ∈ {Multiset.ofList l}, coeff s (termOfList l); swap + · symm + apply Finset.sum_subset (support_termOfList_subset l) + simp + intro hl + simp [mem_support_termOfList_iff] at hl + rw [hl] + simp + · simp [coeff_apply_termOfList] + · simp + · trans ∑ s ∈ x.support ∪ y.support, coeff s (x + y); swap + · symm + apply Finset.sum_subset + · simp [support_add] + · intro s hs hs' + exact coeff_eq_zero_of_not_mem_support hs' + · conv_lhs => rw [hx, hy] + simp [Finset.sum_add_distrib] + congr 1 + · apply Finset.sum_subset + · simp + · intro s hs hs' + exact coeff_eq_zero_of_not_mem_support hs' + · apply Finset.sum_subset + · simp + · intro s hs hs' + exact coeff_eq_zero_of_not_mem_support hs' + · trans ∑ s ∈ (support x).image (fun s => s), coeff s (a • x); swap + · symm + apply Finset.sum_subset + · simp [support_smul] + · intro s hs hs' + exact coeff_eq_zero_of_not_mem_support hs' + conv_lhs => rw [hx] + simp [Finset.smul_sum] + + /-! ## @@ -762,6 +802,7 @@ lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecifi rw [mem_support_termOfList_iff] at ht' simpa using ht'.1 + /-! From c3c81780e24b3ceac86b801545b5128dfe95b86e Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:52:03 +0100 Subject: [PATCH 36/48] Update EFTLagrangianExclDeriv.lean --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index b323a5e89..be94ba9cf 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -147,7 +147,7 @@ end EFTLagrangianExclDeriv inductive FieldSpecification : Type | ψ (α : Fin 2) : FieldSpecification | barψ (α : Fin 2) : FieldSpecification -deriving DecidableEq +deriving DecidableEq, Repr namespace FieldSpecification @@ -253,7 +253,7 @@ def toIrrep : FieldSpecification → Irrep -/ -def massDimension : FieldSpecification → ℕ +def massDimension : FieldSpecification → ℚ | .ψ _ => 3 / 2 | .barψ _ => 3 / 2 @@ -811,18 +811,26 @@ lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecifi -/ -def irrepCoeff (i : Multiset Irrep) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv where - toFun := fun V => ∑ s ∈ support V, if Multiset.map toIrrep s = i then coeff s V else 0 - map_add' := by - intro V W - sorry - map_smul' := by - intro c V - sorry +/-- The field content of a term which corresponds to a given irrep content. -/ +def allTermsWithIrrepContent (i : Multiset Irrep) : Finset (Multiset FieldSpecification) := + ((Finset.univ.sym i.card).image Sym.toMultiset).filter (fun s => Multiset.map toIrrep s = i) + +/-- The projection of a term of `EFTLagrangianExclDeriv` onto those operators which + have an irrep content determined by `i`. -/ +def irrepCoeff (i : Multiset Irrep) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := + ∑ s ∈ allTermsWithIrrepContent i, coeff s + +lemma irrepCoeff_eq_sum (i : Multiset Irrep) (V : EFTLagrangianExclDeriv) : + irrepCoeff i V = ∑ s ∈ allTermsWithIrrepContent i, coeff s V := by + simp [irrepCoeff] def irrepSupport (V : EFTLagrangianExclDeriv) : Finset (Multiset Irrep) := (support V).image (Multiset.map toIrrep) +lemma eq_sum_irrepCoeff (V : EFTLagrangianExclDeriv) : + V = ∑ i ∈ irrepSupport V, irrepCoeff i V := by + sorry + lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2, ℂ)) : rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by sorry @@ -837,6 +845,12 @@ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (h -/ +def allTermsWithMassDimension (n : ℚ) : Finset (Multiset FieldSpecification) := + -- Since there is no mass dimension less then 1, a term with mass dimension n + -- can have at most `n` fields + let x := List.range (Rat.ceil n + 1).toNat + + ((Finset.univ.sym x.card).image Sym.toMultiset).filter (fun s => (s.map massDimension).sum = n) def massDimCoeff (n : ℚ) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv where toFun := fun V => ∑ s ∈ support V, if (s.map massDimension).sum = n then coeff s V else 0 map_add' := by From 44432f83ffd1a8e1d8e416654bf3ac393f77a1ae Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 17 Jul 2026 14:18:12 +0100 Subject: [PATCH 37/48] refactor: Add results about irreps --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 74 ++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index be94ba9cf..39d886bb6 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -247,6 +247,16 @@ def toIrrep : FieldSpecification → Irrep | .ψ _ => .ψ | .barψ _ => .barψ +lemma rep_apply_toEFTLagrangianExclDeriv_mem_irrep (Λ : SL(2, ℂ)) (ψ : FieldSpecification) : + ∃ n, ∃ F : Fin n → FieldSpecification, (∃ f : Fin n → ℂ, rep Λ [ψ]ₑ = ∑ x, f x • [F x]ₑ) ∧ + (∀ x, toIrrep (F x) = toIrrep ψ) := by + match ψ with + | .ψ α => + exact ⟨2, .ψ, ⟨Λ⁻¹ α, rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum Λ α⟩, by simp [toIrrep]⟩ + | .barψ α => + exact ⟨2, .barψ, ⟨star (Λ⁻¹ α), rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum Λ α⟩, + by simp [toIrrep]⟩ + /-! ## Mass dimension @@ -335,6 +345,35 @@ lemma rep_scale_termOfList_of_rep_scale_toEFTLagrangianExclDeriv (Λ : SL(2, ℂ simp [termOfList_cons, rep_mul, hcψ, hct] module + +lemma rep_termOfList_eq_sum_of_toIrrep (Λ : SL(2, ℂ)) (l : List FieldSpecification) : + ∃ n, ∃ F : Fin n → List FieldSpecification, + (∃ f : Fin n → ℂ, rep Λ (termOfList l) = ∑ x, f x • termOfList (F x)) ∧ + (∀ x, (F x).map toIrrep = l.map toIrrep) := by + induction l with + | nil => + refine ⟨1, fun _ => [], ⟨fun _ => 1, by simp⟩, fun _ => rfl⟩ + | cons ψ t ih => + obtain ⟨n, F, ⟨f, hf⟩, hF⟩ := ih + obtain ⟨nψ, Fψ, ⟨fψ, hfψ⟩, hFψ⟩ := rep_apply_toEFTLagrangianExclDeriv_mem_irrep Λ ψ + use nψ * n + let F' : Fin nψ × Fin n → List FieldSpecification := fun ⟨i, j⟩ => Fψ i :: F j + use F' ∘ finProdFinEquiv.symm + refine ⟨?_, ?_⟩ + · use (fun ⟨i, j⟩ => fψ i * f j) ∘ finProdFinEquiv.symm + rw [← finProdFinEquiv.sum_comp] + simp [termOfList_cons, rep_mul, F', hfψ, hf] + rw [Fintype.sum_mul_sum, Fintype.sum_prod_type] + simp [smul_smul] + congr + funext x + congr + funext y + ring_nf + · intro x + obtain ⟨x, rfl⟩ := finProdFinEquiv.surjective x + simp [F', hF, hFψ] + lemma mem_termOfList_span (V : EFTLagrangianExclDeriv) : V ∈ Submodule.span ℂ (Set.range termOfList) := by induction V using ExteriorAlgebra.induction with @@ -815,6 +854,11 @@ lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecifi def allTermsWithIrrepContent (i : Multiset Irrep) : Finset (Multiset FieldSpecification) := ((Finset.univ.sym i.card).image Sym.toMultiset).filter (fun s => Multiset.map toIrrep s = i) +lemma mem_allTermsWithIrrepContent_iff (i : Multiset Irrep) (s : Multiset FieldSpecification) : + s ∈ allTermsWithIrrepContent i ↔ Multiset.map toIrrep s = i := by + simp [allTermsWithIrrepContent] + sorry + /-- The projection of a term of `EFTLagrangianExclDeriv` onto those operators which have an irrep content determined by `i`. -/ def irrepCoeff (i : Multiset Irrep) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := @@ -824,6 +868,19 @@ lemma irrepCoeff_eq_sum (i : Multiset Irrep) (V : EFTLagrangianExclDeriv) : irrepCoeff i V = ∑ s ∈ allTermsWithIrrepContent i, coeff s V := by simp [irrepCoeff] +lemma irrepCoeff_one (i : Multiset Irrep) : irrepCoeff i 1 = if i = ∅ then 1 else 0 := by + simp [irrepCoeff, coeff_one, allTermsWithIrrepContent] + split_ifs with hi <;> simp_all + rename_i h + subst h + apply hi ⟨∅, by simp⟩ + simp + +lemma irrepCoeff_termOfList (i : Multiset Irrep) (l : List FieldSpecification) : + irrepCoeff i (termOfList l) = if Multiset.map toIrrep (Multiset.ofList l) = i then + termOfList l else 0 := by + simp [irrepCoeff, coeff_apply_termOfList, mem_allTermsWithIrrepContent_iff] + def irrepSupport (V : EFTLagrangianExclDeriv) : Finset (Multiset Irrep) := (support V).image (Multiset.map toIrrep) @@ -831,10 +888,21 @@ lemma eq_sum_irrepCoeff (V : EFTLagrangianExclDeriv) : V = ∑ i ∈ irrepSupport V, irrepCoeff i V := by sorry -lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2, ℂ)) : - rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by +lemma irrepCoeff_rep_apply_fieldSpecification {i : Multiset Irrep} (g : SL(2, ℂ)) + (ψ : FieldSpecification) : + rep g (irrepCoeff i [ψ]ₑ) = irrepCoeff i (rep g [ψ]ₑ) := by sorry +lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2, ℂ)) : + rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp only [Set.mem_range] at hV' + obtain ⟨l, rfl⟩ := hV' + sorry -- use rep_termOfList_eq_sum_of_toIrrep + · simp + · simp [hx, hy] + · simp [hx] lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) : irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by @@ -845,6 +913,8 @@ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (h -/ +def upperBoundNumberOfFields (n : ℚ) : ℕ := by + let d := Fin.minimum massDimension def allTermsWithMassDimension (n : ℚ) : Finset (Multiset FieldSpecification) := -- Since there is no mass dimension less then 1, a term with mass dimension n -- can have at most `n` fields From 44142a8c4be1417097dfa786ce332421fcdd6018 Mon Sep 17 00:00:00 2001 From: Jinzheng Li Date: Mon, 20 Jul 2026 07:54:24 -0400 Subject: [PATCH 38/48] feat: complete sorries and mass-dimension section of the fermionic EFT Lagrangian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fill all eleven remaining sorries in Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean: - coeff_fermionic_selection_rule: via termOfList_zero_of_not_nodup. The IsInvariant hypothesis is dropped: the rule holds for any potential. - coeff_odd_selection_rule: fermion parity, via the new rep_neg_one_apply (the special case z = -1 of the diagonal family below). - mem_allTermsWithIrrepContent_iff: via multisetsOfCard. - eq_sum_irrepCoeff, eq_sum_massDimCoeff: via a new generic regrouping lemma eq_sum_fiber_coeff (decomposition of the support sum along any classifying map with specified fibers). - irrepCoeff_rep, irrepCoeff_rep_apply_fieldSpecification: via rep_termOfList_eq_sum_of_toIrrep, through a shared monomial helper. - irrepCoeff_ψ_barψ_eq_zero_of_isInvariant: no Lorentz-invariant operator mixes ψ with barψ. Proved with the new diagonal family diagSL (z : ℂˣ) : SL(2,ℂ) at z = 2i: the scaling factors of the four mixed pairs are 1/4, -1, -1 and 4, all ≠ 1, so coeff_U1_selection_rule applies. (Real diagonal elements, i.e. pure boosts, are insufficient: they scale the off-diagonal pairs by 1.) A TODO records that diagSL, diagSL_inv, diagSL_neg_one and twoI should move to Physlib.Relativity.SL2C.Basic when this development is split. Repair the mass-dimension section, which did not compile: - allTermsWithMassDimension is now the computable multisetsOfMassDim from the new file Physlib/Mathematics/MultisetsOfMassDim.lean (Finset.sym enumeration bounded by ⌊m / d_min⌋, with an ℕ-scaled decide-friendly variant and a denominator-clearing bridge lemma, as discussed on Zulip). upperBoundNumberOfFields is superseded by massDimCardBound. - massDimCoeff is defined as a sum of coeff over this fixed finset, so linearity holds by construction (removing the map_add'/map_smul' sorries). - decide examples: {ψ 0, ψ 1} has mass dimension 3; the quartic does not. Also: - fix the stale import Physlib.Particles.PureFermionic.EffectivePotential in Physlib.lean (renamed to EFTLagrangianExclDeriv), which broke the full-library build; - add docstrings to all previously undocumented definitions; - add simp evaluation lemmas so definitions stay opaque downstream (toIrrep_ψ, toIrrep_barψ, massDimension_eq, massDimensionNat_eq, diagSL_inv, diagSL_neg_one, diagScale_neg_one, diagScale_twoI_ψ, diagScale_twoI_barψ) and the structural fact sum_map_massDimension. The changes passed a ten-angle rubric review (correctness, reuse, scope, attribution, api-design, generality, placement, naming, documentation, proof-quality); the review's requested changes (private bound lemmas, authors header, defeq and simp-annotation hygiene, structure comments) are incorporated, with the SL2C placement recorded as a TODO. Co-authored-by: Claude Fable 5 --- Physlib.lean | 3 +- Physlib/Mathematics/MultisetsOfMassDim.lean | 217 ++++++++++ .../PureFermionic/EFTLagrangianExclDeriv.lean | 371 +++++++++++++++--- 3 files changed, 541 insertions(+), 50 deletions(-) create mode 100644 Physlib/Mathematics/MultisetsOfMassDim.lean diff --git a/Physlib.lean b/Physlib.lean index ead3e603e..d561038e4 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -106,6 +106,7 @@ public import Physlib.Mathematics.LinearPMap public import Physlib.Mathematics.List public import Physlib.Mathematics.List.InsertIdx public import Physlib.Mathematics.List.InsertionSort +public import Physlib.Mathematics.MultisetsOfMassDim public import Physlib.Mathematics.PiTensorProduct public import Physlib.Mathematics.RatComplexNum public import Physlib.Mathematics.SO3.Basic @@ -165,7 +166,7 @@ public import Physlib.Particles.FlavorPhysics.CKMMatrix.Rows public import Physlib.Particles.FlavorPhysics.CKMMatrix.StandardParameterization.Basic public import Physlib.Particles.FlavorPhysics.CKMMatrix.StandardParameterization.StandardParameters public import Physlib.Particles.NeutrinoPhysics.Basic -public import Physlib.Particles.PureFermionic.EffectivePotential +public import Physlib.Particles.PureFermionic.EFTLagrangianExclDeriv public import Physlib.Particles.StandardModel.AnomalyCancellation.Basic public import Physlib.Particles.StandardModel.AnomalyCancellation.FamilyMaps public import Physlib.Particles.StandardModel.AnomalyCancellation.NoGrav.Basic diff --git a/Physlib/Mathematics/MultisetsOfMassDim.lean b/Physlib/Mathematics/MultisetsOfMassDim.lean new file mode 100644 index 000000000..993d96854 --- /dev/null +++ b/Physlib/Mathematics/MultisetsOfMassDim.lean @@ -0,0 +1,217 @@ +/- +Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith, Nathaneal Sajan, Jinzheng Li +-/ +module + +public import Mathlib.Data.Finset.Sym +public import Mathlib.Data.Finset.Lattice.Fold +public import Mathlib.Data.Rat.Floor +public import Mathlib.Algebra.Order.BigOperators.Group.Multiset +/-! + +# Computable enumeration of multisets of a given mass dimension + +## i. Overview + +Given a finite type `F` of field specifications, a map `dim : F → ℚ` assigning to each field +its mass dimension (assumed positive), and a target `m : ℚ`, this file constructs, in a +computable way, the `Finset (Multiset F)` of all multisets of fields whose overall mass +dimension is `m`. This corresponds to the possible operators (terms) of mass dimension `m` +in an EFT Lagrangian built from the fields in `F` (excluding derivatives). + +The construction proceeds by noting that if `d` is the minimal mass dimension of a field, +then a multiset of mass dimension `m` has at most `⌊m / d⌋₊` elements. We therefore +enumerate all multisets of cardinality at most this bound using `Finset.sym`, and filter +by the mass-dimension condition. + +Since the construction is computable it can be used with `#eval`. However, rational +arithmetic does not reduce in the kernel, so `multisetsOfMassDim` can not directly be +used with `decide`. For this reason we also provide a version `multisetsOfMassDimNat` +with natural-number valued mass dimensions (corresponding to clearing denominators, +e.g. working in units of half mass dimensions so that a Weyl fermion has scaled +dimension `3`), which is `decide`-friendly. The lemma `multisetsOfMassDim_eq_natCast` +allows one to rewrite the former into the latter before calling `decide`. + +## Key results + +- `multisetsOfCard` : the finset of all multisets over `F` of a given cardinality. +- `multisetsOfMassDim` : the finset of all multisets over `F` of a given mass dimension. +- `mem_multisetsOfMassDim_iff` : the defining property + `s ∈ multisetsOfMassDim dim m ↔ (s.map dim).sum = m`, valid whenever `dim` is positive. +- `multisetsOfMassDimNat`, `mem_multisetsOfMassDimNat_iff` : the analogous construction + for natural-number valued (scaled) mass dimensions, usable with `decide`. +- `multisetsOfMassDim_eq_natCast` : the two constructions agree after clearing + denominators. + +-/ + +@[expose] public section + +variable {F : Type*} [Fintype F] + +/-! + +## A. Multisets of a given cardinality + +-/ + +/-- The finset of all multisets over a finite type `F` with exactly `n` elements. -/ +def multisetsOfCard (F : Type*) [Fintype F] [DecidableEq F] (n : ℕ) : + Finset (Multiset F) := + (Finset.univ.sym n).image Sym.toMultiset + +@[simp] +lemma mem_multisetsOfCard [DecidableEq F] {n : ℕ} {s : Multiset F} : + s ∈ multisetsOfCard F n ↔ Multiset.card s = n := by + constructor + · intro h + obtain ⟨x, -, rfl⟩ := Finset.mem_image.mp h + exact x.2 + · rintro rfl + exact Finset.mem_image.mpr + ⟨⟨s, rfl⟩, Finset.mem_sym_iff.mpr fun a _ => Finset.mem_univ a, rfl⟩ + +/-! + +## B. The bound on the cardinality + +-/ + +/-- The sum of `dim` over a multiset is at least the cardinality times the minimal + value of `dim`. Shared bound underlying `card_le_massDimCardBound` and + `card_le_massDimCardBoundNat`. -/ +lemma card_nsmul_inf'_le_sum_map {M : Type*} [AddCommMonoid M] [LinearOrder M] + [AddLeftMono M] (huniv : (Finset.univ : Finset F).Nonempty) (dim : F → M) + (s : Multiset F) : + Multiset.card s • Finset.univ.inf' huniv dim ≤ (s.map dim).sum := by + have h1 : Multiset.card (s.map dim) • Finset.univ.inf' huniv dim ≤ (s.map dim).sum := by + refine Multiset.card_nsmul_le_sum fun x hx => ?_ + obtain ⟨f, -, rfl⟩ := Multiset.mem_map.mp hx + exact Finset.inf'_le dim (Finset.mem_univ f) + simpa using h1 + +/-- An upper bound on the number of fields in a multiset of overall mass dimension `m`: + `⌊m / d⌋₊` where `d` is the minimal mass dimension of a field. Equal to `0` when + `F` is empty. -/ +def massDimCardBound (dim : F → ℚ) (m : ℚ) : ℕ := + if h : (Finset.univ : Finset F).Nonempty then ⌊m / Finset.univ.inf' h dim⌋₊ else 0 + +private lemma card_le_massDimCardBound {dim : F → ℚ} (hdim : ∀ f, 0 < dim f) {m : ℚ} + {s : Multiset F} (hs : (s.map dim).sum = m) : + Multiset.card s ≤ massDimCardBound dim m := by + rcases eq_or_ne s 0 with rfl | hne + · simp + obtain ⟨f0, -⟩ := Multiset.exists_mem_of_ne_zero hne + have huniv : (Finset.univ : Finset F).Nonempty := ⟨f0, Finset.mem_univ f0⟩ + rw [massDimCardBound, dif_pos huniv] + have hdpos : 0 < Finset.univ.inf' huniv dim := + (Finset.lt_inf'_iff huniv).mpr fun i _ => hdim i + have hle := hs ▸ card_nsmul_inf'_le_sum_map huniv dim s + refine Nat.le_floor ?_ + rw [le_div_iff₀ hdpos] + simpa [nsmul_eq_mul] using hle + +/-! + +## C. Multisets of a given mass dimension + +-/ + +/-- The finset of all multisets over a finite type `F` whose overall mass dimension, + as measured by `dim : F → ℚ`, is `m`. The defining property, valid when `dim` is + positive, is `mem_multisetsOfMassDim_iff`. -/ +def multisetsOfMassDim [DecidableEq F] (dim : F → ℚ) (m : ℚ) : Finset (Multiset F) := + ((Finset.range (massDimCardBound dim m + 1)).biUnion (multisetsOfCard F)).filter + fun s => (s.map dim).sum = m + +lemma mem_multisetsOfMassDim_iff [DecidableEq F] {dim : F → ℚ} (hdim : ∀ f, 0 < dim f) {m : ℚ} + {s : Multiset F} : + s ∈ multisetsOfMassDim dim m ↔ (s.map dim).sum = m := by + constructor + · exact fun h => (Finset.mem_filter.mp h).2 + · intro h + refine Finset.mem_filter.mpr ⟨Finset.mem_biUnion.mpr ⟨Multiset.card s, ?_, by simp⟩, h⟩ + exact Finset.mem_range.mpr (Nat.lt_succ_of_le (card_le_massDimCardBound hdim h)) + +/-! + +## D. Multisets of a given scaled (natural-number) mass dimension + +Rational arithmetic does not reduce in the kernel, so `multisetsOfMassDim` is usable +with `#eval` but not with `decide`. Clearing denominators in the mass dimensions +(e.g. working in units of half mass dimensions) reduces the problem to natural-number +valued dimensions, for which the analogous construction below is `decide`-friendly. + +-/ + +/-- An upper bound on the number of fields in a multiset of overall scaled mass + dimension `m`: `m / d` (natural-number division) where `d` is the minimal scaled + mass dimension of a field. Equal to `0` when `F` is empty. -/ +def massDimCardBoundNat (dim : F → ℕ) (m : ℕ) : ℕ := + if h : (Finset.univ : Finset F).Nonempty then m / Finset.univ.inf' h dim else 0 + +private lemma card_le_massDimCardBoundNat {dim : F → ℕ} (hdim : ∀ f, 0 < dim f) {m : ℕ} + {s : Multiset F} (hs : (s.map dim).sum = m) : + Multiset.card s ≤ massDimCardBoundNat dim m := by + rcases eq_or_ne s 0 with rfl | hne + · simp + obtain ⟨f0, -⟩ := Multiset.exists_mem_of_ne_zero hne + have huniv : (Finset.univ : Finset F).Nonempty := ⟨f0, Finset.mem_univ f0⟩ + rw [massDimCardBoundNat, dif_pos huniv] + have hdpos : 0 < Finset.univ.inf' huniv dim := + (Finset.lt_inf'_iff huniv).mpr fun i _ => hdim i + rw [Nat.le_div_iff_mul_le hdpos] + simpa [hs, smul_eq_mul] using card_nsmul_inf'_le_sum_map huniv dim s + +/-- The finset of all multisets over a finite type `F` whose overall scaled mass + dimension, as measured by `dim : F → ℕ`, is `m`. The defining property, valid when + `dim` is positive, is `mem_multisetsOfMassDimNat_iff`. Unlike `multisetsOfMassDim`, + this construction reduces in the kernel and can be used with `decide`. -/ +def multisetsOfMassDimNat [DecidableEq F] (dim : F → ℕ) (m : ℕ) : Finset (Multiset F) := + ((Finset.range (massDimCardBoundNat dim m + 1)).biUnion (multisetsOfCard F)).filter + fun s => (s.map dim).sum = m + +lemma mem_multisetsOfMassDimNat_iff [DecidableEq F] {dim : F → ℕ} (hdim : ∀ f, 0 < dim f) + {m : ℕ} {s : Multiset F} : + s ∈ multisetsOfMassDimNat dim m ↔ (s.map dim).sum = m := by + constructor + · exact fun h => (Finset.mem_filter.mp h).2 + · intro h + refine Finset.mem_filter.mpr ⟨Finset.mem_biUnion.mpr ⟨Multiset.card s, ?_, by simp⟩, h⟩ + exact Finset.mem_range.mpr (Nat.lt_succ_of_le (card_le_massDimCardBoundNat hdim h)) + +/-! + +## E. Relating the two constructions + +-/ + +/-- Clearing denominators: on multiplying all mass dimensions and the target mass + dimension by a common positive scale `N` rendering them all natural numbers, the + finset of multisets of a given mass dimension can be computed through + `multisetsOfMassDimNat`, and hence through `decide`. -/ +lemma multisetsOfMassDim_eq_natCast [DecidableEq F] {dim : F → ℚ} (hdim : ∀ f, 0 < dim f) + {dimN : F → ℕ} {N : ℕ} (hN : 0 < N) (hdimN : ∀ f, (dimN f : ℚ) = dim f * N) + {m : ℚ} {mN : ℕ} (hmN : (mN : ℚ) = m * N) : + multisetsOfMassDim dim m = multisetsOfMassDimNat dimN mN := by + have hNQ : (N : ℚ) ≠ 0 := Nat.cast_ne_zero.mpr hN.ne' + have hdimNpos : ∀ f, 0 < dimN f := fun f => by + have h1 : (0 : ℚ) < (dimN f : ℚ) := by + rw [hdimN f] + exact mul_pos (hdim f) (by exact_mod_cast hN) + exact_mod_cast h1 + ext s + rw [mem_multisetsOfMassDim_iff hdim, mem_multisetsOfMassDimNat_iff hdimNpos] + have key : ((s.map dimN).sum : ℚ) = (s.map dim).sum * N := by + induction s using Multiset.induction with + | empty => simp + | cons a t ih => simp [hdimN, ih, add_mul] + constructor + · intro h + have h1 : ((s.map dimN).sum : ℚ) = (mN : ℚ) := by rw [key, h, hmN] + exact_mod_cast h1 + · intro h + have h1 : (s.map dim).sum * (N : ℚ) = m * N := by rw [← key, h, hmN] + exact mul_right_cancel₀ hNQ h1 diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 39d886bb6..9709b6775 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1,7 +1,7 @@ /- Copyright (c) 2026 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -Authors: Joseph Tooby-Smith +Authors: Joseph Tooby-Smith, Jinzheng Li, Nathaneal Sajan -/ module @@ -9,6 +9,7 @@ public import Physlib.Relativity.Fermions.Weyl.Metric public import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation public import Mathlib.LinearAlgebra.ExteriorAlgebra.Basis public import Physlib.Mathematics.ConjModule +public import Physlib.Mathematics.MultisetsOfMassDim public import Mathlib.RingTheory.GradedAlgebra.Basic /-! @@ -140,10 +141,56 @@ end EFTLagrangianExclDeriv /-! +### Diagonal elements of the Lorentz group + +The diagonal elements `diag (z, z⁻¹)` of `SL(2, ℂ)` scale each of the fields by a +factor, given below by `FieldSpecification.diagScale`. These elements are useful for +deriving selection rules on the effective potential. + +-/ + +TODO "Move the diagonal `SL(2, ℂ)` material `diagSL`, `diagSL_inv`, `diagSL_neg_one` + and `twoI` to `Physlib.Relativity.SL2C.Basic`, their canonical home, when the + effective-potential development is split up." + +/-- The diagonal element `diag (z, z⁻¹)` of `SL(2, ℂ)` associated with a unit `z : ℂˣ`. -/ +def diagSL (z : ℂˣ) : SL(2, ℂ) := + ⟨!![(z : ℂ), 0; 0, ((z⁻¹ : ℂˣ) : ℂ)], by simp [Matrix.det_fin_two_of]⟩ + +@[simp] +lemma diagSL_inv (z : ℂˣ) : (diagSL z)⁻¹ = diagSL z⁻¹ := by + rw [inv_eq_iff_mul_eq_one] + ext i j + fin_cases i <;> fin_cases j <;> simp [diagSL, Matrix.mul_apply, Fin.sum_univ_two] + +/-- The diagonal element at `z = -1` is the central element `-1` of the Lorentz + group (the lift of a rotation by `2π`). -/ +@[simp] +lemma diagSL_neg_one : diagSL (-1) = -1 := by + ext i j + fin_cases i <;> fin_cases j <;> simp [diagSL] + +/-- The unit `2 * I` of `ℂ`. The associated diagonal Lorentz transformation + `diagSL twoI` detects selection rules which real diagonal elements miss, since its + scaling factors mix in a phase under conjugation. -/ +def twoI : ℂˣ := + ⟨2 * I, -I / 2, by linear_combination -Complex.I_mul_I, by linear_combination -Complex.I_mul_I⟩ + +@[simp] +lemma twoI_val : ((twoI : ℂˣ) : ℂ) = 2 * I := (rfl) + +@[simp] +lemma twoI_inv_val : ((twoI⁻¹ : ℂˣ) : ℂ) = -I / 2 := (rfl) + +/-! + ### B. Field specification for the theory -/ +/-- The specification of the field components appearing in the effective potential: + the two components `ψ α` of the left-handed Weyl fermion and the two components + `barψ α` of its conjugate. -/ inductive FieldSpecification : Type | ψ (α : Fin 2) : FieldSpecification | barψ (α : Fin 2) : FieldSpecification @@ -174,18 +221,24 @@ makes it easy to do more calculational aspects. -/ +/-- The equivalence between `FieldSpecification` and `Fin 2 ⊕ Fin 2` sending `ψ α` to + the left and `barψ α` to the right component. -/ def toSumFin : FieldSpecification ≃ Fin 2 ⊕ Fin 2 where toFun := fun | .ψ (α : Fin 2) => Sum.inl α | .barψ α => Sum.inr α invFun := fun | .inl α => ψ α | .inr α => barψ α - left_inv ψ := by - fin_cases ψ <;> simp - right_inv x := by fin_cases x <;> simp + left_inv f := by cases f <;> rfl + right_inv x := by cases x <;> rfl +/-- The basis of the module underlying the effective potential indexed by + `FieldSpecification`: `ψ α` corresponds to the dual basis of the left-handed Weyl + fermion and `barψ α` to the dual basis of its conjugate. -/ def moduleBasis : Basis FieldSpecification ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) := (LeftHandedWeyl.basis.dualBasis.prod LeftHandedWeyl.basis.conj.dualBasis).reindex toSumFin.symm +/-- The image of a field specification in the effective potential, as the + exterior-algebra generator of the corresponding basis vector. Denoted `[ψ]ₑ`. -/ def toEFTLagrangianExclDeriv (ψ : FieldSpecification) : EFTLagrangianExclDeriv := ExteriorAlgebra.ι ℂ (moduleBasis ψ) @@ -223,7 +276,8 @@ lemma rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2 lemma rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fin 2) : rep Λ [barψ α]ₑ = ∑ β, star (Λ⁻¹ α β) • [barψ β]ₑ := by - simp only [toEFTLagrangianExclDeriv_barψ_eq, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, Representation.dual_apply, + simp only [toEFTLagrangianExclDeriv_barψ_eq, Basis.coe_dualBasis, LinearMap.coe_inr, rep_apply, + Representation.dual_apply, ExteriorAlgebra.map_apply_ι, LinearMap.prodMap_apply, map_zero, RCLike.star_def, ← map_smul, Prod.smul_mk, smul_zero, Fin.sum_univ_two, Fin.isValue, ← map_add, Prod.mk_add_mk, add_zero, ExteriorAlgebra.ι_inj, Prod.mk.injEq, true_and] @@ -234,28 +288,103 @@ lemma rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum (Λ : SL(2, ℂ)) (α : Fi /-! +## Scaling of the fields under diagonal Lorentz transformations + +-/ + +/-- The factor by which the field specifications scale under the action of `diagSL z`. -/ +def diagScale (z : ℂˣ) : FieldSpecification → ℂ + | .ψ α => if α = 0 then ((z⁻¹ : ℂˣ) : ℂ) else z + | .barψ α => if α = 0 then star ((z⁻¹ : ℂˣ) : ℂ) else star (z : ℂ) + +lemma rep_diagSL_apply (z : ℂˣ) (φ : FieldSpecification) : + rep (diagSL z) [φ]ₑ = diagScale z φ • [φ]ₑ := by + match φ with + | .ψ α => + rw [rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum, diagSL_inv] + fin_cases α <;> simp [diagSL, diagScale, Fin.sum_univ_two] + | .barψ α => + rw [rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum, diagSL_inv] + fin_cases α <;> simp [diagSL, diagScale, Fin.sum_univ_two] + +@[simp] +lemma diagScale_neg_one (φ : FieldSpecification) : diagScale (-1) φ = -1 := by + cases φ <;> simp [diagScale] + +lemma diagScale_twoI_ψ (α : Fin 2) : + diagScale twoI (ψ α) = if α = 0 then -I / 2 else 2 * I := by + simp only [diagScale, twoI_val, twoI_inv_val] + +lemma diagScale_twoI_barψ (α : Fin 2) : + diagScale twoI (barψ α) = if α = 0 then I / 2 else -(2 * I) := by + simp only [diagScale, twoI_val, twoI_inv_val] + split_ifs <;> simp [Complex.conj_I] + +/-- Every field scales by `-1` under the central element `-1` of the Lorentz group + (fermion parity): the special case `z = -1` of `rep_diagSL_apply`. -/ +lemma rep_neg_one_apply (φ : FieldSpecification) : + rep (-1) [φ]ₑ = (-1 : ℂ) • [φ]ₑ := by + rw [← diagSL_neg_one, rep_diagSL_apply, diagScale_neg_one] + +/-- Under `diagSL twoI` the total scaling of a mixed pair `ψ α`, `barψ β` is never `1`: + the four possible products are `1 / 4`, `-1`, `-1` and `4`. This is the numerical + input to the selection rule `irrepCoeff_ψ_barψ_eq_zero_of_isInvariant`. -/ +lemma diagScale_twoI_ψ_mul_barψ_ne_one (α β : Fin 2) : + diagScale twoI (ψ α) * diagScale twoI (barψ β) ≠ 1 := by + fin_cases α <;> fin_cases β <;> + simp only [diagScale_twoI_ψ, diagScale_twoI_barψ, Fin.zero_eta, Fin.mk_one, Fin.reduceEq, + reduceIte] + -- The four cases are the four weight products `1/4`, `-1`, `-1` and `4`. Each + -- counterfactual is routed through `linear_combination` with `I * I = -1` to a + -- rational equation, since `norm_num` alone treats `I` as an opaque atom; no uniform + -- closer exists (the modulus argument degenerates for the two `-1` cases). + · intro hcontra + have h : (1 / 4 : ℂ) = 1 := by + linear_combination hcontra + (1 / 4 : ℂ) * Complex.I_mul_I + norm_num at h + · intro hcontra + have h : (-1 : ℂ) = 1 := by linear_combination hcontra - Complex.I_mul_I + norm_num at h + · intro hcontra + have h : (-1 : ℂ) = 1 := by linear_combination hcontra - Complex.I_mul_I + norm_num at h + · intro hcontra + have h : (4 : ℂ) = 1 := by linear_combination hcontra + 4 * Complex.I_mul_I + norm_num at h + +/-! + ## The irreps -/ +/-- The irreducible representations of the Lorentz group present in the effective + potential: `ψ` for the left-handed Weyl fermion and `barψ` for its conjugate. -/ inductive Irrep | ψ | barψ deriving DecidableEq, Fintype +/-- The irrep in which a field specification sits. -/ def toIrrep : FieldSpecification → Irrep | .ψ _ => .ψ | .barψ _ => .barψ +@[simp] +lemma toIrrep_ψ (α : Fin 2) : toIrrep (ψ α) = Irrep.ψ := rfl + +@[simp] +lemma toIrrep_barψ (α : Fin 2) : toIrrep (barψ α) = Irrep.barψ := rfl + lemma rep_apply_toEFTLagrangianExclDeriv_mem_irrep (Λ : SL(2, ℂ)) (ψ : FieldSpecification) : ∃ n, ∃ F : Fin n → FieldSpecification, (∃ f : Fin n → ℂ, rep Λ [ψ]ₑ = ∑ x, f x • [F x]ₑ) ∧ (∀ x, toIrrep (F x) = toIrrep ψ) := by match ψ with | .ψ α => - exact ⟨2, .ψ, ⟨Λ⁻¹ α, rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum Λ α⟩, by simp [toIrrep]⟩ + exact ⟨2, .ψ, ⟨Λ⁻¹ α, rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum Λ α⟩, by simp⟩ | .barψ α => exact ⟨2, .barψ, ⟨star (Λ⁻¹ α), rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum Λ α⟩, - by simp [toIrrep]⟩ + by simp⟩ /-! @@ -263,10 +392,47 @@ lemma rep_apply_toEFTLagrangianExclDeriv_mem_irrep (Λ : SL(2, ℂ)) (ψ : Field -/ +/-- The mass dimension of each field specification; a Weyl fermion in four dimensions + has mass dimension `3 / 2`. -/ def massDimension : FieldSpecification → ℚ | .ψ _ => 3 / 2 | .barψ _ => 3 / 2 +@[simp] +lemma massDimension_eq (f : FieldSpecification) : massDimension f = 3 / 2 := by + cases f <;> rfl + +lemma massDimension_pos (f : FieldSpecification) : 0 < massDimension f := by + rw [massDimension_eq] + norm_num + +/-- In a theory whose fields all have the same mass dimension, the overall mass + dimension of an operator just counts its fields. -/ +lemma sum_map_massDimension (s : Multiset FieldSpecification) : + (s.map massDimension).sum = 3 / 2 * (Multiset.card s : ℚ) := by + induction s using Multiset.induction with + | empty => simp + | cons a t ih => + rw [Multiset.map_cons, Multiset.sum_cons, ih, Multiset.card_cons, massDimension_eq] + push_cast + ring + +/-- The mass dimension of a field specification in units of half mass dimensions, + so that a Weyl fermion has scaled mass dimension `3`. Unlike `massDimension` this + is usable with `decide`, since natural-number arithmetic reduces in the kernel. -/ +def massDimensionNat : FieldSpecification → ℕ + | .ψ _ => 3 + | .barψ _ => 3 + +@[simp] +lemma massDimensionNat_eq (f : FieldSpecification) : massDimensionNat f = 3 := by + cases f <;> rfl + +lemma massDimensionNat_cast (f : FieldSpecification) : + (massDimensionNat f : ℚ) = massDimension f * 2 := by + rw [massDimensionNat_eq, massDimension_eq] + norm_num + end FieldSpecification namespace EFTLagrangianExclDeriv @@ -278,6 +444,8 @@ open FieldSpecification ## Elements from a list of FieldSpecifications -/ +/-- The operator in the effective potential given by the ordered product of the + fields in `l`. -/ def termOfList (l : List FieldSpecification) : EFTLagrangianExclDeriv := (l.map toEFTLagrangianExclDeriv).prod @@ -442,6 +610,8 @@ lemma termOfList_ofFn {n : ℕ} (g : Fin n → FieldSpecification) : -/ +/-- The operator in the effective potential given by the ordered product of the + fields in the tuple `g`. -/ def termOfTuple {n} (g : Fin n → FieldSpecification) : EFTLagrangianExclDeriv := termOfList (List.ofFn g) @@ -454,10 +624,15 @@ lemma termOfTuple_perm {n} (g : Fin n → FieldSpecification) {i j : Fin n} (hij rw [termOfTuple_eq_ιMulti, termOfTuple_eq_ιMulti] exact AlternatingMap.map_swap (ExteriorAlgebra.ιMulti ℂ n) (fun k => moduleBasis (g k)) hij +/-- The alternating map taking a tuple of vectors to their product in the + effective potential. -/ def termOfVectTuple {n} : AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) EFTLagrangianExclDeriv (Fin n) := ExteriorAlgebra.ιMulti ℂ n +/-- The alternating map underlying `coeff s`: a tuple of vectors is sent to + `termOfTuple g` weighted by the product of the `g`-coordinates of the vectors, + summed over the tuples `g` of fields with field content `s`. -/ def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : AlternatingMap ℂ (Module.Dual ℂ LeftHandedWeyl × Module.Dual ℂ (ConjModule LeftHandedWeyl)) EFTLagrangianExclDeriv (Fin n) where @@ -523,7 +698,11 @@ this is where you can think of it as a coefficient. -/ -def coeff (s : Multiset FieldSpecification) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := +/-- The projection of an effective potential onto the span of the operators with + field content `s`. As described above, this plays the role of the coefficient + of the operator `s` in the effective potential. -/ +def coeff (s : Multiset FieldSpecification) : + EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := ExteriorAlgebra.liftAlternating (coeffOfVectorTuple s) lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) : @@ -665,21 +844,24 @@ lemma coeff_U1_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) · exact absurd (sub_eq_zero.mp h).symm hs · exact h -/-- The selection rule on coefficients coming from the anti-symmetry of fermionic fields. -/ -lemma coeff_fermionic_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) +/-- The selection rule on coefficients coming from the anti-symmetry of fermionic fields. + Note that this holds for any effective potential, invariant or not. -/ +lemma coeff_fermionic_selection_rule {V : EFTLagrangianExclDeriv} (s : Multiset FieldSpecification) (hs : ¬ s.Nodup) : coeff s V = 0 := by - sorry + obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := s) (l := Multiset.toList s) (by simp) + have hl : ¬ (Multiset.toList s).Nodup := by + rw [← Multiset.coe_toList s] at hs + exact fun h => hs (Multiset.coe_nodup.mpr h) + rw [hc, termOfList_zero_of_not_nodup _ hl, smul_zero] /-- The selection rule on coefficients saying that every term with an odd number of fermions is zero. -/ lemma coeff_odd_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) (s : Multiset FieldSpecification) (hs : Odd s.card) : coeff s V = 0 := by - refine coeff_U1_selection_rule hV (g := -1) (d := fun ψ => -1) ?_ s ?_ - · intro ψ - sorry - · simp - sorry + refine coeff_U1_selection_rule hV (-1) (fun _ => -1) rep_neg_one_apply s ?_ + rw [Multiset.map_const', Multiset.prod_replicate, hs.neg_one_pow] + norm_num /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ @@ -715,8 +897,8 @@ lemma support_zero_eq_empty : support (0 : EFTLagrangianExclDeriv) = ∅ := by lemma mem_support_iff {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} : s ∈ support V ↔ coeff s V ≠ 0 := by simp [support] -lemma coeff_eq_zero_of_not_mem_support {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} - (h : s ∉ support V) : coeff s V = 0 := by +lemma coeff_eq_zero_of_not_mem_support {V : EFTLagrangianExclDeriv} + {s : Multiset FieldSpecification} (h : s ∉ support V) : coeff s V = 0 := by simpa [support, Set.Finite.mem_toFinset] using h lemma support_add {V W : EFTLagrangianExclDeriv} : @@ -784,10 +966,28 @@ lemma eq_sum_support_coeff (V : EFTLagrangianExclDeriv) : V = ∑ s ∈ support conv_lhs => rw [hx] simp [Finset.smul_sum] +/-- Regrouping the decomposition `eq_sum_support_coeff` along a classifying map `key` + on field contents: if `fiber k` is the finset of field contents with `key s = k`, + then an effective potential is the sum of its projections onto the fibers of the + keys appearing in its support. Specialised to irrep content in `eq_sum_irrepCoeff` + and to mass dimension in `eq_sum_massDimCoeff`. -/ +lemma eq_sum_fiber_coeff {κ : Type*} [DecidableEq κ] {key : Multiset FieldSpecification → κ} + {fiber : κ → Finset (Multiset FieldSpecification)} + (hmem : ∀ k s, s ∈ fiber k ↔ key s = k) (V : EFTLagrangianExclDeriv) : + V = ∑ k ∈ (support V).image key, ∑ s ∈ fiber k, coeff s V := by + have hdisj : (((support V).image key : Finset κ) : Set κ).PairwiseDisjoint fiber := by + intro i _ j _ hij + simp only [Function.onFun, Finset.disjoint_left] + intro s hsi hsj + exact hij (((hmem i s).mp hsi).symm.trans ((hmem j s).mp hsj)) + rw [← Finset.sum_biUnion hdisj] + conv_lhs => rw [eq_sum_support_coeff V] + refine Finset.sum_subset (fun s hs => ?_) (fun s _ hs => coeff_eq_zero_of_not_mem_support hs) + exact Finset.mem_biUnion.mpr ⟨key s, Finset.mem_image_of_mem _ hs, (hmem _ s).mpr rfl⟩ /-! -## +## Mixing of operators under the action of the Lorentz group -/ @@ -852,12 +1052,14 @@ lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecifi /-- The field content of a term which corresponds to a given irrep content. -/ def allTermsWithIrrepContent (i : Multiset Irrep) : Finset (Multiset FieldSpecification) := - ((Finset.univ.sym i.card).image Sym.toMultiset).filter (fun s => Multiset.map toIrrep s = i) + (multisetsOfCard FieldSpecification i.card).filter (fun s => Multiset.map toIrrep s = i) lemma mem_allTermsWithIrrepContent_iff (i : Multiset Irrep) (s : Multiset FieldSpecification) : s ∈ allTermsWithIrrepContent i ↔ Multiset.map toIrrep s = i := by - simp [allTermsWithIrrepContent] - sorry + simp only [allTermsWithIrrepContent, Finset.mem_filter, mem_multisetsOfCard, + and_iff_right_iff_imp] + intro h + rw [← h, Multiset.card_map] /-- The projection of a term of `EFTLagrangianExclDeriv` onto those operators which have an irrep content determined by `i`. -/ @@ -869,29 +1071,48 @@ lemma irrepCoeff_eq_sum (i : Multiset Irrep) (V : EFTLagrangianExclDeriv) : simp [irrepCoeff] lemma irrepCoeff_one (i : Multiset Irrep) : irrepCoeff i 1 = if i = ∅ then 1 else 0 := by - simp [irrepCoeff, coeff_one, allTermsWithIrrepContent] - split_ifs with hi <;> simp_all - rename_i h - subst h - apply hi ⟨∅, by simp⟩ - simp + rw [irrepCoeff_eq_sum] + simp only [coeff_one] + rw [Finset.sum_ite_eq'] + refine if_congr ?_ rfl rfl + rw [mem_allTermsWithIrrepContent_iff] + simp [eq_comm] lemma irrepCoeff_termOfList (i : Multiset Irrep) (l : List FieldSpecification) : irrepCoeff i (termOfList l) = if Multiset.map toIrrep (Multiset.ofList l) = i then termOfList l else 0 := by simp [irrepCoeff, coeff_apply_termOfList, mem_allTermsWithIrrepContent_iff] +/-- The irrep contents of the operators appearing in an effective potential. -/ def irrepSupport (V : EFTLagrangianExclDeriv) : Finset (Multiset Irrep) := (support V).image (Multiset.map toIrrep) lemma eq_sum_irrepCoeff (V : EFTLagrangianExclDeriv) : V = ∑ i ∈ irrepSupport V, irrepCoeff i V := by - sorry + simp only [irrepSupport, irrepCoeff_eq_sum] + exact eq_sum_fiber_coeff mem_allTermsWithIrrepContent_iff V + +lemma irrepCoeff_rep_termOfList (i : Multiset Irrep) (g : SL(2, ℂ)) + (l : List FieldSpecification) : + rep g (irrepCoeff i (termOfList l)) = irrepCoeff i (rep g (termOfList l)) := by + obtain ⟨n, F, ⟨f, hf⟩, hF⟩ := rep_termOfList_eq_sum_of_toIrrep g l + have hcond : ∀ x, Multiset.map toIrrep (Multiset.ofList (F x)) = + Multiset.map toIrrep (Multiset.ofList l) := by + intro x + rw [Multiset.map_coe, Multiset.map_coe, hF x] + rw [irrepCoeff_termOfList, hf, map_sum] + -- Rewriting with `hcond` transports every summand's irrep-content condition into the + -- outer one, so that `split_ifs` sees a single condition and produces two goals. + simp only [map_smul, irrepCoeff_termOfList, hcond] + split_ifs with h + · exact hf + · simp lemma irrepCoeff_rep_apply_fieldSpecification {i : Multiset Irrep} (g : SL(2, ℂ)) (ψ : FieldSpecification) : rep g (irrepCoeff i [ψ]ₑ) = irrepCoeff i (rep g [ψ]ₑ) := by - sorry + rw [← termOfList_singleton] + exact irrepCoeff_rep_termOfList i g [ψ] lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2, ℂ)) : rep g (irrepCoeff i V) = irrepCoeff i (rep g V) := by @@ -899,43 +1120,95 @@ lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2 a x _ hx · simp only [Set.mem_range] at hV' obtain ⟨l, rfl⟩ := hV' - sorry -- use rep_termOfList_eq_sum_of_toIrrep + exact irrepCoeff_rep_termOfList i g l · simp · simp [hx, hy] · simp [hx] +/-- There is no Lorentz-invariant operator with irrep content `{ψ, barψ}`: + invariance under the diagonal transformation `diagSL twoI` forces every + coefficient of a mixed `ψ`–`barψ` pair to vanish. -/ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) : irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by - sorry + rw [irrepCoeff_eq_sum] + refine Finset.sum_eq_zero fun s hs => ?_ + rw [mem_allTermsWithIrrepContent_iff] at hs + have hcard : Multiset.card s = 2 := by simpa using congrArg Multiset.card hs + obtain ⟨a, b, rfl⟩ := Multiset.card_eq_two.mp hcard + refine coeff_U1_selection_rule hV (diagSL twoI) (diagScale twoI) (rep_diagSL_apply twoI) _ ?_ + simp only [Multiset.insert_eq_cons, Multiset.map_cons, Multiset.map_singleton, + Multiset.prod_cons, Multiset.prod_singleton] at hs ⊢ + cases a with + | ψ α => + cases b with + | ψ β => + simp only [toIrrep_ψ] at hs + exact absurd hs (by decide) + | barψ β => exact diagScale_twoI_ψ_mul_barψ_ne_one α β + | barψ α => + cases b with + | ψ β => + rw [mul_comm] + exact diagScale_twoI_ψ_mul_barψ_ne_one β α + | barψ β => + simp only [toIrrep_barψ] at hs + exact absurd hs (by decide) /-! ## Mass dimension -/ -def upperBoundNumberOfFields (n : ℚ) : ℕ := by - let d := Fin.minimum massDimension +/-- The finset of all possible field contents of terms with overall mass dimension `n`. + Since every field has mass dimension at least `3 / 2`, a term of mass dimension `n` + contains a bounded number of fields, so this is a computable finset (constructed + through `multisetsOfMassDim`). The defining property is + `mem_allTermsWithMassDimension_iff`. -/ def allTermsWithMassDimension (n : ℚ) : Finset (Multiset FieldSpecification) := - -- Since there is no mass dimension less then 1, a term with mass dimension n - -- can have at most `n` fields - let x := List.range (Rat.ceil n + 1).toNat - - ((Finset.univ.sym x.card).image Sym.toMultiset).filter (fun s => (s.map massDimension).sum = n) -def massDimCoeff (n : ℚ) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv where - toFun := fun V => ∑ s ∈ support V, if (s.map massDimension).sum = n then coeff s V else 0 - map_add' := by - intro V W - sorry - map_smul' := by - intro c V - sorry - + multisetsOfMassDim massDimension n + +lemma mem_allTermsWithMassDimension_iff (n : ℚ) (s : Multiset FieldSpecification) : + s ∈ allTermsWithMassDimension n ↔ (s.map massDimension).sum = n := + mem_multisetsOfMassDim_iff massDimension_pos + +/-- Clearing denominators: the terms of mass dimension `n` are those whose scaled + (`ℕ`-valued) mass dimensions sum to `2 * n`. The right-hand side reduces in the + kernel, so after rewriting by this lemma membership can be decided by `decide`. -/ +lemma allTermsWithMassDimension_eq_natCast {n : ℚ} {mN : ℕ} (hm : (mN : ℚ) = n * 2) : + allTermsWithMassDimension n = multisetsOfMassDimNat massDimensionNat mN := + multisetsOfMassDim_eq_natCast massDimension_pos (by norm_num) massDimensionNat_cast hm + +example : ({ψ 0, ψ 1} : Multiset FieldSpecification) ∈ allTermsWithMassDimension 3 := by + rw [allTermsWithMassDimension_eq_natCast (mN := 6) (by norm_num)] + decide + +example : ({ψ 0, ψ 1, barψ 0, barψ 1} : Multiset FieldSpecification) ∉ + allTermsWithMassDimension 3 := by + rw [allTermsWithMassDimension_eq_natCast (mN := 6) (by norm_num)] + decide + +/-- The projection of a term of `EFTLagrangianExclDeriv` onto those operators whose + field content has overall mass dimension `n`. -/ +def massDimCoeff (n : ℚ) : EFTLagrangianExclDeriv →ₗ[ℂ] EFTLagrangianExclDeriv := + ∑ s ∈ allTermsWithMassDimension n, coeff s + +lemma massDimCoeff_eq_sum (n : ℚ) (V : EFTLagrangianExclDeriv) : + massDimCoeff n V = ∑ s ∈ allTermsWithMassDimension n, coeff s V := by + simp [massDimCoeff] + +lemma massDimCoeff_termOfList (n : ℚ) (l : List FieldSpecification) : + massDimCoeff n (termOfList l) = + if (Multiset.map massDimension (Multiset.ofList l)).sum = n then termOfList l else 0 := by + simp [massDimCoeff_eq_sum, coeff_apply_termOfList, mem_allTermsWithMassDimension_iff] + +/-- The mass dimensions of the operators appearing in an effective potential. -/ def massDimSupport (V : EFTLagrangianExclDeriv) : Finset ℚ := (support V).image (fun s => (s.map massDimension).sum) lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : V = ∑ n ∈ massDimSupport V, massDimCoeff n V := by - sorry + simp only [massDimSupport, massDimCoeff_eq_sum] + exact eq_sum_fiber_coeff mem_allTermsWithMassDimension_iff V /-! From 6b612a27b1947066628de6de91f864b7cf614462 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 24 Jul 2026 06:59:56 +0100 Subject: [PATCH 39/48] feat: Golf and add lema --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 9709b6775..cdee2ac3a 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1130,29 +1130,33 @@ lemma irrepCoeff_rep {i : Multiset Irrep} {V : EFTLagrangianExclDeriv} (g : SL(2 coefficient of a mixed `ψ`–`barψ` pair to vanish. -/ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) : irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by - rw [irrepCoeff_eq_sum] - refine Finset.sum_eq_zero fun s hs => ?_ - rw [mem_allTermsWithIrrepContent_iff] at hs - have hcard : Multiset.card s = 2 := by simpa using congrArg Multiset.card hs - obtain ⟨a, b, rfl⟩ := Multiset.card_eq_two.mp hcard + rw [irrepCoeff_eq_sum, Finset.sum_congr (g := fun s => coeff s V) + (s₂ := {{ψ 0, barψ 0}, {ψ 0, barψ 1}, {ψ 1, barψ 0}, {ψ 1, barψ 1}}) (by decide) (by simp)] + suffices h : ∀ (a b : Fin 2), coeff {ψ a, barψ b} V = 0 by + repeat rw [Finset.sum_insert (by decide)] + simp only [h, Finset.sum_singleton, add_zero] + intro a b refine coeff_U1_selection_rule hV (diagSL twoI) (diagScale twoI) (rep_diagSL_apply twoI) _ ?_ - simp only [Multiset.insert_eq_cons, Multiset.map_cons, Multiset.map_singleton, - Multiset.prod_cons, Multiset.prod_singleton] at hs ⊢ - cases a with - | ψ α => - cases b with - | ψ β => - simp only [toIrrep_ψ] at hs - exact absurd hs (by decide) - | barψ β => exact diagScale_twoI_ψ_mul_barψ_ne_one α β - | barψ α => - cases b with - | ψ β => - rw [mul_comm] - exact diagScale_twoI_ψ_mul_barψ_ne_one β α - | barψ β => - simp only [toIrrep_barψ] at hs - exact absurd hs (by decide) + simp only [Multiset.insert_eq_cons, diagScale, Fin.isValue, Units.val_inv_eq_inv_val, twoI_val, + _root_.mul_inv_rev, inv_I, neg_mul, star_neg, star_mul', RCLike.star_def, conj_I, star_inv₀, + star_ofNat, neg_neg, mul_neg, Multiset.map_cons, Multiset.map_singleton, Multiset.prod_cons, + Multiset.prod_singleton, mul_ite, ite_mul, ne_eq] + field_simp + simp only [Fin.isValue, I_sq, neg_neg, neg_mul, one_mul] + grind + +lemma irrepCoeff_ψ_ψ_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (irrepCoeff {Irrep.ψ, Irrep.ψ} V) := by + sorry + +lemma irrepCoeff_barψ_barψ_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (irrepCoeff {Irrep.barψ, Irrep.barψ} V) := by + sorry + +lemma irrepCoeff_quadratic_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V) := by + sorry + /-! ## Mass dimension From abdc1298f0565221b70ff58c71c529b3377f83d4 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:23:04 +0100 Subject: [PATCH 40/48] Update EFTLagrangianExclDeriv.lean --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 306 +++++++++++++++++- 1 file changed, 289 insertions(+), 17 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index cdee2ac3a..2212eec84 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -118,6 +118,11 @@ def IsInvariant (V : EFTLagrangianExclDeriv) : Prop := ∀ Λ, rep Λ V = V lemma IsInvariant.eq_iff {V : EFTLagrangianExclDeriv} : IsInvariant V ↔ ∀ Λ, rep Λ V = V := by rfl +@[simp] +lemma IsInvariant.zero : IsInvariant 0 := by + intro Λ + simp [rep] + lemma IsInvariant.add {V W : EFTLagrangianExclDeriv} (hV : IsInvariant V) (hW : IsInvariant W) : IsInvariant (V + W) := by intro Λ @@ -137,6 +142,11 @@ lemma IsInvariant.one : IsInvariant 1 := by intro Λ simp [rep] +lemma IsInvariant.sum {ι : Type} (s : Finset ι) {f : ι → EFTLagrangianExclDeriv} + (h : ∀ i ∈ s, IsInvariant (f i)) : IsInvariant (∑ i ∈ s, f i) := by + intro Λ + simp_all [IsInvariant.eq_iff] + end EFTLagrangianExclDeriv /-! @@ -651,7 +661,7 @@ def coeffOfVectorTuple (s : Multiset FieldSpecification) (n : ℕ) : rcases eq_or_ne k j with rfl | hkj · rw [Equiv.swap_apply_right]; exact hv · rw [Equiv.swap_apply_of_ne_of_ne hki hkj] - simp only [MultilinearMap.toFun_eq_coe, MultilinearMap.sum_apply] + simp only [MultilinearMap.toFun_eq_coe, _root_.sum_apply] refine Finset.sum_involution (fun g _ => g ∘ Equiv.swap i j) ?_ ?_ (fun g _ => Finset.mem_univ _) ?_ · intro g _ @@ -709,7 +719,7 @@ lemma coeff_apply_termOfList (s : Multiset FieldSpecification) (l : List FieldSp coeff s (termOfList l) = if Multiset.ofList l = s then termOfList l else 0 := by have hterm : termOfTuple l.get = termOfList l := by rw [termOfTuple, List.ofFn_get] rw [coeff, termOfList_eq_ιMulti, ExteriorAlgebra.liftAlternating_apply_ιMulti] - simp only [coeffOfVectorTuple, AlternatingMap.coe_mk, MultilinearMap.sum_apply] + simp only [coeffOfVectorTuple, AlternatingMap.coe_mk, _root_.sum_apply] refine (Finset.sum_eq_single l.get ?_ ?_).trans ?_ · intro g _ hg obtain ⟨i, hi⟩ := Function.ne_iff.mp hg @@ -752,6 +762,33 @@ lemma coeff_coeff_self {s : Multiset FieldSpecification} (V : EFTLagrangianExclD · simp [hx, hy] · simp [hx] +lemma coeff_coeff_eq_zero_of_diff {s1 s2 : Multiset FieldSpecification} (h : s1 ≠ s2) + (V : EFTLagrangianExclDeriv) : coeff s1 (coeff s2 V) = 0 := by + induction' mem_termOfList_span V using Submodule.span_induction with V' hV' x y _ _ hx hy + a x _ hx + · simp at hV' + obtain ⟨l, rfl⟩ := hV' + simp [coeff_apply_termOfList, apply_ite] + grind + · simp + · simp [hx, hy] + · simp [hx] + +lemma coeff_sum_eq_zero_iff (V : EFTLagrangianExclDeriv) + (S : Finset (Multiset FieldSpecification)): + ∑ s ∈ S, coeff s V = 0 ↔ ∀ s ∈ S, coeff s V = 0 := by + constructor + · intro h s hs + have h1 := congrArg (coeff s) h + simp at h1 + rw [Finset.sum_eq_single s] at h1 + simpa using h1 + · intro b hb hx + exact coeff_coeff_eq_zero_of_diff (id (Ne.symm hx)) V + · simp_all + · intro h + exact Finset.sum_eq_zero h + lemma coeff_eq_termOfList {s : Multiset FieldSpecification} (V : EFTLagrangianExclDeriv) {l : List FieldSpecification} (hl : Multiset.ofList l = s) : ∃ c : ℂ, coeff s V = c • termOfList l := by @@ -863,6 +900,105 @@ lemma coeff_odd_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) rw [Multiset.map_const', Multiset.prod_replicate, hs.neg_one_pow] norm_num +@[simp] +lemma coeff_ψ_barψ_selection_rule {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) + (a b : Fin 2) : coeff {.ψ a, .barψ b} V = 0 := by + refine coeff_U1_selection_rule hV (diagSL twoI) (diagScale twoI) (rep_diagSL_apply twoI) _ ?_ + simp only [Multiset.insert_eq_cons, diagScale, Fin.isValue, Units.val_inv_eq_inv_val, twoI_val, + _root_.mul_inv_rev, inv_I, neg_mul, star_neg, star_mul', RCLike.star_def, conj_I, star_inv₀, + star_ofNat, neg_neg, mul_neg, Multiset.map_cons, Multiset.map_singleton, Multiset.prod_cons, + Multiset.prod_singleton, mul_ite, ite_mul, ne_eq] + field_simp + simp only [Fin.isValue, I_sq, neg_neg, neg_mul, one_mul] + grind + +lemma coeff_empty_isInvariant {V : EFTLagrangianExclDeriv} : IsInvariant (coeff 0 V) := by + obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := 0) (l := []) (by simp) + rw [hc] + refine IsInvariant.smul (fun Λ => ?_) _ + simp + +lemma coeff_ψ_zero_ψ_one_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (coeff {.ψ 0, .ψ 1} V) := by + obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1}) (l := [.ψ 0, .ψ 1]) (by decide) + rw [hc] + refine IsInvariant.smul (fun Λ => ?_) _ + simp only [termOfList, Fin.isValue, List.map_cons, List.map_nil, List.prod_cons, List.prod_nil, + mul_one, rep_mul, rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum, SpecialLinearGroup.coe_inv, + adjugate_fin_two, of_apply, cons_val', cons_val_fin_one, cons_val_zero, Fin.sum_univ_two, + cons_val_one, mul_add, Algebra.mul_smul_comm, add_mul, Algebra.smul_mul_assoc, + toEFTLagrangianExclDeriv_mul_self, smul_zero, + toEFTLagrangianExclDeriv_mul_anti_commute (.ψ 1) (.ψ 0), neg_mul, smul_neg, ← neg_smul, neg_neg, + zero_add, smul_smul, add_zero, ← add_smul] + trans Λ.1.det • ([.ψ 0]ₑ * [.ψ 1]ₑ) + · simp only [Matrix.det_fin_two] + ring_nf + · simp + +@[simp] +lemma coeff_ψ_ψ_isInvariant {V : EFTLagrangianExclDeriv} (a b : Fin 2) : + IsInvariant (coeff {.ψ a, .ψ b} V) := by + match a, b with + | 0, 0 => rw [coeff_fermionic_selection_rule _ (by decide)]; simp + | 1, 1 => rw [coeff_fermionic_selection_rule _ (by decide)]; simp + | 0, 1 => exact coeff_ψ_zero_ψ_one_isInvariant + | 1, 0 => convert coeff_ψ_zero_ψ_one_isInvariant using 3; decide + +lemma coeff_barψ_zero_barψ_one_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (coeff {.barψ 0, .barψ 1} V) := by + obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := {.barψ 0, .barψ 1}) (l := [.barψ 0, .barψ 1]) + (by decide) + rw [hc] + refine IsInvariant.smul (fun Λ => ?_) _ + simp only [termOfList, Fin.isValue, List.map_cons, List.map_nil, List.prod_cons, List.prod_nil, + mul_one, rep_mul, rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum, SpecialLinearGroup.coe_inv, + adjugate_fin_two, of_apply, cons_val', cons_val_fin_one, cons_val_zero, RCLike.star_def, + Fin.sum_univ_two, cons_val_one, mul_add, Algebra.mul_smul_comm, add_mul, Algebra.smul_mul_assoc, + toEFTLagrangianExclDeriv_mul_self, smul_zero, + toEFTLagrangianExclDeriv_mul_anti_commute (.barψ 1) (.barψ 0), neg_mul, smul_neg, ← neg_smul, + ← map_neg, neg_neg, zero_add, smul_smul, ← map_mul, add_zero, ← add_smul, ← map_add] + trans (starRingEnd ℂ) Λ.1.det • ([.barψ 0]ₑ * [.barψ 1]ₑ) + · simp only [Matrix.det_fin_two] + ring_nf + · simp + +@[simp] +lemma coeff_barψ_barψ_isInvariant {V : EFTLagrangianExclDeriv} (a b : Fin 2) : + IsInvariant (coeff {.barψ a, .barψ b} V) := by + match a, b with + | 0, 0 => rw [coeff_fermionic_selection_rule _ (by decide)]; simp + | 1, 1 => rw [coeff_fermionic_selection_rule _ (by decide)]; simp + | 0, 1 => exact coeff_barψ_zero_barψ_one_isInvariant + | 1, 0 => convert coeff_barψ_zero_barψ_one_isInvariant using 3; decide + +lemma coeff_quartic_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (coeff {.ψ 0, .ψ 1, .barψ 0, .barψ 1} V) := by + obtain ⟨c', hc⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) + (l := [.ψ 0, .ψ 1, .barψ 0, .barψ 1]) (by decide) + rw [hc] + refine IsInvariant.smul (fun Λ => ?_) _ + simp only [termOfList, Fin.isValue, List.map_cons, List.map_nil, List.prod_cons, List.prod_nil, + mul_one, rep_mul, rep_apply_toEFTLagrangianExclDeriv_barψ_eq_sum, SpecialLinearGroup.coe_inv, + adjugate_fin_two, of_apply, cons_val', cons_val_fin_one, cons_val_zero, RCLike.star_def, + Fin.sum_univ_two, cons_val_one, mul_add, Algebra.mul_smul_comm, add_mul, Algebra.smul_mul_assoc, + toEFTLagrangianExclDeriv_mul_self, smul_zero, + toEFTLagrangianExclDeriv_mul_anti_commute (.barψ 1) (.barψ 0), neg_mul, smul_neg, ← neg_smul, + ← map_neg, neg_neg, zero_add, smul_smul, ← map_mul, add_zero, ← add_smul, ← map_add] + trans (starRingEnd ℂ) Λ.1.det • ((rep Λ) [ψ 0]ₑ * ((rep Λ) [ψ 1]ₑ * ([barψ 0]ₑ * [barψ 1]ₑ))) + · simp only [Matrix.det_fin_two] + ring_nf + simp only [SpecialLinearGroup.det_coe, map_one, Fin.isValue, + rep_apply_toEFTLagrangianExclDeriv_ψ_eq_sum, SpecialLinearGroup.coe_inv, adjugate_fin_two, + of_apply, cons_val', cons_val_fin_one, cons_val_zero, Fin.sum_univ_two, cons_val_one, + ← mul_assoc, add_mul, Algebra.smul_mul_assoc, mul_add, Algebra.mul_smul_comm, + toEFTLagrangianExclDeriv_mul_self, smul_zero, + toEFTLagrangianExclDeriv_mul_anti_commute (.ψ 1) (.ψ 0), neg_mul, smul_neg, ← neg_smul, neg_neg, + zero_add, smul_smul, add_zero, ← add_smul, mul_neg, one_mul] + trans Λ.1.det • ([ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ) + · simp only [Matrix.det_fin_two] + ring_nf + · simp + /-- The support of an effective potential: the set of multisets of field specifications for which the corresponding coefficient is non-zero. -/ def support (V : EFTLagrangianExclDeriv) : Finset (Multiset FieldSpecification) := @@ -966,6 +1102,21 @@ lemma eq_sum_support_coeff (V : EFTLagrangianExclDeriv) : V = ∑ s ∈ support conv_lhs => rw [hx] simp [Finset.smul_sum] +lemma nodup_of_mem_support {V : EFTLagrangianExclDeriv} {s : Multiset FieldSpecification} + (hs : s ∈ support V) : s.Nodup := by + simp [support, Set.Finite.mem_toFinset] at hs + by_contra h + exact hs (coeff_fermionic_selection_rule (V := V) s h) + +/-- For a purely fermionic theory, no fermion can appear twice in the same term, + so the support is a subset of those multisets which are actually finite sets. + This does not hold in a bosonic theory. -/ +lemma support_subset_finset_univ {V : EFTLagrangianExclDeriv} : + support V ⊆ (Finset.univ : Finset (Finset FieldSpecification)).image fun V => V.val := by + intro s hs + simp only [Finset.mem_image, Finset.mem_univ, true_and] + exact ⟨Finset.mk s (nodup_of_mem_support hs), rfl⟩ + /-- Regrouping the decomposition `eq_sum_support_coeff` along a classifying map `key` on field contents: if `fiber k` is the finset of field contents with `key s = k`, then an effective potential is the sum of its projections onto the fibers of the @@ -1087,11 +1238,44 @@ lemma irrepCoeff_termOfList (i : Multiset Irrep) (l : List FieldSpecification) : def irrepSupport (V : EFTLagrangianExclDeriv) : Finset (Multiset Irrep) := (support V).image (Multiset.map toIrrep) +lemma mem_irrepSupport_iff (V : EFTLagrangianExclDeriv) (i : Multiset Irrep) : + i ∈ irrepSupport V ↔ irrepCoeff i V ≠ 0 := by + simp [irrepSupport, Finset.mem_image] + constructor + · rintro ⟨s, hs, hsi⟩ + simp [irrepCoeff_eq_sum, coeff_sum_eq_zero_iff] + refine ⟨s, ?_⟩ + simp [mem_allTermsWithIrrepContent_iff, hsi] + exact mem_support_iff.mp hs + · intro h + simp [irrepCoeff_eq_sum, coeff_sum_eq_zero_iff] at h + obtain ⟨s, hs, hsi⟩ := h + use s + simp [mem_allTermsWithIrrepContent_iff] at hs + simp [mem_support_iff, hsi, hs] + +lemma irrepSupport_subset (V : EFTLagrangianExclDeriv) : + irrepSupport V ⊆ {{}, {.ψ}, {.barψ}, {.ψ, .ψ}, {.barψ, .barψ}, {.ψ, .barψ}, + {.ψ, .barψ, .barψ}, {.ψ, .ψ, .barψ}, {.ψ, .ψ, .barψ, .barψ}} := by + trans ((Finset.univ : Finset (Finset FieldSpecification)).image fun V => + V.val).image (Multiset.map toIrrep) + · rw [irrepSupport] + exact Finset.image_subset_image support_subset_finset_univ + · apply Finset.subset_of_eq + decide + lemma eq_sum_irrepCoeff (V : EFTLagrangianExclDeriv) : V = ∑ i ∈ irrepSupport V, irrepCoeff i V := by simp only [irrepSupport, irrepCoeff_eq_sum] exact eq_sum_fiber_coeff mem_allTermsWithIrrepContent_iff V +lemma eq_sum_irrepCoeff_subset {V : EFTLagrangianExclDeriv} {S : Finset (Multiset Irrep)} + (hS : irrepSupport V ⊆ S) : V = ∑ i ∈ S, irrepCoeff i V := by + conv_lhs => rw [eq_sum_irrepCoeff V] + apply Finset.sum_subset hS + intro s hs hsi + simpa [mem_irrepSupport_iff] using hsi + lemma irrepCoeff_rep_termOfList (i : Multiset Irrep) (g : SL(2, ℂ)) (l : List FieldSpecification) : rep g (irrepCoeff i (termOfList l)) = irrepCoeff i (rep g (termOfList l)) := by @@ -1132,30 +1316,118 @@ lemma irrepCoeff_ψ_barψ_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} (h irrepCoeff {Irrep.ψ, Irrep.barψ} V = 0 := by rw [irrepCoeff_eq_sum, Finset.sum_congr (g := fun s => coeff s V) (s₂ := {{ψ 0, barψ 0}, {ψ 0, barψ 1}, {ψ 1, barψ 0}, {ψ 1, barψ 1}}) (by decide) (by simp)] - suffices h : ∀ (a b : Fin 2), coeff {ψ a, barψ b} V = 0 by - repeat rw [Finset.sum_insert (by decide)] - simp only [h, Finset.sum_singleton, add_zero] - intro a b - refine coeff_U1_selection_rule hV (diagSL twoI) (diagScale twoI) (rep_diagSL_apply twoI) _ ?_ - simp only [Multiset.insert_eq_cons, diagScale, Fin.isValue, Units.val_inv_eq_inv_val, twoI_val, - _root_.mul_inv_rev, inv_I, neg_mul, star_neg, star_mul', RCLike.star_def, conj_I, star_inv₀, - star_ofNat, neg_neg, mul_neg, Multiset.map_cons, Multiset.map_singleton, Multiset.prod_cons, - Multiset.prod_singleton, mul_ite, ite_mul, ne_eq] - field_simp - simp only [Fin.isValue, I_sq, neg_neg, neg_mul, one_mul] - grind + repeat rw [Finset.sum_insert (by decide)] + simp only [coeff_ψ_barψ_selection_rule hV, Finset.sum_singleton, add_zero] + +lemma irrepCoeff_odd_eq_zero_of_isInvariant {V : EFTLagrangianExclDeriv} + (hV : IsInvariant V) (s : Multiset Irrep) (hs : Odd s.card) : irrepCoeff s V = 0 := by + simp [irrepCoeff_eq_sum] + refine Finset.sum_eq_zero ?_ + intro s' hs' + simp [mem_allTermsWithIrrepContent_iff] at hs' + subst hs' + apply coeff_odd_selection_rule hV s' + simpa using hs + +lemma eq_sum_irrepCoeff_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInvariant V) : + V = irrepCoeff {} V + irrepCoeff {Irrep.ψ, Irrep.ψ} V + + irrepCoeff {Irrep.barψ, Irrep.barψ} V + + irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V := by + nth_rewrite 1 [eq_sum_irrepCoeff_subset (irrepSupport_subset V)] + repeat rw [Finset.sum_insert (by decide)] + rw [Finset.sum_singleton] + rw [irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ} (by decide), + irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.barψ} (by decide), + irrepCoeff_ψ_barψ_eq_zero_of_isInvariant hV, + irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ, Irrep.barψ, Irrep.barψ} (by decide), + irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ, Irrep.ψ, Irrep.barψ} (by decide)] + abel + +/-- Only the terms whose field content is `Nodup` survive in `irrepCoeff i`, since a + repeated fermionic field forces the coefficient to vanish (`coeff_fermionic_selection_rule`). + Hence if exactly one such term `s` exists, `irrepCoeff i` is just `coeff s`. -/ +lemma irrepCoeff_eq_coeff_of_filter_nodup {i : Multiset Irrep} {s : Multiset FieldSpecification} + (h : (allTermsWithIrrepContent i).filter (·.Nodup) = {s}) (V : EFTLagrangianExclDeriv) : + irrepCoeff i V = coeff s V := by + rw [irrepCoeff_eq_sum, ← Finset.sum_filter_of_ne + (fun t _ ht => by by_contra hn; exact ht (coeff_fermionic_selection_rule t hn)), + h, Finset.sum_singleton] + +lemma irrepCoeff_empty_eq {V : EFTLagrangianExclDeriv} : + irrepCoeff 0 V = coeff 0 V := + irrepCoeff_eq_coeff_of_filter_nodup (by decide) V + +lemma irrepCoeff_ψ_ψ_eq {V : EFTLagrangianExclDeriv} : + irrepCoeff {Irrep.ψ, Irrep.ψ} V = coeff {.ψ 0, .ψ 1} V := + irrepCoeff_eq_coeff_of_filter_nodup (by decide) V + +lemma irrepCoeff_barψ_barψ_eq {V : EFTLagrangianExclDeriv} : + irrepCoeff {Irrep.barψ, Irrep.barψ} V = coeff {.barψ 0, .barψ 1} V := + irrepCoeff_eq_coeff_of_filter_nodup (by decide) V + +lemma irrepCoeff_quartic_eq {V : EFTLagrangianExclDeriv} : + irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V = + coeff {.ψ 0, .ψ 1, .barψ 0, .barψ 1} V := + irrepCoeff_eq_coeff_of_filter_nodup (by set_option maxRecDepth 4000 in decide) V + +lemma irrepCoeff_empty_isInvariant {V : EFTLagrangianExclDeriv} : + IsInvariant (irrepCoeff 0 V) := by + rw [irrepCoeff_empty_eq] + exact coeff_empty_isInvariant lemma irrepCoeff_ψ_ψ_isInvariant {V : EFTLagrangianExclDeriv} : IsInvariant (irrepCoeff {Irrep.ψ, Irrep.ψ} V) := by - sorry + rw [irrepCoeff_ψ_ψ_eq] + exact coeff_ψ_ψ_isInvariant _ _ lemma irrepCoeff_barψ_barψ_isInvariant {V : EFTLagrangianExclDeriv} : IsInvariant (irrepCoeff {Irrep.barψ, Irrep.barψ} V) := by - sorry + rw [irrepCoeff_barψ_barψ_eq] + exact coeff_barψ_barψ_isInvariant _ _ lemma irrepCoeff_quadratic_isInvariant {V : EFTLagrangianExclDeriv} : IsInvariant (irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V) := by - sorry + rw [irrepCoeff_quartic_eq] + exact coeff_quartic_isInvariant + +lemma isInvariant_iff_eq_sum_irrepCoeff {V : EFTLagrangianExclDeriv} : + IsInvariant V ↔ V = irrepCoeff 0 V + irrepCoeff {Irrep.ψ, Irrep.ψ} V + + irrepCoeff {Irrep.barψ, Irrep.barψ} V + + irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V := by + constructor + · intro hV + exact eq_sum_irrepCoeff_of_isInvariant hV + · intro h + rw [h] + apply IsInvariant.add _ irrepCoeff_quadratic_isInvariant + apply IsInvariant.add _ irrepCoeff_barψ_barψ_isInvariant + apply IsInvariant.add irrepCoeff_empty_isInvariant irrepCoeff_ψ_ψ_isInvariant + +lemma isInvariant_iff_eq_sum_coeff {V : EFTLagrangianExclDeriv} : + IsInvariant V ↔ V = coeff 0 V + coeff {.ψ 0, .ψ 1} V + + coeff {.barψ 0, .barψ 1} V + coeff {.ψ 0, .ψ 1, .barψ 0, .barψ 1} V := by + rw [isInvariant_iff_eq_sum_irrepCoeff, irrepCoeff_empty_eq, irrepCoeff_ψ_ψ_eq, + irrepCoeff_barψ_barψ_eq, irrepCoeff_quartic_eq] + +lemma isInvariant_iff_eq_exists {V : EFTLagrangianExclDeriv} : + IsInvariant V ↔ + ∃ c : ℂ, ∃ m0 : ℂ, ∃ m1 : ℂ, ∃ ρ : ℂ, V = c • 1 + m0 • ([ψ 0]ₑ * [ψ 1]ₑ) + + m1 • ([barψ 0]ₑ * [barψ 1]ₑ) + ρ • ([ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ):= by + rw [isInvariant_iff_eq_sum_coeff] + obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := 0) (l := []) (by decide) + obtain ⟨m0, hm0⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1}) (l := [.ψ 0, .ψ 1]) (by decide) + obtain ⟨m1, hm1⟩ := coeff_eq_termOfList V (s := {.barψ 0, .barψ 1}) (l := [.barψ 0, .barψ 1]) (by decide) + obtain ⟨ρ, hρ⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) (l := [.ψ 0, .ψ 1, .barψ 0, .barψ 1]) (by decide) + rw [hc, hm0, hm1, hρ] + simp [termOfList] + constructor + · intro h + use c, m0, m1, ρ + rw [h] + grind + · rintro ⟨c', m0', m1', ρ', rfl⟩ + simp_all + sorry /-! From 23b7da79ddeaa16750d92538305814830c680f34 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 05:27:48 +0100 Subject: [PATCH 41/48] feat: Fill in proof --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 2212eec84..7032a60d1 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1416,8 +1416,10 @@ lemma isInvariant_iff_eq_exists {V : EFTLagrangianExclDeriv} : rw [isInvariant_iff_eq_sum_coeff] obtain ⟨c, hc⟩ := coeff_eq_termOfList V (s := 0) (l := []) (by decide) obtain ⟨m0, hm0⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1}) (l := [.ψ 0, .ψ 1]) (by decide) - obtain ⟨m1, hm1⟩ := coeff_eq_termOfList V (s := {.barψ 0, .barψ 1}) (l := [.barψ 0, .barψ 1]) (by decide) - obtain ⟨ρ, hρ⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) (l := [.ψ 0, .ψ 1, .barψ 0, .barψ 1]) (by decide) + obtain ⟨m1, hm1⟩ := coeff_eq_termOfList V (s := {.barψ 0, .barψ 1}) + (l := [.barψ 0, .barψ 1]) (by decide) + obtain ⟨ρ, hρ⟩ := coeff_eq_termOfList V (s := {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) + (l := [.ψ 0, .ψ 1, .barψ 0, .barψ 1]) (by decide) rw [hc, hm0, hm1, hρ] simp [termOfList] constructor @@ -1425,9 +1427,20 @@ lemma isInvariant_iff_eq_exists {V : EFTLagrangianExclDeriv} : use c, m0, m1, ρ rw [h] grind - · rintro ⟨c', m0', m1', ρ', rfl⟩ + · rintro ⟨c', m0', m1', ρ', hV⟩ + simp [← mul_assoc] + rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = + termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, + show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV ⊢ + rw [hV] at hm0 hρ hm1 hc + simp only [Fin.isValue, map_add, map_smul, coeff_one, Multiset.empty_eq_zero, smul_ite, + smul_zero, coeff_apply_termOfList, ↓reduceIte, Multiset.coe_eq_zero, reduceCtorEq, add_zero, + termOfList_nil, ne_eq, one_ne_zero, not_false_eq_true, smul_left_inj] at hm0 hρ hm1 hc + rw [if_neg (by decide), if_pos (by decide), if_neg (by decide), if_neg (by decide)] at hm0 + rw [if_neg (by decide), if_neg (by decide), if_neg (by decide), if_pos (by decide)] at hρ + rw [if_neg (by decide), if_neg (by decide), if_pos (by decide), if_neg (by decide)] at hm1 simp_all - sorry /-! @@ -1486,13 +1499,6 @@ lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : simp only [massDimSupport, massDimCoeff_eq_sum] exact eq_sum_fiber_coeff mem_allTermsWithMassDimension_iff V -/-! - -## Constraining the effective potential - --/ - - end EFTLagrangianExclDeriv end From 3cafa972d75d7360e18c5d93f4b0bebfd5cf8488 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:11:50 +0100 Subject: [PATCH 42/48] feat: Start conjugate --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 121 +++++++++++++++++- 1 file changed, 119 insertions(+), 2 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 7032a60d1..b202bae11 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -443,6 +443,18 @@ lemma massDimensionNat_cast (f : FieldSpecification) : rw [massDimensionNat_eq, massDimension_eq] norm_num + +/-! + +## Conjugation + +-/ + +def conjugate (ψ : FieldSpecification) : FieldSpecification := + match ψ with + | .ψ α => .barψ α + | .barψ α => .ψ α + end FieldSpecification namespace EFTLagrangianExclDeriv @@ -482,6 +494,16 @@ lemma mul_termOfList_of_mem (ψ : FieldSpecification) (l : List FieldSpecificati · simp [termOfList_cons, ← mul_assoc, toEFTLagrangianExclDeriv_mul_anti_commute ψ β] simp [mul_assoc, ih ha] +lemma termOfList_comm_fieldSpecification (ψ : FieldSpecification) (l : List FieldSpecification) : + termOfList l * [ψ]ₑ = ((-1) ^ l.length : ℂ) • ([ψ]ₑ * termOfList l) := by + induction l with + | nil => simp + | cons β t ih => + simp only [termOfList_cons, mul_assoc, ih, Algebra.mul_smul_comm, List.length_cons] + simp only [← mul_assoc, toEFTLagrangianExclDeriv_mul_anti_commute β ψ, neg_mul, smul_neg] + ring_nf + simp + lemma termOfList_zero_of_not_nodup (l : List FieldSpecification) (h : ¬ l.Nodup) : termOfList l = 0 := by revert h @@ -580,7 +602,7 @@ lemma mem_termOfList_span (V : EFTLagrangianExclDeriv) : | add a b ha hb => exact add_mem ha hb lemma termOfList_perm_neq_zero {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : - ∃ c : ℂ, termOfList l1 = c • termOfList l2 ∧ c ≠ 0 := by + ∃ c : ℂ, termOfList l1 = c • termOfList l2 ∧ (c = 1 ∨ c = -1) := by induction h with | nil => exact ⟨1, by simp⟩ | cons x _ ih => @@ -601,6 +623,62 @@ lemma termOfList_perm {l1 l2 : List FieldSpecification} (h : l1.Perm l2) : obtain ⟨c, h1, h2⟩ := termOfList_perm_neq_zero h exact ⟨c, h1⟩ + +lemma termOfList_reverse_eq {l : List FieldSpecification} : + termOfList l.reverse = ((-1) ^ (l.length.choose 2) : ℂ) • termOfList l := by + induction l with + | nil => simp + | cons ψ t ih => + rw [List.reverse_cons, termOfList_append, termOfList_singleton, ih, smul_mul_assoc, + termOfList_comm_fieldSpecification, ← termOfList_cons, smul_smul, ← pow_add, + List.length_cons, Nat.choose_succ_succ, Nat.choose_one_right, Nat.add_comm] + +lemma termOfList_reverse_eq_of_eq {l1 l2 : List FieldSpecification} {c : ℂ} + (h : termOfList l1 = c • termOfList l2) : + termOfList l1.reverse = c • termOfList l2.reverse := by + have hf : ∀ l : List FieldSpecification, + CliffordAlgebra.reverse (termOfList l) = termOfList l.reverse := by + intro l + induction l with + | nil => simp + | cons ψ t ih => + rw [termOfList_cons, CliffordAlgebra.reverse.map_mul, ih, List.reverse_cons, + termOfList_append, termOfList_singleton, toEFTLagrangianExclDeriv_eq, + CliffordAlgebra.reverse_ι] + rw [← hf, ← hf, h, map_smul] + +lemma termOfList_reverse_zero_of_zero {l : List FieldSpecification} (h : termOfList l = 0) : + termOfList l.reverse = 0 := by + rw [termOfList_reverse_eq, h, smul_zero] + +lemma termOfList_conjugate_eq_of_eq {l1 l2 : List FieldSpecification} {c : ℂ} + (h : termOfList l1 = c • termOfList l2) : + termOfList (l1.map conjugate) = c • termOfList (l2.map conjugate) := by + let f := ExteriorAlgebra.map (moduleBasis.constr ℂ fun ψ => moduleBasis (conjugate ψ)) + have hf : ∀ l : List FieldSpecification, f (termOfList l) = termOfList (l.map conjugate) := by + intro l + induction l with + | nil => simp [f] + | cons ψ t ih => + rw [termOfList_cons, List.map_cons, termOfList_cons, map_mul, ih] + congr 1 + simp [f, toEFTLagrangianExclDeriv_eq, ExteriorAlgebra.map_apply_ι] + rw [← hf, ← hf, h, map_smul] + +lemma termOfList_conjugate_zero_of_zero {l : List FieldSpecification} (h : termOfList l = 0) : + termOfList (l.map conjugate) = 0 := by + let f := ExteriorAlgebra.map (moduleBasis.constr ℂ fun ψ => moduleBasis (conjugate ψ)) + have hf : ∀ l : List FieldSpecification, f (termOfList l) = termOfList (l.map conjugate) := by + intro l + induction l with + | nil => simp [f] + | cons ψ t ih => + rw [termOfList_cons, List.map_cons, termOfList_cons, map_mul, ih] + congr 1 + simp [f, toEFTLagrangianExclDeriv_eq, ExteriorAlgebra.map_apply_ι] + rw [← hf, h] + simp + lemma termOfList_eq_ιMulti (l : List FieldSpecification) : termOfList l = ExteriorAlgebra.ιMulti ℂ l.length (fun i => moduleBasis (l.get i)) := by induction l with @@ -1156,7 +1234,7 @@ lemma repSupport_eq_termOfList {s : Multiset FieldSpecification} (g : SL(2, ℂ) (by apply Multiset.coe_eq_coe.mp; simp [hl]) simp [h1] apply support_smul_neq_zero - exact hc + grind lemma repSupport_subset_self_of_singleton_subset_self {s : Multiset FieldSpecification} (g : SL(2, ℂ)) (h : ∀ ψ : FieldSpecification, repSupport {ψ} g ⊆ {{ψ}}) : @@ -1499,6 +1577,45 @@ lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : simp only [massDimSupport, massDimCoeff_eq_sum] exact eq_sum_fiber_coeff mem_allTermsWithMassDimension_iff V +/-! + +## Conjugation + +-/ + +/-- The conjugate of a coefficient. -/ +def conjCoeff (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv): + EFTLagrangianExclDeriv := + let c := Classical.choose (coeff_eq_termOfList V (s := s) (l := s.toList) (by simp)) + starRingEnd ℂ c • termOfList (s.toList.map conjugate).reverse + +lemma conjCoeff_of_eq_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) + (V : EFTLagrangianExclDeriv) (c : ℂ) (hl : Multiset.ofList l = s) + (h : coeff s V = c • termOfList l) : + conjCoeff s V = starRingEnd ℂ c • termOfList (l.map conjugate).reverse := by + obtain ⟨b, hb1, hb2⟩ := termOfList_perm_neq_zero (l1 := s.toList) (l2 := l) + (by subst hl; rw [← Multiset.coe_eq_coe ]; simp) + let c' := Classical.choose (coeff_eq_termOfList V (s := s) (l := s.toList) (by simp)) + have hc' : coeff s V = c' • termOfList s.toList := + Classical.choose_spec (coeff_eq_termOfList V (s := s) (l := s.toList) (by simp)) + change starRingEnd ℂ c' • termOfList (s.toList.map conjugate).reverse = _ + rw [h] at hc' + have hx1 := termOfList_reverse_eq_of_eq (termOfList_conjugate_eq_of_eq hb1) + rw [hx1, smul_smul] + rw [hb1, smul_smul] at hc' + have hx2 : (c - c' * b) • termOfList l = 0 := by + simp [sub_smul, hc'] + simp at hx2 + rcases hx2 with (h0 | h1) + · congr + grind + · rw [termOfList_reverse_zero_of_zero (termOfList_conjugate_zero_of_zero h1)] + simp + +lemma conjCoeff_add (s : Multiset FieldSpecification) (V W : EFTLagrangianExclDeriv) : + conjCoeff s (V + W) = conjCoeff s V + conjCoeff s W := by + sorry + end EFTLagrangianExclDeriv end From f86757db230400471e52f702f278476d97ca65ed Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 10:14:53 +0100 Subject: [PATCH 43/48] feat: Add conjugation --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 180 +++++++++++++++++- 1 file changed, 173 insertions(+), 7 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index b202bae11..6ec0ccd73 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -895,10 +895,11 @@ lemma coeff_eq_termOfList {s : Multiset FieldSpecification} lemma coeff_eq_exists_termOfList (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv) : - ∃ l, ∃ c : ℂ, coeff s V = c • termOfList l := by + ∃ l, ∃ c : ℂ, (coeff s V = c • termOfList l) ∧ Multiset.ofList l = s := by obtain ⟨c, hl⟩ := coeff_eq_termOfList V (s := s) (l := Multiset.toList s) (by simp) use Multiset.toList s use c + simp [hl] lemma coeff_monomial_selection_rule (g : SL(2, ℂ)) (σ : Equiv.Perm FieldSpecification) (d : FieldSpecification → ℂ) (hg : ∀ ψ, rep g [ψ]ₑ = d ψ • [σ ψ]ₑ) @@ -1584,15 +1585,15 @@ lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : -/ /-- The conjugate of a coefficient. -/ -def conjCoeff (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv): +def conjCoeffMap (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv) : EFTLagrangianExclDeriv := let c := Classical.choose (coeff_eq_termOfList V (s := s) (l := s.toList) (by simp)) starRingEnd ℂ c • termOfList (s.toList.map conjugate).reverse -lemma conjCoeff_of_eq_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) +lemma conjCoeffMap_of_eq_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) (V : EFTLagrangianExclDeriv) (c : ℂ) (hl : Multiset.ofList l = s) (h : coeff s V = c • termOfList l) : - conjCoeff s V = starRingEnd ℂ c • termOfList (l.map conjugate).reverse := by + conjCoeffMap s V = starRingEnd ℂ c • termOfList (l.map conjugate).reverse := by obtain ⟨b, hb1, hb2⟩ := termOfList_perm_neq_zero (l1 := s.toList) (l2 := l) (by subst hl; rw [← Multiset.coe_eq_coe ]; simp) let c' := Classical.choose (coeff_eq_termOfList V (s := s) (l := s.toList) (by simp)) @@ -1612,9 +1613,174 @@ lemma conjCoeff_of_eq_termOfList (s : Multiset FieldSpecification) (l : List Fie · rw [termOfList_reverse_zero_of_zero (termOfList_conjugate_zero_of_zero h1)] simp -lemma conjCoeff_add (s : Multiset FieldSpecification) (V W : EFTLagrangianExclDeriv) : - conjCoeff s (V + W) = conjCoeff s V + conjCoeff s W := by - sorry +@[simp] +lemma conjCoeffMap_add (s : Multiset FieldSpecification) (V W : EFTLagrangianExclDeriv) : + conjCoeffMap s (V + W) = conjCoeffMap s V + conjCoeffMap s W := by + obtain ⟨l, c, hV, hl⟩ := coeff_eq_exists_termOfList s V + obtain ⟨d, hW⟩ := coeff_eq_termOfList W hl + have hVW : coeff s (V + W) = (c + d) • termOfList l := by + simp [hV, hW, add_smul] + rw [conjCoeffMap_of_eq_termOfList s l (V + W) (c + d) hl hVW, + conjCoeffMap_of_eq_termOfList s l V c hl hV, conjCoeffMap_of_eq_termOfList s l W d hl hW] + simp [add_smul] + +@[simp] +lemma conjCoeff_smul (s : Multiset FieldSpecification) (c : ℂ) (V : EFTLagrangianExclDeriv) : + conjCoeffMap s (c • V) = starRingEnd ℂ c • conjCoeffMap s V := by + obtain ⟨l, d, hV, hl⟩ := coeff_eq_exists_termOfList s V + have h : coeff s (c • V) = (c * d) • termOfList l := by + simp [hV, smul_smul] + rw [conjCoeffMap_of_eq_termOfList s l (c • V) (c * d) hl h, + conjCoeffMap_of_eq_termOfList s l V d hl hV] + simp [smul_smul] + +def conjCoeff (s : Multiset FieldSpecification) : EFTLagrangianExclDeriv →ₛₗ[starRingEnd ℂ] EFTLagrangianExclDeriv where + toFun := conjCoeffMap s + map_add' := conjCoeffMap_add s + map_smul' := conjCoeff_smul s + +lemma conjCoeff_of_eq_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) + (V : EFTLagrangianExclDeriv) (c : ℂ) (hl : Multiset.ofList l = s) + (h : coeff s V = c • termOfList l) : + conjCoeff s V = starRingEnd ℂ c • termOfList (l.map conjugate).reverse := by + simp [conjCoeff, conjCoeffMap_of_eq_termOfList s l V c hl h] + +/-- The conjugate coefficient vanishes on field contents outside the support, since there + the coefficient itself is zero. -/ +lemma conjCoeff_eq_zero_of_not_mem_support {s : Multiset FieldSpecification} + {V : EFTLagrangianExclDeriv} (h : s ∉ support V) : conjCoeff s V = 0 := by + rw [conjCoeff_of_eq_termOfList s s.toList V 0 (by simp) + (by simp [coeff_eq_zero_of_not_mem_support h])] + simp + +lemma conjCoeff_termOfList (s : Multiset FieldSpecification) (l : List FieldSpecification) : + conjCoeff s (termOfList l) = if Multiset.ofList l = s then + termOfList (l.map conjugate).reverse else 0 := by + split_ifs with h + · have h0 : coeff s (termOfList l) = (1 : ℂ) • termOfList l := by + simp [coeff_apply_termOfList, h] + rw [conjCoeff_of_eq_termOfList s l (termOfList l) 1 h h0] + simp + · apply conjCoeff_eq_zero_of_not_mem_support + simp [mem_support_termOfList_iff] + grind + +def conjugate : EFTLagrangianExclDeriv →ₛₗ[starRingEnd ℂ] EFTLagrangianExclDeriv where + toFun := fun V => ∑ s ∈ support V, conjCoeff s V + map_add' := by + intro V W + rw [Finset.sum_subset support_add + (fun s _ hs => conjCoeff_eq_zero_of_not_mem_support hs), + Finset.sum_subset (Finset.subset_union_left (s₂ := support W)) + (fun s _ hs => conjCoeff_eq_zero_of_not_mem_support hs), + Finset.sum_subset (Finset.subset_union_right (s₁ := support V)) + (fun s _ hs => conjCoeff_eq_zero_of_not_mem_support hs)] + simp [map_add, Finset.sum_add_distrib] + map_smul' := by + intro c V + rw [Finset.sum_subset (support_smul c) + (fun s _ hs => conjCoeff_eq_zero_of_not_mem_support hs)] + simp [map_smulₛₗ, Finset.smul_sum] + +lemma conjugate_termOfList (l : List FieldSpecification) : + conjugate (termOfList l) = termOfList (l.map .conjugate).reverse := by + simp [conjugate, conjCoeff_termOfList, mem_support_termOfList_iff] + intro h + exact (termOfList_reverse_zero_of_zero (termOfList_conjugate_zero_of_zero h)).symm + +@[simp] +lemma conjugate_one : conjugate 1 = 1 := by + trans conjugate (termOfList []) + · simp + rw [conjugate_termOfList] + simp + +/-! + +## IsReal condition + +-/ + +def IsReal (V : EFTLagrangianExclDeriv) : Prop := conjugate V = V + + +/-- The lemma expressing the form of an element of `EFTLagrangianExclDeriv`, if it is both + invariant under the Lorentz group and is real. + + This expresses the EFT lagrangian in terms of the Majorana mass trem. -/ +lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : + IsInvariant V ∧ IsReal V ↔ ∃ c : ℝ, ∃ m0 : ℂ, ∃ ρ : ℝ, V = (c : ℂ) • 1 + m0 • ([ψ 0]ₑ * [ψ 1]ₑ) - + starRingEnd ℂ m0 • ([barψ 0]ₑ * [barψ 1]ₑ) + + (ρ : ℂ) • ([ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ) := by + have h_quartic : termOfList [ψ 1, ψ 0, barψ 1, barψ 0] = termOfList [ψ 0, ψ 1, barψ 0, barψ 1] := by + simp [termOfList, toEFTLagrangianExclDeriv_mul_anti_commute (barψ 0) (barψ 1)] + simp [← mul_assoc, toEFTLagrangianExclDeriv_mul_anti_commute (ψ 0) (ψ 1)] + constructor + · rintro ⟨hi, hr⟩ + rw [isInvariant_iff_eq_exists] at hi + obtain ⟨c, m0, m1, ρ, hV⟩ := hi + rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = + termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, + show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV ⊢ + simp [IsReal, hV, conjugate_termOfList] at hr + have h0 := congr_arg (coeff 0) hr + have h1 := congr_arg (coeff {.ψ 0, .ψ 1}) hr + have h2 := congr_arg (coeff {.barψ 0, .barψ 1}) hr + have h3 := congr_arg (coeff {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) hr + simp +decide [coeff_apply_termOfList, coeff_one] at h0 h1 h2 h3 + have hc : c = (c.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h0)] + generalize c.re = c' at hc + use c', m0, ρ.re + rw [hV] + subst hc + simp + have hx : m1 • termOfList [barψ 0, barψ 1] = - starRingEnd ℂ m0 • termOfList [barψ 0, barψ 1] := by + rw [← h2] + simp [termOfList, FieldSpecification.conjugate, + toEFTLagrangianExclDeriv_mul_anti_commute (barψ 0)] + rw [hx] + simp only [Fin.isValue, neg_smul] + suffices h : ρ • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = + ρ.re • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] by + simp [h] + abel + suffices h : (ρ - starRingEnd ℂ ρ ) • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = 0 by + simp at h + rcases h with (h0 | h1) + · have hρ : ρ = (ρ.re : ℂ) := by + rw [← propext (re_eq_ofReal_of_isSelfAdjoint _)] + rw [isSelfAdjoint_iff] + rw [starRingEnd_apply] at h0 + grind + generalize ρ.re = ρ' at hρ + subst hρ + simp + · simp [h1] + simp [sub_smul, ← h3, FieldSpecification.conjugate] + simp [h_quartic] + · rintro ⟨c, m0, ρ, hV⟩ + constructor + · rw [isInvariant_iff_eq_exists] + use (c : ℂ), m0, - starRingEnd ℂ m0, ρ + rw [hV] + simp + abel + · rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = + termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, + show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + subst hV + simp [IsReal, -coe_smul, Fin.isValue, map_add, map_sub, LinearMap.map_smulₛₗ, + RingHomCompTriple.comp_apply, RingHom.id_apply, conjugate_termOfList, + FieldSpecification.conjugate, h_quartic] + simp [termOfList, toEFTLagrangianExclDeriv_mul_anti_commute (barψ 0) (barψ 1), + toEFTLagrangianExclDeriv_mul_anti_commute (ψ 0) (ψ 1)] + abel + + + + end EFTLagrangianExclDeriv From 21f1e50e78c78b1005f2a2780eadda34255413ed Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 10:19:29 +0100 Subject: [PATCH 44/48] refactor: Golf --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 6ec0ccd73..2cba5afb8 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1685,15 +1685,11 @@ def conjugate : EFTLagrangianExclDeriv →ₛₗ[starRingEnd ℂ] EFTLagrangianE lemma conjugate_termOfList (l : List FieldSpecification) : conjugate (termOfList l) = termOfList (l.map .conjugate).reverse := by simp [conjugate, conjCoeff_termOfList, mem_support_termOfList_iff] - intro h - exact (termOfList_reverse_zero_of_zero (termOfList_conjugate_zero_of_zero h)).symm + exact fun h => (termOfList_reverse_zero_of_zero (termOfList_conjugate_zero_of_zero h)).symm @[simp] lemma conjugate_one : conjugate 1 = 1 := by - trans conjugate (termOfList []) - · simp - rw [conjugate_termOfList] - simp + simp [← termOfList_nil, conjugate_termOfList] /-! @@ -1778,10 +1774,6 @@ lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : toEFTLagrangianExclDeriv_mul_anti_commute (ψ 0) (ψ 1)] abel - - - - end EFTLagrangianExclDeriv end From d1a69e5e64b534d10407950c4327c25c04707e50 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 10:20:28 +0100 Subject: [PATCH 45/48] refactor: More golf --- .../Particles/PureFermionic/EFTLagrangianExclDeriv.lean | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 2cba5afb8..a3ab0e554 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1513,12 +1513,9 @@ lemma isInvariant_iff_eq_exists {V : EFTLagrangianExclDeriv} : show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV ⊢ rw [hV] at hm0 hρ hm1 hc - simp only [Fin.isValue, map_add, map_smul, coeff_one, Multiset.empty_eq_zero, smul_ite, - smul_zero, coeff_apply_termOfList, ↓reduceIte, Multiset.coe_eq_zero, reduceCtorEq, add_zero, - termOfList_nil, ne_eq, one_ne_zero, not_false_eq_true, smul_left_inj] at hm0 hρ hm1 hc - rw [if_neg (by decide), if_pos (by decide), if_neg (by decide), if_neg (by decide)] at hm0 - rw [if_neg (by decide), if_neg (by decide), if_neg (by decide), if_pos (by decide)] at hρ - rw [if_neg (by decide), if_neg (by decide), if_pos (by decide), if_neg (by decide)] at hm1 + simp +decide only [Fin.isValue, map_add, map_smul, coeff_one, ↓reduceIte, smul_zero, + coeff_apply_termOfList, add_zero, termOfList_nil, ne_eq, one_ne_zero, not_false_eq_true, + smul_left_inj] at hm0 hρ hm1 hc simp_all /-! From ec4df031256d85f75e69fc71fb566162e0aac677 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 11:13:09 +0100 Subject: [PATCH 46/48] feat: Add HasMassDimLE lemmas --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index a3ab0e554..c3ce21072 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1121,6 +1121,15 @@ lemma support_add {V W : EFTLagrangianExclDeriv} : simp [support] grind +lemma support_sub {V W : EFTLagrangianExclDeriv} : + support (V - W) ⊆ support V ∪ support W := by + simp [support] + grind + +lemma support_one : support 1 = {{}} := by + simp [support, coeff_one] + rfl + lemma support_smul {V : EFTLagrangianExclDeriv} (c : ℂ) : support (c • V) ⊆ support V := by simp [support] @@ -1566,15 +1575,186 @@ lemma massDimCoeff_termOfList (n : ℚ) (l : List FieldSpecification) : if (Multiset.map massDimension (Multiset.ofList l)).sum = n then termOfList l else 0 := by simp [massDimCoeff_eq_sum, coeff_apply_termOfList, mem_allTermsWithMassDimension_iff] +lemma massDimCoeff_termOfList_ofNat (n : ℕ) (l : List FieldSpecification) : + massDimCoeff (n) (termOfList l) = + if (Multiset.map massDimensionNat (Multiset.ofList l)).sum = 2 * n then termOfList l else 0 := by + rw [massDimCoeff_termOfList] + simp + congr 1 + field_simp + simp + constructor + · intro h + exact_mod_cast h + · intro h + exact_mod_cast h + + +lemma massDimCoeff_one (n : ℚ) : massDimCoeff n 1 = if n = 0 then 1 else 0 := by + rw [massDimCoeff_eq_sum] + simp only [coeff_one] + rw [Finset.sum_ite_eq'] + refine if_congr ?_ rfl rfl + rw [mem_allTermsWithMassDimension_iff] + simp [eq_comm] + /-- The mass dimensions of the operators appearing in an effective potential. -/ def massDimSupport (V : EFTLagrangianExclDeriv) : Finset ℚ := (support V).image (fun s => (s.map massDimension).sum) +lemma massDimSupport_add {V W : EFTLagrangianExclDeriv} : + massDimSupport (V + W) ⊆ massDimSupport V ∪ massDimSupport W := by + simp [massDimSupport, ← Finset.image_union] + apply Finset.image_subset_image + exact support_add + +lemma massDimSupport_sub {V W : EFTLagrangianExclDeriv} : + massDimSupport (V - W) ⊆ massDimSupport V ∪ massDimSupport W := by + simp [massDimSupport, ← Finset.image_union] + apply Finset.image_subset_image + exact support_sub + +lemma massDimSupport_one : massDimSupport 1 = {0} := by + simp [support_one, massDimSupport] + +lemma massDimSupport_smul {c : ℂ} {V : EFTLagrangianExclDeriv} : + massDimSupport (c • V) ⊆ massDimSupport V := by + simp [massDimSupport, ] + apply Finset.image_subset_image + exact support_smul c + +lemma massDimSupport_termOfList (l : List FieldSpecification) : + massDimSupport (termOfList l) ⊆ {(Multiset.map massDimension (Multiset.ofList l)).sum} := by + trans ({Multiset.ofList l} : Finset (Multiset FieldSpecification)).image + (fun s => (s.map massDimension).sum) + · apply Finset.image_subset_image + exact support_termOfList_subset l + · simp + lemma eq_sum_massDimCoeff (V : EFTLagrangianExclDeriv) : V = ∑ n ∈ massDimSupport V, massDimCoeff n V := by simp only [massDimSupport, massDimCoeff_eq_sum] exact eq_sum_fiber_coeff mem_allTermsWithMassDimension_iff V +def HasMassDimLE (n : ℚ) (V : EFTLagrangianExclDeriv): Prop := + ∀ s ∈ massDimSupport V, s ≤ n + +lemma HasMassDimLE.add {n : ℚ} {V W : EFTLagrangianExclDeriv} (hV : HasMassDimLE n V) + (hW : HasMassDimLE n W) : HasMassDimLE n (V + W) := by + intro s hs + have h1 := massDimSupport_add hs + simp at h1 + rcases h1 with h1 | h1 + · exact hV s h1 + · exact hW s h1 + +lemma HasMassDimLE.sub {n : ℚ} {V W : EFTLagrangianExclDeriv} (hV : HasMassDimLE n V) + (hW : HasMassDimLE n W) : HasMassDimLE n (V - W) := by + intro s hs + have h1 := massDimSupport_sub hs + simp at h1 + rcases h1 with h1 | h1 + · exact hV s h1 + · exact hW s h1 + +lemma HasMassDimLE.smul {n : ℚ} {c : ℂ} {V : EFTLagrangianExclDeriv} (hV : HasMassDimLE n V) : + HasMassDimLE n (c • V) := by + intro s hs + have h1 := massDimSupport_smul hs + exact hV s h1 + +lemma HasMassDimLE.one {n : ℚ} (hn : 0 ≤ n): HasMassDimLE n 1 := by + simp [HasMassDimLE, massDimSupport_one] + exact hn + +lemma HasMassDimLE.termOfList {n : ℚ} {l : List FieldSpecification} + (hl : (Multiset.map massDimension (Multiset.ofList l)).sum ≤ n) : + HasMassDimLE n (termOfList l) := by + intro s hs + have hs' := massDimSupport_termOfList l hs + simp_all + +/-- Off the mass-dimension support the projection vanishes: if no operator of `V` has + mass dimension `q`, then `massDimCoeff q V = 0`. -/ +lemma massDimCoeff_eq_zero_of_not_mem_massDimSupport {q : ℚ} {V : EFTLagrangianExclDeriv} + (h : q ∉ massDimSupport V) : massDimCoeff q V = 0 := by + rw [massDimCoeff_eq_sum] + refine Finset.sum_eq_zero fun s hs => ?_ + rw [mem_allTermsWithMassDimension_iff] at hs + refine coeff_eq_zero_of_not_mem_support fun hsupp => h ?_ + rw [massDimSupport] + exact Finset.mem_image.mpr ⟨s, hsupp, hs⟩ + +lemma eq_sum_of_hasMassDimLE {n : ℕ} {V : EFTLagrangianExclDeriv} (h : HasMassDimLE n V) : + V = ∑ m ∈ Finset.range (2 * n + 1), massDimCoeff (m / (2 : ℚ)) V := by + have hinj : ∀ x ∈ Finset.range (2 * n + 1), ∀ y ∈ Finset.range (2 * n + 1), + (x / (2 : ℚ)) = (y / (2 : ℚ)) → x = y := by + intro x _ y _ hxy + exact_mod_cast (by linarith : (x : ℚ) = y) + have hreindex : (∑ m ∈ Finset.range (2 * n + 1), massDimCoeff (m / (2 : ℚ)) V) + = ∑ q ∈ (Finset.range (2 * n + 1)).image (fun m : ℕ => (m : ℚ) / 2), massDimCoeff q V := + (Finset.sum_image (f := fun q => massDimCoeff q V) hinj).symm + rw [hreindex] + conv_lhs => rw [eq_sum_massDimCoeff V] + refine Finset.sum_subset ?_ (fun q _ hq => massDimCoeff_eq_zero_of_not_mem_massDimSupport hq) + rw [massDimSupport, Finset.image_subset_iff] + intro s hs + have hle : (s.map massDimension).sum ≤ (n : ℚ) := + h _ (by rw [massDimSupport]; exact Finset.mem_image.mpr ⟨s, hs, rfl⟩) + rw [sum_map_massDimension] at hle + refine Finset.mem_image.mpr ⟨3 * s.card, Finset.mem_range.mpr ?_, ?_⟩ + · have h2 : (3 * s.card : ℚ) ≤ 2 * n := by linarith + have : 3 * s.card ≤ 2 * n := by exact_mod_cast h2 + omega + · rw [sum_map_massDimension]; push_cast; ring + +lemma massDimCoeff_eq_zero_of_hasMassDimLE {n : ℕ} {V : EFTLagrangianExclDeriv} + (h : HasMassDimLE n V) (m : ℚ) (hm : n < m) : + massDimCoeff m V = 0 := by + apply massDimCoeff_eq_zero_of_not_mem_massDimSupport + simp [HasMassDimLE] at h + by_contra hn + have hl := h m hn + grind + + +/-- Applying `coeff s` to a mass-dimension projection: it returns `coeff s V` when the field + content `s` has mass dimension `q`, and `0` otherwise (the other coefficients are orthogonal + to `coeff s`). -/ +lemma coeff_massDimCoeff (q : ℚ) (s : Multiset FieldSpecification) (V : EFTLagrangianExclDeriv) : + coeff s (massDimCoeff q V) = if (s.map massDimension).sum = q then coeff s V else 0 := by + rw [massDimCoeff_eq_sum, map_sum] + split_ifs with h + · rw [Finset.sum_eq_single s (fun t _ htn => coeff_coeff_eq_zero_of_diff (Ne.symm htn) V) + (fun hns => absurd ((mem_allTermsWithMassDimension_iff q s).mpr h) hns)] + exact coeff_coeff_self V + · refine Finset.sum_eq_zero fun t ht => ?_ + rw [mem_allTermsWithMassDimension_iff] at ht + exact coeff_coeff_eq_zero_of_diff (by rintro rfl; exact h ht) V + +lemma hasMassDimLE_iff_eq_sum {n : ℕ} {V : EFTLagrangianExclDeriv} : + HasMassDimLE n V ↔ V = ∑ m ∈ Finset.range (2 * n + 1), massDimCoeff (m / (2 : ℚ)) V := by + refine ⟨eq_sum_of_hasMassDimLE, fun hV => ?_⟩ + intro q hq + rw [massDimSupport, Finset.mem_image] at hq + obtain ⟨s, hs, rfl⟩ := hq + rw [mem_support_iff] at hs + have hcoeff : coeff s V + = ∑ m ∈ Finset.range (2 * n + 1), + if (s.map massDimension).sum = (m : ℚ) / 2 then coeff s V else 0 := by + conv_lhs => rw [hV] + rw [map_sum] + simp_rw [coeff_massDimCoeff] + have hex : ∃ m ∈ Finset.range (2 * n + 1), (s.map massDimension).sum = (m : ℚ) / 2 := by + by_contra hcon + push Not at hcon + exact hs (by rw [hcoeff]; exact Finset.sum_eq_zero fun m hm => if_neg (hcon m hm)) + obtain ⟨m, hm, hqm⟩ := hex + rw [Finset.mem_range] at hm + rw [hqm] + have hmn : (m : ℚ) ≤ 2 * (n : ℚ) := by exact_mod_cast (show m ≤ 2 * n from by omega) + linarith + /-! ## Conjugation @@ -1771,6 +1951,46 @@ lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : toEFTLagrangianExclDeriv_mul_anti_commute (ψ 0) (ψ 1)] abel +/-- The lemma expressing the form of an element of `EFTLagrangianExclDeriv`, if it is + invariant under the Lorentz group and is real, and has mass dimension at most `4`. + + This expresses the EFT lagrangian in terms of the Majorana mass trem. -/ +lemma isInvariant_isReal_hasMassDimLE_four_iff_eq_exists {V : EFTLagrangianExclDeriv} : + IsInvariant V ∧ IsReal V ∧ HasMassDimLE 4 V ↔ ∃ c : ℝ, ∃ m0 : ℂ, + V = (c : ℂ) • 1 + m0 • ([ψ 0]ₑ * [ψ 1]ₑ) - starRingEnd ℂ m0 • ([barψ 0]ₑ * [barψ 1]ₑ) := by + constructor + · rintro ⟨hi, hr, hm⟩ + obtain ⟨c, m0, ρ, hV⟩ := (isInvariant_and_isReal_iff_eq_exists.mp ⟨hi, hr⟩) + use c, m0 + rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = + termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, + show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + rw [hV] + simp + have hmass := massDimCoeff_eq_zero_of_hasMassDimLE hm (6 : ℕ) (by norm_num) + have h0 := massDimCoeff_termOfList_ofNat (n := 6) + simp only [Nat.cast_ofNat, massDimensionNat_eq, Multiset.map_coe, List.map_const', + Multiset.sum_coe, List.sum_replicate, smul_eq_mul, Nat.reduceMul] at h0 + simp +decide [hV, h0, massDimCoeff_one] at hmass + rw [show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] + rcases hmass with rfl | hmass + · simp + · simp [hmass] + · rintro ⟨c, m0, hV⟩ + rw [← and_assoc] + constructor + · rw [isInvariant_and_isReal_iff_eq_exists] + use c, m0, 0 + simp [hV] + · rw [show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], + show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + rw [hV] + refine HasMassDimLE.sub + (HasMassDimLE.add (HasMassDimLE.smul (HasMassDimLE.one ?_)) + (HasMassDimLE.smul (HasMassDimLE.termOfList ?_))) + (HasMassDimLE.smul (HasMassDimLE.termOfList ?_)) <;> norm_num end EFTLagrangianExclDeriv end From 0c174b34e89890c24e1a2c2159f51f8e2c46b1d7 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:21:23 +0100 Subject: [PATCH 47/48] refactor: Golf --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index c3ce21072..588bc370f 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1422,13 +1422,8 @@ lemma eq_sum_irrepCoeff_of_isInvariant {V : EFTLagrangianExclDeriv} (hV : IsInva irrepCoeff {Irrep.barψ, Irrep.barψ} V + irrepCoeff {Irrep.ψ, Irrep.ψ, Irrep.barψ, Irrep.barψ} V := by nth_rewrite 1 [eq_sum_irrepCoeff_subset (irrepSupport_subset V)] - repeat rw [Finset.sum_insert (by decide)] - rw [Finset.sum_singleton] - rw [irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ} (by decide), - irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.barψ} (by decide), - irrepCoeff_ψ_barψ_eq_zero_of_isInvariant hV, - irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ, Irrep.barψ, Irrep.barψ} (by decide), - irrepCoeff_odd_eq_zero_of_isInvariant hV {Irrep.ψ, Irrep.ψ, Irrep.barψ} (by decide)] + simp +decide [Finset.sum_insert, Finset.sum_singleton, -Multiset.insert_eq_cons, + irrepCoeff_odd_eq_zero_of_isInvariant hV, irrepCoeff_ψ_barψ_eq_zero_of_isInvariant hV] abel /-- Only the terms whose field content is `Nodup` survive in `irrepCoeff i`, since a @@ -1876,7 +1871,6 @@ lemma conjugate_one : conjugate 1 = 1 := by def IsReal (V : EFTLagrangianExclDeriv) : Prop := conjugate V = V - /-- The lemma expressing the form of an element of `EFTLagrangianExclDeriv`, if it is both invariant under the Lorentz group and is real. @@ -1892,10 +1886,7 @@ lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : · rintro ⟨hi, hr⟩ rw [isInvariant_iff_eq_exists] at hi obtain ⟨c, m0, m1, ρ, hV⟩ := hi - rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = - termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, - show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], - show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV ⊢ + simp [← termOfList_singleton, ← termOfList_append] at hV ⊢ simp [IsReal, hV, conjugate_termOfList] at hr have h0 := congr_arg (coeff 0) hr have h1 := congr_arg (coeff {.ψ 0, .ψ 1}) hr @@ -1939,10 +1930,7 @@ lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : rw [hV] simp abel - · rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = - termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, - show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], - show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + · simp only [← termOfList_singleton, ← termOfList_append] at hV subst hV simp [IsReal, -coe_smul, Fin.isValue, map_add, map_sub, LinearMap.map_smulₛₗ, RingHomCompTriple.comp_apply, RingHom.id_apply, conjugate_termOfList, @@ -1962,10 +1950,7 @@ lemma isInvariant_isReal_hasMassDimLE_four_iff_eq_exists {V : EFTLagrangianExclD · rintro ⟨hi, hr, hm⟩ obtain ⟨c, m0, ρ, hV⟩ := (isInvariant_and_isReal_iff_eq_exists.mp ⟨hi, hr⟩) use c, m0 - rw [show [ψ 0]ₑ * [ψ 1]ₑ * [barψ 0]ₑ * [barψ 1]ₑ = - termOfList [.ψ 0, .ψ 1, .barψ 0, .barψ 1] by simp [termOfList]; grind, - show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], - show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + simp only [← termOfList_singleton, ← termOfList_append] at hV rw [hV] simp have hmass := massDimCoeff_eq_zero_of_hasMassDimLE hm (6 : ℕ) (by norm_num) @@ -1973,8 +1958,7 @@ lemma isInvariant_isReal_hasMassDimLE_four_iff_eq_exists {V : EFTLagrangianExclD simp only [Nat.cast_ofNat, massDimensionNat_eq, Multiset.map_coe, List.map_const', Multiset.sum_coe, List.sum_replicate, smul_eq_mul, Nat.reduceMul] at h0 simp +decide [hV, h0, massDimCoeff_one] at hmass - rw [show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], - show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] + simp only [← termOfList_singleton, ← termOfList_append] rcases hmass with rfl | hmass · simp · simp [hmass] @@ -1984,13 +1968,13 @@ lemma isInvariant_isReal_hasMassDimLE_four_iff_eq_exists {V : EFTLagrangianExclD · rw [isInvariant_and_isReal_iff_eq_exists] use c, m0, 0 simp [hV] - · rw [show [ψ 0]ₑ * [ψ 1]ₑ = termOfList [.ψ 0, .ψ 1] by simp [termOfList], - show [barψ 0]ₑ * [barψ 1]ₑ = termOfList [.barψ 0, .barψ 1] by simp [termOfList]] at hV + · simp only [← termOfList_singleton, ← termOfList_append] at hV rw [hV] refine HasMassDimLE.sub (HasMassDimLE.add (HasMassDimLE.smul (HasMassDimLE.one ?_)) (HasMassDimLE.smul (HasMassDimLE.termOfList ?_))) (HasMassDimLE.smul (HasMassDimLE.termOfList ?_)) <;> norm_num + end EFTLagrangianExclDeriv end From a754535440e44fac9514dde2bcfd89cb02780e85 Mon Sep 17 00:00:00 2001 From: Joseph Tooby-Smith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:44:37 +0100 Subject: [PATCH 48/48] refactor: Golf --- .../PureFermionic/EFTLagrangianExclDeriv.lean | 50 +++++++------------ 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean index 588bc370f..b5c589cf4 100644 --- a/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean +++ b/Physlib/Particles/PureFermionic/EFTLagrangianExclDeriv.lean @@ -1584,7 +1584,6 @@ lemma massDimCoeff_termOfList_ofNat (n : ℕ) (l : List FieldSpecification) : · intro h exact_mod_cast h - lemma massDimCoeff_one (n : ℚ) : massDimCoeff n 1 = if n = 0 then 1 else 0 := by rw [massDimCoeff_eq_sum] simp only [coeff_one] @@ -1889,40 +1888,26 @@ lemma isInvariant_and_isReal_iff_eq_exists {V : EFTLagrangianExclDeriv} : simp [← termOfList_singleton, ← termOfList_append] at hV ⊢ simp [IsReal, hV, conjugate_termOfList] at hr have h0 := congr_arg (coeff 0) hr - have h1 := congr_arg (coeff {.ψ 0, .ψ 1}) hr have h2 := congr_arg (coeff {.barψ 0, .barψ 1}) hr have h3 := congr_arg (coeff {.ψ 0, .ψ 1, .barψ 0, .barψ 1}) hr - simp +decide [coeff_apply_termOfList, coeff_one] at h0 h1 h2 h3 - have hc : c = (c.re : ℂ) := by rw [← propext (re_eq_ofReal_of_isSelfAdjoint h0)] - generalize c.re = c' at hc - use c', m0, ρ.re - rw [hV] - subst hc - simp - have hx : m1 • termOfList [barψ 0, barψ 1] = - starRingEnd ℂ m0 • termOfList [barψ 0, barψ 1] := by + simp +decide [coeff_apply_termOfList, coeff_one] at h0 h2 h3 + obtain ⟨c', rfl⟩ := Complex.conj_eq_iff_real.mp h0 + refine ⟨c', m0, ρ.re, hV.trans ?_⟩ + have hx : m1 • termOfList [barψ 0, barψ 1] = + -(starRingEnd ℂ m0 • termOfList [barψ 0, barψ 1]) := by rw [← h2] simp [termOfList, FieldSpecification.conjugate, - toEFTLagrangianExclDeriv_mul_anti_commute (barψ 0)] - rw [hx] - simp only [Fin.isValue, neg_smul] - suffices h : ρ • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = - ρ.re • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] by - simp [h] - abel - suffices h : (ρ - starRingEnd ℂ ρ ) • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = 0 by - simp at h - rcases h with (h0 | h1) - · have hρ : ρ = (ρ.re : ℂ) := by - rw [← propext (re_eq_ofReal_of_isSelfAdjoint _)] - rw [isSelfAdjoint_iff] - rw [starRingEnd_apply] at h0 - grind - generalize ρ.re = ρ' at hρ - subst hρ + toEFTLagrangianExclDeriv_mul_anti_commute (barψ 0)] + have hρ : ρ • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = + (ρ.re : ℂ) • termOfList [ψ 0, ψ 1, barψ 0, barψ 1] := by + simp [FieldSpecification.conjugate, h_quartic] at h3 + rcases smul_eq_zero.mp (show (starRingEnd ℂ ρ - ρ) • + termOfList [ψ 0, ψ 1, barψ 0, barψ 1] = 0 by simp [sub_smul, h3]) with h | h + · obtain ⟨ρ', rfl⟩ := Complex.conj_eq_iff_real.mp (sub_eq_zero.mp h) simp - · simp [h1] - simp [sub_smul, ← h3, FieldSpecification.conjugate] - simp [h_quartic] + · simp [h] + rw [hx, hρ] + simp [sub_eq_add_neg] · rintro ⟨c, m0, ρ, hV⟩ constructor · rw [isInvariant_iff_eq_exists] @@ -1950,15 +1935,14 @@ lemma isInvariant_isReal_hasMassDimLE_four_iff_eq_exists {V : EFTLagrangianExclD · rintro ⟨hi, hr, hm⟩ obtain ⟨c, m0, ρ, hV⟩ := (isInvariant_and_isReal_iff_eq_exists.mp ⟨hi, hr⟩) use c, m0 - simp only [← termOfList_singleton, ← termOfList_append] at hV + simp only [← termOfList_singleton, ← termOfList_append] at hV ⊢ rw [hV] - simp + simp only [Fin.isValue, add_eq_left, smul_eq_zero] have hmass := massDimCoeff_eq_zero_of_hasMassDimLE hm (6 : ℕ) (by norm_num) have h0 := massDimCoeff_termOfList_ofNat (n := 6) simp only [Nat.cast_ofNat, massDimensionNat_eq, Multiset.map_coe, List.map_const', Multiset.sum_coe, List.sum_replicate, smul_eq_mul, Nat.reduceMul] at h0 simp +decide [hV, h0, massDimCoeff_one] at hmass - simp only [← termOfList_singleton, ← termOfList_append] rcases hmass with rfl | hmass · simp · simp [hmass]