Skip to content

Bidirectional build: prune joint states to a fixed point - #47

Merged
Autoplectic merged 1 commit into
mainfrom
bidir-joint-mass
Nov 12, 2026
Merged

Autoplectic merged 1 commit into
mainfrom
bidir-joint-mass

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

_prune_to_stationary_support made two passes and finished by restricting the graph to the stationary support. That restriction can drop more joint states (masses below tol), and nothing then re-checked that the survivors still had complete outgoing rows. With a truncated reverse machine (here 167 reverse states, smallest stationary mass 8.6e-12), validation failed with joint masses from (2, 'CE') sum to 0.864643100703771.

The prune now alternates "keep states with complete rows" and "keep the stationary support" until neither removes anything. On the failing 4-state survey process the build now succeeds (classified truncated), with forward marginals matching to 1e-10 and the symbol law to 1e-11.

Test plan

  • New regression test test_truncated_reverse_machine_prunes_to_complete_rows; it fails on main and passes here.
  • Bidirectional, generator and properties suites: 168 passed.
  • ruff.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@Autoplectic
Autoplectic merged commit 6a888da into main Nov 12, 2026
10 checks passed
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