Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@

I would be interested in having volunteers "playtest" the companion (using downstream forks of the repository) to see if this can actually be done (and if the helper lemmas or "API" provided in the Lean files are sufficient to fill in the sorries in a conceptually straightforward manner without having to rely on more esoteric Lean programming techniques). Any other feedback will of course also be welcome. However, I do not intend to place solutions in this repository directly.

# Adding a section
## Building

```bash
lake exe cache get # Fetch Mathlib prebuilt cache (run once)
lake build # Build and verify all proofs
```

The Lean toolchain version is pinned in `lean-toolchain`. Mathlib is pinned in `lakefile.lean`.

## Style conventions

- **Faithfulness over golfing.** Proofs should closely parallel the textbook argument, even if a shorter proof exists. Do not golf or "clean up" existing proofs — this has led to reverts (e.g., [#476]).
- **Textbook definitions first.** Early chapters (especially Ch. 2) use custom definitions, not Mathlib. Later chapters transition to Mathlib. Respect whichever convention the section uses.
- **Verso docstrings.** The project uses `doc.verso = true` for literate documentation. Docstrings use Verso format, not standard Lean doc comments.
- **Line length.** Follow Mathlib convention: 100 characters max.
- **Sorry warnings.** The project suppresses sorry warnings (`-Dwarn.sorry=false` in `lakefile.lean`) by design.

[#476]: https://github.com/teorth/analysis/pull/476

## Adding a section

1. Add the relevant file to `Analysis/`
2. Adapt the line in the README