law bump_target

bendtorch-core@0.1.0.0 · src/autograd/backward_LAWS.bend:295

import bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend as BackwardLAWS
import Base
import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward

295# A contribution to node target reaches exactly the slot of that node and no
296# other, for any list of slots.
297law bump_target:
298  for +newer: List<&2, Maybe<&2, F32>>
299  for +slot: Maybe<&2, F32>
300  for +rest: List<&2, Maybe<&2, F32>>
301  for +value: F32
302  {Backward.bump(List.append(&2, Maybe<&2, F32>, newer, slot <> rest),
303      List.length(&2, Maybe<&2, F32>, List.append(&2, Maybe<&2, F32>, newer, slot <> rest)), List.length(&2, Maybe<&2, F32>, rest), value) ==
304    List.append(&2, Maybe<&2, F32>, newer, Backward.accumulate(slot, Some{value}) <> rest) : List<&2, Maybe<&2, F32>>}

Uses (11)

Used by (0)

No other definition uses this definition.