← API maps
Create an API map
Start the API map for an area of Physlib that doesn't have one, or for physics that Physlib doesn't cover yet.
How to write an API map
An API map is a short article about one area of physics in Physlib. It explains the physics in words, and points from each statement to the Lean declarations that formalize it.
- One file per API. It is called
API-map.mdand sits in the top folder of the API it describes. - Fixed headings. A
# Title, then## Abstract (Alpha)(one paragraph, no citations),## Content (Alpha)(prose, split by###subsections),## Lean Referencesand## References. - Content first. State the physics as you would to a colleague who does not know the Lean names. End each claim with a Lean citation such as
[1], one number per bracket. If it is not formalized yet, write[TODO], so the map doubles as a roadmap. - Lean references. Number them from 1 and cite each one. An entry is the file and its declarations, e.g.
1. Physlib/SpaceAndTime/Time/Basic.lean — `Time`, `Time.val`. - Literature and other API maps go under References and are cited with curly brackets,
{1}. Don't put links in the text itself. - New maps start as Alpha. They become reviewed maps after Physlib's full review.
Read the full guide or see an example. Before opening a pull request, check the file with lake exe api_map_lint.
1. Where will it live?
- Physlib/ClassicalFieldTheory/GaugeTheoryhas a map →
- Physlib/ClassicalMechanics/ConfigurationSpacehas a map →
- Physlib/ClassicalMechanics/DampedHarmonicOscillatorhas a map →
- Physlib/ClassicalMechanics/HarmonicOscillator/Geometrichas a map →
- Physlib/ClassicalMechanics/Lagrangianhas a map →
- Physlib/ClassicalMechanics/Pendulumhas a map →
- Physlib/ClassicalMechanics/Pendulum/SimplePendulumhas a map →
- Physlib/ClassicalMechanics/RigidBodyhas a map →
- Physlib/Cosmology/FLRWhas a map →
- Physlib/Electromagnetism/Kinematicshas a map →
- Physlib/FluidDynamicshas a map →
- Physlib/LatticeQFThas a map →
- Physlib/Particles/BeyondTheStandardModel/TwoHDMhas a map →
- Physlib/Particles/StandardModelhas a map →
- Physlib/Particles/StandardModel/HiggsBosonhas a map →
- Physlib/QFT/PerturbationTheory/FeynmanDiagramshas a map →
- Physlib/QuantumMechanics/HilbertSpaces/SpaceDhas a map →
- Physlib/QuantumMechanics/HilbertSpaces/TensorProductshas a map →
- Physlib/QuantumMechanics/Operatorshas a map →
- Physlib/QuantumMechanics/Operators/SpectralTheoryhas a map →
- Physlib/QuantumMechanics/QuantumSystemhas a map →
- Physlib/Relativity/Fermions/Dirachas a map →
- Physlib/Relativity/Fermions/Weylhas a map →
- Physlib/Relativity/LorentzGrouphas a map →
- Physlib/Relativity/Tensorshas a map →
- Physlib/SpaceAndTime/GalileanGrouphas a map →
- Physlib/SpaceAndTime/Spacehas a map →
Choose a folder for the API map.
2. Write it
The text box starts with a skeleton map: replace the placeholder text and keep the headings. Preview shows the page as readers will see it.
Cite
Submitting opens GitHub in a new tab with an issue on leanprover-community/physlib filled in; you press Create. You must be signed in to a GitHub account. If the suggestion is accepted, you'll be credited as a co-author.
Comfortable with Git? Create the file on GitHub to open a pull request directly (choose a folder first).
