I had a friendly discussion with someone about closed form solutions. They contended that the backpropagation algorithm used in calculating the gradients of deep neural networks can't be called a closed form expression in itself, though it is computing a closed form and can be easily converted to one. I pointed them to the Wikipedia entry on closed forms which says -
"In mathematics, a closed-form expression is a mathematical expression that can be evaluated in a finite number of operations. It may contain constants, variables, certain "well-known" operations (e.g., + − × ÷), and functions (e.g., nth root, exponent, logarithm, trigonometric functions, and inverse hyperbolic functions), but usually no limit."
On the one hand, backpropagation can be completed in a finite number of steps. But the next question becomes, is it a "Mathematical expression".
From the Wikipedia entry, it isn't clear if function composition should be an operation that qualifies.
For me, backpropagation should certainly be qualified as a "closed form solution" but I can't come up with a water-tight argument for why.
Also, other examples came up in the discussion. Let's say I have an algorithm for finding the smallest prime number larger than some integer. This involves checking each number greater than that integer and stopping when I find a prime. This algorithm can be completed in a finite number of steps and calculates the solution exactly. But can we say there is "no Mathematical expression" here and hence no closed form?
EDIT: My question is different from the linked question since it focuses on these two cases in particular. The first one being backpropagation for deep neural networks. This basically involves the following:
In general we get a loss function that looks like - $L = f(g(h(x)))$ and then we take the derivative and get - $L' = f'(g(h(x))g'(h(x))h'(x)$. The argument being that because we calculate $h(x)$ separately and then substitute it, this is not a closed form.
The second example being the algorithm for finding the smallest prime number larger than an integer.