# RRLS v0.27: audited extension 1

Audit date: 2026-09-06. This report accompanies a modified copy of the supplied
v0.27 branch. The separately developed v0.20 branch was not merged into it. Before saving, an intervening v0.27.1 update was reconciled: its recurrence learner, theory revision, corrected physical assumptions, and ten regression tests are preserved. The combined runner executes 20 regression tests plus five legacy self-tests.

## Outcome

The compact future compiler works for the declared modular trajectory model in
the tested cases. Its old verifier, however, could approve false certificates.
That defect is repaired. Small positive wrapping times also rounded to zero in
the old numerical implementation; stable formulas now preserve the tested values.

The new extension recovers polynomial trajectories from scalar geometric probes,
with exact arithmetic over a specified prime field. It has a coefficient normal
form, a rank criterion, an exact ambiguity count, and rejection of observations
that contradict the declared family. It does not discover an unrestricted law
from a finite observation cycle.

## 1. Reproduced implementation defects

The original_failures.json file records checks against copies of the original
source, preserved under original_sources/.

For xA(t)=t and xB(t)=1 modulo 5, the first collision after zero is t=1. The old
verifier accepted all three of these incorrect certificates:

- No collision exists.
- The first collision is t=6.
- The schedule has an incorrect period.

The replacement verifier independently reconstructs primitive coordinate
congruences. It checks gcd compatibility, the least global period, canonical
residue, the requested search bound, and the first eligible tick. A negative
claim must be supported by an actual local or cross-coordinate inconsistency.
It does not call the production next-collision or CRT-combination functions.
This is an executable exact checker, not a mechanically verified formal proof.

The certificate now carries after_tick. Older manually constructed positive
certificates without this field require an explicit after argument at verification.
Calling code with its own search-bound requirement should pass that bound;
otherwise the checker verifies the bound recorded in the certificate.

An additional search-bound error was corrected: the earliest solution strictly
after a negative bound is now computed by the same formula as for positive bounds:

$$t_{\rm next}=r+\left(\left\lfloor\frac{a-r}{P}\right\rfloor+1\right)P.$$

Integer solver parameters reject floating-point or fractional values rather than
silently truncating them. This is not a claim that every legacy API was hardened.

For the damped wrapping law, direct subtraction in 1-exp(-u) and log(1-u)
lost small positive values. With requested angle 10^-20 radians and
omega0=gamma=1, the original functions returned zero angle and signed zero time.
The update uses expm1, log1p, and scaled small-argument forms. The six tested
angles, from 10^-3 to 10^-40, matched a 120-digit Decimal calculation to relative
error below 10^-14. The ravel layer remains floating-point toy mechanics; this
test is not a guarantee over every representable input.

## 2. Fresh computations and historical evidence

| Computation | Result | Independent comparison |
|---|---:|---|
| Exhaustive integer pairs | 16,250 passed | Exact divisibility scan across a complete safe period |
| Generated rational pairs | 600 passed | Same separate scan, dimensions 1–6 and positive/negative bounds |
| Capture worlds | 200 passed | Separate tick evolution, grouping, and momentum implementation |
| Archived analytic ravel rows | 500 matched | Re-evaluation of saved parameters and archived outputs |
| Tiny-angle ravel probes | 6 passed | 120-digit Decimal inverse calculation |
| Polynomial trajectories | 480 recovered | Compare recovered coefficients with generated ground truth |
| Legacy self-tests | 5 passed | Existing release tests |
| New regression tests | 10 passed | Certificate forgeries, limits, and model-family counterexamples |
| Preserved v0.27.1 regression tests | 10 passed | Recurrence prediction, contact behavior, and existing repair checks |

Each generated polynomial case also checks that one fewer observation leaves
exactly 257 possibilities, that an additional valid observation is consistent,
and that corrupting that additional observation causes rejection.

The runner and complete generated inputs are included. The exhaustive pair grid
is specified in config.json; rational inputs and capture initial conditions are
saved separately. The JSON results retain exact integers or fraction strings.

The original collision/capture CSV summaries do not contain sufficient complete
inputs and generator specifications to replay those exact historical worlds.
Consequently, the new 16,850 pairs and 200 worlds are fresh tests, not a claim to
have reproduced the original 1,080/500/500/400 cases.

A fresh 16-dimensional construction has a first collision at a 97-digit tick.
Take pairwise coprime moduli m_k, xA=0, vA=1, xB=m_k-1, vB=0. Every coordinate
requires t=-1 mod m_k, so:

$$t_{\rm next}=\prod_{k=1}^{16}m_k-1.$$

The exact inputs, output, and single-run timing are in fresh_huge_jump.json.
No intermediate ticks were generated. This is a constructed CRT case with a
compact answer, not an arbitrary future-prediction result or reproduction of an
archived timing. Big-integer arithmetic and writing the answer still cost time.

## 3. Where the geometric interpretation breaks

### Discrete coincidence is not continuous non-crossing

On a periodic coordinate of length 4, let:

$$x_A(t)=t,\qquad x_B(t)=1-t.$$

Integer-tick coincidence requires 2t=1 mod 4, which is impossible. But the
continuous trajectories meet at t=1/2. Thus exact agreement between an event
compiler and a tick oracle cannot establish that objects do not cross between
ticks.

The current engine explicitly models integer-time equality of rational point
coordinates. Finite-radius curves require contact distance constraints and a
continuous collision algorithm across each intervening interval. That is a
different specification, discussed in the primary research on
[geometrically exact continuous collision detection](https://www.cs.ubc.ca/~rbridson/docs/brochu-siggraph2012-ccd.pdf).

### Angular impulse was mislabeled as torque in the attached note

For a contact impulse J applied at lever arm r, the corresponding angular impulse
is:

$$\Delta\mathbf L=\mathbf r\times\mathbf J.$$

Torque is the time derivative of angular momentum. In a fixed-axis model with
constant scalar inertia, I Delta omega is the relevant angular impulse component;
there is no additional multiplication by the collision duration. General 3D
rigid-body contact also requires an inertia tensor and rotational effective mass.
See [MIT's angular-momentum lecture](https://ocw.mit.edu/courses/2-003j-dynamics-and-control-i-spring-2007/6a37882fb3147897a4ebbcee39bd791a_lec09.pdf).

The update adds a signed closing-contact helper: with the normal pointing from B
to A and relative velocity vA-vB, a separating pair receives zero normal impulse.
The existing impact_impulse_equal_mass API retains the signed behavior introduced in v0.27.1. The unsigned formula is separately named impact_impulse_magnitude_equal_mass and must not be mistaken for a complete contact resolver.

### Capture is an extra law, not a consequence of geometry alone

Non-penetration permits sliding, bouncing, or separation. Persistent capture is
an additional constraint or constitutive rule. Reducing the number of point
clusters does not establish an equal reduction in a flexible system's internal
modes, contacts, or energy.

For closed non-crossing filaments undergoing continuous deformation through
embeddings, knot/link type is preserved. New contact edges can change a constraint
graph without changing knot type. Open strands and reconnection require separate
definitions. The mathematical distinction follows the notion of isotopy; see
[Aceto et al.](https://arxiv.org/pdf/2007.05796).

Under the particular exponential damping law, for gamma>0 and w=|omega0|>0:

$$\theta(t)=\frac{w}{\gamma}(1-e^{-\gamma t}).$$

A positive target below w/gamma is reached in finite time. Equality is approached
only as t tends to infinity; a larger target is unreachable. Finite strand length
alone does not imply finite-time completion.

## 4. New exact language: bounded polynomial trajectories

The caller supplies dimension D, prime p, and degree bound q:

$$\mathbf x(t)=\sum_{k=0}^{q}\mathbf c_k t^k
   \quad\text{in }\operatorname{GF}(p)^D.$$

There are K=D(q+1) independent field coefficients. At probe index j choose:

$$\mathbf a_j=(1,j,\ldots,j^{D-1}),\qquad t_j=j^D.$$

Then the scalar observation is:

$$y_j=\mathbf a_j\cdot\mathbf x(t_j)
     =\sum_{k=0}^{q}\sum_{i=0}^{D-1}c_{k,i}j^{Dk+i}.$$

This is a Vandermonde measurement row with K columns. Distinct j values and
p>K give full rank with K measurements. For consistent observations of rank r,
the exact number of compatible coefficient vectors is:

$$\boxed{p^{K-r}.}$$

With full rank, direct finite-field elimination recovers the coefficients. With
too little rank, RRLS reports ambiguity. If the augmented rank is larger than
the measurement rank, RRLS rejects the supplied family. There is no combinatorial
operator search in this construction.

The coefficient canonicalizer reduces entries modulo p and removes trailing zero
degree rows. It defines a normal form in fixed coordinates. It does not quotient
by rotations, basis changes, or arbitrary algebra isomorphisms.

Dense elimination costs O(M K^2) field operations in the full-rank regime. This
is not a constant-time procedure; field operations have bit costs. The present
implementation deliberately bounds D to 32, degree to 8, coefficient count to
128, and the supported prime to at most 1,000,003. Prime checking is bounded
trial division, not a claimed optimal primality algorithm.

Probe access is also an assumption. The construction requires chosen directions
and indexed finite-field times; it does not turn arbitrary passive recordings
into those measurements. Probe times need not be ordered by j and may repeat.
An experiment must support reordering, simultaneous probes, or repeated access
to the same periodic state as appropriate.

### A family that really breaks and is replaced

Over GF(257), the true trajectory in this example is:

$$x(t)=5-t+t^2.$$

At t=1 and 2 the outputs are 5 and 7. They also fit the line 3+2t exactly.
At t=3, that line predicts 9 but the quadratic produces 11.

The code first identifies the line **within the declared degree-1 family**.
After receiving the third value it rejects that family. Supplying degree bound
2 then recovers the quadratic exactly. This is a working, testable form of
language revision. The caller currently supplies the new bound; the engine does
not independently discover an unrestricted next language.

### Why a finite cycle cannot certify every future

For any positive observation count N, compare two exact generators:

$$g_1(t)=3+2t,\qquad g_2(t)=3+2t+\binom{t}{N}.$$

For integer ticks 0 through N-1, the added term is zero. At tick N it is one.
The observed prefix is identical; the next output differs.

This constructive counterexample shows why unique future identification needs a
restricted model class or additional assumptions. More arithmetic cannot extract
information absent from the observations. Within a declared family, rank can
settle identifiability exactly; without a family restriction, a perfect finite fit
does not establish a universal equation.

## 5. Contract for the next RRLS language

An accepted extension should record:

1. Its input domain, coordinate conventions, and supplied assumptions.
2. A recognizer with a stated complexity bound and explicit failure status.
3. A canonicalizer with the exact equivalence relation it represents.
4. A verifier that checks both positive and negative claims where applicable.
5. An ambiguity witness or count when identification is incomplete.
6. Predictions reserved for new observations that can contradict the family.

The language_contracts.json file states these boundaries for the collision and
polynomial layers. The numerical ravel layer is outside the exact-language gate.

The active research problem is to recognize a useful larger generator family
under specified observation access and resource limits. Continuous filament
contact is a separate missing physical layer. Neither this audit nor a fast CRT
jump proves P=NP, a physical theory of everything, or arbitrary future prediction.

## Reconciliation with the intervening update

The current source was reloaded before applying this extension. Its rrls_generator_guard.py, Theory_of_Reality.md, corrected dimensional report, and audit_v271/ history were retained. The combined verification also reruns 500 recurrence learners and their 14,000 withheld predictions, 1,200 rational-pair worlds, 120 capture regressions, and 21 weak-damping configurations from that update. These are separate from the newly generated cases above. The retained recurrence learner is a bounded-family predictor; this update does not add a universal recurrence-algebra canonicalizer. Historical reports and hashes in audit_v271/ describe the earlier repair, not the final combined modules.
