TorchLean API

NN.Proofs.Autograd.Runtime.Link.BackwardGraph

Dense Runtime Backward Pass Link #

This file proves that the executable dense backward loop produced by graph-to-tape lowering agrees with the proof-level backpropAllCtx semantics. It is the main bridge between the runtime tape engine and the algebraic reverse-mode model.

The proof is an induction on the graph. The nil case is backwardDenseFrom_addLeaves_empty (the loop is the identity on a leaf-only tape) and the snoc case is backwardDenseFrom_addNode_lowerNode, instantiated with the forward-pass facts about the lowered prefix from Link.Core and Link.Invariants.

Main runtime/link theorem: running the runtime dense backward loop on a tape produced by lowerGraphToTape matches the proved “full backpropagation” backpropAllCtx.

This is the formal statement that the executable engine implements the same reverse-mode accumulation semantics as the proved tape model.