See footnote 1 on Page 22:
In multiple dimensions the derivative Df(x) is a down tuple structure
of the partial derivatives and the increment ∆x is an up tuple
structure, so the indicated product is to be interpreted as a
contraction. (See equation B.8.)
Scanning through the text for the appearance of up
, it appears to be a two-place tuple holding real values. In Scheme two place tuple can be a simple dotted pair using cons
:
(define (up x y)
(if (and (real? x)
(real? y))
(cons x y)
(error "up: argument is not a Real"))))
(define up? cons?)
(define up-x car)
(define up-y cdr)
Some Schemes bake a two place tuple in -- e.g. posn
in Racket's Student Languages. On the other hand, in #lang racket
we would probably use struct
rather than cons
and we would protect the struct
with a contract:
#lang racket
(struct up (x y))
(provide (contract-out
(struct up ((x real?)
(y real?)))))
Disclaimer
My impression from scanning the book is that the up
structure holds two Real number values, but I don't claim to fully understand the maths. So a more complex data type may need to be specified or more extensive validation. Of course, a raw dynamically typed cons
or list
with no type validation is also an option for certain types of program.