> In our world, you cannot patent theorems but people publish them anyway. Why?
You'll never have enough information to know what theorems went unpublished. You can only speak to the probability based on incentives. Public institutions and Universities may be incentivized to publish theorems, but that same incentive doesn't exist in corporations. A valuable money making theorem that could give competitors and advantage would never be published unless a patent could be formed using the technique that circumvents the limitations by including other processes.
Even with the existing patent system, trade secrets still exist: WD-40, Coca-Cola, Twinkies...etc. When it comes to money, the default is to preserve.
I wouldn't take it for granted that people publish. Many mathematicians work on wall street, and they would never publish something they came up with if it wasnt 10000% certain the theorem isnt a commercial secret. Money wins all, especially in mathematics half of which was invented to make counting money easier.
Owning a truth for a limited period of time in return for telling everyone instead of keeping it a secret is not absurd. Society would rather you tell people so people can build on it (at least in noncommercial ways, or via license) while you own it than keep it secret, so we created the patent system. The alternative could easily be trade secrets until you die and never reveal it, and as a society we decided to incentivize you to not do that
I think what he's referring to is that you have to publish your invention to get it patented. The idea of patents was basically to get a temporary monopoly for publishing the secret sauce so that anyone can use your invention after the protection period is over.
Companies have mostly stopped patenting computer algorithms outside of narrow areas where there are strong interoperability requirements e.g. video codecs. Few algorithm are practically enforceable as patents.
I think you seriously overestimate the incentives to publish. In several computer science domains, and certainly the ones I work in, the academically published algorithms are often a decade or two behind the state-of-the-art that is never published. Valuable algorithm advances are often explicitly treated as trade secrets. As an equally common case, the inventor(s) simply have zero incentive, either personal or financial, to spend their time publishing it -- they did it to solve a problem, not to publish, so they prioritize spending time with their family etc. This disadvantages open source software, and academia spends much of its time reinventing algorithms already known in the industry. In my experience, surprisingly little hardcore algorithm R&D happens in academia, so any model of information dissemination that makes this assumption is going to be suboptimal.
As an example that is unrelated to my current work, I developed a set of novel algorithms that massively improved the efficient parallelization of graph traversals in 2009 -- a true step function in both scalability and throughput per CPU (I was working on supercomputers at the time). Fast forward a decade to 2019 and these algorithms still haven't shown up in academic literature even though people built systems based on them and they are superior to what is currently in the literature. In this case, the algorithms are not even secret. I've also learned some brilliant and as yet unpublished algorithms of unknown origin via these same oral traditions over the years. As a social dynamic, it feels inappropriate to publish an algorithm that you learned this way.
This is a challenging problem to solve. Companies spend serious money on algorithm R&D hoping to obtain a commercial advantage. Outside of that, publishing is often an unattractive use of one's personal time if you are not an academic. This reality disservices the software community at large and I'd like to arrive at a better solution, even though the current reality benefits me greatly as an insider who sees loads of amazing, unpublished computer science.
In our world, you cannot patent theorems but people publish them anyway. Why? for the honor of human spirit, or to impress chicks, whatever.