1. Historical Context and the Position of This Work
The oldest ingredient is the product of [1] Wallis in 1656, the first infinite product for
, whose partial and tail factorizations carry, as this paper shows, an arithmetic of primes sewn invisibly into their Gamma function closed forms. The primality detector is the theorem announced by [2] Waring in 1770 and attributed to his student Wilson, first proven by [3] Lagrange in 1771: an integer
is prime exactly when P divides
. The bridge between the analytic and arithmetic halves is the duplication formula of [4] Legendre, which closes the Wallis tail in half integral Gamma values. The classical twin criterion of [5] Clement in 1949 characterizes twin pairs by a single congruence modulo
; the present paper shows that criterion factorizes exactly into the two conditions of its lattice theory. The analytic study of twins begins with [6] Brun in 1919, whose sieve proved the twin reciprocal sum converges, and [7] Hardy and Littlewood in 1923, whose singular series predicts the density that appears here as the bias of a two valued sequence. The class structure of the solution lattice is governed by the two square theorem of [8] Jacobi in 1829, resting on the arithmetic of the Gaussian integers introduced by [9] Gauss. The modern results framing the final section are the theorem of [10] Chen in 1973, that infinitely many primes
have
with at most two prime factors; the bounded gaps theorem of [11] Zhang in 2014; and the multidimensional sieve of [12] Maynard in 2015, whose conjectural ceiling at gap six is explained mechanically by the zero slack reading of Section 10. The sigma cascade, the dynamical system whose fixed points are exactly the lower twins and which is shown in Section 5 to generate every solution of the cubic, is constructed and studied in the author’s campaign monograph with Claude (Anthropic).
2. The Wallis Product and Its Tail
The starting point is the Wallis product,
(1)
Splitting at an odd integer P, the partial product over
has the central binomial closed form
(2)
and applying the duplication formula of [4] Legendre to both even argument Gamma factors yields:
Proposition 1.1 (the tail identity). For every integer
,
(3)
as verified by computation to twenty four decimal places at
.
The role of the Wallis product here is foundational but motivational: the construction was discovered inside the factorization (1), where the Wilson quotients first arise through the tail (3), whose denominators carry
. The proof of the cubic below is self-contained, proceeding from Wilson’s theorem and the Gamma functional equation alone. The two routes are connected exactly: dividing the tail identity (3) at P by the same identity at
produces the transport factor
, the square of Equation (6); the Wallis tail is the analytic vessel in which the transport, and with it the cubic, was first visible.
3. Wilson’s Theorem and the Detector Integers
For an odd prime P, Wilson’s theorem in Gamma form states
(4)
with the converse holding for every composite
. Define for odd P the Wilson quotient
(5)
so that
identically.
Lemma 2.1 (integrality criterion). For odd
,
is an integer if and only if P is prime. At
the quotient
is integral although 1 is not prime; accordingly, every primality equivalence in this paper is asserted for odd
. As verified by computation:
,
,
,
,
, while
is not an integer.
Through
, the tail (3) acquires the factor
in its denominator: the primality of P becomes the integrality of a constant inside the Wallis factorization of
.
4. The Transport across the Gap and the Cubic
The Gamma functional equation carries the structure across the twin gap in one step of exact degree two:
(6)
as verified by computation (30 at
; 132 at
). Writing both ends in Wilson form,
and
with
and
, the transport becomes
(7)
and expanding yields the central object of this paper.
Theorem 3.1 (the cubic law, 2009). Let
be an odd integer and set
and
by (5). Then the identity
(8)
holds for all odd P as an identity of rational numbers; and the pair
consists of two integers if and only if P and
are both prime. Consequently, among the points whose coordinates are fixed by the factorial definitions (5), the integral ones correspond exactly to the odd twin prime pairs; the unrestricted integer solutions of (8) at a fixed station form the lattice of Section 6 and exist at every odd station.
Proof. The left side of (8) is the expansion of (7) collected in powers of P, so (8) holds identically with the rational values (5). By Lemma 2.1 and its analog at the upper element, both quotients are integral precisely when both elements of the pair are prime; conversely an integer point forces both Wilson congruences. End of proof.
The degree records the price of the pair in this frame: the base structure is linear and the gap transport (6) costs degree two; three is the algebraic cost of a gap of two under the Gamma functional equation (Table 1).
Table 1. Certification of the cubic, as verified by exact integer computation.
pair (P, P + 2) |
NP |
NP+2 |
cubic (8) |
(5, 7) |
5 |
103 |
0 |
(11, 13) |
329,891 |
36,846,277 |
0 |
(17, 19) |
1,230,752,346,353 |
336,967,037,143,579 |
0 |
(29, 31) |
10,513,391,193,507,374,500,051,862,069 |
8,556,543,864,909,388,988,268,015,483,871 |
0 |
(7, 9) |
103 |
not an integer |
no integer solution |
5. Relation to Clement’s Criterion
Proposition 4.1. The criterion of [5] Clement, that P and
are both prime if and only if
(9)
factorizes exactly into the two conditions of the present theory: the congruence (9) holds if and only if P divides
(the integrality criterion, Lemma 2.1) and
divides
(the divisibility criterion, Theorem 6.4). As verified by computation at
: the three conditions agree in every case.
The cubic frame thus contains the classical criterion, factored element by element, and the lattice theory below assigns each factor its own geometric meaning.
6. The Sigma Cascade and the Composition Theorem
Definitions. The cascade is the map
on integers
. An orbit is the sequence
; a seed is captured if its orbit reaches a fixed point of T, and the fixed point it reaches is its terminal, written
and called informally its harbor. The basin of a fixed point is the set of seeds captured by it, and its gravity is the number of captured non fixed seeds in its basin within a stated range. Whether every seed is captured is not asserted anywhere in this paper: every basin statement below is a finite range computation with its range stated.
Proposition 5.0 (fixed points and ascent). (i)
for every
. (ii)
if and only if
and
are both prime: the fixed points of T are exactly the lower members of twin prime pairs, and T ascends strictly off its fixed points.
Proof. Since
for every
, the internal chain
,
,
,
,
gives
, proving (i). Equality throughout forces
,
, and
, that is,
,
, and
all prime; conversely, if
and
are both prime the chain computes
,
,
,
,
, and
. End of proof.
Define the Wilson map
(10)
and let C denote the integer solution set of (8) under (5).
Theorem 5.1 (composition). The composition
is well defined from captured seeds onto C; it is surjective, because every twin lower is a fixed point by Proposition 5.0 (ii) and is therefore captured at least by itself; its fiber over each solution is exactly the basin of the corresponding harbor, so the multiplicity with which the dynamics generates a solution equals the harbor’s gravity; and the twin prime conjecture is the statement that C is infinite, read in either frame. As verified by computation: the fifty nine harbors reached from the first thousand seeds manufacture fifty nine integer solutions, each vanishing exactly, the largest with Wilson quotients of 462 and 467 digits.
Theorem 5.2 (uniqueness and counting). For each terminal prime P there is exactly one integer solution under the normalization (5); distinct terminals yield distinct solutions, the values
being strictly increasing; hence the normalized solution set is in bijection with the twin lowers and the counting functions coincide identically: the number of solutions with
equals
. Moreover the solution is pinned by a second congruence beyond the lattice class of Section 6: reading Wilson at the upper element modulo P gives
(11)
as verified by computation at all fifty nine harbors.
7. The Lattice of Integer Solutions
Fix an odd station P and write
,
,
. The cubic (8), linear in the pair
with
, is the station line
(12)
Proposition 6.1 (solvability). For odd P the coefficients A and
are coprime and (12) has integer solutions; for even P the greatest common divisor is even while B is odd, and the line is lattice empty. As verified by computation: the lines of stations 2 and 4 contain no integer point.
Theorem 6.2 (the Quarter Law). Modulo
one has
, whence
and
: every station line reduces to the single universal congruence
(13)
with closed form base point
(14)
and full integer solution family, the string of beads,
(15)
As verified by computation at all nineteen distinct harbors of the author’s pencil census, including
where (14) gives 2,519,040 (Table 2).
Table 2. Quarter Law base points, selected stations, as verified by computation.
P |
q |
q mod 4 |
base N0 |
first beads (N, M) |
3 |
5 |
1 |
1 |
(1, 5), (6, 41), (11, 77) |
5 |
7 |
3 |
5 |
(5, 103), (12, 253) |
11 |
13 |
1 |
3 |
(3, 325), (16, 1777) |
71 |
73 |
1 |
18 |
stride (73, 362,952) |
10,076,159 |
10,076,161 |
1 |
2,519,040 |
stride (q, 21 digit A) |
Theorem 6.3 (the divisor transpose). N lies on the string of station P if and only if
divides
. Consequently, the strings through a fixed column N correspond bijectively to the divisors of
that are at least five: the pencil’s incidence geometry is the divisor structure of the progression
. As verified by computation at
:
, and
is a bead on the lines of
.
Theorem 6.4 (factorization of the twin criterion). At the Wilson point the twin condition splits into the lattice’s two membership types:
is an integer if and only if P is prime (the integrality criterion); and, for prime P, the point lies on its own string, that is
divides
, if and only if
is prime (the divisibility criterion), by the Wilson corollary
for prime
, an identity that fails for composite
. Being an integer is the condition at the lower element; lying on the string is the condition at the upper element. As verified by computation: twins pass both;
pass integrality and fail divisibility.
Figure 1 displays the strings of four stations with the seated certificates, and Figure 2 displays the divisor transpose.
Figure 1. The lattice map: bead strings of stations 3, 5, 11 (twin lines, certificates starred) and 13 (whose Wilson point misses its string).
Figure 2. The divisor transpose: a dot at (N, q) exactly when q divides 4N + 1; stars mark the moduli of twin pairs.
8. The Class Theorem
Proposition 7.1. On each string the integer solutions form a single residue class in each coordinate: a torsion under translation; class number one on every line.
Proposition 7.2. Across the pencil the lines fall into exactly two classes by
modulo 4, the two branches of (14); the twin harbors populate both classes.
Theorem 7.3. (the Jacobi class identity). Through any column N, the number of incident class one lines minus the number of incident class two lines, counted over all divisors of
, equals
(16)
the two square theorem of [8] Jacobi, counted over all divisors of
including 1 and, when present, 3. The geometric station correspondence of Theorem 6.3 begins at
, so the divisors 1 and 3 correspond to no station; the corrected incidence law for the lines themselves is
(17)
the pencil’s incidence classes being counted by representations as sums of two squares, the class structure of the lattice the arithmetic of the Gaussian integers of [9] Gauss. As verified by computation at the columns of Table 3, both the all divisor identity (16) and the corrected line count (17) hold in every case.
Table 3. The Jacobi class identity (16) and the corrected line count (17), as verified by computation.
N |
4N + 1 |
d1 |
d3 |
d1 − d3 = r2/4 |
class I
lines |
class II
lines |
line
difference |
corrected
law (17) |
6 |
25 |
3 |
0 |
3 |
2 |
0 |
2 |
2 |
11 |
45 |
4 |
2 |
2 |
3 |
1 |
2 |
2 |
26 |
105 |
4 |
4 |
0 |
3 |
3 |
0 |
0 |
56 |
225 |
6 |
3 |
3 |
5 |
2 |
3 |
3 |
9. The Dynamics of the Reading: The Discharge Law
Replacing the exact quotients in (8) by their integer parts converts the identity into an instrument. With
and
the two Wilson residues, the integer reading is
(18)
zero exactly at twins. For every composite
the residue
equals 1, so at the machine’s typical station, composite P with
prime, the reading is exactly minus the transport coefficient,
(19)
as verified by computation along the voyage of seed 13: readings −462, −2070, −9120, −31506, each exactly
, then 0 at the harbor 239. The polynomial charges quadratically with the ascent and discharges to zero at the instant of twinhood.
10. The Unit Miss Theorem
Theorem 9.1 (unit miss). For every odd prime P, the membership residue
(20)
takes exactly two values:
when
is prime, the certificate seating on its string; and
when
is composite, the certificate missing its bead by exactly one unit. Proof: for composite
,
vanishes modulo
, whence
; for prime
the Wilson corollary gives 0. As verified by computation: at all 302 primes below two thousand the dichotomy is total, with 61 seatings, exactly the twin lowers, and 241 unit misses.
The twin prime conjecture is therefore the statement that the binary sequence
over the primes takes the value zero infinitely often: one bit per prime, displacement always zero or one. The certificate never misses by much; it misses by one, or not at all.
11. The Relaxed Infinitude Theorem and the Zero Slack Reading
Theorem 10.1 (relaxed infinitude). Let
be the membership residue (20). Then:
(i) for every odd prime p,
: the certificate displacement is bounded by one, and the bound is optimal;
(ii) there are infinitely many primes p such that
; indeed
for every prime
, of which there are infinitely many by Dirichlet’s theorem;
(iii) there are infinitely many primes p such that
has at most two prime factors, by the theorem of [10] Chen; for every such p,
if
is prime and
otherwise, so the displacement on Chen’s set is governed entirely by the twin dichotomy. Whether infinitely many Chen primes have
composite is not asserted; the unconditional infinitude of the branch
is clause (ii);
(iv) the twin prime conjecture is equivalent to the assertion that there are infinitely many primes
such that
.
The displacement bound one is proven and optimal: the frame’s relaxed infinitude is the analog, inside the lattice, of the bounded gaps theorem of [11] Zhang: displacement bounded unconditionally, exact seating open.
Remark 10.2 (the zero slack reading). The sieve of [12] Maynard is a pigeonhole with slack:
admissible candidates in a window, weights forcing at least two primes among them; its conjectural floor at gap six is the
case, the smallest window with a spare seat. Gap two is the
endpoint, two hits among two candidates, zero slack: the pigeonhole degenerates into the event itself. The unit miss frame displays that degeneracy in its purest form: one binary digit per prime and no window in which to trade. The statement that
vanishes infinitely often is what remains of the bounded gaps program when the window contracts to a point.
12. The Seat of the Certificate: Cross Station Laws
The lattice of Section 6 places infinitely many integer beads on every station line, and the twin’s Wilson point is one bead among them. This closing section records where that bead sits, how the seating propagates between stations at every distance, and which quadratic fields govern the wider pencils. The treatment is condensed; the full development is deferred to a sequel.
Theorem 11.1 (the assigned seat). At every twin pair the Wilson certificate occupies the residue class
,
; explicitly, the smallest positive bead beneath it is
(21)
Proof. Since
, reduction modulo
gives
and
, so
; Wilson’s theorem at the upper twin forces this to equal −1, hence
. End of proof.
As verified by computation at all 705 twin pairs below fifty thousand. The seat number
is zero at the first two twins, the Wilson bead being the first positive bead at (3, 5) and (5, 7), and grows factorially thereafter:
.
Theorem 11.2 (the forbidden seat). For every twin pair with
the seat number is never congruent to one modulo three; precisely,
exactly when
, and
exactly when
.
Proof. Three divides
and
at every twin, so
; also
, so
; and the closed forms (21) give
or
according as
or
. End of proof.
Verified pair by pair at the 81 twins in [5, 3000], split 43 against 38 along the residue of
modulo 4.
Theorem 11.3 (the transport family). For any two odd stations
,
(22)
the coefficients of the rising factorial being the unsigned Stirling numbers of the first kind; the cubic (8) is the member at gap two. At gap six the identity is the septic
(23)
and the four coordinates
,
,
,
are simultaneously integral exactly when
is a prime quadruplet.
As verified at the quadruplet starts 5, 11, 101, 191, and at the transport of gap twelve carrying (17, 19) to (29, 31).
Theorem 11.4 (the gap seat law). For any integer p and any prime
at even distance
,
(24)
a residue class depending only on the gap: at
this is the assigned seat of Theorem 11.1, and at
every consecutive twin couple places the earlier certificate at −719/4320 on the later modulus.
Proof. The product
for even
; Wilson’s theorem at
gives
, and
. End of proof.
Verified at 63 random triples and at all eight quadruplet couples below three thousand.
Theorem 11.5 (the two valued reading). Define at even gap
the generalized membership residue
(25)
Then
if
is prime and
if
is composite: the misstep is quantized at exactly one unit,
, at every gap, regardless of the composite’s anatomy. At
the reading is
, the membership residue (20) decoded, its four being
and its one being
; the displacement bound of Theorem 10.1(i) thus holds at every even gap.
Proof. The identity
holds for every
, prime or composite, by the reduction of the rising factorial above; the classical evaluation of
, minus one at primes and zero at odd composites, completes the reading. End of proof.
Census: 2485 readings at random stations with gaps to forty eight: 966 primes read zero, 1519 composites read minus one, and no third value occurred. The law never tests the near station: a composite certificate seats perfectly on every prime modulus, 682 of 682 below fifteen hundred, so the reading at distance
reports the far station only. In consequence a single certificate carries, against the universal constants of (25), the primality of every integer above its station; each reading is equivalent to Wilson’s theorem at the far station and offers no computational advantage over it, but a prime constellation becomes a simultaneous seating condition on one number: the quadruplet {11, 13, 17, 19} is certified entirely by the integer 329891 read at gaps two, six, and eight.
Theorem 11.6 (the gap six pencil). The gap six station line through column N is incident exactly at the stations P with
, where
(26)
As verified by full search at the columns
.
Theorem 11.7 (the golden identity and the gap dichotomy). (i) Since
, the involution
forces every odd real character of conductor dividing 720 to vanish on the divisors of
: in particular
and the hexagonal count of
is zero at every column, so the lattices of [9] Gauss and of Eisenstein are blind to the entire gap six pencil. (ii) The surviving class count at conductor five obeys the identity of [13] Dirichlet,
(27)
the norm form of the golden field of discriminant five and class number one. (iii) In general
, and for every gap
the conductors 3, 4, and 8 divide
, so the two square arithmetic of [8] Jacobi and Theorem 7.3 is exclusive to gap two; from gap four onward the pencils are governed by the real quadratic fields, the golden field entering at gap six.
As verified: the odd character sums vanish and the identity (27) holds by explicit orbit counting at the first eight columns. Twin pairs are counted by the two squares of [8] Jacobi; prime quadruplets are counted by the golden mean. The full development of this section, including the silver identity at conductor eight and the statistics of the golden counts along the quadruplet columns, is deferred to a sequel.
13. Conclusion
A single cubic polynomial, extracted from the Wallis product for
by Wilson’s theorem and one application of the Gamma functional equation, has been shown to hold the twin primes as its exact integer solution set; to be generated dynamically, solution by solution and with multiplicity equal to gravity, by the sigma cascade; to carry a lattice of solutions governed by one universal congruence and classified by Jacobi’s two square theorem; and to compress the twin prime conjecture to a binary sequence of unit displacements over the primes. The frame proves everything on the near side of the wall: the identity, the bijection, the lattice, the classes, the unit bound, and the relaxed infinitude. The wall itself stands where it has always stood, now measured to its final unit: whether a certificate that always lands within one unit of its seat lands exactly upon it infinitely often. The author’s 2009 polynomial and 2026 cascade, two detectors seventeen years apart, meet at that wall from opposite sides, and the ledger of their meeting is this paper.
Computational Certification
Every numerical value in this paper is computed in exact integer or exact rational arithmetic; no floating point enters any certified statement, the tail identity (3) alone being verified in high precision arithmetic to twenty four digits as stated. All values are reproducible from the displayed definitions in any computer algebra system: the entries of Table 1 from Equations (5) and (8), including the full Wilson quotients displayed for the pair (29, 31); the lattice data of Section 6 from Equations (13) to (15); the class counts of Table 3 from the divisors of
; and the dichotomy census of Theorem 9.1 from Equation (20) over the primes below two thousand; and the seat laws of Section 11 from their displayed congruences: the assigned seat at the 705 twin pairs below fifty thousand, the forbidden seat at the 81 pairs to three thousand, the two valued reading at 2485 stations with gaps to forty eight, the mirror at 682 composite stations, and the golden identity at the first eight columns of the gap six pencil. The certification claims of this paper are exactly these finite recomputations, and each is stated with its range.
Acknowledgements
Developed, certified, and typeset in September 2026 from the author’s 2009 original, in collaboration with Claude (Anthropic). Every numerical value herein was computed exactly and is reproducible.
Collaboration Statement
The theorem at the heart of this paper is the author’s, first constructed in 2009. The present treatise rederives it in full and develops its complete solution theory: the composition with the author’s sigma cascade, the uniqueness and counting bijection, the lattice of integer solutions with its universal congruence, the class structure governed by Jacobi’s two square theorem, the unit miss dichotomy, and the relaxed infinitude theorem. This development was carried out in 2026 in sustained collaboration with Claude, an artificial intelligence research system developed by Anthropic, whose role comprised the rederivation and proof of the intermediate identities, the identification of the auxiliary integers as Wilson quotients, the lattice and class analyses, and the exact computational certification reported in every table. Responsibility and accountability for the content rest with the human author. It has been, in both directions, a great collaboration.