Finite Closed Sets of Functions in Multi-valued Logic

The article is devoted to classification of close sets of functions in k-valued logic. We build the classification of finite closed sets. The sets contain only constants and unary functions since sets containing even a two-ary function are infinite. Formulas of the number of finite sets and minimal sets exist for all natural k. We find the numbers of closed sets containing the identity function f (x)=x or a constant for all k. We give the number of sets on levels of inclusions at k up to 10. The inclusion diagrams are present at k up to 5, at k=6 we give inclusion diagrams of sets containing only function f (x)=x and constant 0. We find isomorphic sets and use only one of the isomorphic sets to build the diagrams.


Introduction
Multi-valued logic attracts intensive attention because of the connection with computer technology.
The first theories of multi-valued logic were born in the works of J. Lukasiewicz ( [1], 1920) and E. Post ([2], 1920). Now there are almost a hundred theories of multivalued logic but theory of Post's logic is more popular. We will use this theory.
E. Post gave more complete theory of his logic in [3] (1921). Later (1976), A. Mal'cev gave the further development of the theory in [4]. He created two algebras, which he called Post's iterative and Post's preiterative, these algebras are very different. Post used the preiterative algebra implicitly. Therefore it is more correctly to call Post's preiterative algebra Post algebra and Post's iterative algebra Mal'cev algebra. All closed sets are subalgebras of Post algebra. Unfortunately his Post algebra did not receive due recognition and almost all consequent investigators ignored it.
The survey [5] did not mention any Mal'cev's works but contained some results of his works. I. Rosenberg [6] gave extensive account of Mal'cev's results and marked "Preiterative sets are slightly more general than clones" (he used preiterative sets instead of preiterative algebra). In reality the preiterative (Post) algebra is more general than the clone algebra. The clone algebra uses not all functions but every classification of objects of a theory must include all objects of the theory. So the classification of functions must use all functions, the number of which is n k k for n -ary functions and for 0-ary functions (constants) too. We will give the full classification for = 0 n and for = 1 n as beginning. This is classification of finite closed sets, too. They are absent in the clone algebra.
The monograph [7] has not mentioned the Rosenberg work. It has mentioned many of Mal'cev's works but it has used only Mal'cev algebra (this algebra is not sound, see 2.1).
The first purpose of any theory is classification of objects of the theory. Every object must belong to a class and classes must be disjoint. We call such the classification natural.
The first purpose of multivalued logic is classification of multivalued functions. The full classification of 2-valued (Boolean) functions was given by E. Post [8]. His classes are closed sets of functions. It was shown in [9] that this classification was natural. Its closed sets do not disjoin but their subsets, not containing the other closed sets, are disjoint. Every closed set has only one of the subsets. This means that classifications of closed sets and the subsets have the same inclusion diagram.
Such the classification of 3-valued functions is absent now, since amount of classes is very big, this amount is uncountable. But a simple classification of k -valued functions exists for all natural k and for = k ω too [10]. The classification has only one level. The full classification must have more levels.
Post's classification has 14 levels. The other classifications use only some of closed sets. As a rool, these classifications are unnatural.
There are very much works devoting to problems of fullness of function's sets. But fundamental results were got by G. Rousseau in [29] (1967) and were improved by P. Schofield in [30] (1969). They produced Sheffer functions by using little information.
This article is devoted to finite closed sets (subalgebras of Post algebra) and has, except introduction, 2 sections and the appendix.
The section "Algebra of function compositions (Post algebra)" contains the information necessary for construction of finite closed sets. We give the mathematically precise definition of Post preiterative algebra and the definition of closed sets. These definitions are extensions of Mal'cev's, since Mal'cev's definition excludes constants but our definitions include constants. We introduce, by natural numbering, an order of functions. We assign a number to a function such that the number contains a table of the function in coded form. We present Lau's result for the number of minimal closed sets and give the definition of family of functions with the same diagonal.
The section "Finite closed sets" constructs the classification of finite closed sets. We introduce levels of finite closed sets. Level 0 contains minimal closed sets. Level 1 i + has closed sets containing closed sets of level i . We find the numbers of closed sets on levels for 2 ≤ k ≤ 10. We find the number of closed sets containing the constant 0 and belonging to level 2 (level 1 is primitive) for all finite k . The number of closed sets containing the function ( ) = f x x and belonging to level 1 is also given for all finite k . In appendix we build diagrams of conclusions of closed sets at 1 ≤ k ≤ 5. For = 6 k we build only diagrams of closed sets containing 0 and ( ) = f x x . We use short proofs of theorems since full proofs give very large size of the paper. We use some statements without proofs if the proofs are obvious.
We use k only as a value of logic and n only as arity of functions. We denote functions of closed sets by 0, ..., set is the name of the minimal generator of the set. And all operations of additions use modulo k in k -valued logic.

Definition of Post Algebra
Closed sets of functions are constructed by using compositions (superpositions) of the functions. So we must define the algebra of function composition. We will use the algebra to construct the classification of finite closed sets.
Mal'cev ( [4]) gave the following definition of the algebra of compositions.
Definition The Post algebra P k is P = ( ; , , ,*) where k P is the set of all k -valued everywhere defined functions with the domain {0,..., 1} k − ; ζ , τ , ⊳ and * are primitive operations (primitives) over these functions. In accordance with the standard definition of algebras, k P is the universe of the algebra, ζ , τ , ⊳ and * are the fundamental operations of the algebra. Primitives are the operations that build all other operations. The operation of adding a fictitious variable is considered as primitive in Mal'cev algebra. It is shown in [31] that this operation is not primitive since fictitious variables can be added by the operation of substitution of fictitious functions. But fictitious functions can be generated by non-fictitious functions. And Sheffer functions generate all functions in Post algebra. This means that Mal'cev algebra is not sound. But this algebra becomes sound if fictitious functions are absent in the algebra. Hence the operation of adding fictitious variables must be absent. And primitives of this algebra and Post algebra become the same. But the algebras have different objects: objects of Post algebra include fictitious functions and objects of the new Mal'cev algebra exclude the functions.
Algebras with = 1 k and = 0 k exist too. By the formula n k k for number of function of arity n , closed sets of = 0 k are empty, closed sets of = 1 k contain one function for every n .
We will give the new definitions of primitives. The definitions are a very strong extension of Mal'cev's. In particular, Mal'cev's definitions exclude constants. Then generators cannot build constants. But constants are inseparable part of functions and they must be built. The number of constants equals 0 = k k k . So the new definitions are needed.

Operation ζ of Cyclic Permutation
This operation provides a cyclic permutation of variables in a function. The cyclic permutation is an element of the symmetric group. We put a word 1 ( ,..., ) symbol n i f in the next definitions. Definition The unary operation ζ of cyclic permutation is The operation ζ locates the first column of the table of 1 n f after n -th column and then shifts all the columns to the left. The operation renumbers variables of functions, too.

Operation τ of Long Permutation
This is one more operation of the symmetric group.
Definition The unary operation of long permutation τ provides permutation of the first and the last variables in functions: x . The other variables are renumbered by analogy. We will call a pair ζ and τ a permutation operation.
Mal'cev defined short permutations but they do not apply to unary functions.

Operation ⊳ of Identification
This operation is an element of a monoid, the operation gives permutations with repetitions.
Definition The unary operation ⊳ of identification equalizes the first and last variables and deletes the last variable in a function: This operation removes lines of the table of n f , if they have different values in the first and last columns. As a result, the columns become equal, the last column becomes superfluous and is deleted. The arity of n f is decreased by 1. This is impossible for unary essential (non-fictitious) functions since, after removing the variable-column, only one line must be left in the table. It is not clear which line must be left. So we cannot decrease arity and the operation must not change the function. If a unary function is fictitious then we can leave any line of the column since all lines equal. As result the function becomes a constant.
So the operation ⊳ is applied to all functions of the universe.
The operation allows to generate any 0-ary function. In particular, the Webb function generating all functions generates constants only through this operation.
Mal'cev used the identification of the first and the second variables. This operation has the same result for deleting the first or the second variables. This is not essential. But Mal'cev's definition gives the wrong result for fictitious unary functions and is not applied to constants. This is essential.

Operation * of Substitution
This operation is main in compositions.
Definition The two-ary operation * of substitution replaces the first variable in a function x must be present. This is one of properties of Post algebra.

Order of Functions
We use an order on functions to construct classification of finite closed sets.

Minimal Subalgebras
Every minimal subalgebra generates only itself. It contains a constant or a unit of some monoid.
We have found more simple proof of the next theorem on numbers of minimal subalgebras.
Theorem (Lau, 2006 The number of such functions equals

Family of Functions with the Same Diagonal
We will call families of functions with the same diagonal briefly families.
Families were introduced by Post. There are 4 families in two-valued logic: α , β , γ , δ . Post's classification of function and their closed sets is based on the families. Families of functions exist in all k -valued logics too. The number of these families is 2 k . We will use them to classify finite closed sets. We have ( ,..., ) = f j j j for every j X ∈ . In this case

Branches and Bundles of Branches
An inclusion diagram of finite closed sets (finite subalgebras) consists of branches.
Definition A set of subalgebras in an inclusion diagram is called a branch if the set is a sequence of subalgebras such that the last subalgebra belongs to level 0 of the inclusion diagram, before the last subalgebra belongs to level 1, and so on. Two branches are isolated if they have no common subalgebra. A bundle of branches is a set of all branches with the same minimal subalgebra. Two branches are isolated if they have no common subalgebra.
By definition, isolated branches and bundles have different minimal subalgebras.
Bundles of branches can be isomorphic. Definition Two bundles of branches are isomorphic if there is a one-to-one mapping of subalgebras of these bundles such that the bundles have identical inclusions of the subalgebras.
Using isomorphism we can build more beautiful diagrams by using only one of isomorphic bundles of branches (see Fig.  4-6).
We call the boundary of two isomorphic bundles a mirror. If a bundle has several isomorphic bundles then the bundle has several mirrors.

Main Properties of Finite Subalgebras
Finite closed sets are subalgebras. The main property of the subalgebras is the next: their unary functions are elements of a monoid Proof. Let a subalgebra belong to two branches. Then the subalgebra has two minimal subalgebras, i.e. it has two units. But any monoid has only one unit.
By theorem, bundles of branches are isomorphic too. Therefore bundles create natural classification: every subalgebra belongs only to one branch.

Number of Subalgebras
There is no formula for the number of subalgebras for all k since all finite symmetric groups are created by subalgebras but some symmetric groups are sporadic. Conditionally we put minimal subalgebras on level 0, we put subalgebras directly containing minimal subalgebras on level 1, we put subalgebras directly containing level 1 on level 2, and so on.
We have found all subalgebras of all levels at k ≤ 10. The numbers of the subalgebras are present in table 1 (in 3.6). But diagrams containing subalgebras of all levels are present only at k ≤ 5 since the other diagrams have big volume. Only branches containing 0 and x are present at = 6 k . The diagrams are in the appendix.
The number of minimal subalgebras for all k was given in the previous section. In the next subsections we will give the number of subalgebras, containing constant 0, on level 2 (level 1 is trivial) and the number of subalgebras, containing function x , on level 1.

Subalgebras Containing Constants
Constants are on level 0. They are generated only by fictitious functions. Therefore, all subalgebras on level 1 have fictitious functions, their number equals the number of constants, i.e. equals k . Every subalgebra on this level contains two functions: a constant and a fictitious function.
The next theorem allows to build all subalgebras on level 2 and to count their numbers. Each of these subalgebras is three-membered. One member is a generator of a subalgebra, the second member is a fictitious function, the third member is a constant.
Theorem If a subalgebra belongs to level 2 and contains a constant then the number of such the subalgebras equals Proof. It is enough to find the number of subalgebras for constant 0 since the numbers of subalgebras for other constants are the same.
We represent a function of a subalgebra of the second level in the form  (

Subalgebras Containing x
Every unary function of the subalgebras is an element of the symmetric group. A product of functions is a product of elements of the symmetric group. A power of a function is multiple product, in which every factor is the function. And every element of the group can be present as a set of cycles.
Level 0 contains only one minimal subalgebra { } x . We must find numbers of subalgebras of the other levels.
Let level 1 be given. We will call subalgebras of level 1 briefly subalgebras. Every subalgebra has several functions to be generators of the subalgebra and function x . A name of a subalgebra is a name of minimal generator of the subalgebra. We call minimal generators briefly generators. The next lemmas and the next theorem specify the number of subalgebras.
Lemma 1 A generator of a subalgebra of level 1 can have several cycles of the same length p ( p is a prime number) and several cycles of length 1. Subalgebras with the other generators do not belong to level 1.
Proof. We can exclude cycles of length 1 since they are not changed by generations. If a function has a cycle of prime length p then the function and its powers generate the same functions. Indeed, the function and its powers are