Skip to content

refactor(program): a grouped position carries the walk it counts within, and a walk naming two columns over one dimension is refused - #444

Merged
FBumann merged 2 commits into
claude/lookup-relations-vhvfjdfrom
claude/mathspec-feature-impl-4llmyi
Sep 9, 2026
Merged

FBumann merged 2 commits into
claude/lookup-relations-vhvfjdfrom
claude/mathspec-feature-impl-4llmyi

Conversation

@FBumann

@FBumann FBumann commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Prompt: "Lets implement this new mathspec feature. Is mathspec exposing enough for us? Anything mathsepc should change?" — "Do a stacked PR?"

Note

The following content was generated by AI. Stacked on #437, from implementing it in lpspec on both lanes.

What this changes

Two commits, separable.

  • DimensionPositionNode carries partition: Walk | None in place of by, walked, group and dims. Translate and Window already carry their partition as a Walk, so a consumer now reads every partition one way; lpspec dropped a second derivation of the group with it. The typesetter, exclusivity and _atom_dims read the walk.
  • A from= or into= list naming two columns over one dimension is refused at resolution. Before, sum(x, by=pair, from=[bus0, bus1], into=line) was accepted and lowered with over=('bus', 'bus'), which no operand can carry.

Why

Both came out of consuming the program on the other side. The first is the one place the plan still handed a partition to a consumer as loose fields; the second is a walk the dim rules let through because a set hid the duplicate.

Verified

uv venv on Python 3.12 with the pinned ruff and pyrefly, since pixi is not on this box. pytest -q -n auto: 1206 passed, 5 skipped. ruff check, ruff format --check: clean. pyrefly check: the three pre-existing yaml stub errors and nothing else. Not run: docs-build, compile-tex, the generators (no generated file is touched).

lpspec is built against this head on branch claude/mathspec-feature-impl-4llmyi: 3776 passed, 251 skipped, 1 xfailed across both lanes.

🤖 Generated with Claude Code

https://claude.ai/code/session_014JPeAmePdhNTDaNH2Q1CDr


Generated by Claude Code

`DimensionPositionNode` carries its partition as a `Walk`, as `Translate`
and `Window` do, in place of the lookup name, the walked column, the group
columns and the joined dimensions, so a consumer reads every partition one
way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JPeAmePdhNTDaNH2Q1CDr
A `from=` or `into=` list naming two columns over one dimension was
accepted and lowered to an operand consuming that dimension twice; it is
refused at resolution, naming the columns and the dimension.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JPeAmePdhNTDaNH2Q1CDr
FBumann pushed a commit to fluxopt/specsolve that referenced this pull request Sep 9, 2026
@FBumann
FBumann marked this pull request as ready for review September 9, 2026 20:51
@FBumann
FBumann merged commit 51f659d into claude/lookup-relations-vhvfjd Sep 9, 2026
5 checks passed
FBumann pushed a commit to fluxopt/specsolve that referenced this pull request Sep 9, 2026
FBumann added a commit that referenced this pull request Sep 10, 2026
…in, and a walk naming two columns over one dimension is refused (#444)

* refactor(program): a grouped position carries the walk it counts within

`DimensionPositionNode` carries its partition as a `Walk`, as `Translate`
and `Window` do, in place of the lookup name, the walked column, the group
columns and the joined dimensions, so a consumer reads every partition one
way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JPeAmePdhNTDaNH2Q1CDr

* fix(language): a walk naming two columns over one dimension is refused

A `from=` or `into=` list naming two columns over one dimension was
accepted and lowered to an operand consuming that dimension twice; it is
refused at resolution, naming the columns and the dimension.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JPeAmePdhNTDaNH2Q1CDr

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants