((()))(((())))=5
((()))(((())))=5 is a string rewriting esoteric programming language created by User:Dragoneater67 in 2026. The only valid characters are ( and ). The language was inspired by User:A()/How Big Can We Go? and Lambda calculus.
Syntax
The parser takes the leftmost top-level pair (A)(B) , then replaces every empty parenthesis () in B with A, then the
entire pair is replaced with B. This process is continued until no reduction is possible (e.g. a normal form has been reached).
For example:
(NOTE: A has been marked with blue, B with magenta)
((()))(((())))
A = (())
(NOTE: All instances of () that are to be replaced are marked with green)
B = ((()))
Every () is replaced with (()):
(NOTE: All instances of () that have been replaced are marked with red)
B = (((())))
Result:
(((())))
Examples
A+B Problem
(A)((B))
Where A and B are replaced by numbers.
(NOTE: 0 = ø; 1 = (); 2 = (()); etc.)
XKCD Random Number
(((())))
Infinite loop
((())(()))((())(()))
Truth machine
(((())(()))((())(())))(I)
Where I is replaced with either true: (), or false: ∅.
NAND Gate
(A)(B)()
Where A and B are replaced with either true: (), or false: ∅.
AND Gate
(A)(B)
Where A and B are replaced with either true: (), or false: ∅.
NOT gate
(A)((())())
Where A is either true: (), or false: ∅.