Skip to content

builder: factor a deep decision by nesting depth; lengthen a prefix an earlier app of the set holds - #19

Merged
afflom merged 1 commit into
mainfrom
claude/deep-tables
Nov 14, 2026
Merged

afflom merged 1 commit into
mainfrom
claude/deep-tables

Conversation

@afflom

@afflom afflom commented Nov 14, 2026

Copy link
Copy Markdown
Owner

What

Factoring by depth. builder/machine.mjs now factors a decision by how deep its ifs nest, not by how many rules it has.

  • MAX_DEPTH = 12 replaces FACTOR_AT = 11.
  • Inside a branch, conditions on the fields that branch fixes are dropped. A rule left with no conditions answers the rest of its chain.
  • A branch that is still too deep is factored again on another choice field.
  • factorField is kept. machineDeclarations also returns stepNames, and every theorem unfolds those names.

Id prefixes in a set. In builder/set.mjs, when two apps of one set share initials (afflom/me's prism-holon and prism-host), the build used to refuse the whole set. Now the first app keeps the prefix and the later one is lengthened from its last word. This is the same rule already used for a prefix another suite holds.

Why

The linear_arithmetic proof unfolds the whole decision into one goal and runs repeat' split. Lean's split stops once ifs nest past about a dozen, because it hits simp's step limit.

I measured this on the locked SDK's Lean: 13 nested ifs split and 14 do not. A table factored by a 5-valued field still nests 5 dispatch tests plus the chain under them. That is why afflom/me's resonance decision failed with LLV7002 on all 16 theorems.

With this change:

  • resonance nests 12 deep and its proofs verify (verified 14 modules);
  • router (9 deep) and uorc verify too.

Checked

  • All 14 rows of node builder/test.mjs pass.
  • DR-17 builds a tall table. It checks that a branch is factored a second time, that no path nests past MAX_DEPTH, and that the factored judge answers the same as the flat first-match chain for every request.
  • DR-22 checks two apps with the same initials (PCL-01 and PCLI-01).
  • afflom/me router, resonance, uorc and holon: across all of their requests (720, 1920, 576 and 96), the generated judge answers the same as the spec's decision tree.

Generated by Claude Code

…lengthen a prefix an earlier app of the set holds

The property proofs' repeat' split gives up once ifs nest past a dozen (simp's
step limit, measured on the locked SDK's Lean: 13 split, 14 do not). Factoring
now counts nesting depth, not rule count: a branch drops the conditions its
field fixes, a rule left with none answers the rest of its chain, and a branch
still too deep is factored again. DR-17 checks a tall table against the flat
first-match chain on every request.

Two apps of one set with the same initials no longer refuse the set: the later
one is lengthened from its last word, as for a prefix another suite holds (DR-22).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QU8Mz6i7JNPDbNRBd
@afflom
afflom merged commit 3c703cc into main Nov 14, 2026
4 checks passed
afflom pushed a commit to afflom/me that referenced this pull request Nov 14, 2026
…h their full model

Every keyword facet now goes through the prompt set: tools/prompts/gen.py keeps
only a tree path's is-tests (first-match makes the is-not tests redundant), and
the re-vendored builder (afflom/prism-devrel#19, #21) factors a deep table until
no path nests past twelve ifs or ten rule tests and takes sixteen fields. The
old generators skip the Lean of every listed facet; consumers use the builder's
names. Only chronology and kappa still wait (BS-01). 68 modules verify in the
locked SDK; 255 Rust tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QU8Mz6i7JNPDbNRBd
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