Documentation

LeanMlir.Proofs.Nets.MobileNet.MobileNetV2StepTieB

MobileNetV2's T3 §1a TIE at TRUE BATCH-NORM — the un-fused, batched whole-net thread #

MobileNetV2FoldPaperG.lean (4b.4) makes every parameter GRADIENT node of the batched MobileNetV2 train step den-faithful for an arbitrary cotangent. This file removes the "arbitrary": each cotangent is pinned to the one the emitted backward chain delivers, so the whole train step is den-composed forward → loss → backward with no free activation and no symbolic cotangent. With 4.2b it completes MobileNetV2's T3, and it is ResNet34StepTieB.lean's peer.

⭐⭐ The block cotangents are NOT derived here. 4.2b's mnv2{ExpOnly,Resid,Strided,NoExp}B_has_vjp_at ARE the certified block backwards, and mnv2{Body,DownBody,ResidBlock}BackBatchedGraph_faithful (MobileNetV2BackB0.lean) already prove the emitted backward subgraphs denote exactly them. The four *CotIn_eq_vjp lemmas below are those statements in this file's vocabulary, and they are what make the cross-block thread a composition of certified VJPs rather than a re-derivation.

One parameter-tie bundle covers twelve of the seventeen blocks. A skip block and a stride-1 widening have the SAME parameter cotangents — the identity skip changes only the dx handed to the previous block, which is why MobileNetV2RenderB's irBackStride1GradB is one function with a skip flag rather than two near-copies. So mnv2Stride1TiedB is stated once and instantiated at b3, b5, b6, b8b13, b15, b16 (skip) and b11, b17 (no skip).

The loss cotangent is the LABEL-SMOOTHED one, at a general target, shared with ResNet-34: Foundation/SmoothedLossCot.lean. MobileNetV2RenderB composes it from the same six kit ops (softmaxRow → subB → scaleB → addVB → shiftB → divConstB) with α at 0.1 and the target arriving as the graph input %onehot — a soft vector under mixup or cutmix.

N is a binder. The artifacts at 32 (mobilenetv2_adam_train_step) or 64 (mobilenetv2in_rmsdp64) are instances. T3 carries no numerals.

The all-reduce, since 4d piece 2 (2026-09-07). In mobilenetv2in_rmsdp64 each *GradB node feeds allReduceMeanF — the collective as an AST node whose den is the replica MEAN of the per-replica gradient nodes; until then emitGradAllReduce, emitted text and a declared carve-out outside the SHlo AST. Every statement below is at the PER-REPLICA gradient node; DataParallelNode.lean composes it with the mean and the tail.

bnInB and bnInB_eq_bnBackB are ResNet-34's, imported rather than copied. They are the batched BatchNorm input-cotangent written as the den of the emitted backward op, and its identity with the certified bnBatchLA VJP — both net-agnostic, and they happen to live in the file that first needed them. What MobileNetV2 adds is the TWO-SIDED relu6 mask (relu6MaskB, where r34 threads the one-sided reluMaskB), the depthwise input-VJP and its XLA-SAME strided peer.

The parameter census is 158, and this file states 210 slots #

MobileNetV2RenderB defaults to convBias := false: every conv, depthwise and project bias is folded into the BatchNorm that follows it and bound to zeroBiasPrelude's shared zero constant. So mobilenetv2_adam_train_step.mlir carries 158 updated parameter tensors — stem 3 + b1 6 + 16 blocks × 9 + head 3 + dense 2 — and 210 is the census at convBias := true. The bias conjuncts below are kept (one delegation each, and they cover the flag) and are about ops the committed artifacts do not emit. Nothing here weakens a theorem: every fold is -quantified over op instances, and bias = 0 is one of them.

Conventions, stated because nothing here checks them #

BatchNormbatch (bnBatchLA, reduce [0,2,3], width N·h·w), 52 sites
paddingXLA-SAME at all five stride-2 sites (the stem conv, the four strided depthwises)
activationrelu6, TWO kinks per site (≠ 0 and ≠ 6), 35 sites, none after a project
optimizer formthe RAW gradient (*GradB); this net's renders emit no fused θ − lr·g at all
losslabel-smoothed softmax-CE at a general target, batch-meaned
noncomputable def Proofs.MobileNetV2TieB.relu6MaskB (n : ) (pre dy : Vec n) :
Vec n

The relu6 backward maskden (.selectMidB _ pre e) = fun i => if 0 < pre i ∧ pre i < 6 then e i else 0. TWO-sided, where ResNet-34's reluMaskB tests pre i > 0 only. MobileNetV2 applies it at 35 sites: two per expand-bearing block, one in b1, one at the stem, one in the head.

Equations
Instances For
    noncomputable def Proofs.MobileNetV2TieB.dStridedXlaInB (N : ) {c h w kH kW : } (W : DepthwiseKernel c kH kW) (b : Vec c) (dy : Vec (N * (c * h * w))) :
    Vec (N * (c * (2 * h) * (2 * w)))

    Batched XLA-SAME STRIDED depthwise input-VJP (= den depthwiseStridedXlaBackBatched; upsamples h → 2h). ⚠ NOT EnetTiePoC.dStridedInB, which is the SYMMETRIC depthwiseStride2Flat — B0's strided depthwise and MobileNetV2's have identical types and different certificates, and this is the one place that distinction is recorded on the backward side.

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

      MobileNetV2RenderB.irBackNoExpGradB, node for node, from the block-output cotangent dyOut:

      %dpc = bnBatchBack(pg, pc)   %ddr = convBackBatched(pW)   %ddm = selectMidB(dn)
      %ddn = bnBatchBack(dg, dc)   %dxb = depthwiseBackBatched(dW)
      

      with dW,db ← %ddn, dg,dbt ← %ddm, pW,pb ← %dpc, pg,pbt ← %dy.

      noncomputable def Proofs.MobileNetV2TieB.mnv2NoExpCotPc (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
      Vec (N * (oc * h * w))

      Cotangent at the project conv's output. Feeds pW/pb.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Proofs.MobileNetV2TieB.mnv2NoExpCotDn (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
        Vec (N * (ic * h * w))

        Cotangent at the depthwise BN's output — the project conv's input-VJP masked by the depthwise relu6. Feeds dg/dbt.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def Proofs.MobileNetV2TieB.mnv2NoExpCotDc (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
          Vec (N * (ic * h * w))

          Cotangent at the depthwise conv's output. Feeds dW/db.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Proofs.MobileNetV2TieB.mnv2NoExpCotIn (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
            Vec (N * (ic * h * w))

            The block-INPUT cotangent: the depthwise backward, directly — no expand conv and no skip.

            Equations
            Instances For
              noncomputable def Proofs.MobileNetV2TieB.mnv2NoExpBackGraph {N ic oc h w : } (p : IVWNoExp ic oc) (x : Vec (N * (ic * h * w))) (e : StableHLO.SHlo (N * (oc * h * w))) :
              StableHLO.SHlo (N * (ic * h * w))

              The t = 1 block's backward graph: the two stage graphs chained at their forward activations, dwbrLayer ; projLayer's graph. ⚠ It lives here rather than in MobileNetV2BackB0.lean because mnv2NoExpB is a wrapper of MobileNetV2FullB.lean's, one tier above that file's vocabulary.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Proofs.MobileNetV2TieB.mnv2NoExpBackGraph_faithful {N ic oc h w : } (p : IVWNoExp ic oc) (hq : IVNoExpPos p) (x : Vec (N * (ic * h * w))) (e : StableHLO.SHlo (N * (oc * h * w))) (hs : IVNoExpSmoothAtB N h w p x) :
                theorem Proofs.MobileNetV2TieB.mnv2NoExpCotIn_eq_vjp (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (hq : IVNoExpPos p) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) (hs : IVNoExpSmoothAtB N h w p xin) (cotN : String) :
                mnv2NoExpCotIn N h w p xin dyOut = (mnv2NoExpB_has_vjp_at N h w p hq xin hs).backward dyOut

                ⭐⭐ The emitted t = 1 chain IS the certified block VJP's backward.

                MobileNetV2RenderB.irBackStride1GradB, node for node, from the block-output cotangent dyOut:

                %dpc = bnBatchBack(pg, pc)   %ddr = convBackBatched(pW)         %ddm = selectMidB(dn)
                %ddn = bnBatchBack(dg, dc)   %der = depthwiseBackBatched(dW)    %dem = selectMidB(en)
                %den = bnBatchBack(eg, ec)   %dxb = convBackBatched(eW)
                %dx  = if skip then addVB(%dxb, %dy) else %dxb
                

                with eW,eb ← %den, eg,ebt ← %dem, dW,db ← %ddn, dg,dbt ← %ddm, pW,pb ← %dpc, pg,pbt ← %dy. ⭐ The skip flag touches ONLY %dx, so all twelve parameter cotangents below are shared between the skip blocks and the two stage-first widenings (b11, b17).

                @[reducible]
                noncomputable def Proofs.MobileNetV2TieB.mnv2XE (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) :
                Vec (N * (mid * h * w))

                The expand stage's output — the depthwise's input.

                Equations
                Instances For
                  noncomputable def Proofs.MobileNetV2TieB.mnv2CotPc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                  Vec (N * (oc * h * w))

                  Cotangent at the project conv's output. Feeds pW/pb.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Proofs.MobileNetV2TieB.mnv2CotDn (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                    Vec (N * (mid * h * w))

                    Cotangent at the depthwise BN's output — the project conv's input-VJP masked by the depthwise relu6. Feeds dg/dbt.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Proofs.MobileNetV2TieB.mnv2CotDc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                      Vec (N * (mid * h * w))

                      Cotangent at the depthwise conv's output. Feeds dW/db.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        noncomputable def Proofs.MobileNetV2TieB.mnv2CotEn (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                        Vec (N * (mid * h * w))

                        Cotangent at the expand BN's output — the depthwise's input-VJP masked by the expand relu6. Feeds eg/ebt.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def Proofs.MobileNetV2TieB.mnv2CotEc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                          Vec (N * (mid * h * w))

                          Cotangent at the expand conv's output. Feeds eW/eb.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def Proofs.MobileNetV2TieB.mnv2CotInBody (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                            Vec (N * (ic * h * w))

                            The BODY's input cotangent — the expand conv's backward. This is the whole block-input cotangent for a widening (b11, b17); a skip block adds dyOut to it.

                            Equations
                            Instances For
                              theorem Proofs.MobileNetV2TieB.mnv2ExpOnlyCotIn_eq_vjp (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) (hs : IVSmoothAtB N h w p xin) (cotN : String) :
                              mnv2CotInBody N h w p xin dyOut = (mnv2ExpOnlyB_has_vjp_at N h w p hq xin hs).backward dyOut

                              ⭐⭐ The emitted stride-1 chain IS the certified body VJP's backward — the widening blocks' _eq_vjp, straight from mnv2BodyBackBatchedGraph_faithful.

                              noncomputable def Proofs.MobileNetV2TieB.mnv2ResidCotIn (N h w : ) {c mid : } (p : IVW c mid c) (xin dyOut : Vec (N * (c * h * w))) :
                              Vec (N * (c * h * w))

                              The SKIP block's input cotangent: the body branch plus the identity skip, the addVB fan-in the render emits.

                              Equations
                              Instances For
                                theorem Proofs.MobileNetV2TieB.mnv2ResidCotIn_eq_vjp (N h w : ) {c mid : } (p : IVW c mid c) (hq : IVPos p) (xin dyOut : Vec (N * (c * h * w))) (hs : IVSmoothAtB N h w p xin) (cotN : String) :
                                mnv2ResidCotIn N h w p xin dyOut = (mnv2ResidB_has_vjp_at N h w p hq xin hs).backward dyOut

                                ⭐⭐ The emitted residual fan-in IS the certified skip-block VJP's backward, from mnv2ResidBlockBackBatchedGraph_faithful. ⭐ No add_comm is needed here, unlike ResNet-34's downsample block: the render emits addVB(body, %dy) and residualBackGraph builds the fan-in in the same order.

                                MobileNetV2RenderB.irBackStridedGradB: the stride-1 chain with the depthwise replaced by its XLA-SAME strided peer, so the expand half runs at the 2h × 2w input grid and %der upsamples. There is no skip, so %dx is %dxb directly.

                                @[reducible]
                                noncomputable def Proofs.MobileNetV2TieB.mnv2XES (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) :
                                Vec (N * (mid * (2 * h) * (2 * w)))

                                The expand stage's output at the pre-downsample grid — the strided depthwise's input.

                                Equations
                                Instances For
                                  noncomputable def Proofs.MobileNetV2TieB.mnv2SCotPc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                  Vec (N * (oc * h * w))

                                  Cotangent at the project conv's output. Feeds pW/pb.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def Proofs.MobileNetV2TieB.mnv2SCotDn (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                    Vec (N * (mid * h * w))

                                    Cotangent at the strided depthwise BN's output. Feeds dg/dbt.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      noncomputable def Proofs.MobileNetV2TieB.mnv2SCotDc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                      Vec (N * (mid * h * w))

                                      Cotangent at the strided depthwise conv's output. Feeds dW/db.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        noncomputable def Proofs.MobileNetV2TieB.mnv2SCotEn (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                        Vec (N * (mid * (2 * h) * (2 * w)))

                                        Cotangent at the expand BN's output, at the 2h × 2w grid — the STRIDED depthwise's input-VJP (which upsamples) masked by the expand relu6. Feeds eg/ebt.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          noncomputable def Proofs.MobileNetV2TieB.mnv2SCotEc (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                          Vec (N * (mid * (2 * h) * (2 * w)))

                                          Cotangent at the expand conv's output. Feeds eW/eb.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            noncomputable def Proofs.MobileNetV2TieB.mnv2StridedCotIn (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                            Vec (N * (ic * (2 * h) * (2 * w)))

                                            The block-INPUT cotangent: the expand conv's backward. No skip — the downsample changes both spatial and channels.

                                            Equations
                                            Instances For
                                              theorem Proofs.MobileNetV2TieB.mnv2StridedCotIn_eq_vjp (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) (hs : IVStridedSmoothAtB N h w p xin) (cotN : String) :
                                              mnv2StridedCotIn N h w p xin dyOut = (mnv2StridedB_has_vjp_at N h w p hq xin hs).backward dyOut

                                              ⭐⭐ The emitted stride-2 chain IS the certified downsample-body VJP's backward.

                                              MobileNetV2RenderB, after the seventeen block backwards:

                                              %dsm = selectMidB(stn)   %dsn = bnBatchBack(sg, stc)
                                              

                                              with sW,sb ← %dsn and sg,sbt ← %dsm. ⭐ There is NO conv-back past %x, and no pool: the stem is one XLA-SAME strided conv, its BatchNorm and one relu6.

                                              noncomputable def Proofs.MobileNetV2TieB.mnv2StemCotN (N h w : ) {ic oc kH kW : } (Ws : Kernel4 oc ic kH kW) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (cotStem : Vec (N * (oc * h * w))) :
                                              Vec (N * (oc * h * w))

                                              Cotangent at the stem BN's output — the stem relu6's mask. Feeds sg/sbt.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                noncomputable def Proofs.MobileNetV2TieB.mnv2StemCotC (N h w : ) {ic oc kH kW : } (Ws : Kernel4 oc ic kH kW) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (cotStem : Vec (N * (oc * h * w))) :
                                                Vec (N * (oc * h * w))

                                                Cotangent at the stem conv's output. Feeds sW/sb.

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

                                                  MobileNetV2RenderB, from the loss cotangent g:

                                                  %dgi = denseRowBack(Wd)   %dgp = gapBackBatched   %dhm = selectMidB(hn)
                                                  %dhn = bnBatchBack(hg, hc)   %dhx = convBackBatched(hW)
                                                  

                                                  with Wd,bd ← %dy, hW,hb ← %dhn, hg,hbt ← %dhm, and %dhx the cotangent handed to b17. ⚠ Unlike ResNet-34's, this head is NOT batchMap of a smooth per-example map — MobileNetV2 puts a 1x1 conv-BN-relu6 in front of the pool — so the chain is spelled here as dens, exactly as EfficientNetStepTie.enetHeadTied spells B0's identically-shaped head.

                                                  noncomputable def Proofs.MobileNetV2TieB.mnv2HeadCotGapIn (N : ) {oc nCls : } (Wd : Mat oc nCls) (g : Vec (N * nCls)) :
                                                  Vec (N * oc)

                                                  Cotangent at the GAP output — the classifier's input-VJP.

                                                  Equations
                                                  Instances For
                                                    noncomputable def Proofs.MobileNetV2TieB.mnv2HeadCotHr (N h w : ) {oc nCls : } (Wd : Mat oc nCls) (g : Vec (N * nCls)) :
                                                    Vec (N * (oc * h * w))

                                                    Cotangent at the head relu6's output — the GAP backward.

                                                    Equations
                                                    Instances For
                                                      noncomputable def Proofs.MobileNetV2TieB.mnv2HeadCotHn (N h w : ) {ic oc nCls : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (Wd : Mat oc nCls) (xin : Vec (N * (ic * h * w))) (g : Vec (N * nCls)) :
                                                      Vec (N * (oc * h * w))

                                                      Cotangent at the head BN's output — the head relu6's mask. Feeds hg/hbt.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def Proofs.MobileNetV2TieB.mnv2HeadCotHc (N h w : ) {ic oc nCls : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (Wd : Mat oc nCls) (xin : Vec (N * (ic * h * w))) (g : Vec (N * nCls)) :
                                                        Vec (N * (oc * h * w))

                                                        Cotangent at the head conv's output. Feeds hW/hb.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          noncomputable def Proofs.MobileNetV2TieB.mnv2HeadCotBlk (N h w : ) {ic oc nCls : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (Wd : Mat oc nCls) (xin : Vec (N * (ic * h * w))) (g : Vec (N * nCls)) :
                                                          Vec (N * (ic * h * w))

                                                          The cotangent the head hands to b17 — the head conv's backward.

                                                          Equations
                                                          Instances For

                                                            Each conjunct is MobileNetV2FoldPaperG's ∀ cot fold instantiated at the cotangent the render's chain delivers, so nothing here is a new proof: the bundles are the §1 fold with the freedom removed. reassocB bridges the conv/relu6 index N·(c·h·w) to the BatchNorm parameter ops' N·(c·(h·w)).

                                                            ⚠ The BIAS conjuncts are about conv{,StridedXla}BiasGradB and depthwise{,StridedXla}BiasGradB, which the committed artifacts do NOT emit — MobileNetV2RenderB runs convBias := false and binds every bias operand to zeroBiasPrelude's zero constant. They are kept because they cost one delegation each and they cover the flag.

                                                            def Proofs.MobileNetV2TieB.mnv2StemTiedB (N h w : ) {ic oc : } (xN cotN vN epsStr : String) (Ws : Kernel4 oc ic 3 3) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (cotStem : Vec (N * (oc * h * w))) :

                                                            Stem, tied. The 3x3/s2 XLA-SAME conv's weight and bias and its BatchNorm's γ/β, at the cotangent that reaches the stem through block 1's input fan-in. ⚠ convStridedXla*, not r34's symmetric convStrided*: identical types, identical emitted shapes, different certificates.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              theorem Proofs.MobileNetV2TieB.mnv2_stem_tiedB (N h w : ) {ic oc : } (xN cotN vN epsStr : String) (Ws : Kernel4 oc ic 3 3) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (cotStem : Vec (N * (oc * h * w))) :
                                                              mnv2StemTiedB N h w xN cotN vN epsStr Ws bs εs γs βs x cotStem
                                                              def Proofs.MobileNetV2TieB.mnv2NoExpTiedB (N h w : ) {ic oc : } (xN cotN vN epsStr : String) (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :

                                                              t = 1 block (b1), tied. All eight parameter nodes — the stride-1 depthwise's weight and bias and its BatchNorm's γ/β, then the project 1x1's weight and bias and its BatchNorm's γ/β. ⭐ The project BatchNorm's γ/β read dyOut itself: the linear bottleneck has no activation after project, so the block-output cotangent IS that BatchNorm's output cotangent.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                theorem Proofs.MobileNetV2TieB.mnv2_noexp_tiedB (N h w : ) {ic oc : } (xN cotN vN epsStr : String) (p : IVWNoExp ic oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                                                                mnv2NoExpTiedB N h w xN cotN vN epsStr p xin dyOut
                                                                def Proofs.MobileNetV2TieB.mnv2Stride1TiedB (N h w : ) {ic mid oc : } (xN cotN vN epsStr : String) (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :

                                                                Stride-1 inverted-residual block, tied — all twelve parameter nodes. ⭐ ONE statement for twelve of the seventeen blocks: the ten identity-skip ones and the two stage-first widenings (b11, b17). A skip changes only the dx handed to the previous block, never a parameter cotangent, which is why MobileNetV2RenderB.irBackStride1GradB is one function with a flag.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  theorem Proofs.MobileNetV2TieB.mnv2_stride1_tiedB (N h w : ) {ic mid oc : } (xN cotN vN epsStr : String) (p : IVW ic mid oc) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                                                                  mnv2Stride1TiedB N h w xN cotN vN epsStr p xin dyOut
                                                                  def Proofs.MobileNetV2TieB.mnv2Stride2TiedB (N h w : ) {ic mid oc : } (xN cotN vN epsStr : String) (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :

                                                                  Stride-2 downsampling block, tied — all twelve parameter nodes (b2, b4, b7, b14). Identical to the stride-1 profile except that the expand half runs at the 2h x 2w input grid and the depthwise is the XLA-SAME strided one. ⚠ depthwiseStridedXla*GradB, NOT B0's symmetric depthwiseStrided*GradB: the two have identical types and identical emitted shapes, and only the certificate says which correlation the weight gradient runs.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    theorem Proofs.MobileNetV2TieB.mnv2_stride2_tiedB (N h w : ) {ic mid oc : } (xN cotN vN epsStr : String) (p : IVW ic mid oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                                                                    mnv2Stride2TiedB N h w xN cotN vN epsStr p xin dyOut
                                                                    def Proofs.MobileNetV2TieB.mnv2HeadTiedB (N h w : ) {ic oc nCls : } (xN cotN vN epsStr : String) (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (ic * h * w))) (g : Vec (N * nCls)) :

                                                                    Head, tied. The 1x1 conv's weight and bias, its BatchNorm's γ/β, and the classifier's weight and bias, at the loss cotangent g and the chain it drives. ⚠ The dense-bias conjunct's Jacobian witness carries a zero activation: dense's derivative in b is the identity whatever x is, so the statement is x-free (the shape EfficientNetStepTie's bias conjuncts take).

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      theorem Proofs.MobileNetV2TieB.mnv2_head_tiedB (N h w : ) {ic oc nCls : } (xN cotN vN epsStr : String) (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (ic * h * w))) (g : Vec (N * nCls)) :
                                                                      mnv2HeadTiedB N h w xN cotN vN epsStr Wh bh εh γh βh Wd bd xin g
                                                                      theorem Proofs.MobileNetV2TieB.mnv2_net_tiedB (N : ) {nCls : } (xN cotN vN epsStr aStr negAK bStr logN ohN : String) (α B : ) (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) (t : Vec (N * (1 * nCls))) :
                                                                      have g := ResNet34TieB.unrowB N nCls (StableHLO.den (smoothedLossCotGraph N nCls α B aStr negAK bStr logN ohN (ResNet34TieB.rowB N nCls (mobilenetv2ForwardB_full N w x)) t)); have dy17 := mnv2HeadCotBlk N 7 7 w.hW w.hb w. w. w. w.fcW (mnv2PreB17 N w x) g; have dy16 := mnv2CotInBody N 7 7 w.b17 (mnv2PreB16 N w x) dy17; have dy15 := mnv2ResidCotIn N 7 7 w.b16 (mnv2PreB15 N w x) dy16; have dy14 := mnv2ResidCotIn N 7 7 w.b15 (mnv2PreB14 N w x) dy15; have dy13 := mnv2StridedCotIn N 7 7 w.b14 (mnv2PreB13 N w x) dy14; have dy12 := mnv2ResidCotIn N 14 14 w.b13 (mnv2PreB12 N w x) dy13; have dy11 := mnv2ResidCotIn N 14 14 w.b12 (mnv2PreB11 N w x) dy12; have dy10 := mnv2CotInBody N 14 14 w.b11 (mnv2PreB10 N w x) dy11; have dy9 := mnv2ResidCotIn N 14 14 w.b10 (mnv2PreB9 N w x) dy10; have dy8 := mnv2ResidCotIn N 14 14 w.b9 (mnv2PreB8 N w x) dy9; have dy7 := mnv2ResidCotIn N 14 14 w.b8 (mnv2PreB7 N w x) dy8; have dy6 := mnv2StridedCotIn N 14 14 w.b7 (mnv2PreB6 N w x) dy7; have dy5 := mnv2ResidCotIn N 28 28 w.b6 (mnv2PreB5 N w x) dy6; have dy4 := mnv2ResidCotIn N 28 28 w.b5 (mnv2PreB4 N w x) dy5; have dy3 := mnv2StridedCotIn N 28 28 w.b4 (mnv2PreB3 N w x) dy4; have dy2 := mnv2ResidCotIn N 56 56 w.b3 (mnv2PreB2 N w x) dy3; have dy1 := mnv2StridedCotIn N 56 56 w.b2 (mnv2PreB1 N w x) dy2; have cotStem := mnv2NoExpCotIn N 112 112 w.b1 (mnv2PreB0 N w x) dy1; mnv2StemTiedB N 112 112 xN cotN vN epsStr w.sW w.sb w. w. w. x cotStem mnv2NoExpTiedB N 112 112 xN cotN vN epsStr w.b1 (mnv2PreB0 N w x) dy1 mnv2Stride2TiedB N 56 56 xN cotN vN epsStr w.b2 (mnv2PreB1 N w x) dy2 mnv2Stride1TiedB N 56 56 xN cotN vN epsStr w.b3 (mnv2PreB2 N w x) dy3 mnv2Stride2TiedB N 28 28 xN cotN vN epsStr w.b4 (mnv2PreB3 N w x) dy4 mnv2Stride1TiedB N 28 28 xN cotN vN epsStr w.b5 (mnv2PreB4 N w x) dy5 mnv2Stride1TiedB N 28 28 xN cotN vN epsStr w.b6 (mnv2PreB5 N w x) dy6 mnv2Stride2TiedB N 14 14 xN cotN vN epsStr w.b7 (mnv2PreB6 N w x) dy7 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b8 (mnv2PreB7 N w x) dy8 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b9 (mnv2PreB8 N w x) dy9 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b10 (mnv2PreB9 N w x) dy10 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b11 (mnv2PreB10 N w x) dy11 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b12 (mnv2PreB11 N w x) dy12 mnv2Stride1TiedB N 14 14 xN cotN vN epsStr w.b13 (mnv2PreB12 N w x) dy13 mnv2Stride2TiedB N 7 7 xN cotN vN epsStr w.b14 (mnv2PreB13 N w x) dy14 mnv2Stride1TiedB N 7 7 xN cotN vN epsStr w.b15 (mnv2PreB14 N w x) dy15 mnv2Stride1TiedB N 7 7 xN cotN vN epsStr w.b16 (mnv2PreB15 N w x) dy16 mnv2Stride1TiedB N 7 7 xN cotN vN epsStr w.b17 (mnv2PreB16 N w x) dy17 mnv2HeadTiedB N 7 7 xN cotN vN epsStr w.hW w.hb w. w. w. w.fcW w.fcb (mnv2PreB17 N w x) g

                                                                      ⭐⭐ The whole batch-BN MobileNetV2 train step, tied. Threading mobilenetv2ForwardB_full's own prefixes as the block inputs and the label-smoothed loss cotangent down through the head chain and the seventeen certified block backwards, every parameter GRADIENT node of the net — stem 4, b1 8, sixteen blocks x 12, head 4, dense 2 — denotes the certified batched Σ_n gradient. No free activation and no symbolic cotangent. With 4.2b this is MobileNetV2's T3 complete at batch BatchNorm.

                                                                      N is a binder and there is no smoothness hypothesis. The folds are ∀ cot statements instantiated at explicitly-constructed cotangents, so the capstone needs neither 0 < ε nor a relu6-kink condition. Those enter only in the four *CotIn_eq_vjp lemmas, which say the constructed chain IS the certified whole-net backward — the two halves of the tie, kept apart because they have different hypotheses.

                                                                      ⚠ Of the 210 conjunct slots, the committed artifacts exercise 158: MobileNetV2RenderB runs convBias := false, so the 52 bias nodes are not emitted (each bias is folded into the BatchNorm after it and bound to zeroBiasPrelude's zero constant).

                                                                      ⛔ One replica. In mobilenetv2in_rmsdp64 every gradient node feeds allReduceMeanF, an AST node since 4d piece 2; MobileNetV2SyncTieB.mnv2_net_syncTiedB is the data-parallel step, and its right-hand sides are this theorem's nodes at N := R·N.

                                                                      theorem Proofs.MobileNetV2TieB.mnv2_lossCot_is_smoothedCE_grad (N : ) {nCls : } (hK : 0 < nCls) (aStr negAK bStr logN ohN : String) (α B : ) (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) (t : Vec (N * (1 * nCls))) (n : Fin N) (j : Fin nCls) (ht : k : Fin nCls, Mat.unflatten (StableHLO.batchSlice N (1 * nCls) t n) 0 k = 1) :
                                                                      StableHLO.den (smoothedLossCotGraph N nCls α B aStr negAK bStr logN ohN (ResNet34TieB.rowB N nCls (mobilenetv2ForwardB_full N w x)) t) (finProdFinEquiv (n, finProdFinEquiv (0, j))) = pdiv (fun (z' : Vec nCls) (x : Fin 1) => softCE nCls (smoothTarget nCls α (Mat.unflatten (StableHLO.batchSlice N (1 * nCls) t n) 0)) z') (Mat.unflatten (StableHLO.batchSlice N (1 * nCls) (ResNet34TieB.rowB N nCls (mobilenetv2ForwardB_full N w x)) n) 0) j 0 / B

                                                                      And the cotangent the capstone threads is the smoothed loss's gradient. Row by row: the g above is, at example n and class j, (1/B)·∂/∂logits of soft-target cross-entropy against the SMOOTHED target (1−α)·t + α/K, at that example's real logits. The only hypothesis is that the example's target sums to 1 — a one-hot, or mixup's convex combination of two. Together with the capstone this closes the top of the chain: every parameter node denotes the certified gradient at the cotangent of the loss the trainer actually minimises. Shared with ResNet-34 through Foundation/SmoothedLossCot.lean, at a general target.