Conversation
…clared with `expression: null`, and prints as dots An `expressions:` entry written `expression: null` over a declared `dims:` is an empty expression. Alone, the file reads it as it reads a given expression. `merge` fills it with the terms other files add, and a term now lands only on a definition, empty or written: a name another file only reads or uses no longer takes terms. The composed definition keeps its `dims:`. The typesetter prints the empty body as dots and lists the name under Definitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CQxVP5uX2V4rpvJNPhbyR2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CQxVP5uX2V4rpvJNPhbyR2
Contributor
Author
Note The following content was generated by AI. This PR is closed in favour of #742, which implements the same feature. The explicit spelling moved there as a flag, Generated by Claude Code |
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.
What this changes
expression: nullover a declareddims:defines an empty expression. Alone, the file reads it as it reads a given expression.mergefills it with terms, and a term now lands only on a definition. The typesetter prints the empty body as….Semantics, breaks, gate output, mutation table
Semantics (the two design answers from the conversation)
0. With0, the constraintinjection == 0is refused ("neither side carries a variable"), so a balance fragment would not load on its own. The file reads the name as it reads a given expression: a quantity over the frame, of degree one, and awheredoes not read it.dims:is required.cases:andotherwise:are refused beside it.given:, or only uses in its math, no longer takes terms. The refusal names the rewrite (expression: null).program.given.expressions, andGivenDeclaration.emptyis set. Consumers need no new node, and theExpressionunion is unchanged.injection_{t,b} = \dots(Typstdots.h), through a newdotsoperator. The legend lists the name under Definitions, not Given.typeset_declarationprints its line.dims:its fragment wrote. This applies to a written body too: before this PR,_summeddropped thedims:. A merge that adds no term keeps the name empty.Breaks (pre-1.0, no alias)
test_a_term_lands_on_a_name_a_contributor_s_own_math_useswas deleted. Its case is now a refusal:test_terms_that_land_on_no_name_are_refused[terms-on-a-use-and-no-definition], next to[terms-on-a-reading-and-no-definition].docs/several-files.mdand indeclarations.mddefinesinjectionwithexpression: null, not undergiven:.dims:when the definition has a written body (see above).Docs
named.mdhas a new section, "An empty expression". The term rules changed indeclarations.mdandhowto/compose.md.reading.mdexplainsempty. The tutorialseveral-files.mdnow prints the…. The generatednotation.mdhas a row for the new golden entryimports. The schema was regenerated (docstring only).Gates
pixi could not be installed (network policy), so I ran each gate in a Python 3.12 venv:
pytest -n auto: 2114 passed, with coverage and typst installed, so the line census and typst compile tests ran.ruff check,ruff format --check .,pyrefly check(0 errors),typos, andprettier --checkondocs/..all-contributorsrcfails prettier onmaintoo.python -m tools.schema,python -m tests.typesetting.goldenandpython -m tools.notationwere regenerated. I read their diffs.zensical build --strictshows one warning only: the docs.python.org inventory, which the proxy blocks.maingives the same warning.compile-tex(no tectonic), and the lefthook hooks as a whole.Mutation table (hand-run, base
ba21b23,git checkout --restore,__pycache__dropped, tree clean after)expression: nullkept on writetest_the_generated_page_is_current[notation]expression: nullneedsdims:test_the_two_forms_do_not_mix[null-without-dims]expression:dims:test_the_sum_keeps_the_frame_of_its_definitiontest_a_reader_over_less_than_the_empty_definition_is_refusedtypeset_declarationprints its lineNot done
overridepatch cannot turn a written body into an empty one. A patch null drops the field, and the entry then has neither form.injection: nullis refused by pydantic's generic message, because the entry needsdims:.GivenDeclaration.emptyyet. It sees the name as a given expression.Why
See the prompts above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CQxVP5uX2V4rpvJNPhbyR2
Generated by Claude Code