Documentation

LeanMlir.Proofs.Nets.ResNet.ResNet50FullBSeal

ResNet-50's non-degeneracy seal, on the full-width batched net (levels 2 and 3) #

planning/full_width_seals.md §4.2. ResNet50FullBVJP.lean proves resnet50ForwardB_full_has_vjp_at under 48 relu clauses — three per bottleneck — plus the stem's and the stem pool's. ResNet-50 had no witness at all: unlike ResNet-34 and MobileNetV2 it never had a 2-channel proxy, so the clause bundle's joint satisfiability was never exhibited. This file exhibits it, and a nonzero Jacobian with it, on resnet50ForwardB_full itself.

What is inherited and what is new #

⭐ Almost everything is Training/BatchSealKit.lean's or ResNet-34's. The carrier (EDiff and its per-op steps), the ray, the centre-tap kernel and the 7×7/s2 stem's no-tie are the kit's; the strided projection (R34FullBSeal.sealProj), the zeroed-body collapse (projB_zero_const), the relu-removal (cbReluStridedB_eq) and the stem's own collapse (r34StemB_eq) are ResNet-34's, stated at variable shapes and instantiated here — the same reuse ResNet50FullB.lean already makes of r34StemB and r34HeadB themselves.

Three things are genuinely new:

noncomputable def Proofs.R50FullBSeal.sealIdW (mid oc : ) :
R50IdW mid oc

The structural identity bottleneck: all three convs zeroed, every BN (ε, γ, β) = (1, 1, 1). The body is then the constant 1 and the block is a ↦ a + 1 on a nonnegative activation.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    noncomputable def Proofs.R50FullBSeal.sealPrW (ic mid oc : ) :
    R50ProjW ic mid oc

    The structural projection bottleneck — one record for both projection forms, as R50ProjW is. Zeroed body, centre-tap 1×1 skip, β_p = 160 (the margin that keeps the post-residual relu off its kink at every input).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def Proofs.R50FullBSeal.sealW (nCls : ) :

      The witness weights, generic in the class count.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Proofs.R50FullBSeal.sealW_Wd (nCls : ) :
        (sealW nCls).Wd = fun (i : Fin 2048) (j : Fin nCls) => if i = 0 j = 0 then 1 else 0
        theorem Proofs.R50FullBSeal.marginQ (n q : ) (hq : q 7) (hn : n 512 * (q * q)) :
        |1| * n < 160

        Every BN width in the witness clears the β = 160 margin once q ≤ 7. The widest is the stem's 2·(16q)² = 512q² ≤ 25088 < 25600; the five carrier sites are 512q², 128q², 32q², 8q² and 2q².

        theorem Proofs.R50FullBSeal.two_sq_pos (a : ) (ha : 0 < a) :
        0 < 2 * (a * a)

        0 < 2 * (a * a) — the 0 < N * (h * w) a zeroed body's BN needs.

        theorem Proofs.R50FullBSeal.sealIdBody (N h w mid oc : ) (hn : 0 < N * (h * w)) (v : Vec (N * (oc * h * w))) :
        (projB N (sealIdW mid oc).W₃ (sealIdW mid oc).b₃ (sealIdW mid oc).ε₃ (sealIdW mid oc).γ₃ (sealIdW mid oc).β₃ StableHLO.cbReluB N (sealIdW mid oc).W₂ (sealIdW mid oc).b₂ (sealIdW mid oc).ε₂ (sealIdW mid oc).γ₂ (sealIdW mid oc).β₂ StableHLO.cbReluB N (sealIdW mid oc).W₁ (sealIdW mid oc).b₁ (sealIdW mid oc).ε₁ (sealIdW mid oc).γ₁ (sealIdW mid oc).β₁) v = fun (x : Fin (N * (oc * h * w))) => 1

        The bottleneck body is the constant 1 at every input — the third conv is zeroed, so projB_zero_const collapses it whatever the two stages beneath it do.

        theorem Proofs.R50FullBSeal.sealPrBody (N h w ic mid oc : ) (hn : 0 < N * (h * w)) (v : Vec (N * (ic * h * w))) :
        (projB N (sealPrW ic mid oc).W₃ (sealPrW ic mid oc).b₃ (sealPrW ic mid oc).ε₃ (sealPrW ic mid oc).γ₃ (sealPrW ic mid oc).β₃ StableHLO.cbReluB N (sealPrW ic mid oc).W₂ (sealPrW ic mid oc).b₂ (sealPrW ic mid oc).ε₂ (sealPrW ic mid oc).γ₂ (sealPrW ic mid oc).β₂ StableHLO.cbReluB N (sealPrW ic mid oc).W₁ (sealPrW ic mid oc).b₁ (sealPrW ic mid oc).ε₁ (sealPrW ic mid oc).γ₁ (sealPrW ic mid oc).β₁) v = fun (x : Fin (N * (oc * h * w))) => 1

        The stride-1 projection block's body is the constant 1.

        theorem Proofs.R50FullBSeal.sealDnBody (N h w ic mid oc : ) (hn : 0 < N * (h * w)) (v : Vec (N * (ic * (2 * h) * (2 * w)))) :
        (projB N (sealPrW ic mid oc).W₃ (sealPrW ic mid oc).b₃ (sealPrW ic mid oc).ε₃ (sealPrW ic mid oc).γ₃ (sealPrW ic mid oc).β₃ StableHLO.cbReluStridedB N (sealPrW ic mid oc).W₂ (sealPrW ic mid oc).b₂ (sealPrW ic mid oc).ε₂ (sealPrW ic mid oc).γ₂ (sealPrW ic mid oc).β₂ StableHLO.cbReluB N (sealPrW ic mid oc).W₁ (sealPrW ic mid oc).b₁ (sealPrW ic mid oc).ε₁ (sealPrW ic mid oc).γ₁ (sealPrW ic mid oc).β₁) v = fun (x : Fin (N * (oc * h * w))) => 1

        The strided projection block's body is the constant 1. ⚠ v1.5: its middle stage is the STRIDED conv-bn-relu, so this is not sealPrBody at other shapes.

        theorem Proofs.R50FullBSeal.sealIdB_eq (N h w mid oc : ) (hn : 0 < N * (h * w)) (v : Vec (N * (oc * h * w))) (hv : ∀ (k : Fin (N * (oc * h * w))), 0 v k) :
        r50IdB N h w (sealIdW mid oc) v = fun (k : Fin (N * (oc * h * w))) => v k + 1

        The structural bottleneck is the shift a ↦ a + 1 on a nonnegative activation.

        noncomputable def Proofs.R50FullBSeal.sealProj1 (N h w ic oc : ) :
        Vec (N * (ic * h * w))Vec (N * (oc * h * w))

        The structural STRIDE-1 projection: a 1×1 centre-tap conv-BN.

        Equations
        Instances For
          theorem Proofs.R50FullBSeal.sealProj1_apply (N h w ic oc : ) (v : Vec (N * (ic * h * w))) :
          sealProj1 N h w ic oc v = StableHLO.bnBatchLA N oc h w 1 (BatchSeal.kv oc 1) (BatchSeal.kv oc 160) (StableHLO.batchMap N (flatConv (BatchSeal.ctK oc ic 1 1 1) (BatchSeal.kv oc 0)) v)
          theorem Proofs.R50FullBSeal.sealProj1_pos (N h w ic oc : ) (hm : |1| * ↑(N * (h * w)) < 160) (v : Vec (N * (ic * h * w))) (k : Fin (N * (oc * h * w))) :
          0 < sealProj1 N h w ic oc v k
          theorem Proofs.R50FullBSeal.sealPrB_eq (N h w ic mid oc : ) (hn : 0 < N * (h * w)) (hm : |1| * ↑(N * (h * w)) < 160) (v : Vec (N * (ic * h * w))) :
          r50ProjB N h w (sealPrW ic mid oc) v = fun (k : Fin (N * (oc * h * w))) => sealProj1 N h w ic oc v k + 1

          The structural stride-1 projection block is its projection plus one.

          theorem Proofs.R50FullBSeal.sealDnB_eq (N h w ic mid oc : ) (hn : 0 < N * (h * w)) (hm : |1| * ↑(N * (h * w)) < 160) (v : Vec (N * (ic * (2 * h) * (2 * w)))) :
          r50DownB N h w (sealPrW ic mid oc) v = fun (k : Fin (N * (oc * h * w))) => R34FullBSeal.sealProj N h w ic oc v k + 1

          The structural strided projection block is ResNet-34's strided projection plus one.

          theorem Proofs.R50FullBSeal.r50IdB_nonneg (N h w mid oc : ) (p : R50IdW mid oc) (v : Vec (N * (oc * h * w))) (k : Fin (N * (oc * h * w))) :
          0 r50IdB N h w p v k
          theorem Proofs.R50FullBSeal.r50ProjB_nonneg (N h w ic mid oc : ) (p : R50ProjW ic mid oc) (v : Vec (N * (ic * h * w))) (k : Fin (N * (oc * h * w))) :
          0 r50ProjB N h w p v k
          theorem Proofs.R50FullBSeal.r50DownB_nonneg (N h w ic mid oc : ) (p : R50ProjW ic mid oc) (v : Vec (N * (ic * (2 * h) * (2 * w)))) (k : Fin (N * (oc * h * w))) :
          0 r50DownB N h w p v k
          theorem Proofs.R50FullBSeal.sealPrPos (ic mid oc : ) :
          R50ProjPos (sealPrW ic mid oc)
          theorem Proofs.R50FullBSeal.sealIdSmooth (N h w mid oc : ) (hn : 0 < N * (h * w)) (v : Vec (N * (oc * h * w))) (hv : ∀ (k : Fin (N * (oc * h * w))), 0 v k) :
          R50IdSmoothAt N h w (sealIdW mid oc) v

          The bottleneck's three relu clauses. Both interior ones see a constant channel (their convs are zeroed), so they are β = 1 ≠ 0 and weight-only; only the post-residual one needs the activation, and only through 0 ≤ ·.

          theorem Proofs.R50FullBSeal.sealPrSmooth (N h w ic mid oc : ) (hn : 0 < N * (h * w)) (hm : |1| * ↑(N * (h * w)) < 160) (v : Vec (N * (ic * h * w))) :
          R50ProjSmoothAt N h w (sealPrW ic mid oc) v

          The stride-1 projection block's three relu clauses — all weight-only.

          theorem Proofs.R50FullBSeal.sealDnSmooth (N h w ic mid oc : ) (hn2 : 0 < N * (2 * h * (2 * w))) (hn : 0 < N * (h * w)) (hm : |1| * ↑(N * (h * w)) < 160) (v : Vec (N * (ic * (2 * h) * (2 * w)))) :
          R50DownSmoothAt N h w (sealPrW ic mid oc) v

          The strided projection block's three relu clauses — all weight-only. ⚠ v1.5: hm1 is at the INPUT resolution and only hm2 is at the halved one.

          noncomputable def Proofs.R50FullBSeal.sealX (q : ) (t : ) :
          Vec (2 * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))

          The witness input: the shared ray at 32q × 32q (224 px at q = 7, 160 at q = 5).

          Equations
          Instances For
            noncomputable def Proofs.R50FullBSeal.sealV (q : ) :
            Vec (2 * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))

            Its direction — all of example 0's channel 0.

            Equations
            Instances For
              theorem Proofs.R50FullBSeal.EDiff_sealX (q : ) (t : ) :
              BatchSeal.EDiff (fun (ci : Fin 3) => if ci = 0 then t else 0) (sealX q t)
              noncomputable def Proofs.R50FullBSeal.Zs (q : ) (t : ) :
              Vec (2 * (64 * (2 * (2 * (2 * (2 * q)))) * (2 * (2 * (2 * (2 * q))))))

              The stem's centre-tap conv output — the carrier's first stop.

              Equations
              Instances For
                theorem Proofs.R50FullBSeal.bnd (a q : ) (ha : a 16 * q) :
                2 * (a * a) 512 * (q * q)

                2·a² ≤ 512·q² whenever a ≤ 16q — every BN width against the stem's.

                theorem Proofs.R50FullBSeal.marginStem (q : ) (hq : q 7) :
                |1| * ↑(2 * (2 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * (2 * q)))))) < 160

                The β = 160 margin at the stem's 2·(16q)².

                theorem Proofs.R50FullBSeal.marginP1 (q : ) (hq : q 7) :
                |1| * ↑(2 * (2 * (2 * (2 * q)) * (2 * (2 * (2 * q))))) < 160

                The β = 160 margin at stage 1's 2·(8q)².

                theorem Proofs.R50FullBSeal.marginP2 (q : ) (hq : q 7) :
                |1| * ↑(2 * (2 * (2 * q) * (2 * (2 * q)))) < 160

                The β = 160 margin at stage 2's 2·(4q)².

                theorem Proofs.R50FullBSeal.marginP3 (q : ) (hq : q 7) :
                |1| * ↑(2 * (2 * q * (2 * q))) < 160

                The β = 160 margin at stage 3's 2·(2q)².

                theorem Proofs.R50FullBSeal.marginP4 (q : ) (hq : q 7) :
                |1| * ↑(2 * (q * q)) < 160

                The β = 160 margin at stage 4's 2·q².

                theorem Proofs.R50FullBSeal.Zs_bn_pos (q : ) (hq : q 7) (t : ) (k : Fin (2 * (64 * (2 * (2 * (2 * (2 * q)))) * (2 * (2 * (2 * (2 * q))))))) :
                0 < StableHLO.bnBatchLA 2 64 (2 * (2 * (2 * (2 * q)))) (2 * (2 * (2 * (2 * q)))) 1 (BatchSeal.kv 64 1) (BatchSeal.kv 64 160) (Zs q t) k

                The stem BN is strictly positive at every point of the ray.

                theorem Proofs.R50FullBSeal.stem_relu_off (q : ) (hq : q 7) (nCls : ) (t : ) :
                StableHLO.cbReluStridedB 2 (sealW nCls).sW (sealW nCls).sb (sealW nCls). (sealW nCls). (sealW nCls). (sealX q t) = StableHLO.bnBatchLA 2 64 (2 * (2 * (2 * (2 * q)))) (2 * (2 * (2 * (2 * q)))) 1 (BatchSeal.kv 64 1) (BatchSeal.kv 64 160) (Zs q t)

                The stem's relu is off at the witness, so the pool's no-tie can be read on the BN output.

                theorem Proofs.R50FullBSeal.sealStemClause (q : ) (hq : q 7) (nCls : ) (t : ) :
                R34StemSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (sealW nCls).sW (sealW nCls).sb (sealW nCls). (sealW nCls). (sealW nCls). (sealX q t)
                theorem Proofs.R50FullBSeal.sealPoolClause (q : ) (hq : q 7) (nCls : ) (t : ) :
                R34PoolSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (StableHLO.cbReluStridedB 2 (sealW nCls).sW (sealW nCls).sb (sealW nCls). (sealW nCls). (sealW nCls). (sealX q t))
                theorem Proofs.R50FullBSeal.pc0 (q : ) (hq : q 7) (nCls : ) (t : ) :
                r50Pre0 2 q (sealW nCls) (sealX q t) = StableHLO.batchMap 2 (maxPool3s2Flat 64 (2 * (2 * (2 * q))) (2 * (2 * (2 * q)))) (StableHLO.bnBatchLA 2 64 (2 * (2 * (2 * (2 * q)))) (2 * (2 * (2 * (2 * q)))) 1 (BatchSeal.kv 64 1) (BatchSeal.kv 64 160) (Zs q t))

                The stem, collapsed: its relu is off, so it is pool ∘ bn ∘ centre-tap conv.

                theorem Proofs.R50FullBSeal.nn1 (q nCls : ) (t : ) (k : Fin (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))) :
                0 r50Pre1 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn2 (q nCls : ) (t : ) (k : Fin (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))) :
                0 r50Pre2 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn4 (q nCls : ) (t : ) (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) :
                0 r50Pre4 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn5 (q nCls : ) (t : ) (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) :
                0 r50Pre5 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn6 (q nCls : ) (t : ) (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) :
                0 r50Pre6 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn8 (q nCls : ) (t : ) (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) :
                0 r50Pre8 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn9 (q nCls : ) (t : ) (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) :
                0 r50Pre9 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn10 (q nCls : ) (t : ) (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) :
                0 r50Pre10 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn11 (q nCls : ) (t : ) (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) :
                0 r50Pre11 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn12 (q nCls : ) (t : ) (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) :
                0 r50Pre12 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn14 (q nCls : ) (t : ) (k : Fin (2 * (2048 * q * q))) :
                0 r50Pre14 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.nn15 (q nCls : ) (t : ) (k : Fin (2 * (2048 * q * q))) :
                0 r50Pre15 2 q (sealW nCls) (sealX q t) k
                theorem Proofs.R50FullBSeal.pc1 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                r50Pre1 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))) => sealProj1 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) 64 256 (r50Pre0 2 q (sealW nCls) (sealX q t)) k + 1
                theorem Proofs.R50FullBSeal.pc2 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre2 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))) => r50Pre1 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc3 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre3 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))) => r50Pre2 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc4 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                r50Pre4 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) => R34FullBSeal.sealProj 2 (2 * (2 * q)) (2 * (2 * q)) 256 512 (r50Pre3 2 q (sealW nCls) (sealX q t)) k + 1
                theorem Proofs.R50FullBSeal.pc5 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre5 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) => r50Pre4 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc6 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre6 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) => r50Pre5 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc7 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre7 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))) => r50Pre6 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc8 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                r50Pre8 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => R34FullBSeal.sealProj 2 (2 * q) (2 * q) 512 1024 (r50Pre7 2 q (sealW nCls) (sealX q t)) k + 1
                theorem Proofs.R50FullBSeal.pc9 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre9 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => r50Pre8 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc10 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre10 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => r50Pre9 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc11 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre11 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => r50Pre10 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc12 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre12 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => r50Pre11 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc13 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre13 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (1024 * (2 * q) * (2 * q)))) => r50Pre12 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc14 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                r50Pre14 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (2048 * q * q))) => R34FullBSeal.sealProj 2 q q 1024 2048 (r50Pre13 2 q (sealW nCls) (sealX q t)) k + 1
                theorem Proofs.R50FullBSeal.pc15 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre15 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (2048 * q * q))) => r50Pre14 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.pc16 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                r50Pre16 2 q (sealW nCls) (sealX q t) = fun (k : Fin (2 * (2048 * q * q))) => r50Pre15 2 q (sealW nCls) (sealX q t) k + 1
                theorem Proofs.R50FullBSeal.sc_s1b0 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                R50ProjSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (sealW nCls).s1b0 (r50Pre0 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s1b1 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (sealW nCls).s1b1 (r50Pre1 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s1b2 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (sealW nCls).s1b2 (r50Pre2 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s2b0 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                R50DownSmoothAt 2 (2 * (2 * q)) (2 * (2 * q)) (sealW nCls).s2b0 (r50Pre3 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s2b1 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * (2 * q)) (2 * (2 * q)) (sealW nCls).s2b1 (r50Pre4 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s2b2 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * (2 * q)) (2 * (2 * q)) (sealW nCls).s2b2 (r50Pre5 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s2b3 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * (2 * q)) (2 * (2 * q)) (sealW nCls).s2b3 (r50Pre6 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b0 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                R50DownSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b0 (r50Pre7 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b1 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b1 (r50Pre8 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b2 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b2 (r50Pre9 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b3 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b3 (r50Pre10 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b4 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b4 (r50Pre11 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s3b5 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 (2 * q) (2 * q) (sealW nCls).s3b5 (r50Pre12 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s4b0 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                R50DownSmoothAt 2 q q (sealW nCls).s4b0 (r50Pre13 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s4b1 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 q q (sealW nCls).s4b1 (r50Pre14 2 q (sealW nCls) (sealX q t))
                theorem Proofs.R50FullBSeal.sc_s4b2 (q : ) (hq0 : 0 < q) (nCls : ) (t : ) :
                R50IdSmoothAt 2 q q (sealW nCls).s4b2 (r50Pre15 2 q (sealW nCls) (sealX q t))
                noncomputable def Proofs.R50FullBSeal.sealVJP (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :

                ⭐⭐ The whole-net VJP at the witness — all 48 relu clauses, the stem clause and the pool's no-tie discharged at (sealW nCls, sealX q t), on resnet50ForwardB_full itself (transported through resnet50ForwardB_full_eq_chain), at BOTH shipped resolutions.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Proofs.R50FullBSeal.sealDiffAt (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :

                  The net is differentiable at the witness — fderiv_ne_zero_of_ray's first hypothesis.

                  noncomputable def Proofs.R50FullBSeal.dS (q : ) (t : ) :
                  Fin 64

                  The carrier after the stem BN.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Proofs.R50FullBSeal.Zp1 (q nCls : ) (t : ) :
                    Vec (2 * (256 * (2 * (2 * (2 * q))) * (2 * (2 * (2 * q)))))

                    The stage-1 projection's pre-BN activation.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Proofs.R50FullBSeal.dP1 (q nCls : ) (t : ) :
                      Fin 256

                      The carrier after it.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        noncomputable def Proofs.R50FullBSeal.Zp2 (q nCls : ) (t : ) :
                        Vec (2 * (512 * (2 * (2 * q)) * (2 * (2 * q))))

                        The stage-2 projection's pre-BN activation.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def Proofs.R50FullBSeal.dP2 (q nCls : ) (t : ) :
                          Fin 512

                          The carrier after it.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def Proofs.R50FullBSeal.Zp3 (q nCls : ) (t : ) :
                            Vec (2 * (1024 * (2 * q) * (2 * q)))

                            The stage-3 projection's pre-BN activation.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              noncomputable def Proofs.R50FullBSeal.dP3 (q nCls : ) (t : ) :
                              Fin 1024

                              The carrier after it.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                noncomputable def Proofs.R50FullBSeal.Zp4 (q nCls : ) (t : ) :
                                Vec (2 * (2048 * q * q))

                                The stage-4 projection's pre-BN activation.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def Proofs.R50FullBSeal.dP4 (q nCls : ) (t : ) :
                                  Fin 2048

                                  The carrier after it.

                                  Equations
                                  Instances For
                                    theorem Proofs.R50FullBSeal.ed0 (q : ) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dS q t) (r50Pre0 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed1 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP1 q nCls t) (r50Pre1 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed2 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP1 q nCls t) (r50Pre2 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed3 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP1 q nCls t) (r50Pre3 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed4 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP2 q nCls t) (r50Pre4 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed5 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP2 q nCls t) (r50Pre5 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed6 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP2 q nCls t) (r50Pre6 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed7 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP2 q nCls t) (r50Pre7 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed8 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre8 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed9 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre9 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed10 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre10 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed11 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre11 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed12 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre12 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed13 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP3 q nCls t) (r50Pre13 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed14 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP4 q nCls t) (r50Pre14 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed15 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP4 q nCls t) (r50Pre15 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.ed16 (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (t : ) :
                                    BatchSeal.EDiff (dP4 q nCls t) (r50Pre16 2 q (sealW nCls) (sealX q t))
                                    theorem Proofs.R50FullBSeal.head_diff (q : ) (hq0 : 0 < q) (nCls : ) (hn : 0 < nCls) (v : Vec (2 * (2048 * q * q))) (δ : Fin 2048) (hv : BatchSeal.EDiff δ v) :
                                    r34HeadB 2 q q (sealW nCls).Wd (sealW nCls).bd v (finProdFinEquiv (0, 0, hn)) - r34HeadB 2 q q (sealW nCls).Wd (sealW nCls).bd v (finProdFinEquiv (1, 0, hn)) = δ 0

                                    The head reads channel 0 into class 0 — BatchSeal.head_diff_ct at this net's widths.

                                    noncomputable def Proofs.R50FullBSeal.Rr (q nCls : ) (t : ) :

                                    ⭐⭐ The positive, continuous nonlinear factor: one istd per BN on the carrier's path — the stem's and the FOUR projections'.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      theorem Proofs.R50FullBSeal.Rr_pos (q nCls : ) (t : ) :
                                      0 < Rr q nCls t
                                      theorem Proofs.R50FullBSeal.gd_ray (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (hn : 0 < nCls) (t : ) :

                                      ⭐⭐ The class-0 difference between the two examples, along the ray, is t · R t.

                                      theorem Proofs.R50FullBSeal.r50IdB_continuous (N h w mid oc : ) (p : R50IdW mid oc) (h1 : 0 < p.ε₁) (h2 : 0 < p.ε₂) (h3 : 0 < p.ε₃) :
                                      Continuous (r50IdB N h w p)
                                      theorem Proofs.R50FullBSeal.r50ProjB_continuous (N h w ic mid oc : ) (p : R50ProjW ic mid oc) (h1 : 0 < p.ε₁) (h2 : 0 < p.ε₂) (h3 : 0 < p.ε₃) (hp : 0 < p.εp) :
                                      theorem Proofs.R50FullBSeal.r50DownB_continuous (N h w ic mid oc : ) (p : R50ProjW ic mid oc) (h1 : 0 < p.ε₁) (h2 : 0 < p.ε₂) (h3 : 0 < p.ε₃) (hp : 0 < p.εp) :
                                      theorem Proofs.R50FullBSeal.cn0 (q nCls : ) :
                                      Continuous (r50Pre0 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn1 (q nCls : ) :
                                      Continuous (r50Pre1 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn2 (q nCls : ) :
                                      Continuous (r50Pre2 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn3 (q nCls : ) :
                                      Continuous (r50Pre3 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn4 (q nCls : ) :
                                      Continuous (r50Pre4 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn5 (q nCls : ) :
                                      Continuous (r50Pre5 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn6 (q nCls : ) :
                                      Continuous (r50Pre6 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn7 (q nCls : ) :
                                      Continuous (r50Pre7 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn8 (q nCls : ) :
                                      Continuous (r50Pre8 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.cn9 (q nCls : ) :
                                      Continuous (r50Pre9 2 q (sealW nCls))
                                      theorem Proofs.R50FullBSeal.Rr_continuous (q : ) (hq0 : 0 < q) (nCls : ) :
                                      Continuous (Rr q nCls)
                                      theorem Proofs.R50FullBSeal.sealX_nonconstant (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (hn : 0 < nCls) :

                                      ⭐⭐ Level 2 — the witness is non-degenerate: the full-width batch-BN ResNet-50 at the structural weights is NOT constant in its input, at either shipped resolution.

                                      theorem Proofs.R50FullBSeal.sealX_jacobian_nonzero (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (hn : 0 < nCls) :

                                      ⭐⭐ Level 3 — the whole-net Jacobian is nonzero at the witness.

                                      theorem Proofs.R50FullBSeal.sealX_backward_nontrivial (q : ) (hq0 : 0 < q) (hq : q 7) (nCls : ) (hn : 0 < nCls) :
                                      ∃ (j₀ : Fin (2 * nCls)) (i₀ : Fin (2 * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))), (sealVJP q hq0 hq nCls 0).backward (basisVec j₀) i₀ 0

                                      ⭐⭐ The seal: the proven whole-network backward of the full-width, batch-BatchNorm, [3,4,6,3]-bottleneck ResNet-50 — resnet50ForwardB_full, at BOTH shipped resolutions — is not the zero map at the witness. ResNet-50's clause bundle (48 relu clauses, the stem and the pool) had no exhibited point at all before this.