# RRLS v0.27 source audit and v0.27.1 repair

6 September 2026 · Theory of Reality revision 1.15

## Scope and provenance

The new attachment was read as a report to verify. The associated source archive and full dimensional report were then retrieved and inspected. This audit preserves the original modules and recorded failures in audit_v271/original/.

The supplied integer/rational congruence model is coherent within its declared sampled-time semantics. That is distinct from a continuous finite-radius strand simulation. Its generalization to arbitrary generator discovery also requires a stated model class.

This release repairs concrete source defects and adds a bounded generator-identification module. It does not reassert every historical benchmark as a newly reproduced result.

## 1. Four reproduced defects

| Issue | Original behavior | Repair |
|---|---|---|
| Weak damping, \(\omega=1,\gamma=10^{-20},t=1\) | Accumulated angle 0; inverse time for one radian returned −0 | Stable expm1/log1p formulas return approximately one radian and one second |
| Signed starting tick | For \(t\equiv2\pmod5,\ t>-10\), returned 2 | Correct earliest tick is −8 |
| Collision verifier | Accepted an arbitrary “no collision” result without testing the claim | Rechecks existence, residue, period, persistent status, and earliest requested event |
| Separating contact | Returned impulse 0.5 for separating unit relative speed under the stated normal convention | Returns zero for nonapproaching contact; states the central/point-mass assumptions |

The ravel API now also rejects direct NaN/infinity inputs for the checked physical parameters. These changes do not constitute a complete validation of every numerical extreme or every API in the inherited package.

The repaired verifier reuses the schedule solver. It is a consistency checker, not an independent proof kernel. Independent full-period enumeration is used in the new small-world tests.

For damped winding, the corrected formulas are

\[
\theta(t)=-\frac{\omega_0}{\gamma}\operatorname{expm1}(-\gamma t),
\qquad
t=-\frac{\operatorname{log1p}(-\gamma\Theta/\omega_0)}{\gamma}.
\]

The code rearranges multiplication/division and uses the zero-ratio limit to reduce avoidable numerical loss. Finite completion requires \(0<\Theta<|\omega_0|/\gamma\) when \(\gamma>0\). Equality is reached only asymptotically; a larger target is unreachable under that law. Zero requested angle is already complete.

## 2. Correct the mechanics in the attachment

The attachment wrote torque as \(\mathbf r_c\times\mathbf J_t\), then multiplied by another time interval. But \(\mathbf J_t\) is already a time-integrated force. The correct impulse relation is

\[
\boxed{\Delta\mathbf L=\mathbf r_c\times\mathbf J_t.}
\]

For a fixed inertia tensor during an ideal instantaneous impact,

\[
\mathbf I\,\Delta\boldsymbol\omega=\mathbf r_c\times\mathbf J_t.
\]

Torque instead uses force, \(\boldsymbol\tau=\mathbf r_c\times\mathbf F_t\), and \(\Delta\mathbf L=\int\boldsymbol\tau\,dt\). The extra time factor must not be applied to angular impulse. [MIT angular momentum notes](https://ocw.mit.edu/courses/8-01sc-classical-mechanics-fall-2016/mit8_01scs22_chapter19.pdf)

The simple equal-mass impulse formula applies to point masses or frictionless central impacts. For general rigid bodies, use relative **contact-point** velocity, including rotational contributions. With normal from B toward A, normal approach speed \(v_n<0\), and world-frame inertia tensors,

\[
J_n=-\frac{(1+e)v_n}{
1/m_A+1/m_B+
(\mathbf r_A\times\mathbf n)^\top\mathbf I_A^{-1}(\mathbf r_A\times\mathbf n)+
(\mathbf r_B\times\mathbf n)^\top\mathbf I_B^{-1}(\mathbf r_B\times\mathbf n)}.
\]

The equal-mass denominator reduces to \(2/m\) when the rotational terms vanish. Tangential friction and persistent bonding need additional laws. The repaired helper implements the simpler central-impact case; it does not implement this full rigid-body response. [Kavan, Rigid Body Collision Response](https://users.cs.utah.edu/~ladislav/kavan03rigid/kavan03rigid.pdf)

## 3. Sampled coincidence does not enforce continuous non-crossing

Take one modular coordinate with circumference 10:

\[
x_A(t)=t,\qquad x_B(t)=1-t\pmod{10}.
\]

Equality requires \(2t\equiv1\pmod{10}\), which has no integer solution. The exact integer-tick engine correctly returns no collision. Nevertheless, the trajectories intersect at \(t=1/2\).

Thus the existing capture layer is an **integer-tick point-coincidence capture automaton**. A continuous non-crossing strand model would need continuous contact detection, strand geometry, and contact/bond dynamics. Agreement between two sampled-time implementations cannot establish that different physical specification.

Other interpretation boundaries:

- Nonpenetration does not imply adhesion. Even zero restitution does not specify a permanent bond.
- Adding a bond changes the contact graph or mechanical constraints. Non-crossing motion of closed embedded curves does not, by itself, change knot or link type.
- Combining extended strands into one object does not remove their internal deformation modes. The point-cluster abstraction deliberately omits these.
- Momentum-preserving inelastic merging loses kinetic energy. For two point masses the lost translational energy is
  \[
  \Delta K=\frac{m_A m_B}{2(m_A+m_B)}\|\mathbf v_A-\mathbf v_B\|^2.
  \]
  A physical account must assign that energy to heat, deformation, or other degrees of freedom.
- The helix arclength per turn is valid for a specified helix. A turn-count bound is not proof that a finite-thickness strand can form that helix without self-intersection or that wrapping completes in finite time.

Persistent merge-only point capture permits at most \(N-1\) nontrivial merge events, because each event decreases the number of clusters. This bounds event count in that automaton. It does not bound arbitrary internal strand dynamics or solve general constraint satisfaction.

## 4. One observed cycle cannot identify every possible generator

For any positive integer \(N\), define two compact periodic generators

\[
a(t)=0,\qquad b(t)=\mathbf1[t\bmod(N+1)=N].
\]

They agree on all integer samples \(t=0,\ldots,N-1\), then differ at \(t=N\). Both have short descriptions; the second stores \(N\) in binary. Therefore a finite prefix cannot certify a unique generator across every compact language.

This is an exact indistinguishability argument, not a numerical failure. A claimed exact period known in advance would change the assumptions: a complete discrete cycle then fixes the future by periodicity. Observing a finite repeated pattern does not itself prove that assumption.

## 5. A bounded generator-discovery theorem that does work

Restrict the candidate language to noiseless sequences over a fixed prime field satisfying a homogeneous constant-coefficient linear recurrence of order at most \(K\):

\[
a_n=c_1a_{n-1}+\cdots+c_ra_{n-r},\qquad r\le K,\ n\ge r.
\]

**Theorem.** Any two such sequences agreeing on their first \(2K\) terms agree forever.

**Proof.** Let the sequences have monic annihilating polynomials \(P\) and \(Q\) in the forward shift operator, with degrees at most \(K\). Since polynomials in that operator commute, \(PQ\) annihilates their difference. Its degree is at most \(2K\). The initial \(2K\) zero differences include enough initial zeros for that monic recurrence, which then forces every later difference to be zero. This proves uniqueness of the continuation inside the stated class. It does not require a unique coefficient representation.

Learning linear feedback recurrences is established mathematics, including the Berlekamp–Massey tradition. The new module uses a simpler bounded-order modular elimination procedure; it does not implement or claim novelty for Berlekamp–Massey. [Massey, Shift-register synthesis and BCH decoding](https://ieeexplore.ieee.org/document/1054260/)

The new rrls_generator_guard.py:

1. validates a bounded prime field and the order bound;
2. refuses a class-wide guarantee with fewer than \(2K\) samples;
3. searches for a fitting recurrence of order at most \(K\);
4. reports no model if none fits;
5. computes future terms by companion-matrix exponentiation.

The source assumes consecutive noiseless samples and a recurrence valid from the initial state. It does not test whether nature actually belongs to that class. A finite number of good predictions can support the assumption, but cannot establish it universally.

The straightforward order search uses at most \(O(MK^4)\) field operations for \(M\) samples; jump evaluation uses \(O(r^3\log t)\) field operations. Integers require bit-level arithmetic, field validation has its own cost, and the implementation caps \(p\le65521\), \(K\le64\). No search over all programs or all physical laws is claimed.

## 6. Newly executed results

All ten new test groups passed:

| Check | New coverage |
|---|---:|
| Rational modular pairs, compared over a complete relative period, including signed start times | 1,200 worlds |
| Event versus tick capture regression | 120 worlds |
| Weak-damping formulas versus 100-digit Decimal calculations | 21 configurations |
| Bounded recurrence learning | 500 generated sequences |
| Values excluded from recurrence fitting | 14,000 exact predictions |
| Finite-prefix indistinguishability examples | 6 prefix lengths |

The five original compact self-tests also passed. They are distinct from rerunning every archived v0.27 benchmark.

From the six samples \(0,1,1,2,3,5\) over GF(257), with maximum order three, the learner recovered the recurrence with coefficients \((1,1)\). It computed

\[
\boxed{a_{10^{96}}=160\pmod{257}.}
\]

An independent Fibonacci fast-doubling evaluator verified that value. This is a new reproducible 97-digit-index example; it is not a reproduction of the original collision benchmark's 186-microsecond timing.

The original collision CSV does contain a 97-digit tick. Its original input tuple and benchmark-generation script were not reconstructed in this audit, so its timing and every associated original-run claim remain historical reports.

## 7. Run on a PC and remaining work

The new modules and tests use Python's standard library. Tested here on Python 3.12.13:

~~~powershell
py -3.12 rrls_v27_selftest.py
py -3.12 test_v27_hardening.py
py -3.12 rrls_generator_guard.py
~~~

Original modules and failure records are preserved in audit_v271/. The GUI remains the v0.27 interface; the new generator learner is a Python API and console module. A Windows executable was not rebuilt or tested in this audit.

The inherited exact APIs still have broader validation gaps, including some integer coercions and finite-field assumptions; this focused repair is not a complete audit of the entire studio. A physically faithful strand model additionally needs contact geometry, friction, bending/torsion energy, bonding/release rules, and continuous event handling.

The supported improvement is a corrected recurrence engine and an explicit boundary between learning inside a declared language and identifying the language of nature. No P=NP result or seven-dimensional physical law follows.
