Repository navigation
Require closure context and universe substitution identity before conversion shortcuts - #123
Draft
heathsanchez wants to merge 3 commits into
Draft
heathsanchez wants to merge 3 commits into
heathsanchez wants to merge 3 commits into
Conversation
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.
Two distinct soundness counterexamples to an unsafe closure-equality fast path (draft)
Current published Flash
src/conv.rstreats empty environments as equal even when their universe substitutions differ. It also fast-paths equality of Pi and lambda closures when bodies, domains and environments match, without comparing whether the closure evaluates the body or infers its type.The patch restores two identities required before shortcutting conversion:
Env::Nilinstances, compare the complete structural universe substitution (ksandvs), not a hash or empty-environment tag.PiandLamfast paths, require matching closure mode/context pointers; otherwise fall through to full conversion. This cannot manufacture equality from a missing semantic distinction.Motivated by independently reported Sokonanoda issue #8 (
bugs/pi-closure-context) and issue #9 (bugs/closure-level-subst). The precise source-derived guards are attributed; no originality claim for the reported failures.Qualification builds original published Flash
78c7502bac8a5ba000057b3f083bc0595ac65750and this branch under matched flags, requires both official Arena forged tests to change ACCEPT → REJECT and every other downloaded non-performance test to retain its exit code. Per-case artifacts and source/binary/test hashes are preserved, including failure evidence.This is an isolated candidate from draft #120/#121/#122. Keep draft pending the before/after result and full Mathlib/performance reconciliation. No release/leaderboard claim.