# RRLS v0.27 — Dimensional Future Compiler

**6 September 2026 audit notice:** RRLS_v27_SOURCE_AUDIT.md documents the v0.27.1 source repairs and new tests. The benchmark figures below are the historical v0.27 record, not fresh measurements of the repaired release. In particular, the capture layer is an integer-tick point-coincidence automaton; it cannot establish continuous strand non-crossing. Complete generator identification additionally requires a declared class; the new bounded-order recurrence learner makes that assumption explicit.

## Status

**P = NP is not proved.**

**No claim is made that physical reality is literally a string with hairs, that higher
physical dimensions obey this engine, or that this is a medical model.**

v0.27 translates the accumulated string/fiber ideas into three deliberately separated
layers:

1. **exact dimensional recurrence algebra** — arbitrary-precision integer/rational
   trajectories on products of cyclic coordinate spaces;
2. **exact dimensional observability** — finite-field measurement rank, with no floating
   point;
3. **analytic 3D captured-strand toy mechanics** — curvature, torsion, impact decomposition,
   damped wrapping and contact-propagation time.

The architectural principle is:

    store the generator of a future,
    solve the next event,
    skip the empty interval,
    recompute only after an event changes the generator.

---

# 1. Exact D-dimensional next-collision theorem

For coordinate k,

    x_a,k(t) = x_a,k(0) + v_a,k t   mod m_k
    x_b,k(t) = x_b,k(0) + v_b,k t   mod m_k.

Collision requires

    (v_a,k-v_b,k)t ≡ -(x_a,k-x_b,k)  (mod m_k)

for every k.

Each equation is reduced by gcd.  Compatible schedules are combined by the generalized
Chinese Remainder Theorem.

The output is one of:

    no future integer-tick collision;
    persistent coincidence;
    t ≡ r (mod P),

from which the smallest requested future collision is obtained directly.

No intermediate tick is generated.

## Correctness

Integer pair solver:

    1080/1080 exact cases.

The underlying detailed differential was 1,080/1,080 against brute tick enumeration.

Exact rational position/velocity solver:

    500/500 exact cases.

Arbitrary nonzero starting tick:

    500/500 exact cases.

Explicit persistent, impossible-parallel, and three-way simultaneous-capture edge cases
all passed.

---

# 2. Dimensional recurrence does NOT imply inevitable collision

Random exact modular worlds, 2,000 pairs per dimension:

|   D |   cases |   ever_collision_fraction |   persistent_fraction |   median_collision_period |
|----:|--------:|--------------------------:|----------------------:|--------------------------:|
|   1 |    2000 |                    0.792  |                 0.015 |                         9 |
|   2 |    2000 |                    0.5225 |                 0     |                        63 |
|   3 |    2000 |                    0.299  |                 0     |                       455 |
|   4 |    2000 |                    0.1355 |                 0     |                      2520 |
|   5 |    2000 |                    0.054  |                 0     |                      6435 |
|   6 |    2000 |                    0.0195 |                 0     |                      9240 |
|   7 |    2000 |                    0.0025 |                 0     |                    180180 |
|   8 |    2000 |                    0.0015 |                 0     |                     10920 |
|   9 |    2000 |                    0      |                 0     |                       nan |
|  10 |    2000 |                    0      |                 0     |                       nan |
|  11 |    2000 |                    0      |                 0     |                       nan |
|  12 |    2000 |                    0      |                 0     |                       nan |

This is one of the most important negative results in v0.27.

Adding independent dimensions generally adds compatibility conditions.  In this finite
random ensemble, exact recurrence became rarer with dimension rather than inevitable.

This does not contradict continuous one-circle recurrence.  It demonstrates that
multi-coordinate sampled recurrence is a simultaneous-congruence problem.

---

# 3. Astronomical future jump

Constructed pairwise-coprime dimensional cycles were chosen so that the next collision
was nearly one complete global period away.

|   D |   period_decimal_digits |   next_collision_decimal_digits |   solver_microseconds | verified_exact   |
|----:|------------------------:|--------------------------------:|----------------------:|:-----------------|
|   1 |                       7 |                               7 |                54.793 | True             |
|   2 |                      13 |                              13 |                42.835 | True             |
|   3 |                      19 |                              19 |                32.109 | True             |
|   4 |                      25 |                              25 |                35.133 | True             |
|   5 |                      31 |                              31 |                40.641 | True             |
|   6 |                      37 |                              37 |                45.148 | True             |
|   8 |                      49 |                              49 |                64.818 | True             |
|  10 |                      61 |                              61 |                71.648 | True             |
|  12 |                      73 |                              73 |                85.54  | True             |
|  16 |                      97 |                              97 |               186.441 | True             |

At D=16 the next collision tick was a **97-digit integer**, and the solver returned and
verified it in roughly the measured sub-millisecond range on this run.

The engine did not enumerate the skipped ticks.

This is the strongest successful part of the user's "measure the recurrence and jump"
idea.

---

# 4. Exact non-crossing/capture automaton

For the discrete capture layer, a collision is no longer pass-through.

Colliding clusters are merged under exact perfectly-inelastic momentum:

    m' = m_a + m_b
    v' = (m_a v_a + m_b v_b) / m'.

Velocity is stored with `fractions.Fraction`, so no rounding is introduced.

The event-driven engine was compared against an independent tick-by-tick capture oracle:

    400/400 final states and collision schedules matched exactly.

|   D |   cases |   exact |   formulas_with_capture |   median_events |   median_ticks_skipped |   median_event_us |   median_brute_us |   median_speedup |
|----:|--------:|--------:|------------------------:|----------------:|-----------------------:|------------------:|------------------:|-----------------:|
|   1 |     100 |     100 |                     100 |               3 |                     47 |           383.329 |           312.978 |         0.816474 |
|   2 |     100 |     100 |                      95 |               3 |                     47 |           705.015 |          1416.39  |         2.00902  |
|   3 |     100 |     100 |                      72 |               1 |                     49 |           601.639 |          2528.62  |         4.20288  |
|   4 |     100 |     100 |                      22 |               0 |                     50 |           456.485 |          3517.16  |         7.70489  |

Rational velocities created by prior captures were therefore exercised by later
collision prediction.

---

# 5. Event-driven speed scaling

A 4D seven-cluster world with no possible pair collision was evolved to increasing
horizons.

|   D |   clusters |   horizon |   events |   ticks_skipped |   event_seconds |   brute_seconds |   speedup | exact_final_match   |
|----:|-----------:|----------:|---------:|----------------:|----------------:|----------------:|----------:|:--------------------|
|   4 |          7 |       100 |        0 |             100 |     0.000786692 |      0.00960172 |   12.2052 | True                |
|   4 |          7 |      1000 |        0 |            1000 |     0.000827283 |      0.09369    |  113.25   | True                |
|   4 |          7 |      5000 |        0 |            5000 |     0.000684466 |      0.482775   |  705.331  | True                |
|   4 |          7 |     20000 |        0 |           20000 |     0.000758188 |      1.86502    | 2459.84   | True                |

The exact event engine certified that there was no event, then advanced directly to the
requested horizon.

At horizon 20,000 the measured Python speedup over tick stepping was about
2459.8x on that one benchmark.

This is not an asymptotic performance theorem.  It demonstrates the intended complexity
shift:

    cost proportional to meaningful events,
    not automatically proportional to elapsed ticks.

---

# 6. Exact dimensional observability

A hidden linear trajectory over GF(p) is

    x(t)=x0+t v

with D position parameters and D velocity parameters.

A scalar probe at phase j observes

    y_j = a_j · x(t_j).

Therefore one cycle has measurement matrix A with 2D unknown columns.

Exact rank gives the number of compatible hidden states:

    ambiguity = p^(2D-rank(A)).

The deterministic universal cycle in v0.27 uses Vandermonde rows.

|   D |   scalar_measurements |   rank |   hidden_parameters |   ambiguity_exponent |               ambiguity_count | fully_observable   |
|----:|----------------------:|-------:|--------------------:|---------------------:|------------------------------:|:-------------------|
|   2 |                     2 |      2 |                   4 |                    2 |                         66049 | False              |
|   2 |                     3 |      3 |                   4 |                    1 |                           257 | False              |
|   2 |                     4 |      4 |                   4 |                    0 |                             1 | True               |
|   3 |                     3 |      3 |                   6 |                    3 |                      16974593 | False              |
|   3 |                     5 |      5 |                   6 |                    1 |                           257 | False              |
|   3 |                     6 |      6 |                   6 |                    0 |                             1 | True               |
|   4 |                     4 |      4 |                   8 |                    4 |                    4362470401 | False              |
|   4 |                     7 |      7 |                   8 |                    1 |                           257 | False              |
|   4 |                     8 |      8 |                   8 |                    0 |                             1 | True               |
|   5 |                     5 |      5 |                  10 |                    5 |                 1121154893057 | False              |
|   5 |                     9 |      9 |                  10 |                    1 |                           257 | False              |
|   5 |                    10 |     10 |                  10 |                    0 |                             1 | True               |
|   8 |                     8 |      8 |                  16 |                    8 |          19031147999601100801 | False              |
|   8 |                    15 |     15 |                  16 |                    1 |                           257 | False              |
|   8 |                    16 |     16 |                  16 |                    0 |                             1 | True               |
|  12 |                    12 |     12 |                  24 |                   12 | 83022819845310162051379891201 | False              |
|  12 |                    23 |     23 |                  24 |                    1 |                           257 | False              |
|  12 |                    24 |     24 |                  24 |                    0 |                             1 | True               |

For an **arbitrary unconstrained** position+velocity state, fewer than 2D scalar
measurements cannot have rank 2D.  This is an information/linear-algebra bound, not a
benchmark accident.

At M=2D the tested cycle has full rank and recovered every tested state exactly through
D=12.

This sharpens the universal-cycle hypothesis:

> a single cycle can contain many axes simultaneously, but it must carry enough
> independent information for the number of unknown generator parameters.

Structure can reduce the number of unknowns; measurement alone cannot.

---

# 7. Tesseract / hypercube compilation

The reflected Gray generator

    g(t)=t XOR (t >> 1)

gives direct access to the vertex at any tick of the D-dimensional hypercube without
storing all 2^D vertices.

|   dimension |             vertices |   vertices_decimal_digits |   adjacency_checks | all_gray_edges_exact   |   jump_tick_digits |   direct_jump_microseconds |   vertex_popcount |
|------------:|---------------------:|--------------------------:|-------------------:|:-----------------------|-------------------:|---------------------------:|------------------:|
|           2 |                    4 |                         1 |                  8 | True                   |                  7 |                      1.772 |                 1 |
|           3 |                    8 |                         1 |                  8 | True                   |                  7 |                      1.062 |                 2 |
|           4 |                   16 |                         2 |                  8 | True                   |                  8 |                      0.941 |                 3 |
|           8 |                  256 |                         3 |                  8 | True                   |                  9 |                      0.931 |                 7 |
|          16 |                65536 |                         5 |                  8 | True                   |                 11 |                      1.582 |                15 |
|          24 |             16777216 |                         8 |                  8 | True                   |                 14 |                      1.863 |                23 |
|          32 |           4294967296 |                        10 |                  8 | True                   |                 16 |                      2.854 |                31 |
|          48 |      281474976710656 |                        15 |                  8 | True                   |                 21 |                      3.525 |                47 |
|          64 | 18446744073709551616 |                        20 |                  8 | True                   |                 26 |                      4.687 |                63 |

The D=4 case is the tesseract graph.

All sampled consecutive and wraparound pairs differed in exactly one bit.

This is not a new Gray-code result.  It is included as a clean demonstration of the
compiler philosophy:

    exponentially many structured states
    can have a tiny exact generator.

The same statement is not true for arbitrary state sets.

---

# 8. 3D capture/contact model

The continuous 3D layer is intentionally separated from the proof-grade discrete core.

After explicit capture, relative velocity is decomposed into:

    normal impact speed;
    tangential wrapping speed.

For equal masses, the simple normal rigid-contact impulse used for diagnostics is

    |J_n|=(1+e)m|v_n|/2.

Tangential relative speed drives the synthetic initial wrapping rate

    omega0 = |v_t| / rho.

A helical contact path with radius R and pitch p has

    b = p/(2*pi)
    curvature = R/(R^2+b^2)
    torsion   = b/(R^2+b^2)
    ds/dtheta = sqrt(R^2+b^2).

Independent derivative-formula validation:

    100/100 curvature/torsion cases.

---

# 9. "3D time" becomes contact-propagation time

The toy law uses damped angular speed

    omega(t)=omega0 exp(-gamma t).

Therefore

    theta(t)=omega0/gamma * (1-exp(-gamma t))

for gamma>0.

The requested contact length becomes a required wrapping angle and can be solved
analytically.

High-precision validation:

    500/500 equations passed;
    maximum measured relative residual = 1.319e-14.

Random finite sweep reachability:

    0.706

under the selected parameter distribution.

Thus **capture does not imply full ravel in this toy model**.  If damping exhausts
available angular displacement before the required contact length is reached, full
contact is unreachable.

This directly rejects the stronger assumption that every non-crossing contact must
inevitably zip completely.

---

# 10. Equal mass does not erase impact information

At fixed 45-degree impact geometry and gamma=0.2:

|   equal_mass_each |   relative_speed |   normal_speed |   tangential_speed |   normal_impulse_e0 |   omega0 | full_ravel_reachable   |   full_ravel_time |   max_available_turns |   required_turns |
|------------------:|-----------------:|---------------:|-------------------:|--------------------:|---------:|:-----------------------|------------------:|----------------------:|-----------------:|
|                 1 |            0.125 |      0.0883883 |          0.0883883 |           0.0441942 |  0.73657 | False                  |        nan        |              0.586143 |          1.93506 |
|                 1 |            0.25  |      0.176777  |          0.176777  |           0.0883883 |  1.47314 | False                  |        nan        |              1.17229  |          1.93506 |
|                 1 |            0.5   |      0.353553  |          0.353553  |           0.176777  |  2.94628 | True                   |          8.72442  |              2.34457  |          1.93506 |
|                 1 |            1     |      0.707107  |          0.707107  |           0.353553  |  5.89256 | True                   |          2.66082  |              4.68915  |          1.93506 |
|                 1 |            2     |      1.41421   |          1.41421   |           0.707107  | 11.7851  | True                   |          1.15546  |              9.37829  |          1.93506 |
|                 1 |            4     |      2.82843   |          2.82843   |           1.41421   | 23.5702  | True                   |          0.544427 |             18.7566   |          1.93506 |
|                 1 |            8     |      5.65685   |          5.65685   |           2.82843   | 47.1405  | True                   |          0.264807 |             37.5132   |          1.93506 |
|                 1 |           16     |     11.3137    |         11.3137    |           5.65685   | 94.2809  | True                   |          0.130651 |             75.0264   |          1.93506 |

Normal impulse scales with normal speed.

Wrapping rate scales with tangential speed.

At low speeds the selected strand cannot accumulate enough total angle to complete the
required contact before damping; above the threshold it can, and contact time falls
rapidly.

So "same weight" is not enough to determine post-impact trajectory.

The impact state needs at least relative speed and direction, and a more physical model
would additionally require friction, material stiffness, deformation, restitution,
contact geometry and boundary conditions.

---

# 11. Dimensional Future Language

v0.27 adds `rrls_dimensional_compiler.py`.

Current exact opcodes:

    SPACE m1 m2 ...
    HAIR name MASS m POS ... VEL ...
    NEXT A B
    CAPTURE_UNTIL horizon
    HYPERCUBE D tick

Fractions are parsed exactly.

Example:

    SPACE 9 10 11 13
    HAIR A MASS 1 POS 0 0 0 0 VEL 1 2 3 4
    HAIR B MASS 1 POS 8 4 5 7 VEL 0 0 0 0
    NEXT A B

compiled to a direct exact next collision at tick 4607 with recurrence period 6435.

The language is intentionally small.  Its purpose is to encode *laws of future motion*
rather than enumerated frames.

---

# 12. What scales cleanly beyond 3D?

There are two different meanings of "dimension" in the engine.

### Coordinate dimension

The exact modular event engine already works for arbitrary D.

Each extra dimension adds another congruence.

### Smooth geometric dimension

In R^2 a regular curve has curvature.

In R^3 the Frenet description adds torsion.

In R^D the generalized Frenet-Serret framework uses a hierarchy of generalized
curvatures.

Therefore there is a legitimate mathematical path toward a curve language whose
descriptor grows by geometric invariants rather than by storing every sampled point.

v0.27 does not yet claim a universal compact descriptor for arbitrary curves.  Arbitrary
curvature functions can themselves contain arbitrarily large information.

---

# 13. What this means for general future simulation

The successful pattern is:

    identify a compact generator;
    certify observability;
    analytically solve its next event;
    skip the deterministic interval;
    update only the interacting cluster;
    promote to a richer generator only when the old one fails.

Examples:

    constant modular velocity -> CRT event jump
    hypercube walk            -> Gray-code direct index
    captured helix            -> analytic contact time
    bounded SAT frontier      -> exact local elimination
    affine SAT residual       -> GF(2) rank.

The common idea is not "higher dimension makes everything easy."

It is:

> **future simulation becomes cheap when a long trajectory has a compact law and the
> next relevant event is analytically reachable from that law.**

---

# 14. Where this does NOT yet go

This engine is not currently a predictor for:

    medicine;
    biological systems;
    markets;
    arbitrary physical reality;
    arbitrary chaotic systems;
    arbitrary SAT instances.

Those domains require validated state variables and dynamical laws.  Biology in
particular includes stochasticity, partial observability, heterogeneous scales,
interventions and measurement error.

The dimensional compiler is an architecture into which validated domain models could be
plugged; it does not create those models automatically.

---

# 15. Prior-art sanity

The mechanisms used here have important classical relatives:

- event-driven hard-sphere / molecular dynamics;
- generalized Chinese Remainder Theorem;
- control-theoretic observability and system identification;
- Frenet-Serret and generalized curvatures;
- Gray codes and Hamilton cycles of hypercubes.

v0.27 does not claim those components as novel.

The RRLS research question is whether a useful **automatic generator-discovery +
next-event + semantic-collapse compiler** can be built across heterogeneous exact
languages without hiding exponential search.

That remains open.

---

# 16. Next wall

The next strong experiment is no longer "add another dimension."

It is:

    GIVEN observations from one universal cycle,
    DISCOVER the smallest exact generator language automatically,
    PROVE that language predicts the next event,
    JUMP,
    and detect when the generator must be promoted.

A useful v0.28 target would compare automatic model selection among:

    affine modular motion;
    periodic recurrence;
    Gray/hypercube motion;
    helix / multi-rotor motion;
    low-dimensional linear state-space models;
    SAT residual algebras.

The proof gate remains closed until generator discovery itself has a rigorous complexity
bound.
