GraviTrax workshop
Manage your pieces, draw and generate circuits, and prove in Lean that the marble arrives.
Each circuit is a theorem: the plan is valid, the stock has the pieces, and the marble that leaves the launcher always reaches a finish tile. You prove it with game tactics that follow the marble, cell by cell, and Lean shows the goals left after each line.
The Lean engine runs in the browser, compiled to WebAssembly, and a theorem guarantees its verdicts. It also draws the 2D plan and the 3D scene, with proved geometry. A generator proposes circuits from a sentence, and Lean checks every wish.
In Lean
These statements are read from the games' Lean code when the site is built: if one of them disappears or changes, the site does not build.
Gravitrax.Circuit (stock : Stock) (p : Plan) : PropGravitrax.Roule (p : Plan) : Gravitrax.Cell → PropGravitrax.Roule.sans_impasse {p : Plan} {c : Gravitrax.Cell} (h : Roule p c) {d : Gravitrax.Cell} :
Chemin p c d → p.exits d = [] → p.pieceAt d = some Piece.arriveeGravitrax.Arbre.valide_sound {s : Stock} {p : Plan} {n : Nat} {b : But} {t : Arbre}
(h : Arbre.valide s p n b t = true) : But.holds s p bGravitrax.Jeu.jouer_sound {s : Stock} {p : Plan} {script : String} {l : Lang}
(h : (Jeu.jouer s p script l).complet = true) : Circuit s pGravitrax.Dessin.cellAt_point (c : Gravitrax.Cell) : Dessin.cellAt c.point = c