All elementary functions from a single operator
Andrzej Odrzywołek
Institute of Theoretical Physics, Jagiellonian University, 30-348 Krakow, Poland
E-mail: andrzej.odrzywolek@uj.edu.pl
April 7, 2026
Faithful reproduction of the main text (20 pages plus references). Equations render via KaTeX; figures live as captions that link to the arXiv source. Citations are preserved as bracketed numbers; the full bibliography is at the bottom of the page. For the definitive version and Supplementary Information, consult the arXiv source.
© 2026 Andrzej Odrzywołek. Reproduced under Creative Commons Attribution 4.0 International (CC BY 4.0). The reproduction below is unmodified in substance; presentation (KaTeX rendering, navigation) is by EMLinteractive and does not imply endorsement by the author.
Abstract
A single two-input gate suffices for all of Boolean logic in digital hardware. No comparable primitive has been known for continuous mathematics: computing elementary functions such as , , , and has always required multiple distinct operations. Here we show that a single binary operator,
together with the constant , generates the standard repertoire of a scientific calculator. This includes constants such as , , and ; arithmetic operations including , and exponentiation; as well as the usual transcendental and algebraic functions. For example, , , and likewise for all other operations. That such an operator exists was not anticipated; I found it by systematic exhaustive search and established constructively that it suffices for the concrete scientific-calculator basis.
In EML (Exp-Minus-Log) form, every such expression becomes a binary tree of identical nodes, yielding a grammar as simple as . This uniform structure also enables gradient-based symbolic regression: using EML trees as trainable circuits with standard optimisers (Adam), I demonstrate the feasibility of exact recovery of closed-form elementary functions from numerical data at shallow tree depths up to 4. The same architecture can fit arbitrary data, but when the generating law is elementary, it may recover the exact formula.
Summary paragraph
Elementary functions such as exponentiation, logarithms and trigonometric functions are the standard vocabulary of STEM education. Each comes with its own rules and a dedicated button on a scientific calculator; our derivations rely on many of them simultaneously, even though we know they are heavily redundant and can be expressed through one another, e.g. , , etc. They are the workhorse of quantitative science, appearing in basic and empirical laws and inside the engines of numerical methods like differential-equation solvers, integration quadratures, and Fourier analysis [1].
In digital electronics, a remarkable fact underlies universality: a single two-input gate, NAND (the Sheffer stroke), suffices to build any Boolean circuit [2]. Continuous mathematics has lacked such a primitive: calculators must expose many distinct buttons. Classical reductions, from logarithm tables [3, 4] and the slide rule through Euler's formula [5] to the exp-log representation [6] with algebraic adjunctions [7], reduced them to a few, but no further. Despite this, it remains unclear whether this apparent diversity is intrinsic, or whether a smaller generative basis exists.
Here we show that the operator , together with the constant , does exactly that: it reconstructs arithmetic, all standard elementary transcendental functions, and constants including integers, fractions, radicals, , , and . In simpler terms, a two-button calculator suffices for everything a full scientific calculator can do.
Existence of the EML operator reveals that elementary functions are members of a much simpler class than previously recognised. Every EML expression is a binary tree of identical nodes, yielding an exceptionally simple grammar: , a context-free language isomorphic to well-studied combinatorial objects like full binary trees and Catalan structures. Elementary formulas become circuits [8] composed of identical elements, much like digital hardware built from NAND gates. This uniform representation provides a complete and regular search space for continuous symbolic regression [9, 10]: parameterised EML trees can be optimised by standard gradient methods, and when the generating law is elementary, trained weights can snap to exact closed-form expressions. In effect, a single trainable architecture gains the potential to discover [11] any elementary formula from data.
The EML operator may be the tip of an iceberg. Preliminary searches have already returned related operators with even stronger properties, including a ternary variant that requires no distinguished constant.
Significance statement
Everyone learns many mathematical operations in school: fractions, roots, logarithms, and trigonometric functions (), each with its own rules and a dedicated button on a scientific calculator. Higher mathematics reveals that many of these are redundant: for example, trigonometric ones reduce to the complex exponential. How far can this reduction go? We show that it goes all the way: a single operation, , replaces every one of them. A calculator with just two buttons, EML and the digit 1, can compute everything a full scientific calculator does. This is not a mere mathematical trick. Because one repeatable element suffices, mathematical expressions become uniform circuits, much like electronics built from identical transistors, opening new ways to encoding, evaluating, and discovering formulas across scientific computing.
1. Introduction
Single, reusable primitives play a disproportionately large aesthetic and practical role in mathematics, engineering, and even biology. Widely known classical examples include the NAND gate (and its dual, Peirce Arrow, logical NOR) for Boolean 0/1 logic [2, 12], the operational amplifier [13] for positive and negative feedback processes, and, more recently, the rectified linear unit (ReLU) "ramp" activation function [14] in deep learning [15]. We also mention Wolfram's single axiom [16], combinators from combinatory logic [17, 18], Interaction Combinators [19], and fuzzy versions of the Sheffer stroke [20]. Other well-known examples are one-instruction set computers (OISC), e.g. SUBLEQ [21], Conway's FRACTRAN [22] and the Rule 110 cellular automaton [16, 23].
Whether the existence of a single sufficient operator or element is conceptually crucial is disputed [24]. Nevertheless, its value for understanding, pedagogy, and public communication is substantial. Indeed, classical first-order logic does not need to single out NAND at all: it works perfectly well with a whole redundant family of connectives (XOR, AND, NOT, …) that we introduce for convenience in applications. But the realisation that all of them are definable from a single primitive is a striking and conceptually deep structural fact. A similar kind of realisation accompanies the recognition of DNA and RNA [25] as a nearly universal information carrier in evolutionary biology.
Sheffer-type elements are rare, and mining them typically requires time, compute, effort, and a bit of luck. They also appear in seemingly distant areas, for example in discrete geometry. The recently discovered solution to the "einstein1 problem" had a major impact on the tiling community [26]. The present author already has one such element in his portfolio, namely an igloo construction brick derived from the (2,3,5) spherical Möbius triangle [27].
Elementary functions, for many students epitomised by the dreaded sine and cosine, play a central role in quantitative reasoning. They can be combined in countably many ways with integers, rational numbers, and mathematical constants such as and , using the four basic arithmetic operations () and exponentiation. Elementary functions are at the core of STEM education and at the foundation of modern technological civilization. This includes not only simple formulas or empirical models, but also most numerical algorithms, for example the ordinary-differential-equation solver RKF45 [28], integration rules (Gaussian, Tanh-Sinh, …) [1, 29], and the Fast Fourier Transform [30], whose twiddle factors are elementary functions. Finite expressions in elementary functions are supported2 in virtually all modern programming languages.
While it is generally known that most standard functions and arithmetic operations are heavily redundant (e.g. , , , , etc.), especially in the complex domain (e.g. , ), they have never been regarded as candidates for a single primitive operator. Historically, two major milestones in understanding elementary arithmetic operations from this point of view are (i) the discovery of logarithms and the subsequent creation of tables [3, 4] followed by the slide rule, and (ii) Euler's formula [5]. Logarithms were introduced to reduce multiplication to addition. The exp-log pair allows them to be expressed in terms of one another:
Euler's formula
shows that, once the imaginary unit is introduced, trigonometric functions can be viewed as another face of and [6]. This perspective leads naturally to what scientists call exp-log functions: finite expressions built from variables, named constants, arithmetic operations, together with and , in the spirit of differential and computer algebra [31, 32]. In the classical differential-algebraic setting, one often works with a broader notion of elementary function, defined relative to a chosen field of constants and allowing algebraic adjunctions [7], i.e., adjoining roots of polynomial equations (cf. Root in the Wolfram Language [33]). That level of generality is not needed here. The present paper takes the ordinary scientific-calculator point of view: start from a concrete list of familiar constants, functions and operations, and ask how far they can be reduced without losing practical functionality. The precise starting list is given later in Table 1.
Many reductions inside that list are, of course, classical and well known; what seems not to have been investigated systematically is the endpoint of the process, namely reduction to a single binary operator paired with a single distinguished constant. In particular, the so-called "broken calculator" problem [34] is a popular formulation of computations with a reduced set of available keys or operations. I used this approach to construct a sequence of increasingly "primitive" yet fully functional calculators with 4, 3, 2, and finally a single operator. This operator is the EML (Exp–Minus–Log),
Using the EML, a surprisingly simple binary operator, we can express any standard real elementary function in terms of repeated applications of (3) to the input variables and a single distinguished constant, 1. This constant is needed to neutralise the logarithmic term in (3) via . Computations must be done in the complex domain; generating constants like and requires evaluating , so internally operates over using the principal branch.
If we do not need external input variables, e.g. for use in an actual pocket calculator, two buttons are sufficient to retain full functionality: one binary operator, EML, and one terminal symbol, 1. No further reduction of operator count is possible, because at least one binary operator and at least one terminal symbol are required. The existence of such a binary operator, which is itself an elementary function, is somewhat unexpected.
In fact, the EML Sheffer operator (3) is as simple as it appears, and in principle the article could end here; its consequences would eventually surface on their own. Nevertheless, it seems worthwhile to explain the methods used in the search for it (Sect. 2), to present the intermediate and final search results (Sect. 3), and to outline potential applications (Sect. 4) that are already visible on the horizon. The article concludes with a short summary, possible follow-up directions, and open questions.
2. Methods
I employed systematic "ablation" testing to identify minimal operator sets for a fixed scientific-calculator starting list. The list, given in Table 1, contains 36 primitives: named constants and input variables, standard unary functions, and binary operations. I iteratively removed one element from this list (constant, function, or binary operation) and verified whether the remaining set could still reconstruct original primitives. The Mathematica / Wolfram core language [33] instruction set (Table 2, 2nd row) served as a reference for an already-optimised and thoroughly tested (for almost 40 years) minimalist system. Research started out of curiosity whether this system could be reduced further.
Table 1, Starting list of constants/variables, unary functions and binary operators used to initiate the reduction procedure.
| Type | Elements | Count |
|---|---|---|
| Constants | 8 | |
| Unary functions | 20 | |
| Binary operations | ; ; | 8 |
| Total | 36 |
This table also fixes the concrete scientific-calculator notion of "elementary function" used throughout the paper: finite expressions built from these named symbols. The , is the natural logarithm, denotes the reciprocal, is a sign flip. The square is denoted and is the logistic sigmoid. Trigonometric and hyperbolic functions with their inverses have their usual meaning. In addition to the four basic arithmetic binary operations we use the arbitrary-base logarithm , exponentiation , the arithmetic mean , and the hypotenuse .
An operator set was deemed complete if it could reconstruct all primitives from Table 1, on the real axis where appropriate. This includes trigonometric functions and their inverses (), hyperbolic functions and their inverses (), algebraic operations (, reciprocal, …), and fundamental constants ().
The challenge of executing such a test is illustrated by the following simple exercise from rational-function generation, attributed to [35]. Given only the three operations: (successor), (predecessor), and (reciprocal/inverse), let us compute negation, i.e., . The non-obvious solution is:
This exemplifies the formulas expected to be encountered in our search: nested expressions with depth 5–9 that defy intuitive construction. There is no regular method to find them automatically, except for (human-assisted) brute-force search, nowadays also enhanced using AI [36].
Direct symbolic verification proved computationally intractable. Typical Kolmogorov-style complexity [37] is usually . In practice it was searched up to . Here denotes the length of a Reverse Polish Notation (RPN) calculator program, equivalent to a formula. To speed up the search I developed a hybrid numeric bootstrapping verification approach, working as follows. We test whether a target operation, e.g. the hypotenuse , can be expressed using a given operator set. Instead of symbolic manipulation on , I substituted for and algebraically independent (not in exp-log class) transcendental constants, such as (Euler–Mascheroni) and (Glaisher–Kinkelin). Then, was evaluated numerically, and compared to all expressions generated from and (3). This method follows from the simple observation that any generally valid formula must also be valid at a single point. Under the Schanuel conjecture [38], coincidental equality between such expressions is vanishingly unlikely, making this a reliable sieve for formula-equivalence candidates. In practice, I compute the double-precision numerical value of the operator sought, and then run constant-recognition software ("inverse symbolic calculator") on this result, which returns a candidate formula in the form of RPN calculator code [39] or as an expression tree, depending on the variant of the method used. The search procedure is heuristic and serves only to exclude evidently false formulas and discover candidate witnesses; independent verification is separate and is given in Supplementary Information (Part II), which provides symbolic checks, numerical cross-validation, and a constructive completeness proof sketch for the Table 1 class.
Search procedure
In detail, the search procedure worked as follows. Rather than searching for all elementary operations (Table 1) directly in pure EML form (which remains computationally infeasible even numerically), I employed iterative bootstrapping:
- Start with two lists:
- the set of constants, functions, and operators to be verified for robustness, e.g. ;
- the set of constants, functions, and operators to be computed, e.g. , cf. Table 1. The list also defines what I mean by "computing all elementary functions".
- Search for an expression computing some element from the list using only primitives from the list .
- If one is found, move it from the list to the list . In the EML example, the first result found is the formula for . After the first step, the lists become , .
- Repeat steps 2–3 until all primitives from the initial list are reconstructed, i.e., until becomes empty: .
The verification procedure, VerifyBaseSet, was implemented using my own Mathematica SymbolicRegression package [39]. A version that is three orders of magnitude faster was recently translated by GPT Codex 5.3 into Rust [39], allowing a re-check of EML in seconds, rather than hours.
The ablation process, i.e., running the above search with some of the elements from Table 1 removed, yielded progressively smaller calculator configurations (named Calc 3, 2, 1, 0 in Table 2), each requiring different primitives, constants in particular. Some configurations could generate required constants from arbitrary input on their own (via operations like , , in Calc 2), while others required specific constants (e.g., Calc 1 requires or ; Wolfram requires , cf. footnote in Table 2). Then the search stalled, and it became evident that the continuous Sheffer operator, if it exists, is not among the familiar named functions. For the final reduction, I began, guided by intuition gathered over many experiments, to enumerate elementary binary functions as candidate single operators, paired with similarly generated constants. Each candidate pair { constant, operator } was tested using the VerifyBaseSet procedure. This, after numerous failures, and a few discarded false positives, revealed that , given by (3), paired with the constant 1, forms a complete basis for reconstructing the elementary functions. Later I realised that EML is not unique, discovering its close cousins: EDL (requiring constant ) and a third variant using as a terminal symbol. Details are the subject of the next section.
3. Results
Table 2 presents the complete reduction sequence, in historical order. Each configuration represents a complete "scientific calculator" capable of computing every expression built from the primitives listed in Table 1. Calc 3 (Table 2, 3rd row) was first to dethrone the Wolfram Language primitives set (Table 2, 2nd row) by retaining negation and reciprocal alongside , , and addition. This system of 6 primitives is able to generate constants on its own via , etc. Calc 2 achieved what Calc 3 does using only , , and subtraction, while still preserving the ability to generate constants on its own. The non-commutative operator (subtraction) proved crucial, as it provides both expression-tree growth and inversion capabilities.
Calc 1 represents a fundamentally different, top-down approach, using binary exponentiation (a rank-3 hyper-operation) and its inverse (binary logarithm) as base operators instead of lower-rank operations such as addition and subtraction. This configuration works with or as the terminal constant. Despite extensive searches, no other constant was found for which Calc 1 works.
Calc 0 absorbs the constant into the function itself, reducing the system to 3 primitives. This configuration strongly suggested that a single binary operator might exist at all, motivating further search.
Table 2, Progressive reduction from the 36-button scientific calculator to the EML Sheffer operator.
| Config | Constants | Unary | Binary | Count-down |
|---|---|---|---|---|
| Base-36 | cf. Table 1 | cf. Table 1 | cf. Table 1 | 36 |
| Wolfram* | 7 | |||
| Calc 3 | none | 6 | ||
| Calc 2 | none | 4 | ||
| Calc 1 | or | none | 4 | |
| Calc 0 | none | 3 | ||
| EML | none | 3 | ||
| ? | none | none | ? | 2 |
| ? | none | ? | 5 |
*The imaginary unit alone is sufficient for the Wolfram set: , , , , . Last two rows are placeholders for speculated undiscovered primitives: a binary operator hypothesised to generate constants from arbitrary input (unlike EML), and a unary operator that retains the good properties of neural-net activations while allowing exact evaluation of elementary functions when combined with standard "matrix" arithmetic.
The final reduction to EML was achieved by recognising a pattern: all minimal configurations involve pairs of inverse functions (including self-inverses) and non-commutative operations. Testing combinations of inverse functions at the input with asymmetric operations at the output yielded the first continuous sufficient operator. A month later I realised that it has at least two additional cousins: EDL and -EML:
The first successful discovery search run (cf. Fig. 1) can be replicated with this 3-line Mathematica code:
Import["SymbolicRegression.m"]
EML[x_, y_] := Exp[x] - Log[y]
VerifyBaseSet[{1}, {}, {EML}]where the package can also be imported directly from the repository [39]. Depending on computer speed, usually in less than an hour, the above procedure re-generates all 36 elementary operations from Table 1. For example, the natural logarithm becomes:
and so on. The resulting EML expressions range from depth 1 (exponential, ) to depth 8 (multiplication), with most basic math functions requiring larger depths (Table 4). A much faster and more thorough test (multiple real transcendentals, both positive and negative, arbitrary-precision check) is provided by a Rust re-implementation of VerifyBaseSet [39], rust_verify.
The exhaustive search served only to discover candidate identities. Their verification is deferred to Supplementary Information, Part II, which contains symbolic simplification of the full discovery chain (Fig. 1) in Wolfram Mathematica [33], independent numerical cross-checks across four implementations (C, NumPy, PyTorch, and mpmath), and a constructive completeness proof sketch.
Bootstrapping "phylogenetic" tree of the elementary functions found from EML, (3), as LUCA (Last Universal Common Ancestor) and 1. A spiral unwinds according to subsequent discovered primitives, and arrows show from which elements each was composed. Those using EML and 1 directly are marked with thick arrows. For the full adjacency matrix and the entire discovery chain, see Supplementary Information, Fig. S1 and Table S2. (See Fig. 1 on arXiv.)
4. Usage and applications
The uniform tree structure of EML expressions suggests several directions for implementation and application.
4.1 EML compiler
The output of the VerifyBaseSet procedure provides the data (see Fig. 1) required to reconstruct any primitive or composite elementary expression in terms of EML Sheffer, (4a). I provide a prototype EML compiler, coded in Python, that converts formulas into pure EML form. An EML expression can be evaluated symbolically in Mathematica, or numerically in any IEEE-754–compliant language. Pure EML form could also be executed on hardware (or an emulated machine) that has only a single instruction: the EML itself. In particular, the EML code can be executed on a single-instruction stack machine, closely resembling a single-button RPN calculator. Pure-EML form could possibly be implemented efficiently in FPGA or analog circuits.
The simplest input-output example is provided by the function. After compilation to EML form, we expect to obtain (5), although the simplest possible form is not expected in general. The equivalent RPN code for is a sequence of instructions
or, denoting , the RPN string 11xE1EE. For the expression tree, see Fig. 2 (on top).
A few comments on the implementation are required. EML-compiled expressions work on the real axis, both positive and negative, except for a few isolated points, especially at zero and domain endpoints. Internal computations, for trigonometric functions in particular, must be done in the complex domain. Because the simplest form of the natural logarithm, (5), obtained from EML, (3), is equivalent to
using the standard choice of principal branch for the complex logarithm, we obtain a jump of for the negative real axis, due to the term. This prevents the use of, e.g., some standard formulas for , relying on , for which we get the wrong sign. A solution working for all real is to redefine the branch for EML itself in such a way that (and everything derived from it, cf. Fig. 1) follows the standard implementation of the principal branch. Another option, used in the EML compiler, is to manually correct the sign.
EML-compiled formulas work flawlessly in symbolic Mathematica and in IEEE-754 floating point, e.g. <math.h> in C. This is because some formulas internally might rely on the following properties of extended reals:
These are properly implemented in Mathematica using symbolic processing, and in floating point using inf and signed zeros. But EML expressions in general do not work "out of the box" in, e.g., pure Python/Julia or numerical Mathematica. In the first case, this is because special floats are trapped and raise errors; however, EML works in NumPy [40] and PyTorch [41]. In Mathematica, we have an automatically extensible range of floats leading to Overflow[]. Interestingly, the Lean 4 proof assistant [42] takes a different approach. Because Lean requires all functions to be total, it assigns the complex logarithm at zero a default "junk value" (Complex.log 0 = 0), causing the straightforward formalisation of the EML chain to fail. As a bottom line I stress that all the above difficulties (edge cases) are not much different from those usually encountered in every kind of floating-point or symbolic computation. The EML compiler is available for testing under EML_toolkit/EmL_compiler in [39]; see also Supplementary Information, Sect. 4, "Software and reproducibility".
4.2 Elementary functions as binary trees and analog circuits
Noteworthy: in EML notation, any elementary-function expression tree is binary. The context-free grammar is trivial: . For functions, input variables are added as additional terminal symbols (e.g. in the univariate case). This has many practical advantages over standard methods.
Some simple examples of tree/circuit representations are shown in Fig. 2. The examples shown are natural logarithm, identity, negation , reciprocal , and multiplication. The ability to compute the identity function using an EML tree of depth 4 allows some input variables to be moved down the tree (see next subsection). Other elementary functions, e.g. trigonometric ones, have trees too large to be shown in print, cf. Table 4.
Examples of binary EML trees equivalent to a few important simplest formulas: , , , , and . Dot marks output; since (3) is non-commutative, arrow chirality determines operation order (first counter-clockwise input after dot is , then ). Try the same trees live in the playground. (See Fig. 2 on arXiv.)
Circuits using the EML operator as a new element (Table 3) might be useful for analog computing [8]. One of the old problems in this field is construction of predefined multivariate elementary functions [43]. Using the EML compiler (Sect. 4.1), we can convert any expression (Fig. 2) to such a circuit, with the topology of a binary tree. The EML tree provides a uniform treatment of generic elementary functions.
Table 3, EML Sheffer as a new kind of basic building block, alongside the NAND gate, operational amplifier, and transistor.
| NAND gate | Op-Amp | Transistor | EML Sheffer |
|---|---|---|---|
| D-shape with bubble output | Triangle with +/− inputs | BJT symbol | Circular node with dot output; counter-clockwise inputs , |
Table 4, Complexity of various functions in EML tree representation. "EML Compiler" column gives the RPN code length for expressions generated from the EML compiler. For the identity function , the compiler returns directly (leaf count 1); the shortest non-trivial EML expression has leaf count 9. "Direct search" shows the shortest expressions found by exhaustive search. Numbers in parentheses show the length of formulas which do not use the extended reals ( in floating point). If the search timed out, the reached lower limit for is given.
| Constant | Compiler | Direct |
|---|---|---|
| 1 | 1 (1) | |
| 7 | 7 (7) | |
| 17 | 15 (17) | |
| 27 | 19 (19) | |
| 43 | 27 (27) | |
| 91 | 29 (35) | |
| 107 | 31 (37) | |
| 143 | 39 (39) | |
| 159 | 45 (47) | |
| 165 | >47 | |
| 131 | >55 | |
| 3 | 3 | |
| 193 | >53 |
| Function | Compiler | Direct |
|---|---|---|
| 1 | 9 | |
| 3 | 3 | |
| 7 | 7 | |
| 57 | 15 | |
| 65 | 15 | |
| 43 | 11 | |
| 27 | 19 | |
| 131 | 27 | |
| 131 | 19 | |
| 139 | 43 ≥? >35 | |
| 75 | 17 |
| Operator | Compiler | Direct |
|---|---|---|
| 83 | 11 (11) | |
| 27 | 19 (19) | |
| 41 | 17 (17) | |
| 105 | 17 (17) | |
| 49 | 25 | |
| 117 | 29 | |
| 287 | >27 | |
| 175 | >27 |
4.3 Symbolic Regression by continuous optimisation
Modern symbolic-regression (SR) methods [9, 10, 44] aim to discover closed-form expressions from data, but they typically search over heterogeneous grammars involving many distinct operators. Knowledge of a single operator, (3), which is sufficient to compute any elementary function, allows us to create a multiparameter "master" formula. Such a master formula, easily constructed in EML form due to the binary expression tree, for some combinations of its parameters, is equivalent to elementary functions. By construction, such a general tree includes all possible formulas up to the given leaf count (tree depth). These trees are big by the standards of a typical mathematical-analysis course, but small compared to what is in use in modern AI. For example, a full binary tree of depth has a total of branches and leaves. For the largest transformers with trillions () of parameters, the equivalent tree would have a depth of 40. The large values in Table 4 reflect the unoptimised prototype EML compiler (Subsect. 4.1); direct exhaustive search yields substantially shorter expressions, as the rightmost column demonstrates.
The master formula can be constructed as follows. For simplicity we present the univariate case; the construction extends to an arbitrary number of input variables. Both inputs to can be: either 1, the input variable , or the result from the previous , which we denote . Let us represent such a general input by a linear combination
Setting specific values, we can recover all three cases:
- , for ;
- , for ;
- , for .
At the lowest tree level (leaves), there are only 1 and , so there are no parameters .
As an example, the full level-2 master formula is
If we set and , we recover . Using and all , we get the constant . Setting , , and , we obtain the double exponential . The total number of parameters for the level-2 master formula is 14. In general, the level- master formula has parameters; see Supplementary Information, Part III.
While one could, in principle, create such a master formula using more usual elementary functions (, etc.), it would be ridiculously complicated and would lack any regular structure. Moreover, in practical SR one typically works with a reduced subset of operations, running the risk that the chosen set is incomplete, i.e., unable to express all elementary functions. The EML master formula is complete by design.
The number of parameters in (6) can be reduced to two using some switch function. Or, alternatively, in a more modern approach, one can treat parameters as logits, and pass them through the softmax function [45] to convert them into probabilities normalised to . In two examples below, I'll use both methods.
The simplest proof of concept is provided by fitting numerical data obtained from an example elementary function, the , using the complete level-3 binary tree with the above structure. Using simplex reparameterisation, the number of free parameters reduces from 34 to 20. I managed to find all weights using plain NMinimize, a "black-box" optimiser from Mathematica [33]. The mean-squared fitting error is at the level of numerical precision, and the resulting formula, after rounding weights to the nearest vertex of the simplex (i.e., snapping each to 0 or 1), is exactly . Not only in the provided data range, but also beyond that. Generalisation/extrapolation is nearly perfect in the above example. See the Wolfram Mathematica notebook Log_fit.nb from the EML toolkit [39] and Supplementary Information (Sect. III.B) for details.
In practice, such a naive one-liner approach does not scale. Therefore, I performed several experiments using more recent techniques of Machine Learning. Simple functions of two variables, taken from composed EML, such as , were used as targets. Python code was created, which used DTYPE = torch.complex128 data type. Main issues encountered during training of the EML net were related to range overflow due to multiply composed exponentials, as well as floating-point errors (NaN) caused by the specific implementation of complex arithmetic. They can be eliminated by clamping arguments and values for , and careful (i.e., without impairing torch automatic differentiation) inspection of both real and imaginary parts. Parameters from (6) were treated as logits. Optimisation was a multi-stage process: first, usual training using a stochastic gradient optimiser (Adam), then a hardening phase pushing weights in (6) towards 0 or 1. Finally, weights were clamped to exact symbolic values.
Systematic experiments (over 1000 runs with varied seeds and initialisation strategies) show that blind recovery from random initialisation succeeds in 100% of runs at depth 2, approximately 25% at depths 3–4, and below 1% at depth 5. At depth 6, no blind recovery was observed in 448 attempts. When successful, the snapped weights yield mean squared errors at the level of machine epsilon squared (), consistent with exact symbolic recovery. Noteworthy, when the weights of the correct EML tree are perturbed by Gaussian noise, the optimisation converges back to the exact values in 100% of runs, even for trees of depth 5 and 6. This demonstrates that the EML tree representation is valid and that the correct basins of attraction exist. Finding them from random initialisation becomes harder with depth. If one manages to improve convergence of EML trees beyond proof of concept, possibly using another binary operator similar to (4) but with better properties (non-exponential asymptotics, no domain issues), then we could achieve symbolic regression of data using gradient-based methods [46]. See Supplementary Information for systematic training experiments, code and details.
5. Conclusions and open questions
The operator EML, (3), provides a single sufficient primitive from which real elementary functions can be constructed and evaluated. Consequently, a wide class of computations built from such functions can also be cast in EML form. It is not unique; several close variants are likely to exhibit similar properties, including EDL, (4b), and the swapped-argument form , (4c). More operators of this kind exist. Perhaps an entire continuous family of them awaits discovery, with properties more convenient than (3). For example, the requirement for one of the constants: to be always present among terminal symbols makes its use less elegant and more complicated (cf. Subsect. 4.3) in comparison with, e.g., standard neural nets or the NAND gate. The latter is able to generate3 0s and 1s out of "anything". The EML operator does not have this useful property.
Whether an EML-type binary Sheffer working without pairing with a distinguished constant exists is an open question. Proving such impossibility for any given candidate is non-trivial: one might expect being constant to suffice, but consider , for which yet . Such traps illustrate why systematic search is essential in this work. A ternary operator, , for which , is the next candidate for further analysis [47].
Whether a univariate Sheffer exists, serving simultaneously as a neural activation function [48] and as a generator of all elementary functions, remains open (see SI, Sect. 5).
One might complain that the EML representation of elementary functions requires complex arithmetic for real math, at least internally. Just as quantum computing uses complex amplitudes to compute real probabilities, EML uses complex intermediates to compute real elementary functions. This seems inevitable. We must somehow compute the imaginary unit , , and all trigonometric/hyperbolic functions via Euler's formula, (2). For that, we use for . A continuous Sheffer working purely in the real domain seems impossible. My search for alternatives, e.g., using pairs of trigonometric/hyperbolic functions and their inverses instead of , found nothing. Quite surprisingly, the requirement to use complex numbers internally causes only minor problems in practice of using (3) in Computer Algebra Systems or numerical simulations.
Since standard activation functions are themselves elementary, any conventional neural network is a special case of an EML tree architecture. Current networks can learn symbolic algebra [49] and digit-level arithmetic [50], but their internal mechanisms remain opaque [11], and efficient exact evaluation of elementary functions as continuous real-valued operations is still beyond their reach. EML representations go further: as demonstrated in Subsect. 4.3, trained weights can snap to exact binary values, recovering closed-form elementary sub-expressions alongside approximations. When this succeeds, the discovered circuits are legible as elementary-function expressions, a form of interpretability unavailable to conventional architectures.
AI use disclosure
The core idea, the discovery of the EML Sheffer operator, the verification methodology, and results are entirely the author's own work. Large language models (including recent Claude, Grok, Gemini and ChatGPT) were used mainly for language editing and coding assistance.
Data availability
Code, scripts, and supplementary reproducibility materials used to generate the figures, tables, and numerical results are available in the SymbolicRegressionPackage repository [39]. An archival snapshot of the exact submission version is deposited in Zenodo, DOI: 10.5281/zenodo.19183008. The archival package contains the source code, scripts, and README files needed to rerun the reported results.
Acknowledgments
Computational resources were partially provided by Google Cloud Research Credits.
Supplementary Information
An extensive three-part Supporting Information is supplied as a separate SI Appendix PDF on arXiv.
- 1 From German ein Stein, "one tile," not after Albert Einstein.
- 2 Exponentiation, unlike the four basic arithmetic operations that are almost always built in as primitive operators, has often been treated as a higher-level operation exposed via library functions rather than as a dedicated infix operator.
- 3 E.g., . In practice, one will rarely use this property. Usually, we use directly available 0s and 1s, e.g. GND and in digital circuits.
References
- W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical Recipes: The Art of Scientific Computing. Cambridge University Press, 3rd ed., 2007. ISBN 978-0-521-88068-8.
- H. M. Sheffer. A set of five independent postulates for Boolean algebras, with application to logical constants. Trans. Amer. Math. Soc., 14(4):481–488, 1913.
- J. Napier. Mirifici Logarithmorum Canonis Descriptio. Andrew Hart, Edinburgh, 1614.
- H. Briggs. Arithmetica Logarithmica. London, 1624.
- R. Cotes. Harmonia Mensurarum, sive Analysis & Synthesis per Rationum & Angulorum Mensuras Promotae. Cambridge, 1722 (posthumous; ed. R. Smith).
- J. Liouville. Mémoire sur l'intégration d'une classe de fonctions transcendantes. J. f. d. reine u. angew. Math. (Crelle), 13:93–118, 1835.
- J. F. Ritt. Integration in Finite Terms: Liouville's Theory of Elementary Methods. Columbia University Press, 1948.
- B. Ulmann. Analog Computing. De Gruyter Oldenbourg, 2022. ISBN 9783110787740.
- S.-M. Udrescu, M. Tegmark. AI Feynman: A physics-inspired method for symbolic regression. Science Advances, 6(16):eaay2631, 2020.
- M. Cranmer et al. Discovering symbolic models from deep learning with inductive biases. NeurIPS, 33:17429–17442, 2020.
- Z. Liu et al. KAN: Kolmogorov–Arnold networks. ICLR, 2025.
- J. Łukasiewicz. Elements of Mathematical Logic. Pergamon, 1963 (English translation of Elementy logiki matematycznej, 1929).
- H. S. Black. Stabilized feedback amplifiers. Bell Syst. Tech. J., 13(1):1–18, 1934.
- V. Nair, G. E. Hinton. Rectified linear units improve restricted Boltzmann machines. ICML, pp. 807–814, 2010.
- I. Goodfellow, Y. Bengio, A. Courville. Deep Learning. MIT Press, 2016.
- S. Wolfram. A New Kind of Science. Wolfram Media, 2002.
- M. Schönfinkel. Über die Bausteine der mathematischen Logik. Math. Annalen, 92(3):305–316, 1924.
- H. B. Curry, R. Feys. Combinatory Logic. North-Holland, 1958.
- Y. Lafont. Interaction combinators. Inf. Comput., 137(1):69–101, 1997.
- M. Baczyński, P. Berruezo, P. Helbin, S. Massanet, W. Niemyska, D. Ruiz-Aguilera. On the Sheffer stroke operation in fuzzy logic. Fuzzy Sets and Systems, 431:110–128, 2022.
- O. Mazonka, A. Kolodin. A simple multi-processor computer based on SUBLEQ. arXiv:1106.2593, 2011.
- J. H. Conway. FRACTRAN: a simple universal programming language for arithmetic. In Open Problems in Communication and Computation, pp. 4–26, Springer, 1987.
- M. Cook. Universality in elementary cellular automata. Complex Systems, 15(1):1–40, 2004.
- B. Linsky. The Evolution of Principia Mathematica: Bertrand Russell's Manuscripts and Notes for the Second Edition. Cambridge University Press, 2011.
- F. H. C. Crick, J. D. Watson. Genetical implications of the structure of deoxyribonucleic acid. Nature, 171(4361):964–967, 1953.
- D. Smith, J. S. Myers, C. S. Kaplan, C. Goodman-Strauss. An aperiodic monotile. Combinatorial Theory, 4(1), 2024.
- A. Odrzywołek. How to build the perfect igloo. Eureka, 63:1001110–1001111, 2014.
- E. Fehlberg. Klassische Runge-Kutta-Formeln vierter und niedrigerer Ordnung mit Schrittweiten-Kontrolle und ihre Anwendung auf Wärmeleitungsprobleme. Computing, 6(1):61–71, 1970.
- H. Takahasi, M. Mori. Double exponential formulas for numerical integration. Publ. RIMS, 9(3):721–741, 1974.
- J. W. Cooley, J. W. Tukey. An algorithm for the machine calculation of complex Fourier series. Math. Comp., 19(90):297–301, 1965.
- J. Shackell. Growth estimates for exp–log functions. J. Symbolic Computation, 10(6):611–632, 1990.
- D. Richardson, B. Salvy, J. Shackell, J. van der Hoeven. Asymptotic expansions of exp-log functions. INRIA Tech. Rep. RR-2859, 1996.
- Wolfram Research Inc. Mathematica, Version 14.3, Champaign IL, 2025.
- D. Finkel. Broken calculator warm up. mathforlove.com, 2017.
- D. J. Newman. A Problem Seminar. Springer, 1982. ISBN 0-387-90765-3.
- B. Naskrecki, K. Ono. Mathematical discovery in the age of artificial intelligence. Nature Physics, 21(10): 1504–1506, 2025.
- A. N. Kolmogorov. Three approaches to the quantitative definition of information. Problems of Information Transmission, 1(1):1–7, 1965.
- G. Terzo. Some consequences of Schanuel's conjecture in exponential rings. Comm. Algebra, 36(3):1171–1189, 2008.
- A. Odrzywołek. SymbolicRegressionPackage: basic building blocks for symbolic regression. github.com/VA00/SymbolicRegressionPackage, 2026. (Includes EML toolkit.)
- C. R. Harris et al. Array programming with NumPy. Nature, 585(7825):357–362, 2020.
- A. Paszke et al. PyTorch: an imperative style, high-performance deep learning library. NeurIPS 32, pp. 8024–8035, 2019.
- L. de Moura, S. Ullrich. The Lean 4 theorem prover and programming language. CADE 28, pp. 625–635, 2021.
- B. Ulmann. Beyond zeros and ones, analog computing in the twenty-first century. Int. J. Parallel, Emergent and Distributed Systems, 39(2):139–151, 2024.
- M. Cranmer. Interpretable machine learning for science with PySR and SymbolicRegression.jl, 2023. arXiv:2305.01582.
- E. Jang, S. Gu, B. Poole. Categorical reparameterization with Gumbel-Softmax. ICLR, 2017.
- B. K. Petersen, M. Landajuela, T. N. Mundhenk, C. P. Santiago, S. Kim, J. T. Kim. Deep symbolic regression: recovering mathematical expressions from data via risk-seeking policy gradients. ICLR, 2021.
- A. Odrzywołek. A ternary Sheffer operator for elementary functions? Acta Physica Polonica B, 2026 (in preparation).
- S. R. Dubey, S. K. Singh, B. B. Chaudhuri. Activation functions in deep learning: a comprehensive survey and benchmark. Neurocomputing, 503:92–108, 2022.
- G. Lample, F. Charton. Deep learning for symbolic mathematics. ICLR, 2020.
- N. Lee, K. Sreenivasan, J. D. Lee, K. Lee, D. Papailiopoulos. Teaching arithmetic to small transformers. ICLR, 2024.
> next: try the trees in the playground.