KLEENE’S NORMAL FORM THEOREM FOR ARITHMETICAL PETRI NETS

This paper gives a proof of the normal form theorem for arithmetical Petri nets (APN). The normal form theorem was introduced by Kleene for the general recursive computation paradigm in terms of system of equations. APN are inhibitor Petri nets that perform three types of arithmetical operations; increment, decrement and test for zero. The proof is based on the idea of computation tree, where each node of such a tree will tell us how a value needed for the arithmetical operations can be inductively obtained. Then, using arithmetization plus course of value recursion a primitive recursive predicate is defined from which by means of a primitive recursive function the desired characterization for the value of the output function is established. AMS Subject Classification: 03D78, 03D60, 03D20, 03D10


Introduction
This paper gives a proof of the normal form theorem for arithmetical Petri nets (AP N ).The normal form theorem was introduced by Kleene for the general recursive computation paradigm in terms of systems of equations [1].AP N are inhibitor Petri nets (an extension of Petri nets, see [3]) that perform three types of arithmetical operations; increment, decrement and test for zero.It is a well known result that AP N are equivalent to Turing machines and therefore inherit all their properties.In particular the normal form theorem.The equivalence proof follows by noticing that AP N simulate register machines and register machines, result to be Turing equivalent, as was proved by Shepardson and Sturgis (see [2]).However, this is not for free, an increase in computational power, results in a decrease in decision power.In this paper a different approach based on the idea of computation tree is employed [4].Each node of such a tree will tell us how a value for the arithmetical operations can be inductively obtained.Then, using arithmetization plus course of value recursion a primitive recursive predicate is defined from which by means of a primitive recursive function the desired characterization for the value of the output function is established.In general, the normal form theorem for AP N is given for granted, however is not easy to find a proof of it, even today with the power of the Internet.This document has historical meanings going back to Kleene 1936 [1] and the approach results to be original and elegant.The paper is organized as follows: In Section 2, all the preliminaries and information needed to understand and access the proof are given.In Section 3 the theorem and its proof are presented, some consequences are also addressed.
A Petri net (P N ) is a 5-tuple, P N = {P, T, F, W, M 0 } where: P = {p 1 , p 2 , ..., p m } is a finite set of places, T = {t 1 , t 2 , ..., t n } is a finite set of transitions (represented respectively by circles and bars), F ⊂ (P ×T )∪(T ×P ) is a set of arcs, W : F → N + 1 is a weight function, M 0 : P → N is the initial marking, P ∩ T = ∅ and P ∪ T = ∅.
Notice that if W (p, t) = α or W (t, p) = β, then, this is often represented graphically by α or β arcs from p to t or t to p (through arrowheads) each with no numeric label.Let M k (p i ) denote the marking (i.e., the number of tokens) at place p i ∈ P at time k and let for all p i ∈ P such that (p i, t j ) ∈ F .If a transition is enabled then, it can fire.If an enabled transition t j ∈ T fires at time k then, the next marking for p i ∈ P is given by Let A = [a ij ] denote an n × m matrix of integers (the incidence matrix) where 1} n denote a firing vector where if t j ∈ T is fired then, its corresponding firing vector is u k = [0, ..., 0, 1, 0, ..., 0] T with the one in the j th position in the vector and zeros everywhere else.The non-linear difference matrix equation describing the dynamical behavior represented by a P N is: where if at step k, a − ij < M k (p j ) for all p i ∈ P then, t i ∈ T is enabled and if this t i ∈ T fires then, its corresponding firing vector u k is utilized in the difference equation to generate the next step.Notice that if M´can be reached from some other marking M and, if we fire some sequence of d transitions with corresponding firing vectors u 0 , u 1 , ..., u d−1 we obtain that A Petri net with inhibitor arcs (P N I) is an extension of a P N where now there exists the possibility of connecting a place with a transition through an arc, where the arrowhead has been substituted by a small circle.A new firing rule is allowed, a transition is enabled if the marking of the places corresponding to inhibitor arcs are empty and as a consequence a new marking M k+1 will be generated.
Definition 1.An arithmetic Petri net (AP N ) consists of a P N I that executes the following three arithmetical operations: increment by one, decrement by one and testing for zero, as is depicted in Figure 1.
Remark 2. Notice that the place p i is the one that controls the execution of the arithmetical operation.Definition 3. A partial function f on N is simply a function whose domain is a subset of N .If f is a partial function on N and aǫN , then we write f (a) ↓, and say that f (a) is defined to indicate that a is in the domain of f ; if a is not in the domain of f , we write f (a) ↑ and say that f (a) is undefined.If a partial function on N has the domain N , then it is called total.
there exists an AP N with an output place p y , a set of input places P I = {p x 1 , p x 2 , ..., p xm }, a set of auxiliary places P A (as many as needed), not necessarily disjoint such that when the initial marking of the input places is set equal to the values of the variables of the function f , and all the other markings are assumed to be set to zero except for the places that control the execution of the arithmetical operations.A final marking is reached with the marking of p y equal to the value of f i.e., M k (p y ) = f (x 1 , x 2 , . . ., x m ).In the case when the AP N does not reach a final marking i.e., there exists an infinite sequence of markings M 1 , M 2 , . . .beginning from the initial marking, then f (x 1 , x 2 , . . ., x m ) will be undefined denoted as f (x 1 , x 2 , . . ., x m ) ↑.
Remark 5.It is supposed that there are always enough tokens in the places that control the execution of the arithmetical operations.This is similar to the execution of a software program where you go from one instruction to another or the same one.Therefore an AP N computation behaves as a software Figure 2: AP N that computes the identity function program (see [5]).This similarity is of great help in understanding the logic in what is next presented.Example 6.The identity function is AP N computable as is depicted in Figure 2, and which is constituted by three blocks each one representing the decrement, increment and test for zero arithmetic operations of the AP N .
Remark 7. Notice that a place can play two (or more) roles in a computation depending on the arithmetical operation that is being executed, as occurs in this example.It is also important to point out that we do not need such a complicated AP N in case our only goal were to replicate at the output the input, since this can be easily achieved with a P N formed by two places and one transition.Definition 8.A partial function f on N is simply a function whose domain is a subset of N .If f is a partial function on N and aǫN , then we write f (a) ↓, and say that f (a) is defined to indicate that a is in the domain of f ; if a is not in the domain of f , we write f (a) ↑ and say that f (a) is undefined.If a partial function on N has the domain N , then it is called total.
The following list of functions are called initial functions: Definition 9. Let f be a function of k variables and let g 1 , . . ., g k be functions of n variables.Let Then h is said to be obtained from f and g 1 , . . ., g k by composition.
Definition 12.A function f is primitive recursive if it can be obtained by a finite number of applications of composition and recursion, beginning with the initial functions.
Definition 13.A function f is partial recursive if it can be obtained by a finite number of applications of composition, recursion and minimalization, beginning with the initial functions.Definition 14.A function f is recursive if it can be obtained by a finite number of applications of composition, recursion and minimalization of total functions, beginning with the initial functions.
In particular every primitive recursive function is recursive (for a proof see [5] and/or [6]) .Notice that if f is recursive then it is partial recursive and total.
Definition 15.A predicate is said to be primitive primitive recursive (partial recursive, recursive) if its characteristic function is primitive recursive (partial recursive, recursive).
Next, it is proven that every recursive function is AP N computable.
Theorem 16.Let f be a recursive function then f is AP N computable.
Proof.This proof follows exactly the same lines given for flowcharts discussed in [4], therefore just an outline is next presented.By induction on the definition of recursive functions, first, it is proven to be true that the initial functions are AP N computable.That the successor is, it is immediate, using the increment by one function.That the nullity is, follows using the decrement by one function, which will be operating until all the tokens in p x are used and the marking of p x is zero (see Figure 1b).Finally, for the projection function use the AP N given in example 6, i.e., the identity function, for the x i variable.Now lets suppose that for each case i.e., composition, recursion and minimalization, a set of functions which are AP N computable have been obtained.Then, based on the diagrams presented in pages ( 66) and ( 67) of [4] (representing an AP N computation as a block) the resulting function derived by applying composition, recursion and minimalization is AP N computable.

The Normal Form Theorem for AP N
Arithmetization is a method of translating reasoning in natural language by arithmetical propositions, with the goal of substituting arguments with computations.Primitive recursive predicates and functions are the paradigm used to carry out arithmetizations ([4]).Prime numbers Π iǫI and factorizations are used for coding since they are well known to be primitive recursive.The code assigned to the sequence [x 1 , x 2 , . . ., x n ] is defined as: and the decoding is given by: , where ln(x) is the length of x and (x) n is the n−th component of x.Th concatenation of two sequences * is defined to be [x 0 , x 1 , . . ., x n ] * [y 1 , y 2 , . . ., y m ] = [x 1 , x 2 , . . ., x n , y 1 , y 2 , . . ., y m ].Next, the following result which is basic for the proof of the normal form theorem, is given without proof which can be find in ( [4]).

Proposition 17. (Course of values recursion)
The class of primitive recursive functions is closed under recursions in which the definition of f (x 1 , x 2 , . .., x n , y +1) may involve not just the last value f (x 1 , x 2 , . . ., x n , y) but any number of (and possibly all) values f (x 1 , x 2 , . . ., x n , z) z≤y already obtained.Formally, let f be the history function of f defined as: Then if f is defined as: and g, h are primitive recursive, so is f .Theorem 18. (Normal Form Theorem for AP N ) Let f (x 1 , x 2 , . . ., x n ) be AP N computable, then there is a primitive recursive function U , a primitive recursive predicate T n and a number e such that, Proof.The idea of the proof based on the notion of computation tree has been borrowed from the beautiful book of Odifreddi ([4]).A computation tree allows us to organize the values of a given AP N computable function f in a natural way.Each node of such a tree will tell us how a value needed in the computation can be inductively obtained by means of the AP N arithmetical operations.The proof will be presented in a number of steps.
• Step 1. Definition of the AP N.
The AP N will consist of: (1) a set of input places, denoted by {p x i } iǫN whose elements correspond to each one of the input variables x 1 , x 2 , . . ., x n with nǫN , an output place denoted by p y , a set of auxiliary places, denoted by {p z i } m i=1 which correspond to variables possibly needed to compute f , a set of places associated to each one of the arithmetical operations performed over the input places and/or the auxiliary places and/or the output place (see the figures given in definition 1) denoted by {p Ix i ∨z i ∨y } iǫN , {p (I+1)x i ∨z i ∨y } iǫN , and {p Bx i ∨z i ∨y } iǫN , and (2) a set of transitions.(This notation was used in example 6) • Step 2. Associate numbers to the places and to the arithmetical operations of the AP N .
To each one of the places, a unique numeral is given which will be denoted by ♯p, where p belongs to anyone of the set of places defined in step 1.
In case of belonging to more than one, a unique number will be assigned which will be taken as the number that represents the place for the other cases.A numeral will also be assigned to each one of the arithmetical operations performed by the AP N which will be denoted by ♯A and in particular, ♯Inc, ♯Dec and ♯B, depending on each case.
• Step 3. Associate numbers to the computations.
This is done by induction on the construction of the computation tree.
First of all, we assign numbers to nodes: Thus a node is represented by four numbers: corresponding respectively to e = [♯A, ♯p Ix i ∨z i ∨y , M k (p Ix i ∨z i ∨y ), ♯p (I+1)x i ∨z i ∨y , M k (p (I+1)x i ∨z i ∨y ), called the index at time k, the inputs, the auxiliary variables and the output.
Remark 19.A node gives us an instantaneous complete description of the state and the type of arithmetical operation of the AP N at time k.Uniqueness in the number assigned to the node due to the fundamental theorem of arithmetic plus uniqueness in the number assigned to the places, is of great importance for decoding purposes i.e., given a fixed number, the topological representation of the node which consists of the type of instruction and the places that are involved as well as its markings can be recovered, whenever the representation obtained from the number makes sense in terms of the definition of the arithmetical operations.
We then assign numbers to trees: each tree T consists of a node v with associated number ♯v, and of a certain number (finite, and possibly equal to zero) of ordered predecessors, each one being a sub-tree T i .By induction, we assign to this tree the number where ♯T i is the number assigned to the sub-tree T i i.e., ♯T i = i + 1 .In particular, if the vertex with number ♯v does not have predecessors, then it has number [♯v] as a tree.
• Step 4. Translate in a primitive recursive predicate T (w) the property that w is a number coding a computation tree.
Remark 20.To increase readability we use commas instead of nested parentheses, and write e.g.(a) i,j,k in place of (((a) i ) j ) k ).
(which are a direct consequence of the definitions given in step 3).
Increment: From the description given in Figure 3, there are three cases to be considered: Increment in the input: Increment in the auxiliary variables: Increment in the output: Therefore we get that: Decrement: This case is exactly the same as the previous one just change plus one by minus one for each one of the input, auxiliary and output places.The description is denoted by Dec(w).
• Step 6. End of the proof.
Let f (x 1 , x 2 , . . ., x n ) be AP N computable with number e. Since f is total, it is guarantee that for every set of values of the input variables there is a computation tree employing the computation procedure given by e. Therefore searching for the smallest tree i.,e., the one with the smallest code number and extracting the value of the function by looking at its fourth node number we get that: f (x 1 , x 2 , . . ., x n ) = U (µ w T n (e, x 1 , x 2 , . . ., x n , w)).

Figure 1 :
Figure 1: AP N that executes increment.decrement and test for zero

Fig
Fig 4. No branching