An example of this is De Morgan’s Law, for boolean manipulation.
!x && !y === !(x || y)
I’d actually kind of worked it out in my head just by experience and sitting down and pumping a logic matrix through some functions. It was a joy when I discovered that it is an actual law. It’s also fun to pull out in code reviews of junior devs and simplify their logic - they think I’m some kind of wizard.
Just keep at it, you’ll accumulate little things like this.