# Agent Report — Duality Contrast Weakens With Scale in Prime Gaps
**Date**: 2026-05-08 00:11
**Piano**: 85
**Tension explored**: DUALITA_DIPOLARE_VS_ILLUSORIA (0.9) + BOUNDARY (0.8)
observables_registry: 1.0.0-2026-05-06
observables_used: [SR, SR2, L1, L2, triple_var]

## Claim Under Test
> Two types of duality: (1) dipolar — generative, the model (det=-1), (2) illusory — dispersive, entropy (det=+1). Incoherent rules produce the second. The vincolo DUALITA_DET_DENOMINATOR_GATE (cycle 2042) established: det(M) is not the primary discriminator; the informative part is the real-vs-shuffle gap, strong at low/intermediate scales and weak at the large-window end.

## Question
If the duality contrast (real vs shuffle z-score) weakens with scale for prime gaps, what is the quantitative rate of weakening? And does GUE show the same weakening, or is it scale-independent?

## Experiment Design
- **Metric**: z-score of 5 canonical observables (SR, SR2, L1, L2, triple_var), real sequence vs 50 shuffles per window
- **Scope**: 200,000 prime gaps (unfolded by local mean, kernel=100), GUE eigenvalue spacings (beta=2, matrix size ~2400, unfolded), Poisson (exponential i.i.d.)
- **Windows**: 8 log-spaced sizes from 49 to 49,999 gaps, 5 non-overlapping windows per size
- **Null baseline**: Poisson (no structure at any scale). Additional null: if effect size is scale-independent, z ~ N^0.5 exactly (alpha = 0.50)
- **Scaling law**: fit |z| ~ N^alpha. alpha = 0.5 means constant effect size. alpha < 0.5 means weakening. alpha > 0.5 means strengthening.
- **Seed check**: seed=42 (primary) and seed=137 (replication)

## Results

### Global z-scores (N=5000 gaps, seed=42)

| Domain  |   SR   |  SR2  |   L1   |  L2   | triple_var |
|---------|--------|-------|--------|-------|------------|
| Primes  | -6.71  | +0.35 | -6.87  | -3.63 |   -7.72    |
| GUE     | -6.27  | -3.42 | -8.16  | -2.41 |   -8.32    |
| Poisson | +0.72  | +0.39 | -0.13  | -1.12 |   -0.64    |

### Windowed contrast: prime gaps z_SR by window size

| W_size |  z_SR  | z_L1   | z_L2  | z_triple_var | eff_SR (z/sqrt(N)) |
|--------|--------|--------|-------|--------------|--------------------|
|     49 |  -1.09 |  -1.82 | +0.29 |     -1.46    |     -0.156         |
|    134 |  -1.40 |  -1.48 | +0.35 |     -1.17    |     -0.121         |
|    359 |  -2.33 |  -2.28 | -0.49 |     -2.16    |     -0.123         |
|    965 |  -3.44 |  -3.05 | -1.18 |     -3.23    |     -0.111         |
|  2,589 |  -4.59 |  -4.22 | -1.83 |     -4.60    |     -0.090         |
|  6,947 |  -6.65 |  -5.69 | -2.99 |     -6.44    |     -0.080         |
| 18,637 | -10.12 |  -8.93 | -3.99 |     -9.58    |     -0.074         |
| 49,999 | -17.03 | -13.78 | -6.96 |    -15.93    |     -0.076         |

The effect size (z/sqrt(N)) halves from 0.156 to 0.076 across the range.

### Power-law scaling alpha: |z| ~ N^alpha

| Observable |  Primes (s42) | Primes (s137) |  GUE (s42)  | GUE (s137)  | Poisson (s42) |
|------------|---------------|---------------|-------------|-------------|---------------|
| SR         |  0.392 +/- 0.012 | 0.397 +/- 0.015 | 0.571 +/- 0.088 | 0.505 +/- 0.009 | 0.263 (R2=0.75) |
| L1         |  0.315 +/- 0.029 | 0.322 +/- 0.026 | 0.547 +/- 0.032 | 0.655 +/- 0.073 | ~0 (R2=0.14) |
| triple_var |  0.372 +/- 0.028 | 0.370 +/- 0.026 | 0.637 +/- 0.057 | 0.607 +/- 0.048 | ~0 (R2=0.06) |
| L2         |  0.486 +/- 0.025 | 0.532 +/- 0.015 | 0.780 +/- 0.020 | 0.475 +/- 0.204 | 0.165 (R2=0.91) |

All R-squared > 0.95 for primes and GUE (except Poisson, which has no signal).

## Key Findings

1. **The duality contrast for prime gaps weakens with scale.** The scaling exponent alpha is robustly below 0.5 for the three most discriminating observables: SR (alpha = 0.39), L1 (alpha = 0.32), triple_var (alpha = 0.37). This means the effect size decays as N^{alpha-0.5}: approximately N^{-0.11} for SR, N^{-0.18} for L1. The dipolar structure is real but dissolving.

2. **GUE eigenvalue spacings show alpha >= 0.5.** For SR (alpha = 0.54), L1 (alpha = 0.60), triple_var (alpha = 0.63): the structure is scale-independent or strengthening. GUE repulsion is built into the ensemble at all scales. Primes mimic GUE locally but lack this scale invariance.

3. **The discriminator is alpha, not the observable value.** Primes and GUE have similar z-scores at any given window size. The difference is in how z scales with N. Primes: z ~ N^{0.39}. GUE: z ~ N^{0.54}. At small windows they overlap; at large windows they diverge.

4. **L2 is borderline.** Alpha ~ 0.49-0.53 for primes, near 0.5. L2 is not discriminating between primes and GUE in this metric. The three robust discriminators are SR, L1, and triple_var.

5. **Poisson shows no scaling.** Alpha near 0 or incoherent (R-squared < 0.15 for L1 and triple_var). No structure to weaken.

## Verdict
**CONSTRAINT on DUALITA_DIPOLARE_VS_ILLUSORIA / BOUNDARY**: The boundary between dipolar and illusory duality in prime gaps is not a location but a trajectory. The duality contrast (real-vs-shuffle) weakens as N^{-0.11} for SR and N^{-0.18} for L1, approaching Poisson asymptotically. GUE has alpha >= 0.5 (no weakening). The discriminator between primes and GUE is the scaling exponent alpha, not the observable value at any fixed scale.

L5 check: The weakening of prime gap correlations with scale is consistent with known number-theoretic expectations (Hardy-Littlewood, Lemke Oliver-Soundararajan). What is measured here is the quantitative rate of weakening (alpha ~ 0.39 for SR) and the comparison with GUE (alpha ~ 0.54), which provides a new quantitative discriminator. Default hypothesis: this may be a re-parameterization of known asymptotic decay rates; the exponent alpha as a universality discriminator needs comparison with RMT literature on finite-size effects.

## Bicono della scoperta

- **Due radici** (dipolo primario): duality contrast that strengthens with scale (GUE, alpha > 0.5, deep structure) and duality contrast that weakens with scale (primes, alpha < 0.5, dissolving structure). The two are dual because both show dipolar ordering at small scales — the difference emerges only when you observe the trajectory.
- **Singolare** (where duality is not): alpha = 0.5 exactly. At this point there is no scale dependence — the effect size is constant, and the question "dipolar or illusory?" has no answer. L2 lives near this singularity.
- **Invariante di passaggio**: the ordering itself (z < 0 for all SR, L1, triple_var at all tested scales for primes). The ordering survives across scales even as it weakens. What changes is the rate, not the sign.
- **Campo di possibilita**: here it becomes possible to discriminate primes from GUE by their scaling trajectory, not by their local statistics. Here it becomes non-possible to claim that prime gaps have "the same universality class as GUE" without specifying the scale and the observable.

## Files
- Script: `tools/exp_duality_scale_contrast.py` (reusable, parameterized)
- Data: `tools/data/duality_scale_contrast_20260508.json`
- Report: `tools/data/reports/agent_20260508_0011.md`
