I did a quick search to see if this has been asked but couldn't find anything.
So, my question is what happens if you use a move to boost your defence, and the use Power Trick.
In particular, I was thinking of Claydol, which gets Power Trick and Cosmic Power (although I'm sure there are other examples). So you use Cosmic Power to boost your Defence, and then use Power Trick to switch your Defence with your Attack. Do those Defence stat boosts carry over to your Attack, or are the re-applied to the changed Defence value?