Repository navigation
Conversation
`relations:` is `sets:`. A set named in the `dims:` of a parameter, a variable or a constraint, or in `over=`, stands for its dimensions at the combinations it lists: the entry has coordinates only there, and a tool refuses a data row of a parameter anywhere else. There is no `in:` key. A set's bare name in the `where:` of such an entry is refused, with the set in `dims:` as the rewrite. In math a sum or an index ranges over a set, so the construct that `dims:` and `over=` take is named a set. Co-Authored-By: Fabian Hofmann <fab.hof@gmx.de> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
An entry over a dimension twice, as TIMES' IRE_FLO: the alias's docs example names the set in dims:, a test states IRE_FLO in this spelling, and a set with two columns over one dimension is refused with an alias as the rewrite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
`in:` was answered "Did you mean 'in_'?", the field the load fills from `dims:` and a file may not write. The suggestion now leaves it out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
The TIMES examples in this PR's spelling: sets: in place of relations:, act over [prc_ts, rtp_vintyr], and ire_flo, trade_cost and export over the set top_ire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
sparse.yaml in this PR's spelling: sets:, and every entry over a set names it in dims:. Restating balance found that over= a set beside by= was refused; a set in over= now stands for its dimensions there too, with the failing test first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1xxh6NMJN6mrYY34Q
…pare/multi-dims # Conflicts: # docs/examples/times/trade.md # examples/times/trade.yaml
The `sets:` section goes. A multi-dim is an entry under `dimensions:` with `over:`, the spelling datarecord uses, and `maps:` keys it as it keys a dimension. In `dims:` and `over=` it stands for its members, and two multi-dims in one `dims:` join on the members they share. A multi-dim has no `missing:`: a combination with no row is not one of its labels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1Y7i5TWDbh9SKx86i
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1Y7i5TWDbh9SKx86i
This was referenced Nov 17, 2026
A multi-dim in the `dims:` of a named expression or a `given:` entry now stands for its members, as it does on a parameter, a variable and a constraint, so every rule that compares `dims:` compares the members. A multi-dim may have one member, a subset of that dimension. Its bare name is a test in a constraint's `where:`, a named condition and a `when:`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA1Y7i5TWDbh9SKx86i
Four refusals of #9 become the spelling each one stood for: - an operand over a member meets the dimension: read at each tuple, as at(x, by=dimension[member]) reads it; - sum(x, over=member) on an operand over the dimension: the sum through the dimension, grouped by the members over= leaves; - two dimensions in one dims: that share a member: the entry over the members, where: the dimensions; - a step along a member: the entry it steps in, and the entry it steps, over the members, where: the dimension. Every spec #9 loads builds the same program. A parameter over the members carries the tuples as its domain, where a tool refuses a stray row; that is the one change no #9 spelling states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA494URRSeWy6wmELGP
…strict The tree is the restack's: #8's design as the four lifts over #9. The second parent keeps #8's earlier history, so the push fast-forwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018B3nA494URRSeWy6wmELGP
FBumann
changed the base branch from
feat/dimension-alias
to
compare/tuple-strict
November 17, 2026 22:16
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.
Note
The following content was generated by AI.
#8's design as sugar over #9. Four refusals of #9 become the spelling each stood for; every spec #9 loads builds the same program here.
Draft, for comparison, not for merge. Stacked on #9 (
compare/tuple-strict). Sibling: #7 (Confine).1. A member operand meets the tuple by name
2.
over=<member>sums the tuple, grouped by the members it leavesTIMES
balance(examples/times/trade.yaml):sum(ire_flo * export, over=top_ire, by=top_ire[commodity, region])→sum(ire_flo * export, over=[from_commodity, from_region, process]).3. Two tuples that share a member join on it
4. A step along a member
The one non-sugar change
A parameter over two tuples that share a member (or stepped along one) carries those tuples as its new
Parameter.domain. A tool refuses its stray data row there, where #9'swhere:drops it.Inherited from #9, not re-shown
No
relations:; a tuple's bare name as a condition; tuples of one member;dims:as the domain;mappings:.Method, gate output, what was not done
Method
compare/tuple-strict(b8a42448) as branchsugar, thengit merge -s oursof feat(language): a dimension's members are read by name #8's old head (72385d2f), pushed as a fast-forward tocompare/multi-dims(6658d6e1). The tree is the rebuild; feat(language): a dimension's members are read by name #8's earlier commits stay in the history. No force push.ExpressionResolver.alignedreads the member operand at each tuple (theJointhatat()builds), and_over_membersturnsover=<member>into the sum through the tuple. Both build the very nodes the feat(language)!: a dimension lists its members, strictly #9 spelling builds._flat.py: an entry whosedims:share a member, an entry that steps along a member, and an entry a step reads lower as the feat(language)!: a dimension lists its members, strictly #9 spelling, over the members withwhere:the tuples.Spec.programlowers that spec and sets the domain of each such parameter. Every other entry keeps its tuples;ExpressionResolver.framedreads an operand that meets a frame by member names, either way.tests/test_tuple_sugar.py, 20 cases. Each one compares the sugar's program with the feat(language)!: a dimension lists its members, strictly #9 spelling's.test_a_shortened_example_builds_the_program_of_its_strict_spellingloads each shortened example beside its feat(language)!: a dimension lists its members, strictly #9 copy undertests/fixtures/strict/.domain=Nonefield; the 3 specs feat(language)!: a dimension lists its members, strictly #9 refuses (partial files) are refused here too.test_a_frame_over_the_dimension_and_its_member_is_refused,test_a_step_along_a_member_of_an_entry_over_the_tuple_names_the_flat_entry, 18 cases oftest_what_a_tuple_dimension_does_not_take_is_refused_with_the_rewriteand 3 oftest_a_member_shared_by_two_dimensions_of_one_frame_is_refused. Their new meanings are intests/test_tuple_sugar.py. The test helper that derives node dims reads a leaf's dims off the program entry.sparse,connection,times/capacity,times/trade.dimensions.mdhas one section, Members by name, with the five readings in a table, in place of the two refusal sections.limits.mdloses the alignment and order refusals. Generated pages regenerated.Gate (no pixi here; uv venv with the pinned tools)
ruff check,ruff format --check,pyrefly check(0 errors),prettier --check,typos,reuse lint,git diff --check. All pass. Not run:taplo,zizmor, lefthook itself.pytest -q -n auto: 4255 passed, 3 skipped.python -m zensical build --strict: no issues.python -m tools.render_tex: 62 specs rendered.compile-tex: not run. tectonic is not installed here.Not done, or not carried over from the old #8
piecewise:entry'sdims:stay refused.where:to confine it, so its rows follow its body.examples/candidates.yaml, its droppedmissing:, and its one-member printing without a tuple are not here; feat(language)!: a dimension lists its members, strictly #9's rules for those stand.🤖 Generated with Claude Code
https://claude.ai/code/session_018B3nA494URRSeWy6wmELGP