I learned about De Morgan’s laws back in logic class.
There’s two of them, and they’re very straightforward. All they say is that for any A and B, this is true:
1 2 

Or in logical representation:
1 2 

I’ve found them pretty useful in programming.
Granted, they are fairly trivial and no more than you could figure out yourself with some thinking.
But having a name for these transformations means that you’re more likely to recognize when they can be applied, and quicker and more confident about applying them. No need to ponder the truth tables – De Morgan already did.
So if you see this:
1 2 3 

You know straight off that this is equivalent:
1 2 3 

And if you see this:
1 2 3 

You won’t hesitate to change it to:
1 2 3 

I’m very curious to hear about other transformation rules of logic or mathematics or similar that you’ve found generally useful in programming, and that might not be widely known.