Skip to content

Add eink0rn, a clean-room Lean 4 kernel in Haskell - #177

Merged
nomeata merged 4 commits into
leanprover:masterfrom
Timeroot:eink0rn
Aug 30, 2026
Merged

Add eink0rn, a clean-room Lean 4 kernel in Haskell#177
nomeata merged 4 commits into
leanprover:masterfrom
Timeroot:eink0rn

Conversation

@Timeroot

@Timeroot Timeroot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Adds checkers/eink0rn.yaml as a kernel implementation written in Haskell. It was
generated mostly by Claude, with direction to do as much of a clean-room implementation
as possible, referring only to ndjson spec+tests, and Carneiro's thesis.

Notes for the runner

The build is one ghc --make: eink0rn depends on the GHC boot libraries and
nothing else, so there is no package index to fetch and nothing to resolve.
tools/arena-build.sh tries every GHC it can find and installs 9.6.6 with ghcup
if none of them can build it.

Run "naturally" the build uses more than the allotted 16GB on runner --
its multithreading is somewhat aggressive, and it caches a lot. This build script
deliberately caps the memory, and is set to eight threads.

Happy to adjust the entry - flags, timeout, description - to whatever
suits the arena.

eink0rn normalises the surface language away before checking anything:
nested inductives are compiled to mutual blocks, every mutual block is
flattened to a single indexed family, and recursors are rederived from
the inductive specification rather than believed.  No Lean kernel source
of any kind was read; the references were Carneiro's thesis, the NDJSON
format spec, and this arena's verdicts.

Accepts all four exports and declines nothing, in 19s / 35s / 2m17s /
14m53s at a 12.85 GB peak on mathlib.  Runs with --enforce-mutual-univ
so that it is scored on the same language as every other checker.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nomeata

nomeata commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Interesting contribution!

As for running this, can you add ghc to the flake setup so that system dependencies are documented there?

Timeroot and others added 3 commits August 30, 2026 15:05
eink0rn is one `ghc --make` over the GHC boot libraries -- no cabal, no
package index -- so the compiler alone is the whole system dependency.
Without it the checker's build script installs 9.6.6 with ghcup, which
works but documents nothing and costs 2m 55s and 2.6 GB of the build.

nixos-26.05's ghc is newer than the 9.6.6 eink0rn is developed against;
it was built and tested on 9.10.3 as well, which passes both of its test
suites and accepts `std` in the same time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The preamble still read as instructions for producing this file rather
than as a note on the file itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
It was 531 words where the next longest entry is 148.  What is left is
what distinguishes the checker; the resource argument it dropped is
already spelled out in the comments around the run line, and the rest
belongs in the repository it points at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Timeroot

Copy link
Copy Markdown
Contributor Author

Done!

@nomeata
nomeata merged commit 2010fe2 into leanprover:master Aug 30, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants