fuzz: Int→Bool predicate generation; silence point-free appendTR false-alarm#32
Merged
Conversation
…e-alarm
- Generalize the `Char → Bool` predicate machinery to any `α → Bool` predicate,
adding `Int → Bool`: a predicate value is a finite subset of a fixed element
universe (chars from the alphabet, or a small signed-Int range), tagged with
the element type (`{"__pred__": [...], "ety": "Char"|"Int"}`) so the Lean
literal and Python `materialize` rebuild the right membership test. Unlocks
Cedar's `setAll`/`setAny`/`setFilter` (harvest 535 → 538); all 3 differentially
agree. Regression case (18).
- Handle point-free `List.append`/`appendTR`/binop BEFORE the `fallthrough.*`
self-coverage tag (marking `const.*` instead), so the report no longer falsely
flags `List.appendTR` as a broken core handler. Code output unchanged/correct.
RegressionFixes (44 cases), Comprehensions, TailCalls green; local corpus sweep
clean (0 bugs), no fallthrough warning.
This was referenced Jul 7, 2026
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 follow-ups from the campaign wrap-up.
Int → Boolpredicate generationGeneralizes the
Char → Boolpredicate machinery to anyα → Boolpredicate, addingInt → Bool. A predicate value is a finite subset of a fixed element universe (chars from the alphabet, or a small signed-Int range) — "is this element in the subset?" — which has identical semantics in a Lean and a Python lambda and is serializable. The tag now records the element type ({"__pred__": [...], "ety": "Char"|"Int"}) so the Lean literal and Pythonmaterializerebuild the right membership test.Unlocks Cedar's
setAll/setAny/setFilter(harvest 535 → 538); all three differentially agree with the oracle. Regression case (18) added.Silence point-free
appendTRself-coverage false-alarmPoint-free
List.append/appendTR/binop are now handled before thefallthrough.*self-coverage tag (markingconst.*instead), so the report no longer falsely flagsList.appendTRas a possibly-broken core handler. The emitted code is unchanged and correct ((lambda a, b: a + b)); this only fixes the reporting.Verification
RegressionFixes(44 cases),Comprehensions,TailCallsgreen;lake build+lake build Corpusgreen.contains_char_filter/find_char_filterverified).