# How to substitute an array in a given expression in Maple?

Given e.g.

  f := a[1]*a[2]+a[1]*a[3]+a[2]*a[3]


Now we want to substitute a[i]->i, I tried

   applyrule(a[i] = i, f)
applyrule(a =[seq(i, i = 1 .. nops(a))], f)


and replace "applyrule" above with "subs" and "algsubs" commands. But none works.

Any idea?

-