Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an "up" or "down" structure in Scheme?

Very early on in Functional Differential Geometry, Sussman & Wisdom start using an "up structure"... but I haven't the slightest idea what this could be.

(print-expression
  ((compose P2-chi R2-chi-inverse)
  (up ’x0 ’y0)))

I cannot find the description of this structure anywhere in the text, and I cannot find it in a standard version of Scheme or the language documentation... so I'm wondering what exactly these "up structure" and "down structure" things are. I get that they correspond to the derivative and the integral in basic calculus. Just haven't the slightest idea how they're put together in Scheme.

like image 763
1ijk Avatar asked Jan 14 '15 23:01

1ijk


1 Answers

From the scmutils reference manual:1

We identify the Scheme vector data type with mathematical n-dimensional vectors. These are interpreted as up tuples when a distinction between up tuples and down tuples is made. We inherit from Scheme the constructors VECTOR and MAKE-VECTOR, the selectors VECTOR-LENGTH and VECTOR-REF, and zero-based indexing.

And, I think, the mathematical interpretation is: Covariance and contravariance of vectors.


1 (go to Up Tuples and Down Tuples section and scroll down to multiplication explanation, to see what it is all about).

like image 65
usrtt1 Avatar answered Nov 15 '22 08:11

usrtt1