# SWC, gradient descent, and thermal energy: a direct attempt

Private working note. This implements the proposed energy-landscape interpretation mathematically. It establishes optimization and sampling statements, but does not establish RH or a statistical probability that RH is true. No physical device or new large RH search was run.

## 1. The actual RH energy

Use the same allowed functions g_k as in the earlier notes, and set

    E_N(c) = ||1 - sum_{k=2}^N c_k g_k||_2^2
           = 1 - 2 v^T c + c^T G c,

where G_ik=<g_i,g_k> and v_k=<1,g_k>. These are the full infinite-cell inner products, not a truncated training loss. Let d_N^2=min_c E_N(c).

G is positive definite. Indeed, if a combination vanishes on every arithmetic cell, let S=sum c_k/k. Its first cell value is S, so S=0. Differences of successive cell values give S-sum_{k|m,k>=2}c_k=0. Induction on m=2,...,N forces every c_k=0.

Consequently the energy is a strictly convex quadratic with a unique global minimizer c*=G^-1 v. Completing the square gives

    E_N(c) = d_N^2 + (c-c*)^T G(c-c*),
    d_N^2 = 1 - v^T G^-1 v.

This is already a particularly favourable optimization landscape: there are no nonglobal local minima.

Nevertheless every finite global minimum is strictly positive. Let L=lcm(2,...,N). On cell I_L every g_k is zero, so every coefficient vector has

    E_N(c) >= 1/[L(L+1)] > 0.

Thus finite-dimensional ground-state attainment cannot mean exact zero error. Write D_infinity=lim_N d_N^2, which exists because the finite spaces are nested. The [Báez-Duarte approximation criterion](https://arxiv.org/abs/math/0202141) makes D_infinity=0 equivalent to RH. D_infinity is the approximation defect; it is not numerically identified with the separate BSY integral B.

## 2. Gradient descent reaches the minimum, whose value still matters

For continuous gradient flow,

    dc/dt = -grad E_N(c) = -2G(c-c*),
    c(t)-c* = exp(-2Gt)(c(0)-c*).

Hence

    dE_N/dt = -||grad E_N||^2 <= 0,
    E_N(c(t))-d_N^2
        = (c(0)-c*)^T G exp(-4Gt)(c(0)-c*) -> 0.

The discrete update with step size 0<eta<1/lambda_max(G) likewise converges to c*. This proves optimization convergence for every finite N. It leaves D_infinity unchanged as an unresolved mathematical quantity.

An exact example comes from the actual basis, not a toy zeta model. For N=2, g_2 is 1/2 on odd-indexed cells and zero on even-indexed cells. The total weight of the odd cells is

    sum_{m odd} 1/[m(m+1)] = log 2.

Therefore

    E_2(c) = (1-log 2) + (log 2)(1-c/2)^2,
    c*=2,    d_2^2=1-log 2 approximately 0.30685281944.

Gradient flow reaches this strictly positive global minimum. The script encloses log 2 using a positive rational series with a proved geometric remainder; in particular d_2^2>0.30. This example does not disprove RH, which concerns increasing N. It directly disproves the proposed inference that reaching a physical or mathematical global minimum forces zero residual.

## 3. The SWC sign family is an Ising energy

Let c=c_0+A xi, where A is diagonal with coordinate radii a_i and each xi_i is +/-1. Expanding gives

    E_N(c_0+A xi) = K + sum_i h_i xi_i + sum_{i<j} J_ij xi_i xi_j,
    K = E_N(c_0) + sum_i a_i^2 G_ii,
    h_i = 2a_i(Gc_0-v)_i,
    J_ij = 2a_i a_j G_ij.

This supplies an explicit Ising-type Hamiltonian for the finite SWC candidate family. The identity is exact. An annealer can be used as a proposal mechanism for this objective; the original full-error verifier still decides whether a proposed candidate meets its declared tolerance. Mapping to an Ising model does not imply an energy-zero configuration exists.

## 4. Thermal sampling supplies a positive-mass theorem

For a dimensionless temperature parameter T>0, consider the ideal continuous Gibbs law

    pi_{N,T}(dc) = Z^-1 exp(-E_N(c)/T) dc.

This is a well-defined Gaussian with mean c* and covariance (T/2)G^-1. Equivalently it is the stationary law of the finite-dimensional overdamped Langevin process dC=-grad E_N(C)dt+sqrt(2T)dW. These are mathematical laws; no claim is made that a finite physical run samples them exactly.

Changing variables z=G^(1/2)(c-c*) gives

    E_N(C)-d_N^2 has distribution (T/2) chi_squared_(N-1),
    expectation[E_N(C)-d_N^2] = (N-1)T/2.

By Markov's inequality, for u>0,

    P(E_N(C) < d_N^2+u) >= 1 - (N-1)T/(2u).

A positive right-hand side is a genuine positive-mass existence statement near the optimum. The threshold for absolute approximation is also exact:

    pi_{N,T}(E_N < epsilon)>0  iff  epsilon>d_N^2.

The reverse implication follows because a nonempty strict sublevel of this quadratic is open and the Gaussian density is positive everywhere. Every such open sublevel contains rational coefficients. Strict error margins permit sufficiently accurate rationalization followed by a finite exact tail certificate, as in the earlier SWC verifier.

Cooling increases concentration near the existing minimum. It does not move that minimum to zero. Substituting a tolerance epsilon for u without accounting for d_N^2 would be an invalid step.

## 5. Even an ideal infinite cooling schedule stops at the unknown defect

For each N>=2, draw C_N from pi_{N,T_N}, with T_N=N^-4. Independence between different N is unnecessary. Set X_N=E_N(C_N)-d_N^2>=0. The previous identity gives

    expectation[X_N]=(N-1)/(2N^4) <= 1/(2N^3).

For each positive integer m, Markov's inequality makes sum_N P(X_N>1/m) finite. The first Borel-Cantelli lemma and the countable intersection over m imply X_N->0 almost surely. Since d_N^2->D_infinity, this proves

    E_N(C_N) -> D_infinity almost surely.

This is an unconditional statement about the specified ideal Gibbs laws. It is stronger than merely saying the optimizer stabilizes, but it still does not identify the limit as zero. Under these laws,

    P(lim_N E_N(C_N)=0) = 1 if RH holds, and 0 if RH fails.

This dichotomy is a reformulation of the unresolved deterministic value D_infinity, not a Bayesian probability assigned to RH. Constructing the law and proving concentration are insufficient to choose between the two cases. No efficient implementation or finite-time certificate of the infinite event is asserted.

## 6. Why stability cannot replace verifier soundness

There is a simple structural reason. For any constant b, the energies E(c) and E(c)+b have identical gradients and identical normalized Gibbs laws: the factor exp(-b/T) cancels in the partition function. But their minimum values differ by b. Absolute loss evaluation can distinguish the shifted energies; stationarity and normalized sampling behaviour alone cannot establish an absolute zero. Our verifier's zero is fixed by its mathematical meaning and cannot be shifted away without changing the claim.

Similarly, a continuous encoding of the incompatible constraints x=0 and x=1 gives

    L(x)=x^2+(1-x)^2=2(x-1/2)^2+1/2.

Gradient descent converges to the stable global optimum x=1/2, while no point satisfies both constraints. Continuous optimization does not universally push weights to 0 or 1 or turn inconsistent constraints into true statements.

Physical implementations of logic, optimization, and learned inference are valuable. They do not establish the broader assertion that logical truth is identical to energy minimization. A loss-to-truth implication must be justified for the particular encoding.

## 7. Physics and learning sources checked

[Bennett's treatment of Landauer's principle](https://arxiv.org/abs/physics/0210005) concerns the entropy cost of logically irreversible information operations. The familiar heat bound k_B T log 2 applies to idealized erasure of an unbiased bit under the appropriate thermal assumptions. It is not a theorem certifying the correctness of an arbitrary computation or its optimization objective.

[Hopfield's original paper](https://doi.org/10.1073/pnas.79.8.2554) models collective dynamics for content-addressable memory. Stable states implement the model's memory function; this does not make arbitrary stable states proofs of unrelated propositions.

[Probabilistic Soft Logic](https://jmlr.org/papers/v18/15-631.html) defines probabilistic models and convex inference objectives using logic-based syntax. Its MAP inference solves the specified model. This is not a claim that convergence of a learned loss independently validates unrestricted mathematical reasoning.

These are supporting context, not extra premises establishing D_infinity=0. The quadratic, Ising, and Gibbs calculations above are derived explicitly.

## Outcome and reproduction

The method produces a concrete energy, gradient dynamics, a finite Ising encoding, and an ideal cooling theorem. None establishes the missing zero-defect statement. The finite-accuracy SWC results remain valid; RH remains unresolved.

Run `python3 research/swc-rh/energy_landscape_attempt.py`. It checks a rational enclosure for the actual N=2 minimum, the Ising expansion on an exact rational example, and the auxiliary shift, inconsistent-constraint, and temperature-budget calculations. Those finite checks support the displayed algebra; the general convergence proof is the analytic argument above. The main paper and ZIP remain unchanged snapshots.
