Topsy-Turvy reverses your opponents stats, not yours. I'm pretty sure this move only works in the same turn. For example, if your opponent used sword dance and raises their attack by +2, topsy-turvy (right after), would lower their attack by -2 instead - below standard. But, the abilities competitive and defiant only work if you attack your opponent. The only way I could see topsy-turvy reversing those abilities are in double/triple battles. Therefore, if you opponent used leer of an opposing defiant Pokemon, it's defense lowers then attack increases. Then - in the same turn - malamar used topsy-turvy lowering it's attack, but raise it's defense.
This ability method would not work with single battles.
Hope I helped! :)