Documentation

LeanMlir.Proofs.Nets.ResNet.ResNet50SyncStepTieB

ResNet-50's data-parallel step at SYNCHRONISED BatchNorm IS the single-device step at R·N #

ResNet50StepTieB (T3) threads a loss cotangent g down the batch-BN bottleneck backward chain on ONE device and ties every parameter gradient node to the certified gradient. This is its data-parallel twin, for the render ResNet50RenderB emits at replicas > 1: R replicas at batch N, every BatchNorm synchronised (bnFwdSite / bnBackSite / bnGammaSite), every parameter gradient all-reduced by its mean. The capstone r50_net_syncTiedB says that, for every one of the 161 parameters,

mean over the R replicas of replica r's gradient node, replica cotangent gs r
  = the single-device gradient node at the global batch R·N, loss cotangent G

whenever each replica's loss cotangent is R × its shard of the global one (∀ r, gs r = batchShard r (R • G)) — the gradient node r50_net_tiedB at N := R·N ties to the certified gradient. The right-hand side is the existing single-device chain at N := R·N, so the spec has not moved.

⭐⭐ The loss cotangent is a binder, as it is in T3. ResNet-50 ships both losses, so the capstone takes the scaled-shard relation between the replicas' cotangents and the global one as its hypothesis, and two corollaries discharge it, one per loss:

  1. Sharding — each replica's backward chain, handed its shard of a global cotangent, computes the shard of the global chain. Every non-BN link (relu mask, the 1×1 and 3×3 conv input-VJPs, the strided 3×3 and strided 1×1 input-VJPs, the stem pool's scatter, the head) is a per-example map; the BN link is bnSyncInB, whose shard lemma bnSyncInB_shard is P2 on the graph. ⚠ In the strided block bn₁ runs at the INPUT grid 2h × 2w (v1.5: the stride is on the 3×3), so that site's statistics reduce over N·(2h)·(2w) per replica.
  2. The collectives — the mean over replicas of each replica's gradient node is 1/R of the global node at the global cotangent (DataParallelSync's P4 lemmas and ResNet-34's strided and dense ones). The γ node is the sync one, bnSyncGammaGradB, reading the forward's all-reduced statistics.
  3. Homogeneity — the single-device chain is linear in its cotangent (*_smul below for the three bottleneck forms, ResNet-34's for the links they are built from).
  4. The divisor — the R the hypothesis carries cancels the collective's 1/R.

The index seam #

The chain runs at N·(c·h·w), the BN nodes at N·(c·(h·w)); the replica BN link bnSyncInB is the den of the emitted nodes over .operand leaves at reassocB (ResNet-34's), and reassocB_shard commutes the relabelling with sharding.

What is NOT claimed #

⚠ The replicas' saved forward activations enter as the shards of the single-device forward's (batchShard r (r50Pre_k (R*N) q w X)); that the sync forward graph computes exactly those is StableHLO.resnet50FwdGraphSync_full_shard, the forward half. ⚠ No stochastic depth (drop-path): the chain is the drop-free one, as T3's is. ⚠ The f32 nodes — the bf16 conv twins are not this statement. ⚠ The render has no conv-bias gradient ops, so there are none here. ⚠ That the replicas' inputs are the shards of one batch is the driver's. ⚠ The gradient accumulator and the optimizers run after the collective, so this is per micro-step. ⚠ The lowerer's all_reduce is trusted as every other op's lowering is.

theorem Proofs.ResNet50SyncTieB.r50IdCotA_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotA N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50IdCotA N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotC3_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotC3 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50IdCotC3 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotN2_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotN2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50IdCotN2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotC2_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotC2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50IdCotC2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotN1_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotN1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50IdCotN1 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotC1_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotC1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50IdCotC1 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50IdCotIn_smul (N h w : ) {mid oc : } (p : R50IdW mid oc) (xin dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50IdCotIn N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50IdCotIn N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotA_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotA N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50ProjCotA N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotC3_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotC3 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50ProjCotC3 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotN2_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotN2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50ProjCotN2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotC2_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotC2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50ProjCotC2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotN1_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotN1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50ProjCotN1 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotC1_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotC1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50ProjCotC1 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotCp_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotCp N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50ProjCotCp N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50ProjCotIn_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * h * w))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50ProjCotIn N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (ic * h * w))) => s * ResNet50TieB.r50ProjCotIn N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotA_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotA N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50DownCotA N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotC3_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotC3 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50DownCotC3 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotN2_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotN2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50DownCotN2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotC2_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotC2 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * h * w))) => s * ResNet50TieB.r50DownCotC2 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotN1_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotN1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * (2 * h) * (2 * w)))) => s * ResNet50TieB.r50DownCotN1 N h w p xin dy i

⚠ The strided 3×3's input-VJP carries the cotangent from h × w up to bn₁'s 2h × 2w.

theorem Proofs.ResNet50SyncTieB.r50DownCotC1_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotC1 N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (mid * (2 * h) * (2 * w)))) => s * ResNet50TieB.r50DownCotC1 N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotCp_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotCp N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (oc * h * w))) => s * ResNet50TieB.r50DownCotCp N h w p xin dy i
theorem Proofs.ResNet50SyncTieB.r50DownCotIn_smul (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dy : Vec (N * (oc * h * w))) (s : ) :
(ResNet50TieB.r50DownCotIn N h w p xin fun (i : Fin (N * (oc * h * w))) => s * dy i) = fun (i : Fin (N * (ic * (2 * h) * (2 * w)))) => s * ResNet50TieB.r50DownCotIn N h w p xin dy i
noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotA (R N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
Vec (N * (oc * h * w))

Replica r's cotangent at the pre-relu sum. Feeds bn₃'s γ/β and the identity skip.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotC3 (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
    Vec (N * (oc * h * w))

    …at conv₃'s output, through bn₃'s sync backward. Feeds W₃.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotN2 (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
      Vec (N * (mid * h * w))

      …at bn₂'s output. Feeds γ₂/β₂.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotC2 (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
        Vec (N * (mid * h * w))

        …at conv₂'s output. Feeds W₂.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotN1 (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
          Vec (N * (mid * h * w))

          …at bn₁'s output. Feeds γ₁/β₁.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotC1 (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
            Vec (N * (mid * h * w))

            …at conv₁'s output. Feeds W₁.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              noncomputable def Proofs.ResNet50SyncTieB.r50IdSyncCotIn (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
              Vec (N * (oc * h * w))

              The replica's block-INPUT cotangent: the residual fan-in, body plus identity skip.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotA_shard (R N h w : ) {mid oc : } (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotA R N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50IdCotA (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotC3_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotC3 R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50IdCotC3 (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotN2_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotN2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50IdCotN2 (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotC2_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotC2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50IdCotC2 (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotN1_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotN1 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50IdCotN1 (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotC1_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotC1 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50IdCotC1 (R * N) h w p XIN DY) r
                theorem Proofs.ResNet50SyncTieB.r50IdSyncCotIn_shard (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                r50IdSyncCotIn R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50IdCotIn (R * N) h w p XIN DY) r
                noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotA (R N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                Vec (N * (oc * h * w))

                Replica r's cotangent at the stride-1 projection block's pre-relu sum. Feeds bn₃'s and the projection's γ/β, and the projection's backward branch.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotC3 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                  Vec (N * (oc * h * w))
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotN2 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                    Vec (N * (mid * h * w))
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotC2 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                      Vec (N * (mid * h * w))
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotN1 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                        Vec (N * (mid * h * w))
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotC1 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                          Vec (N * (mid * h * w))
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotCp (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                            Vec (N * (oc * h * w))

                            …at the stride-1 1×1 projection conv's output, through the skip BN's sync backward. Feeds Wp.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              noncomputable def Proofs.ResNet50SyncTieB.r50ProjSyncCotIn (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                              Vec (N * (ic * h * w))

                              The replica's block-INPUT cotangent: both branches' input-VJPs, as the render adds them.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotA_shard (R N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotA R N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50ProjCotA (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotC3_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotC3 R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50ProjCotC3 (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotN2_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotN2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50ProjCotN2 (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotC2_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotC2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50ProjCotC2 (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotN1_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotN1 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50ProjCotN1 (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotC1_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotC1 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50ProjCotC1 (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotCp_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotCp R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50ProjCotCp (R * N) h w p XIN DY) r
                                theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotIn_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                r50ProjSyncCotIn R hR N h w p XIN dys r = batchShard R N (ic * h * w) (ResNet50TieB.r50ProjCotIn (R * N) h w p XIN DY) r
                                noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotA (R N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                Vec (N * (oc * h * w))

                                Replica r's cotangent at the strided block's pre-relu sum.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotC3 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                  Vec (N * (oc * h * w))
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotN2 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                    Vec (N * (mid * h * w))
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotC2 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                      Vec (N * (mid * h * w))

                                      …at the STRIDED 3×3's output. Feeds W₂.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotN1 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                        Vec (N * (mid * (2 * h) * (2 * w)))

                                        …at bn₁'s output — at the INPUT grid 2h × 2w, the strided 3×3's input-VJP having upsampled.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotC1 (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                          Vec (N * (mid * (2 * h) * (2 * w)))

                                          …at conv₁'s output, through bn₁'s sync backward at 2h × 2w. Feeds W₁.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotCp (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                            Vec (N * (oc * h * w))

                                            …at the strided 1×1 projection's output. Feeds Wp.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              noncomputable def Proofs.ResNet50SyncTieB.r50DownSyncCotIn (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (r : Fin R) :
                                              Vec (N * (ic * (2 * h) * (2 * w)))

                                              The replica's block-INPUT cotangent: conv₁'s input-VJP plus the strided skip's.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotA_shard (R N h w : ) {ic mid oc : } (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotA R N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50DownCotA (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotC3_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotC3 R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50DownCotC3 (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotN2_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotN2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50DownCotN2 (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotC2_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotC2 R hR N h w p XIN dys r = batchShard R N (mid * h * w) (ResNet50TieB.r50DownCotC2 (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotN1_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotN1 R hR N h w p XIN dys r = batchShard R N (mid * (2 * h) * (2 * w)) (ResNet50TieB.r50DownCotN1 (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotC1_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotC1 R hR N h w p XIN dys r = batchShard R N (mid * (2 * h) * (2 * w)) (ResNet50TieB.r50DownCotC1 (R * N) h w p XIN DY) r

                                                ⚠ bn₁'s sync site reduces over N·(2h)·(2w) per replica — the one site in the net where the reduction width is not the block's output grid.

                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotCp_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotCp R hR N h w p XIN dys r = batchShard R N (oc * h * w) (ResNet50TieB.r50DownCotCp (R * N) h w p XIN DY) r
                                                theorem Proofs.ResNet50SyncTieB.r50DownSyncCotIn_shard (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) DY r) (r : Fin R) :
                                                r50DownSyncCotIn R hR N h w p XIN dys r = batchShard R N (ic * (2 * h) * (2 * w)) (ResNet50TieB.r50DownCotIn (R * N) h w p XIN DY) r
                                                def Proofs.ResNet50SyncTieB.r50IdSyncTiedB (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (pfx xN cotN vN epsStr : String) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) :

                                                Identity bottleneck, DP-tied. Its nine emitted parameter collectives — the three conv weights and the three BatchNorms' γ and β — each equal the single-device node at the global batch, at the single-device chain cotangents driven by DY, when the replicas' block-output cotangents are R × its shards. ⚠ Each BN's γ/β reads the cotangent at THAT BN's output (N1, N2, A), each conv the one at the conv's output (C1, C2, C3) — T3's wiring.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem Proofs.ResNet50SyncTieB.r50IdSyncCotIn_scaled (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) (r : Fin R) :
                                                  r50IdSyncCotIn R hR N h w p XIN dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * ResNet50TieB.r50IdCotIn (R * N) h w p XIN DY i) r

                                                  The scaled-shard invariant, carried through one identity bottleneck: replicas at R × the shards of DY produce block-input cotangents at R × the shards of the single-device one.

                                                  theorem Proofs.ResNet50SyncTieB.r50_idblock_syncTiedB (R : ) (hR : 0 < R) (N h w : ) {mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (pfx xN cotN vN epsStr : String) (p : R50IdW mid oc) (XIN : Vec (R * N * (oc * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) :
                                                  r50IdSyncTiedB R hR N h w pfx xN cotN vN epsStr p XIN dys DY
                                                  def Proofs.ResNet50SyncTieB.r50ProjSyncTiedB (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (pfx xN cotN vN epsStr : String) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) :

                                                  Stride-1 projection bottleneck, DP-tied — stage 1 block 0, twelve collectives: the identity bottleneck's nine plus the stride-1 1×1 skip's weight (an ORDINARY ConvWSync) and its BatchNorm's γ and β, which read A, the post-relu cotangent.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    theorem Proofs.ResNet50SyncTieB.r50ProjSyncCotIn_scaled (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) (r : Fin R) :
                                                    r50ProjSyncCotIn R hR N h w p XIN dys r = batchShard R N (ic * h * w) (fun (i : Fin (R * N * (ic * h * w))) => R * ResNet50TieB.r50ProjCotIn (R * N) h w p XIN DY i) r
                                                    theorem Proofs.ResNet50SyncTieB.r50_projblock_syncTiedB (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (pfx xN cotN vN epsStr : String) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * h * w))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) :
                                                    r50ProjSyncTiedB R hR N h w pfx xN cotN vN epsStr p XIN dys DY
                                                    def Proofs.ResNet50SyncTieB.r50DownSyncTiedB (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (pfx xN cotN vN epsStr : String) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) :

                                                    Strided projection bottleneck, DP-tied — stages 2/3/4 block 0, twelve collectives. ⚠⚠ v1.5: W₁ is an ordinary ConvWSync at the INPUT grid 2h × 2w and bn₁'s γ/β reduce there; only W₂ (the 3×3) and Wp (the 1×1 skip) are ConvStridedWSync.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      theorem Proofs.ResNet50SyncTieB.r50DownSyncCotIn_scaled (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) (r : Fin R) :
                                                      r50DownSyncCotIn R hR N h w p XIN dys r = batchShard R N (ic * (2 * h) * (2 * w)) (fun (i : Fin (R * N * (ic * (2 * h) * (2 * w)))) => R * ResNet50TieB.r50DownCotIn (R * N) h w p XIN DY i) r
                                                      theorem Proofs.ResNet50SyncTieB.r50_downblock_syncTiedB (R : ) (hR : 0 < R) (N h w : ) {ic mid oc : } (hN : 0 < N) (hh : 0 < h) (hw : 0 < w) (pfx xN cotN vN epsStr : String) (p : R50ProjW ic mid oc) (XIN : Vec (R * N * (ic * (2 * h) * (2 * w)))) (dys : Fin RVec (N * (oc * h * w))) (DY : Vec (R * N * (oc * h * w))) (hdys : ∀ (r : Fin R), dys r = batchShard R N (oc * h * w) (fun (i : Fin (R * N * (oc * h * w))) => R * DY i) r) :
                                                      r50DownSyncTiedB R hR N h w pfx xN cotN vN epsStr p XIN dys DY
                                                      def Proofs.ResNet50SyncTieB.r50NetSyncTiedB (R : ) (hR : 0 < R) (N q : ) {nCls : } (xN cotN vN epsStr : String) (w : R50BWeights nCls) (X : Vec (R * N * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))) (G : Vec (R * N * nCls)) (gs : Fin RVec (N * nCls)) :

                                                      Every all-reduced parameter gradient of the sync-BN data-parallel ResNet-50 step, tied — the statement r50_net_syncTiedB proves, named so the per-loss corollaries can state it at their cotangents.

                                                      The single-device chain is T3's (r50_net_tiedB's dy_k) at the global batch R·N, driven by the global loss cotangent G. The replica chain is each replica's own: the head backward on its shard of the trunk's output at its own cotangent gs r, then sixteen bottleneck backwards, every BatchNorm the sync backward. The conjuncts are the 161 collectives the render emits — stem 3, twelve identity bottlenecks × 9, four projection bottlenecks × 12, dense 2 — each equal to the single-device gradient node at N := R·N.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        theorem Proofs.ResNet50SyncTieB.r50_net_syncTiedB (R : ) (hR : 0 < R) (N : ) (hN : 0 < N) (q : ) (hq : 0 < q) {nCls : } (xN cotN vN epsStr : String) (w : R50BWeights nCls) (X : Vec (R * N * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))) (G : Vec (R * N * nCls)) (gs : Fin RVec (N * nCls)) (hgs : ∀ (r : Fin R), gs r = batchShard R N nCls (fun (i : Fin (R * N * nCls)) => R * G i) r) :
                                                        r50NetSyncTiedB R hR N q xN cotN vN epsStr w X G gs

                                                        ⭐⭐⭐ The synchronised-BN data-parallel ResNet-50 step IS the single-device step at the global batch. R replicas at batch N, each running the render's sync-BN backward chain from its own loss cotangent gs r; every parameter's all-reduced mean gradient — the 161 the render emits — equals the single-device batch-BN gradient node at batch R·N, at the cotangent T3's chain delivers there from G, whenever each replica's cotangent is R × its shard of G.

                                                        ⭐ The hypothesis hgs is the divisor step, left open because T3 leaves the loss open: a replica divides its loss by its own batch and the global step by R × that, so a replica's cotangent is R × its shard of the global one — for the label-smoothed CE (r50_net_syncTiedB_smoothedCE) and for BCE-with-logits (r50_net_syncTiedB_bce) alike.

                                                        ⭐ The right-hand chain is r50_net_tiedB's at N := R·N, g := G, whose nodes that capstone ties to the certified gradient — so this and it together say the DP step's update is the certified gradient of the mean loss over all R·N examples. N, q are binders, so one statement covers the 224-px (q = 7) and 160-px (q = 5) artifacts; 0 < q makes every BatchNorm's reduction width nonzero.

                                                        theorem Proofs.ResNet50SyncTieB.replicaBceLossCot_eq (R N nCls : ) (hR : 0 < R) (bk : ) (bStr logN ohN : String) (Z : Vec (R * N * nCls)) (T : Vec (R * N * (1 * nCls))) (r : Fin R) :
                                                        ResNet34TieB.unrowB N nCls (StableHLO.den (bceLossCotGraph N nCls bk bStr logN ohN (ResNet34TieB.rowB N nCls (batchShard R N nCls Z r)) (batchShard R N (1 * nCls) T r))) = batchShard R N nCls (fun (i : Fin (R * N * nCls)) => R * ResNet34TieB.unrowB (R * N) nCls (StableHLO.den (bceLossCotGraph (R * N) nCls (R * bk) bStr logN ohN (ResNet34TieB.rowB (R * N) nCls Z) T)) i) r

                                                        The BCE divisor stepResNet34SyncTieB.replicaLossCot_eq's peer for BCE-with-logits. Replica r's three-op chain divides by bk, the single-device one at the global batch by R·bk; at the replica's shard of the logits and targets, the replica's cotangent is R × its shard of the global one. σ(z) − t is per example, so only the divisor differs.

                                                        theorem Proofs.ResNet50SyncTieB.r50_net_syncTiedB_smoothedCE (R : ) (hR : 0 < R) (N : ) (hN : 0 < N) (q : ) (hq : 0 < q) {nCls : } (xN cotN vN epsStr aStr negAK bStr logN ohN : String) (α B : ) (w : R50BWeights nCls) (X : Vec (R * N * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))) (T : Vec (R * N * (1 * nCls))) :
                                                        r50NetSyncTiedB R hR N q xN cotN vN epsStr w X (ResNet34TieB.unrowB (R * N) nCls (StableHLO.den (smoothedLossCotGraph (R * N) nCls α (R * B) aStr negAK bStr logN ohN (ResNet34TieB.rowB (R * N) nCls (resnet50ForwardB_full (R * N) q w X)) T))) fun (r : Fin R) => ResNet34TieB.unrowB N nCls (StableHLO.den (smoothedLossCotGraph N nCls α B aStr negAK bStr logN ohN (ResNet34TieB.rowB N nCls (batchShard R N nCls (resnet50ForwardB_full (R * N) q w X) r)) (batchShard R N (1 * nCls) T r)))

                                                        The sync-BN DP step at the label-smoothed loss — every bce := false DP artifact. Replicas divide by B, the global step by R·B; replicaLossCot_eq discharges hgs.

                                                        theorem Proofs.ResNet50SyncTieB.r50_net_syncTiedB_bce (R : ) (hR : 0 < R) (N : ) (hN : 0 < N) (q : ) (hq : 0 < q) {nCls : } (xN cotN vN epsStr bStr logN ohN : String) (w : R50BWeights nCls) (X : Vec (R * N * (3 * (2 * (2 * (2 * (2 * (2 * q))))) * (2 * (2 * (2 * (2 * (2 * q)))))))) (T : Vec (R * N * (1 * nCls))) :
                                                        r50NetSyncTiedB R hR N q xN cotN vN epsStr w X (ResNet34TieB.unrowB (R * N) nCls (StableHLO.den (bceLossCotGraph (R * N) nCls (↑(R * N) * nCls) bStr logN ohN (ResNet34TieB.rowB (R * N) nCls (resnet50ForwardB_full (R * N) q w X)) T))) fun (r : Fin R) => ResNet34TieB.unrowB N nCls (StableHLO.den (bceLossCotGraph N nCls (N * nCls) bStr logN ohN (ResNet34TieB.rowB N nCls (batchShard R N nCls (resnet50ForwardB_full (R * N) q w X) r)) (batchShard R N (1 * nCls) T r)))

                                                        ⭐⭐ The sync-BN DP step at BCE-with-logits, at the COMMITTED divisors — every bce := true DP artifact, including resnet50in160_lambaccdp8x64bce (per micro-step). A replica's chain divides by N·K (its own batch × the class count, what the render bakes at B := N); the single-device step at the global batch by (R·N)·Kr50_lossCot_is_bce_grad's divisor at N := R·N. replicaBceLossCot_eq discharges hgs once (R·N)·K = R·(N·K).