Question: Fixing a simple Proc that seems to have problems with indexing, nops or Vectors

I am working on a simple program (4 lines excluding header/footer and debug command) that calculates a Lie-derivatives of a function G, supplied by the user, with the rule:
 

derivative of x[i]=F[i]  (an input supplied by the user),
derivative of y[i]=y[i+1].


this calculation revolves around a dot product, and I can't seem to work out what has gone wrong. My impression is that is because nops of a Vector gives you  1 more than the length of the Vector, so the Vector handed to DotProduct is wrong- but i can't see why it doesn't work in the case of G2 and F2 but does for G and F.

lieDer2_problems_mwe.mw

Please Wait...