Documentation

LeanPool.Sundogcert.Scaling

Sundogcert/Scaling.lean — the [2m, m] projection-code SCALING family. Generalizes the m=2 member in Instance.lean to all m, exhibiting the empirical SCALING LAW colWeightLb = m (reject threshold τ = m-1, linear in n = 2m).

TIER 3 (floor) — pure #eval of the family at m ∈ {2,4,8,16,32}: colBound = 1, hammingNorm (projH m *ᵥ allOnes) = m, colWeightLb = m. TIER 2 (anchors)— actual Scheme instances at m = 4 (τ=3) and m = 8 (τ=7), hHG by the STRUCTURAL route (projH * projGᵀ = 0). vCol REJECTS the all-ones body, vSupp QUARANTINES it (the divergence widens with τ). TIER 1 (stretch)— the parametric theorems: colBound (projH m) = 1, hammingNorm = m, general hHG, and the SCALING LAW ¬ Safe (projScheme m) (allOnesSynBody m).

HONESTY: colBound (projH m) = 1 (uniform projection H) is the FAVORABLE regime — here colWeightLb = m is the TRUE min coset weight (TIGHT). On non-uniform H the column-weight bound is loose (it divides by the GLOBAL worst column weight; see Certificate.lean). This family demonstrates SOUNDNESS and linear-in-n τ reach, NOT general tightness.

The parametric family (the [2m, m] projection code). #

Parity-check [Iₘ | 0] : row i, col j is 1 iff j = i (so j < m).

Equations
Instances For

    Generator [0 | Iₘ] : row i, col j is 1 iff j = i + m (so j ≥ m). Its rows are codewords of ker (projH m).

    Equations
    Instances For

      The all-ones-syndrome body: the first m coordinates are 1, the rest 0. projH m *ᵥ (allOnesSynBody m) is the all-ones vector in Fin m.

      Equations
      Instances For

        TIER 3 — pure computation. The empirical scaling law (NO Scheme / hHG needed). #

        For each m: colBound (projH m) = 1, hammingNorm (projH m *ᵥ allOnes) = m, and the
        quotient (= colWeightLb value) = m. Reject threshold τ = m - 1 scales linearly in n = 2m. 
        

        STRUCTURAL hHG — the scalable route (no decide, no 2^m blowup). #

        `projH m * (projG m)ᵀ = 0`: entry `(i,k) = ∑_j [j=i]·[j=k+m]`. Since `i < m ≤ k+m`,
        the indices `i` and `k+m` are distinct, so every summand is `0`. Then
        `projH m *ᵥ (s ᵥ* projG m) = (projH m * (projG m)ᵀ) *ᵥ s = 0`. 
        

        The structural core: projH m * (projG m)ᵀ = 0.

        theorem Sundog.Certificate.Scaling.hHG_proj (m : ) (s : Fin mZMod 2) :

        The dual-pair law for the family, via the structural core. SCALABLE: kernel cost is polynomial in m (no 2^m secret enumeration).

        TIER 2 — concrete anchor Schemes at m = 4 (τ = 3) and m = 8 (τ = 7). #

        hHG via `hHG_proj` (structural). Two verifiers each (vSupp, vCol). On the all-ones
        body: vCol REJECTS (colWeightLb = m > τ = m-1), vSupp QUARANTINES (supportLb = 1 ≤ τ).
        The divergence WIDENS with m — the non-degenerate bound's reach grows linearly in τ. 
        

        The parametric scheme [2m, m] at radius τ = m - 1.

        Equations
        Instances For

          Forward witness: a light body is its own same-syndrome witness.

          Equations
          Instances For

            Verifier with the degenerate support bound.

            Equations
            Instances For

              Verifier with the non-degenerate column-weight bound.

              Equations
              Instances For
                @[implicit_reducible]

                Display instance for the three-valued verdict.

                Equations
                • One or more equations did not get rendered due to their size.

                Anchor verdicts on the all-ones body: "m τ vSupp vCol". #

                Run both verifiers on the all-ones-syndrome body and format the verdict line.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  TIER 1 — the PARAMETRIC SCALING LAW: one proof for the whole family. #

                  Three parametric facts and the headline theorem:
                    colBound_projH        : ∀ m, 0 < m → colBound (projH m) = 1
                    projH_mulVec_allOnes  : ∀ m, projH m *ᵥ allOnesSynBody m = 1   (the all-ones vector)
                    hammingNorm_projH_allOnes : ∀ m, hammingNorm (projH m *ᵥ allOnesSynBody m) = m
                    scaling_law           : ∀ m, 0 < m → ¬ Safe (projScheme m) (allOnesSynBody m). 
                  

                  projH m *ᵥ allOnesSynBody m is the all-ones vector in Fin m: at row i, the only nonzero term is j = i (both guards j = i and j < m hold since i < m).

                  hammingNorm (projH m *ᵥ allOnesSynBody m) = m: the all-ones vector over Fin m.

                  theorem Sundog.Certificate.Scaling.colSupp_projH_le_one (m : ) (j : Fin (2 * m)) :
                  {i : Fin m | projH m i j 0}.card 1

                  Each column j of projH m has support cardinality ≤ 1: at most the single row i = j.

                  colBound (projH m) = 1 for m > 0: every column has ≤ 1 nonzero, and column 0 (row 0) attains it, so the sup is exactly 1.

                  THE SCALING LAW. For every m > 0, the all-ones-syndrome body is UNSAFE at the radius τ = m - 1: no same-syndrome witness has weight ≤ m - 1, because the syndrome projH m *ᵥ (allOnesSynBody m) has weight m, and (colBound = 1 ⟹) colWeightLb = m is a SOUND lower bound on every witness weight. One proof, the whole [2m, m] family.

                  Axiom audit for the anchor vCol verifiers and the general scaling law. #