8000 GitHub - 007vasy/PhysLean: A project to digitalise results from physics into Lean.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

007vasy/PhysLean

 
 

Repository files navigation

PhysLean A project to digitalize physics.

  • Gitpod Ready-to-Code

Aims of this project

🎯 Digitalize results (meaning calculations, definitions, and theorems) from physics into Lean 4.

🎯 Develop structures to aid the creation of new results in physics using Lean, with the potential future use of AI.

🎯 Create good documentation so that the project can be used for pedagogical purposes.

How to get involved

See the Get Involved for more details. Some suggestions:

📣 write informal results - no need to learn Lean for this - see the Getting Started page for more details,

📣 tackle a TODO item,

📣 or, start formalizing an area that you find intresting.

Feel free to come to the PhysLean zulip to ask questions and advice.

Some parts of PhysLean

PhysLean currently includes, but is not limited to, the following parts:

Lorentz 🗂️: The Lorentz group, Lorentz algebra, Weyl fermions, Real Lorentz vectors, complex Lorentz vectors, complex Lorentz tensors, bispinors, Pauli matrices, etc.

Index notation 🗂️ 📄: Formalization of index notation using category theory allowing commands like

{A | μ ν ⊗ S | μ ν = - A | μ ν ⊗ S | μ ν}ᵀ

Anomaly cancellation 🗂️: Results related to solutions to the anomaly cancellation conditions of several theories.

Standard Model physics 🗂️: Properties of the Higgs potential.

BSM physics 🗂️: Starts to: Georgi Glashow model, Pati-Salam, Spin(10), Two Higgs doublet model.

Flavor physics 🗂️: Properties of the CKM matrix.

Perturbation Theory 🗂️: Time-dependent version of Wick's theorem for both fermions and bosons.

Associated media and publications

  • 📄 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]
  • 📄 Joseph Tooby-Smith, Formalization of physics index notation in Lean 4, arXiv:2411.07667
  • 📄 Joseph Tooby-Smith, Digitalizing Wick's Theorem, arXiv:2505.07939
  • 🎥 Lean Together 2025: Joseph Tooby-Smith, Physics and Lean
  • 🎥 Seminar recording of "HepLean: Lean and high energy physics" by J. Tooby-Smith

Papers referencing PhysLean

  • Hu, Jiewen, Thomas Zhu, and Sean Welleck. "miniCTX: Neural Theorem Proving with (Long-) Contexts." arXiv preprint arXiv:2408.03350 (2024). Project page

How PhysLean (then called 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.

Contributing

We would love to have you involved! See the Get Involved page to see how you can get involved. Any contributions are welcome! If you have any questions or want permission permission to create a pull-request for this repository contact Joseph Tooby-Smith on the Lean Zulip, or email.

Installation

If you want to play around with PhysLean, but do not want to download Lean, then you can use GitPod.

Installing Lean 4

Installation instructions for Lean 4 can be found:

or

Installing PhysLean

  • Clone this repository (or download the repository as a Zip file)
  • 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).

Optional extras

  • Lean Copilot and LLMLean allow for the use of large language models in Lean
  • 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.

About

A project to digitalise results from physics into Lean.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lean 99.3%
  • Other 0.7%
0