And the history of mathematical research was that it existed almost solely in universities. This isn't the case anymore with recent moves from companies buying up ML talent. Also, the fact that corporations apparently have to drive innovation in these areas with deep investments is exactly the purpose of patent protection.
We can also see the history of patents on other things like processors and the like, which have not stifled innovation in these fields to an obvious degree--we still have core i7 processors and ipads. It's not clear that past history is on your side.
There's only one company that manufactures anything like an i7. While I suspect that's mainly because making high end CPUs is really hard, I don't know how confident we can be that CPU patents haven't stifled innovation.
I will easily accept that patents do stifle innovation to an extent. My point was that the stifling is not so obvious as to warrant a complete rethinking of patents in these cases. If we allow that patents on hardware have a place in the world, then patents on software directly follows from this. Software is not special in this regard (the "math" argument is tiring).
What is not clear is that a patent free environment would be preferable either, as the inner workings of modern processor tech might be kept trade secrets or worse, no one bothers to develop this technology at all. It is decidedly not obvious that software patents are some sort of exception to this rule, and its definitely not because software can be reduced to math (as everything can).
We can also see the history of patents on other things like processors and the like, which have not stifled innovation in these fields to an obvious degree--we still have core i7 processors and ipads. It's not clear that past history is on your side.