Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c6e9ce6
Add VF-1 residue-state experiment interface
MatrixFreeSama Aug 24, 2026
a844009
Implement verification-free residue-state survivor core
MatrixFreeSama Aug 24, 2026
9d00e30
Add formal VF-1 residue-state conjecture
MatrixFreeSama Aug 24, 2026
042079c
Add VF-1 residue-state cloud benchmark
MatrixFreeSama Aug 24, 2026
da93a22
Compile VF-1 residue-state module in experimental branch
MatrixFreeSama Aug 24, 2026
1d43670
Document VF-1 residue-state experimental branch
MatrixFreeSama Aug 24, 2026
d165abc
Add reproducible GMP residue-state benchmark
MatrixFreeSama Aug 24, 2026
5643d16
Harden VF residue arithmetic and overflow handling
MatrixFreeSama Aug 24, 2026
97a679f
Fix VF branch source layout and benchmark note
MatrixFreeSama Aug 24, 2026
36fb361
Add explicit VF residue work stack
MatrixFreeSama Aug 24, 2026
aad278e
Replace VF recursion with explicit work stack
MatrixFreeSama Aug 24, 2026
bf49874
Extend VF residue benchmark to million-digit scale
MatrixFreeSama Aug 24, 2026
a790ed0
Add finite-K K/R collapse diagnostic
MatrixFreeSama Aug 24, 2026
5a16d72
Document K and R collapse attempt
MatrixFreeSama Aug 24, 2026
b1c99f6
Add event-staircase jump diagnostic
MatrixFreeSama Aug 24, 2026
7f27536
Document jump-style K/R event collapse
MatrixFreeSama Aug 24, 2026
9559629
Link VF-1 event staircase diagnostic
MatrixFreeSama Aug 24, 2026
c1cbc28
Add logarithmic event-tree diagnostic
MatrixFreeSama Aug 24, 2026
e35a795
Document logarithmic event-tree collapse attempt
MatrixFreeSama Aug 24, 2026
caa230b
Add bounded offset-mask monoid diagnostic
MatrixFreeSama Aug 24, 2026
c8aa711
Document bounded offset-mask monoid collapse
MatrixFreeSama Aug 24, 2026
604da6c
Add factorial collision certificate diagnostic
MatrixFreeSama Aug 24, 2026
74cbbd0
Document symbolic collapse lower bound and factorial certificate
MatrixFreeSama Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 34 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,28 @@ A longer derivation is in [`docs/ALGORITHM.md`](docs/ALGORITHM.md).

**Record-seeded experiment** starts from the exact `(n, p_n)` anchor embedded in the program and uses 128-bit state with a fixed live-recursion depth cap. Values generated beyond the seed are explicitly `PROVISIONAL / UNVERIFIED`; this path is an experiment, not an asymptotic-complexity proof.

## VF-1 residue-state experimental branch

The `vf1-residue-state` branch adds a deliberately verification-free representation for studying whether the large integer can be removed from the inner survivor dynamics after initialization.

For every active dimension it stores

```text
r_j = p mod q_j
```

and uses the exact translation identity

```text
r_j(p + d) = (r_j(p) + d) mod q_j
```

inside the finite-width survivor recurrence. The large integer is therefore used to establish the initial residue field and to receive the final output addition, but is not repeatedly used by the inner divisibility recursion.

This branch does **not** claim exact prime succession without closure. Finite dimension width can miss a later divisor, so its verification-free outputs remain `PROVISIONAL / UNVERIFIED`. The formal conjecture and cloud measurements are documented in [`docs/VF1_RESIDUE_CONJECTURE.md`](docs/VF1_RESIDUE_CONJECTURE.md), [`docs/VF1_RESIDUE_BENCHMARK_2026-08-25.md`](docs/VF1_RESIDUE_BENCHMARK_2026-08-25.md), and [`docs/VF1_EVENT_STAIRCASE_2026-08-25.md`](docs/VF1_EVENT_STAIRCASE_2026-08-25.md).

The event-staircase diagnostic records the observed fact that finite-width gaps are monotone plateaus in `K` interrupted by sparse collision jumps. Its block-GCD locator is explicitly diagnostic because it uses a conventional prime fixture and batched factor-location information; it is not presented as the final VF-1 generation operator.

## NVIDIA path

The host side loads the NVIDIA Driver API dynamically from `nvcuda.dll`. The GPU kernels are written directly in NVIDIA PTX and are embedded into the executable at build time.
Expand All @@ -58,20 +80,23 @@ The host side loads the NVIDIA Driver API dynamically from `nvcuda.dll`. The GPU
## Source layout

```text
source/main.c Win32 UI, task routing, gates and result presentation
source/own_solver.c CPU implementation of the survivor recurrence
source/gpu_solver.c NVIDIA Driver API host implementation
source/gpu_kernel.ptx CUDA/PTX device implementation
source/traditional.c isolated bootstrap / validation routines
source/winmini.h minimal Win32 declarations
source/build.sh freestanding Windows x64 build
source/main.c Win32 UI, task routing, gates and result presentation
source/own_solver.c CPU implementation of the survivor recurrence
source/vf_residue_state.c verification-free finite-width residue experiment
source/gpu_solver.c NVIDIA Driver API host implementation
source/gpu_kernel.ptx CUDA/PTX device implementation
source/traditional.c isolated bootstrap / validation routines
source/winmini.h minimal Win32 declarations
source/build.sh freestanding Windows x64 build
experiments/vf1_residue_gmp.c arbitrary-precision cloud benchmark mirror
experiments/vf1_event_staircase_gmp.c event-staircase / plateau-skipping diagnostic
```

The build has no Python dependency. A small host-side C utility converts the checked-in PTX text into the C header embedded by `gpu_solver.c`.
The build has no Python dependency. A small host-side C utility converts the checked-in PTX text into the C header embedded by `gpu_solver.c`. The GMP benchmarks are isolated under `experiments/` and are not part of the Windows application build.

## Scope of the claim

This repository contains an implementation and an experimental representation of the recurrence. It does **not** claim that constant sequential depth has been proved. Matrix-Free storage, GPU parallelism, and a bounded experimental recursion depth are implementation properties; an asymptotic statement about scale-independent causal depth requires a separate proof.
This repository contains an implementation and an experimental representation of the recurrence. It does **not** claim that constant sequential depth has been proved. Matrix-Free storage, GPU parallelism, a bounded experimental recursion depth, a finite residue-state width, and sparse observed collision events are implementation or experimental properties; an asymptotic statement about scale-independent causal depth requires a separate proof.

## Platform

Expand Down
176 changes: 176 additions & 0 deletions docs/VF1_EVENT_STAIRCASE_2026-08-25.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# VF-1 Event Staircase Diagnostic, 2026-08-25

## Status

This document studies the observed plateau-and-jump structure of the finite-width survivor output. It does not claim an exact verification-free next-prime generator and does not claim causal depth 1.

The diagnostic code is `experiments/vf1_event_staircase_gmp.c`. It deliberately uses a conventional prime fixture and batched GCD products to measure the event structure. Those mechanisms are diagnostic only and are not admissible as the final ZeroCandidatePrime generation core.

## 1. Finite-width staircase

Let

\[
P_K=\prod_{j=0}^{K-1}q_j
\]

and define

\[
g_K(p)=\min\{d\ge1:\gcd(p+d,P_K)=1\}.
\]

For increasing dimension width,

\[
g_{K+1}(p)\ge g_K(p).
\]

Therefore `g_K` is a monotone nondecreasing staircase in `K`.

The plateau rule is exact:

\[
q_K\nmid p+g_K\quad\Longrightarrow\quad g_{K+1}=g_K.
\]

A jump can occur only when the newly admitted dimension hits the current survivor:

\[
q_K\mid p+g_K.
\]

If the dimension sequence is the consecutive-prime sequence and the current survivor `c=p+g_K` is composite, then the next jump dimension is the index of the least prime factor of `c` that is not already active.

This statement is useful as a post-hoc characterization. It is not an admissible generation rule because directly computing that least prime factor would insert factor location into the generator.

## 2. Event representation

Instead of treating every dimension as a causal event, define the jump set

\[
\mathcal E(p)=\{K:g_K(p)>g_{K-1}(p)\}.
\]

Let its ordered elements be

\[
K_1<K_2<\cdots.
\]

Then the finite-width evolution can be written as

\[
(K_0,g_0)\to(K_1,g_1)\to(K_2,g_2)\to\cdots
\]

with all dimensions between `K_t` and `K_(t+1)` belonging to a plateau and therefore producing no change in the survivor gap.

This absorbs the distinction between an explicit dimension scan and a survivor correction round into one event sequence. The new diagnostic quantity is

\[
E(p;K_{max})=|\mathcal E(p)\cap[1,K_{max}]|.
\]

A small `E` does not prove constant causal depth, but it is the appropriate quantity for testing jump-style collapse.

## 3. Target case near 10^100

The target input is

```text
p = 10^100 + 267
```

which was established independently before the experiment as prime. Traditional information is not fed into the recurrence during the finite-width measurements.

The staircase observed through the first 175,692 prime dimensions is:

| active width K | new collision q | gap before | gap after |
|---:|---:|---:|---:|
| 1 | 2 | start | 2 |
| 2 | 3 | 2 | 4 |
| 88,231 | 1,134,709 | 4 | 6 |
| 175,692 | 2,391,019 | 6 | 22 |

Thus the two large plateaus are approximately

```text
g = 4 : K = 2 ... 88,230
g = 6 : K = 88,231 ... 175,691
```

and after the collision at `q=2,391,019` the finite-width survivor becomes `g=22`.

Scanning the diagnostic prime fixture further to `3,000,000` finds no additional jump. The state `p+22` remains composite under an independent post-check, so the next event lies beyond this diagnostic limit.

The independently established exact successor gap for this input remains

\[
g_{exact}=682.
\]

Consequently the sparse event staircase is real, but the observed event sequence has not yet reached exact closure.

## 4. Batched plateau skipping experiment

The diagnostic groups consecutive prime dimensions into blocks. For a current composite survivor `c`, a block product is

\[
B=\prod_{q_j\in\text{block}}q_j.
\]

One test

\[
\gcd(c,B)=1
\]

rejects the entire block as collision-free. A nontrivial GCD marks a hit block, which the diagnostic then resolves locally.

With prime limit `3,000,000`, there are 216,816 prime dimensions. Using block size 512 on the cloud CPU produced the three jump events above while using approximately:

```text
422 block GCD tests
1775 local prime tests
```

for collision location. The event-run portion was about `3.2 ms` on the test machine after the conventional diagnostic fixture had been built.

This demonstrates that long K plateaus can be skipped in large chunks once block products exist.

However this is not a valid VF-1 solution. The block products encode an explicit conventional prime basis, and a nontrivial block GCD is a batched factor-location oracle. The experiment is therefore evidence for the staircase geometry, not a replacement generator.

## 5. R collapse and the remaining obstruction

The previous K/R primorial formulation defines

\[
J_K(z)=\min\{d\ge1:\gcd(z+d,P_K)=1\}.
\]

This absorbs all finite-K survivor correction rounds into one mathematical operator. The event staircase now adds a second reduction: only those K values that invalidate the current `J_K` result are structurally active.

The combined idealized event operator is

\[
\mathcal T_p:(K_t,g_t)\mapsto(K_{t+1},g_{t+1}).
\]

A genuine jump-style VF-1 collapse would require computing this map without:

- enumerating the skipped dimensions,
- locating a prime factor of the current survivor,
- materializing a candidate interval,
- using a precomputed prime or wheel table,
- or feeding a primality/factorization/next-prime result into generation.

The current code does not yet have such an operator.

## 6. Main conclusion

The experiments support the following structural statement:

> Finite-width survivor evolution is sparse in K: most newly admitted dimensions are null events, and the output changes only at collision dimensions. The observed trajectory is therefore better represented as a jump staircase than as a uniform level-by-level evolution.

The unresolved problem is no longer merely to make `K` larger. It is to predict or absorb the next collision event without computing the hidden least-prime-factor information that characterizes that event after the fact.
Loading