type Cell

bendtorch-core@0.1.0.0 · src/autograd/tensor_chain_PROOF.bend:8

import bendtorch-core@0.1.0.0/src/autograd/tensor_chain_PROOF.bend as TensorChainPROOF
import Base
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
import bendtorch-core@0.1.0.0/src/autograd/tensor_chain_LAWS.bend as Laws

8# What the pull side holds for a push-side list of pending slots: each pending
9# slot x, the one with k older slots, is what take gathers for id k from the
10# log into the starting slot w, and the rest of the log serves the older slots.
11# Every witness is erased; only the equations are evidence.
12type Cell<-x: Gradient.Slot, -rest: List<&1, Gradient.Slot>, -slots: List<&1, Gradient.Slot>, -below: Nat, -log: Laws.Log()> is Data:
13  Cell{-w: Gradient.Slot, -older: List<&1, Gradient.Slot>, -left: Laws.Log(),
14    at: {slots == w <> older : List<&1, Gradient.Slot>},
15    took: {Laws.take(log, below, w) == (Done{x}, left) : Laws.Taken()},
16    tail: Pulls(rest, older, below, left)}

Uses (9)

Used by (7)