Each problem set has three parts:

  • A page here. It states each problem in words and gives an optional hint. A collapsed solution sits under each problem; open it only after you have tried.
  • A Lean file with sorrys, in lean/LeanFV/Homework/. You replace each sorry with a proof. The file builds as you work, with a warning on every sorry that is still open.
  • A sorry-free solution file in lean/LeanFV/Solutions/. The site build compiles it, so every solution shown here is known to check.
#Problem setAfterYou practise
1Homework 1: TacticsLecture 3, Lecture 4propositional logic, quantifiers and a first induction, with tactics
2Homework 2: FormalizationLecture 5finding misformalized statements and junk values, and writing a faithful statement
3Homework 3: Quantum informationLecture 7Pauli identities, normalisation, and a lemma on the way to no-cloning
4Homework 4: Semantics and compilersLecture 9extending a language and its compiler, then re-proving the compiler correct
5Homework 5: MetaprogrammingLecture 11writing a macro, a small tactic and simp lemmas
6Homework 6: Capstone proposalLecture 14planning a formalization of your own, with a blueprint
7Homework 7: Theoretical computer scienceLecture 15codes and their bounds, RSA, the cost of sorting, and a reduction

How to work on a problem set

Open the lean/ folder (not the course root) in VS Code with the Lean 4 extension, then open LeanFV/Homework/HW01.lean. Put the cursor inside a proof: the infoview shows the goal. When the file has no sorry warnings left, you are done. Then compare with the solution on the page. Many proofs are correct, and yours need not match.

You can also work in a notebook cell. Start the notebook with leanmagic.setup("import LeanFV.Homework.HW01"), then copy a statement into a %%lean cell.