Copy it
This is an experimental project, offered to the Lean community as a proposal: the game, the tools, the maps, the notes and this site. Nothing is released yet. We intend code under the Apache License 2.0 and text, pictures and maps under CC BY 4.0, so that anyone could change it, design their own worlds or run the whole system without us, but we want to settle the terms with the community first. Until then, read it and try it on your own computer, and please ask before reusing anything.
The source is in a public repository: https://github.com/GroovyGou/MathRPG
Three layers, no server of ours
| Layer | What it is | What we hold |
|---|---|---|
| This site | static files: the game, the maps, the notes, the manifesto | nothing (the host keeps access logs; see Privacy) |
| Local kit | the repository on your own computer: Lean, Mathlib, the rank tools, the game and its check server | nothing |
| Cloud kit | a script for very large builds on a machine you rent yourself | nothing: your account, your keys, your bill |
On your own computer
Most measurements fit an ordinary computer (a few GB of disk for Mathlib's compiled files).
- Get the repository:
git cloneit from the address above. - Install Lean with elan, Lean's version manager. Download the release file for your system from elan's releases page, check its SHA-256, and run
elan-init. We do not recommend piping a script from the internet into your shell. The repository'slean-toolchainfile names the Lean version, and elan fetches it. - Get Mathlib: in the repository, run
lake exe cache get(Mathlib's compiled files from its cache), thenlake build. - Play locally: run
python3 tools/serve.py(on Windowspy -3 tools/serve.py) and open the address it prints. A local copy keeps your saves in your own browser. - Measure:
MathRank.leanand its siblings hold the commands#math_rank,#place_edgesand#place_modules; each file's header says how to run it. The Python tools inworld/turn their output into worlds, maps and raid boards; each has tests (python3 -m unittest). - Check proofs from the game: the workbench's Check button talks to a small check server (
server/, API indocs/specs/play-api-1.md). It runs Lean jobs as a separate user without network, with time and memory limits, on Linux or in WSL on Windows. - Build this site:
python3 tools/demo_site.py build --out ../mathrpg-site. A new result is a new folder undersite/notes/(itsdata.jsonandnote.md);python3 tools/notes.py checkchecks it.
In the cloud, on your own account
Some formalisations are too large for a normal computer. The Riemann hypothesis formalisation, for example, needed about 18 GB of memory just to load (build note). For builds like that:
- Open your own account with a cloud provider that rents Linux machines by the hour, for example RunPod or Scaleway, and start the machine yourself. We are not affiliated with any provider, we do not resell their services, and we never see your account, your keys or your payments.
- Run the script from the repository on that machine. It installs Lean from elan's release file, fetches the project from its own repository at the pinned commit (we redistribute none of its files), builds it, and runs the same rank commands. The build note lists the exact commands.
- Estimate first, watch the meter, stop the machine when done. Your provider bills you directly, by its own prices. Any estimate we give is only an estimate.
The full step-by-step guides for both kits are being written and will be in the repository's docs/ folder.
Change it, and tell us
If you find an error in a measurement, a text or a map, or if you lower a rank record with a new route, please tell us through the repository. Corrections are welcome.