Documentation

LeanMlir.Proofs.Nets.MobileNet.MobileNetV2FullBVJP

MobileNetV2's whole-net input-VJP at TRUE BATCH-NORM (T1, the VJP half) #

MobileNetV2FullB.lean states the batch-BN forward and its typed graph. This file gives that forward a certified HasVJPAt at the paper depth — the MobileNetV2 peer of ResNet34FullBVJP.lean, and the second piece of formalization.yaml 4e's port.

No new mathematics, and no new lemma one tier down either #

Every block VJP is already proven at bnBatchLA: mnv2BodyB_has_vjp_at and mnv2DownBodyB_has_vjp_at (MobileNetV2BackB0.lean) are exactly the two body shapes mnv2ExpOnlyB / mnv2StridedB unfold to, and residual_has_vjp_at wraps the first for the ten skip blocks. The bundle lemmas below are delegations in the EfficientNetFullB0 style.

Where r34 needed a new Foundation lemma, this net needs none. ResNet-34's stem ends in batchMap N (maxPool3s2Flat …) and a max-pool has no derivative at a tie, so 4.1c had to write batchMap_has_vjp_at. MobileNetV2 has NO stem pool — the stem is conv-BN-relu6 and downsamples once — and its head's GAP and dense are smooth, so batchMap_has_vjp (the global one) covers every batchMap in the net.

⭐ Three shapes are bnRelu6Stage_has_vjp_at at a different inner op, and that lemma is already generic in it: the stem is that stage at flatConvStride2Xla, the head's first stage is cbrB, and the expand/depthwise stages are cbrB / dwbrB / dwbrBstrided. The t = 1 block projB ∘ dwbrB (b1) has no mnv2*BodyB peer; it is dwbrLayer ; projLayer.

The hypothesis budget #

Pointwise (HasVJPAt), not global, and necessarily. relu6 is kinked on BOTH sides, so each site carries ≠ 0 ∧ ≠ 6 and a global HasVJP through it is false. That is the repo standard for the relu-family nets and matches MobileNetV2FullVJP.lean's per-example fold; the axis this file moves is the BatchNorm world, not the pointwise/global one.

Two kink clauses per bottleneck, and the second is not r34's. ResNet-34's blocks carry the body's mid-relu AND a post-residual OUTER relu. MobileNetV2's carry the EXPAND relu6 and the DEPTHWISE relu6, both inside the body — the linear bottleneck has no activation after project, so the residual add IS the block output and contributes nothing. Sixteen expand-bearing blocks give 32 clauses, plus b1's single depthwise clause, plus the stem's and the head's: 35 relu6 sites, bundled into 19 binders.

The positivity bundles are REUSED, not re-declared: IVPos / IVNoExpPos (MobileNetV2FullVJP.lean) say 0 < ε at each BatchNorm site and know nothing about which world reduces it. Only the smoothness bundles need batched peers, because a kink condition names the activation and bnBatchLA is a different activation from bnPerChannelTensor3.

The running activations are named mnv2PreB0mnv2PreB17 so each bundle can be STATED at the activation entering its block without a seventeen-deep nested application inline; mnv2PreB17 doubles as the trunk, and mobilenetv2ForwardB_full_eq_chain bridges it back to the committed nested-application forward.

N is a variable throughout: this tier carries no numerals.

structure Proofs.IVSmoothAtB (N h w : ) {ic mid oc : } (q : IVW ic mid oc) (v : Vec (N * (ic * h * w))) :

Both relu6 sites of a stride-1 bottleneck are away from BOTH kinks at v, at batch BN: the expand-BN output and the depthwise-BN output each avoid 0 and 6 in every coordinate.

Instances For
    structure Proofs.IVStridedSmoothAtB (N h w : ) {ic mid oc : } (q : IVW ic mid oc) (v : Vec (N * (ic * (2 * h) * (2 * w)))) :

    Both relu6 sites of a stride-2 bottleneck are away from both kinks at v, at batch BN (the expand runs at the pre-downsample 2h x 2w grid, the XLA-SAME depthwise at h x w).

    Instances For
      structure Proofs.IVNoExpSmoothAtB (N h w : ) {ic oc : } (q : IVWNoExp ic oc) (v : Vec (N * (ic * h * w))) :

      The single relu6 site of the t = 1 bottleneck (depthwise-BN output) is away from both kinks at batch BN.

      Instances For
        def Proofs.MNV2StemSmoothAtB (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)))) :

        The stem's relu6 is away from both kinks at the input x, at batch BN.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Proofs.MNV2HeadSmoothAtB (N h w : ) {ic oc : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (γh βh : Vec oc) (v : Vec (N * (ic * h * w))) :

          The head's relu6 is away from both kinks at the trunk output v, at batch BN.

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

            Stem VJP: bnRelu6Stage_has_vjp_at at the XLA-SAME strided conv. That lemma takes the inner op as a parameter, so the stride-2 stem is the same construction as every stride-1 stage.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Proofs.mnv2StemB_differentiableAt (N h w : ) {ic oc kH kW : } (Ws : Kernel4 oc ic kH kW) (bs : Vec oc) (εs : ) (hεs : 0 < εs) (γs βs : Vec oc) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (hs : MNV2StemSmoothAtB N h w Ws bs εs γs βs x) :
              DifferentiableAt (mnv2StemB N h w Ws bs εs γs βs) x
              noncomputable def Proofs.mnv2NoExpB_has_vjp_at (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (hq : IVNoExpPos p) (v : Vec (N * (ic * h * w))) (hs : IVNoExpSmoothAtB N h w p v) :
              HasVJPAt (mnv2NoExpB N h w p) v

              t = 1 bottleneck VJP (b1): projB ∘ dwbrB, the VJP of dwbrLayer ; projLayer. The one block shape with no mnv2*BodyB lemma to delegate to.

              Equations
              Instances For
                theorem Proofs.mnv2NoExpB_differentiableAt (N h w : ) {ic oc : } (p : IVWNoExp ic oc) (hq : IVNoExpPos p) (v : Vec (N * (ic * h * w))) (hs : IVNoExpSmoothAtB N h w p v) :
                noncomputable def Proofs.mnv2ExpOnlyB_has_vjp_at (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (v : Vec (N * (ic * h * w))) (hs : IVSmoothAtB N h w p v) :

                Stride-1 no-skip bottleneck VJP (b11, b17) — mnv2BodyB_has_vjp_at at the bundle's fields.

                Equations
                Instances For
                  theorem Proofs.mnv2ExpOnlyB_differentiableAt (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (v : Vec (N * (ic * h * w))) (hs : IVSmoothAtB N h w p v) :
                  noncomputable def Proofs.mnv2ResidB_has_vjp_at (N h w : ) {c mid : } (p : IVW c mid c) (hq : IVPos p) (v : Vec (N * (c * h * w))) (hs : IVSmoothAtB N h w p v) :
                  HasVJPAt (mnv2ResidB N h w p) v

                  Stride-1 skip bottleneck VJP — the body VJP under residual_has_vjp_at. The identity arm is smooth everywhere, so the skip adds no hypothesis.

                  Equations
                  Instances For
                    theorem Proofs.mnv2ResidB_differentiableAt (N h w : ) {c mid : } (p : IVW c mid c) (hq : IVPos p) (v : Vec (N * (c * h * w))) (hs : IVSmoothAtB N h w p v) :
                    noncomputable def Proofs.mnv2StridedB_has_vjp_at (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (v : Vec (N * (ic * (2 * h) * (2 * w)))) (hs : IVStridedSmoothAtB N h w p v) :

                    Stride-2 downsampling bottleneck VJP — mnv2DownBodyB_has_vjp_at at the bundle's fields.

                    Equations
                    Instances For
                      theorem Proofs.mnv2StridedB_differentiableAt (N h w : ) {ic mid oc : } (p : IVW ic mid oc) (hq : IVPos p) (v : Vec (N * (ic * (2 * h) * (2 * w)))) (hs : IVStridedSmoothAtB N h w p v) :
                      noncomputable def Proofs.mnv2HeadB_has_vjp_at (N h w : ) {ic oc nCls : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (hεh : 0 < εh) (γh βh : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (v : Vec (N * (ic * h * w))) (hs : MNV2HeadSmoothAtB N h w Wh bh εh γh βh v) :
                      HasVJPAt (mnv2HeadB N h w Wh bh εh γh βh Wd bd) v

                      Head VJP: the 1x1 conv-bn-relu6 stage (cbrB, pointwise), then GAP and dense — both smooth, both batchMap of a per-example op, so both lift with the GLOBAL batchMap_has_vjp. ⚠ Unlike r34's, this head is NOT hypothesis-free: MobileNetV2 puts a relu6 in front of the pool, so the head carries the net's 35th kink site.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Proofs.mnv2HeadB_differentiableAt (N h w : ) {ic oc nCls : } (Wh : Kernel4 oc ic 1 1) (bh : Vec oc) (εh : ) (hεh : 0 < εh) (γh βh : Vec oc) (Wd : Mat oc nCls) (bd : Vec nCls) (v : Vec (N * (ic * h * w))) (hs : MNV2HeadSmoothAtB N h w Wh bh εh γh βh v) :
                        DifferentiableAt (mnv2HeadB N h w Wh bh εh γh βh Wd bd) v
                        noncomputable def Proofs.mnv2PreB0 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                        Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (32 * 112 * 112))
                        Equations
                        Instances For
                          noncomputable def Proofs.mnv2PreB1 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                          Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (16 * 112 * 112))
                          Equations
                          Instances For
                            noncomputable def Proofs.mnv2PreB2 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                            Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (24 * 56 * 56))
                            Equations
                            Instances For
                              noncomputable def Proofs.mnv2PreB3 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                              Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (24 * 56 * 56))
                              Equations
                              Instances For
                                noncomputable def Proofs.mnv2PreB4 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (32 * 28 * 28))
                                Equations
                                Instances For
                                  noncomputable def Proofs.mnv2PreB5 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                  Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (32 * 28 * 28))
                                  Equations
                                  Instances For
                                    noncomputable def Proofs.mnv2PreB6 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                    Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (32 * 28 * 28))
                                    Equations
                                    Instances For
                                      noncomputable def Proofs.mnv2PreB7 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                      Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (64 * 14 * 14))
                                      Equations
                                      Instances For
                                        noncomputable def Proofs.mnv2PreB8 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                        Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (64 * 14 * 14))
                                        Equations
                                        Instances For
                                          noncomputable def Proofs.mnv2PreB9 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                          Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (64 * 14 * 14))
                                          Equations
                                          Instances For
                                            noncomputable def Proofs.mnv2PreB10 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                            Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (64 * 14 * 14))
                                            Equations
                                            Instances For
                                              noncomputable def Proofs.mnv2PreB11 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                              Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (96 * 14 * 14))
                                              Equations
                                              Instances For
                                                noncomputable def Proofs.mnv2PreB12 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (96 * 14 * 14))
                                                Equations
                                                Instances For
                                                  noncomputable def Proofs.mnv2PreB13 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                  Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (96 * 14 * 14))
                                                  Equations
                                                  Instances For
                                                    noncomputable def Proofs.mnv2PreB14 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                    Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (160 * 7 * 7))
                                                    Equations
                                                    Instances For
                                                      noncomputable def Proofs.mnv2PreB15 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                      Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (160 * 7 * 7))
                                                      Equations
                                                      Instances For
                                                        noncomputable def Proofs.mnv2PreB16 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                        Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (160 * 7 * 7))
                                                        Equations
                                                        Instances For
                                                          noncomputable def Proofs.mnv2PreB17 (N : ) {nCls : } (w : MNV2BWeights nCls) :
                                                          Vec (N * (3 * (2 * 112) * (2 * 112)))Vec (N * (320 * 7 * 7))
                                                          Equations
                                                          Instances For
                                                            noncomputable def Proofs.mobilenetv2ForwardB_full_has_vjp_at (N : ) {nCls : } (w : MNV2BWeights nCls) (hsε : 0 < w.) (hhε : 0 < w.) (qb1 : IVNoExpPos w.b1) (qb2 : IVPos w.b2) (qb3 : IVPos w.b3) (qb4 : IVPos w.b4) (qb5 : IVPos w.b5) (qb6 : IVPos w.b6) (qb7 : IVPos w.b7) (qb8 : IVPos w.b8) (qb9 : IVPos w.b9) (qb10 : IVPos w.b10) (qb11 : IVPos w.b11) (qb12 : IVPos w.b12) (qb13 : IVPos w.b13) (qb14 : IVPos w.b14) (qb15 : IVPos w.b15) (qb16 : IVPos w.b16) (qb17 : IVPos w.b17) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) (h_stem : MNV2StemSmoothAtB N 112 112 w.sW w.sb w. w. w. x) (sb1 : IVNoExpSmoothAtB N 112 112 w.b1 (mnv2PreB0 N w x)) (sb2 : IVStridedSmoothAtB N 56 56 w.b2 (mnv2PreB1 N w x)) (sb3 : IVSmoothAtB N 56 56 w.b3 (mnv2PreB2 N w x)) (sb4 : IVStridedSmoothAtB N 28 28 w.b4 (mnv2PreB3 N w x)) (sb5 : IVSmoothAtB N 28 28 w.b5 (mnv2PreB4 N w x)) (sb6 : IVSmoothAtB N 28 28 w.b6 (mnv2PreB5 N w x)) (sb7 : IVStridedSmoothAtB N 14 14 w.b7 (mnv2PreB6 N w x)) (sb8 : IVSmoothAtB N 14 14 w.b8 (mnv2PreB7 N w x)) (sb9 : IVSmoothAtB N 14 14 w.b9 (mnv2PreB8 N w x)) (sb10 : IVSmoothAtB N 14 14 w.b10 (mnv2PreB9 N w x)) (sb11 : IVSmoothAtB N 14 14 w.b11 (mnv2PreB10 N w x)) (sb12 : IVSmoothAtB N 14 14 w.b12 (mnv2PreB11 N w x)) (sb13 : IVSmoothAtB N 14 14 w.b13 (mnv2PreB12 N w x)) (sb14 : IVStridedSmoothAtB N 7 7 w.b14 (mnv2PreB13 N w x)) (sb15 : IVSmoothAtB N 7 7 w.b15 (mnv2PreB14 N w x)) (sb16 : IVSmoothAtB N 7 7 w.b16 (mnv2PreB15 N w x)) (sb17 : IVSmoothAtB N 7 7 w.b17 (mnv2PreB16 N w x)) (h_head : MNV2HeadSmoothAtB N 7 7 w.hW w.hb w. w. w. (mnv2PreB17 N w x)) :
                                                            HasVJPAt (mnv2HeadB N 7 7 w.hW w.hb w. w. w. w.fcW w.fcb mnv2PreB17 N w) x

                                                            ⭐⭐ MobileNetV2 at TRUE BATCH-NORM has a certified input-VJP at a smooth point — all seventeen bottlenecks. Chains stem → the [t,c,n,s] ladder → head with vjp_comp_at, one positivity bundle and one smoothness bundle per block. T1's VJP half for formalization.yaml 4e's port (the per-example fold it was the batched peer of was retired 2026-09-19).

                                                            ⚠ Pointwise, and necessarily: relu6 is kinked on both sides. ⛔ Each expand-bearing block contributes TWO clauses — the expand relu6 and the depthwise relu6, both INSIDE the body — where ResNet-34's basic block contributes a mid-relu and a post-residual OUTER relu. The linear bottleneck has no activation after project, so MobileNetV2's residual add is the block output and adds nothing.

                                                            ⚠ Unlike r34's, the head is NOT hypothesis-free: its 1x1 conv-BN is followed by a relu6.

                                                            N is a variable: this tier carries no numerals.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              theorem Proofs.mnv2PreB0_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB0 N w x = mnv2StemB N 112 112 w.sW w.sb w. w. w. x
                                                              theorem Proofs.mnv2PreB1_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB1 N w x = mnv2NoExpB N 112 112 w.b1 (mnv2PreB0 N w x)
                                                              theorem Proofs.mnv2PreB2_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB2 N w x = mnv2StridedB N 56 56 w.b2 (mnv2PreB1 N w x)
                                                              theorem Proofs.mnv2PreB3_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB3 N w x = mnv2ResidB N 56 56 w.b3 (mnv2PreB2 N w x)
                                                              theorem Proofs.mnv2PreB4_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB4 N w x = mnv2StridedB N 28 28 w.b4 (mnv2PreB3 N w x)
                                                              theorem Proofs.mnv2PreB5_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB5 N w x = mnv2ResidB N 28 28 w.b5 (mnv2PreB4 N w x)
                                                              theorem Proofs.mnv2PreB6_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB6 N w x = mnv2ResidB N 28 28 w.b6 (mnv2PreB5 N w x)
                                                              theorem Proofs.mnv2PreB7_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB7 N w x = mnv2StridedB N 14 14 w.b7 (mnv2PreB6 N w x)
                                                              theorem Proofs.mnv2PreB8_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB8 N w x = mnv2ResidB N 14 14 w.b8 (mnv2PreB7 N w x)
                                                              theorem Proofs.mnv2PreB9_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB9 N w x = mnv2ResidB N 14 14 w.b9 (mnv2PreB8 N w x)
                                                              theorem Proofs.mnv2PreB10_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB10 N w x = mnv2ResidB N 14 14 w.b10 (mnv2PreB9 N w x)
                                                              theorem Proofs.mnv2PreB11_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB11 N w x = mnv2ExpOnlyB N 14 14 w.b11 (mnv2PreB10 N w x)
                                                              theorem Proofs.mnv2PreB12_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB12 N w x = mnv2ResidB N 14 14 w.b12 (mnv2PreB11 N w x)
                                                              theorem Proofs.mnv2PreB13_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB13 N w x = mnv2ResidB N 14 14 w.b13 (mnv2PreB12 N w x)
                                                              theorem Proofs.mnv2PreB14_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB14 N w x = mnv2StridedB N 7 7 w.b14 (mnv2PreB13 N w x)
                                                              theorem Proofs.mnv2PreB15_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB15 N w x = mnv2ResidB N 7 7 w.b15 (mnv2PreB14 N w x)
                                                              theorem Proofs.mnv2PreB16_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB16 N w x = mnv2ResidB N 7 7 w.b16 (mnv2PreB15 N w x)
                                                              theorem Proofs.mnv2PreB17_apply (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mnv2PreB17 N w x = mnv2ExpOnlyB N 7 7 w.b17 (mnv2PreB16 N w x)
                                                              theorem Proofs.mobilenetv2ForwardB_full_eq_chain (N : ) {nCls : } (w : MNV2BWeights nCls) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              mobilenetv2ForwardB_full N w x = (mnv2HeadB N 7 7 w.hW w.hb w. w. w. w.fcW w.fcb mnv2PreB17 N w) x

                                                              The committed nested-application forward IS the layered chain the VJP is stated on — the batched peer of the retired per-example shape check, and what lets the VJP be about mobilenetv2ForwardB_full rather than about a re-spelling of it.

                                                              theorem Proofs.mobilenetv2ForwardB_full_has_vjp_at_correct (N : ) {nCls : } (w : MNV2BWeights nCls) (hsε : 0 < w.) (hhε : 0 < w.) (qb1 : IVNoExpPos w.b1) (qb2 : IVPos w.b2) (qb3 : IVPos w.b3) (qb4 : IVPos w.b4) (qb5 : IVPos w.b5) (qb6 : IVPos w.b6) (qb7 : IVPos w.b7) (qb8 : IVPos w.b8) (qb9 : IVPos w.b9) (qb10 : IVPos w.b10) (qb11 : IVPos w.b11) (qb12 : IVPos w.b12) (qb13 : IVPos w.b13) (qb14 : IVPos w.b14) (qb15 : IVPos w.b15) (qb16 : IVPos w.b16) (qb17 : IVPos w.b17) (x : Vec (N * (3 * (2 * 112) * (2 * 112)))) (h_stem : MNV2StemSmoothAtB N 112 112 w.sW w.sb w. w. w. x) (sb1 : IVNoExpSmoothAtB N 112 112 w.b1 (mnv2PreB0 N w x)) (sb2 : IVStridedSmoothAtB N 56 56 w.b2 (mnv2PreB1 N w x)) (sb3 : IVSmoothAtB N 56 56 w.b3 (mnv2PreB2 N w x)) (sb4 : IVStridedSmoothAtB N 28 28 w.b4 (mnv2PreB3 N w x)) (sb5 : IVSmoothAtB N 28 28 w.b5 (mnv2PreB4 N w x)) (sb6 : IVSmoothAtB N 28 28 w.b6 (mnv2PreB5 N w x)) (sb7 : IVStridedSmoothAtB N 14 14 w.b7 (mnv2PreB6 N w x)) (sb8 : IVSmoothAtB N 14 14 w.b8 (mnv2PreB7 N w x)) (sb9 : IVSmoothAtB N 14 14 w.b9 (mnv2PreB8 N w x)) (sb10 : IVSmoothAtB N 14 14 w.b10 (mnv2PreB9 N w x)) (sb11 : IVSmoothAtB N 14 14 w.b11 (mnv2PreB10 N w x)) (sb12 : IVSmoothAtB N 14 14 w.b12 (mnv2PreB11 N w x)) (sb13 : IVSmoothAtB N 14 14 w.b13 (mnv2PreB12 N w x)) (sb14 : IVStridedSmoothAtB N 7 7 w.b14 (mnv2PreB13 N w x)) (sb15 : IVSmoothAtB N 7 7 w.b15 (mnv2PreB14 N w x)) (sb16 : IVSmoothAtB N 7 7 w.b16 (mnv2PreB15 N w x)) (sb17 : IVSmoothAtB N 7 7 w.b17 (mnv2PreB16 N w x)) (h_head : MNV2HeadSmoothAtB N 7 7 w.hW w.hb w. w. w. (mnv2PreB17 N w x)) (dy : Vec (N * nCls)) (i : Fin (N * (3 * (2 * 112) * (2 * 112)))) :
                                                              (mobilenetv2ForwardB_full_has_vjp_at N w hsε hhε qb1 qb2 qb3 qb4 qb5 qb6 qb7 qb8 qb9 qb10 qb11 qb12 qb13 qb14 qb15 qb16 qb17 x h_stem sb1 sb2 sb3 sb4 sb5 sb6 sb7 sb8 sb9 sb10 sb11 sb12 sb13 sb14 sb15 sb16 sb17 h_head).backward dy i = j : Fin (N * nCls), pdiv (mobilenetv2ForwardB_full N w) x i j * dy j

                                                              ⭐⭐ Public correctness theorem: the seventeen-bottleneck batch-BN backward equals the pdiv-contracted Jacobian of mobilenetv2ForwardB_full ITSELF — the committed nested-application forward MobileNetV2FullB.lean defines and mobilenetv2FwdGraphB_full_faithful proves the typed graph denotes — not of the layered chain the VJP is assembled on. Tied back through mobilenetv2ForwardB_full_eq_chain.