multiply([],_1,[]). multiply([V0|Rest],V1,[Result|Others]) :- vmul(V0,V1,Result)& multiply(Rest,V1,Others).
tak(X,Y,Z,A) :- X1 is X-1, Y1 is Y-1, Z1 is Z-1, tak(Z1,X,Y,A3)& tak(Y1,Z,X,A2)& tak(X1,Y,Z,A1), tak(A1,A2,A3,A).