Documentation

LeanMlir.Proofs.Foundation.SgdNodes

The per-example fused-SGD nodes — one *_den per op kind, shared by every per-example chain #

The per-example train steps (the MNIST / CIFAR chapter nets, and the per-example tiers of ResNet-34, MobileNetV2, ConvNeXt and ViT) emit fused θ − lr·∂Loss/∂θ ops. Each lemma here says one such op denotes the certified SGD step at an arbitrary cotangent, so a net's fold is these at its layers. The per-example UN-FUSED peers (a render with a separate optimizer) are the last section, in GradNode; the batched ones are in GradNodesB.

oplemmanamespace
dense weight / bias (weightSgd, biasSgd)denseW_den, denseB_denSgdNode
conv weight / bias (convWeightSgd, convBiasSgd)convW_den, convB_denSgdNode
per-channel BN γ / β (bnGammaSgd, bnBetaSgd), and the pair as one clausebnGamma_den, bnBeta_den, BnSgdPairTiedSgdNode
conv weight / bias as tie clausesConvWSgdTied, ConvBSgdTied, convWSgdTied_holds, convBSgdTied_holdsProofs
dense weight / bias as tie clausesDenseWSgdTied, DenseBSgdTied, denseWSgdTied_holds, denseBSgdTied_holdsProofs
stride-1 depthwise weight / bias (depthwiseWeightSgd, depthwiseBiasSgd)depthwiseW_den, depthwiseB_denSgdNode
stride-2 conv weight / bias (convStridedWeightSgd, convStridedBiasSgd)convStridedW_den, convStridedB_denSgdNode
vector-LN γ / β (veclnGammaSgd, rowDenseBiasSgd at the LN forward), and their clausesveclnGammaSgd_den, rowDenseBiasSgd_den_lnbeta, VecLN{Gamma,Beta}SgdTied, vecLN{Gamma,Beta}SgdTied_holdsSgdNode
the un-fused per-example peers (weightGrad, biasGrad, convWeightGrad, convBiasGrad, bnGammaGrad, bnBetaGrad), and their clausesdenseWGrad_den, denseBGrad_den, convWGrad_den, convBGrad_den, bnGammaGrad_den, bnBetaGrad_den, ConvWGradTied, ConvBGradTied, BnGradPairTied, DenseWGradTied, DenseBGradTiedGradNode
theorem Proofs.SgdNode.denseW_den {m n : ℕ} (aN wN lrStr cotN : String) (a : Vec m) (W : Mat m n) (b c : Vec n) (lr : ℝ) (i : Fin m) (j : Fin n) :
StableHLO.den (StableHLO.SHlo.weightSgd aN wN lrStr a W lr (StableHLO.SHlo.operand cotN c)) (finProdFinEquiv (i, j)) = W i j - lr * ∑ k : Fin n, pdiv (fun (v : Vec (m * n)) => dense (Mat.unflatten v) b a) W.flatten (finProdFinEquiv (i, j)) k * c k

Any emitted dense weight op = certified. Generic in the layer dims, the activation a, bias b and cotangent c: den (weightSgd a W (.operand _ c)) = W − lr·(certified ∂dense/∂W · c). Every small net's dense layers are instances.

theorem Proofs.SgdNode.denseB_den {m n : ℕ} (bN lrStr cotN : String) (W : Mat m n) (a : Vec m) (b c : Vec n) (lr : ℝ) (i : Fin n) :
StableHLO.den (StableHLO.SHlo.biasSgd bN lrStr b lr (StableHLO.SHlo.operand cotN c)) i = b i - lr * ∑ j : Fin n, pdiv (fun (b' : Vec n) => dense W b' a) b i j * c j

Any emitted dense bias op = certified. Generic peer of denseW_den.

theorem Proofs.SgdNode.convW_den {ic oc h w kH kW : ℕ} (xN wN lrStr cotN : String) (b : Vec oc) (x : Tensor3 ic h w) (W : Kernel4 oc ic kH kW) (c : Vec (oc * h * w)) (lr : ℝ) (idx : Fin (oc * ic * kH * kW)) :
StableHLO.den (StableHLO.SHlo.convWeightSgd xN wN lrStr b x W lr (StableHLO.SHlo.operand cotN c)) idx = W.flatten idx - lr * ∑ j : Fin (oc * h * w), pdiv (fun (v' : Vec (oc * ic * kH * kW)) => (conv2d (Kernel4.unflatten v') b x).flatten) W.flatten idx j * c j

Any emitted conv weight op = certified. Generic in the conv dims and the cotangent c: the convWeightSgd op denotes flatten W − lr·(certified ∂conv/∂W · c). Instantiated at each layer's (b,x,W,c) it certifies W₁…W₄.

theorem Proofs.SgdNode.convB_den {ic oc h w kH kW : ℕ} (bN lrStr cotN : String) (W : Kernel4 oc ic kH kW) (x : Tensor3 ic h w) (b : Vec oc) (c : Vec (oc * h * w)) (lr : ℝ) (o : Fin oc) :
StableHLO.den (StableHLO.SHlo.convBiasSgd bN lrStr W x b lr (StableHLO.SHlo.operand cotN c)) o = b o - lr * ∑ j : Fin (oc * h * w), pdiv (fun (b' : Vec oc) => (conv2d W b' x).flatten) b o j * c j

Any emitted conv bias op = certified. Generic peer of convW_den.

theorem Proofs.SgdNode.bnGamma_den {oc h w : ℕ} (gN vN epsStr lrStr cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) (lr : ℝ) (idx : Fin oc) :
StableHLO.den (StableHLO.SHlo.bnGammaSgd gN vN epsStr lrStr ε γ v lr (StableHLO.SHlo.operand cotN c)) idx = γ idx - lr * ∑ j : Fin (oc * (h * w)), pdiv (fun (γ' : Vec oc) => bnPerChannelFlat oc (h * w) ε γ' β (reassocFwd oc h w v)) γ idx j * reassocFwd oc h w c j

Per-channel BN γ op = certified. The emitted bnGammaSgd, fed the BN-output cotangent c and the saved conv output v, denotes γ − lr·(certified ∂(per-channel BN)/∂γ · c) — via reassocFwd into the oc·m cert layout.

theorem Proofs.SgdNode.bnBeta_den {oc h w : ℕ} (bN lrStr cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) (lr : ℝ) (idx : Fin oc) :
StableHLO.den (StableHLO.SHlo.bnBetaSgd bN lrStr β lr (StableHLO.SHlo.operand cotN c)) idx = β idx - lr * ∑ j : Fin (oc * (h * w)), pdiv (fun (β' : Vec oc) => bnPerChannelFlat oc (h * w) ε γ β' (reassocFwd oc h w v)) β idx j * reassocFwd oc h w c j

Per-channel BN β op = certified. Likewise β − lr·(certified ∂BN/∂β · c).

def Proofs.SgdNode.BnSgdPairTied {oc h w : ℕ} (gN vN bN epsStr lrStr cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) (lr : ℝ) :

The emitted bnGammaSgd and bnBetaSgd ops of one per-channel BN layer, fed its BN-output cotangent c at the saved conv output v, are the certified SGD steps on γ and β — the statements of bnGamma_den and bnBeta_den under ∀. The per-example peer of EnetFold.BnSgdPairTiedB.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Proofs.SgdNode.bnSgdPairTied_holds {oc h w : ℕ} {gN vN bN epsStr lrStr cotN : String} {ε : ℝ} {γ β : Vec oc} {v c : Vec (oc * h * w)} {lr : ℝ} :
    BnSgdPairTied gN vN bN epsStr lrStr cotN ε γ β v c lr

    Clause Props for the per-example conv and dense ties: each is a _den lemma's statement (SgdNode.convW_den / convB_den / denseW_den / denseB_den) under ∀, so a tie theorem states one line per parameter tensor and intro unfolds it back; each …_holds proves it with every argument implicit (read off the goal by a step tie's constructor). The batched peers are GradNodeB.ConvWTiedB and EnetFold.ConvWSgdTiedB.

    def Proofs.ConvWSgdTied {ic oc h w kH kW : ℕ} (xN wN lrStr cotN : String) (b : Vec oc) (x : Tensor3 ic h w) (W : Kernel4 oc ic kH kW) (c : Vec (oc * h * w)) (lr : ℝ) :

    The emitted convWeightSgd op, fed the cotangent c at the conv output, is the certified SGD step on the kernel W.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Proofs.ConvBSgdTied {ic oc h w kH kW : ℕ} (bN lrStr cotN : String) (W : Kernel4 oc ic kH kW) (x : Tensor3 ic h w) (b : Vec oc) (c : Vec (oc * h * w)) (lr : ℝ) :

      The emitted convBiasSgd op, fed the cotangent c at the conv output, is the certified SGD step on the bias b.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Proofs.convWSgdTied_holds {ic oc h w kH kW : ℕ} {xN wN lrStr cotN : String} {b : Vec oc} {x : Tensor3 ic h w} {W : Kernel4 oc ic kH kW} {c : Vec (oc * h * w)} {lr : ℝ} :
        ConvWSgdTied xN wN lrStr cotN b x W c lr
        theorem Proofs.convBSgdTied_holds {ic oc h w kH kW : ℕ} {bN lrStr cotN : String} {W : Kernel4 oc ic kH kW} {x : Tensor3 ic h w} {b : Vec oc} {c : Vec (oc * h * w)} {lr : ℝ} :
        ConvBSgdTied bN lrStr cotN W x b c lr
        def Proofs.DenseWSgdTied {m n : ℕ} (aN wN lrStr cotN : String) (a : Vec m) (W : Mat m n) (b c : Vec n) (lr : ℝ) :

        The emitted weightSgd op, fed the activation a and the cotangent c at the dense output, is the certified SGD step on the weight W (SgdNode.denseW_den under ∀).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Proofs.DenseBSgdTied {m n : ℕ} (bN lrStr cotN : String) (W : Mat m n) (a : Vec m) (b c : Vec n) (lr : ℝ) :

          The emitted biasSgd op, fed the cotangent c at the dense output, is the certified SGD step on the bias b (SgdNode.denseB_den under ∀).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Proofs.denseWSgdTied_holds {m n : ℕ} {aN wN lrStr cotN : String} {a : Vec m} {W : Mat m n} {b c : Vec n} {lr : ℝ} :
            DenseWSgdTied aN wN lrStr cotN a W b c lr
            theorem Proofs.denseBSgdTied_holds {m n : ℕ} {bN lrStr cotN : String} {W : Mat m n} {a : Vec m} {b c : Vec n} {lr : ℝ} :
            DenseBSgdTied bN lrStr cotN W a b c lr
            theorem Proofs.SgdNode.mnv2_render_depthwiseW_flat_certified {c h w kH kW : ℕ} (b : Vec c) (x : Tensor3 c h w) (W : DepthwiseKernel c kH kW) (cot : Vec (c * h * w)) (lr : ℝ) (idx : Fin (c * kH * kW)) :
            Tensor3.flatten W idx - lr * ((depthwiseWeightGradHasVJP3 b x).backward W (Tensor3.unflatten cot)).flatten idx = Tensor3.flatten W idx - lr * ∑ j : Fin (c * h * w), pdiv (fun (v' : Vec (c * kH * kW)) => (depthwiseConv2d (Tensor3.unflatten v') b x).flatten) (Tensor3.flatten W) idx j * cot j

            Flat stride-1 depthwise weight render bridge. The emitted op's flat weight grad flatten W − lr·flatten((dwconv_weight_grad₃ b x).backward W (unflatten c)) equals the flat pdiv-Jacobian form. Via HasVJP3.toHasVJP.correct (the triple→flat reindex), modulo unflatten (flatten W) = W. The stride-1 depthwise peer of conv_weight_sgd_certified.

            theorem Proofs.SgdNode.depthwiseW_den {c h w kH kW : ℕ} (xN wN lrStr cotN : String) (b : Vec c) (x : Tensor3 c h w) (W : DepthwiseKernel c kH kW) (cot : Vec (c * h * w)) (lr : ℝ) (idx : Fin (c * kH * kW)) :
            StableHLO.den (StableHLO.SHlo.depthwiseWeightSgd xN wN lrStr b x W lr (StableHLO.SHlo.operand cotN cot)) idx = Tensor3.flatten W idx - lr * ∑ j : Fin (c * h * w), pdiv (fun (v' : Vec (c * kH * kW)) => (depthwiseConv2d (Tensor3.unflatten v') b x).flatten) (Tensor3.flatten W) idx j * cot j

            Stride-1 depthwise weight op = certified. The depthwiseWeightSgd op denotes flatten W − lr·(certified ∂(depthwiseConv2d)/∂W · c) (flat pdiv form). The stride-1 depthwise peer of SgdNode.convW_den.

            theorem Proofs.SgdNode.depthwiseB_den {c h w kH kW : ℕ} (bN lrStr cotN : String) (W : DepthwiseKernel c kH kW) (x : Tensor3 c h w) (b : Vec c) (cot : Vec (c * h * w)) (lr : ℝ) (o : Fin c) :
            StableHLO.den (StableHLO.SHlo.depthwiseBiasSgd bN lrStr W x b lr (StableHLO.SHlo.operand cotN cot)) o = b o - lr * ∑ j : Fin (c * h * w), pdiv (fun (b' : Vec c) => (depthwiseConv2d W b' x).flatten) b o j * cot j

            Stride-1 depthwise bias op = certified. Delegates to depthwise_bias_sgd_certified.

            theorem Proofs.SgdNode.convStridedW_den {ic oc h w kH kW : ℕ} (xN wN lrStr cotN : String) (b : Vec oc) (x : Vec (ic * (2 * h) * (2 * w))) (W : Kernel4 oc ic kH kW) (c : Vec (oc * h * w)) (lr : ℝ) (idx : Fin (oc * ic * kH * kW)) :
            StableHLO.den (StableHLO.SHlo.convStridedWeightSgd xN wN lrStr b x W lr (StableHLO.SHlo.operand cotN c)) idx = W.flatten idx - lr * ∑ j : Fin (oc * h * w), pdiv (fun (v' : Vec (oc * ic * kH * kW)) => flatConvStride2 (Kernel4.unflatten v') b x) W.flatten idx j * c j

            Any emitted STRIDED conv weight op = certified. Generic in the conv dims, the kernel size (covers the 7×7 stem AND every 3×3 downsample/projection) and the cotangent c: the convStridedWeightSgd op denotes flatten W − lr·(certified ∂(flatConvStride2)/∂W · c), the emitted op's den reduced (rfl) to the LHS of the generic strided weight bridge. The strided peer of SgdNode.convW_den.

            theorem Proofs.SgdNode.convStridedB_den {ic oc h w kH kW : ℕ} (bN lrStr cotN : String) (W : Kernel4 oc ic kH kW) (x : Vec (ic * (2 * h) * (2 * w))) (b : Vec oc) (c : Vec (oc * h * w)) (lr : ℝ) (o : Fin oc) :
            StableHLO.den (StableHLO.SHlo.convStridedBiasSgd bN lrStr W x b lr (StableHLO.SHlo.operand cotN c)) o = b o - lr * ∑ j : Fin (oc * h * w), pdiv (fun (b' : Vec oc) => flatConvStride2 W b' x) b o j * c j

            Any emitted STRIDED conv bias op = certified. The bias peer of convStridedW_den; the convStridedBiasSgd op (which emits the same reduce text as convBiasSgd) denotes b − lr·(certified ∂(flatConvStride2)/∂b · c).

            The vector-LN γ / β nodes (every LN of ViT, and the LN-style norms of ConvNeXt's per-example tier). The β node is the per-token bias op rowDenseBiasSgd read against the LN forward: the LN β gradient is the same Σ_tokens dy reduce as a dense bias.

            theorem Proofs.SgdNode.veclnGammaSgd_den {N D : ℕ} (gN xN epsStr lrStr cotN : String) (ε : ℝ) (βv : Vec D) (x : Vec (N * D)) (γ : Vec D) (dy : Vec (N * D)) (lr : ℝ) (k : Fin D) :
            StableHLO.den (StableHLO.SHlo.veclnGammaSgd gN xN epsStr lrStr ε x γ lr (StableHLO.SHlo.operand cotN dy)) k = γ k - lr * ∑ o : Fin (N * D), pdiv (fun (gv : Vec D) => Mat.flatten fun (r : Fin N) => layerNormVec D ε gv βv (Mat.unflatten x r)) γ k o * dy o

            Vector-LN γ op denotes the certified step. den(veclnGammaSgd) = γ − lr·(Σ_tokens dy·x̂), the certified ∂(rowwise vector-LN)/∂γ contraction. Covers all 25 LN-γ sites (LN1/LN2 × 12 + final). One-line delegation to layerNormVec_gamma_sgd_certified (the den's sum IS vecLNGradGamma).

            theorem Proofs.SgdNode.rowDenseBiasSgd_den_lnbeta {N D : ℕ} (bN lrStr cotN : String) (ε : ℝ) (γv : Vec D) (X : Mat N D) (β : Vec D) (dy : Vec (N * D)) (lr : ℝ) (i : Fin D) :
            StableHLO.den (StableHLO.SHlo.rowDenseBiasSgd bN lrStr β lr (StableHLO.SHlo.operand cotN dy)) i = β i - lr * ∑ o : Fin (N * D), pdiv (fun (bv : Vec D) => Mat.flatten fun (r : Fin N) => layerNormVec D ε γv bv (X r)) β i o * dy o

            The SAME per-token bias op, certified against the vector-LN β forward. The LN β grad is Σ_tokens dy — identical reduce to the dense bias — so rowDenseBiasSgd ALSO denotes the certified ∂(rowwise vector-LN)/∂β contraction. Covers all 25 LN-β sites. Delegation to layerNormVec_beta_sgd_certified.

            def Proofs.SgdNode.VecLNGammaSgdTied (N : ℕ) {D : ℕ} (gN xN epsStr lrStr cotN : String) (ε : ℝ) (βv : Vec D) (x : Vec (N * D)) (γ : Vec D) (dy : Vec (N * D)) (lr : ℝ) :

            A vector-LN γ SGD node, tied (veclnGammaSgd_den).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def Proofs.SgdNode.VecLNBetaSgdTied (N : ℕ) {D : ℕ} (bN lrStr cotN : String) (ε : ℝ) (γv : Vec D) (x : Vec (N * D)) (β : Vec D) (dy : Vec (N * D)) (lr : ℝ) :

              A vector-LN β SGD node, tied (rowDenseBiasSgd_den_lnbeta).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Proofs.SgdNode.vecLNGammaSgdTied_holds {N D : ℕ} {gN xN epsStr lrStr cotN : String} {ε : ℝ} {βv : Vec D} {x : Vec (N * D)} {γ : Vec D} {dy : Vec (N * D)} {lr : ℝ} :
                VecLNGammaSgdTied N gN xN epsStr lrStr cotN ε βv x γ dy lr
                theorem Proofs.SgdNode.vecLNBetaSgdTied_holds {N D : ℕ} {bN lrStr cotN : String} {ε : ℝ} {γv : Vec D} {x : Vec (N * D)} {β : Vec D} {dy : Vec (N * D)} {lr : ℝ} :
                VecLNBetaSgdTied N bN lrStr cotN ε γv x β dy lr

                The per-example UN-FUSED gradient nodes #

                A renderer with a separate optimizer (cifar8BnTrainStepText at opt := some _, the packed cifar8w{,_bn}_* arms) emits *Grad ops where the SGD renders emit *Sgd: the same arm with θ − lr· stripped. Each lemma here says one such op, at an arbitrary cotangent, denotes the certified per-layer Jacobian contraction; the optimizer that consumes it is outside these lemmas. The batched peers are GradNodesB.

                theorem Proofs.GradNode.denseWGrad_den {m n : ℕ} (aN cotN : String) (a : Vec m) (W : Mat m n) (b c : Vec n) (i : Fin m) (j : Fin n) :

                The emitted dense weight gradient = certified.

                theorem Proofs.GradNode.denseBGrad_den {m n : ℕ} (cotN : String) (W : Mat m n) (a : Vec m) (b c : Vec n) (i : Fin n) :
                StableHLO.den (StableHLO.SHlo.operand cotN c).biasGrad i = ∑ j : Fin n, pdiv (fun (b' : Vec n) => dense W b' a) b i j * c j

                The emitted dense bias gradient = certified.

                theorem Proofs.GradNode.convWGrad_den {ic oc h w kH kW : ℕ} (xN cotN : String) (b : Vec oc) (x : Tensor3 ic h w) (W : Kernel4 oc ic kH kW) (c : Vec (oc * h * w)) (idx : Fin (oc * ic * kH * kW)) :
                StableHLO.den (StableHLO.SHlo.convWeightGrad xN b x W (StableHLO.SHlo.operand cotN c)) idx = ∑ j : Fin (oc * h * w), pdiv (fun (v' : Vec (oc * ic * kH * kW)) => (conv2d (Kernel4.unflatten v') b x).flatten) W.flatten idx j * c j

                The emitted conv weight gradient = certified.

                theorem Proofs.GradNode.convBGrad_den {ic oc h w kH kW : ℕ} (cotN : String) (W : Kernel4 oc ic kH kW) (x : Tensor3 ic h w) (b : Vec oc) (c : Vec (oc * h * w)) (o : Fin oc) :
                StableHLO.den (StableHLO.SHlo.convBiasGrad W x b (StableHLO.SHlo.operand cotN c)) o = ∑ j : Fin (oc * h * w), pdiv (fun (b' : Vec oc) => (conv2d W b' x).flatten) b o j * c j

                The emitted conv bias gradient = certified.

                theorem Proofs.GradNode.bnGammaGrad_den {oc h w : ℕ} (vN epsStr cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) (idx : Fin oc) :
                StableHLO.den (StableHLO.SHlo.bnGammaGrad vN epsStr ε v (StableHLO.SHlo.operand cotN c)) idx = ∑ j : Fin (oc * (h * w)), pdiv (fun (γ' : Vec oc) => bnPerChannelFlat oc (h * w) ε γ' β (reassocFwd oc h w v)) γ idx j * reassocFwd oc h w c j

                The emitted per-channel BN γ gradient = certified, fed the BN-output cotangent c at the saved conv output v.

                theorem Proofs.GradNode.bnBetaGrad_den {oc h w : ℕ} (cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) (idx : Fin oc) :
                StableHLO.den (StableHLO.SHlo.operand cotN c).bnBetaGrad idx = ∑ j : Fin (oc * (h * w)), pdiv (fun (β' : Vec oc) => bnPerChannelFlat oc (h * w) ε γ β' (reassocFwd oc h w v)) β idx j * reassocFwd oc h w c j

                The emitted per-channel BN β gradient = certified.

                def Proofs.GradNode.ConvWGradTied {ic oc h w kH kW : ℕ} (xN cotN : String) (b : Vec oc) (x : Tensor3 ic h w) (W : Kernel4 oc ic kH kW) (c : Vec (oc * h * w)) :

                The conv weight-gradient node as a tie clause (convWGrad_den under ∀).

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Proofs.GradNode.ConvBGradTied {ic oc h w kH kW : ℕ} (cotN : String) (W : Kernel4 oc ic kH kW) (x : Tensor3 ic h w) (b : Vec oc) (c : Vec (oc * h * w)) :

                  The conv bias-gradient node as a tie clause.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Proofs.GradNode.BnGradPairTied {oc h w : ℕ} (vN epsStr cotN : String) (ε : ℝ) (γ β : Vec oc) (v c : Vec (oc * h * w)) :

                    One per-channel BN layer's γ and β gradient nodes as one tie clause.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Proofs.GradNode.DenseWGradTied {m n : ℕ} (aN cotN : String) (a : Vec m) (W : Mat m n) (b c : Vec n) :

                      The dense weight-gradient node as a tie clause.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Proofs.GradNode.DenseBGradTied {m n : ℕ} (cotN : String) (W : Mat m n) (a : Vec m) (b c : Vec n) :

                        The dense bias-gradient node as a tie clause.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Proofs.GradNode.convWGradTied_holds {ic oc h w kH kW : ℕ} {xN cotN : String} {b : Vec oc} {x : Tensor3 ic h w} {W : Kernel4 oc ic kH kW} {c : Vec (oc * h * w)} :
                          ConvWGradTied xN cotN b x W c
                          theorem Proofs.GradNode.convBGradTied_holds {ic oc h w kH kW : ℕ} {cotN : String} {W : Kernel4 oc ic kH kW} {x : Tensor3 ic h w} {b : Vec oc} {c : Vec (oc * h * w)} :
                          ConvBGradTied cotN W x b c
                          theorem Proofs.GradNode.bnGradPairTied_holds {oc h w : ℕ} {vN epsStr cotN : String} {ε : ℝ} {γ β : Vec oc} {v c : Vec (oc * h * w)} :
                          BnGradPairTied vN epsStr cotN ε γ β v c
                          theorem Proofs.GradNode.denseWGradTied_holds {m n : ℕ} {aN cotN : String} {a : Vec m} {W : Mat m n} {b c : Vec n} :
                          DenseWGradTied aN cotN a W b c
                          theorem Proofs.GradNode.denseBGradTied_holds {m n : ℕ} {cotN : String} {W : Mat m n} {a : Vec m} {b c : Vec n} :
                          DenseBGradTied cotN W a b c