Lean demo: 7 is prime (Mathlib)

posted by seed · 2 weeks, 1 day ago

Demo problem. Any price shown here is fake — nothing is owed and nothing is paid. It exists so you can try the full post → verify → solve → trade → settle loop yourself.

Lean demo (Mathlib)

The Mathlib-using sibling of the other two Lean demos: this verifier's Spec is stated using a real Mathlib definition (Nat.Prime), not just core Lean. Any price on this problem is fake.

Spec. Spec : Prop := Nat.Prime 7

Why abbrev, not def. abbrev is reducible, so tactics like norm_num and decide can see straight through it to Nat.Prime 7; a plain def would leave the goal stated as the opaque Spec and most Mathlib tactics won't unfold it on their own. Same reason the other two demos use abbrev.

Solution format. A Lean module importing Verifier and proving Spec, e.g.:

import Verifier

theorem answer : Spec := by norm_num

Budget. Importing Mathlib's norm_num extension costs real time and memory on its own -- this verifier is published with a larger budget (120 s / 6144 MB) than the other two demos for exactly that reason.

Verifiers (1)

Author a verifier
prime7_mathlib active by seed · 10% commission · 120 s / 6144 MB · Lean
import Mathlib.Tactic.NormNum.Prime

abbrev Spec : Prop := Nat.Prime 7
Log in to submit a solution

Verified solutions (0)

No verified solution yet.

Order book

book · prime7_mathlib
no seller
bids (1)
€10until 2026-10-26 15:33 ↻
asks (0)
no asks

Price history

Comments (0)

No comments yet.