BTC
ETH
SOL
BNB
GOLD
XRP
DOGE
ADA
Back to home
Tech

Not all elementary functions can be expressed with exp-minus-log

A Hacker News discussion spotlights a crisp mathematical fact: not every elementary function boils down to compositions of exponentials and logarithms.

A Hacker News discussion spotlights a crisp mathematical fact: not every elementary function boils down to compositions of exponentials and logarithms. This undercuts the notion that exp and log—two workhorses of analysis—span the full palette of elementary transcendentials. The thread, drawing from a 2023 blog post by mathematician William Stein, proves sine cannot be expressed using only real-valued exp, log, +, *, /, and composition.

Elementary functions form the backbone of calculus textbooks: polynomials, rationals, roots, exponentials, logarithms, trigonometric functions (sin, cos, tan), inverse trig, hyperbolic functions, and their inverses. Systems like Mathematica or SymPy treat these as primitives, composing them via arithmetic and inversion. The exp-log subclass restricts to constants, the identity function x, exp, log, field operations (+, *, /), and substitution. No trig allowed.

Why Sine Resists Exp-Log

Stein’s proof hinges on analytic properties. Exp-log functions extend holomorphically to the complex plane with at most logarithmic branch points. Sine, however, is entire—analytic everywhere, no singularities. But that’s not enough; the real kicker is growth rates and zero distributions.

Consider the Taylor series. Exp-log functions produce lacunary series (gaps in powers) or specific radius behaviors under composition. Sine’s series sin(z) = z - z^3/3! + z^5/5! - ... has no such gaps. More rigorously, apply the Denjoy-Carleman theorem on quasi-analytic classes. Exp-log functions belong to a class where nonzero functions cannot vanish on an interval unless identically zero. Sine vanishes infinitely often, but the proof refines this.

A simpler angle: assume sin(x) = f(exp, log)(x) for some real exp-log f. Then sin(ix) = i sinh(x), linking to hyperbolics. But hyperbolics are exp-log—sinh(x) = (e^x – e^{-x})/2. Complexification breaks it: exp-log over reals doesn’t close under i-substitution without introducing imaginaries explicitly, forbidden here. Stein formalizes via field extensions and automorphism groups, showing no embedding exists.

This echoes Liouville’s theorem on elementary integration: not all integrals of elementary functions stay elementary. Here, it’s expression, not integration. Differential Galois theory underpins both, revealing algebraic obstructions in Picard-Vessiot extensions.

Implications for Computation and Beyond

CAS developers know this intimately. Risch’s algorithm integrates exp-log efficiently but stalls on trig. SymPy’s integrate(sin(x)/x, x) returns Si(x), a special function, because exp-log can’t capture it. Implementing full elementary integration demands trig primitives—hundreds of cases in codebases like FriCAS.

In program synthesis and AI, tools like DreamCoder or αTensor hunt for functional programs from primitives. Limiting to exp-log speeds search but misses 20-30% of common math tasks, per benchmarks on execution traces. Neural symbolic methods (e.g., DeepMind’s work) face similar walls; training on exp-log data won’t synthesize sin without hacks like Fourier embeddings.

Crypto ties in subtly. Elliptic curve ops use Weierstrass forms, but advanced schemes (e.g., isogeny-based post-quantum) rely on exp-log for simulation, yet verification needs full elementary support. Secure multiparty computation libraries like MP-SPDZ implement custom exp approximations, but proving equivalence to sin-like functions risks overflow or precision loss—10^{-15} relative error in double precision for naive series.

Finance models Black-Scholes with exp-log (normals via error functions, themselves non-elementary). Volatility smiles demand numerical trig fits. Skeptically, hype around “universal” neural ODEs ignores these limits; they approximate but don’t equate symbolically.

Why care? Symbolic math isn’t toys. It powers theorem provers (Lean, Coq), optimizing compilers (LLVM’s SLP), and automated reasoning in security (e.g., verifying sha256 reductions). Recognizing exp-log boundaries prevents overreach—build with primitives, or accept approximations. The HN thread clocks 200+ comments, mostly devs nodding: math’s foundations bite back in code.

Bottom line: exp and log cover 80% of transcendentials in practice, but sine’s exclusion flags the rest. Next time a library claims “full elementary support,” check the fine print.

April 15, 2026 · 4 min · 4 views · Source: Hacker News

Related