EncounterActivity 1 of 9
Encounter
You have written proofs with tactics. Underneath, every tactic proof builds a term: a small program. This is the Curry–Howard correspondence:
- A proposition is a type.
P → Qis the type of functions from proofs ofPto proofs ofQ. - A proof is a value of that type.
fun hp => hpis a proof ofP → P. - Checking a proof is type checking: the kernel checks that the term has the type of the statement.
That is why Lean can be a programming language and a proof assistant at the same time.