This program is a well-known example in computer science, since the func-tion computed by this program grows extremely rapidly. We wish to provethat this program always terminates, and therefore defines a total function.Counting down fromxis not good enough, since the third equation doesnot decreasex+ 1, because of the embeddedAck(x+ 1, y). We will devisea different way of counting down, by defining a well-founded partial orderwith the property that it always decreases to a terminating state.DEFINITION5.9 (WELL-FOUNDEDPARTIALORDERS)Apartial order(A,≤)iswell-foundedif and only if it has no infinite de-creasing chain of elements: that is, foreveryinfinite sequencea1, a2, a3, . . .of elements inAwitha1≥a2≥a3≥. . ., there existsm∈Nsuch thatan=amfor everyn≥m.For example, the conventional numerical order≤onNis a well-foundedpartial order. This isnotthe case for≤onZ, which can decrease for ever.
This is the end of the preview.
access the rest of the document.