EncounterActivity 1 of 8
Encounter
A lift controller, a bank transfer, a sorting routine: we want them to be right, not just right on the inputs we happened to try.
- A test runs the program on one input and compares the answer:
maxOf 3 7 = 7. - A specification says what must hold for every input: "the result is at least both arguments, and is one of them".
- A proof shows the implementation meets the specification, for all inputs at once.
In Lean all three live in the same file, and the kernel checks the proof.