Ways to Contribute
Learn
Documentation Guide
Use this guide to add module documentation to a Lean file in Physlib.
Steps to Help with Documentation
This whole process can be done without downloading Lean, but having it installed provides helpful tools.
Phase 1: Get the Code
- Fork the Physlib GitHub repository (copy the master branch only). The GitHub Guide has the commands.
- Clone your forked repository to your local machine. (Optional — you can also edit directly on GitHub.)
Phase 2: Choose a File to Document
- Choose a file from the Documentation task list, or select a red node in the import graph.
- In your local copy of Physlib, open the file
./scripts/lint/exemptions/module_doc_no_lint.txt. - Remove the line corresponding to the file you want to document.
- Navigate to the file you want to document.
Phase 3: Write the Documentation
- Add a title heading at the top of the file, starting with
#. - Add a
## i. Overviewsection explaining the physical content. - Add a
## ii. Key resultssection listing key definitions, theorems, and lemmas. - Add a
## iii. Table of contentssection listing the lettered sections of the file, as- A. …. - Add a
## iv. Referencessection for relevant literature. - Organize the rest of the file with lettered section and subsection headings:
## A. …,### A.1. …. No heading may end in a full stop. - If you have Lean installed, check the layout with
lake exe module_doc_lint.
Phase 4: Submit Your Changes
- Commit your changes to your forked repository.
- Create a pull request to the main Physlib repository for review, as described in the GitHub Guide.
Import graph
See which Lean files import each other. An arrow from A to B means B imports A.
Loading graph…