This started with Yes, we have no bananas, which shares four notes at the same timing with the famous Hallelujah chorus. Even though no sane person would see the two songs as the same, they were able to convince the court, thus setting the legal precedent. The song actually stole quite a few phrases from different songs, but most of them didn't have any copyright. Here's the lyrics, with every stolen part's lyrics changed to where they were stolen from.
Hallelujah, Bananas
Oh bring back my Bonnie to me
I dreamt that I dwelt in marble halls
the kind that you seldom see
I was seeing Nellie home
to an old fashioned garden, but
Hallelujah, Bananas
Oh bring back my Bonnie to me
Unless the four note sequence is already in the public domain (not that uncommon if it was used in classical music from last century or earlier), supposedly it's Prima facie evidence of infringement. This case was unique in that those four notes were the only thing copied from that song and they successfully got royalties.
TO be fair, they DID steal a large number of snippets to make their novelty song.
So while this isn't a law, it is a legal precedent, set by that case.
This four note rule is why "I Am Man" from ninja gaiden arcade changed the third note note of each riff it ripped off to attempt to be legally different from "Iron Man". (iron man was the entrance theme of the wrestlers their boss was totally ripping off of) And is the foundation for many of what is known as "Suspiciously Similar Songs". Most courts are more sane, and can certain make decisions in the spirit of the copyright law, and say "stop trying to rules lawyer, it's an obvious copy!" And sure enough the virtual console version fo this game removed the offending track.