On Tuesday, the United States Court of Appeals for the Federal Circuit rejected a patent on a method of detecting credit card fraud. The result was unsurprising, but the court broke new ground with its reasoning. Citing the Supreme Court's famous rulings against software patents from the 1970s, the court ruled that you can't patent mental processes—even if they are carried out by a computer program.

Of course, all computer programs implement mathematical algorithms that could, in principle, be implemented with a pencil and paper. So is this the end of software patents? Unfortunately not. The court ruled that the no-patenting-math rule doesn't apply if the math in question complicated enough that "as a practical matter, the use of a computer is required" to perform the calculations.

In order to justify this result, the court gives the most thorough defense of software patents that we've ever seen from the judiciary. We don't think the line they draw—between ordinary math and math that requires a computer—makes much sense from either a legal or policy perspective. But the ruling at least signals that, for the first time in over a decade, the courts are thinking hard about how to apply the Supreme Court's old software patent cases in the modern world. We're hopeful that as the confusion in this week's decision becomes more obvious, we'll see further progress.

You can't patent math...

The patent at issue was comically broad. Titled "method and system for detecting fraud in a credit card transaction," it claimed the concept of detecting fraud by keeping track of credit card transactions originating from a particular IP address. The claims weren't limited to any specific fraud-detection algorithm; anyone who tried to detect fraud by tracking past transactions would infringe the patent.

It's no surprise that the court invalidated this patent, but the grounds on which it did so were interesting. It ruled that all of the steps described in the patent could be performed by a human being with a pencil and paper. This made it a claim on a "mental process," which the Supreme Court has said is not eligible for patent protection.

The patent employed a common tactic for evading the rule against software patents: instead of claiming the algorithm itself, it claimed a "computer readable medium containing program instructions" for performing the algorithm. Patent attorneys have been using this gimmick successfully for more than 15 years, but the Federal Circuit has become a skeptic of the technique. It ruled that the patent was for "a method for detecting credit card fraud, not a manufacture for storing computer-readable information."

So you can't patent calculations that could be done with a pencil and paper. And such calculations remain unpatentable even if the steps are encoded in a machine-readable format. But this leads to an obvious question: why is software patentable at all? All software consists of sequences of calculations that could, in principle, be done with a pencil and paper.

The Federal Circuit anticipates this line of argument and gives the most thorough response we've seen from the judiciary.

...unless it's complicated

The Federal Circuit decision that opened the software patent floodgates was In Re Alappat, which was decided in 1994. In that case, the Federal Circuit allowed a patent on the use of anti-aliasing to improve the display of a digital oscilloscope. It ruled that "a general purpose computer in effect becomes a special purpose computer"—and therefore is eligible for patent protection—once it's loaded with a specific computer program.

The Federal Circuit insists it hasn't changed this rule. "We have never suggested that simply reciting the use of a computer to execute an algorithm that can be performed entirely in the human mind falls within the Alappat rule." This implies that a human being couldn't perform the anti-aliasing techniques described in the Alappat patent, but that's simply wrong. The math involved is little more than basic geometry.

Obviously, computing the right color for thousands of pixels using a pencil and paper would be tedious. But of course the same argument could be made about the patent the court rejected this week—detecting fraud by monitoring peoples' transaction histories is another tedious task people typically relegate to computers.

More importantly, exactly the same point applies to both of the software patents the Supreme Court rejected in the 1970s. As the Supreme Court put it in 1972: "The mathematical formula involved here has no substantial practical application except in connection with a digital computer." Theoretically, you could have performed the calculations with a pencil and paper, but no one actually did so. Yet the Supreme Court still held them to be unpatentable mental processes.

The Federal Circuit displays a similar confusion about a more recent case, this one involving an algorithm for digital image half-toning. The court upheld the patent despite the fact that mathematical formulas were "admittedly a significant part" of the patent's claims. In Tuesday's opinion, the court argued that the half-toning patent was different from the fraud-detection patent because the half-toning algorithm "required the manipulation of computer data structures (e.g. the pixels of a digital image and a two-dimensional array known as a mask)."

Of course, a "computer data structure" is just a way of organizing numbers and symbols. When I served as a teacher's assistant (TA) for computer science courses in grad school, I would regularly draw diagrams of data structures on the whiteboard and perform example calculations on them. Similarly, many branches of math involve manipulating "data structures" like ordered pairs and matrices—presumably the Federal Circuit doesn't think you can patent new results in linear algebra because "data structures" are involved.

The fundamental problem here is that the Federal Circuit's pro-software-patent rulings from the 1990s flatly contradicted the Supreme Court's previous rulings, which theoretically should have taken precedence. Until recently, the Federal Circuit resolved this dilemma by simply ignoring the Supreme Court, which didn't touch the issue of patentable subject matter for almost three decades. But with the Supreme Court now taking a renewed interest—it decided one case in 2010 and is due to hear another in the coming term—the Federal Circuit is being more careful to color inside the lines. And it's becoming obvious just how sloppy they'd gotten in the last couple of decades.