anchor.diff:          index))))
   
   (defmethod input-gradient ((reduction reduction) (output-gradient lazy-array) index)
  -  (cond ((eql (operator reduction) #'+)
  +  (cond ((member (operator reduction) (list '+ 'petalisp.type-inference:short-float+))
            (α #'* output-gradient (reshape 1 (shape (input reduction)))))
           (t
            (error "~@<Don't know how to compute the gradient of a reduction ~
  -                    of ~R arguments with the operator ~S.~:@>"
  +                    of ~R argument~:P with the operator ~S.~:@>"
                   (length (inputs reduction))
                   (operator reduction)))))
   
  
positive.code:           index))))))
  
  (defun ad-record-output-gradient (ad-record)
    (let ((cached-value (ad-record-output-gradient-cache ad-record)))
      (if (not (null cached-value))
          cached-value
          (let* ((alist (ad-record-alist ad-record))
                 (gradients
                   (loop for (index . record) in alist
                         collect
                         (ad-record-input-gradient record index))))
            (setf (ad-record-output-gradient-cache ad-record)
                  (α #'*
                     (ad-record-lazy-array ad-record)
  
negative.code:                        (make-array (length (inputs lazy-array)) :initial-element nil))))
              (:copier nil)
              (:predicate nil))
    (lazy-array nil :type lazy-array :read-only t)
    ;; An alist with one (argument-index . a-d-record) entry per reference to
    ;; this record's lazy array.
  