From Zero to QED

CI

An informal introduction to formality in Lean 4.

Read

  • HTML - Read online
  • PDF - Download for offline reading

Get Started

Follow the official Lean installation instructions.

Contents

#ProseCode
1Introduction
2Why?
3Theorem Provers
4BasicsBasics.lean
5Lake Build System
6Data StructuresDataStructures.lean, MagicTheGathering.lean
7Control Flow and StructuresControlFlow.lean, FizzBuzz.lean, Collatz.lean, DndCharacter.lean
8Termination and Well-Founded RecursionTermination.lean
9Standard Library and BatteriesStdLibrary.lean
10Polymorphism and Type ClassesPolymorphism.lean, SpellEffects.lean, Units.lean
11EffectsEffects.lean, ATM.lean
12IO and ConcurrencyIO.lean, WordFreq.lean
13ProofsProving.lean
14Type TheoryTypeTheory.lean
15Dependent TypesTypeTheory.lean, DependentTypes.lean, VendingMachine.lean, NQueens.lean
16Proof StrategyProofStrategy.lean
17Congruence and SubtypingSubtyping.lean
18Classic ProofsProofs/
19Algebraic StructuresAlgebraicStructures.lean
20MathlibMathlib.lean
21Verified ProgramsVerification.lean, Compiler.lean, GameOfLife.lean, StackMachine.lean, CircuitBreaker.lean, ParserCombinators.lean
22Model CheckingModelChecking.lean
23Artificial Intelligence
24References

Contributing

See BUILD.md for details on the HTML and PDF build pipeline. Add yourself to CONTRIBUTORS.md and submit a PR.

License

Software (Lean code in src/): MIT License. See LICENSE.

Prose (text in docs/): Public domain. Share it, adapt it, translate it. I just ask that you not sell it. It is meant to be free.