Skip to content
LeanLearn
Level 3~30 minLean 4

Cube Quest 1 · Specify: what is a cube?

Before any Lean, say precisely what the puzzle is: its pieces, its moves, and what 'solved' means. A weak specification lets a wrong cube pass.

You will be able to
  • Describe the cube as 8 corners, 12 edges and 6 centres, each with a slot and an orientation.
  • Compare candidate specifications of 'solved' and find a counterexample to a weak one.
  • Recognise a state that looks almost solved but can never be reached.

Recommended first: Mathematical induction: proving infinitely many cases, Specifications: programs you can trust. You can start anyway. Nothing is locked.

EncounterActivity 1 of 7

Encounter

Welcome to Cube Quest. The 3×3×3 cube is the game board and Lean is how you play. Over the next worlds you will do with your own hands what formal methods do with any system:

specify → formalize → mechanize → compute → solve → prove.

The cube is a good teacher because it is small enough to hold and huge inside: it has 43 252 003 274 489 856 000≈4.33×101943\,252\,003\,274\,489\,856\,000 \approx 4.33 \times 10^{19} reachable positions. No one checks them one by one. People solve it with algorithms (human intuition), mathematicians explain why those work with group theory (the algebraic engine), and computers search it with solvers (machine brute force). Lean connects all three.

In this first world there is no Lean yet. You will decide what the cube is.