Repository navigation
Conversation
With "lean_kernel": false in the config, comparator does not replay the solution in the Lean kernel and leaves the replay to the external kernels. The statement comparison, the axiom check and the external kernels are unchanged. The default is true, so existing configs behave as before. A config with lean_kernel false and no external kernel is rejected at startup, so a solution never passes without a kernel replay. Tests: lean_kernel_off_nanoda (accepted), lean_kernel_off_mismatch (wrong statement, rejected), lean_kernel_off_unchecked (a theorem added with debug.skipKernelTC whose value does not prove its type, rejected by nanoda) and lean_kernel_off_no_kernel (refused at startup).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comparator always replays the solution in the Lean kernel (
runBuiltinKernelinverifyMatch), also when external kernels are configured. For a large development this replay is a second full kernel check of code that the Lean kernel already checked duringlake build, and it can dominate the run time. On one of our packages, on a 4 core GitHub runner, nanoda (4 threads) replays the export in about 57 minutes and the builtin kernel in about 3 hours 6 minutes.This PR adds an optional config field
lean_kernel. The default istrue, so existing configs behave exactly as before. With"lean_kernel": false, comparator skipsrunBuiltinKerneland leaves the replay to the configured external kernels. The challenge build, the export, the statement comparison, the axiom check and the external kernels are unchanged.A config with
"lean_kernel": falseand no external kernel is rejected at startup, so a solution can never pass without a kernel replay. The quotient check done afterrunBuiltinKernelis skipped with it; nanoda checks theQuotdeclarations itself.The README gets one paragraph under "Checking with Additional Kernels".
Tests, in the existing
tests/projectslayout:lean_kernel_off_nanoda: correct solution, nanoda only, accepted.lean_kernel_off_mismatch: a different statement under the challenge name, rejected.lean_kernel_off_unchecked: a theorem added withdebug.skipKernelTCwhose value proves0 = 0while its type is0 = 1, rejected by nanoda.lean_kernel_off_no_kernel:lean_kernelfalse with no external kernel, refused at startup.The full suite passes (24 of 24) with
nanoda_binonPATH, assimple_multi_nanodaalready requires.Tested on d03acab (Lean v4.34.0); the patch applies cleanly to the current main.