Skip to content

doc: windowed predicate semantics spec (#202) - #226

Merged
InauguralPhysicist merged 1 commit into
mainfrom
doc/predicates-spec-202
Jun 17, 2026
Merged

doc: windowed predicate semantics spec (#202)#226
InauguralPhysicist merged 1 commit into
mainfrom
doc/predicates-spec-202

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Collaborator

Implements #202: the unambiguous spec the predicate rewrites (#204#209) implement against.

Direction: all six windowed

This resolves the conflict between #202 (windows all six) and the transitional PREDICATES.md (windowed converged, others pointwise "by design"). The foundational design — EigenChat's docs/api/predicates.md, the pre-C implementation — defines these as trajectory claims: improving = "positive trajectory in semantic spacetime", diverging = "moving away from solution", with canonical loop while improving usage that must survive a single noisy tick. The early C runtime simplified five of the six to single-step checks, which flicker under noise (#207) and drove the iLambdaAi observer-scale trap. This spec restores the original windowed intent.

What each predicate now documents (per #202)

  1. Windowed formula in pseudocode
  2. Canonical dH-sequence trace → expected truth at each step
  3. Pointwise behavior replaced (for the changelog)
  4. Partial-window default: count < N → false ("not enough seen yet")

Derived constants: K = N/4 = 2 (bounce tolerance for improving/diverging), FLIPS = ceil(N/3) = 4 (oscillation threshold).

Honesty about shipped vs target

Notes

  • Kept the existing uppercase docs/PREDICATES.md (already linked from README) rather than creating a lowercase predicates.md duplicate.
  • Doc-only. PREDICATES.md is not in the executable-doc checker (SPEC.md/COMPARISON.md only), so no example-drift CI risk. Converged examples verified against the live runtime.

Closes #202.

🤖 Generated with Claude Code

Rewrites docs/PREDICATES.md as the unambiguous target spec the predicate
rewrites (#204-#209) implement against. Per #202, each predicate now
documents: the windowed formula in pseudocode, a canonical dH-sequence
trace with expected truth at each step, the pointwise behavior it
replaces, and the partial-window default (count < N -> false, "not enough
seen yet").

Direction: all six windowed, restoring the original trajectory semantics.
The foundational design (EigenChat docs/api/predicates.md) defines these
as trajectory claims — improving = "positive trajectory", diverging =
"moving away", with `loop while improving` usage that must be robust to a
single noisy tick. The early C runtime simplified five of the six to
single-step checks, which flickered under noise (#207) and drove the
iLambdaAi observer-scale trap. This spec is the target that undoes that.

- Six windowed formulas with derived constants K = N/4 (bounce tolerance)
  and FLIPS = ceil(N/3) (oscillation threshold).
- Implementation-status table: converged shipped (#204); stable/
  oscillating/improving/diverging/equilibrium target (#205-#209). The doc
  stays honest about shipped vs target, and notes report follows the
  implementations.
- Mutual-exclusion section documents both the target (exclusive bands) and
  a pre-rewrite note that the five pointwise predicates are NOT yet
  mutually exclusive — cross-referencing tests/test_predicate_matrix.eigs
  (#200), which pins current behavior and updates as each rewrite lands.

Kept the existing uppercase docs/PREDICATES.md (already linked from
README) rather than creating a lowercase duplicate. No code change;
PREDICATES.md is not in the executable-doc checker (SPEC.md/COMPARISON.md
only), so no CI example drift.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@InauguralPhysicist
InauguralPhysicist merged commit 25889fc into main Jun 17, 2026
11 checks passed
@InauguralPhysicist
InauguralPhysicist deleted the doc/predicates-spec-202 branch June 17, 2026 21:52
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.

[doc] Spec for windowed predicate semantics

1 participant