Documentation

LeanMlir.Proofs.Nets.ResNet.ResNet50FullBSeal

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

ResNet50FullBVJP.lean proves resnet50ForwardBFullHasVJPAt under 48 relu clauses — three per bottleneck — plus the stem's and the stem pool's. This file exhibits the clause bundle's joint satisfiability, and a nonzero Jacobian with it, on resnet50ForwardBFull 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 (BatchSeal.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.seal_id_body (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.seal_dn_body (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 seal_pr_body 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.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))) => BatchSeal.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.seal_id_smooth (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.seal_dn_smooth (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.margin_stem (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.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).sε (sealW nCls).sγ (sealW nCls).sβ (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.seal_stem_clause (q : ℕ) (hq : q ≤ 7) (nCls : ℕ) (t : ℝ) :
                R34StemSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (sealW nCls).sW (sealW nCls).sb (sealW nCls).sε (sealW nCls).sγ (sealW nCls).sβ (sealX q t)
                theorem Proofs.R50FullBSeal.seal_pool_clause (q : ℕ) (hq : q ≤ 7) (nCls : ℕ) (t : ℝ) :
                StemPoolSmoothAt 2 (2 * (2 * (2 * q))) (2 * (2 * (2 * q))) (StableHLO.cbReluStridedB 2 (sealW nCls).sW (sealW nCls).sb (sealW nCls).sε (sealW nCls).sγ (sealW nCls).sβ (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))))) => BatchSeal.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)))) => BatchSeal.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))) => BatchSeal.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

                Every BN ε of the witness is 1.

                theorem Proofs.R50FullBSeal.seal_smooth (q : ℕ) (hq0 : 0 < q) (hq : q ≤ 7) (nCls : ℕ) (t : ℝ) :
                R50SmoothAtB 2 q (sealW nCls) (sealX q t)

                The stem clause, the pool's no-tie and all 48 relu clauses at (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 resnet50ForwardBFull itself (transported through resnet50ForwardBFull_eq_chain), at BOTH shipped resolutions.

                Equations
                Instances For
                  theorem Proofs.R50FullBSeal.seal_differentiableAt (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.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 : ℝ) :
                                    resnet50ForwardBFull 2 q (sealW nCls) (sealX q t) (finProdFinEquiv (0, ⟨0, hn⟩)) - resnet50ForwardBFull 2 q (sealW nCls) (sealX q t) (finProdFinEquiv (1, ⟨0, hn⟩)) = t * Rr q nCls t

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

                                    theorem Proofs.R50FullBSeal.Rr_continuous (q : ℕ) (_hq0 : 0 < q) (nCls : ℕ) :
                                    Continuous (Rr q nCls)

                                    R is continuous: every bottleneck is, and fun_prop composes the thirteen-block prefix once the chain is unfolded to its atoms. Every BN on the witness has ε = 1.

                                    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 — resnet50ForwardBFull, at BOTH shipped resolutions — is not the zero map at the witness.