{'fraction_non_alphanumeric': 0.020869565217391306, 'fraction_numerical': 0.0008695652173913044, 'mean_word_length': 5.11968085106383, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A two-layer approach to the computability and complexity of real functions

Most theoretical approaches to the computability of real functions rely on higher-type computations, taking a description of a real number into a computation of another description. In practice, creating and maintaining such descriptions is a very complicated process, requiring extra storage along with time-consuming memory management tools such as garbage collection and, if not enough care is applied, also introducing external complexity that may even lead to changing the complexity class of the problem. For example, to compute simply a ∗ a, where a is a real number described as some function computing its approximations, and ∗ is a type-2 function that computes multiplication on the reals, the straightforward implementation would require the computation of approximations to a twice. Then, an efficient implementation of a n where n ∈ N using ∗, which on ground types would have complexity of operations O(logn), would inevitably end up being of complexity O(n), because every multiplication would require computing its arguments, leading to at least n requests to compute approximations to a. The problem in this example can be circumvented by introducing approximation caching. Unfortunately, this leads to other issues and the process of circumventing problems can go on indefinitely. This paper tries to address this problem from the roots, creating a firm theory on which implementations without such efficiency problems can be devised. The theory presented is a new model of computation, based on representing real functions as objects operating on partial approximations instead of proper real numbers. The novelty of this model is in the introduced second layer that adds the ability to reason about complexity, at the same time separating these concerns from the objects that carry out the computation. No other type-1 model so far has been able to define complexity, and ours manages to do it in a way that is compatible with existing complexity measures for computable analysis. In the next section we will present the two-layer approach, prove its properties, and compare it to existing models. Following this, we will discuss the usefulness of the ideas presented, along with a short introduction to