Skip to content

feat(jc): activate Pillar 4 (γ+φ preconditioner) + Pillar 11 (Hambly-Lyons via feature flag)#351

Merged
AdaWorldAPI merged 4 commits intomainfrom
claude/review-integration-debt-P7XGp
May 7, 2026
Merged

feat(jc): activate Pillar 4 (γ+φ preconditioner) + Pillar 11 (Hambly-Lyons via feature flag)#351
AdaWorldAPI merged 4 commits intomainfrom
claude/review-integration-debt-P7XGp

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Activates two of the three deferred FORMAL-SCAFFOLD pillars in crates/jc. Drops the deferred-pillar count in prove_it from 3 → 2 on default builds and 3 → 1 with --features hambly-lyons. Cartan-Kuranishi (Pillar 2) remains genuinely deferred — it requires the learned-attention-mask module from the coupled-revival track, not a probe-shaped activation.

Pillar 4 — γ+φ preconditioner (active on default build)

crates/jc/src/precond.rs — replaces the deferred() stub with a concrete probe: SOR with ω = GOLDEN_RATIO (1.618) vs vanilla Jacobi (ω = 1.0) on N=50 stiff tridiagonal SPD systems (perturbed 1D Laplacian).

Empirical result on default cargo run --release --example prove_it:

Metric Value
Jacobi(ω=1) total iters 12 940 (mean 258.8)
SOR(ω=φ=1.6180) total iters 2 419 (mean 48.4)
Step-count ratio 5.349× (pass if ≥ 2.0×)
SOR ≤ Jacobi 50/50 problems
Runtime ~5 ms

Both EULER_GAMMA and GOLDEN_RATIO from std::f64::consts (stabilized in Rust 1.94, workspace pinned to 1.94.1). γ enters as the convergence-tolerance scaling factor — same form as lance_graph_planner::cache::lane_eval::NOISE_FLOOR (γ/(γ+1)/√N), tying Pillar 4 to the Euler-Mascheroni anchor Pillar 5 uses for σ-thresholds.

Why stiff regime, not diagonally-dominant: for ρ_J ≈ 0.4, optimal SOR ω* ≈ 1.04 — at ω = φ = 1.618 SOR over-relaxes and slows convergence. The probe deliberately uses the perturbed-1D-Laplacian regime (ρ_J ≈ 0.983), where optimal ω* ≈ 1.690 — within 10% of φ. The earlier draft used the diagonally-dominant regime by mistake; the calibration commit fixes it.

Pillar 11 — Hambly-Lyons signature uniqueness (active under --features hambly-lyons)

crates/jc/src/hambly_lyons.rs — gated behind a new hambly-lyons feature flag. Default JC build stays zero-dep; the feature flag pulls in sigker (workspace sibling) and runs forward + converse Hambly-Lyons probe via signature_truncated at depth 2.

Empirical result with cargo run --release --features hambly-lyons --example prove_it:

Metric Value
Forward (tree-equivalence): max ‖S(out-and-back) − S_identity‖ 0.000e0 across 100/100 pairs
Converse (non-tree): min ‖S(triangle) − S_identity‖ 0.0940 across 100/100 pairs (above 0.05 threshold)
Discrimination ratio (min-converse / max-forward) (perfect separation)
Runtime < 1 ms

The tensor-algebra path is bit-exact for out-and-back paths at depth-2 truncation — exactly what Hambly-Lyons 2010 Theorem 4 predicts. The signature space cleanly separates tree-quotient classes.

Why feature-gated, not regular dep nor dev-dep:

  • [dependencies] regular: would unconditionally tie JC's default build to sigker, breaking the "zero-dep production" constitution.
  • [dev-dependencies]: dev-deps don't reach lib code, only tests / examples / benches. hambly_lyons::prove() lives in lib (called by run_all_pillars).
  • Feature-gated optional dep: cargo build (default) is zero-dep; cargo build --features hambly-lyons activates the probe. Clean middle path.

Why this avoids PR #350's PDE-form correction: the probe uses sigker::signature_truncated (tensor-algebra path), which is independent of signature_kernel_pde (the function PR #350 corrects). Pillar 11 certification holds regardless of #350's outcome.

Updated deferred-pillar inventory

Pillar Status pre-this-PR Status default build Status --features hambly-lyons
2 (Cartan-Kuranishi) DEFERRED DEFERRED (genuinely — needs ML module) DEFERRED (genuinely)
4 (γ+φ preconditioner) DEFERRED ACTIVE (5.349× ratio) ACTIVE
11 (Hambly-Lyons) DEFERRED DEFERRED (graceful fallback) ACTIVE (∞ discrimination)

Out of scope (flagged as follow-up debt in the ledger)

  • JC SIMD via ndarray::simd for production hot paths (per @AdaWorldAPI). The hand-rolled scalar math in pillars 1 / 5 / 5b / 8 (operating on d ∈ {10 000, 16 384}) needs to be SIMD-dispatched for production. Same feature-flag shape as this PR's hambly-lyons (a new simd-hot feature gating optional ndarray dep). Tier-2 pillars (precond, hambly_lyons, koestenberger, ewa_sandwich) operate on small dimensions and don't gain materially from SIMD. Estimated separate PR: ~150-300 LOC.
  • Two EULER_GAMMA / GOLDEN_RATIO literal stragglers the regex pass missed: crates/thinking-engine/examples/codec_rnd_bench.rs:1454-1455 and crates/lance-graph-codec-research/src/zeckbf17.rs:1660. Non-blocking (example + workspace-EXCLUDED research crate). 5-line cleanup PR if you want full hygiene.
  • Board-hygiene retrofit for feat(jc): pillar 10 (Pflug-Pichler) + sigker crate + pillar 11 stub #348 + feat(sigker): Goursat-PDE kernel + log-signature compression + depth-scaling bench #349 (Pillar 10 row + sigker types Contract Inventory + per-PR PR_ARC_INVENTORY archive entries) — flagged in the ledger; lives in its own follow-up retrofit PR.

Test plan

  • cargo build --manifest-path crates/jc/Cargo.toml --release — clean (default zero-dep build)
  • cargo build --manifest-path crates/jc/Cargo.toml --release --features hambly-lyons — clean (with sigker dep)
  • cargo run --release --example prove_it — 9/11 PASS, 2 deferred (Cartan + Hambly-Lyons fallback)
  • cargo run --release --features hambly-lyons --example prove_it10/11 PASS, 1 deferred (Cartan only)
  • All prior PR-feat(jc): bitpacked Louvain + Jaccard + Perturbationslernen + tier correction #347 + PR-feat(jc): SPLAT→EWA bridge example + SplatShaderBlas ledger entries #346 probes still green (triangle-count, LPA, Louvain, Jaccard, Perturbationslernen, SPLAT→EWA bridge)
  • Reviewer: confirm the feature-flag pattern is the right reconciliation between JC's zero-dep constitution and the cross-crate Pillar-11 probe
  • Reviewer: confirm the stiff-regime tridiagonal SPD probe in precond.rs is the right calibration target (vs the easier diagonally-dominant draft)

Files

 crates/jc/Cargo.toml                            +14   sigker as optional dep + hambly-lyons feature
 crates/jc/Cargo.lock                            +5    lockfile churn from new optional dep slot
 crates/jc/src/precond.rs                       +203   active probe replaces deferred() stub
 crates/jc/src/hambly_lyons.rs                  +168   active probe + cfg(not(...)) fallback
 crates/jc/src/lib.rs                            +6    docstring + Pillar 11 registration label
 .claude/board/ARCHITECTURE_ENTROPY_LEDGER.md   +167   APPEND-only: activation events + SIMD follow-up debt

Commits

  • f4bd6bf Pillar 4 activation
  • c191f23 Pillar 11 activation + sigker integration via feature flag
  • b34683d Ledger — Pillar 4 + Pillar 11 activation events
  • 4f354a4 Ledger — JC SIMD follow-up debt (ndarray::simd for hot paths)

https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx


Generated by Claude Code

claude added 4 commits May 7, 2026 06:11
Replaces the deferred() stub with a concrete probe per the Pillar-4
spec. SOR with ω = GOLDEN_RATIO (1.618) vs vanilla Jacobi (ω = 1.0)
on N=50 stiff tridiagonal SPD systems (perturbed 1D Laplacian).

Result on default build (no extra features needed):
  N=50 problems × 16×16, tol = γ/(γ+1)/√N · 1e-6 = 5.176e-8
  Jacobi(ω=1):   total 12940 iters (mean 258.8)
  SOR(ω=φ):      total  2419 iters (mean  48.4)
  Step-count ratio = 5.349× (pass if ≥ 2.0×)
  SOR ≤ Jacobi on 50/50 problems
  Runtime: ~5 ms

The probe uses both:
- EULER_GAMMA in the convergence-tolerance scaling factor —
  same form as lance_graph_planner::cache::lane_eval::NOISE_FLOOR
  (γ/(γ+1)/√N), tying Pillar 4 to the same Euler-Mascheroni anchor
  Pillar 5 (Jirak Berry-Esseen) uses for σ-thresholds.
- GOLDEN_RATIO as the SOR over-relaxation weight — within ~10 %
  of theoretical optimal ω* = 2/(1+sin(π/(n+1))) for the 1D-
  Laplacian-shaped problem class.

Both constants from std::f64::consts (stabilized in Rust 1.94).
Workspace pinned to 1.94.1 in rust-toolchain.toml — no extra
dependencies required.

Stiff-regime synthetic problem: diagonal in [2.00, 2.05],
off-diagonal in [-1.02, -0.98] — perturbed 1D Laplacian.
Spectral radius ρ_J ≈ 0.983 puts the iteration in the regime
where over-relaxation decisively wins. (The earlier draft used a
diagonally-dominant random SPD problem with ρ_J ≈ 0.4; in that
regime optimal ω* ≈ 1.04 and ω = φ over-relaxes — wrong test for
the pillar's claim. Stiff regime is the right calibration.)

Drops the deferred-pillar count in `prove_it` from 3 to 2
(Cartan-Kuranishi + Hambly-Lyons remain). Hambly-Lyons activates
in a follow-up commit under the `hambly-lyons` feature flag.

https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx
…ree-quotient

Replaces the deferred() stub with a concrete probe per the Pillar-11
spec, gated behind the new `hambly-lyons` feature flag. JC's default
build stays zero-dep per the standalone-crate constitution; the
feature flag pulls in the sigker workspace sibling and activates the
probe.

## Probe design (sigker::signature_truncated, depth 2, dim 3)

Two complementary tests over 100 random pairs:

**Forward (tree-equivalence preserves signature):**
  Out-and-back path [p₀, p₁, p₀] should have signature ≈ S_identity
  by Hambly-Lyons 2010 Theorem 4 (tree-like equivalence collapses to
  the constant path's signature).
  Result: max ‖S(out-and-back) − S_identity‖ = **0.000e0** across
  100/100 pairs (tensor-algebra path is bit-exact at depth-2).

**Converse (non-tree perturbation distinguishes):**
  Triangle loop [p₀, p₁, p₂, p₀] has non-zero level-2 signed-area
  components.
  Result: min ‖S(triangle) − S_identity‖ = **0.0940** across
  100/100 pairs (above the 0.05 discrimination threshold).

**Discrimination ratio** (min-converse / max-forward) = **∞**
(perfect separation between tree and non-tree quotient classes at
depth-2 truncation).

## Why the feature-gate (not regular dep, not dev-dep)

JC's constitution: zero EXTERNAL deps in production. sigker is a
workspace sibling (path-dep), not external — but adding it
unconditionally would break the "default cargo build is standalone"
property. dev-dep would put the probe out of reach of run_all_pillars
(dev-deps don't reach lib code). Feature-gated optional dep is the
clean middle path:

  cargo run --release --example prove_it
    → 9/11 PASS, 2 deferred (Cartan + Hambly-Lyons)
  cargo run --release --features hambly-lyons --example prove_it
    → 10/11 PASS, 1 deferred (Cartan only)

Behind the feature, hambly_lyons::prove() runs the active probe.
Without the feature, it returns DEFERRED with a message telling the
caller how to activate.

## Why this avoids the PR #350 PDE-form correction

PR #350 documents that sigker::kernel::signature_kernel_pde currently
ships a Goursat-PDE form that diverges from the true signature kernel
at moderate inner products. This probe uses signature_truncated (the
tensor-algebra path), which is independent of the PDE-form correction.
Pillar 11 certification holds regardless of #350's outcome.

## Files

- crates/jc/Cargo.toml: sigker as optional dep + hambly-lyons feature
- crates/jc/Cargo.lock: lockfile churn from new optional dep slot
- crates/jc/src/hambly_lyons.rs: replace deferred() with feature-gated
  active probe + deferred fallback under cfg(not(feature))
- crates/jc/src/lib.rs: update top docstring (Pillar 4 + Pillar 11
  activation history); drop "(DEFERRED)" suffix from Pillar 11
  registration label

## Status

Combined with Pillar 4 (commit f4bd6bf — activates unconditionally),
this PR drops the deferred-pillar count from 3 to:
  - 2 deferred on default build (Cartan + Hambly-Lyons)
  - 1 deferred with --features hambly-lyons (Cartan only)

Cartan-Kuranishi (Pillar 2) remains genuinely deferred — it requires
the learned-attention-mask module from the coupled-revival track,
not a probe-shaped activation.

https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx
Append-only block documenting the activation of Pillars 4 and 11
(commits f4bd6bf and c191f23 in this branch).

Records:
- Pillar 4 empirical result (5.349× step-count ratio, 50/50 problems
  SOR ≤ Jacobi, ~5 ms runtime)
- Pillar 11 empirical result (100/100 forward pairs at exactly 0
  distance; 100/100 converse pairs above 0.05 threshold;
  discrimination ratio = ∞)
- Architectural rationale for the feature-flag choice (lib code can't
  use dev-deps; unconditional dep breaks zero-dep constitution;
  feature-gated optional dep is the clean middle path)
- Two stragglers unmissed by the EULER_GAMMA / GOLDEN_RATIO regex
  pass (non-blocking, in example + workspace-EXCLUDED research crate)
- Updated deferred-pillar inventory (3 → 2 default, 3 → 1 with
  --features hambly-lyons)
- Flagged board-hygiene retrofit for PR #348 / #349 as a separate
  follow-up (Pillar 10 row, sigker types inventory, per-PR archive)

https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx
…hot paths)

Per @AdaWorldAPI 2026-05-07: JC's hand-rolled scalar Rust is fine for
the proof-in-code role but not for production hot paths. Records the
SIMD-critical pillars (substrate / jirak / pearl / dueker_zoubouloglou
— all operating on d ∈ {10 000, 16 384}) and the proposed feature-flag
shape (`simd-hot` gating optional ndarray dep, mirrors the
`hambly-lyons` pattern this PR introduces).

Tier-2 pillars (small-dimension: koestenberger, ewa_sandwich, precond,
hambly_lyons) explicitly noted as not SIMD-critical — production refactor
should target the d=10K-16K loops first.

Scope explicitly drawn: SIMD-hot is a separate PR with its own
throughput measurements; this PR keeps the Pillar-4 + Pillar-11
activation as a clean atomic deliverable.

https://claude.ai/code/session_012AUf5NFgeAAQa5aQAKwSgx
@AdaWorldAPI AdaWorldAPI merged commit b0b78b6 into main May 7, 2026
5 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f354a4c08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/jc/src/precond.rs
Comment on lines +120 to +122
for (j, &row_j) in a[i].iter().enumerate() {
if i != j {
sigma += row_j * x[j];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a true Jacobi baseline

When this helper is called with omega == 1.0 for the advertised Jacobi baseline, the loop reads x[j] after earlier rows have already been updated in the same sweep, so the baseline is actually Gauss-Seidel, not Jacobi. This makes the reported Jacobi/SOR step-count ratio and Pillar-4 pass criterion measure the wrong comparison; use a separate previous-iterate vector for the ω=1 baseline or relabel/adjust the proof accordingly.

Useful? React with 👍 / 👎.

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