Repository navigation
Rename complexity_rewrite lens → complexity_lowering (drop 'rewrite') - #5625
Merged
Merged
Conversation
Operator: 'rewrite' misnames the lens - it DETECTS a complexity lowering (before-class strictly dominates after-class), it does not imperatively rewrite source. Renamed consistently to avoid a §3 nickname-fork (file vs type): module v2.lens.complexity_lowering, type ComplexityLowering, strictly_lowers / lowering_catalog / lowering_matches_class / cost_class_is_lowerable / cost_is_lowerable; intent_linearity's chain_has_rewritable_cost -> chain_has_lowerable_cost and chain_has_runtime_rewrite_candidate -> chain_has_runtime_lowering_candidate. 'lowering' matches the file's own existing vocabulary (strictly_lowers) and avoids colliding with the program's 'reduce' fold-species. Pure rename, no behavior change. complexity_reducible_rule left as-is (operator flagged only 'rewrite'). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Operator: "rewrite" misnames the lens — it detects a complexity lowering (a catalogued case where the before-class strictly dominates the after-class), it does not imperatively rewrite source. Renamed the whole concept consistently so the file/module and the type don't fork into a §3 nickname:
v2.lens.complexity_rewrite→v2.lens.complexity_lowering(file + test dir)ComplexityRewrite→ComplexityLoweringrewrite_strictly_lowers→strictly_lowers,rewrite_catalog→lowering_catalog,rewrite_matches_class→lowering_matches_class,cost_class_is_rewritable→cost_class_is_lowerable,cost_is_rewritable→cost_is_lowerableintent_linearity:chain_has_rewritable_cost→chain_has_lowerable_cost,chain_has_runtime_rewrite_candidate→chain_has_runtime_lowering_candidate"lowering" matches the file's own existing vocabulary (
strictly_lowers, "strictly lowering the class") and avoids colliding with the program's "reduce" fold-species.complexity_reducible_ruleleft as-is (operator flagged only "rewrite").Pure rename — no behavior change. No comments added (post-#5567 wall).
Verified by execution
complexity_loweringwitnesses green:catalog_is_sound_holds,identity_lowering_is_rejected,quadratic_is_lowerable,linear_not_lowerable.intent_linearityruntime-axis witnessnested_loop_is_runtime_candidate→ true (confirms the cross-module importer rename resolves consistently).(The earlier CI red was a dashboard WIP commit that captured the rename mid-way; this head completes it.)
🤖 Generated with Claude Code