feat: gamma endomorphisms of Dirac fermions - #1627
jstoobysmith merged 3 commits into
Conversation
|
Thank you for this pull-request (PR). If this is your first PR, welcome to the community! Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.
Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages. If you have any problems or questions, please reach out to the community on the Zulip. |
jstoobysmith
left a comment
There was a problem hiding this comment.
One comment here, but it is a definitional change, so will affect a lot of the other things here.
|
|
||
| /-- The gamma endomorphisms of `Dirac`, defined using its chiral basis. Multiplication | ||
| of these endomorphisms is composition, with the right factor acting first. -/ | ||
| def gamma (μ : Fin 1 ⊕ Fin 3) : Module.End ℂ Dirac := |
There was a problem hiding this comment.
If you can, I would make this the definition of gammaMatrx write all of the lemmas in terms of this. You could even lift this to a linear map:
Lorentz.Vector \to Module.End ℂ Dirac
There was a problem hiding this comment.
Hi Joseph, PR #1627 has been updated according to your definition-level suggestion. The current GitHub Actions workflows are awaiting maintainer approval. Could you please approve and run them when convenient?
|
awaiting-author |
Define Clifford multiplication as a real linear map from Lorentz vectors to complex linear Dirac endomorphisms. Prove the vector Clifford relation by bilinear extension from Lorentz basis pairs and derive the upper-index components. Preserve gamma5 and the chiral projector identities, and update the API map. AI assistance: GPT-6 Astra. Co-authored-by: GPT-6 Astra <noreply@openai.com>
9daec8c to
502ea54
Compare
| Matrix.fromBlocks, Fin.castAdd, Fin.castLE, Fin.natAdd, Fin.addNat, | ||
| Matrix.cons_val_two, Matrix.cons_val_three] | ||
|
|
||
| private lemma gammaMatrix_basis_anticomm (μ ν : Fin 1 ⊕ Fin 3) : |
There was a problem hiding this comment.
Would remove priviate on these lemmas. Not really needed.
There was a problem hiding this comment.
Hi Joseph, I addressed both comments. The two Lorentz-basis calculation lemmas are now public and documented. The existing Dirac-representation matrices γ0–γ5 are now derived from the canonical Dirac-space gamma endomorphisms through an explicit chiral-to-Dirac algebra equivalence, while preserving the existing matrix and Clifford-algebra API. Targeted and full builds pass. PR #1206 remains separate; its overlap with CliffordAlgebra.lean will need coordination.
There was a problem hiding this comment.
I would replace the existing definitions of gamma matrices we have in Physlib with this definition in this PR. As this is much better.
Derive the legacy Dirac-representation gamma matrices from the canonical chiral-basis Dirac endomorphisms through an explicit change of coordinates. Expose the Lorentz-basis matrix and Clifford lemmas requested in review, and preserve the existing Clifford algebra API. AI assistance: GPT-6 Astra. Co-authored-by: GPT-6 Astra <noreply@openai.com>
| /-- Dirac endomorphisms as matrices in the Dirac representation. The change of coordinates | ||
| from the chiral representation is `S = [1, 1; -1, 1]`, with `2 × 2` blocks, so this map sends | ||
| `f` to `S [f] S⁻¹`. The common normalization factor `1 / √2` cancels in conjugation. -/ | ||
| def diracMatrix : Module.End ℂ Fermion.Dirac ≃ₐ[ℂ] Matrix (Fin 4) (Fin 4) ℂ := |
There was a problem hiding this comment.
Would move this to ./Fermions/Dirac, and rename it endEquivMatrix
|
|
||
| /-- The γ gamma matrices in the Dirac representation. -/ | ||
| @[simp] | ||
| def γ : Fin 4 → Matrix (Fin 4) (Fin 4) ℂ := ![γ0, γ1, γ2, γ3] |
There was a problem hiding this comment.
If we can remove this altogether and just use your definitions I think that would be better.
There was a problem hiding this comment.
Thanks for the comments. I’ve addressed both in the latest revision: endEquivMatrix is now in Fermions/Dirac/Basic.lean, and the redundant matrix-level γ family has been removed so that the Clifford algebra construction uses Fermion.Dirac.gamma directly.
If there are only minor cleanups or style/API adjustments remaining, please feel free to make them directly on the branch.
Move the Dirac representation equivalence into Fermion.Dirac.Basic as endEquivMatrix and remove the redundant Fin 4 matrix gamma family. Reuse the canonical gamma endomorphisms in the Clifford algebra construction, preserving the Dirac representation and surjectivity API. AI assistance: GPT-6 Astra. Co-authored-by: GPT-6 Astra <noreply@openai.com>
jstoobysmith
left a comment
There was a problem hiding this comment.
Approved. Many thanks @lizr-phys for this PR! Hopefully the first of many :).
Define Clifford multiplication on Dirac fermions in Lean 4 and derive the existing Dirac-representation matrices from the same operators. The canonical map is
Fermion.Dirac.gammaMatrix : Lorentz.Vector →ₗ[ℝ] Module.End ℂ Dirac. It satisfies the Clifford relation for arbitrary Lorentz vectors; its components, chirality operator, and complementary chiral projectors satisfy the corresponding identities.AI assistance: GPT-6 Astra. The human author is responsible for independently checking the definitions, statements, proofs, and the implementation of reviewer feedback before requesting re-review.
Conventions:
Lorentz.Vectoris real and contravariant. The chiral blocks ofgammaMatrix vare[0, v⁰I − vⁱσⁱ; v⁰I + vⁱσⁱ, 0]; raising the basis index givesgamma μ. ThusgammaMatrix v = v_μ γ^μ, with signature(+,-,-,-)andgamma5 = diag(-1,-1,1,1).Reviewer map: start with
endEquivMatrixinDirac/Basic.lean, then the vector action and its Clifford proof in sections A–B ofDirac/GammaMatrices.lean, followed by chirality and projectors in sections C–D. Finally, inspectCliffordAlgebra.lean, where the existing algebra construction now usesendEquivMatrix (gamma μ)directly. The quadratic form retainsFin 4coordinates;finSumFinEquivconnects these coordinates to the canonicalFin 1 ⊕ Fin 3indices.Declarations added in
Physlib/Relativity/Fermions/Dirac/Basic.lean, underFermion.Dirac:endEquivMatrixendEquivMatrix_applyDeclarations added in
Physlib/Relativity/Fermions/Dirac/GammaMatrices.lean, underFermion.Dirac:gammaMatrixgammaMatrix_toMatrix,gammaMatrix_basis_toMatrixgammaMatrix_basis_anticomm,gammaMatrix_anticomm,gammaMatrix_mul_selfgamma,gammaMatrix_basis,gammaMatrix_eq_sumgamma_toMatrixgamma_anticomm,gamma_mul_self,gamma_inl_zero_mul_self,gamma_inr_mul_self,gamma_mul_gamma_of_negamma5,gamma5_toMatrix,gamma5_mul_self,gamma5_mul_gamma,gamma5_mul_gammaMatrixleftChiralProjector,rightChiralProjectorleftChiralProjector_toMatrix,rightChiralProjector_toMatrixleftChiralProjector_mul_self,rightChiralProjector_mul_selfleftChiralProjector_mul_rightChiralProjector,rightChiralProjector_mul_leftChiralProjectorleftChiralProjector_add_rightChiralProjectorChanges in
Physlib/Relativity/CliffordAlgebra.lean:spaceTime.γ0,γ1,γ2,γ3are derived fromFermion.Dirac.gammathroughendEquivMatrix. Their entries and existing square/anticommutation statements are preserved. The proofs ofγ0_mul_γ0,γ1_mul_γ1,γ2_mul_γ2,γ3_mul_γ3,γ1_mul_γ0,γ2_mul_γ0,γ3_mul_γ0,γ2_mul_γ1,γ3_mul_γ1, andγ3_mul_γ2transport the operator identities.γ5_eq_endEquivMatrixidentifies the existing product definitionγ5with the canonical chirality endomorphism in the Dirac representation.spaceTime.γ : Fin 4 → Matrix (Fin 4) (Fin 4) ℂis removed. ThespaceTime.γnamespace is retained for the existing algebra API.spaceTime.γ.γSet,γ_in_γSet,γ_in_diracAlgebra, andγ_subtype_in_rangenow useendEquivMatrix (Fermion.Dirac.gamma μ)withμ : Fin 1 ⊕ Fin 3.diracAlgebraandγSet_subset_diracAlgebrakeep their construction.ofCliffordAlgebraandofCliffordAlgebra_ι_singleuse the canonical components throughfinSumFinEquiv. ThediracForm, range, and surjectivity API is preserved, includingofCliffordAlgebra_range_eq_topandofCliffordAlgebra_surjective.Migration from the preceding PR revision:
spaceTime.diracMatrixanddiracMatrix_applymove toFermion.Dirac.endEquivMatrixandendEquivMatrix_apply;γ5_eq_diracMatrixbecomesγ5_eq_endEquivMatrix;γ_eq_diracMatrixis removed with the redundant family.Physlib.leanimports the new gamma module, andDirac/API-map.yamlrecords the API.PR #1206 remains separate and overlaps
CliffordAlgebra.lean; its matrix-family references will require coordination. This PR does not add slash, Lorentz equivariance, or new Clifford-algebra functionality.Validation: targeted builds pass, and
lake --no-cache buildcompletes all 9,358 jobs. The 14 focused theorem linters pass forDirac.Basic,Dirac.GammaMatrices, andCliffordAlgebra; their axiom audit permits onlypropext,Classical.choice, andQuot.sound. Explicit matrix checks preserve the old Dirac-representation entries. Redundant-import checks for all three modules, the repository import-completeness check, API-map checks, focused source style, spelling, andgit diff --checkpass. The nativelint_alllauncher is blocked by missingccon Windows. The full shell style check reports CRLF line endings only in untouched files; it reports no errors in this revision's modified files.