The following example tries to do the same thing two different ways.
Calling a procedure "M1" directly by name works fine.
Calling the same procedure by substitution fails to substitute, and when the substrituion is forced using "apply" I get an error message.
Why does the substitution not work, and where is the error?
Because of the complexity of my problem, I need to use substitute (or anything else equivalent) instead of directly calling the procedure by name.
> M1:= proc(X1,X2,z);
> f(X1,X2,z); end proc;
M1 := proc(X1, X2, z) f(X1, X2, z) end proc
X1 := [X, Y, Z, W]
X2 := [P, Q, R]
try1 := f([X, Y, Z, W], [P, Q, R], 1)
try2 := M1([X, Y, Z, W], [P, Q, R], 1)
Error, (in apply) invalid input: M1 uses a 2nd argument, X2, which is missing