This is a question of law, not math - the property doesn't have to be commutative or even consistent.
Licenses apply across certain kinds of linking and not others because that's what was in the document you agreed to when you installed the copyleft code. In order to run the code, you have to accept the terms of the contract. Those terms can require almost anything the author wants. In this case, the terms specify propagation over dlopen and not over a socket or pipe. They could just as easily specify the opposite! It would be less sensible, but perfectly possible.
> Licenses apply across certain kinds of linking and not others because that's what was in the document you agreed to when you installed the copyleft code.
The GPLv2 (for clarity: GPLv3 is more verbose but communicates the same idea) says:
> 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
> a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
> b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
> c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
Where does this license talk about linking? Why should the GPL apply to my program that calls libreadline when I'm distributing the two separately and combining them at runtime? And more importantly, why does a combination involving dlopen() summon the copyright demons but socket() not? The distinction makes no sense.
I'd like to see actual case law showing that if I dlopen() libreadline from a proprietary program, dlsym() a function, and call it, then I've violated copyright law. Show me one example of the legal system adopting this interpretation.
Because if you don't agree to the GPL's interpretation of it, then you haven't agreed to the license for the library and you don't have permission to distribute it?
(edited)
I think this is the magic legal judo of the (L)GPL that makes it work. Regardless of your feelings about the license, it's extraordinarily clever!
Note that if the license said you had to, for instance, share x% of your revenue with the licensor, that's not part of copyright law either, but it's still probably a legal license.
Neither the GPLv2 nor the GPLv3 define what constitutes a derivative work or make any claims about linking in the normative parts of the license.
Let's assume that tomorrow some courts were to find that two separate works can link to each other without being considered derived works of one another, and without the whole being considered a derived work of either part. Nothing in the text of the GPLv2/3 would then prevent you from writing a program which links to GCC, and distributing it under a fully proprietary license (as long as you distribute the sources of the version of GCC you're using, of course).
There is one tiny reference to linking in the non-normative parts of the GPL, the "How To Apply These Terms To Your New Programs" section after the explicit "END OF TERMS AND CONDITIONS":
> If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library [emp. mine]. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
This may suggest that the writers of the GPL believe this would not be allowed under copyright law, but being outside the normative area of the license, seems unlikely to be an impediment in court.
Licenses apply across certain kinds of linking and not others because that's what was in the document you agreed to when you installed the copyleft code. In order to run the code, you have to accept the terms of the contract. Those terms can require almost anything the author wants. In this case, the terms specify propagation over dlopen and not over a socket or pipe. They could just as easily specify the opposite! It would be less sensible, but perfectly possible.