Repository navigation
RFM: comparison operands are never judged in v2 infer (below floor, measured) - #13311
Merged
Merged
Conversation
…easured) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…perator population; node.dag count - positional_child_count specimen Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 4, 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.
Files one recurring-failure-mode row,
comparison_operands_never_judged_in_v2_infer. No code changes.The class. In v2 infer,
==,!=,<,<=,>,>=never judge their operands against each other.infer_binary_algebra_fieldanswers a field only forAlgebraPrimitiveoperators. ForEqualityComparisonandOrderingComparisonit answers Absent.GroundingNotDerived, andinfer_unify_transform_operand_typesis never reached.Second population, same class (calm-boar-904).
-canonicalizes toAlgebraInverseCompose, whichinfer_binary_algebra_fieldalso answers Absent for, so subtraction operands are never judged either. Specimen:v2.std.node'scount(children) - positional_child_count(children), a Nat minus an Int, passes silently. The trigger covers both populations together.Measured. On session/stern-swift-290-literal,
fn k(n: Nat) -> Bool { n == (0 + 1) }(std.nat Nat compared with an Int) is accepted. That is below the floor (DESIGN §4b).Rung found at: below floor. Ceiling: structurally guaranteed. Next trigger: an infer arm that judges comparison operands through the equality/ordering structure, via the same inhabitance rows #13060's operator arm reads. Owner: the #13060 operator route (per calm-boar-904).
Found while measuring the reach of the XL-2 literal-elaboration change. Filed as its own PR, per lively-crane-656.
🤖 Generated with Claude Code