About
## The problem it solves
Tactile is a puzzle game where writing a correct Lean 4 proof is the same as solving the puzzle. You get a grid of coloured blocks and a target picture. Each line of your proof is one move: swap, paint or rotate a block.
Beginners find Lean hard because they can't see what a proof line actually does. In Tactile, real Lean checks your proof and then the board plays your moves one line at a time, so you see each step happen.
People can use it to learn Lean and proof-writing by playing, and to learn how to build reusable helpers (macros) from small steps. Teachers can use it in class, since it runs in the browser with no setup.
It makes learning easier because an illegal move turns that block red and stops the proof at that line. A typo gives a separate "invalid command" message. A level is cleared only when Lean accepts the proof and the board matches the target.
It is also safe. Lean is the only judge, so a finished proof is always a list of legal moves. Only our own commands are allowed, and each proof runs in its own Docker container with no network and strict memory and time limits.
## Challenges we ran into
Working on this project was a learning experience for us. Functional Programming was a new thing for us, and we faced several issues while building this.
We wanted the proof to stop at the first bad line, but Lean keeps checking after an error. A single typo could produce an error plus a misleading "illegal move" message on the same line, and the UI could blame the wrong thing.
To fix this, we made our own failures identifiable. The tactics fail with fixed markers (`tactile:illegal`, `tactile:mismatch`) at the point of failure. `verdict.ts` then looks only at the earliest line with an error.
We designed 30+ fixture proofs, each run through real Lean with its expected verdict.
Next, we were concerned about running untrusted proofs safely. Players can type arbitrary text that ends up in a Lean file, and Lean can run code (`#eval`) or cheat with `sorry` or extra axioms. To fix this, we implemented several layers. We started with a parser that allows only our moves, helpers and comments, so dangerous commands never reach Lean. And then the Lean file is printed from parsed data, and even helper names become generated keywords.
Screenshots
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.











