Skip to content
The Lumenary

Practice · Grades 9–12

First steps in Lean

First steps in Lean

Warm-upFormal

Let n : ℕ be a variable. Which of these goals can be closed by rfl alone? (Choose all that apply.)

Choose all that apply

First steps in Lean

Warm-upFormal

A classmate's Lean file compiles with the warning "declaration uses sorry". What can you conclude?

Choose one

First steps in Lean

Warm-upFormal

In Lean, what is the value of (7 : ℕ) - 10?

First steps in Lean

Warm-upFormal

In Lean, what is the value of (17 : ℕ) / 5?

First steps in Lean

CoreFormal

You are proving theorem t (p q : Prop) : p → (q → p) := by and you type intro hp. What does the goal state look like now?

Choose one

First steps in Lean

CoreFormal

Which term is a proof of p ∧ q → q ∧ p?

Choose one

First steps in Lean

CoreFormal

The theorem no_nat_sqrt_two : ¬ ∃ q : ℕ, q * q = 2 is proved in Lean without sorry. Does it show that 2\sqrt 2 is irrational?

Choose one

First steps in Lean

CoreFormal

Mathlib contains theorem Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p. Which reading is correct?

Choose one

First steps in Lean

StretchFormal

In the induction proof of 0 + n = n, the inductive step has hypothesis ih : 0 + k = k and goal ⊢ 0 + (k + 1) = k + 1. Which tactic line closes the goal?

Choose one

First steps in Lean

CoreComputational

Truth tables decide propositional tautologies by brute force. Write is_tautology(formula, n), where formula is a Python function of n Booleans, returning True exactly when it is true for all 2n2^n assignments. (In Python, p <= q on Booleans means p→qp \to q.)

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.