I began this project and soon decided that I needed some automation. I had already decided on Scheme and after an hour of noodling decided to search the web. Google soon led me to this paper:

Functional Differential Geometry

These guys have done most of what I need, and more. I find their implementation awkward. (I don’t like Emacs or fluid-let(?).) I fear that what I come up with will be as awkward in other ways. They assume you are familiar with the book “Structure and Interpretation of Classical Mechanics”. I am not and perhaps a few of these notes would be different if I were.

The meat of the ideas is in Appendix B. I am discouraged at how many arbitrary decisions are necessary. Perhaps some other slant would require fewer; I have nothing in mind. I have nothing against their decisions; they are necessary and many are arbitrary.

I think there are clues here about why calculus and physics are hard to learn. Issues raised by the authors here must be understood and classic approaches badly abuse notation and violently violate referential transparency. The poor reader must deduce what is going on in the sense that he must independently rediscover the ideas behind such inventions as the Lagrangian. Then he can “get the notational joke” and proceed. Reading the equations does not suffice to figure out the necessary ideas. “The joke” is not easy to describe and notations to do so need careful descriptions, in English and that will stop some.

Reverse engineering

(up x t) = (vector x t)
(down 3 5 7) = '(row-type-tag ((3 3 3)))