Repository navigation
Conversation
…ions `perf/irrelevance-refutes` checks `f 100000 (slowRefl 100000) = f 100001 (slowRefl 100001)`, where `f` ignores its arguments and `slowRefl m : m = m` is a `Nat.rec` over `m`. Official stops comparing the arguments at the literals; a checker that reaches the proofs first should refute them by their types, as `is_def_eq_core` does on `is_def_eq_proof_irrel`'s `l_false`, instead of unfolding them. Distilled from `decide +kernel` on `Rat` arithmetic, which made nanoda run out of memory on the Lean v4.35.0-rc3 export of Mathlib. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
nomeata
enabled auto-merge (squash)
October 6, 2026 19:56
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.
This adds
perf/irrelevance-refutes, which checkswhere
fignores its arguments andslowRefl m : m = mis aNat.recoverm. A checker that compares the arguments may meet the two proofs. Their types,100000 = 100000and100001 = 100001, are not defeq, so the proofs are not defeq either. Official'sis_def_eq_corestops onis_def_eq_proof_irrel'sl_false. A checker that uses only proof irrelevance's positive answer instead unfolds both proofs, at a cost of Θ(m).Official compares the arguments left to right and refutes at the literals before it reaches the proofs. No test of this shape can catch a left-to-right checker: proofs whose types differ always come after an earlier argument that already differs.
The test is distilled from
decide +kernelonRatarithmetic, which made nanoda run out of memory on the Lean v4.35.0-rc3 export of Mathlib. There the proofs areNat.gcd_dvdterms by well-founded recursion, reached throughInt.divExact's arguments, which nanoda compares right to left.Local results, instructions:u, one run each, nanoda with the arena's config:
3a240723a24072+ three-valued proof irrelevance🤖 Generated with Claude Code