Algebra of Countably Functions and Theorems of Completeness

An algebraic approach to the theory of countable functions is given. Compositions (superpositions) of functions are used instead of recursions. Arithmetic and analytic algorithms are defined. All closed sets are founded. Mathematically precise definitions of logic algorithms with quantifiers of existence and universality are given. Logic algorithm for fast-growing function is built as example. Classification of functions is given. There are non-computable functions. These functions are fictitious (useless) and their set is continual. The set of computable functions is countable. Incompleteness of disjunction and negation, conjunction and negation, of Pierce, Sheffer and diagonal Webb functions is proved. The completeness of the set of one-place functions and any all-valued essential function (Slupecki theorem) is proved for computable functions. Existence of generators of all computable functions is proved too.


Introduction
The algebras of compositions (superpositions) of multi-valued, countably-valued, and real functions were defined mathematically precise by A. I. Mal'cev [1]. He called these algebras iterative and pre-iterative Post algebras. More precisely, iterative algebras can be called Jablonski algebras, since the results obtained by S. V. Yablonski [2] are constructed in these algebras. Pre-iterative algebra is more precisely called Post algebra, since E. L. Post [3] used pre-iterative algebra. Later Post algebra was ignored. In particular, only Jablonski algebra was used in the D. Lau [4] monograph devoted to algebras of multi-valued functions.
Further, only Post algebra is used. The algebra of countably-valued functions differs significantly from the algebra of multi-valued functions. In particular, the completeness of disjunction and negation, as well as conjunction and negation, exists in all algebras of multi-valued functions, but does not exist in the algebra of countably-valued functions.
The algebra of countably-valued functions contains the theory of algorithms, in particular, the theory of computable functions. But this algebra radically changes the theory of computable functions. In this algebra recursions are absent, but all recursive functions can be constructed. The composition algebra are more powerful than the recursion algebra.
In addition to compositions, there are many other closure operations, the main purpose of which is to enlarge closed sets. This integration is intended to reduce the family of closed sets of functions, since this family is very large in the algebra of multi-valued functions, and especially in the algebra of countably-valued functions. The most powerful integration of closed sets is provided by -operations of the closure [5]. In particular, in the algebra of two-valued functions there exists a countable family of sets closed by compositions, and only 2 sets closed by -operations. Building of classification of sets closed by operations other than compositions is inefficient. It is more efficient to confine some upper levels of classification by compositions 1 . In particular, the number of maximal sets in a two-valued algebra is three (two sets are fictitious).
The number of works devoted to recursions is very large, but the number of works devoted to compositions in algebras of countable-valued functions is insignificant. These are works of A. I. Mal'cev [6] on one-place functions, A. Salomaa [7,8] on completeness, G. P. Gavrilov [9,10] on completeness, and S. S. Marchenkov [11] on expressibility.
Complete functions (complete generators), i.e. computable functions generating all other computable functions, are generally accepted to call Sheffer functions. But the term "complete" functions is more convenient, since it is more correct to call the negation of a conjunction Scheffer's function. The negation of disjunction is generally called Webb function, but it is more correct to call this negation Pierce function. Webb function is more correctly to call its diagonal function: ( , ) = + 1, ( , ≠ ) = 0. All these functions are not complete in the algebra of countable functions. But new complete functions exist in this algebra (A. Salomaa [7] argued that complete functions do not exist in this algebra).

Algebra of Countable-Valued Functions
The algebra of countably-valued functions is one of algebras of compositions (Post algebras). The definition of algebras of compositions was given by A. I. Mal'cev. This definition has the following form for algebras of countable-valued functions. Definition 1. Post algebra P N is where carrier is the set containing all countably-valued functions, is the set of natural numbers (the set of values of functions), Ω is the set of basic operations of the algebra.
The set Ω consists of the following operations on functions: (1) is a cyclic permutation of variables, at which the first variable becomes last, then the numbering of the variables is corrected; (2) -permutation of two variables, first and last; this and previous operations give any permutation of variables; (3) ⊳ -identification (equality) of the first two variables; (4) * -substitution the first variable of one function by another function. A subalgebra of Post algebra is an algebra, basic set of which is a set of functions closed by compositions, and the basic operations are compositions.
Further, subalgebras of Post algebra are called algebras. Unless otherwise stated, all functions are everywhere defined.
All algebras have the same set of operations. So, any algebra is defined by its carrier. So, it is generally accepted to identify algebra and its carrier. In particular, the intersection of two algebras means an algebra, the set of functions of which is the intersection of the sets of functions of these two algebras. The intersection of two algebras is an algebra, the union of two algebras may not be an algebra. But the union of two algebras generates an algebra containing them (and containing not only them).
The algebra of countable functions refuses recursions. But any recursive functions can be generated by any complete functions. The theory of algorithms is described below from the point of view of Post algebra.

Arithmetic and Analytic Algorithms
Algorithms are arithmetic and analytic. The exact definition of algorithms that compute functions and relations is given Analytic algorithm analyzes arithmetic algorithms, or other analytic algorithms. This analysis is needed to identify algorithms which work without stopping, i.e. infinitely long for calculating some line in table of function or relation. In particular, analytic algorithm can find that the arithmetic algorithm works without stopping to find a nonzero result of the Fermat grate equation.
Analysis of algorithms is performed by compiler and interpreter of any programming language (compiler or interpreter analyzing the Fermat equation are not created and are unlikely to be created). An algorithm is executed only after a positive analysis, but this does not guarantee that the algorithm is non-stopping. There are theorems proving that there are algorithms that work with stopping, but they are not detected by analysis.
Further, only arithmetic algorithms are considered, but it is assumed that analysis of these algorithms can preserve non-stopping.
Next, construction of some classification of relations will be done. These relations are called sets.

Sets
Further, sets are one-place relations. But the obtained results are valid for other sets too. Sets have complements.
Definition 2. A family of sets is called closed if each set of the family contains a complement of this set.
Classes of sets are next: decidable, almost decidable, partially decidable, (computably) enumerable, partially enumerable, and non-computable. Any set belongs to only one of these classes and is called by name of the class. An analysis of an algorithm, which calculates a set, may not determine which class contains this set, even though this set belongs to only one of these classes. Definition 3. A set is decidable if algorithm calculates elements of this set in order of increase of element values.
It is impossible to prove by calculations that a set is decidable, since it can be proved only after infinite number of calculations. It is possible to prove this by analysis of the algorithm calculated this set. Lemma 1. A closure of a decidable set is a decidable set.
Proof. The algorithm computing a decidable set calculates simultaneously the complement of this set. The elements of this complement are the numbers, which precede the first element of the decidable set and which are between two elements of this set. Therefore, the algorithm calculates the elements in order of increasing their values.  Definition 4. A set is almost decidable if an algorithm calculates elements of this set in order of increasing values of these elements only after a certain number of elements. We denote this number by .
It is impossible to calculate . For this you need to calculate all elements. Therefore, m can be determined by analyzing the algorithm. Knowledge of is necessary only for calculating the complement of this set. This complement is a partially decidable set (PDS).
Definition 5. A set is partially decidable if an algorithm calculates elements of this set with errors, and with corrections of all of them by finite number of times.
A PDS can be obtained by calculating the complement of the almost decidable set. A PDS is empty until the first element of the almost decidable set. Then this PDS contains all elements preceding the first element. After calculating the second element, this PDS contains all elements preceding the second element except the first element. So, this PDS contains all elements preceding any next element, except for elements of the almost decidable set. If a next element of almost decidable has not increasing value, then this element is removed from the PDS, i.e. this value is erroneous.
A PDS is calculated with errors up to a certain number of elements of almost decidable set, after which all erroneous elements of PDS are deleted. This number is . Further, all calculated elements are not erroneous.
Any set is a PDS if it is calculated with errors and their deleting only up to a certain element. After reaching this element, all other elements are calculated without errors. So, a PDS can be calculated independently, without simultaneously calculating an almost decidable set. Lemma 2. The closure of an almost decidable set is this set and its PDS.
Proof. It was shown above that complement of an almost decidable set is a PDS. It remains to prove that complement of any PDS is the almost decidable set.
This complement occurs simultaneously with the calculation of the PDS. The complement is empty until the first element is calculated. After this, the complement contains all elements preceding the first element. With each next element of the PDS, the complement contains all the preceding elements, except for elements of the PDS. If a next element of the PDS is erroneous, then it is added to the complement.
Erroneous elements do not occur after reaching element with number . Further, the complement contains elements only with increasing values. Therefore, the complement of the PRM is an almost decidable set.  Definition 6. The set is (computably) enumerate if the algorithm calculates its elements without order in values down to infinity.
An example of an enumerable set is a set of values of a function that non-monotonically increases up to its variable to be infinite.
There are partial enumerable sets (PES). Definition 7. A set is partial enumerable if the algorithm calculates its elements with errors and then deleting all of them only by infinitely many times.
A PES can be obtained by calculating the complement of an enumerable set. This PES is empty until the first element of the enumerable set. After that, the PES contains all elements preceding the first element. And the PES contains all elements presiding any next element of the enumerable set, except for elements of the enumerable set. If a next value of an element is not increasing, then this element is removed from the PES, i.e. this element was erroneous.
Any set is a PES if its calculation creates erroneous elements but deletes all of them only by infinitely times. This means that a PCP can be calculated independently, without simultaneously calculating the enumerable set.
Lemma 3. The closure of an enumerable set is complete.
Proof. The proof repeats the proof of the previous lemma. It was shown above that a complement of enumerable set is a PES. It remains to prove that the complement of any PES is an enumerable set.
The complement is calculated simultaneously with the calculation of the PES. The complement is empty before calculating the first element of the PES. After this complement contains all elements preceding the first element. And this complement contains all elements preceding the any next elements except elements of PES. If a next element of the PES is erroneous, then this element is added to the supplement. In this case, elements of the complement have increase and decrease values. So, the complement is indeed enumerable, without erroneous elements.  Definition 8. A set is computable if there is an algorithm for calculating all its elements.
This definition is different from the generally accepted. It is generally accepted that a set is computable (algorithmically decidable) if it is decidable. An enumerable set is algorithmically undecidable, since finding out an element to belong to the set leads to non-stop calculating, if this element does not belong to the set. But analysis of the algorithm does not allow to fulfill the algorithm. And any algorithm must be analyzed before computing, even this algorithm is decidable.
This definition of computability is not constructive, since an algorithm is considered computable if it works one hundred years. In addition, compilers and interpreters do not perform a complete analysis of algorithms. Theorem 1. A closure of decidable, almost decidable, and enumerable sets contains all computable sets.
Proof. All elements of a computable set are calculated in any sequence of their values, and all erroneous elements are excluded. In accordance with the lemmas shown above, the closure of first 5 classes of sets is the same class of sets.
The family of computable sets is countable, since the set of algorithms is countable. All other sets are non-computable, and their family is continual, since the family is a family of all subsets of the natural set.
A similar definition of computability exists for functions. Definition 9. A function is computable if there is an algorithm for calculating it.
This definition holds for partial functions too. The algorithm for calculating these functions must calculate its domain. Otherwise, the algorithm will be blocked as a result of analysis.
Functions, like relations, are also decidable, almost decidable, partially decidable, enumerable, partially enumerable, and non-computable if they are such relations. Any function belongs to only one of these classes of functions.
The set of computable functions is countable, the set of non-computable functions is continual.

Definition
The exact definition of an algorithm is reduced to the definition of a logic algorithm.
Logic algorithms are built according to the rules of logic. Each calculated object must have a definition. In logic, the definition of an object is given by a logic formula, a special case of which is equality.
Equalities The relations are defined as ( , . . . , ) ⇄ logic formula without ⇄ It must be used the lower part of ⇄: ( , . . . , ) ← logic formula without ⇄ Then the left part of the definition is true if the right part is true. It is enough to calculate relations and functions.
The upper part in ⇄ means that truth of the left part implies truth of the right part. This is not applicable for calculations, since a calculation is possible if truth of the left part follows from truth of the right side.

Skolem Formulas
There are several ways to represent any logic formula. But the Skolem formula eliminates this uncertainty.
The reduction to this formula is carried out in 7 steps: (1) reduction to the form with negations only of relations; (2) reduction to the prefix form, in which all quantifiers are at the beginning of the right part of definition; A program for calculating functions or relations presented in other programming languages may not be algorithm if this program calculates an object that does not have a logic definition. In other cases, a program is algorithm.

Functions CDEF G
The definition of #$% ) ( , ) presented above generates the next rules. . Further substitutions lead to increase the number of powers for one.

Classification of Functions and Algebras
In any theory, the classification of its objects is a main problem.
First, classification of all objects is constructed. This classification allows to detect of fictitious (useless) objects. Then more deeper classification is built for only useful objects.
The objects of algebra of countably-valued functions are functions and subalgebras of this algebra. Let's start with classification of subalgebras. This classification contains several levels.
The top level contains algebra P N . By definition, it is a subalgebra too.
The second level contains subalgebras of computable and non-computable functions. The subalgebra of non-computable functions is fictitious (useless in P N ); therefore, a further classification is constructed only for subalgebra of computable functions.
The third level contains the countable set of subalgebras S (0 ≤ 2 ≤ ∞), where 2 is the minimal number of functions generated algebras of the subalgebra. There are [12] subalgebras not generated by functions ( 2 = 0 ) and subalgebras generated by an infinite set of functions (2 = ∞).
The subalgebra S V contains continuum of algebras, algebras S with finite 2 contain countable set of algebras.
Below it will be shown that all algebras S (except S ) are fictitious (useless). Therefore, further classification is a classification of the subalgebra S . But this classification is isomorphic to the classification of computable functions. Further, classification of functions is built.
The class of computable functions is on the second level of function classification. The class of non-computable functions are on the second level too. The class of all functions is on the top level.
Further, classification is constructed for computable functions.
The classification of computable functions is isomorphic to the classification of the subalgebra S .
Each function generates some algebra by compositions. There are much functions that generate the same algebra. This set is a class of the classification, since any function belongs to only one class which is generated by these functions. Therefore, classes do not intersect.
Each class of functions belongs to unique algebra which is generated by these functions. This algebra belongs to S , since S contains all algebras generated by a single function. Consequently, the classification of the subalgebra S is isomorphic to the classification of computable functions. So there is a one-to-one correspondence between these classifications.
Not all algebras are generated by a single function. There are algebras generated by only a few functions. These algebras are fictitious (useless) from the point of view of the classification of functions (the classification of functions is the main problem of the algebra of countably-valued functions).
Fictitious objects are deleted in any theory. Therefore, fictitious algebras are deleted. The study of their properties and construction of further classification are useless. The set of algebras contained in fictitious subalgebras is continual (due to S V ). The set of algebras contained in S is countable. Therefore, the statement in [12] is erroneous. This statement says that properties of algebras of multi-valued functions are significantly different from properties of the algebra of two-valued functions due to continuity. Fictitious objects are removed from any theory, so their properties are not interesting.
Further the classification of functions is continued. The classification of functions in Post algebras uses a composition of functions. Therefore, 5 classes of functions: decidable, almost decidable, partially decidable, enumerable, and partially enumerable, are not included in this classification. The function of one of these classes can generate functions of other classes by compositions, in particular, by identification of variables.
The third level of classification of functions contains classes called maximal. The set of maximal classes is countable. As in algebras of multi-valued functions, these classes form 3 families (I. G. Rosenberg [13] called 6 families, but 3 of them are fictitious; in the algebra of two-valued functions, 2 such families are fictitious [14]). Non-fictitious families are families of self-dual (auto-dual) functions, functions that preserve nontrivial equivalence relations, and functions that preserve central relations.
A deeper classification of functions is difficult because of infinite sets of classes at almost every level of classification.
All functions in Post algebras are everywhere defined. But a partial function can have the single way to be continued to an everywhere defined function. Therefore, the classification of partial functions coincides with the classification of everywhere defined functions. Completeness of theorems in the countably-valued algebra differs significantly from completeness of these theorems in a multi-valued algebra.

Incompleteness Theorems
Theorem 2. In P N the sets , ∨ and , ∧ do not generate all functions.
Proof. It is enough to restrict the proof to generating one-place functions.
The negation = + 1 generates one-place functions without values 0.
The function ∨ generates only one-place function . Substitutions of the negation into ∨ and of ∨ into the negation generate only one-place function .
The function ∧ generates only one-place function . Substitution ∧ into the negation generates only one-place function . Substitution of the negation into ∧ generates only one-place function (0) = 0, ( ≠ 0) = .
One place functions with several values 0 are not generated. □ Corollary 1. The sets , ∨ and , ∧ are not complete.
Proof. These sets do not generate all functions.  This is in contrast to multi-valued algebras in which these sets are complete.

Theorem
The Slupetski theorem holds in P N . Theorem 4. Let the algebra have countable computable functions, let the set contain all one-place functions and any two-place all-valued essential function Z . Then this set is complete.
Proof. J. Slupetski used the Lukasiewicz function [\. In modern notation, this function for finite ] is It is necessary to prove that ^ and S ' , O p( ' , O ) are generated by the function Z and one-place functions.

Function S
I. Slupetsky built this function in ] steps. This does not apply to ] = ∞. Therefore a new construction is given. This construction is more simple.
There are q and q with Z(q , q ) = 1 . Therefore, ^(0,1) = Z(q , q ). And so on.  Since "H , H H are any, the Slupetski theorem is proved.

Completeness at ‚ = ∞
It is proved that the set of all one-place functions and a two-place all-valued essential function generates all two-place functions e. This set generates all multi-place functions since some functions of e generate all functions. This holds for infinite ] too, since two-place functions generating all computable functions exist in P N . □ . This function Z generates all computable one-place function.

Complete Generators
By analogy, an infinite set of complete generators can be constructed. □

Conclusion
A new theory of algorithms has been built. This theory refuses recursions but can generate all recursive functions. 6 classes of sets were found -decidable, almost decidable, partially decidable, enumerable, partially enumerable and non-computable sets. Any set belongs to only one of these classes. The family of the first five classes is closed with respect to the complement operation.
The new mathematically precise definition of a logic algorithm is given. This algorithm solves problems that cannot be solved in other algorithms. In particular, the problems of 2 In − [√ ] , is a real number and [√ ] means integer part of √ . quantifiers of existence and universality are solved.
In the case of universal quantifier, a rule contains variables in the right part such that the variables absent in the left part. The right part can contain conjuncts which limit the range of these absent values. If the right part is true for some value of one of the absent values, then it is true for all it values of its range. Therefore, it is sufficient to replace all absent values by the minimum value of their range. Further, the rules are executed without absent values and without conjuncts that limit the range.
Theorems of completeness are found which hold in algebras of multi-valued functions and not does not hold in the algebra of countable-valued functions. In particular, these theorems do not hold for disjunctions and negations, for conjunctions and negations, for disjunctions, conjunctions and negations, as well as for the Pierce, Sheffer and diagonal Webb functions.
A new proof of the Slupetsky theorem, applicable to countable-valued functions, was constructed.
The theorem of existence of complete generators in P N is proved. But concrete complete generator was not found.