How to use Mathground
Type code on the left and press Run (or ⌘/Ctrl + Enter). Your code runs in an isolated runner, and results appear on the right, usually within a minute.
Batch Execution Model: Each run executes the complete script in your editor from top to bottom in a clean, isolated cloud sandbox. All variables, functions, and theorems defined within your editor work together seamlessly. Because each run starts fresh, there is no lingering or hidden state from previous runs—so results do not depend on earlier runs (randomised searches and time limits can still change an outcome).
GAP: Like the GAP prompt, a statement ending in ; shows its value,
while ;; hides it. Print(…) works too. Load packages with LoadPackage("semigroups");. Runs stop after 120 seconds.
Choose LaTeX above the output to typeset GAP results automatically, plus any maths between $…$ or $$…$$.
Prover9 and Mace4: pick the tool next to the editor title. Both read the same input language
(formulas(assumptions). … end_of_list., then formulas(goals). … end_of_list.).
Prover9 searches for a proof; Mace4 searches for a finite model or counterexample
(use assign(domain_size, 6). to fix the size).
Lean 4 & Mathlib 4: Mathground no longer hosts Lean 4 or Mathlib 4 on our servers. You can draft and study Lean 4 snippets in the editor, then run and verify them on the Official Lean Web Playground ↗, or execute them locally with elan and lake.