Documentation

LeanMlir.Proofs.Nets.MobileNet.MobileNetV4StepTieB

T3 §1a tie for MobileNetV4-Conv-M — every gradient node at its CHAIN cotangent #

Every parameter gradient node MNv4's batched train step emits denotes the certified gradient for an arbitrary cotangent, by a leaf lemma it shares with ResNet-34 or EfficientNet-B0 (the table below). This file removes that freedom: each node is stated at the cotangent the render's own backward chain delivers, driven by a loss cotangent g at the logits.

⚠⚠ No accuracy is quoted for this net. Conv-M has no Imagenette run and no verified ImageNet run; the ties that pin these statements to the reference's function are the 2026-09-07 pair.

⭐ The UIB bottleneck is LINEAR, and that makes MNv4's chain shorter than ResNet's #

uibFwdSkipB emits addVB (project-BN out) (block input) with no activation after the add and none after the project's BatchNorm. So the block-output cotangent dyOut reaches the project BN's γ and β directly — where ResNet-50's r50IdCotA must first pass through the post-residual relu's mask, and where its skip branch carries the masked cotangent. Here the skip fan-in is addVB (body dx) dyOut, unmasked.

⭐⭐ And every block's *CotIn_eq_vjp is its block layer's .faithful, not a new derivation. The UIB bodies are CertLayers, so den (graph x e) = vjp.backward (den e) is already a theorem one tier down — the very fact 4.2a/4.2c/§3.5c re-derive per block for r34, mnv2 and R50. This file composes certified VJPs; it does not re-prove them.

⭐⭐ Zero new fp32 op-kind lemmas — MNv4's nine kinds are three other nets', verbatim #

op kindsitescertificate
bnGammaGradB / bnBetaGradB77 BN layersResNet34PoCB.bnGammaGradB_den / bnBetaGradB_den
convWeightGradBexpands, projects, both head convs, the fused projectResNet34PoCB.convWGradB_den
convStridedWeightGradB (SYMMETRIC)the fused stage's 3×3/s2ResNet34PoCB.convStridedWGradB_den
convStridedXlaWeightGradB (XLA-SAME)the stem, and only the stemEnetPoCG.convStridedXlaWGradB_den
depthwiseWeightGradBevery stride-1 depthwiseEnetPoCG.depthwiseWGradB_den
depthwiseStridedWeightGradBrows 1, 3, 11's leading depthwiseEnetPoCG.depthwiseStridedWGradB_den
denseWeightGradB / denseBiasGradBthe classifierResNet34PoCB.denseWGradB_den / denseBGradB_den

⚠⚠ TWO padding phases, and the two strided conv kinds are NOT interchangeable. The stem is XLA-SAME (flatConvStride2Xla, EfficientNet-B0's op) and the fused stage is SYMMETRIC (flatConvStride2, ResNet's). Identical types, identical emitted shapes, different certificates — scripts/convention_audit.py is what reads them apart, and swapping one for the other is the 6.16e-2-vs-1.79e-6 forward-tie defect planning/archive/mnv4_verified.md §3b measured.

MNv4 emits no conv BIAS gradient at all. MobileNetV4RenderB has no convBias flag — every bias is folded into its BatchNorm and bound to %zb{c} — so convBiasGradB and its strided peers are never emitted and there is nothing to state. Same situation as ResNet-50. The five *GradBBf16 kinds the bf16 artifacts emit are folded in Foundation/Bf16GradNodes.lean.

⚠⚠ Everything here is GENERIC IN THE ROW, and that is load-bearing #

Every definition and theorem below takes a UibSpec binder s and reads its widths off it, so s.ic, s.h and s.ic * s.expand are VARIABLES. That is not a convenience: MNv4's resolutions are literals, and MobileNetV4FullB.lean records four separate kernel blow-ups caused by letting den and width-indexed rfls actually RUN at 224/112/56/28/14/7. Stated at a row binder they stay stuck; the capstone then instantiates at the 21 concrete rows, which is application and is free.

The chain, node for node from uibBackSkipGradB #

cotangentatfeeds
dyOutthe block output — and the project BN's output, the add being linear%u{p}pg, %u{p}pbt
CotPcproject conv's output (bnBatchBack)%u{p}pW
CotDnpost-DW BN's output (convBackBatched, then the post-DW relu's selectPos mask)%u{p}dg, %u{p}dbt
CotDcpost-DW conv's output%u{p}dW
CotEnexpand BN's output (depthwiseBackBatched, then the expand relu's mask)%u{p}eg, %u{p}ebt
CotEcexpand conv's output%u{p}eW
CotQnpre-DW BN's output%u{p}qg, %u{p}qbt
CotQcpre-DW conv's output%u{p}qW
CotInthe block input — addVB (depthwiseBackBatched dQc) dyOutthe previous block

⛔ A cotangent one step off is a silently wrong gradient, not a type error: %u{p}eg reads the cotangent at the expand BN's OUTPUT and %u{p}eW the one at the expand CONV's output, and both have the same type.

One replica. Under mnv4in_adamdp64* every node named here feeds allReduceMeanF (DataParallelNode.lean, §4d); this is the per-replica gradient.

noncomputable def Proofs.Mnv4TieB.mnv4CotPc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
Vec (N * (s.oc * s.h * s.h))

Cotangent at the project CONV's output — dyOut through the project BN's backward. ⭐ dyOut itself is the cotangent at the project BN's output: the bottleneck is linear, so nothing masks it. Feeds %u{p}pW.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    noncomputable def Proofs.Mnv4TieB.mnv4CotDn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
    Vec (N * (s.ic * s.expand * s.h * s.h))

    Cotangent at the post-DW BN's output — the project conv's input-VJP, masked by the post-DW relu. Feeds %u{p}dg and %u{p}dbt.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def Proofs.Mnv4TieB.mnv4CotDc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
      Vec (N * (s.ic * s.expand * s.h * s.h))

      Cotangent at the post-DW CONV's output — through the post-DW BN's backward. Feeds %u{p}dW.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Proofs.Mnv4TieB.mnv4CotEn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
        Vec (N * (s.ic * s.expand * s.h * s.h))

        Cotangent at the expand BN's output — masked by the expand relu. Feeds %u{p}eg/%u{p}ebt.

        ⭐⭐ This is where the chain DISPATCHES on the table, exactly as mnv4PostDWSlot does and off the same row: with a post-depthwise the incoming cotangent is that depthwise's input-VJP; without one (postDWk = 0, the ConvNeXt-like and FFN rows) the project conv's input-VJP arrives here directly, because the render emits no post-DW nodes at all. One chain, three stride-1 profiles, and the if reduces at every concrete row.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def Proofs.Mnv4TieB.mnv4CotEc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
          Vec (N * (s.ic * s.expand * s.h * s.h))

          Cotangent at the expand CONV's output — through the expand BN's backward. Feeds %u{p}eW.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Proofs.Mnv4TieB.mnv4CotQn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
            Vec (N * (s.ic * s.h * s.h))

            Cotangent at the pre-DW BN's output — the expand conv's input-VJP, masked by the pre-DW relu. Feeds %u{p}qg and %u{p}qbt.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              noncomputable def Proofs.Mnv4TieB.mnv4CotQc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
              Vec (N * (s.ic * s.h * s.h))

              Cotangent at the pre-DW CONV's output — through the pre-DW BN's backward. Feeds %u{p}qW.

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

                ⚠⚠ A near-copy of the stride-1 chain, and it has to be. Only two things differ — the leading depthwise is depthwiseStride2Flat rather than depthwiseFlat, and the block input sits at 2h — but those two changes run through every type in the chain, so the whole thing is re-stated rather than instantiated. ⭐ Everything from the expand down is the same composition at the reduced resolution; the stride is entirely consumed by the first op, which is what mnv4UibPreStridedBody means one tier up.

                And there is no skip: all three stride-2 rows change channels (ic ≠ oc), so the block IS the body, dx is the strided depthwise's input-VJP alone, and there is no addVB fan-in.

                noncomputable def Proofs.Mnv4TieB.mnv4SCotPc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                Vec (N * (s.oc * s.h * s.h))

                Cotangent at the project CONV's output — dyOut through the project BN's backward. ⭐ dyOut itself is the cotangent at the project BN's output: the bottleneck is linear, so nothing masks it. Feeds %u{p}pW.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  noncomputable def Proofs.Mnv4TieB.mnv4SCotDn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                  Vec (N * (s.ic * s.expand * s.h * s.h))

                  Cotangent at the post-DW BN's output — the project conv's input-VJP, masked by the post-DW relu. Feeds %u{p}dg and %u{p}dbt.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def Proofs.Mnv4TieB.mnv4SCotDc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                    Vec (N * (s.ic * s.expand * s.h * s.h))

                    Cotangent at the post-DW CONV's output — through the post-DW BN's backward. Feeds %u{p}dW.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Proofs.Mnv4TieB.mnv4SCotEn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                      Vec (N * (s.ic * s.expand * s.h * s.h))

                      Cotangent at the expand BN's output — masked by the expand relu. Feeds %u{p}eg/%u{p}ebt.

                      ⚠ No dispatch here, unlike the stride-1 chain: all three of Conv-M's stride-2 rows have postDWk > 0, so the post-depthwise is always present on this path.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        noncomputable def Proofs.Mnv4TieB.mnv4SCotEc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                        Vec (N * (s.ic * s.expand * s.h * s.h))

                        Cotangent at the expand CONV's output — through the expand BN's backward. Feeds %u{p}eW.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def Proofs.Mnv4TieB.mnv4SCotQn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                          Vec (N * (s.ic * s.h * s.h))

                          Cotangent at the STRIDED pre-DW BN's output — the expand conv's input-VJP, masked by the pre-DW relu. Feeds %u{p}qg and %u{p}qbt.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def Proofs.Mnv4TieB.mnv4SCotQc (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                            Vec (N * (s.ic * s.h * s.h))

                            Cotangent at the STRIDED pre-DW conv's output — through the pre-DW BN's backward. Feeds %u{p}qW.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              noncomputable def Proofs.Mnv4TieB.mnv4SBodyCotIn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                              Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))

                              The pre-strided block's input cotangent — the STRIDED depthwise's input-VJP, landing at 2h. No fan-in: ic ≠ oc, so the block has no skip.

                              Equations
                              Instances For
                                noncomputable def Proofs.Mnv4TieB.mnv4BodyCotIn (N : ) (s : StableHLO.UibSpec) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                Vec (N * (s.ic * s.h * s.h))

                                The BODY's input cotangent — what the render's dx carries before the skip fan-in.

                                ⭐ Dispatches on s.preDWk the way mnv4PreDWSlot does: with a pre-depthwise the body's dx is that depthwise's input-VJP, without one it is the expand conv's.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  noncomputable def Proofs.Mnv4TieB.mnv4SkipCotIn {N n : } (bodyDx dyOut : Vec (N * n)) :
                                  Vec (N * n)

                                  The skip fan-in itself: body dx + dyOut, at the block-input shape.

                                  ⚠ Split from mnv4BodyCotIn for the same reason mnv4SkipGraphB is split from the body graph builders: the add needs s.oc and s.ic to be the SAME type, which they are at every stride-1 row and are not at a row binder. The body's cotangent is row-generic; the add is applied at the concrete row, where s.oc = s.ic is rfl.

                                  Equations
                                  Instances For
                                    def Proofs.Mnv4TieB.mnv4ExtraDWTiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :

                                    ExtraDW block, tied. All twelve parameter nodes — four conv/depthwise weights and four BatchNorm γ/β pairs — denote the certified batched Σ_n gradient at the real forward activations and the real backward-chain cotangent driven by dyOut.

                                    ⚠ Each BatchNorm's γ/β reads the cotangent at THAT BatchNorm's output (CotQn, CotEn, CotDn, and dyOut itself for the project) while its conv reads the one at the conv's output (CotQc, CotEc, CotDc, CotPc). Off by one and the gradient is silently wrong — the two have the same type. ⭐ The project BN's pair reads dyOut UNMASKED: the bottleneck is linear.

                                    ⛔ There are no conv-bias conjuncts: MobileNetV4RenderB has no convBias flag, so those ops are never emitted and every slot here is exercised by the artifact.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      theorem Proofs.Mnv4TieB.mnv4_extradw_tiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                      mnv4ExtraDWTiedB N s xN cotN vN epsStr p xin dyOut

                                      ⭐⭐ And it holds — twelve instantiations of the shared ∀ cot leaf folds with the freedom removed. Nothing here is new mathematics; what is new is that the cotangents are the chain's, not free.

                                      def Proofs.Mnv4TieB.mnv4ConvNeXtTiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        theorem Proofs.Mnv4TieB.mnv4_convnext_tiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                        mnv4ConvNeXtTiedB N s xN cotN vN epsStr p xin dyOut

                                        ⭐⭐ And it holds — nine instantiations of the §1 fold at the chain's cotangents.

                                        def Proofs.Mnv4TieB.mnv4FfnTiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          theorem Proofs.Mnv4TieB.mnv4_ffn_tiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * s.h * s.h))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                          mnv4FfnTiedB N s xN cotN vN epsStr p xin dyOut

                                          ⭐⭐ And it holds — six instantiations of the §1 fold at the chain's cotangents.

                                          def Proofs.Mnv4TieB.mnv4PreStridedTiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :

                                          Pre-strided block, tied — rows 1, 3 and 11. All twelve parameter nodes — four conv/depthwise weights and four BatchNorm γ/β pairs — denote the certified batched Σ_n gradient at the real forward activations and the real backward-chain cotangent driven by dyOut.

                                          ⚠ Each BatchNorm's γ/β reads the cotangent at THAT BatchNorm's output (CotQn, CotEn, CotDn, and dyOut itself for the project) while its conv reads the one at the conv's output (CotQc, CotEc, CotDc, CotPc). Off by one and the gradient is silently wrong — the two have the same type. ⭐ The project BN's pair reads dyOut UNMASKED: the bottleneck is linear.

                                          ⚠⚠ The leading node is depthwiseStridedWeightGradBdepthwiseStride2Flat, SYMMETRIC padding, reading its input at 2h. Every other node is the stride-1 profile's at the reduced resolution, because the stride is consumed entirely by that first depthwise.

                                          ⛔ No skip and no addVB: ic ≠ oc at all three rows, so the block IS its body.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            theorem Proofs.Mnv4TieB.mnv4_prestrided_tiedB (N : ) (s : StableHLO.UibSpec) (xN cotN vN epsStr : String) (p : StableHLO.UibParams s) (xin : Vec (N * (s.ic * (2 * s.h) * (2 * s.h)))) (dyOut : Vec (N * (s.oc * s.h * s.h))) :
                                            mnv4PreStridedTiedB N s xN cotN vN epsStr p xin dyOut

                                            ⭐⭐ And it holds — twelve instantiations (the first at the STRIDED depthwise) of the shared ∀ cot leaf folds with the freedom removed. Nothing here is new mathematics; what is new is that the cotangents are the chain's, not free.

                                            ⚠ All three are GENERIC IN THEIR WIDTHS, for the reason MobileNetV4FullB.lean's stem-graph docstring records at length: pinning MNv4's literal resolutions here lets den and the width-indexed rfls actually run, and the kernel gives up. The capstone instantiates.

                                            noncomputable def Proofs.Mnv4TieB.mnv4StemCotN (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)))) (dyStem : Vec (N * (oc * h * w))) :
                                            Vec (N * (oc * h * w))

                                            Cotangent at the stem BN's output — the fused stage's dx, masked by the stem relu. Feeds %sg and %sbt.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              noncomputable def Proofs.Mnv4TieB.mnv4StemCotC (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)))) (dyStem : Vec (N * (oc * h * w))) :
                                              Vec (N * (oc * h * w))

                                              Cotangent at the stem CONV's output — through the stem BN's backward. Feeds %sW.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                def Proofs.Mnv4TieB.mnv4StemTiedB (N h w : ) {ic oc kH kW : } (xN cotN vN epsStr : String) (Ws : Kernel4 oc ic kH kW) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (dyStem : Vec (N * (oc * h * w))) :

                                                Stem, tied. Its three nodes at the chain's cotangents.

                                                ⛔⛔ And the chain STOPS here. There is no convStridedXlaBackBatched node: no render emits a gradient into %x, so the artifact's backward ends at this weight gradient. That is why the stem sits outside MobileNetV4FullB.lean's CertLayer trunk, and it is B0's situation exactly.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  theorem Proofs.Mnv4TieB.mnv4_stem_tiedB (N h w : ) {ic oc kH kW : } (xN cotN vN epsStr : String) (Ws : Kernel4 oc ic kH kW) (bs : Vec oc) (εs : ) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (dyStem : Vec (N * (oc * h * w))) :
                                                  mnv4StemTiedB N h w xN cotN vN epsStr Ws bs εs γs βs x dyStem
                                                  noncomputable def Proofs.Mnv4TieB.mnv4FusedCotPc (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp _βp : Vec oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :
                                                  Vec (N * (oc * h * w))

                                                  Cotangent at the fused stage's project CONV output. ⭐ dyF reaches the project BN's γ/β unmasked — the fused stage ends in a BatchNorm with no activation. Feeds %f0pW.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    noncomputable def Proofs.Mnv4TieB.mnv4FusedCotN (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp βp : Vec oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :
                                                    Vec (N * (mid * h * w))

                                                    Cotangent at the fused BN's output — the project conv's input-VJP through swish's backward. ⭐ No mask: swish is smooth, which is why this stage carries no kink hypothesis anywhere. Feeds %f0cg and %f0cbt.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      noncomputable def Proofs.Mnv4TieB.mnv4FusedCotC (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp βp : Vec oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :
                                                      Vec (N * (mid * h * w))

                                                      Cotangent at the fused CONV's output — through the fused BN's backward. Feeds %f0cW.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def Proofs.Mnv4TieB.mnv4FusedCotIn (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp βp : Vec oc) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :
                                                        Vec (N * (ic * (2 * h) * (2 * w)))

                                                        The fused stage's input cotangent — the SYMMETRIC strided conv's input-VJP, landing at 2h.

                                                        Equations
                                                        Instances For
                                                          def Proofs.Mnv4TieB.mnv4FusedTiedB (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp βp : Vec oc) (xN cotN vN epsStr : String) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :

                                                          Fused stage, tied — its six parameter nodes. ⚠ %f0cW is convStridedWeightGradB, SYMMETRIC padding, where the stem's is the XLA-SAME twin: two phases in one net. ⭐ And the fused BN's γ/β read the cotangent that came through SWISH's backward, not through a relu mask — this is the one stage in MNv4 with no kink anywhere.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            theorem Proofs.Mnv4TieB.mnv4_fused_tiedB (N h w : ) {ic mid oc kH kW : } (Wc : Kernel4 mid ic kH kW) (bc : Vec mid) (εc : ) (γc βc : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp : Vec oc) (εp : ) (γp βp : Vec oc) (xN cotN vN epsStr : String) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyF : Vec (N * (oc * h * w))) :
                                                            mnv4FusedTiedB N h w Wc bc εc γc βc Wp bp εp γp βp xN cotN vN epsStr xin dyF

                                                            ⭐ The head's GAP-and-dense tail is ResNet-34's, reused: r34HeadCotBlk is its certified input cotangent and r34HeadTiedB its two parameter nodes. What is MNv4's own is the pair of 1×1 conv-BN-relu stages in front of it — Conv-M's head has TWO convs where mnv4Head models one.

                                                            noncomputable def Proofs.Mnv4TieB.mnv4HeadCotHn (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                            Vec (N * (oc * h * w))

                                                            Cotangent at the SECOND head BN's output — the GAP/dense tail's input cotangent, masked by that stage's relu. Feeds %hg and %hbt.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              noncomputable def Proofs.Mnv4TieB.mnv4HeadCotHc (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                              Vec (N * (oc * h * w))

                                                              Cotangent at the second head CONV's output. Feeds %hW.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                noncomputable def Proofs.Mnv4TieB.mnv4HeadCotH1n (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                                Vec (N * (mid * h * w))

                                                                Cotangent at the FIRST head BN's output. Feeds %h1g and %h1bt.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  noncomputable def Proofs.Mnv4TieB.mnv4HeadCotH1c (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                                  Vec (N * (mid * h * w))

                                                                  Cotangent at the first head CONV's output. Feeds %h1W.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    noncomputable def Proofs.Mnv4TieB.mnv4HeadCotIn (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                                    Vec (N * (c * h * w))

                                                                    The head's input cotangent — what block 21 receives as its dyOut.

                                                                    Equations
                                                                    Instances For
                                                                      def Proofs.Mnv4TieB.mnv4HeadTiedB (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xN cotN vN epsStr : String) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :

                                                                      Head, tied — all EIGHT nodes: two conv weights, two BatchNorm γ/β pairs, and the classifier's weight and bias. ⭐ The last two are r34HeadTiedB, reused verbatim: MNv4's GAP-and-dense tail IS ResNet-34's at a different width.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        theorem Proofs.Mnv4TieB.mnv4_head_tiedB (N h w : ) {c mid oc nCls : } (W1 : Kernel4 mid c 1 1) (b1 : Vec mid) (ε1 : ) (γ1 β1 : Vec mid) (W2 : Kernel4 oc mid 1 1) (b2 : Vec oc) (ε2 : ) (γ2 β2 : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (xN cotN vN epsStr : String) (xin : Vec (N * (c * h * w))) (g : Vec (N * nCls)) :
                                                                        mnv4HeadTiedB N h w W1 b1 ε1 γ1 β1 W2 b2 ε2 γ2 β2 Wd bd xN cotN vN epsStr xin g
                                                                        noncomputable def Proofs.Mnv4TieB.mnv4Blk0 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                        Vec (N * (48 * 56 * 56))

                                                                        The per-BLOCK forward prefixes: mnv4Blk0 is the fused stage's output — block 1's input — and mnv4Blk{k} is the activation entering block k+1.

                                                                        MobileNetV4FullB.lean's mnv4Pre0 … mnv4Pre6 are the RESOLUTION-GROUP prefixes, which is the granularity T1 and T2 need; the tie needs one per BLOCK, so these 22 name the finer chain. mnv4Blk0 is definitionally mnv4Pre1.

                                                                        Equations
                                                                        Instances For
                                                                          noncomputable def Proofs.Mnv4TieB.mnv4Blk1 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                          Vec (N * (80 * 28 * 28))
                                                                          Equations
                                                                          Instances For
                                                                            noncomputable def Proofs.Mnv4TieB.mnv4Blk2 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                            Vec (N * (80 * 28 * 28))
                                                                            Equations
                                                                            Instances For
                                                                              noncomputable def Proofs.Mnv4TieB.mnv4Blk3 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                              Vec (N * (160 * 14 * 14))
                                                                              Equations
                                                                              Instances For
                                                                                noncomputable def Proofs.Mnv4TieB.mnv4Blk4 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                Vec (N * (160 * 14 * 14))
                                                                                Equations
                                                                                Instances For
                                                                                  noncomputable def Proofs.Mnv4TieB.mnv4Blk5 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                  Vec (N * (160 * 14 * 14))
                                                                                  Equations
                                                                                  Instances For
                                                                                    noncomputable def Proofs.Mnv4TieB.mnv4Blk6 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                    Vec (N * (160 * 14 * 14))
                                                                                    Equations
                                                                                    Instances For
                                                                                      noncomputable def Proofs.Mnv4TieB.mnv4Blk7 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                      Vec (N * (160 * 14 * 14))
                                                                                      Equations
                                                                                      Instances For
                                                                                        noncomputable def Proofs.Mnv4TieB.mnv4Blk8 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                        Vec (N * (160 * 14 * 14))
                                                                                        Equations
                                                                                        Instances For
                                                                                          noncomputable def Proofs.Mnv4TieB.mnv4Blk9 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                          Vec (N * (160 * 14 * 14))
                                                                                          Equations
                                                                                          Instances For
                                                                                            noncomputable def Proofs.Mnv4TieB.mnv4Blk10 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                            Vec (N * (160 * 14 * 14))
                                                                                            Equations
                                                                                            Instances For
                                                                                              noncomputable def Proofs.Mnv4TieB.mnv4Blk11 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                              Vec (N * (256 * 7 * 7))
                                                                                              Equations
                                                                                              Instances For
                                                                                                noncomputable def Proofs.Mnv4TieB.mnv4Blk12 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                Vec (N * (256 * 7 * 7))
                                                                                                Equations
                                                                                                Instances For
                                                                                                  noncomputable def Proofs.Mnv4TieB.mnv4Blk13 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                  Vec (N * (256 * 7 * 7))
                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    noncomputable def Proofs.Mnv4TieB.mnv4Blk14 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                    Vec (N * (256 * 7 * 7))
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      noncomputable def Proofs.Mnv4TieB.mnv4Blk15 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                      Vec (N * (256 * 7 * 7))
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        noncomputable def Proofs.Mnv4TieB.mnv4Blk16 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                        Vec (N * (256 * 7 * 7))
                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          noncomputable def Proofs.Mnv4TieB.mnv4Blk17 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                          Vec (N * (256 * 7 * 7))
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            noncomputable def Proofs.Mnv4TieB.mnv4Blk18 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                            Vec (N * (256 * 7 * 7))
                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              noncomputable def Proofs.Mnv4TieB.mnv4Blk19 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                              Vec (N * (256 * 7 * 7))
                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                noncomputable def Proofs.Mnv4TieB.mnv4Blk20 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                                Vec (N * (256 * 7 * 7))
                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  noncomputable def Proofs.Mnv4TieB.mnv4Blk21 (N : ) {nCls : } (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) :
                                                                                                                  Vec (N * (256 * 7 * 7))
                                                                                                                  Equations
                                                                                                                  Instances For
                                                                                                                    theorem Proofs.Mnv4TieB.mnv4_net_tiedB (N : ) {nCls : } (xN cotN vN epsStr : String) (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) (g : Vec (N * nCls)) :
                                                                                                                    have dy21 := mnv4HeadCotIn N 7 7 w.h1W w.h1b w.h1E w.h1g w.h1bt w.hW w.hb w.hE w.hg w.hbt w.Wd w.bd (mnv4Blk21 N w x) g; have dy20 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row21 w.b21 (mnv4Blk20 N w x) dy21) dy21; have dy19 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row20 w.b20 (mnv4Blk19 N w x) dy20) dy20; have dy18 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row19 w.b19 (mnv4Blk18 N w x) dy19) dy19; have dy17 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row18 w.b18 (mnv4Blk17 N w x) dy18) dy18; have dy16 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row17 w.b17 (mnv4Blk16 N w x) dy17) dy17; have dy15 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row16 w.b16 (mnv4Blk15 N w x) dy16) dy16; have dy14 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row15 w.b15 (mnv4Blk14 N w x) dy15) dy15; have dy13 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row14 w.b14 (mnv4Blk13 N w x) dy14) dy14; have dy12 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row13 w.b13 (mnv4Blk12 N w x) dy13) dy13; have dy11 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row12 w.b12 (mnv4Blk11 N w x) dy12) dy12; have dy10 := mnv4SBodyCotIn N StableHLO.mnv4Row11 w.b11 (mnv4Blk10 N w x) dy11; have dy9 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row10 w.b10 (mnv4Blk9 N w x) dy10) dy10; have dy8 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row9 w.b9 (mnv4Blk8 N w x) dy9) dy9; have dy7 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row8 w.b8 (mnv4Blk7 N w x) dy8) dy8; have dy6 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row7 w.b7 (mnv4Blk6 N w x) dy7) dy7; have dy5 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row6 w.b6 (mnv4Blk5 N w x) dy6) dy6; have dy4 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row5 w.b5 (mnv4Blk4 N w x) dy5) dy5; have dy3 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row4 w.b4 (mnv4Blk3 N w x) dy4) dy4; have dy2 := mnv4SBodyCotIn N StableHLO.mnv4Row3 w.b3 (mnv4Blk2 N w x) dy3; have dy1 := mnv4SkipCotIn (mnv4BodyCotIn N StableHLO.mnv4Row2 w.b2 (mnv4Blk1 N w x) dy2) dy2; have dy0 := mnv4SBodyCotIn N StableHLO.mnv4Row1 w.b1 (mnv4Blk0 N w x) dy1; have dyStem := mnv4FusedCotIn N 56 56 w.f0cW w.f0cb w.f0cE w.f0cg w.f0cbt w.f0pW w.f0pb w.f0pE w.f0pg w.f0pbt (StableHLO.mnv4Pre0 N w x) dy0; mnv4StemTiedB N 112 112 xN cotN vN epsStr w.sW w.sb w.sE w.sg w.sbt x dyStem mnv4FusedTiedB N 56 56 w.f0cW w.f0cb w.f0cE w.f0cg w.f0cbt w.f0pW w.f0pb w.f0pE w.f0pg w.f0pbt xN cotN vN epsStr (StableHLO.mnv4Pre0 N w x) dy0 mnv4PreStridedTiedB N StableHLO.mnv4Row1 xN cotN vN epsStr w.b1 (mnv4Blk0 N w x) dy1 mnv4ExtraDWTiedB N StableHLO.mnv4Row2 xN cotN vN epsStr w.b2 (mnv4Blk1 N w x) dy2 mnv4PreStridedTiedB N StableHLO.mnv4Row3 xN cotN vN epsStr w.b3 (mnv4Blk2 N w x) dy3 mnv4ExtraDWTiedB N StableHLO.mnv4Row4 xN cotN vN epsStr w.b4 (mnv4Blk3 N w x) dy4 mnv4ExtraDWTiedB N StableHLO.mnv4Row5 xN cotN vN epsStr w.b5 (mnv4Blk4 N w x) dy5 mnv4ExtraDWTiedB N StableHLO.mnv4Row6 xN cotN vN epsStr w.b6 (mnv4Blk5 N w x) dy6 mnv4ExtraDWTiedB N StableHLO.mnv4Row7 xN cotN vN epsStr w.b7 (mnv4Blk6 N w x) dy7 mnv4ConvNeXtTiedB N StableHLO.mnv4Row8 xN cotN vN epsStr w.b8 (mnv4Blk7 N w x) dy8 mnv4FfnTiedB N StableHLO.mnv4Row9 xN cotN vN epsStr w.b9 (mnv4Blk8 N w x) dy9 mnv4ConvNeXtTiedB N StableHLO.mnv4Row10 xN cotN vN epsStr w.b10 (mnv4Blk9 N w x) dy10 mnv4PreStridedTiedB N StableHLO.mnv4Row11 xN cotN vN epsStr w.b11 (mnv4Blk10 N w x) dy11 mnv4ExtraDWTiedB N StableHLO.mnv4Row12 xN cotN vN epsStr w.b12 (mnv4Blk11 N w x) dy12 mnv4ExtraDWTiedB N StableHLO.mnv4Row13 xN cotN vN epsStr w.b13 (mnv4Blk12 N w x) dy13 mnv4ExtraDWTiedB N StableHLO.mnv4Row14 xN cotN vN epsStr w.b14 (mnv4Blk13 N w x) dy14 mnv4FfnTiedB N StableHLO.mnv4Row15 xN cotN vN epsStr w.b15 (mnv4Blk14 N w x) dy15 mnv4ConvNeXtTiedB N StableHLO.mnv4Row16 xN cotN vN epsStr w.b16 (mnv4Blk15 N w x) dy16 mnv4ExtraDWTiedB N StableHLO.mnv4Row17 xN cotN vN epsStr w.b17 (mnv4Blk16 N w x) dy17 mnv4ExtraDWTiedB N StableHLO.mnv4Row18 xN cotN vN epsStr w.b18 (mnv4Blk17 N w x) dy18 mnv4FfnTiedB N StableHLO.mnv4Row19 xN cotN vN epsStr w.b19 (mnv4Blk18 N w x) dy19 mnv4FfnTiedB N StableHLO.mnv4Row20 xN cotN vN epsStr w.b20 (mnv4Blk19 N w x) dy20 mnv4ConvNeXtTiedB N StableHLO.mnv4Row21 xN cotN vN epsStr w.b21 (mnv4Blk20 N w x) dy21 mnv4HeadTiedB N 7 7 w.h1W w.h1b w.h1E w.h1g w.h1bt w.hW w.hb w.hE w.hg w.hbt w.Wd w.bd xN cotN vN epsStr (mnv4Blk21 N w x) g

                                                                                                                    ⭐⭐ The whole batch-BN MobileNetV4-Conv-M train step, tied. Threading the net's own forward prefixes as the block inputs and an arbitrary loss cotangent g down through the certified head backward, the 21 certified UIB block backwards and the fused stage, every parameter GRADIENT node of the net — stem 3, fused 6, thirteen ExtraDW-profile blocks × 12, four ConvNeXt-like × 9, four FFN × 6, head 8 — denotes the certified batched Σ_n gradient. That is 233, the render's own census and mnv4_fwd.mlir's signature minus %x. No free activation and no symbolic cotangent below the loss.

                                                                                                                    ⭐⭐ g IS A BINDER. The loss chain is not part of this statement; mnv4_lossCot_is_smoothedCE_grad instantiates it at the label-smoothed softmax cotangent the artifacts actually emit.

                                                                                                                    No smoothness hypothesis and no 0 < ε, and N and nCls are both binders. The folds are ∀ cot statements at explicitly constructed cotangents; the kink and positivity conditions live one tier down, in the CertLayers whose .ok MobileNetV4FullBVJP.lean binds. ⚠ MNv4 ships a single resolution, so unlike ResNet-50 there is no q.

                                                                                                                    One replica. Under mnv4in_adamdp64* every node named here feeds allReduceMeanF (DataParallelNode.lean, §4d), and the AdamW tail sits downstream of all of them.

                                                                                                                    theorem Proofs.Mnv4TieB.mnv4_lossCot_is_smoothedCE_grad (N : ) {nCls : } (hK : 0 < nCls) (aStr negAK bStr logN ohN : String) (α B : ) (w : StableHLO.Mnv4BWeights nCls) (x : Vec (N * (3 * 224 * 224))) (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 (StableHLO.mobilenetv4ForwardB_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 (StableHLO.mobilenetv4ForwardB_full N w x)) n) 0) j 0 / B

                                                                                                                    And the loss cotangent g is instantiated: MNv4's is the label-smoothed softmax chain. Row by row, the six-op chain MobileNetV4RenderB emits (softmaxRow → subB → scaleB → addVB → shiftB → divConstB, α = 0.1) is (1/B)·∂/∂logits of soft-target cross-entropy against the SMOOTHED target, at that example's real logits.

                                                                                                                    softmaxRow at m := 1 — the rowB/unrowB spelling ResNet-34 and ResNet-50 use, NOT ConvNeXt's and ViT's expe → softmaxDiv at the plain N·K width. Read off the render's own lines rather than assumed: those two take different lemmas (smoothedLossCotGraph here, smoothedLossCotGraphDiv there) and nothing in the types tells them apart.

                                                                                                                    ⭐ MNv4 ships ONE loss — there is no BCE twin to state, where ResNet-50 needed both. The only hypothesis is that the example's target sums to 1: a one-hot, or mixup's convex combination.