Constructible

From Esolang
Jump to navigation Jump to search
Constructible
Designed by User:Hakerh400
Appeared in 2025
Computational class Turing complete
Major implementations Implemented
File extension(s) .txt

Constructible is an esolang invented by User:Hakerh400 in 2025.

Overview

Constructible is the same as Imprecision, with the additional square root operation. Square root of a negative number is undefined behavior. Square root is represented as the prefix unary operator whose priority is higher than multiplication.

The name "Constructible" comes from the fact that rational numbers are not enough for implementing this language. Instead, we need constructible real numbers (the smallest field extension of the rationals that includes the square roots of all of its positive numbers).

Example

halt = 2 - input
input = √input
output = output + 1

Computational class

Constructible is an instance of general blindfolded arithmetic on ℚ with the operations +, -, *, /, . Since +, -, * on ℤ is sufficient for the implementation of finite state automata any control mechanism can be constructed. Using √(x * x) as abs(x) a norm function can be constructed as (2 - abs(x) + x) / 2, which returns 0 for -1 and 1 for everything greater. We can therefore create counters, which increment unconditionally and also unconditionally decrement with the decrement being norm(counter). The counters can be read into the FSM using the norm function. Therefore, Constructible is Turing complete by emulation of counter machines.

Implementation