WMA link
SetAttributes
SetAttributes[f, Flat]
Attributes[f]
Multiple attributes can be set at the same time using lists:
SetAttributes[{f, g}, {Flat, Orderless}]
Attributes[g]