Live data from Hacker News

Why Mathematica does not simplify sinh(arccosh(x))

johndcook.com

31–40 of 64 posts

Re: Why Mathematica does not simplify sinh(arccosh(x))

#31
Does anyone else think that the latest LLMs - some of which can be used locally for free - combined with proof-verifying software like Coq or Lean for mistake-detection, might make many uses of Computer Algebra Systems like Mathematica obsolete?

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.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#32
post #30
post #27

Earlier quoted context omitted.

How is going from two functions with one variable to three functions with a variable and a constant a simplification?

If you can't recognize how much simpler the simplified version is, I'm not sure exactly what to tell you. But let's think about it in terms of assembly steps: 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^…

If simplify means make it fast for a computer to run we might as well make division illegal.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#33

I've only an A-Level in Further Maths from 1997, but understand complex numbers and have come across complex inverse trig functions before. 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 fu…

Simple rule to keep in mind that even math savvy people seem to forget about is that: sqrt(x²) = |x| with bars for absolute value.

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.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#34

This is a general pattern in CAS. For a more basic case, it’s not obvious sqrt(square(x)) will simplify to x without any further assumptions on x.

I think you would get sqrt(x^2) = x, if x belonged to the natural domain of sqrt, which is a Riemann surface, that may also be defined using the language of "sheaves". I don't know how to connect this to the article or Mathematica.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#35
post #3

More generally it's not at all clear what 'simplify' means. 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.

In this case, a heuristic like "less parameters, less operators and less function calls" covers all the cases.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#37
post #31

Does anyone else think that the latest LLMs - some of which can be used locally for free - combined with proof-verifying software like Coq or Lean for mistake-detection, might make many uses of Computer Algebra Systems like Mathematica obsolete? 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 par…

For me Mathematica is much more akin to numpy+sympy+matplotlib+... with absolutely crazy amount of batteries included in a single coherent package with IDE and fantastic documentation. In a way numpy ecosystem already "won" industry users over, yet Wolfram stack is still appealing to me personally for small experiments.

Coq/Lean target very different use cases.

Re: Why Mathematica does not simplify sinh(arccosh(x))

#38
post #33

I've only an A-Level in Further Maths from 1997, but understand complex numbers and have come across complex inverse trig functions before. 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 fu…

Simple rule to keep in mind that even math savvy people seem to forget about is that: sqrt(x²) = |x| with bars for absolute value. 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.

> Simple rule to keep in mind that even math savvy people seem to forget about is that: sqrt(x²) = |x| with bars for absolute value.

i would disagree with that (pun intended).

Re: Why Mathematica does not simplify sinh(arccosh(x))

#40
post #13

Earlier quoted context omitted.

For x = -i, square(x) = -1, sqrt(square(x)) = i. Meanwhile, abs(x) = 1. You're right that it simplifies to abs(x) for real x, but that no longer holds for arbitrary complex values.

for arbitrary complex values sqrt() gives 2 answers with +- signs so sqrt(square(-i)) = +-i, one of which is x

The sqrt function returns the principle square root, not both. That’s true for all numbers, positive, negative, and complex alike.
Post reply on HN