Functions Definable by Numerical Set-Expressions
A "numerical set-expression" is a term specifying a cascade of arithmetic and logical operations to be performed on sets of non-negative integers. If these operations are confined to the usual Boolean operations together with the result of lifting ad…
Authors: Ian Pratt-Hartmann, Ivo D"untsch
F unctions Definable b y Numerical Set-Expressions Ian Pratt-Har tmann 1 and Iv o D¨ un tsch 2 1 School of Computer Science, Universit y of Manc hester, Manchester M13 9PL, U.K. ipratt@cs. man.ac.uk 2 Department o f Computer Science, Brock Universit y , St. Catharines, ON, L2S 3A1, Canada. duentsch@br ocku.ca Abstract. A numeric al set-expr ession is a term sp ecifying a cascade of arithmetic and log ical op erations to be p erformed on sets o f non-negative integ ers. I f these op erations are confined to the usual Bo olean op erations together with t he result of lifting ad d ition to the level of sets, we sp eak of additive cir cuits . If th ey are confined t o the usual Bo olean op erations together with the result of lifting addition and multiplication to the lev el of sets, we speak of arithmetic ci r cuits . In th is pap er, we inv estigate t h e definability of sets and fun ctions by means of additive and arithmetic circuits, o ccasionally augmented with additional op erations. Keywords. Arithmetic circuit, integer exp ression, definab ility , expres- sive p o wer. 1 In tro duction Let N denote the set of na tur al num b ers { 0 , 1 , . . . } , and P its power set. Fix a countably infinite set of v ariables V = { x, y , z . . . } to r a nge ov er elements of P , and let O b e any collection of functions P k → P (for v arious k ≥ 0). A numeric al set-expr ession over O (for short: an O - cir cuit ) is an ex pr ession formed, in the exp ected w ay , using the v ariables V , the singleton constants { n } for n ∈ N , the functions in O , and the usua l Bo o lean op erator s ∅ , N , ∪ , ∩ a nd − (complement in N ). If τ is an O -circuit featuring o nly the v aria bles x 1 , . . . , x k , then τ ( x 1 , . . . , x k ), with v ariables in the indica ted or der, defines a function P k → P in the obvious sense; in particular, if τ is an O -circuit with no v a riables, then τ ( ) defines a set of natur a l n umbers. W e a sk: which functions and sets ar e th us de fina ble by O - circuits, fo r v ario us salient collections O ? Two o pe rations in particular na turally suggest themselves as ca ndidates for inclusion in O . Denote b y + a nd • the result of lifting addition and multiplication to the algebr a of sets, th us: s + t = { m + n | m ∈ s and n ∈ t } ; s • t = { m · n | m ∈ s and n ∈ t } . (1) for s , t ∈ P . W e call { + } -circuits additive cir cuits and { + , •} -circuits arithmetic cir cuits . In the sequel, we shall fo cus on ar ithmetic c ir cuits and their ex tensions with a rang e of additional op erations. 2 Consider, for example, the (v ar iable-free) ar ithmetic circuits Evens = { 2 } • N Primes = { 1 } ∩ { 1 } • { 1 } . (2) F rom the a b ove definitions, Evens defines { 2 n | n ∈ N } , the set o f ev en num b er s , while Primes de fines the set of natural num b ers equal neither to 1 no r to the pro duct of any tw o num b er s themselves not equal to 1—that is, the set of primes. It follows that the circuit Primes + P r imes ∩ Evens ∩ { 0 } ∪ { 2 } defines the set of counterexamples to Goldbach’s celebrated conjecture that every ev en num b er greater than 3 is the sum of tw o primes. The functions defined b y O -cir c uits featuring v aria bles are determined similarly , with the v alues of the v a riables being g iven by the arguments to the functions. There is no requirement that these arguments themselves b e definable by O -circuits. The moniker O - cir cuits for numerical set-expr essions over O alludes to the ‘circuitry’ found in computing technology , and is sugg ested by the depictio n of these expr essions as la b e lle d, directed g raphs, sp ecifying a cascade of arithmetic and lo gical op erations to b e p er fo rmed o n sets of num b ers. Thus, for example, the ar ithmetic circ uits of (2) may be de picted as in Fig. 1 . Ea ch no de in these graphs ev aluates to a set of num b ers , repre s entin g a stag e of the computation per formed by the circuit. No des without predecessor s in these gra phs a re la- belle d by consta nt s (or v a riables) indicating the s ets o f num b ers to whic h they ev aluate. No des with predecesso rs in the graph are lab elled with functions (of the appr opriate arity) to b e p erformed on the v a lues of their immedia te prede- cessors ; the results o f these oper ations are then taken to be the v alues o f the no des in question. Finally , one of the no des—here identified by a double circle— is designated a s the cir cuit output , and represents the final v alue co mputed. The int erpr etation of the gra phs of Fig . 1 and their co r resp ondence to the arithmetic circuits of (2) sho uld b e obvious. The only ess ent ial difference be tw een circuits their g raphical representations is that the latter, but not the former, allow op- erations to shar e arguments (as illustrated in Fig. 1 b), thus p ermitting a more compact representation o f the set or function b eing defined. How ever, from the po int of view of ex pressive p ow er, the tw o representations are entirely equiv alent. • N { 2 } (a) ¯ ¯ ∩ { 1 } • (b) Fig. 1. Graphical depictions of t wo arithmetic circuits: (a) the circuit { 2 } • N , defining the set of ev en num b ers; ( b) th e circuit { 1 } ∩ { 1 } • { 1 } , defi ning the set of primes. In principle, nu meric a l set expres sions may be considered ov er any collection of functions O with arguments and v alues in P . In par ticular, any of the famil- iar ar ithmetic op era tions definable on N —squa ring, exp onentiation, (truncated) 3 subtraction etc.—ca n b e lifted to the level of sets, a nalogous ly to addition a nd m ultiplication. Other salient o p er ations on sets of na tural num b ers a re not the result of lifting any arithmetic o p er ations, how ever. Na tural exa mples are the functions Max( x ) = ∅ if x empty N if x infinite { max( x ) } otherwise Card( x ) = ( {| x |} if x finite N otherwise ε ( x ) = ( { 0 } if x empty ∅ otherwise , Fin( x ) = ( { 0 } if x finite ∅ otherwise , and the function ⇓ ( x ) = { m ∈ N | ∃ n ∈ x s.t. m ≤ n } (read: downarr ow ). The functions Max a nd C a rd return a singleton containing, resp ectively , the maximum v alue and cardina lit y of their arguments, wher e de- fined. W e may think of the function ε ( x ) as a test for the prop erty of emptiness, by tre ating the sets { 0 } and ∅ a s the truth-v alues true and false , r e s pe c tively; similarly for Fin ( x ). The function ⇓ is a v a r iant o f Ma x—primarily of technical int eres t—which ‘fills in’ all smalle r elements. In the seque l, we shall inv estigate the extr a expressive p ow er provided, in the context of b oth additive and ar ith- metic circuits, by these functions. V ariable-free additive circuits seem first to hav e b een studied by Stockmeyer and Meyer [17], under the name inte ger expr essions . In terms o f F ormal Lan- guage Theory , integer ex pressions ar e the sa me a s s ta r-free r egular expressions ov er a 1- e lement alpha b et, where the integer n sta nds for the string o f leng th n . V ariable- fr ee arithmetic circuits were first identified by McKenzie and W ag- ner [10, 11]). F or any collection of functions O , t he memb ership problem for v aria ble-free O -circuits is as follows: given a n umber and a v ariable- free O - c ircuit, determine whether that num be r is in the set defined by that O -circ uit. The non- emptiness problem for v aria ble-free O -circuits is as follows: given an O -c ircuit, determine whe ther the set of num b ers it defines is non-empty . Sto ckmeyer and Meyer show ed that, for a dditive circuits (i.e. O = { + } ), b o th pr oblems are PSp ace -complete. The decidability of the mem b ership and no n-emptiness prob- lems for v ar iable-free arithmetic circuits (i.e. O = { + , •} ) is still op en. How ever, these pr oblems beco me decida ble when v a rious r estrictions a re imp osed on the op erator s that may app ear in the circuits in question (including the Bo olean op erator s ). F or a complexity-theoretic ana lysis of these pro blems, se e Meyer a nd Sto ckmey er, op. cit. , McKe nz ie and W agner , op. cit. , Y ang [19 ] and Glaßer et al. [1, 2]. Additiv e cir cuits with v ariables a re in vestigated in Je ˙ z and Okho tin [7 , 8]. Let us call an additive c ircuit p ositive if it do es not featur e an y complementation op- erators . Je ˙ z and Okho tin consider sy s tems of eq uations { σ i ( x ) = τ i ( x ) | 1 ≤ i ≤ n } , whe r e the σ i and τ i are p ositive additive circuits. They show [8, Theorem 5 ] 4 that, if ( s 1 , s 2 . . . , s n ) is the uniq ue (leas t, greates t) solution of some s ystem of po sitive additive circuit equa tio ns, then s 1 is re cursive (r.e., co- r .e.); conv ersely , for every recursive (r.e., co-r.e.) set s ∈ P , there ex ists a system of po sitive additive circuit eq uations with a unique (leas t, greates t) solutio n ( s, s 2 . . . , s n ). In the terminology o f that pap e r, s is r epr esent e d b y the sys tem of equatio ns in question. F r o m this, J e ˙ z and Okhotin deduce that the satisfia bility problem for systems of p ositive additive c ir cuit equations is c o-r.e.-co mplete. Similar r e - sults ho ld with so- called r esolve d sys tems of equations—namely those in which x = ( x 1 , . . . , x n ) and σ i ( x ) = x i for all i (1 ≤ i ≤ n ). Je ˙ z and Okhotin als o show [7 , Theorem 3.1] that the family of sets representable as least solutions of resolved systems o f equa tions is included in ExpTime , and moreov er contains some E xpTime -hard s ets. The plan of the pap er is as follows. Section 2 contains the pr incipal defini- tions a nd technical ba ckground use d in the sequel. Section 3 gives some exam- ples of sets definable by a rithmetic circuits, and establishes the low recognition- complexity of all such sets. Sectio n 4 shows that v arious set-functions, including Max, Card and ⇓ , are not defina ble by ar ithmetic circ uits, under a wide range of extensions, and presents more restr icted undefinability r esults co ncerning the functions ε a nd Fin. Section 5 employs the results o f the tw o preceding sectio ns to inv estigate the definability of functions N k → N by additive a nd arithmetic circuits. Se c tio n 6 co nsiders the effect of adding the functions Max, Card and ⇓ to additive a nd arithmetic circuits. Section 7 co ncludes. 2 Preliminaries Recall from Section 1 that N deno tes the set o f natur al num b ers , P its p ower set, and V a countably infinite set of v ariable s . Henceforth, w e sha ll refer to natural num ber s simply as nu mb ers . W e call a function (of any a rity ≥ 0 ) with arguments and v alues in P a set-funct ion . Let O be any co lle ction of s e t-functions. F orma lly , a n O - cir cuit is defined inductively as follows: (i) a ny v ariable in V is an O - circuit; (ii) if τ 1 , . . . , τ n are O - circuits ( n ≥ 0), and o ∈ O is of ar it y n , then o ( τ 1 , . . . , τ n ) is a n O -cir cuit; (iii) if τ 1 and τ 2 are O -circuits, then s o ar e τ 1 ∩ τ 2 , τ 1 ∪ τ 2 , τ 1 , ∅ , N and { n } , for all n ∈ N . Let o b e a ny o f the functions in O , o r one of the Bo o lean op er a tors or singleton constants. In keeping with the terminology of circuitry , we s pe a k, infor ma lly , of a gate which c omputes o , or, more simply , o f an o - gate to denote a p ositio n in an O -c ircuit a t which o o ccur s. W e typically use the letter s ρ , σ , τ to r ange ov er cir cuits. If x = ( x 1 , . . . , x n ) is a no n-empt y tuple o f v aria bles in V , a nd τ a circuit featur ing only the v ar iables x , we o ptionally write τ as τ ( x ) to specify the order of v aria bles. An interpr etation is a function ι : V → P mapping v aria bles t o sets of nu mbers . Interpretations ar e ex tended homomo rphically to O -circuits by setting ι ( o ( τ 1 , . . . , τ k )) = o ( ι ( τ 1 ) , . . . , ι ( τ k )) for any op era to r o , inluding the Bo olean and constant o p erators . F or the sake of rea dability , if τ ( x ) is an O -circuit and ι an int erpr etation mapping the tuple of v aria bles x to the tuple of sets of num b e rs s , then we denote ι ( τ ) b y τ ( s ). In particula r, if τ is v ariable - free, the s et ι ( τ ) (which 5 is indep endent of ι ) is denoted by τ ( ). If x is an n -tuple of v aria bles ( n > 0 ), the function define d by an O -circuit τ ( x ) is the function s 7→ τ ( s ). Any function F : P n → P which can b e written in this wa y is said to b e O - definable . Likewise, if τ is a v ar iable-free O -c ircuit, the se t define d by τ is the set of num ber s τ ( ). An y set s ∈ P which can be wr itten in this wa y is said to b e O - definable . The following additional notation and terminolo gy will b e used. W e write σ \ τ to abbrevia te σ ∩ τ , wher e this impr ov es rea dability . F urther, if, n 1 , . . . , n k are num ber s, we wr ite { n 1 , . . . , n k } to denote the circuit { n 1 } ∪ · · · ∪ { n k } . W e omit par e ntheses where p oss ible , taking • to have pr ecendence ov er + , and making use of the a sso ciativity o f ∩ , ∪ , + and • . If τ ( x , . . . , x n ) is an O - c ir cuit defining the function F : P n → P , a nd σ 1 , . . . , σ n are also O -cir cuits, we write τ ( σ 1 , . . . , σ n ) to denote the O -cir cuit obtained by substituting each σ i for x i in τ . Alternatively , where there is no danger of confusion, we allow ours e lves to write F ( σ 1 , . . . , σ n ) to denote this O -cir c uit. (This is not strictly cor rect, but o bviates a lot of duplicate notation.) If O 1 , O 2 are collections of set-functions, we sp eak of ( O 1 , O 2 )-circuits rather than the more cor rect ( O 1 ∪ O 2 )-circuits; likewise, if o is a set-function, we sp eak of ( O 1 , o )-c ir cuits r ather than ( O 1 ∪ { o } )-circuits; and so on. The letters k , ℓ , m , n will g enerally rang e over num ber s, and the letters s , t over sets o f num ber s. Likewise, m , n will rangle over tuples of num b ers , and s , t ov er tuples o f sets of num b ers. W e o ccasio nally trea t tuples of n umbers as sets where no confusion ar ises; th us, for example if n = ( n 1 , . . . , n k ), we wr ite min( n ) for min( { n 1 , . . . , n k } ), a nd so on. F o r an y in teger s a , b , w e tak e [ a, b ] to deno te the set { a , a + 1 , . . . , b } (empt y if b < a ), and [ a , ∞ ), the infinite set { a, a + 1 , . . . } . W e denote the car dinality of a set o f num be r s s by | s | , and write s | m for the set s ∩ [0 , m ]. If s = ( s 1 , . . . , s n ) is a tuple of sets o f num b ers, we write s | m for the tuple (( s 1 ) | m , . . . , ( s n ) | m ). If the arity is clear from context, ∅ denotes the tuple ( ∅ , . . . , ∅ ). W e endow P with the top ology whose bas is is the collection of s ets {{ s ∪ t | t ⊆ [ m , ∞ ) } | m ∈ N , a nd s ⊆ [0 , m − 1] } , This top ology , whic h is compact and Haus dorff, is induced b y a v ariety of natur al metrics, fo r example d ( s, t ) = ( 0 if s = t 1 / (min(( s \ t ) ∪ ( t \ s )) + 1) otherwise . Hence, the metr ic o n the pro duct space P n given by d (( s 1 , . . . , s n ) , ( t 1 , . . . , t n )) = max 1 ≤ i ≤ n d ( s i , t i ) induces the pro duct top olo gy . It is often helpful to picture the topolo gical s pace P in its alternative g uis e a s Cantor sp ac e —the space of infinite sequences { 0 , 1 } ω with basis of open s ets {{ ς · | ∈ { 0 , 1 } ω } | ς ∈ { 0 , 1 } ∗ } —via the bijection ϑ 7→ { n ∈ N | ϑ [ n ] = 1 } , where ϑ ∈ { 0 , 1 } ω . The notio ns of con tinuit y a nd uniform contin uity ar e understo o d in the usual wa y with resp ect to the above metric d . Sp ecifically , F : P n → P is c ontinuous at s if, for all ǫ > 0, there exists δ > 0 s uch that, for all t ∈ P n , d ( s , t ) ≤ δ 6 implies d ( F ( s ) , F ( t )) ≤ ǫ ; a nd F is uniformly c ontinuous on D ⊆ P n if, for all ǫ > 0, ther e exists δ > 0 s uch that, for all s , t ∈ D , d ( s , t ) ≤ δ implies d ( F ( s ) , F ( t )) ≤ ǫ . Equiv alently , F is co ntin uous at s if, for all m ≥ 0 , there exists n ≥ 0 such that, for all t ∈ P n , s | n = t | n implies F ( s ) | m = F ( t ) | m ; similarly for uniform contin uity . The following r efinement of uniform co nt inuit y will b e useful in the sequel. Supp ose h : N → N is a function. W e say F : P n → P is h - c ontinuous on D if, for all m ∈ N , and all s , t ∈ D , s | h ( m ) = t | h ( m ) implies F ( s ) | m = F ( t ) | m . Thus, F is unifor mly contin uous on D if a nd only if F is h -contin uous for some h . W e are g enerally interested only in the case where h is inflationary —i.e., h ( m ) ≥ m for all m . I f h is the identit y function, h : m 7→ m , we say that F is identic al ly c ontinuous on D . If D is compact—for example, if D = P n —contin uity at every po int of D implies uniform contin uity on D . The conv erse o f this statement is false; how ever, if F is unifor mly contin uous on any domain D , then, trivially , the r estriction of F to D , denoted F | D , is everywhere contin uo us in D . Int uitively , a contin uous function is one for which the initial s e gment of its v alue—of any desired le ngth—can b e fixed by determining s ufficiently long initial segments of its arguments. Of the functions encountered in Section 1, it is r outine to chec k that the B o olean op erations a nd + ar e identically contin uous on the whole space. By contrast, x • y is no t cont inuous at an y po int ( x, y ) = ( s, ∅ ) or ( x, y ) = ( ∅ , s ), where 0 ∈ s , but is cont inuous elsewhere . Similarly , ε ( x ) is discontin uous at the p oint x = ∅ (contin uous elsewhere ); ⇓ ( x ) is dis contin uo us at x = s for all finite s (cont inuous elsewhere); and Ma x , Card and Fin are everywhere discontin uous. Some of the r esults o btained below concern classes o f s e t-functions; we in- tro duce tw o imp or tant cla s ses now. A set-function who se v alues ar e confined to { 0 } a nd ∅ will b e referred to a s pr e dic ate ; we denote the set of all predicates, of any arity , by P . As remarked ab ov e, we are to think of { 0 } and ∅ as the truth- v alues tru e and false , resp ectively . Thus, ε and Fin, defined in Section 1, are in P ; howev er, all the Bo olean op er ators and the functions + , • , ⇓ , Ma x a nd Car d are not. The second class of set-functions we shall b e int er e sted in are those that are everywhere contin uous—and hence, by compactness , uniformly contin uous on the whole space. W e denote the s et of everywhere-contin uous set-functions, of any arity , by U . Thus, all the Bo olean op er ators and the function + a r e in U ; how ever, • , ε , Fin , ⇓ , Max and Card a re no t. 3 Sets definable by arithmetic circuits W e b e g in our analys is with a brie f discussion of the definability of sets o f n umbers by v aria ble- free circuits featuring the op er ators introduced in Section 1. The case of purely additive cir cuits is unint er e sting: a routine structura l induction shows that, if τ is a v a riable-free additiv e circuit, then τ ( ) is finite or co-finite; conv ersely , every finite or co-finite set is trivially definable by an additive circuit. F urther, since the ga tes ⇓ , Max and Car d, as well as any predicate- gates, yield finite or co- finite o utputs, these gates o bviously cannot increase the co llection 7 of definable sets. Hence, when discussing set-definability , we may as well restrict attent ion to ( + , • )-circuits—or, as we agr eed to call them, ar ithmetic circuits. W e gav e tw o exa mples of such sets in Section 1: the s e t o f even nu mbers and the set o f primes , defined in (2) by the arithmetic c ir cuits Evens and P rimes, resp ectively . Other na tural c a ndidates a re e asy to find. F or example, if p is any fixed prime p , the circuit Po w p = (Primes \ { p } ) • N defines the s et { p k | k ∈ n } of a ll powers of p (see [18]), s ince that is simply the set of num b ers no t divisible by any pr ime other than p . Equally evident is the fact that, for fixed m > k ≥ 0, the circuit Res m,k = { m } • N + { k } defines the residue class o f k mo dulo m . Cer tain other sets can b e s hown to be ( + , • )-definable, alb eit less s tr aightforw ar dly . W e recall the following facts of elementary num b er theory (see, e.g . Rosen [16, pp. 27 8, ff.]). If m a nd n ar e relatively prime integers, the congruence m x ≡ 1 mod n has a non- z e ro solutio n; we call the least non-zero solution e the or der of m mo dulo n . It is a standard (and easy) r esult that any other solution is divisible by e . Theorem 1. The fol lowing sets ar e definable by arithmetic cir cuits: (i) the set of k th p owers of p , { p nk | n ∈ N } , for p a fixe d prime and k a fi xe d numb er; (ii) the set of F ermat n umb ers, { 2 2 n + 1 | n ∈ N } . Pr o of. F or the first statement, we claim that, if k > 0 and ℓ > 1, then ℓ m ≡ 1 mo d ℓ k − 1 if and only if k | m . T o see this, observe that ℓ and ℓ k − 1 are relatively prime, and that x = k is the smallest non- zero solution of the congruence ℓ x ≡ 1 mo d ℓ k − 1. F or p a pr ime, the circuit Po w p ∩ Res p k − 1 , 1 defines the set of all num be r s of the form { p m | p m ≡ 1 mod ( p k − 1 ) } . By the ab ov e claim, this is the set { p nk | n ∈ N } . F or the second statement, we cla im that a num b er of the form 2 m + 1 ( m ≥ 1) is pro per ly divis ible by another num b er of that form if and only if m is not a power of 2. T o see this, suppo se fir st that m is not a p ow er of 2. W r ite m = a.b where a ≥ 3 is the la rgest o dd divisor of m (hence b = 2 n for some n ≥ 0). Then 2 m + 1 = ((2 b ) a − 1 − (2 b ) a − 2 + · · · + 1)(2 b + 1) , (3) whence 2 m + 1 is prop er ly divisible b y 2 b + 1 = 2 2 n + 1 . Conv ers e ly , supp ose m is a p ow er of 2. If 2 m + 1 is pro pe r ly divisible by , say , 2 ℓ + 1 for s o me ℓ , then Equation (3) s hows (substituting ℓ for m ) that 2 ℓ + 1 is divisible by so me 8 F ermat num b er , whence 2 m + 1 is pro pe rly divisible by s o me F e rmat num b er. But Goldbach’s theorem (see, e.g. Ros en [16, p. 108 ]) states that any tw o distinct F ermat num b ers are in fact relatively prime. T his e stablishes the cla im. Now, the c ircuit ((Po w 2 \ { 1 } ) + { 1 } ) \ ((Po w 2 \ { 1 } ) + { 1 } ) • { 1 } defines the set of all num be r s o f the for m 2 m + 1 ( m ≥ 1) not pr op erly divisible by any other such num b er. ⊓ ⊔ By num b ering a rithmetic circuits in so me standard wa y (G¨ odel-num b ering), we obtain the set G of num b er s n such that the cir c uit num be r ed by n defines a set which do es not contain n . It is then routine to show that G is itself not definable by any a rithmetic cir cuit. How ever, no mathematically natural sets of nu mbers hav e (to the a utho rs’ kno wledge) been shown not to b e so defina ble. In- deed, examples such as those of Theo rem 1 g ive some indica tion of the difficult y: we have to b e sur e that any candidate set canno t be defined using an arithmetic circuit in a no n- obvious wa y by means of some num b er-theor e tic fact. Neverthe- less, so me general facts ab out the class of sets defina ble by a rithmetic circ uits can be derived: in pa r ticular, they a ll have relatively low recog nition-complexity . T o see why , reca ll o ur o bserv a tion in Section 2 that the ε - a nd • -g a tes are discontin uous. Thes e facts are related. Define the function ◦ : P 2 → P by s ◦ t = { m · n | m ∈ s \ { 0 } , n ∈ t \ { 0 } } . W e see tha t ◦ is iden tically contin uo us, b ecause the q uestion o f whether m ∈ s ◦ t obviously dep ends only on the initial segments s | m and t | m . F urthermore : s ◦ t = ( s \ { 0 } ) • ( t \ { 0 } ); s • t = ( s ◦ t ) ∪ ( { 0 } ∩ (( s \ ε ( t )) ∪ ( t \ ε ( s )))) . (4) Hence, ( + , • )-circ uits a nd ( + , ◦ , ε )-circuits define the same sets . So therefore, do ( + , • )-circuits and ( + , ◦ )-cir cuits. By b ounde d arithmetic , we understand the first-order languag e o ver the signature (+ , · , 1 , 0), but with all quantification restricted to the forms ( ∀ x ≤ t ) ϕ and ( ∃ x ≤ t ) ϕ , wher e t is a term. The collection of sets in N k defined by for mulas of b ounded a rithmetic is known as the b oun de d hier ar chy , BH (Harrow [3 ]). Theorem 2. Every s et definable by an arithmetic cir cuit is in BH . Pr o of. W e obs e rved a b ove that a set is ( + , • )-definable if and only if it is ( + , ◦ )- definable. A routine induction sho ws that every ( + , ◦ )-definable set is defined by a for m ula o f b o unded a rithmetic. ⊓ ⊔ The b ounded hier arch y is known to b e contained within the zero th Grzeg or- czyk class , E 0 ∗ , and hence certainly within the class of sets of num b ers decidable 9 in deterministic linear spa ce—which is equal to the s econd Grzegor czyk class , E 2 ∗ (Ritc hie [14]; for a gener al ov erv iew, see Rose [15, Ch. 5]). Thus, while it is not known whether the membership problem for arithmetic circuits is decidable, the problem of determining members hip in the se t τ ( ), fo r a n y fixed ar ithmetic circuit τ , is decidable, and indeed has relatively low complexity . It is interesting to relate the for egoing remar ks to languag e-theoretic char- acterizations of subse ts of N . B y identifying ea ch po sitive num b er m with its binary representation a s a string in the languag e 1 · { 0 , 1 } ∗ , we can think of any subset of N a s a languag e in the usual sense o f F o rmal Language Theor y . (W e take 0 to be repres e n ted by the empt y string.) Under this cor resp ondence, we see immediately that all ( + , • )- definable sets a re context-sensitive languag es, since these are the lang ua ges that can be r ecognized in non-deterministic linear space. On the other hand, recalling Theore m 1 (ii), a simple application of the pump- ing lemma for context-free lang uages shows that the language co rresp onding to the F e r mat num b ers—namely , { 1 0 . . . 01 | with 2 n − 1 zeros for s o me n ≥ 0 } —is not co n text-free . Indeed, the pumping lemma of P alis and Shende [9, Theorem 1 ] shows that the F ermat num b ers lie outside the muc h la rger c ontro l-language hi- er ar chy . W e note in passing that Theorem 1 (ii) is not actua lly necessar y to show that sets definable by a r ithmetic circuits are not a ll context-free: the set of primes was shown not to b e context-free b y Hartmanis and Shank [4 ], though this example in volv es a more difficult application of the co ntext-free pumping lemma. 4 Definabilit y and non-definabilit y of set-functions W e now turn to o ur principal topic: the definability of functions P k → P by arith- metic cir c uits and their ex tensions. In this s ection, we pay particular attention to limitations o n definability ar is ing from finiteness a nd c ontinuity . 4.1 F unctions definable by additiv e and arithmetic circuits Many natural functions inv olving sets of num b ers turn out to b e defina ble by arithmetic—or indeed additive—circuits. F or example, the function ↓ ( x ) = { n ∈ N | ∀ m ∈ x, n ≤ m } is defined by the circuit τ ↓ ( x ) = x + N + { 1 } (cf. Cor ollary 1). Likewise, the function Min( x ) = ( { min( x ) } if x 6 = ∅ ∅ otherwise (5) is defined by the circuit τ ↓ ( x ) ∩ x (cf. Corollar y 1). The characteristic functions of many na tural pr o p erties of sets of num b ers also turn o ut to b e ( + , • )-de fina ble. F or exa mple, if k is a num b er, consider the prop erty of having cardinality greater tha n k . Since we hav e agreed to use { 0 } 10 and ∅ as truth-v alues, we may take the characteris tic function o f this pro p e r ty to be Card >k ( x ) 7→ ( { 0 } if | x | > k ∅ otherwise . Now r e cursively co nstruct the ar ithmetic circuits τ >k as fo llows: τ > 0 ( x ) = x • { 0 } τ >k +1 ( x ) = τ >k ( x \ Min ( x )) . It is easy to se e that τ >k defines Ca rd >k ( x ) for all k . Hence, the characteristic functions of the pr op erties o f having car dinality a t most/ex actly k are ( + , • )- definable to o (cf. Coro llary 3). Definition by cases is a lso p ossible in the pr e sence of certain collectio ns of gates. W e take the discriminator function to b e given by ▽ ( x ) 7→ ( ∅ if x = ∅ N otherwise . Lemma 1. L et O c ontain + and any of • , ε , Fin , Max ⇓ or Card . Then the discriminator fu n ction is O - definable. Pr o of. The following cir c uits all evidently define ▽ . x • { 0 } + N Card(( x + N ) ∪ { 0 } ) + N Max( x + N ) ⇓ ( x ) + N ε ( x ) + N Fin( x + N ) + N . ⊓ ⊔ Lemma 2. If the functions F , G, H : P n → P and ▽ : P → P ar e O -definable, then so is t he function x 7→ ( G ( x ) if F ( x ) 6 = ∅ H ( x ) otherwise . (6) Pr o of. Let F , G , H , ▽ b e defined by ρ ( x ), σ ( x ), τ ( x ), δ ( x ), resp ectively . Then the function (6) is defined b y the O - circuit: ( δ ( ρ ( x )) ∩ σ ( x )) ∪ ( δ ( ρ ( x )) ∩ τ ( x )) . ⊓ ⊔ It is a lso int er e s ting to consider the ( + , • )-definability of functions with num- ber s (rather tha n sets of num b ers) a s arguments. W e refer to such functions as numeric al functions. W e call a numerical function f : N n → N O - definable if 11 there ex is ts an O - definable set-function F : P n → P such that, for all m 1 , . . . , m n , F ( { m 1 } , . . . , { m n } ) = { f ( m 1 , . . . , m n ) } . Thus, when discussing the definability of a n umerical function, w e do not c a re what v alues any (putative) defining circuit takes on non-singleto n inputs. Clearly , all linear functions with po sitive integer co efficients are ( + )-definable, and all p olyno mials with p ositive in teger co efficients are ( + , • )-definable. So me other n umerical functions are definable to o . F or example, the function n 7→ ( 2 n − 1 if n > 0 0 otherwise is defined by the additive circuit Min x + N + x + N . (7) Or aga in, given a fixed n umber ℓ > 1 , the function n 7→ ( n mo d ℓ ) is defined by the arithmetic circuit mo d ℓ ( x ) = [ 0 ≤ k<ℓ (( x ∩ Res ℓ,k ) • { 0 } ) + { k } . In a s imilar vein, if R ⊆ N n is an n-ary relation on num be r s, call its char acter- istic function the function χ R mapping any tuple of singletons ( { m 1 } , . . . , { m n } ) to { 0 } if ( m 1 , . . . , m n ) ∈ R , and to ∅ otherwise. Clearly , if the set R ⊆ N is defined by an arithmetic circ uit τ , then χ R is defined by the circuit ( τ ∩ x ) • { 0 } . Some other characteristic functions are definable by arithmetic cir cuits to o. Consider , for example, the rela tion of r elative primeness . F rom the Euclidea n algor ithm for the greatest common divisor, m and n are r e latively prime if and only if ther e exist integers a , b such that am + bn = 1. If m and n are b oth gr eater than 1, exactly o ne o f a and b mu st be p ositive and the other negative. Supp ose b is po sitive: then ( { m } • N + { 1 } ) ∩ ( { n } • N ) is no n-empt y . Sy mmetr ically , if a is po sitive, then ( { n } • N + { 1 } ) ∩ ( { m } • N ) is non- empt y . Now le t τ ( x, y ) b e the circuit [(( x • N + { 1 } ) ∩ ( y • N )) ∪ (( y • N + { 1 } ) ∩ ( x • N ))] • { 0 } . (8) It follows that, for m > 1 and n > 1 , τ ( { m } , { n } ) = { 0 } if m , n are relatively prime, and τ ( { m } , { n } ) = ∅ otherwis e. T aking 1 to b e relatively prime to ev er y nu mber, and 0 r elatively prime to no num b er other than 1 , we o bserve that (8) yields the cor rect r esults for these cases to o . 4.2 Definability , con tinuit y and uniform con tinuit y W e no w pro ceed to establish some simple r esults on functions whic h ar e not definable even by circuits with acce s s to al l predic a te gates P and al l contin uous gates U . 12 Lemma 3. L et h : N → N b e an inflationary function, and O a c ol le ction of h - c ontinu ous set-functions. F or any O -cir cuit σ ( x ) , ther e exists a k ≥ 0 such t hat the function c ompute d by σ ( x ) is h ( k ) -c ont inuous, wher e h ( k ) denotes the k -fold iter ation of h —i.e. h ( k ) ( m ) = h ( · · · ( h ( m )) · · · ) , and, in p articular, h (0) ( m ) = m . Pr o of. Induction on the s tr ucture of σ . If σ is a constant g ate or v ar ia ble, we may put k = 0. F or the inductive ca se, supp os e σ ( x ) = o ( σ 1 ( x ) , . . . , σ ℓ ( x )), where the gate o is h -contin uous. Suppo se that, fo r each i (1 ≤ i ≤ ℓ ), we hav e k i such that x | h ( k i ) ( m ) = y | h ( k i ) ( m ) implies τ i ( x ) | m = τ i ( y ) | m for all x , y , m . Setting k = max( { k 1 , . . . , k ℓ } ) + 1, we see that x | h ( k ) ( m ) = y | h ( k ) ( m ) implies τ i ( x ) | h ( m ) = τ i ( y ) | h ( m ) for all x , y , m, i , which implies σ ( x ) | m = σ ( y ) | m for all x , y , m . This completes the induction. ⊓ ⊔ It fo llows immedia tely fro m Lemma 3 that the discontin uous functions ⇓ , Max , Card, ε and Fin a re not U -definable. In the first three ca ses, w e have a slightly stronger non-defina bilit y result. W e employ the following terminology in the sequel. If τ is an O -cir cuit and σ = o ( ρ ) a sub-circuit of τ , where o ∈ P , w e ca ll σ a pr e dic ate sub-cir cuit of τ . If, in addition, σ is not a sub-circuit o f some other predicate sub-circuit o f τ , we call σ a m ax imal pr e dic ate sub-cir cu it o f τ . Theorem 3. The fun ctions ⇓ , Max and Card ar e not ( U , P ) -definable. Pr o of. Let τ ( x ) be a ( U , P )-circuit: we show that it do es not define any of the functions ⇓ ( x ), Max( x ) and Card( x ). Cons ider all p ossible s ubs titutions o f constants { 0 } or ∅ for the ma ximal predicate sub-circuits π 1 ( x ) , . . . , π ℓ ( x ) of τ ( x ): in ea ch cas e the res ulting circuit will b e h ′ -contin uous for some (inflationar y) h ′ : N → N , by Lemma 3. Let h be the p oint wise maximum of a ll these h ′ ; define the s equence o f num b ers { m i } i ≥ 0 by setting m 0 = 1 and m i +1 = h ( m i + 1) + 1, fo r all i ≥ 0; and define the sequence of s ets { s i } i ≥ 0 by setting s i = { m j | 0 ≤ j ≤ i } . Since the maximal predicate sub-circuits of τ ( x ) can take a t most 2 ℓ po ssible v alues, let I b e an infinite set of num b er s s uch that, for all i, j ∈ I and all k (1 ≤ k ≤ ℓ ), π k ( s i ) = π k ( s j ). It follows that τ ( x ) is h -co nt inuous on the domain D = { s i | i ∈ I } . P ick an y i, j ∈ I with i < j . By construction, ( s i ) | m i +1 − 1 = ( s j ) | m i +1 − 1 , i.e. ( s i ) | h ( m i +1) = ( s j ) | h ( m i +1) . O n the other hand, ( ⇓ ( s i )) | m i +1 6 = ( ⇓ ( s j )) | m i +1 , since m i + 1 is in the latter, but not the former. But this is just the statement that ⇓ ( x ) is not h -contin uous on D . Therefo r e, τ ( x ) do es not compute ⇓ ( x ). T o show that the functions Max and Card ar e also not h -contin uous on D , we again pick any i, j ∈ I with i < j , so that ( s i ) | h ( m i +1) = ( s j ) | h ( m i +1) . The res ult is secured by noting that Card( s i ) | m i +1 6 = C a rd( s j ) | m i +1 , since the former co n tains | s i | = i + 1 ≤ m i (since h is inflationar y), but the la tter do es not; likewise, Max( s i ) | m i +1 6 = Max( s j ) | m i +1 since the fo r mer contains max( s i ) = m i , but the latter do es not. 13 ⊓ ⊔ Corollary 1. The functions ⇓ , Max and Card ar e not definable by arithmetic cir cuits. Pr o of. The gates + and ◦ are contin uous; and the gate • is de fina ble by means of ◦ and the predicate g ate ε . ⊓ ⊔ F urther classes of functions may b e shown no t to be ( U , P )-definable using the same technique, for example, functions with, as we migh t put it, mo derately fast growth. Theorem 4. L et F : P → P b e a function such that, for s ∈ P finite, non- empty, F ( s ) is non-empty with max( s ) ≤ min( F ( s )) . Then F is not ( U , P ) - cir cuit definable. Pr o of. W e use the sa me cons truction a s in the pro of of Theor em 3, except that we set m i +1 = h (ma x( m i + 1 , min( F ( s i )))) + 1 for all i ≥ 0. Other wise, the pro of pr o ceeds in exa c tly the same way , noting that, for i < j , ( s i ) | m i +1 − 1 = ( s j ) | m i +1 − 1 , but F ( s i ) | max( m i +1 , min( F ( s i ))) 6 = F ( s j ) | max( m i +1 , min( F ( s i ))) , since the set on the left-hand side co ntains the num b er min( F ( s i )), wher eas the set on the rig ht-hand side cer tainly contains no n umber less than min( F ( s j )) > min( F ( s i )). This co n tra dicts the h -contin uity of F on D . ⊓ ⊔ W e define the functions Sum , Pro d : P → P as follows: Sum( x ) = ( { Σ ( x ) } if x is finite N otherwise Pro d( x ) = ( { Π x } if x finite N otherwise Corollary 2. The fun ctions Sum and Pr o d ar e not ( U , P ) -definable. Pr o of. The function Sum satisfies the conditions of Theorem 4. F ur ther , if the function Pr o d is ( U , P )-definable, then so is the function x 7→ P ro d(( x ∪ { 1 } ) \ { 0 } ). But this latter function satisfies the c onditions o f Theor em 4. ⊓ ⊔ So fa r , we have presented non-definability results for the functions ⇓ , Max, Card, Sum and Pr o d, all of which a re highly discontin uous. But what ab out functions whic h hav e few p oints of discontin uit y? One such function is Shov e( x ) = ( { n − min( x ) | n ∈ x } if x no n-empty ∅ otherwise , 14 which mov es all the elements of its (non-empty) a rgument down wards ‘in par - allel’ so that the smallest element is 0. A routine chec k shows that Shov e( x ) is contin uo us everywhere in P \ {∅} , thoug h not uniformly c o ntin uous o n P \ {∅} . W e use by-now familiar techniques to show that Sho ve ( x ) is not ( U , P )-definable; how ever, the constructio n this time is slig ht ly more in volved. Theorem 5. The fun ction Shove ( x ) is not ( U , P ) -definable. Pr o of. Let τ ( x ) b e a ( U , P )-circuit: we show that it do es not define Shov e( x ). Let the maximal predicate sub-c ir cuits of τ ( x ) be π 1 ( x ) , . . . , π ℓ ( x ). F o r k ≥ 0, define D k to b e the s e t of subse ts of the interv al [ k ( ℓ + 2) , ( k + 1)( ℓ + 2) − 1] that contain the smalle st element, k ( ℓ + 2): D k = { { k ( ℓ + 2) } ∪ s | s ⊆ [ k ( ℓ + 2) + 1 , ( k + 1 )( ℓ + 2) − 1] } . Let the 2 ℓ +1 elements of D k be listed lexicogr aphically as s k, 1 , . . . , s k, 2 ℓ +1 . Ob- serve that, for all k a nd i (1 ≤ i ≤ 2 ℓ +1 ), Shove ( s k,i ) = s 0 ,i . F or k ≥ 1, let B k be the 2 ℓ +1 × ℓ array of v alues: π 1 ( s k, 1 ) · · · π ℓ ( s k, 1 ) . . . . . . π 1 ( s k, 2 ℓ +1 ) · · · π ℓ ( s k, 2 ℓ +1 ) . Since B k can take o nly finitely many v a lues, let K be an infinite set o f num b ers such that B k is constant as k v aries over K . F urther, s inc e the 2 ℓ +1 rows of B i can take only 2 ℓ po ssible v alue s , there certainly exist a, b (1 ≤ a < b ≤ 2 ℓ +1 ) such tha t the rows of B k (for k ∈ K ) indexed by a and b are iden tical. L et D = { s k,i | k ∈ K , i ∈ { a , b }} . Thus, for a ll i (1 ≤ i ≤ ℓ ), the predicate sub- circuit v a lue π i ( s ) is constant as s rang es over the doma in D . By Lemma 3, τ is uniformly co ntin uous on D . W e now pro ceed to show that Shov e( x ) is not unifor mly contin uous on D , com- pleting the pr o of. F or all k ≥ 1, we have, o n the one hand, ( s k,a ) | k ( ℓ +2) − 1 = ∅ = ( s k,b ) | k ( ℓ +2) − 1 , and, on the other, Shov e( s k,a ) | ℓ +1 = ( s 0 ,a ) | ℓ +1 = s 0 ,a 6 = s 0 ,b = ( s 0 ,b ) | ℓ +1 = Shov e( s k,b ) | ℓ +1 . Thu s, there exists m (namely , m = ℓ + 1 ) such that, for all n , there exist s, t ∈ D (namely , s = s k,a and t = s k,b for some k ∈ K with k ≥ ( n + 1) / ( ℓ + 2)) such that s | n = t | n and Shov e( s ) | m 6 = Shov e( t ) | m . But this is exac tly the statement that Sho ve( x ) is not uniformly co nt inuous on D . ⊓ ⊔ 15 4.3 Undefinability resul ts for predicates The results of Section 4.2 a pply to circuits fea turing any predicate gates what- so ever, and thus cannot b e used to show the undefinabilit y o f one predicate in terms o f o thers. In this section we tur n o ur attention to this problem. Lemma 4. L et s 0 b e a tu ple of fi nite sets and m a numb er gr e ater t han or e qual to any element of any of t hese sets. Le t σ 1 ( x ) , . . . , σ p ( x ) b e a c ol le ction of U - cir cuits. Then ther e ex ists a tuple of finite sets s ∗ with s 0 = s ∗ | m , and a numb er m ∗ gr e ater than or e qual to any element of any of the sets in s ∗ , such that, for al l t with t | m ∗ = s ∗ and al l k (1 ≤ k ≤ p ) , σ k ( t ) = ∅ if and only if σ k ( s ∗ ) = ∅ , and furthermor e, if σ k ( t ) 6 = ∅ , then min( σ k ( t )) ≤ m ∗ . Pr o of. By Lemma 3 , let h : N → N b e a n (inflationa ry) function such that the functions computed b y the σ k ( x ) a re all h -co nt inuous. Define, for any tuple s , I ( s ) = { k | σ k ( s ) 6 = ∅ } M ( s ) = ( max( { h (min( σ k ( s ))) | k ∈ I ( s ) } ) if I ( s ) non-empty 0 otherwise . Thu s, the se t I ( s ) tells us which o f the σ k ( s ) are non-empty; and each of these non-empty sets co n tains an element—sa y , ℓ k —such that h ( ℓ k ) ≤ M ( s ). If t satisfies t | M ( s ) = s | M ( s ) , then, by h -contin uity , for any k ∈ I ( s ), σ k ( s ) | ℓ k = σ k ( t ) | ℓ k , whence ℓ k ∈ σ k ( t ) | ℓ k , and hence k ∈ I ( t ). T ha t is: t | M ( s ) = s | M ( s ) implies I ( s ) ⊆ I ( t ). Indeed, by the same ar gument, I ( t | M ( t ) ) = I ( t ); and t | M ( t ) is of cour se a tuple of finite se ts. W e construct sequences s 0 , . . . , s q and m 0 , . . . , m q , starting with the g iven s 0 and m 0 = max( m, M ( s 0 )). Supp os e s i and m i hav e b een defined. If, for a ll t , t | m i = s i implies I ( s i ) = I ( t ), set q = i and stop. Other w is e, select some t s uch that t | m i = s i and I ( s i ) ( I ( t ), and let s i +1 = t | M ( t ) and m i +1 = max( m i , M ( t )). Since I ( s i ) cannot grow for ever, this pr o cess ter mina tes. It is easy to see that s ∗ = s q and m ∗ = m q hav e the required prop erties. ⊓ ⊔ Theorem 6. L et F : P n → P b e define d by a ( U , ε ) -cir cuit. Then ther e exists s ∈ P n and m ∈ N su ch that F is ( uniformly ) c ontinu ous on { t ∈ P n | s | m = t | m } . Pr o of. W e co nstruct a s e quence s (0) , . . . , s ( d ) of tuples of sets, a sequence m (0) , . . . , m ( d ) of num b ers a nd a s e quence τ (0) , . . . , τ ( d ) of cir c uits. W e will show that putting s = s ( d ) and m = m ( d ) secures the s tatement o f the theorem. W e beg in with s (0) = ∅ , m (0) = 0, and τ (0) = τ . Suppo se s ( i ) , m ( i ) and τ ( i ) hav e alrea dy b een defined. If τ ( i ) is a U -circuit, set d = i , and stop the pro cess. Otherwise, let ε ( σ 1 ) , . . . , ε ( σ p ) b e a lis t of the most 16 deeply-nested ε -sub-cir cuits of τ ( i ) . Thus, the σ k (1 ≤ k ≤ p ) are a ll U -circuits. By Lemma 4 , we hav e a tuple of finite sets s ∗ and a num b er m ∗ greater than any element of these se ts , s a tisfying the following pro per ties: (i) s ( i ) = s ∗ | m ( i ) ; (ii) for all k (1 ≤ k ≤ p ) and all t such that t | m ∗ = s ∗ , σ k ( t ) = ∅ if a nd only if σ k ( s ∗ ) = ∅ . Set s ( i +1) = s ∗ , and m ( i +1) = m ∗ . F urther, let τ ( i +1) be the circuit obtained fr om τ ( i ) by substituting the c o nstant { 0 } for a ny sub- circuit ε ( σ k ) such that σ k ( s ( i +1) ) = ∅ , and the cons tant ∅ for an y s ub-circuit ε ( σ k ) such that σ k ( s ( i +1) ) 6 = ∅ . W e see that, for all t suc h that t | m ( i +1) = s ( i +1) , τ ( i +1) ( t ) = τ ( i ) ( t ), s ince the sub-circuits ε ( σ k ( x )) of τ ( i ) take the substituted v alues ( { 0 } o r ∅ ) unifor mly for all such t . Since the depth of nesting of ε -gates in τ ( i +1) is str ic tly less than that in τ ( i ) , this pr o cess terminates. It is simple to verify tha t t | m ( d ) = s ( d ) implies t | m ( i ) = s ( i ) for a ll i (0 ≤ i ≤ d ). Hence, t | m ( d ) = s ( d ) implies τ ( d ) ( t ) = τ ( d − 1) ( t ) = · · · = τ (0) ( t ) = τ ( t ). Since τ ( d ) ( x ) computes a uniformly contin uous function, F is uniformly contin uous o n { t ∈ P n | s ( d ) = t | m ( d ) } = { t ∈ P n | ( s ( d ) ) | m ( d ) = t | m ( d ) } . ⊓ ⊔ Corollary 3. The funct ion Fin is not ( U , ε ) -definable. F urther, no ( U , ε ) -definable function F : P → P satisfies any of the fol lowing c onditions for al l finite, non- empty t : F ( t ) = ( { 0 } if | t | is even ∅ otherwise; F ( t ) = ( { 0 } if max( t ) even ∅ otherwise; F ( t ) = ( { 0 } if P t even ∅ otherwise . Pr o of. W e need only verify that none o f the functions in questio n is unifor mly contin uo us o n a ny domain D of the form { t ∈ P | s = t | m } , w he r e s is a finite set o f num b ers and m a num be r greater than or equal to every element of s . Consider, for exa mple, the function Fin. Since s is finite, Fin( s ) | 0 = { 0 } . F or all n > 0, ther e exists t ∈ D (namely , t = s ∪ [max( m, n ) + 1 , ∞ )) s uch that s | n = t | n , but Fin( t ) | 0 = ∅ . This is the statement that Fin is no t uniformly co n tinuous on D . The other functions are treated s imila rly . ⊓ ⊔ Theorem 6 has a differen t c hara cter from Theo rems 3 –5, since it concer ns the non-definabilit y o f one predicate in terms of ano ther. It helps to picture what is going on in the following terms. W e r emarked ab ov e that the ε ( x )-gate is discontin uo us o nly at the point x = ∅ . Thus, in constructing the sequence s 0 , . . . , s q in the pro of of Lemma 4, we are restricting attention to domains in whic h few er discontin uities remain—a pro cess which will even tually r esult in a domain co nt aining a non-empty op en set, on which the defined function is contin uous. On the o ther hand, the functions men tioned in Corollar y 3 are discontin uous at all finite, non-empty sets, and so canno t b e definable by ( U , ε )- circuits. 17 Arno Pauly [13, p. 15 ] ha s kindly p ointed out that Theo rem 6 is in fact a sp ecial case of a more gener al theorem on dis contin uo us functions proved by Hertling [6]. Let X and Y b e top o lo gical s paces and F : X → Y a function. If A ⊆ X , denote by F | A the r estriction o f F to A . F or any o rdinal β , define A β = X if β = 0 { x ∈ A α | F | A α not contin uo us at x } if β = α + 1 ∩ α<β A α if β a limit ordinal W e then say that the level of F , denoted lev 1 ( F ), is the smallest or dinal β such that A β is empt y , and undefined if no such β exists. (The s uper script 1 is used to distinguish lev 1 ( F ) fro m a r elated notion which we do not need her e.) Thus, for instance, if F is everywhere c ontin uo us, and X is non-empty , then lev 1 ( F ) = 1. Hertling shows (p. 19) that, for G : X → Y and F : Y → Z functions w ith Y a regular space, if G ha s finite level, then the comp osition, F ◦ G : X → Z satisfies lev 1 ( F ◦ G ) ≤ lev 1 ( F ) · lev 1 ( G ). Applying the appara tus of levels to the present ca se, we note that, since ε ( x ) is co nt inuous e verywhere except at x = ∅ , we hav e A 1 = { ∅} and A 2 = ∅ , whence lev 1 ( ε ( x )) = 2. It follows that every ( U , ε ( x ))-definable circuit has a finite level. On the o ther hand, since the function Fin( x ) is everywhere discontin uo us , it has no level. Hence Fin( x ) is no t ( U , ε ( x ))-definable. By contrast, in Theor ems 3–5, there is no requirement that the predicate gates in P ha ve a finite level; and in Theorem 5, Shove ( x ) actually has level 2 . 5 Numerical functions In Section 4.1, we s aw v ario us examples of n umerica l functions definable b y additive and ar ithmetic cir cuits. Here, we pres e n t some cor resp onding non- definability results. 5.1 Regressi v e functio n s Call a function f : N n → N r e gr essive if the s e t { f ( n ) | n ∈ N n , f ( n ) < min( n ) } is infinite. Alternatively , f is regressive if, for all k ≥ 0 ther e exists n ∈ N n such that k ≤ f ( n ) ≤ min ( n ) − 1. Our first theorem says, in so man y words, that regres s ive functions a re not definable by a rithmetic circuits, even when gates computing arbitrar y pr e dicates a re av ailable. Theorem 7. L et h : N → N b e an inflationary funct ion and O a c ol le ction of gates c omputing h -c ontinuous fun ctions. L et f : N k → N b e a function such that, for every q ≥ 0 , the set { f ( n ) | n ∈ N k , h ( q ) ( f ( n )) < min( n ) } is infi n ite. Then f is not ( O , P ) -definable. Pr o of. If n = ( n 1 , . . . , n k ) is a tuple o f n umbers , denote by [ n ] the co rresp onding tuple of singletons ( { n 1 } , . . . , { n k } ). Supp ose τ ( x ) is an ( O , P )-circuit. Let the 18 maximal predicate sub-c ircuits of τ be π 1 ( x ) , . . . , π ℓ ( x ). If σ ( x ) is obtained by substituting the co nstants { 0 } and ∅ for these circuits in any w ay , then σ is h ( q ′ ) -contin uous for some q ′ ; let q b e the maxim um of these q ′ . By hypothesis, there exists an infinite set T of tuples n such that f ( n ) < h ( q ) (min( n )) for a ll n ∈ T , with the v alues f ( n ) all distinct. Since the tuple v ([ n ]) = ( π 1 ([ n ]) , . . . , π ℓ ([ n )]) can only take a finite num b er of v alues as n ranges ov er T , s elect an infinite subset T ′ ⊆ T for which v ([ n ]) = ( κ 1 , . . . , κ ℓ ) is constant. Since we may reg ard the sets κ i (1 ≤ i ≤ ℓ ) as the cir cu its { 0 } or ∅ , let τ ′ ( x ) b e the result of substituting each constant κ i for π i ( x ); thus, for n ∈ T ′ , τ ′ ([ n ]) = τ ([ n ]). By cons truction, τ ′ ( x ) is h ( q ) -contin uous. F urther, s ince h ( q ) is inflationar y , we may easily s e le ct an infinite subset T ′′ ⊆ T ′ such that h ( q ) is also increasing o n the set { f ( n ) | n ∈ T ′′ } . Now pick n and n ′ from T ′′ with f ( n ) < f ( n ′ ). By cons tr uction, we have h ( q ) ( f ( n )) < min ( n ), and indeed h ( q ) ( f ( n )) ≤ h ( q ) ( f ( n ′ )) < min( n ′ ). Putting m = f ( n ) and a pplying the h ( q ) -contin uit y of τ ′ ( x ), we have [ n ] | h ( q ) ( m ) = ∅ = [ n ′ ] | h ( q ) ( m ) ⇒ τ ′ ([ n ]) | m = τ ′ ([ n ′ ]) | m ⇒ τ ([ n ]) | m = τ ([ n ′ ]) | m . But, also b y construction, { f ( n ) } | m = { f ( n ) } 6 = ∅ = { f ( n ′ ) } | m . There fo re, τ ( x ) do es no t define f . ⊓ ⊔ In the cont ext o f a rithmetic circuits, if f : N k → N is a numerical function, we can treat it, b y c o urtesy , as a set-function—i.e., a type of gate —unders tanding it to mea n F ( s, . . . s k ) = ( { f ( n 1 , . . . , n k ) } if s i = { n i } for all i (1 ≤ i ≤ k ) ∅ otherwise . Define n ˙ − 1 to b e n − 1 if n > 0, and 0 other wise. F or b > 1, define log ∗ b n to be log b n if n > 0, and 0, otherwise . If r is a non- negative real num b er, denote by ⌈ r ⌉ the smallest natural n umber gr eater than or equal to r . Corollary 4. L et 0 < a, b < 1 and c > 1 . Then: (i) The function n 7→ n ˙ − 1 is n ot ( + , • , P ) -definable; (ii) the function n 7→ ⌈ an ⌉ is not ( + , • , n 7→ n ˙ − 1 , P ) -definable; (iii) the function n 7→ ⌈ n b ⌉ is not ( + , • , n 7→ n ˙ − 1 , n 7→ ⌈ an ⌉ , P ) -definable; (iv) the function n 7→ ⌈ lo g ∗ c n ⌉ is not ( + , • , n 7→ n ˙ − 1 , n 7→ ⌈ an ⌉ , n 7→ ⌈ n b ⌉P ) - definable. Pr o of. Recall that • is ( ◦ , ε )-defina ble. The function f ( n ) = n ˙ − 1 and the c o llec- tion O = ( + , ◦ ) satisfy the conditio ns of Theorem 7 with h ( m ) = m ; the function f ( n ) = ⌈ an ⌉ a nd the co llection O = ( + , ◦ , n 7→ n ˙ − 1) satisfy the conditions of Theorem 7 with h ( m ) = m + 1; and so o n. 19 ⊓ ⊔ Note that Theor em 7 fails if the co nditio n tha t { f ( n ) | n ∈ N k , h ( q ) ( f ( n )) < min( n ) } is infinite is repla ced by the condition that { n | n ∈ N k , h ( q ) ( f ( n )) < min( n ) } is infinite. F o r exa mple, we have already seen that the function n 7→ ( n mo d ℓ ) is ( + , • )-definable, for all ℓ ≥ 1 . Arithmetic circuits can compute remainders (for fix ed, non-z e r o divisor s), but not quotients. 5.2 Semi-regress iv e functions W e hav e se e n that regr e s sive numerical functions cannot be defined by arithmetic circuits. On the other hand, the functions n 7→ n and n 7→ 2 n are trivially definable by a dditiv e circuits. Indeed, the additive cir cuit in (7) defines the function n 7→ 2 n − 1 for n > 0. It is therefore natural to ask whether any nu merica l functions defina ble by a dditive or arithmetic cir cuits can have growth in betw een that o f n 7→ n and n 7→ 2 n − 1. F or simplicity , w e co nsider only the case of 1-place functions. (Nothing really hinges on this res tr iction.) Say that f : N → N is semi-r e gr essive if, for all ℓ ≥ 0 there exists n ≥ 0 such that n + ℓ ≤ f ( n ) ≤ 2 n − 2 . W e show that semi-regr essive functions are not definable by additive circuits, even when gates computing ⇓ and ar bitrary pr edicates are av ailable. Lemma 5. L et σ ( x ) b e a ( + , ⇓ , P ) -cir cuit. Ther e exists a numb er k ( σ ) such that, for al l m ∈ N , σ ( { m } ) is u n iform on the interval [ k ( σ ) , m − 1] : t hat is to say, either σ ( { m } ) ⊇ [ k ( σ ) , m − 1 ] or σ ( { m } ) ∩ [ k ( σ ) , m − 1] = ∅ . Pr o of. W e define k ( σ ) inductiv ely . If σ is x , ∅ or N , it suffices to ta ke k ( σ ) = 0. If σ is a predic a te circuit, it suffices to take k ( σ ) = 1 . If σ is { p } , it suffices to take k ( σ ) = p + 1. If σ is σ 1 ∪ σ 2 or σ 1 ∩ σ 2 , it suffices to take k ( σ ) = max( k ( σ 1 ) , k ( σ 2 )); and if σ is σ 1 or ⇓ ( σ 1 ), it suffices to take k ( σ ) = k ( σ 1 ). Finally , supp ose σ is σ 1 + σ 2 . W e exa mine the six teen ca ses g enerated by the following four binary choices. (W e rely o n the inductive hypothesis to ens ure exha ustiveness for the second t wo cases.) σ i ( { m } ) ∩ [0 , k ( σ i ) − 1 ] 6 = ∅ or σ i ( { m } ) ∩ [0 , k ( σ i ) − 1 ] = ∅ ( i = 1 , 2); σ i ( { m } ) ⊇ [ k ( σ i ) , m − 1] or σ i ( { m } ) ∩ [ k ( σ i ) , m − 1] = ∅ ( i = 1 , 2) . Routine chec king shows that, in all cases, either σ ( { m } ) ⊇ [ k ( σ 1 ) + k ( σ 2 ) , m − 1] or σ ( { m } ) ∩ [ k ( σ 1 ) + k ( σ 2 ) , m − 1] = ∅ . T aking k ( σ ) = k ( σ 1 ) + k ( σ 2 ) c o mpletes the inductio n. ⊓ ⊔ Theorem 8. No ( + , ⇓ , P ) -cir cuit defines any r e gr essive or semi-r e gr essive func- tion N → N . Pr o of. Let σ ( x ) b e a ( + , ⇓ , P )-circuit. It is instant fro m Lemma 5 that σ ( x ) do es no t define a regres sive function. T o co mplete the pro o f, we show that there 20 exists a num ber ℓ ( σ ) such that, fo r all m ∈ N , σ ( { m } ) is uniform on the interv al [ m + ℓ ( σ ) , 2 m − 2]: that is to say , either σ ( { m } ) ⊇ [ m + ℓ ( σ ) , 2 m − 2] or σ ( { m } ) ∩ [ m + ℓ ( σ ) , 2 m − 2] = ∅ . W e define ℓ ( σ ) inductively , making use o f the num b ers k ( σ ) gua ranteed by Lemma 5. If σ is x or a predicate circuit, it suffices to take ℓ ( σ ) = 1 . If σ is ∅ o r N , it suffices to take ℓ ( σ ) = 0. If σ is { p } , it suffices to take ℓ ( σ ) = p + 1. If σ is σ 1 ∪ σ 2 or σ 1 ∩ σ 2 , it suffices to take ℓ ( σ ) = max( ℓ ( σ 1 ) , ℓ ( σ 2 )); and if σ is σ 1 or ⇓ ( σ 1 ), it suffices to take ℓ ( σ ) = ℓ ( σ 1 ). Fina lly , supp ose σ is σ 1 + σ 2 . W e examine the tw o hundred and fift y-six cas e s g e nerated b y the following eig ht binary c hoices . (W e re ly on the inductive hypothesis and the pr op erties of k ( σ ) guaranteed by Lemma 5 to e nsure ex haustiveness.) σ i ( { m } ) ∩ [0 , k ( σ i ) − 1] 6 = ∅ or σ i ( { m } ) ∩ [0 , k ( σ i ) − 1] = ∅ ( i = 1 , 2); σ i ( { m } ) ⊇ [ k ( σ i ) , m − 1] or σ i ( { m } ) ∩ [ k ( σ i ) , m − 1] = ∅ ( i = 1 , 2); σ i ( { m } ) ∩ [ m, m + ℓ ( σ i ) − 1] 6 = ∅ or σ i ( { m } ) ∩ [ m, m + ℓ ( σ i ) − 1] = ∅ ( i = 1 , 2); σ i ( { m } ) ⊇ [ m + ℓ ( σ i ) , 2 m − 2] or σ i ( { m } ) ∩ [ m + ℓ ( σ i ) , 2 m − 2] = ∅ ( i = 1 , 2) . Consider, fo r exa mple, a ny ca ses in which b oth σ 1 ( { m } ) ⊇ [ k ( σ 1 ) , m − 1] and σ 2 ( { m } ) ⊇ [ k ( σ 2 ) , m − 1]. Then we see that σ ( { m } ) ⊇ [ k ( σ 1 ) + k ( σ 2 ) , 2 m − 2], whence, cer tainly , σ ( { m } ) ⊇ [ m + k ( σ 1 ) + k ( σ 2 ) , 2 m − 2]. Or ag a in, consider any cases in which σ 1 ( { m } ) ∩ [0 , k ( σ 1 ) − 1] = σ 1 ( { m } ) ∩ [ k ( σ 1 ) , m − 1] = σ 1 ( { m } ) ∩ [ m + ℓ ( σ 1 ) , 2 m − 2] = ∅ a nd σ 2 ( { m } ) ∩ [ k ( σ 2 ) , m − 1] = ∅ . Then w e see that σ ( { m } ) ∩ [ m + k ( σ 2 ) + ℓ ( σ 1 ) − 1 , 2 m − 2] = ∅ . Routine (but la bo rious) chec king shows that, in a ll cases, w e can find a co nstant ℓ ( σ )—expressed as some function of k ( σ 1 ), k ( σ 2 ) ℓ ( σ 1 ) and ℓ ( σ 2 ), dep ending on the case we are dealing with—such that e ither σ ( { m } ) ⊇ [ m + ℓ ( σ ) , 2 m − 2] o r σ ( { m } ) ∩ [ m + ℓ ( σ ) , 2 m − 2] = ∅ . This completes the induction. ⊓ ⊔ F or arithmetic c ir cuits, by contrast, this restriction do es no t apply . Co nsider the function f : N → N which maps a ny n umber n to the smallest prime greater than n . This function is defined by the arithmetic circuit Min(( x + N + { 1 } ) ∩ Primes). On the one hand, the decreas ing density of primes means that there is no k such that f ( n ) < n + k for all n ; on the o ther hand, the Bertra nd-Chebyshev theorem states that f ( n ) < 2 n − 2 for n ≥ 4. (Tighter bo unds are known for larger v alues of n ; see, e.g. Nagura [12].) W e therefore hav e: Theorem 9. Some arithmetic cir cu its define semi-r e gr essive functions. 5.3 Rapidly growing functions W e round off this section with a r esult ab out the definability o f rapidly g row- ing functions. Again, we obs e rve a difference betw een additive and arithmetic circuits. Theorem 10. Every numeric al function f : N → N define d by an additive cir cuit is line arly b oun de d. 21 Pr o of. A simple induction shows that, if σ ( x ) is an additive cir c uit, then there exists a num b er k suc h that, for all m > 0, σ ( { m } ) is uniform on the interv a l [ k m, ∞ ). ⊓ ⊔ F or a rithmetic circuits, by co ntrast, this res triction do es not apply . Let p b e a (fixed) prime. Again, we need to recall some num b er theo ry—this time not so elementary . Consider the co ngruence m x ≡ 1 mo d p , where p is a prime, and p do es no t divide m . By F ermat’s ‘little’ theorem, x = p − 1 is always a solutio n o f this congruence; a nd we s ay that m is a primitive r o ot mod p if p − 1 is the smallest no n-zero solution—that is, in the termino lo gy int ro duce d ab ov e, if the or der o f m mod p is p − 1. It is known [5, Corollar y 2 ] that, for all but a t most tw o exceptional primes p , there exist infinitely many primes q such that p is a primitive r o ot mod q . Fix any non-ex c e ptional prime p . W e kno w that there is a circuit Po w p defining the set of pow ers of p . Now, the circuit σ ( x ) = x • ( N \ { 0 } ) + { 1 } satisfies the condition that, for any n > 1 , σ ( { n } ) is the set of num b ers congruent to 1 mo d n , excepting 1 itself. Thus, if q is a prime such that p is a primitive ro ot mo d q , the cir cuit Po w p ∩ (( N \ { 0 } ) • { q } + { 1 } ) defines a non- empt y set whose smallest element is p q − 1 . Consider the cir cuit τ ( x ) = [( N • { p } ) ∩ x ] ∪ [Min(Po w p ∩ (( N \ { 0 } ) • x + { 1 } )) • { p } ] . On input x = { n } , the tw o terms in squa re brack ets each r eturn a singleton or the empt y set, dep ending on whether n is r elatively prime to p . If p divides n , the first ter m in sq uare brack ets returns the singleton { n } ; otherwise, the s econd term in s q uare br a ck ets returns the sing leton { p e +1 } , w he r e e is the order o f p mo d n . Hence, the c ir cuit defines a num eric a l function f : N → N . F ur thermore, if n is one of the infinitely many pr imes such that p is a primitive ro ot mo d n , then f ( n ) = p n . W e hav e shown: Theorem 11. Ther e ex ist s a funct ion f : N → N such that f is definable by an arithmetic cir cuit, and not b ounde d by any p olynomial. It is interesting to ask whether any numerical functions definable by ar ithmetic circuits a re bounded b elow by an exp onential function. 6 Additiv e and arithmetic circuits with ⇓ , Max and Card Having demonstra ted the undefinability of the functions ⇓ , Max and Card by means of arithmetic circuits, we next co nsider what happe ns when gates comput- ing them a r e added as primitiv es. Again, we need to treat additive and arithmetic circuits s eparately . 6.1 Simple definabili t y results W e b egin with some easy definability results concer ning the functions ⇓ , Max and Ca r d. 22 Lemma 6. L et F − 1 b e the set-function given by s 7→ { min( s ) ˙ − 1 } for s 6 = ∅ and ∅ 7→ ∅ . Then: (i) Fin , ε and ⇓ ar e ( + , Ma x) -definable; (ii) F − 1 is ( + , Max) -definable; (iii) ε and Fin ar e ( + , ⇓ ) -definable; (iv) Max is ( + , ⇓ , F − 1 ) -definable; (v) F − 1 is ( + , ⇓ , Card) -definable; (vi) Ma x is ( + , ⇓ , Card) -definable. Pr o of. The following equa tions a r e ea sy to verify: (i) Fin ( s ) = { 0 } \ Max( s ∪ { 1 } ), ε ( s ) = Fin( s + N ), and fo r s finite, non-empty , ⇓ ( s ) = Max ( s ) + N + { 1 } ; (ii) for s non-empty with min( s ) > 0, { min( s ) − 1 } = Max( s + N ); (iii) ε ( s ) = { 0 } \ ⇓ ( s ), and, for s non-empty , Fin( s ) = { 0 } ∩ ⇓ (( s + { 1 } ) \ ⇓ ( s )); (iv) for s finite, Max( s ) = F − 1 (( s + { 1 } ) \ ⇓ ( s )); (v) for s non-empty with min( s ) > 0, F − 1 ( s ) = Card( ⇓ (Min( s )) \ { 0 , 1 } ); (vi) for s non-empty , Max ( s ) = Ca rd( ⇓ ( s ) \ { 0 } ). T o deal with the ca s es not cov ered by these equations, apply Lemma s 1 and 2. ⊓ ⊔ 6.2 Circuits with ⇓ Lemma 6 do es not tell us how to define Max in terms of ⇓ alone. With the help of the set of ev en n umbers, how ever, this is p ossible . Recall the c ircuit Evens = { 2 } • N from (2 ). Theorem 12. The gate Max is ( + , • , ⇓ ) -definable. Pr o of. F or s finite, no n- empt y , we hav e ( s + { 1 } ) \ ⇓ ( s ) = { ma x( s ) + 1 } . F o r such v alues of s , therefore, (( s + { 1 } ) \ ⇓ ( s )) ∩ Evens is empty if and only if max( s ) is o dd. But for s finite, non- e mpt y , with max( s ) o dd, { max( s ) } = s \ ⇓ ( s ∩ Evens ); and for s finite, non-empty , with max( s ) even, { max( s ) } = s \ ⇓ ( s \ Evens) . The result now follows by Lemmas 1, 2 and 6 (iii). ⊓ ⊔ Lemma 6 s how ed that, for a dditiv e circuits, the ga te Max is a t least as expressive as ⇓ , and Theor em 12 s howed that, for arithmetic circuits, Max and ⇓ are as expressive as each other. On other other hand, it is a n easy c o nsequence of earlier re s ults that, for additive circuits, Max is strictly mor e expr essive than ⇓ . 23 Corollary 5. The fun ction Max is not ( + , ⇓ , P ) - defin able. Pr o of. F ro m Theorem 8 a nd Lemma 6 (ii), noting that n 7→ n ˙ − 1 is reg ressive. ⊓ ⊔ Corollary 6. The fun ction Car d is n ot ( + , ⇓ , P ) -definable. Pr o of. F ro m Theorem 8 a nd and Lemma 6 (v). ⊓ ⊔ W e shall strengthen Co rollar y 6 in Section 6.3. 6.3 Arithmetic circuits w i th ⇓ and Card W e next show tha t there are impor tant gates which ⇓ (equiv ale ntly , Max) s till do es not allow us to define, even when added to arithmetic circuits. Again, we beg in with a technical lemma: Lemma 7. L et σ ( x ) b e an ( I , P ) -cir cuit, wher e I is the set of identic al ly c on- tinuous set- functions. L et π 1 , . . . , π k b e the maximal pr e dic ate sub-cir cuits of σ , and let ρ 1 , . . . , ρ ℓ b e al l the sub-cir cuits ρ of σ with the pr op erty that ⇓ ( ρ ) is also a su b-cir cuit of σ . L et m b e a nu mb er, and let s , s ′ b e tuples of sets of numb ers, of t he same arity as x . If t he c onditions (i) s | m = s ′ | m ; (ii) π i ( s ) = π i ( s ′ ) for al l i (1 ≤ i ≤ k ) ; (iii) ρ i ( s ) ∩ [ m + 1 , ∞ ) = ∅ if and only if ρ i ( s ′ ) ∩ [ m + 1 , ∞ ) = ∅ for al l i (1 ≤ i ≤ ℓ ) . al l hold, then σ ( s ) | m = σ ( s ′ ) | m . Pr o of. W e prov e the strong er statement that, for an y sub- c ir cuit τ ( x ) of σ which is not a pro p er s ub- circuit of a predica te sub-circuit of σ , w e hav e τ ( s ) | m = τ ( s ′ ) | m , pr o ceeding by struc tur al induction on τ . The case τ ( x ) = x for s ome v aria ble x is immediate from assumption (i). The ca se where τ ( x ) is π i ( x ) for some i (1 ≤ i ≤ k ) is immediate from a s sumption (ii). Consider the case where τ ( x ) is ⇓ ( ρ i ( x )) for some i (1 ≤ i ≤ ℓ ). By inductive hypothesis, ρ i ( s ) | m = ρ i ( s ′ ) | m , whence, by assumption (iii) and the definition of ⇓ , we see that ( ⇓ ( ρ i ( s ))) | m = ( ⇓ ( ρ i ( s ′ ))) | m . The remaining cases are immedia te. ⊓ ⊔ W e now hav e the promised strengthening of Co rollar y 6 . Theorem 13. The function Card is not ( + , • , ⇓ , P ) -definable. 24 Pr o of. Let σ ( x ) b e any ( + , ◦ , ⇓ , P )-circuit. Since • is ( ◦ , ε )-definable, it suffices to show that σ ( x ) do es not de fine Ca r d. Let π 1 , . . . , π k be the max ima l predicate sub-circuits of σ , and let ρ 1 , . . . , ρ ℓ be all the sub- circuits ρ of σ with the prop erty that ⇓ ( ρ ) is also a sub-c ir cuit of σ . Let m = 2 k + ℓ . F or a ll s ∈ P and 1 ≤ i ≤ ℓ , let γ i ( s ) denote the truth-v alue of the condition ρ i ( s ) ∩ [ m, ∞ ) = ∅ , remembering, of course, that truth-v a lues are the s ets { 0 } (true) and ∅ (false). Denote by v ( s ) the k + ℓ -tuple of truth-v alues ( π 1 ( s ) , . . . , π k ( s ) , γ 1 ( s ) , . . . , γ ℓ ( s )). Let s j = [ m + 1 , m + j ] for all j (0 ≤ j ≤ m ). Note that s 0 = ∅ and, for all j (0 ≤ j ≤ m ), Card( s j ) = j . Cle arly , we may pick j , j ′ with 0 ≤ j < j ′ ≤ m such that v ( s j ) = v ( s ′ j ), s inc e v ( s j ) ta kes a t most 2 k + ℓ v alues. All the conditions of Lemma 7 are satisfied b y s = s j and s ′ = s j ′ . Hence σ ( s j ) | m = σ ( s j ′ ) | m , so that σ ( x ) do es not define Card, a s require d. ⊓ ⊔ W e rema r k that the only prop erty of + and ◦ used in the pr o of o f Theorem 13 is that they are ident ically co n tinuous. Thus, adding further iden tically contin uous gates w ould still not allow the definability of Card. W e finish o ff with a partial undefinability result for ( + , C a rd( x ))-circuits. Again, we b egin with some tec hnical lemmas. Lemma 8. The fol lowing statements hold for al l s, t ∈ P : (i) If s and t ar e finite, Car d( s + t ) ≤ Card( s ) · Car d( t ) . (ii) If either s or t is empty, Car d( s + t ) = 0 . (iii) If s is c o-finite and t non-empty, Card( s + t ) ≤ min( t ) + Car d( s ) . Pr o of. Routine chec k. ⊓ ⊔ Define the following functions: Card ∗ ( s ) = Card( s ) if s is finite Card( s ) if s is co-finite undefined otherwise. min ∗ ( s ) = ( min( s ) if s is non-empty − 1 otherwise. Lemma 9. L et s, t ∈ P b e finite or c o-finite. Then: (i) Ca r d ∗ ( s ) = Card ∗ ( s ) ; (ii) Ca r d ∗ ( s ∪ t ) ≤ Card ∗ ( s ) + Ca r d ∗ ( t ) ; (iii) Ca r d ∗ ( s ∩ t ) ≤ Card ∗ ( s ) + Ca r d ∗ ( t ) ; (iv) Card ∗ ( s + t ) ≤ max(Ca r d ∗ ( s ) · Car d ∗ ( t ) , Ca rd ∗ ( s ) + min ∗ ( t ) , Ca rd ∗ ( t ) + min ∗ ( s )) . 25 Pr o of. The statements (i)–(iii) a re immediate; (iv) follows from Lemma 8. ⊓ ⊔ Lemma 10. L et τ ( x ) b e a ( + , P ) -cir cuit, s ∈ P b e finite or c o-finite, and k > 1 . Su pp ose t hat, for any sub-cir cuit σ ( x ) of τ ( x ) , min ∗ ( σ ( s )) ≤ k . Then Card ∗ ( τ ( s )) ≤ ( k + Ca rd ∗ ( s )) k τ k , wher e k τ k denotes t he total nu mb er of symb ols in τ . Pr o of. W e show b y structura l induction that, for σ ( x ) a s ub-circuit of τ , Card ∗ ( σ ( s )) ≤ ( k + Card ∗ ( s )) k σ k . If σ is a predicate sub-circuit or an y of x , ∅ , N o r { p } (necessa rily: p ≤ k ), the statement is immediate. The cas e s wher e σ is any of σ 1 ∪ σ 2 , σ 1 ∩ σ 2 , σ 1 or σ 1 + σ 2 , follow from the corr esp onding cases o f Lemma 9 . ⊓ ⊔ Define the function Max − 1 ( x ) b y Max − 1 ( x ) = ∅ if x ⊆ { 0 } max( x ) − 1 if x is finite, non-empty with max( x ) > 0 N otherwise . Theorem 14. L et τ ( x ) b e a ( + , Card) -cir cuit in whic h no Ca rd -gate app e ars within the sc op e of another. Then τ ( x ) do es not define t he fu n ction Max − 1 ( x ) . Pr o of. Let σ 1 , . . . , σ p be the sub-cir cuits of τ app earing a nywhere (not necessar - ily immediately) in the scope o f a Ca rd-gate. Hence , each σ k is a ( + )-circuit. Applying Lemma 4 with, say , s 0 = { 0 } and m = 1, let s ∗ be a finite set of nu mbers a nd m ∗ a nu mber, gr eater than any element of s ∗ , suc h that, for a ll k (1 ≤ k ≤ p ) and a ll m ∈ [ m ∗ + 1 , ∞ ), min ∗ ( σ k ( s ∗ ∪ { m } )) ≤ m ∗ . By Le mma 10, we hav e, for a ll such k and m : Card ∗ ( σ k ( s ∗ ∪ { m } )) ≤ ( | s ∗ | + 1 + k ) k σ k k . Note that the right-hand side of this inequalit y does not dep end on m . Thus, the tuple v m = h Ca rd( σ 1 ( s ∗ ∪ { m } )) , . . . , Card( σ p ( s ∗ ∪ { m } )) i can take only finitely many v alues a s m ranges over [ m ∗ + 1 , ∞ ). Hence, we may pick an infinite sub- set M ⊆ [ m ∗ + 1 , ∞ ) such that v m is in fa c t co nstant a s m ranges over M . Let τ ∗ ( x ) b e the result of replacing any sub-circuit o f the fo r m Car d ∗ ( σ ( x )) in τ b y the singleto n constant circuit { Card ∗ ( s ∗ ∪ { m } ) } (which is indep endent of m for m ∈ M ), and let D = { s ∗ ∪ { m } | m ∈ M } . Thus, τ ∗ ( x ) is a + -circuit, and τ ∗ ( t ) = τ ( t ) for all t ∈ D . T o co mplete the pro of, we show that no + -circuit can define Max − 1 ov er D . F o r choose m, m ′ ∈ M , with m < m ′ . W e simply observe tha t ( s ∗ ∪ { m } ) | m − 1 = ( s ∗ ∪ { m ′ } ) | m − 1 , but Max − 1 ( s ∗ ∪ { m } ) | m − 1 6 = Max − 1 ( s ∗ ∪ { m } ) | m − 1 . ⊓ ⊔ It is interesting to ask whe ther ⇓ or Max are in fact defina ble by ( + , • , Card , P )- circuits, o r e ven by ( + , Card)-circuits. 26 7 Conclusion In this pa p e r, we have inv estiga ted the expres sive p ow er of num er ic al set- expressions ov er v ar ious families O of set-functions (together with the us ua l Bo olean operator s and singleton constants). W e called such expressions O - circuits. An y v ariable-fr ee O -circuit defines a set of n umbers, and any O - circuit with n v ariables defines a function P n → P , where P is the pow er set of the num b er s. Of particular interest a re the op er ations + and • which result from lifting ordinary a ddition and m ultiplication to the level of sets. W e called circuits featuring the op er a tor + additive cir cuits , and those featuring bo th + and • , arithmetic cir cu its . W e co nsidered the definability of functions by additive and a rithmetic cir- cuits, with par ticular refer ence to the functions ⇓ , Max and Card, as well as the predicates ε (the test for emptiness) and Fin (the test for finiteness ). W e showed that the functions of ⇓ , Max and Card cannot be defined by arithmetic cir - cuits, even when arbitra ry predicate gates are av a ilable. W e showed further that v ario us pr edicates, including Fin, cannot b e defined by any arithmetic cir cuits extended with ‘les s disco nt inuous’ predica tes , such as ε . W e also esta blished related results on the definabilit y o f numerical functions (functions N n → N ) by mea ns of additive and arithmetic circuits. W e showed that no a rithmetic cir cuit could define any ‘r egressive’ function, even when ar- bitrary pr edicate g ates ar e av a ilable. W e further showed that no additive circuit could define any ‘semi-r egressive’ function, even when arbitrar y predicate gates and ⇓ are av aila ble; howev er we gav e a n example of a se mi-regres sive function defined by an arithmetic cir cuit. Finally , we noted that all numerical functions defined by additive circuits are linearly bo unded, but g av e an example o f a nu merica l function defined b y an arithmetic circuit that is not p o lynomially bo unded. W e considered the effect of adding g ates computing the functions ⇓ , Max and Card to b o th a dditiv e and arithmetic circuits. W e show ed that, for b oth additive a nd ar ithmetic circuits, Max is at lea st as ex pressive a s ⇓ . W e further show ed that, for additive circuits, Max is in fact strictly more expressive than ⇓ , and that for a rithmetic circuits, these gates hav e the sa me expressive p ow er. W e show ed that, even for arithmetic circuits, these gates do no t enable the function Card to b e defined. W e finis hed with a partial result on the limited expr e ssive power of additive circuits extended with Ca rd-ga tes . Ac kno wledgemen t The authors gratefully ackno wledge the supp or t of the EPSRC (grant ref. EP/F06 9154 ). The second author additionally acknowledges the supp ort of the NSERC, Canada. The authors would also like to thank Mr. Adam T rybus a nd Mr. Y av or Nenov for help in preparing the manuscript. 27 References 1. C. Glaßer, K. Herr, C. Reit wießner, S. T ra vers, and M. W aldherr. Equiv alence problems for circuits o ver sets of n atural numbers. In Computer Scienc e The ory and Appli c ations , volume 4649 of LNCS , p ages 127–138, Berlin, 2007. Sp ringer. 2. C. Glaßer, C. Reitw ießner, S . T rav ers, and M. W aldherr. Satisfiabilit y of algebraic circuits ov er sets of natural num b ers. In Pr o c e e dings of FSTTCS 2007 , volume 4855 of LNCS , pages 253–264, Berlin, 2007. S pringer. 3. K. Harro w. The boun ded arithmetic hierarc hy . Information and Contr ol , 36(1):102– 117, 1978. 4. J. H artmanis and H . Shank. On the recognition of primes by automata. Journal of the Asso ciation f or Com puting Machinery , 15(3):382389, 1968. 5. D. R. Heath-Brow n. Artin’s conjecture for primitive ro ots. Quarterly Journal of Mathematics , 37(1):27–38, 1986. 6. Peter Hertling. Unstetigkeitsgr ade von F unktionen in der effektiven Analysis . Phd. thesis, F ernuniversi t¨ at Hagen, 1996. 7. A. Je ˙ z and A. O khotin. Complexity of solutions of equations o ver sets of nat- ural num b ers. In S. Alb ers and P . W eil, editors, Pr o c e e di ngs of ST ACS 2008 , vol ume 080 01 of Dagst uhl Seminar Pr o c e e dings , pages 373–384. Internationales Begegn ungs- un d F orsch ungszentrum f¨ ur In formatik, Schloß Dagstuhl, 2008. 8. A. Je ˙ z and A. O k hotin. On the computational completeness of equations over sets of natural num b ers. In L. Aceto, I. Damg ˚ ard, L. Goldb erg M. Halld´ orsson, A. Ing´ olfsd´ ottir, and I. W alukiewicz, editors, Pr o c e e dings of IC A LP 2008, Part II , vol ume 5126 of LNCS , pages 63–74. Springer, 2008. 9. M. A. P alis l and S. M. Shende. Pumping lemmas for t he con trol language hierarc hy . Mathematic al Systems The ory , 28:199–213, 1995. 10. P . McKenzie and K. W agner. The complex ity of membership problems for circuits o ver sets of natural numbers. In H. A lt and M. Habib, ed itors, Pr o c e e dings of ST ACS 2003 , volume 2607 of LNCS , pages 571–582. Springer–V erlag, 2003. 11. P . McKenzie and K. W agner. The complex ity of membership problems for circuits o ver sets of natural numbers. Computational Com pl exity , 16(3):211–244, 2007. 12. Jitsuro Nagura. On the interv al contai ning at least one prime number. Pr o c e e di ngs of the Jap an A c ademy , 28(4):177–181 , 1952. 13. A rno P auly . In finite oracle queries in Typ e-2 Mac hines. Preprint: arXiv:0907.32 30v1, 2009. 14. R . Ritchie. Classes of predictably computable functions. T r ansactions of the Amer- ic an Mathematic al So ciety , 106:139–173, 1963. 15. H .E. R ose. Subr e cursion . Oxford Universit y Press, New Y ork, 1984. 16. K . H. Rosen. Elementary numb er the ory and its applic ations . Addison-W esley , Reading, MA., t hird edition, 1993. 17. L . Sto ckmey er and A. Meyer. W ord problems requiring exp onential time ( prelim- inary rep ort). In Pr o c e e dings of the Fif th Annu al ACM Symp osium on The ory of Computing , p ages 1 – 9. ACM Digital Library , 1973. 18. S . T rav ers. The complex ity of m emb ership problems for circuits ov er sets of inte- gers. The or etic al Computer Scienc e , 369:211 –229, 2006. 19. K . Y ang. Integer circuit ev aluation is PSP ACE-complete. In Pr o c e e dings, 15th IEEE Conf er enc e on Computational Complexity , pages 204–211. IEEE, 2000.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment