Difficulty in understanding a program for binary operations on differential objects

36 Views Asked by At

I'm currently reading the book Software Design for Flexibility, by Hanson and Sussman.

Section 3.3 of that book is about implementing automatic differentiation in the language Scheme by defining an algebra on what the authors call differential objects.

The differential objects are (per my understanding) power series of infinitesimals. No infinitesimal may have an exponent more than one, or to put it another way, the infinitesimals are nilpotent. The infinitesimals are also referred to as factors.

On page 117, the authors provide an implementation for the function diff:binary-proc. This function is for the purpose of applying binary operations on differential objects.

The implementation is based on the familiar relation $$ F(x+dx, y+dy) = F(x, y) +F_xdx + F_ydy$$

(define (diff:binary-proc f d0f d1f)
  (define (bop x y)
    (let ((factor (maximal-factor x y)))
      (let ((dx (infinitesimal-part x factor))
            (dy (infinitesimal-part y factor))
            (xe (finite-part x factor))
            (ye (finite-part y factor)))
        (d:+ (f xe ye) 
             (d:+ (d:* dx (d0f xe ye))
                  (d:* (d1f xe ye) dy))))))
   bop)

The infinitesimal part of a differential object with respect to a factor is defined to be all terms of the power series containing that factor, with the remaining terms comprising the finite part.

In the given implementation, the differential objects x and y are decomposed into finite and infinitesimal parts based on a chosen infinitesimal variable factor, and then recombined.

On pages 117, 118, the authors write that

  • factor is chosen by maximal-factor so that both x and y contain it in a term with the largest number of factors

  • We may break the differential object into parts in any way consistent with any one of the maximal factors being primary. It doesn't matter which is chosen because mixed partials of $R^n \rightarrow R$ commute

The argument seems to be that we can decompose and reassemble x, y along any factor provided that it is maximal in x and y. And a factor is said to be maximal in a differential object if it is present in some term with the largest number of factors. (No implementation is given for maximal-factor, however)

I'm unable to understand either of the authors' statement fully. My questions essentially are

  • Why does the factor have to be maximal?

  • Could someone explain, as far as possible, why it doesn't matter which maximal factor we choose, when decomposing and reassembling?

  • What happens if x and y do not have a maximal factor simultaneously, i.e their set of maximal factors are disjoint?

I don't have much experience in abstract algebra and little to none in ring theory. This is also my first question here, so thanks in advance.