PhysLean/README.md

95 lines
6 KiB
Markdown
Raw Normal View History

2024-04-16 16:23:49 -04:00
2025-02-14 09:10:09 +00:00
![PhysLean](./docs/PhysLeanLogo.jpeg)
2025-03-03 07:06:57 +00:00
[![](https://img.shields.io/badge/Read_The-Docs-green)](heplean.com)
[![](https://img.shields.io/badge/Get-Involved-green)](heplean.com/GetInvolved.html)
2024-05-20 08:13:59 -04:00
[![](https://img.shields.io/badge/Lean-Zulip-green)](https://leanprover.zulipchat.com)
2025-03-03 07:06:57 +00:00
[![](https://img.shields.io/badge/TODO-List-green)](heplean.com/TODOList)
[![](https://img.shields.io/badge/Informal_dependencies-Graph-green)](heplean.com/InformalGraph)
2024-11-12 07:28:06 +00:00
2025-03-03 07:06:57 +00:00
[![](https://img.shields.io/badge/View_The-Stats-blue)](heplean.com/Stats)
2025-02-13 08:31:19 +00:00
[![](https://img.shields.io/badge/Lean-v4.16.0-blue)](https://github.com/leanprover/lean4/releases/tag/v4.16.0)
2024-10-31 05:58:17 +00:00
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/HEPLean/HepLean)
2024-10-31 05:59:01 +00:00
2025-02-14 08:46:46 +00:00
A project to digitalize physics.
2024-05-02 15:25:35 -04:00
2025-02-14 08:46:46 +00:00
*(Formally called HepLean)*
2024-04-21 16:58:14 -04:00
## Aims of this project
2024-04-17 06:38:25 -04:00
2025-02-14 08:46:46 +00:00
🎯 __Digitalize__ results (meaning calculations, definitions, and theorems) from physics
2024-08-20 10:12:19 -04:00
into Lean 4.
2024-11-11 05:37:29 +00:00
2025-02-14 08:46:46 +00:00
🎯 Develop structures to aid the __creation__ of new results in physics using Lean,
2024-08-20 10:12:19 -04:00
with the potential future use of AI.
2024-11-11 05:37:29 +00:00
🎯 Create good documentation so that the project can be used for __pedagogical__ purposes.
2024-08-20 10:12:19 -04:00
2024-04-16 16:23:49 -04:00
2025-02-14 08:46:46 +00:00
## Some parts of PhysLean
PhysLean _currently_ includes, but is not limited to, the following parts:
2024-11-10 15:53:02 +00:00
2024-11-10 19:04:59 +00:00
__Lorentz [🗂️](https://heplean.github.io/HepLean/docs/HepLean/Lorentz/Group/Basic.html):__ The Lorentz group, Lorentz algebra, Weyl fermions, Real Lorentz vectors, complex Lorentz vectors, complex Lorentz tensors, bispinors, Pauli matrices, etc.
2024-11-10 15:53:02 +00:00
2024-11-13 07:13:38 +00:00
__Index notation [🗂️](https://heplean.github.io/HepLean/docs/HepLean/Tensors/OverColor/Basic.html) [📄](https://arxiv.org/abs/2411.07667):__ Formalization of index notation using category theory allowing commands like
2024-11-10 15:53:02 +00:00
```Lean
{A | μ ν ⊗ S | μ ν = - A | μ ν ⊗ S | μ ν}ᵀ
```
2024-11-13 07:13:38 +00:00
__Anomaly cancellation [🗂️](https://heplean.github.io/HepLean/docs/HepLean/AnomalyCancellation/Basic.html):__ Results related to solutions to the anomaly cancellation conditions of several theories.
2024-06-13 11:13:32 -04:00
2024-11-10 19:04:59 +00:00
__Standard Model physics [🗂️](https://heplean.github.io/HepLean/docs/HepLean/StandardModel/Basic.html):__ Properties of the Higgs potential.
__BSM physics [🗂️](https://heplean.github.io/HepLean/docs/HepLean/BeyondTheStandardModel/TwoHDM/Basic.html):__ Starts to: Georgi Glashow model, Pati-Salam, Spin(10), Two Higgs doublet model.
__Flavor physics [🗂️](https://heplean.github.io/HepLean/docs/HepLean/FlavorPhysics/CKMMatrix/Basic.html):__ Properties of the CKM matrix.
2024-07-26 16:32:54 -04:00
2025-02-03 12:12:36 +00:00
__Perturbation Theory [🗂️](https://heplean.github.io/HepLean/docs/HepLean/PerturbationTheory/FieldOpAlgebra/WicksTheorem.html):__ Time-dependent version of Wick's theorem for both fermions and bosons.
2024-12-03 13:50:12 +00:00
2024-08-20 10:12:19 -04:00
## Associated media and publications
2024-12-03 13:55:48 +00:00
- [📄](https://arxiv.org/abs/2405.08863) Joseph Tooby-Smith,
__HepLean: Digitalising high energy physics__, Computer Physics Communications, Volume 308,
2025, 109457, ISSN 0010-4655, https://doi.org/10.1016/j.cpc.2024.109457. \[arXiv:2405.08863\]
2024-11-13 07:13:38 +00:00
- [📄](https://arxiv.org/abs/2411.07667) Joseph Tooby-Smith, __Formalization of physics index notation in Lean 4__, arXiv:2411.07667
2024-11-11 05:37:29 +00:00
- [💻](https://live.lean-lang.org/#code=import%20Mathlib.Tactic.Polyrith%20%0A%0Atheorem%20threeFamily%20(a%20b%20c%20%3A%20)%20(h%20%3A%20a%20%2B%20b%20%2B%20c%20%3D%200)%20(h3%20%3A%20a%20%5E%203%20%2B%20b%20%5E%203%20%2B%20c%20%5E%203%20%3D%200)%20%3A%20%0A%20%20%20%20a%20%3D%200%20%20b%20%3D%200%20%20c%20%3D%200%20%20%3A%3D%20by%20%0A%20%20have%20h1%20%3A%20c%20%3D%20-%20(a%20%2B%20b)%20%3A%3D%20by%20%0A%20%20%20%20linear_combination%20h%20%0A%20%20have%20h4%20%3A%20%203%20*%20a%20*%20b%20*%20c%20%3D%200%20%3A%3D%20by%20%0A%20%20%20%20rw%20%5B←%20h3%2C%20h1%5D%0A%20%20%20%20ring%20%0A%20%20simp%20at%20h4%20%0A%20%20exact%20or_assoc.mp%20h4%0A%20%20%0A) Example code snippet related to Anomaly cancellation conditions.
- [🎥](https://www.youtube.com/watch?v=W2cObnopqas) Seminar recording of "HepLean: Lean and high energy physics" by J. Tooby-Smith
2024-04-22 09:56:51 -04:00
2025-02-14 08:46:46 +00:00
### Papers referencing PhysLean
2024-10-16 11:15:23 +00:00
- Hu, Jiewen, Thomas Zhu, and Sean Welleck. "miniCTX: Neural Theorem Proving with (Long-) Contexts." arXiv preprint [arXiv:2408.03350](https://www.arxiv.org/abs/2408.03350) (2024). [Project page]( https://cmu-l3.github.io/minictx/)
2024-10-16 11:17:31 +00:00
How HepLean was used: *Theorems from the space-time files of HepLean were included in a data set used to evaluate the ability of models to prove theorems from real-world repositories, which requires working with definitions, theorems, and other context not seen in training.*
2024-10-16 11:15:23 +00:00
2024-07-26 16:32:54 -04:00
## Contributing
2024-04-16 16:23:49 -04:00
2024-07-26 16:32:54 -04:00
We follow here roughly the same contribution policies as MathLib4 (which can be found [here](https://leanprover-community.github.io/contribute/index.html)).
2024-04-22 10:32:02 -04:00
2024-05-16 10:21:49 -04:00
A guide to contributing can be found [here](https://github.com/HEPLean/HepLean/blob/master/CONTRIBUTING.md).
2024-11-11 05:37:29 +00:00
If you want permission to create a pull-request for this repository contact Joseph Tooby-Smith on the [Lean Zulip](https://leanprover.zulipchat.com), or email.
2024-04-16 16:23:49 -04:00
## Installation
2025-01-13 22:52:18 +01:00
If you want to play around with HepLean, but do not want to download Lean, then you can use [GitPod](https://gitpod.io/#https://github.com/HEPLean/HepLean).
2024-11-11 05:37:29 +00:00
2024-07-26 16:32:54 -04:00
### Installing Lean 4
2024-04-16 16:23:49 -04:00
2024-11-13 07:13:38 +00:00
Installation instructions for Lean 4 can be found:
2024-11-11 05:37:29 +00:00
- https://lean-lang.org/lean4/doc/quickstart.html
2024-11-13 07:13:38 +00:00
or
2024-11-11 05:37:29 +00:00
- https://leanprover-community.github.io/get_started.html
2024-04-16 16:23:49 -04:00
2025-02-14 08:46:46 +00:00
### Installing PhysLean
2024-04-16 16:23:49 -04:00
2024-07-26 16:32:54 -04:00
- Clone this repository (or download the repository as a Zip file)
2024-05-16 10:42:58 -04:00
- Open a terminal at the top-level in the corresponding directory.
- Run `lake exe cache get`. The command `lake` should have been installed when you installed Lean.
- Run `lake build`.
- Open the directory (not a single file) in Visual Studio Code (or another Lean compatible code editor).
2024-05-21 08:18:09 -04:00
2024-06-13 08:19:50 -04:00
### Optional extras
2024-05-21 08:18:09 -04:00
2024-10-16 11:15:23 +00:00
- [Lean Copilot](https://github.com/lean-dojo/LeanCopilot) and [LLMLean](https://github.com/cmu-l3/llmlean) allow for the use of large language models in Lean
2024-07-26 16:32:54 -04:00
- [tryAtEachStep](https://github.com/dwrensha/tryAtEachStep) allows one to apply a tactic, e.g. `exact?` at each step of a lemma in a file to see if it completes the goal. This is useful for golfing proofs.