When using the Distribute function, there is something strange happens.
I started with an example case:
Distribute[f[g[a, b, c], g[a, b, c]], g]
The result looks fine
g[f[a, a], f[a, b], f[a, c], f[b, a], f[b, b], f[b, c], f[c, a],
f[c, b], f[c, c]]
However, when I replace f and g with real functions below:
Distribute[Times[List[a, b, c], List[a, b, c]], List]
The result is totally different:
{{a^2, b^2, c^2}}
But if I use a rule and replace the function in the first case like this:
Distribute[f[g[a, b, c], g[a, b, c]], g] /. {f -> Times, g -> List}
I will get the expected correct result:
{a^2, a b, a c, a b, b^2, b c, a c, b c, c^2}
Please anyone tell me if I have some misunderstanding of Distribute or this is a bug.
Thanks