Skip to content

Rename complexity_rewrite lens → complexity_lowering (drop 'rewrite') - #5625

Merged
briansrls merged 3 commits into
mainfrom
rename/complexity-lowering
Jun 23, 2026
Merged

briansrls merged 3 commits into
mainfrom
rename/complexity-lowering

Conversation

@briansrls

@briansrls briansrls commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • module v2.lens.complexity_rewrite → v2.lens.complexity_lowering (file + test dir)
  • type ComplexityRewrite → ComplexityLowering
  • rewrite_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_lowerable
  • importer intent_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_rule left as-is (operator flagged only "rewrite").

Pure rename — no behavior change. No comments added (post-#5567 wall).

Verified by execution

  • complexity_lowering witnesses green: catalog_is_sound_holds, identity_lowering_is_rejected, quadratic_is_lowerable, linear_not_lowerable.
  • intent_linearity runtime-axis witness nested_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

Brian Searls and others added 3 commits June 23, 2026 13:34
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>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 23, 2026 13:45
@gunbai-bot gunbai-bot Bot changed the title roadmap discussion Rename complexity_rewrite lens → complexity_lowering (drop 'rewrite') Jun 23, 2026
@briansrls
briansrls merged commit 886d9ec into main Jun 23, 2026
2 of 4 checks passed
@briansrls
briansrls deleted the rename/complexity-lowering branch June 23, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant