GAP Playground

Write GAP code, Prover9 / Mace4 input, or Lean 4 + Mathlib proofs, run them on a fresh GitHub Actions machine, and read results here.

How to use this playground

Type code on the left and press Run (or Ctrl/⌘ + Enter). Your code runs on a fresh GitHub machine, and the result appears on the right, usually within a minute.

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 (permutations, matrices, fractions, powers, groups) automatically, plus any maths written 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: pick Lean 4 next to the editor title. Import modules like import Mathlib.Algebra.Group.Basic or import Mathlib.Tactic. Use tactics such as linarith, ring, rw, and induction, or run evaluations with #eval and #check. If your proof has no errors, the output confirms all goals are accomplished.

💡 First time here or collaborating with PY? (GitHub setup for mathematicians)

Calculations run in the cloud on GitHub Actions runners. To run code, you need a free GitHub account and a Personal Access Token (PAT). If PY invited you as a collaborator on fraubentz/gap-online, you can run directly on that repository using your own token! Alternatively, click Fork on GitHub to run on your own free account. Expand Connection settings below for the 60-second step-by-step guide.

Connection settings

Use a fine-grained token limited to this repository with Contents: read & write (dispatches runs), Actions: read (downloads outputs) and Checks: read (backup output channel).

📘 Step-by-Step for Mathematicians: How to get your own token in 1 minute

Why a token? Computations run on GitHub's cloud runners. GitHub uses tokens to know who is requesting the computation so you can run jobs securely.

Option A — Running on PY's repository (fraubentz/gap-online):
If PY has invited you as a collaborator on GitHub (Settings → Collaborators), accept the invite email. Then generate a token selecting fraubentz/gap-online and enter that repository name above.
Option B — Running independently on your own account (No invite needed):
Click Fork on GitHub to copy this repository to your account. Then generate a token selecting your fork, and enter your-username/gap-online above. GitHub gives you 2,000 free runner minutes per month!
Generating your token in 5 easy clicks:
  1. Sign in to GitHub and open the Fine-grained tokens page.
  2. Click Generate new token. Set a token name (e.g. GAP Playground) and an expiration date.
  3. Under Repository access, select Only select repositories and pick fraubentz/gap-online (or your fork).
  4. Under Permissions → Repository permissions, set:
    • Contents: Access: Read and write (sends computation requests)
    • Actions: Access: Read-only (downloads run results)
    • Checks: Access: Read-only (backup output channel)
  5. Click Generate token at the bottom. Copy the token (starts with github_pat_...).
  6. Paste the repository name above (e.g. fraubentz/gap-online) and your token, then click Save settings. You're ready to compute!

🔒 Complete Privacy Guarantee: Your token is stored only in your own browser's local storage (localStorage) and sent directly to api.github.com. It is never transmitted to any third party, database, or server, and nobody else can ever see it.

GAP code

Output

Ready. Press Run or Ctrl/⌘ + Enter.
Output appears here.