Elementary recursive function

From Wikipedia, the free encyclopedia

Template:Short description Script error: No such module "about". Template:DMCA The term elementary was originally introduced by László Kalmár in the context of computability theory.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. He defined the class of elementary recursive functions ("Kalmár elementary functions") as a subset of the primitive recursive functions — specifically, those that can be computed using a limited set of operations such as composition, bounded sums, and bounded products.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. These functions grow no faster than a fixed-height tower of exponentiation (for example, O(22n)). Not all primitive recursive functions are elementary; for example, tetration grows too rapidly to be included in the elementary class. The elementary recursive functions correspond to the class 3 of the Grzegorczyk hierarchy.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.

In computational complexity theory, the term ELEMENTARY refers to a class of decision problems solvable in elementary time — that is, within time bounded by some fixed number of exponentials. Formally:

𝖤𝖫𝖤𝖬𝖤𝖭𝖳𝖠𝖱𝖸=kDTIME(expk(nc))
where expk(n) denotes a k-level exponential tower (e.g., 22n).

Although the name comes from the same historical origin, the ELEMENTARY complexity class deals with decision problems and Turing machine runtime, rather than total functions.

Definition

The definitions of elementary recursive functions are the same as for primitive recursive functions, except that primitive recursion is replaced by bounded summation and bounded product.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. All functions work over the natural numbers. The basic functions, all of them elementary recursive, are:

  1. Zero function. Returns zero: f(x)=0.
  2. Successor function: f(x)=x+1. Often this is denoted by S, as in S(x). Via repeated application of a successor function, one can achieve addition.
  3. Projection functions: these are used for ignoring arguments. For example, f(a,b)=a is a projection function.
  4. Subtraction function: f(x,y)=max(xy,0). This function is used to define conditionals and iteration.

From these basic functions, we can build other elementary recursive functions.

  1. Composition: applying values from some elementary recursive function as an argument to another elementary recursive function. The function f defined as the composition f(x1,,xn)=h(g1(x1,,xn),,gm(x1,,xn)) is elementary recursive if h is elementary recursive and each gi is elementary recursive.
  2. Bounded summation: f(m,x1,,xn)=i=0mg(i,x1,,xn) is elementary recursive if g is elementary recursive.
  3. Bounded product: f(m,x1,,xn)=i=0mg(i,x1,,xn) is elementary recursive if g is elementary recursive.

Superposition bases for elementary functions

In the context of computability theory, superposition is a method of constructing new functions from existing ones by functional composition. It allows the outputs of one or more functions to serve as the inputs to another function.

More formally, suppose:

  • f(x1,,xk) is a k-ary function, and
  • g1(x1,,xn),,gk(x1,,xn) are n-ary functions.

Then the superposition of these functions yields a new n-ary function:

h(x1,,xn)=f(g1(x1,,xn),,gk(x1,,xn)).

The class of elementary recursive functions coincides with the closure under superposition of the projection functions and one of the following sets of initial functions:

  • {n+m,n˙m,n/m,2n}Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
  • {n+m,n˙m,n/m,nm,nm}Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
  • {n+m,nmodm,n2,2n}Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
  • {n+m,nmodm,2n}[1]

where n˙m=max(nm,0) denotes truncated subtraction (monus).

In 2025 Mihai Prunescu, Lorenzo Sauras-Altuzarra and Joseph M. Shunia proved that the class of Kalmár elementary functions can be inductively generated from addition (n+m), integer remainder (nmodm) and base-two exponentiation (2n), improving previous results by MazzantiLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. and Marchenkov.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. They further proved that the substitution basis defined by these three operations is minimal.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. An open question is whether {n+m,n/m,2n} is an alternative basis.

Example 1

Let f(a,b)=amodb,g1(n)=2n+n,g2(n)=2n+n. Then the function h(n)=f(g1(n),g2(n))=2n+nmod(2n+n) defines the square function h(n)=n2 by superposition alone.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. This shows how functions like squaring can be expressed using only addition, integer remainder, and base-two exponentiation through superposition, without requiring explicit recursion.

Example 2

Another example of an elementary recursive function is the Kronecker delta δij=2(2imod(2j+1))+(2jmod(2i+1))mod(2i+2j)mod2, which satisfies δij=1 if i=j and 0 otherwise.

Further examples
x˙y=((2x+y+x)mod(2x+y+y))mod(2x+y+x).Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
2xy=(x+y)2˙(x2+y2).Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
x/y=(2(x+1)(x˙(xmody)))mod(2(x+1)y˙1).Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
xy=2xy/2.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
xy=2(xy+x+1)ymod(2xy+x+1˙x).[2]

Lower elementary recursive functions

Lower elementary recursive functions follow the definitions as above, except that bounded product is disallowed.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. That is, a lower elementary recursive function must be a zero, successor, or projection function, a composition of other lower elementary recursive functions, or the bounded sum of another lower elementary recursive function.

Lower elementary recursive functions are also known as Skolem elementary functions.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.

Whereas elementary recursive functions have potentially more than exponential growth, the lower elementary recursive functions have polynomial growth.

The class of lower elementary functions has a description in terms of composition of simple functions analogous to that we have for elementary functions.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Namely, a polynomial-bounded function is lower elementary if and only if it can be expressed using a composition of the following functions: projections, n+1, nm, n˙m, nm, n/m, one exponential function (2n or nm) with the following restriction on the structure of formulas: the formula can have no more than two floors with respect to an exponent (for example, xy(z+1) has 1 floor, (x+y)yz+x+zx+1 has 2 floors, 22x has 3 floors). Here nm is a bitwise AND of n and m.

See also

Notes

Page Template:Reflist/styles.css has no content.

  1. ^ n2=2n+nmod(2n+n) Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
  2. ^ Page Module:Citation/CS1/styles.css has no content."Can superposition alone generate the Kalmár elementary function xy from <x + y, x mod y, 2x >?". StackExchange. Retrieved 14 February 2026.

References

Page Template:Refbegin/styles.css has no content.

Further reading

Page Template:Refbegin/styles.css has no content.

Page Template:Refbegin/styles.css has no content.

Template:ComplexityClasses