AWM
← All games‹ lf52ls20 ›

lp85

Click arrows to move tile colours around until every socket holds the colour it wants.

8 levels · 6 rules · all levels replayed in Lean

What to notice: eleven concepts written during play merge into one rule, press_permutes, and its colour-conservation law proves that a recoloured level cannot be won.

Replay

The certified run that cleared every level, one action at a time. Beside each step: the rules of the model that explain it; they are also marked in the rule list below.

lp85, first frame of the certified run

Explained by

Press Play or step to load the run. Keys, while the player is on screen: ← → step, Space play / pause. A click is circled; cells that changed are outlined.

How it plays

Coloured ceramic tiles are laid on a grid, with several arrows around it and a few sockets, each marked with the colour it wants. Click one arrow, and the colours at a fixed set of positions are moved once as a whole: a run on a belt moves one cell, a star's ring or ray turns one cell, and swap buttons swap in pairs. Which cells are moved, and where to, is decided by the layout, regardless of the colours at the time; a click away from an arrow leaves the picture unchanged. When every socket is matched with the colour it wants, the level is cleared. Colours only change places, and the number of tiles of each colour never changes. The counter bar on the left records the number of arrow hits in this level; clicking on empty space does not count.

lp85, first frame of the certified run
Start
lp85, last frame of the certified run
After the winning move

Model

The final model: 6 object types and 6 rules. Each rule is a Python check against every recorded step; 4 of them are translated into Lean (the paper's per-game table). Code under a rule is the file of the same name in the agent's Lean project.

From shared structure to formal proofs in lp85: eleven concepts written during play become one shared rule, press_permutes; Lean proves the original level winnable and a recolored level unsolvable.
From shared structure to formal proofs in lp85: eleven concepts written during play become one shared rule, press_permutes; Lean proves the original level winnable and a recolored level unsolvable.

Object types

Rules

Code is shown with comments and the agent's notes removed; the files as written are in the archive under Check it yourself.

Proof

For every level, Lean starts from the level's first screen, applies the model's rules to the certified actions, and checks that every computed state agrees with the recorded frame on the components the model represents, and that the last one wins. Each theorem is closed by the Lean kernel and is a statement about the learned model.

Every level can be won

theorem L0_winnable : Winnable (L0_start : World) := …
theorem L1_winnable : Winnable (L1_start : World) := …
theorem L2_winnable : Winnable (L2_start : World) := …
theorem L3_winnable : Winnable (L3_start : World) := …
theorem L4_winnable : Winnable (L4_start : World) := …
theorem L5_winnable : Winnable (L5_start : World) := …
theorem L6_winnable : Winnable (L6_start : World) := …
theorem L7_winnable : Winnable (L7_start : World) := …
theorem missingNear_winnable : Winnable (missingNear : World) := …
theorem frozenNear_winnable : Winnable (frozenNear : World) := …

What cannot be won under the model

theorem unsolvable_missing (w : World) (sl : Slot) (hs : sl ∈ w.board.slots)
    (hwf : ∀ b ∈ w.board.buttons, b.wf w.colors.length) (h0 : w.colors.count sl.mark = 0) : Unsolvable w := …
theorem unsolvable_frozen (w : World) (sl : Slot) (hs : sl ∈ w.board.slots)
    (hf : Frozen w.board w.colors.length sl.cell) (hk : sl.cell < w.colors.length)
    (hne : w.colors[sl.cell]? ≠ some sl.mark) : Unsolvable w := …
theorem missingScene_unsolvable : Unsolvable (missingScene : World) := …
theorem frozenScene_unsolvable : Unsolvable (frozenScene : World) := …

Statements only; the proofs and the full Lean project are in the archive, with the steps to re-run them, under Check it yourself.

Check it yourself

Everything on this page comes from files you can download and check. The archive holds the agent's files: the recorded run, the concept book, the concept sources, the Lean project and the sealed model file, plus the record of our kernel check.

Download lp85.zip 0.3 MB · 48 files

Re-run the proof

Before you start: our run of this check took 210 s and 11.7 GB of memory at its peak (2026-10-24).

  1. Download lp85.zip and unpack it. The model and its theorems are in archive/lp85-20260907/formal/Game.lean. Before changing it, check that its SHA-256 is
    d87130ce3c1de9d137813d8fec0e4c075860a492a30b9cd1548db92985a04cc1
  2. Install Lean with elan, then the version named in the archive's lean-toolchain:
    elan toolchain install leanprover/lean4:v4.34.0
  3. Copy the model file to Check.lean and append these two lines to the copy:
    #print axioms consistent
    #print axioms faithful
  4. In the folder that holds Check.lean, run:
    lean +leanprover/lean4:v4.34.0 -M60000 Check.lean
  5. Lean should finish without errors and print:
    'consistent' depends on axioms: [propext]
    'faithful' depends on axioms: [propext]

What a pass establishes

consistent: for every recorded transition, as read by the agent's parser and with duplicates removed, every rule whose condition holds also has its effect hold. faithful: the certified run, recomputed step by step from the first screen of each level, matches the record and ends in a win. Axioms used: propext, all among Lean's standard ones.

What it does not establish: that the parser reads the screens correctly (that step runs in Python, outside Lean), or that a rule whose condition never occurs in the record is right. The Python file that produced the readings inside the model file is in the archive at meta/repair-20260928/lib/lp85-20260907/_lib.py.