The SCOTUS has in the past declared that products of nature, including mathematics, are unpatentable. That's the second definition.
The first definition is actually not a definition, it's implied by the Church-Turing thesis. While widely accepted that isn't (and can't be) proven, but we've never yet found a counterexample.
A short, informal proof:
A Turing machine can perform any computation that could be performed by a Bounded Storage Machine, such as any modern computer.
The set of computations that can be performed by a Turing machine is equivalent to that of the Lambda Calculus.
The Lambda calculus is a form of mathematics.
Therefore, the Lambda calculus can perform any computation that a computer can perform.
Since all software is a series of computations, all software can be transformed into the Lambda Calculus.
Therefore, all software is equivalent to mathematics.