I think the author meant to say, "ArcCosh[-2 + 0.001 I] returns 1.31696 + 3.14102 I but ArcCosh[-2 - 0.001 I] returns 1.31696 - 3.14102 I," because we are talking about defining ArcCosh[] on the branch cut discontinuity, so there is no need to bring Sinh[] into it (and if we do, we find the limits are the same: the imaginary component goes to zero and Sinh[ArcCosh[-2 +/- t*I]] approaches -Sqrt[3] as t goes to zero from above or below). I am not sure what went wrong to get what they wrote.
Edit: Fixed stuff.
so sqrt(square(-i)) = +-i, one of which is x
But consider sqrt(i) = sqrt(exp(i\pi/2)). That's exp(i\pi/4). Your rule would give 1 as the answer. It's not helpful for a serious math system to give that answer to this problem.
When I square 1 I don't get i.
So no, it’s not unconditionally correct either.
It will have simple rules such as constant folding, “replace x - x by zero”, “replace zero times something with the conditions under which ‘something’ has a value”, etc, lots of more complex but still easy to understand rules with conditionals such as “√x² = |x| if x is real”, and some weird logic that decides the order in which to try simplification rules.
There’s an analogy with compilers. In LLVM, most optimization passes are easy to understand, but if you look at the set of default optimization passes, there’s no clear reason for why it looks like it looks, other than “in our tests, that’s what performed best in a reasonable time frame”.
I’m algebraist at heart and training, but I remember beautiful many-layered surfaces of ordinary complex functions in books and on blackboards.
Is x*x simpler than x^2? Probably? Is sqrt(5)^3 simpler than 5^(3/2)? I don't know.
It entirely depends on what you're going to be doing with the expression later.
The default is a balance between leaf count and number of digits. But the documentation page above gives an example of how to nudge the cost function away from specialised functions.
Hyperbolic functions aren't used as much but the same principle applies. Here the core identity is cosh^2(x) = sinh^2(x) = 1 so:
sinh(arccosh(x))
= sqrt(1 + cosh^2(arccosh(x))
= sqrt(1 + x^2)
You should absolutely expect that from "simplify".The first time I looked at the comment above, there was a reply, a reply to that reply, and a reply to the reply to the reply.
Later I came back and this time there were no replies. Since HN won't let you delete a comment that has a reply the only ways a comment chain should be able to go away are (1) the participants delete them in reverse order, or (2) a moderator intervenes.
I came back again and the comments are back!
I wonder if this is related to another comment problem I've seen many times in the past few weeks? I'll be using the "next" or "prev" links on top level comments to move through the comment and will come to a point where that breaks. Next reaches a comment that it will not go past. Coming from below prev will also not go past that point. Examining the links, next and prev are pointing to a nonexistent comment.
1. Multiply the input by itself
2. Add 1
3. Take the square root. There is often a fast square root function available.
The above is a fairly simply sequence of SIMD instructions. You can even do it without SIMD if you want.
Compare this to sinh being (e^x - e^-x) / 2 (you can reduce this to one exponentiation in terms of e^2x but I digress) and arccosh being ln(x + sqrt(s^2 - 1)) and you have an exponentiation, subtraction, division, logarithm, addition, square root and a subtraction. Computers generally implement e^2 and logarithm using numerical method approximations (eg of a Taylor's series expansion).
"Simplify" is a very old term (>50y) in computer algebra. Its meaning has become kind of layered in that time.
My takeaway for other people like me from this is "computer is correct" because the proof shows that we can't define arccosh using a single proof across the entire complex plane (specifically imaginary, including infinity).
The representation of this means we have both complex functions that are defined as having coverage of infinity, and arccosh, that a proof exists in only one direction at a time during evaluation.
This distinction is a quirk in mathematics but means that the equation won't be simplified because although it looks like it can, the underlying proof is "one sided" (-ve or +ve) which means the variables are fundamentally not the same at evaluation time unless 2 approaches to the range definition are combined.
The QED is that this distinction won't be shown in the result's representation, leading to the confusion that it should have been simplified.
For a programmer, it's clear that we have lost the sign information but not the magnitude.
Simple. Makes most sign and solution reasoning explicit instead of implicit when solving quadratics or otherwise working with square roots.
i would disagree with that (pun intended).
This is completely different from the phenomenon described in the article: arccosh discontinuity can’t be dealt the same way. In fact complex analysis prefers to deal with it my making functions path-dependent (multi-valued).
Certainly, people don't need Wolfram Alpha as much.
On another point, it sucks to know what this means for Algebraic Geometry (the computational variant), which you could partly motivate, until now, for its use in constructing CASes.
This is actually subjective. For the vibe coding folks, they don’t care if the code is long winded and verbose. For others, the conciseness is part of the point; see APL and Notation as a Tool of Thought.
Coq/Lean target very different use cases.