This isn’t really a Haskell question, but I’m hoping a fellow Haskeller might have some helpful pointers.

 

Has anyone seen a generalization of the chain rule for derivatives that applies to applications of the S combinator?  The conventional chain rule applies to the more restricted composition combinator:

 

  D (f . g) = (D f . g) * D g

 

Where D is the differentiation higher-order function, “*” is multiply lifted pointwise to functions (\ a b x -> a x * b x), and “.” is function composition.

 

Thanks,

 

    - Conal