Anything you write (even unpublished), "play" (as in music) that is "affixed to a tangible medium" contains an implicit copyright.
That's why I added, unpublished, which can be legally proven. So, it's along those lines. That's correct, though.
Also, you've mentioned other types of protection. patents are permitted and addressed by a few opensource licenses. Apache and CDDL1.1 cover that. MIT, BSD and LGPL2 don't have patent clauses. They say, copyright of a work which makes an idea obvious which would be based off it as it, can't be patented due to that copyright is implicit to all. Apache and CDDL.1.1 go an extra step to discourage patent infringement of their protected software. These all have the same basic protections as a copyright which makes an idea obvious, further can't or isn't supposed to be patented. CDDL.1.1 and Apache 2.0 don't really have additional solid protections over those other licenses, except to discourage and revoke use of anyone who tries to infringe.
There's also a lot of patent trolling, which some may be difficult to believe. For instance, a charity in Florida wasn't allowed to use a printer for their work. Though this sounds bogus, it might be true. Someone claimed copyright of technology which didn't belong to them, and the patent office spends 40 minutes on each patent, and they let stuff like that slip up. In the software world, there's a movement to do away with all software patents. But if something is made obvious from any copyright, it prevents a patent to be made on that. As an example before, this doesn't always work as is intended. Also, the implicit protection of copyright to prevent patents. There's a rule or something like this in copyrights, thus they believe that a BSD license is enough.
AFAIK, trade secrets may not have the same protections as patents and copyrights, but IMO, it's like, hope the competitor doesn't come up with something close enough on their own. Also, to prove someone took that IP. A trade secret may be difficult to prove, bc it relies on being a trade secret, unless you're a major company that someone took a recipe from its safe.
The point is that the license is
independent a separate layer
of than the copyright or patent, and it allows others to use that code while protecting their own software. They're different layers, and the opensource license is permission of terms for use and contributions.
I could copyright and/or patent something, then later on, decide to slap an opensource license [such as CDDL1.1, Apache or MPL] on it which allows use of those patents and copyrights, while protecting my work.