← Back to Lean 4: Proofs a Computer Can Check

Module: Propositions as Types

Practice Test: Propositions as Types

See how a proof is just a value, and prove and, or, for all and exists statements.

9 questions. 15 minutes. You need at least 7 right to pass. This test is optional. It does not mark any lesson complete and it does not count towards your certificate.

Time left: 15:00

1. What is the type of 2 + 2 = 5?

2. What does example do?

3. What does a sorry in a file mean?

4. Which term proves p ∧ q from hp : p and hq : q?

5. How do you use a hypothesis h : p ∨ q?

6. What is a proof of p → q?

7. In Lean, what is a proof of ∀ n : Nat, n + 0 = n?

8. How do you prove ∃ n : Nat, n + n = 10 directly?

9. Why does example : 2 + 2 = 5 := rfl fail?