Wed May 15 08:40:04 EDT 2019

Expressing the operations

There's something not quite right, because it is very hard to express
the transformations without a lot of conditions.

I want to split this up:

- Find a way to represent the structure, zoomed in at a particular site

- In this zoomed in state, the transformation itself will be trivial to express

For fuse it is already quite simple: zoom in on two adjacent loops.
For interchange it is simple as well.

It seems that the search is really about representation spaces.  About

Maybe start by consensing some of the constructors.
EDIT: Done: there are just 2 now:
- Program = collection of Form
- Form = branch of LetLoop and LetPrim

I think the insight is that these transformations are not local.  They
all essentially consist of an iteration pattern and a decision rule
that uses non-local information.

Start by splitting fuse into two components:

- an iterator that goes through the list of terms, pairwize, and

- an inner routine that Maybe produces a fused element

So many insights pop up while doing this, but it is so hard to record
or remember them.