Repository navigation
Conversation
…se where the relation has no row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MPR9MKVJ9XwN68qHLrX5g
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MPR9MKVJ9XwN68qHLrX5g
This was referenced Oct 23, 2026
…ion apart (#951) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MPR9MKVJ9XwN68qHLrX5g
This branch has not been deployed
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.
The case check now follows #947's rule: a comparison on a relation is false where the relation has no row. It also tells two pairs of columns of one relation apart. Two missed overlaps are now refused, and one false refusal is gone.
mainNOT ends[bus0] == ends[bus1]/NOT ends[bus0] != ends[bus1]ends[bus0] == ends[bus1]/ends[bus0] != ends[bus2]bus0 == bus1 != bus2)ends[bus0] != 'north'/NOT endsReview commit by commit:
b4748c53is the missing row, and the squashed #951 commit is the column pairs.Method, guard tables, gate output
The change
All in
src/mathspec/_exclusivity.py.A missing row (
b4748c53).Subject('relation', name)with no column is now whether the relation has a row, with the cells[True, NULL]. Each relation that a comparison reads gets this subject. A comparison is false in a cell where a relation it reads has no row. A relation column no longer carries its own null or infinity cells, the same as a dimension. The witness leaves out the columns of a missing row, and leaves out "has a row" where a column value of that relation already shows it.Before, a
RelationPairComparisonhad the cells[True, False]and no cell for a missing row.RelationDefinedandRelationComparisonwere independent subjects, so the checker invented a cell whereendshas no row andends[bus0]still holds a value.Two pairs of columns (#951). The pair subject was keyed by the two relation names only, so every comparison of two columns of
endsread one fact. It now carries both columns inSubject.group. The two sides are sorted, soends[bus1] != ends[bus0]is the same subject asends[bus0] == ends[bus1]. The witness names the columns:ends[bus0] vs ends[bus1] is equal, notends vs ends.Pairs that share a column, such as
bus0 == bus1,bus1 == bus2andbus0 != bus2, stay independent subjects. That over-approximates: it can produce a witness no data has, but never hides a real one.Tests
tests/test_exclusivity.py:TestARelationWithNoRow: the negated complements are refused withends has no rowas the witness; three pairs (a label, two columns, a number) againstNOTof the bare name are proved apart; a row both cases read is still found.TestTwoPairsOfColumns: the two pairs above are refused; one pair written either way round, plain or negated, is one fact.TestSoundness::test_a_relation_proved_apart_stays_apart_on_every_row: the existing fuzz, run overendswith three columns. It checks every pair the checker proves apart on concrete points: no row, or a row whose columns hold three labels each.I watched each new reproduction fail on its base before writing the fix.
Guard tables
I deleted each guard in turn and ran the full suite, restoring with
git checkout --and dropping__pycache__on both sides. The tree came back clean each time.has a rowGates
pixi run cibefore each push:lint,testanddocs-buildpassed.compile-texfailed on all 54 documents because tectonic could not download its bundle in that container; the diff does not touch the typesetter. GitHub CI is green on both parts.Not done
🤖 Generated with Claude Code
https://claude.ai/code/session_015MPR9MKVJ9XwN68qHLrX5g