At any rate, I like it here; so I'll try to figure out how what I said was flamebait, and try not to say such things again.
Sorry.
[Edited upon re-reading]
You can't copyright an algorithm, but you certainly can copyright the expression of an algorithm in Python. You cannot copyright the words of the English language and their meanings, but Noah Webster absolutely did copyright his dictionary, which was a creative expression of their definitions (and lobbied for the first increase to US copyright law). Webster wasn't the "thought police" for trying to copyright people's understanding of words in English, because he didn't and couldn't copyright them; he copyrighted his expression of what words meant.
If you read the creative expression of an algorithm in Python and then re-express it in English, then sure, copyright protection doesn't extend to that re-expression. But Copilot isn't doing that, it's quite clearly reproducing parts of the original creative expression of an algorithm, not the algorithm itself.
Here's an easy way to demonstrate it: open up a source file in any language other than C and try to get Copilot to spit out an implementation of Quake's fast-inverse-square-root algorithm. You will very quickly discover that Copilot doesn't "know" the algorithm; it only "knows" the specific creative expression of it (comments included).
Yes, a port from language X to Y is widely considered a derived work. Whether it is infringing is a separate question.
In the US, copyright may include the choice of variable names, the organization of the code into modules and functions, and other aspects which where there are the creative choices that may be protected under copyright law.
The relevant process is described at https://en.wikipedia.org/wiki/Abstraction-Filtration-Compari... , which comes from the court case at https://en.wikipedia.org/wiki/Computer_Associates_Internatio.... nearly 30 years ago:
> the court presented a three-step test to determine substantial similarity, abstraction-filtration-comparison. This process is based on other previously established copyright principles of merger, scenes a faire, and the public domain.[1] In this test, the court must first determine the allegedly infringed program's constituent structural parts. Then, the parts are filtered to extract any non-protected elements. Non-protected elements include: elements made for efficiency (i.e. elements with a limited number of ways it can be expressed and thus incidental to the idea), elements dictated by external factors (i.e. standard techniques), and design elements taken from the public domain. Any of these non-protected elements are thrown out and the remaining elements are compared with the allegedly infringing program's elements to determine substantial similarity.
Emphasis mine. This specifically highlights that your example ('only so many ways you can express an algorithm') is not protected under US copyright law.
The originality requirement only applies to other aspects of the generated code, which in this case would include the comments that Copilot generated, and which clearly are not required for the algorithm to work.
For thought police like you describe, look to patent law.
Let's say someone comes up with a new sorting algorithm, which completes in less cycles than was previously believed possible. Sure, it's math, but isn't that a new, creative expression? Don't we want to encourage them to publish their algorithm (one of the key purposes of patents—this way, anyone can use it after 20 years), as opposed to keeping it hidden from the world?
It makes more sense to me than most software patents (admittedly, a low bar to clear). And if the patent office is doing its job (big if), the patents should only be granted for algorithms which are sufficiently novel.
But nowadays I think patent law isn't the right way to do that; trade secrets should be enough. I don't think that what is disclosed to the public in patent applications is of enough value to justify a long monopoly. It's not necessarily a problem with the written law; patents are horrible because of the way courts apply them.
software patents?
Either way, the copyright of source code is separate from that. Copyright is for the text of a program (the source code), that might e.g. implement an algrithm. The algorithm itself cannot be patented or otherwise legally protected.
I've not come across your stipulation that for a thing to count as an algorithm it must provably halt, but I can go along with that. So I'd argue that in most cases, any function or subroutine provably terminates, even if the program embodying it is not supposed to terminate.
I also don't agree that an algorithm is "just maths". At least, not if you then pivot to saying that a browser isn't "just maths". Any operation performed by a computer is "just maths", because what a CPU does is basically arithmetic and branching.
I don't think it's a question of what does and doesn't "deserve" IP protection. The source code of a browser is clearly an original work, and entitled to protection. But the ideas and procedures it embodies are not "works", and copyright isn't supposed to apply to ideas and procedures.
I'm against the very idea of "intellectual property". It must have seemed a good idea at the time, but I think patents and copyrights have become monsters that inhibit, rather than encourage, innovation and creativity.
Algorithms are distinguished by their proofs of correctness. This elevates them above simple procedures. The halting problems tells us that there is no automatic way to determine whether or not a program terminates. So when we find one, it's like discovering a mathematical law. The proof of an algorithm's correctness is expressed independently of any programming language or platform. What else could they be other than math?
Things like browsers, games, operating systems, e-mail clients, music players etc. are not treated this way. They are not formally specified. They are implemented in the context of a machine and an actual running environment. The source code of the program usually doubles as its specification. It's very different compared to an algorithm.
I agree IP as a concept is bad, but this is the way of the world at least for now. Given where we are, for me it makes sense to draw a line between algorithms and software in the context of copyright.
Can you cite? (Wikipedia's explanation of what an algorithm is doesn't mention that). I'm open to being corrected, but not baldly contradicted.
Wikipedia does mention it though:
In mathematics and computer science, an algorithm is *a finite sequence* of well-defined, computer-implementable instructions, typically to solve a class of specific problems or to perform a computation.
"Finite sequence", meaning it terminates. The wiki citation (The Definitive Glossary of Higher Mathematical Jargon) provides a little more: "A finite series of well-defined, computer-implementable instructions to solve a specific set of computable problems. It takes a finite amount of initial input(s), processes them unambiguously at each operation, before returning its outputs within a finite amount of time." https://mathvault.ca/math-glossary/#algoSo they stipulate finite input and output and finite runtime. This is in contrast to something like a webserver or OS, which has a potentially unbounded number of inputs, and is expected to run effectively forever.
I mean think about it, what does an OS kernel look like in its most distilled form? It's essentially just an entry point to an infinite loop. Same as games, where they're called "event loops" in that domain.
The way I think about it is this: if computers and programming languages and software didn't exist, algorithms still would. I don't think you can say the same about e.q. Quake. Quake isn't a mathematical truth even though it uses them to work, kind of like how engineers use physics to build a bridge, but the bridge itself isn't physics.
I don't see anything in the WP article about proofs of correctness. "Finite sequence" surely just means that the number of instructions isn't infinite? Come to think of it, that wording seems rather hand-wavey; I wonder if I can find citations to help me improve it.
Well how are you going to show that the algorithm terminates for all inputs without a proof of correctness?