MobileNetV4-Conv-M's non-degeneracy seal, on the full-width batched net (levels 2 and 3) #
planning/full_width_seals.md §4.4, the last of four. MobileNetV4FullBVJP.lean proves
mobilenetv4ForwardB_full_has_vjp_at: the whole-net VJP at any (w, x) satisfying
eight clause bundles — the stem's relu, the fused stage's (vacuous), one per resolution group
and the head's, 54 relu sites in all (the #guard below counts them off the block table). That statement is pointwise, so it could in
principle be vacuous. This file exhibits a (w, x) that discharges every clause with genuinely
nonzero weights, shows the forward is not constant there, and seals the Jacobian nonzero — hence,
through Training/JacobianSeal.lean, the proven backward is not the zero map at that
point. MobileNetV4 had no witness at any depth before this; with it, every kinked net in the book
is sealed on the forward its artifacts run.
⭐⭐ All 54 clauses are weight-only — and generic in the table row #
Every kink in this net is a relu sitting directly on a bnBatchLA output, in four spellings
(Mnv4StemSmoothAtB, cbReluLayer.ok, mnv4DWReluLayer.ok, mnv4DWReluStridedLayer.ok);
projLayer.ok, mnv4FusedConvLayer.ok and CertLayer.id'.ok are True. bnBatchLA_pos bounds a
BatchNorm output above β − |γ|√(N·h·w) > 0 at EVERY input, so with γ = 1, β = 160, ε = 1
the whole bundle is discharged without the activation ever being read. ⭐ Better still, the
discharge is proved generically in the UibSpec row (sealUib_ok, sealUibStrided_ok): the
k = 0 depthwise slots contribute True and the rest are the same BatchNorm fact, so 21 blocks
cost two lemmas.
⭐⭐ The swish is the one thing that is not MobileNetV2 again #
planning/full_width_seals.md §4.4 called the clause bundle the package's remaining uncertainty
and the CertLayer peel its real work. Both turned out cheap — CertLayer.comp_fwd_apply and the
group *_fwd_apply lemmas in MobileNetV4FullB.lean already peel at variables. What was missed is
the fused stage's swish, and it changes the witness:
- the other three seals ride a positionally-injective ramp, which a stem max-pool's no-tie needs. A carrier crosses their relus because relu is the identity inside the margin window;
- swish is the identity on no window at all. A gap between the two examples comes out of it as
swish(a) − swish(b), which is not a multiple ofa − band — worse — is not even constant over the grid unlessaandbare; - ⭐ so this witness's base is grid-constant, not a ramp:
sealX t = t • rayV. Then every activation down to the fused BatchNorm is one value per (example, channel) (BUnif), that BatchNorm puts the two values symmetrically aboutβ(bnBatchLA_pair), and the swish's two outputs differ byswishGap β u— a function of their half-gapualone.EDifftakes over from there and every remaining stage is multiplicative. MobileNetV4 has no pool, so nothing wanted the ramp.
The readout along the ray is therefore swishGap 160 (uF t 0) · Rr t, not t · Rr t, and the
seal closes with hasDerivAt_mul_of_zero rather than hasDerivAt_mul_self_zero. ⚠ No BatchNorm
variance derivative is taken anywhere: the two pre-swish factors enter through t · Q0 t and the
fifteen after it through a continuous Rr; the swish's slope at β is the one honest derivative
in the chain, and it is positive for every β ≥ 0.
The carrier threads seventeen BatchNorms #
The stem's, the fused stage's two, four in each of rows 1, 3 and 11 — the only rows that change
channels, hence the only ones without a skip — and the head's two. ⛔ Counted from the net, not
from prose: the other eighteen rows are CertLayer.residual, so the carrier goes round their
bodies. With the project BatchNorm's β = 0 a zeroed body is the constant 0, so those rows are
the EXACT identity and two of the seven groups collapse to nothing at all.
⚠⚠ Every collapse, every clause bundle and every block lemma here is proved at variable shapes
and instantiated at the witness's numerals afterwards, never proved at them
(planning/full_width_seals.md §3.5). ⚠ And a lemma whose spatial dims are only reachable through
a Vec (… (2*h) …) argument needs them passed explicitly — 2 * ?h =?= 56 is nonlinear, and
BUnif_convS2 without (h := 56) (w := 56) is a maxHeartbeats timeout in isDefEq.
Equations
- One or more equations did not get rendered due to their size.
Instances For
a carrier row: every kernel a centre tap.
Equations
- One or more equations did not get rendered due to their size.
Instances For
a skipped row: every kernel zero, so the body is the constant 0.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
⭐ A zeroed UIB body is the constant 0, whatever its slots are. The project conv's kernel
is zero, so projB_zero_const closes the block without any stage inside it being analysed —
the k = 0 dispatch never has to be read.
⭐ A carrier row (all three are pre-strided ExtraDW) collapses to four BatchNorms.
⭐ Every clause of a UIB body, at every input. The k = 0 slots contribute True and the
rest are relus on BatchNorm outputs, so the discharge never looks at the activation and holds
for the centre-tap rows and the zeroed rows alike.
the pre-strided peer: the leading depthwise carries the stride, so it is not a slot.
Equations
- Proofs.Mnv4FullBSeal.sealV = Proofs.BatchSeal.rayV (2 * 112) (2 * 112)
Instances For
Equations
Instances For
⭐⭐ The whole-net VJP at the witness — all eight bundles discharged.
Equations
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zs t = Proofs.StableHLO.batchMap 2 (Proofs.flatConvStride2Xla (Proofs.BatchSeal.ctK 32 3 3 3 1) (Proofs.BatchSeal.kv 32 0)) (Proofs.Mnv4FullBSeal.sealX t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.As t = Proofs.StableHLO.bnBatchLA 2 32 112 112 1 (Proofs.BatchSeal.kv 32 1) (Proofs.BatchSeal.kv 32 160) (Proofs.Mnv4FullBSeal.Zs t)
Instances For
the stem BatchNorm's istd, channel by channel.
Equations
- Proofs.Mnv4FullBSeal.iS t o = Proofs.bnIstd (2 * (112 * 112)) (Proofs.BatchSeal.bnRowLA 2 32 112 112 (Proofs.Mnv4FullBSeal.Zs t) o) 1
Instances For
⭐ the stem BatchNorm puts the two examples at 160 ± t/2 · istd — symmetrically about β,
which is the fact the swish needs and a difference alone cannot give.
the stem's relu is the identity here, so mnv4Pre0 IS the stem BatchNorm.
Equations
- Proofs.Mnv4FullBSeal.Zf t = Proofs.StableHLO.batchMap 2 (Proofs.flatConvStride2 (Proofs.BatchSeal.ctK 128 32 3 3 1) (Proofs.BatchSeal.kv 128 0)) (Proofs.Mnv4FullBSeal.As t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Af t = Proofs.StableHLO.bnBatchLA 2 128 56 56 1 (Proofs.BatchSeal.kv 128 1) (Proofs.BatchSeal.kv 128 160) (Proofs.Mnv4FullBSeal.Zf t)
Instances For
the fused conv's BatchNorm istd, channel by channel.
Equations
- Proofs.Mnv4FullBSeal.iF t o = Proofs.bnIstd (2 * (56 * 56)) (Proofs.BatchSeal.bnRowLA 2 128 56 56 (Proofs.Mnv4FullBSeal.Zf t) o) 1
Instances For
⭐ the half-gap at the swish's input — t times the two pre-swish BatchNorm factors.
Equations
- Proofs.Mnv4FullBSeal.uF t o = t / 2 * Proofs.Mnv4FullBSeal.iS t 0 * Proofs.Mnv4FullBSeal.iF t o
Instances For
Equations
- Proofs.Mnv4FullBSeal.aF t n o = 160 + if ↑n = 0 then Proofs.Mnv4FullBSeal.uF t o else -Proofs.Mnv4FullBSeal.uF t o
Instances For
the fused stage's swish output.
Equations
- Proofs.Mnv4FullBSeal.Sw t = Proofs.swish (2 * (128 * 56 * 56)) (Proofs.Mnv4FullBSeal.Af t)
Instances For
⭐⭐ the carrier crosses the swish. The two examples straddle β = 160, so their outputs
differ by swishGap 160 of the half-gap — and from here on the carrier is an EDiff and
every stage multiplies it.
Equations
- Proofs.Mnv4FullBSeal.Z1p t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 48 128 1 1 1) (Proofs.BatchSeal.kv 48 0)) (Proofs.Mnv4FullBSeal.Sw t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.A1p t = Proofs.StableHLO.bnBatchLA 2 48 56 56 1 (Proofs.BatchSeal.kv 48 1) (Proofs.BatchSeal.kv 48 0) (Proofs.Mnv4FullBSeal.Z1p t)
Instances For
Equations
Instances For
Equations
- Proofs.Mnv4FullBSeal.Aaq t = Proofs.StableHLO.bnBatchLA 2 48 28 28 1 (Proofs.BatchSeal.kv 48 1) (Proofs.BatchSeal.kv 48 160) (Proofs.Mnv4FullBSeal.Zaq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zae t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 192 48 1 1 1) (Proofs.BatchSeal.kv 192 0)) (Proofs.Mnv4FullBSeal.Aaq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Aae t = Proofs.StableHLO.bnBatchLA 2 192 28 28 1 (Proofs.BatchSeal.kv 192 1) (Proofs.BatchSeal.kv 192 160) (Proofs.Mnv4FullBSeal.Zae t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zad t = Proofs.StableHLO.batchMap 2 (Proofs.depthwiseFlat (Proofs.BatchSeal.ctDW 192 5 5 1) (Proofs.BatchSeal.kv 192 0)) (Proofs.Mnv4FullBSeal.Aae t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Aad t = Proofs.StableHLO.bnBatchLA 2 192 28 28 1 (Proofs.BatchSeal.kv 192 1) (Proofs.BatchSeal.kv 192 160) (Proofs.Mnv4FullBSeal.Zad t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zaz t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 80 192 1 1 1) (Proofs.BatchSeal.kv 80 0)) (Proofs.Mnv4FullBSeal.Aad t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Aaz t = Proofs.StableHLO.bnBatchLA 2 80 28 28 1 (Proofs.BatchSeal.kv 80 1) (Proofs.BatchSeal.kv 80 0) (Proofs.Mnv4FullBSeal.Zaz t)
Instances For
Equations
Instances For
Equations
- Proofs.Mnv4FullBSeal.Abq t = Proofs.StableHLO.bnBatchLA 2 80 14 14 1 (Proofs.BatchSeal.kv 80 1) (Proofs.BatchSeal.kv 80 160) (Proofs.Mnv4FullBSeal.Zbq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zbe t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 480 80 1 1 1) (Proofs.BatchSeal.kv 480 0)) (Proofs.Mnv4FullBSeal.Abq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Abe t = Proofs.StableHLO.bnBatchLA 2 480 14 14 1 (Proofs.BatchSeal.kv 480 1) (Proofs.BatchSeal.kv 480 160) (Proofs.Mnv4FullBSeal.Zbe t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zbd t = Proofs.StableHLO.batchMap 2 (Proofs.depthwiseFlat (Proofs.BatchSeal.ctDW 480 5 5 1) (Proofs.BatchSeal.kv 480 0)) (Proofs.Mnv4FullBSeal.Abe t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Abd t = Proofs.StableHLO.bnBatchLA 2 480 14 14 1 (Proofs.BatchSeal.kv 480 1) (Proofs.BatchSeal.kv 480 160) (Proofs.Mnv4FullBSeal.Zbd t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zbz t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 160 480 1 1 1) (Proofs.BatchSeal.kv 160 0)) (Proofs.Mnv4FullBSeal.Abd t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Abz t = Proofs.StableHLO.bnBatchLA 2 160 14 14 1 (Proofs.BatchSeal.kv 160 1) (Proofs.BatchSeal.kv 160 0) (Proofs.Mnv4FullBSeal.Zbz t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zcq t = Proofs.StableHLO.batchMap 2 (Proofs.depthwiseStride2Flat (Proofs.BatchSeal.ctDW 160 5 5 1) (Proofs.BatchSeal.kv 160 0)) (Proofs.Mnv4FullBSeal.Abz t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Acq t = Proofs.StableHLO.bnBatchLA 2 160 7 7 1 (Proofs.BatchSeal.kv 160 1) (Proofs.BatchSeal.kv 160 160) (Proofs.Mnv4FullBSeal.Zcq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zce t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 960 160 1 1 1) (Proofs.BatchSeal.kv 960 0)) (Proofs.Mnv4FullBSeal.Acq t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Ace t = Proofs.StableHLO.bnBatchLA 2 960 7 7 1 (Proofs.BatchSeal.kv 960 1) (Proofs.BatchSeal.kv 960 160) (Proofs.Mnv4FullBSeal.Zce t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zcd t = Proofs.StableHLO.batchMap 2 (Proofs.depthwiseFlat (Proofs.BatchSeal.ctDW 960 5 5 1) (Proofs.BatchSeal.kv 960 0)) (Proofs.Mnv4FullBSeal.Ace t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Acd t = Proofs.StableHLO.bnBatchLA 2 960 7 7 1 (Proofs.BatchSeal.kv 960 1) (Proofs.BatchSeal.kv 960 160) (Proofs.Mnv4FullBSeal.Zcd t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zcz t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 256 960 1 1 1) (Proofs.BatchSeal.kv 256 0)) (Proofs.Mnv4FullBSeal.Acd t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Acz t = Proofs.StableHLO.bnBatchLA 2 256 7 7 1 (Proofs.BatchSeal.kv 256 1) (Proofs.BatchSeal.kv 256 0) (Proofs.Mnv4FullBSeal.Zcz t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zh1 t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 960 256 1 1 1) (Proofs.BatchSeal.kv 960 0)) (Proofs.Mnv4FullBSeal.Acz t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Ah1 t = Proofs.StableHLO.bnBatchLA 2 960 7 7 1 (Proofs.BatchSeal.kv 960 1) (Proofs.BatchSeal.kv 960 160) (Proofs.Mnv4FullBSeal.Zh1 t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Zh2 t = Proofs.StableHLO.batchMap 2 (Proofs.flatConv (Proofs.BatchSeal.ctK 1280 960 1 1 1) (Proofs.BatchSeal.kv 1280 0)) (Proofs.Mnv4FullBSeal.Ah1 t)
Instances For
Equations
- Proofs.Mnv4FullBSeal.Ah2 t = Proofs.StableHLO.bnBatchLA 2 1280 7 7 1 (Proofs.BatchSeal.kv 1280 1) (Proofs.BatchSeal.kv 1280 160) (Proofs.Mnv4FullBSeal.Zh2 t)
Instances For
one carrier BatchNorm's whole contribution: γ · istd at γ = 1.
Equations
- Proofs.Mnv4FullBSeal.rf n z = Proofs.bnIstd n z 1
Instances For
the carrier at the swish's output — ⭐⭐ the one step of the whole chain that is NOT a multiple of the step before it.
Equations
Instances For
Equations
- Proofs.Mnv4FullBSeal.d1p t o = Proofs.Mnv4FullBSeal.dSw t 0 * Proofs.Mnv4FullBSeal.rf (2 * (56 * 56)) (Proofs.BatchSeal.bnRowLA 2 48 56 56 (Proofs.Mnv4FullBSeal.Z1p t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.daq t ch = Proofs.Mnv4FullBSeal.d1p t ch * Proofs.Mnv4FullBSeal.rf (2 * (28 * 28)) (Proofs.BatchSeal.bnRowLA 2 48 28 28 (Proofs.Mnv4FullBSeal.Zaq t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dae t o = Proofs.Mnv4FullBSeal.daq t 0 * Proofs.Mnv4FullBSeal.rf (2 * (28 * 28)) (Proofs.BatchSeal.bnRowLA 2 192 28 28 (Proofs.Mnv4FullBSeal.Zae t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dad t ch = Proofs.Mnv4FullBSeal.dae t ch * Proofs.Mnv4FullBSeal.rf (2 * (28 * 28)) (Proofs.BatchSeal.bnRowLA 2 192 28 28 (Proofs.Mnv4FullBSeal.Zad t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.daz t o = Proofs.Mnv4FullBSeal.dad t 0 * Proofs.Mnv4FullBSeal.rf (2 * (28 * 28)) (Proofs.BatchSeal.bnRowLA 2 80 28 28 (Proofs.Mnv4FullBSeal.Zaz t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dbq t ch = Proofs.Mnv4FullBSeal.daz t ch * Proofs.Mnv4FullBSeal.rf (2 * (14 * 14)) (Proofs.BatchSeal.bnRowLA 2 80 14 14 (Proofs.Mnv4FullBSeal.Zbq t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dbe t o = Proofs.Mnv4FullBSeal.dbq t 0 * Proofs.Mnv4FullBSeal.rf (2 * (14 * 14)) (Proofs.BatchSeal.bnRowLA 2 480 14 14 (Proofs.Mnv4FullBSeal.Zbe t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dbd t ch = Proofs.Mnv4FullBSeal.dbe t ch * Proofs.Mnv4FullBSeal.rf (2 * (14 * 14)) (Proofs.BatchSeal.bnRowLA 2 480 14 14 (Proofs.Mnv4FullBSeal.Zbd t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dbz t o = Proofs.Mnv4FullBSeal.dbd t 0 * Proofs.Mnv4FullBSeal.rf (2 * (14 * 14)) (Proofs.BatchSeal.bnRowLA 2 160 14 14 (Proofs.Mnv4FullBSeal.Zbz t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dcq t ch = Proofs.Mnv4FullBSeal.dbz t ch * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 160 7 7 (Proofs.Mnv4FullBSeal.Zcq t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dce t o = Proofs.Mnv4FullBSeal.dcq t 0 * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 960 7 7 (Proofs.Mnv4FullBSeal.Zce t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dcd t ch = Proofs.Mnv4FullBSeal.dce t ch * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 960 7 7 (Proofs.Mnv4FullBSeal.Zcd t) ch)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dcz t o = Proofs.Mnv4FullBSeal.dcd t 0 * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 256 7 7 (Proofs.Mnv4FullBSeal.Zcz t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dh1 t o = Proofs.Mnv4FullBSeal.dcz t 0 * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 960 7 7 (Proofs.Mnv4FullBSeal.Zh1 t) o)
Instances For
Equations
- Proofs.Mnv4FullBSeal.dh2 t o = Proofs.Mnv4FullBSeal.dh1 t 0 * Proofs.Mnv4FullBSeal.rf (2 * (7 * 7)) (Proofs.BatchSeal.bnRowLA 2 1280 7 7 (Proofs.Mnv4FullBSeal.Zh2 t) o)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
the head, peeled: two 1×1 conv-bn-relus, then GAP and the classifier. ⚠ Proved at variables
(CertLayer.comp_fwd_apply) and applied at the net's literals — peeling a CertLayer.comp
here is a kernel timeout, which is why MobileNetV4FullB.lean keeps the group peels generic
too.
⭐⭐ The class-0 difference between the two examples, along the ray: the swish's gap times
the fifteen BatchNorm factors below it. ⚠ NOT t · Rr t — the swish is not affine, and that
is exactly what swishGap carries.
⭐⭐ the swish's contribution: swishGap is differentiable at 0 with slope 2 · swish' β,
and that is the whole reason this net's readout is not t · Rr t.
at t = 1 the readout is strictly positive: the half-gap is inside (0, 160] because
ε = 1 caps every istd at 1, and the swish is strictly increasing there.
⭐⭐ Level 2 — the witness is non-degenerate: the full-width batch-BN MobileNetV4-Conv-M at the structural weights is NOT constant in its input.
⭐⭐ Level 3 — the whole-net Jacobian is nonzero at the witness.
⭐⭐ The seal: the proven whole-network backward of the full-width, batch-BatchNorm,
21-block, 224×224 MobileNetV4-Conv-M — mobilenetv4ForwardB_full, the forward every
MobileNetV4 artifact runs — is not the zero map at the witness.