I have some trouble to use the triple underscore notation to use definitions with or without a term. Consider the following toy example
f[a___ x]:=1
{f[x],f[2x]}
This returns
{f[x],1}
whereas I would like the $f[x]$ pattern to be matched. I guess it is not recognizing "1" as an empty element. How can I arrange this definition to get {1,1} as an output ?
f[a__ : 1 x] := 1
$\endgroup$