Cancellation Meadows: a Generic Basis Theorem and Some Applications
Let Q_0 denote the rational numbers expanded to a "meadow", that is, after taking its zero-totalized form (0^{-1}=0) as the preferred interpretation. In this paper we consider "cancellation meadows", i.e., meadows without proper zero divisors, such a…
Authors: Jan A. Bergstra, Inge Bethke, Alban Ponse
Cancellation Meado ws: a Generic Basis Theorem and Some Applications ∗ Jan A. Bergstra, Inge Bethk e, and Alban P onse Section Theory of Computer Science Informatics Institute Universit y of Amsterdam Url: www.science.uva.n l/ ~ {janb, inge, alban} No v em b er 1, 2018 Abstract Let Q 0 denote the rational num b ers expanded to a “meado w”, that is, a fter taking its zero-totalized form (0 − 1 = 0) as the preferred interpretation. In th is pap er w e consider “cancellation meado ws”, i.e., meado ws without proper zero divisors , su c h as Q 0 and prov e a generic completeness result. W e app ly th is result to cancellation meado ws expanded with d ifferen tiation operators, the sign function, and with floor, ceiling and a signed v ariant of the square root, resp ectively . W e give an equational axiomatization of these op erators and thus obtain a finite b asis for v arious expanded cancellation meado ws. Keywor ds : Meado w, V on N eumann regular ring, Zero-totalized field This p ap er i s devote d to the o c c asion of John T ucker’s 60th birthday. The authors acknow le dge his br o ad scholarly work on algebr aic meth o ds in c omputing. In addition Jan Ber gstr a expr esses his gr e at appr e ciation for over 35 ye ars of joint work with John, often unexp e cte d l y emer ging f r om our c ontinuous st r e am of discussions ab out the field in gener al . 1 In tro duction This pap er co n tributes to the algebr aic sp ecification theo ry of num b er systems . Adv antages and disadv a n tag es of algebr aic sp ecificatio n o f abstr act data types have b een a mply discussed in the computer science literature and we do not wish to add anything to those matters here ∗ This is a pre-copy-editing, author-pro duced PDF of an ar ticle accepte d for publication in The Com- puter Journal following peer review. The definitive publisher- authen ticated version [Jan A. Bergstra, Inge Bethk e, and Alban Ponse. Cancellation Meadows: A Generic Basi s Theorem and Some A p- plications. The Computer Journal (201 3) 56(1): 3-14, first published onli ne March 23, 2012, doi:10.1093/comjnl/b xs028] is av ailable online at: http://comjnl. oxfordjournals.org/content/56/1/ 3.full.p df?keytype=ref & ijkey=kNeYsWcTYdkTR1u . 1 and refer to Wir s ing [22], the seminal 19 77-pap er [15] of Goguen et al. , the ov erv iew in Bjørner and Henson [1 0], and the ASF+SDF meta-environment of K lin t et al. [11]. Our fo cus will b e on a par ticular lo ose algebra ic s pecifica tion for fields called me adows , us- ing the terminolog y of Broy and Wirsing [12 ] who fir st wrote ab out lo ose spe c ific a tions—i.e. the semantic approach not restr icted to the isomorphism class of initial algebras . The the- ory of algebraic sp ecifications is ba sed on theor ie s o f universal a lgebras. Some references to universal a lg ebra are, e.g., W echler [2 1] and Graetzer [1 6]. The equatio na l spe c ific a tion of the v ariety of meadows has b een pr op osed by Bergstra and T uc ker [8 ] and it has subsequently been elabor a ted with more systema tic detail in [2]. Starting from the signatur e of fields one o bta ins the signature of meadows b y adding a unary in verse op erato r. A t the bas is of meadows, now, lies the design decisio n to turn the inv erse (or division if one pr efers a binary no ta tion for pra gmatic reaso ns) into a total op erator b y means of the assumption that 0 − 1 = 0. B y doing so the inv estiga tion of n umber systems as abstract data types can b e carr ied out within the or iginal fra mework o f algebraic sp ecifications without taking an y precautions for partial functions. F ollo wing [8] we write Q 0 for the rational num b ers expanded to a meadow, that is after taking its zero-tota liz ed form as the preferred interpretation. The main res ult of [8] consists of obtaining an equationa l initial algebr a sp ecification o f Q 0 . The specification tak es the form of a general loos e sp ecification, v alid in all fields equipped with a totalized inv er s e, to whic h an equation L 4 sp ecifically designed for the ca se of r ational n umbers is taken in addition: the equation L 4 is based on Lagra nge’s theorem that e very na tural n umber can be repre sen ted as the sum of 4 squar es and rea ds 1 + x 2 + y 2 + z 2 + u 2 1 + x 2 + y 2 + z 2 + u 2 = 1 . So L 4 expresses that for a lar ge collection of num b ers q , it holds that q · q − 1 = 1 (in particular , those q which can b e w r itten a s 1 plus the sum of four squar es). Recen tly , Y oram Hirshfeld has proven that 1 + x 2 + y 2 1 + x 2 + y 2 = 1 suffices (for a pro o f see [3 ]). In [4] meadows without prop e r zero divisor s are termed c anc el lation me adows . Recently , we found in [20] that meadows w er e already intro duced by Komor i [18] in a repor t from 1975, where they go by the name of desir able pse u do-fields. In [2] it is shown that meadows are pr ecisely the V on Neumann regular r ings expa nded with an inv ers e op erator − 1 and that the equational theory of cancellation meadows (there called zero- totalized fields) has a finite basis. In this pap er w e will extend that r e sult to a g eneric form. This enables its applica tion to extended signatures. In particular we will ex amine the case o f differen tial mea dows—i.e. meadows equipp ed with differentiation op erators . A second extensio n is obtained by a dding a sign function whic h provides o ne of sev era l mutually in terchangeable ways in which the presence of an order ing can b e equa tionally sp ecified. The imp ortance o f the latter extension follows from the fact that mo st use s of ra tional num b ers in co mputer science theory exploit their ordering. W e no tice that the pro of of the gener ic basis theo rem is an elab or ation of the pro o f used for the case of clo s ed terms that has been dealt with in [8]. The pro of of the finite basis 2 theorem in [2] uses the ex is tence of maximal ideals. Although shorter and simpler, the pro of via idea ls seems no t to g eneralize in the way our proo f b elow do es. Bethke, Ro denbu r g, a nd Sevenster [9] demonstrate that finite meadows a r e pro ducts of fields, th us strengthening the r esult in [2] (for the finite case) that establishes that ea c h meadow ca n b e embedded in a product of fields, a result whic h was named the emb e dding the or em for me adows . W e notice that the ba s is theorem for meadows, but not its gener ic form, is an immediate consequenc e of the em b edding theorem. The pap er is structur ed as follows: in the next section we rec a ll the a x ioms for meadows and in tro duce a re presentation result. Then, in Sec tion 3 we presen t our main result, the generic basis theo rem. In Section 4 we in tro duce diff er en tial meado ws. Then, in Section 5 we extend cancellation meadows with the sign function. W e discuss a further extensio n with flo or and ceiling functions and with a squa re ro ot in Section 6. W e end the paper in Section 7 with some conclusio ns. This pap er is co mpiled from o ur earlier work as rep orted in [5, 6, 1]. 2 Meado ws: preliminaries and represen tation In this sec tion we introduce ca ncellation meadows in detail and we discuss a representation result that will be used in Section 4. In [8] me adows w er e defined a s the members of a v ariety sp ecified b y 12 equations. How- ever, in [2] it was esta blis hed that the 10 equations in T able 1 imply thos e used in [8]. Summarizing, a meadow is a commutativ e ring with unit equipp ed with a total unary op er- ation ( ) − 1 named in verse that s a tisfies the t wo equations ( x − 1 ) − 1 = x, x · ( x · x − 1 ) = x, ( RIL ) and in which 0 − 1 = 0. Here RIL abbr eviates Re st ricte d Inverse L aw . W e write Md for the set o f axioms in T able 1. F rom the axioms in Md the following identities are deriv a ble : (0) − 1 = 0 , ( − x ) − 1 = − ( x − 1 ) , ( x · y ) − 1 = x − 1 · y − 1 , 0 · x = 0 , x · − y = − ( x · y ) , − ( − x ) = x. The term c anc el la tion me adow is in tro duced in [4] for a zero-to ta lized field that sa tisfies the so -called “cancella tion axiom” x 6 = 0 & x · y = x · z − → y = z . 3 ( x + y ) + z = x + ( y + z ) x + y = y + x x + 0 = x x + ( − x ) = 0 ( x · y ) · z = x · ( y · z ) x · y = y · x 1 · x = x x · ( y + z ) = x · y + x · z ( x − 1 ) − 1 = x x · ( x · x − 1 ) = x T able 1: The set Md of axio ms for meadows An equiv alent version of the ca nc e llation axiom that we sha ll further use in this pap er is the Inverse L aw ( IL ), i.e., the conditional ax iom x 6 = 0 − → x · x − 1 = 1 . ( IL ) So IL states that there are no pro p er zero divisors. (Another equiv alent formulation of the cancellation prop erty is x · y = 0 − → x = 0 o r y = 0.) W e write Σ m = (0 , 1 , + , · , − , − 1 ) for the signature o f (cancellation) meadows and we shall often wr ite 1 /t or 1 t for t − 1 , tu for t · u , t/u for t · 1 /u , t − u for t + ( − u ), and freely us e numerals a nd exp onentiation with co nstant integer exp onents. W e shall further write 1 x for x x and 0 x for 1 − 1 x , so, 0 0 = 1 1 = 1, 0 1 = 1 0 = 0, and for a ll terms t , 0 t + 1 t = 1 . With the axioms in T able 1 w e find by RIL that 1 t · t = t, 1 t · 1 /t = 1 /t, (1 t ) 2 = 1 t , (1) 4 and we derive the following useful identities: 1 t · 0 t = 0 , (b y 1 t · 0 t = 1 t (1 − 1 t ) = 1 t − 1 t = 0) 0 t · t = 0 , (b y (1 − 1 t ) t = t − t = 0) , 0 t · 1 /t = 0 (b y (1 − 1 t )1 /t = 1 /t − 1 /t = 0) (0 t ) 2 = 0 t . (2) (b y (1 − 1 t ) 2 = 1 − 2 · 1 t + (1 t ) 2 = 1 − 1 t = 0 t ) In the remainder of this sec tion we discuss a particula r standard r epresentation for meadow terms. W e will use this r epresentation in Section 4 in order to prov e a n expres s ive- ness re s ult. Definition 1. A term P over Σ m is a Standard Meadow F orm (SMF) if, for some n ∈ N , P is an SMF o f level n . SMFs of level n ar e define d as fol lo ws: SMF of level 0 : e ach expr ession of the form s/t with s and t r anging over p olynomials (i.e., expr ess ions ove r Σ m without inverse op er ator), SMF of level n + 1 : e ach expr ession of the fo rm 0 t · P + 1 t · Q with t r anging over p olynomials and P and Q o ver SMFs of level n . Observe that if P is an SMF of level n , then als o of level n + k for all k ∈ N . Lemma 1. If P and Q ar e SMFs, then in Md, P + Q , P · Q , − P , and 1 /P ar e pr ovably e qual to an SMF having the same va riables. Pr o of. By natural induction o n level height n . W e sp ell out the pro of in which RIL is often used. The men tioned prop erty of ha ving the s a me v a riables follows trivially . Case n = 0 . Let s , t, u, v b e poly no mials, and P = s/t and Q = u/v . First obse r ve that 0 t · s/ t = 0 t · 1 /t · s = 0. W e derive P + Q = 0 t · ( P + Q ) + 1 t · ( P + Q ) = 0 t · ( s/t + u/v ) + 1 t · ( s/t + u /v ) = 0 t · u/v + 1 t · ( s/ t + 1 t · u /v ) so it suffices to show that R = s/t + 1 t · u/v is equal to an SMF of lev el 1: R = 0 v · ( s/ t + 1 t · u/v ) + 1 v · ( s/t + 1 t · u/v ) = 0 v · s/ t + 1 v · ( s/t · 1 v + 1 t · u/v ) = 0 v · s/ t + 1 v · ( sv + t u tv ) . 5 The remaining cases ar e trivial: P · Q = su/tv , − P = − s/t , and 1 /P = t/s . Case n + 1 . Let P = 0 t · S + 1 t · T and Q = 0 s · U + 1 s · V with S, T , U , V a ll SMFs o f level n . W e first der ive P + Q = 0 t · P + 1 t · P + Q = 0 t · ( S + Q ) + 1 t · ( T + Q ) = 0 t · (0 s · ( S + U ) + 1 s · ( S + V )) + 1 t · (0 s · ( T + U ) + 1 s · ( T + V )) and by induction each o f the pa irwise sums of S, T , U, V equals some SMF. Next, we derive P · Q = 0 s · P · U + 1 s · P · V = 0 s · (0 t · S · U + 1 t · T · U ) + 1 s · (0 t · S · V + 1 t · T · V ) and by induction each o f the pa irwise pro ducts of S, T , U, V equals some SMF. F urthermore, − P = 0 t · ( − S ) + 1 t · ( − T ), which by induction is pr ov ably equa l to an SMF. Finally , 1 /P = 0 t · (1 /P ) + 1 t · (1 /P ), hence 1 /P = 0 t · 1 0 t · S + 1 t · T + 1 t · 1 0 t · S + 1 t · T = 0 t · 0 t 0 t · (0 t · S + 1 t · T ) + 1 t · 1 t 1 t · (0 t · S + 1 t · T ) = 0 t · 0 t 0 t · S + 1 t · 1 t 1 t · T = 0 t · 1 /S + 1 t · 1 /T and b y induction there exist SMFs S ′ and T ′ such that S ′ = 1 /S and T ′ = 1 /T , hence 1 /P = 0 t · S ′ + 1 t · T ′ . Theorem 1. Each term over Σ m c an b e r epr esente d by an S MF with the same va riables. Pr o of. By structural induction. Let P b e a term o ver Σ m . If P = 0 or P = 1 or P = x , then P = P / 1, and the latter is an SMF of level 0 . The other ca s es follow immediately from Lemma 1. 3 A generic basis theorem In this se c tion we prove a finite basis result for the eq ua tional theor y of cancella tion meadows. This result is formulated in a generic w ay so that it ca n b e used for any expans ion of a meadow tha t satisfies the propa gation prop erties defined b elow. 6 Definition 2. L et Σ b e an extension of Σ m = (0 , 1 , + , · , − , − 1 ) , the s ignatu r e of me adows. L et E ⊇ Md (with Md the set of axioms for me adows given in T able 1). 1. (Σ , E ) has the propagation pr o per t y for pseudo units if for e ach p air of Σ -terms t, r and c ont ext C [ ] , E ⊢ 1 t · C [ r ] = 1 t · C [1 t · r ] . 2. (Σ , E ) has the propagation prop erty for ps eudo zero s if for e ach p air of Σ - t erms t, r and c ont ext C [ ] , E ⊢ 0 t · C [ r ] = 0 t · C [0 t · r ] . Preser v ation of these propag ation prop erties admits the fo llowing nice result: Theorem 2 (Generic Basis Theor em for Cancellation Mea dows) . If Σ ⊇ Σ m , E ⊇ Md and (Σ , E ) has the pseudo u nit pr op agation pr op erty and the pseudo zer o pr op agation pr op erty, then E is a b asis (a c omplete axiomatization) of Mo d Σ ( E ∪ IL ) . The structure of our pro of of this theor em is as follows: let r = r ( x ) and s = s ( x ) b e Σ-terms and le t c b e a series of fresh cons tan ts. W e write Σ( c ) for the signature extended with these constants. Then E ∪ IL | = r = s in Σ ⇐ ⇒ E ∪ ILC | = r ( c ) = s ( c ) in Σ( c ) (3) ⇐ ⇒ E ⊢ IR r ( c ) = s ( c ) (4) ⇐ ⇒ E ⊢ r = s in Σ . (5) Here prov ability ( ⊢ ) refers to equational logic ; the notation further used means this: • ILC , the Inverse L aw for Close d terms is the set { t = 0 ∨ 1 t = 1 | t ∈ T (Σ( c )) } , wher e T (Σ( c )) denotes the set o f clos ed terms over Σ( c ). • IR is the Inverse Rule : E ⊢ IR r = s means that ∃ k ∈ N s.t. E ⊢ k IR r = s , a nd E ⊢ k IR r = s means that E ⊢ r = s provided that the rule IR E ∪ { t = 0 } ⊢ r = s E ∪ { 1 t = 1 } ⊢ r = s E ⊢ r = s with t ranging ov er T (Σ( c )) may b e used k times . Before we pro ve Theorem 2 — i.e., equiv alences (3)–(5) — w e establish the following pre- liminary r esult: Prop osition 1. A ssume Σ ⊇ Σ m , E ⊇ Md and (Σ , E ) has the pr op agation pr op erty for pseudo units and f or p seudo zer os. Then for t, r, s ∈ T (Σ) , E ∪ { t = 0 } ⊢ IR r = s = ⇒ E ⊢ 0 t · r = 0 t · s, (6) E ∪ { 1 t = 1 } ⊢ IR r = s = ⇒ E ⊢ 1 t · r = 1 t · s. (7) 7 Pr o of. W e prove E ∪ { t = 0 } ⊢ k IR r = s = ⇒ E ⊢ 0 t · r = 0 t · s, (8) E ∪ { 1 t = 1 } ⊢ k IR r = s = ⇒ E ⊢ 1 t · r = 1 t · s (9) simult a neo usly by induction on k . W e use the sy mbo l ≡ to denote syntactic e quiv alence. Case k = 0 . By induction o n pro of lengths. F or (8) the only interesting case is ( r = s ) ≡ ( t = 0), so we have to show that E ⊢ 0 t · t = 0 t · 0. This follows directly from E ⊇ Md . F or (9) the only in teresting cas e is ( r = s ) ≡ (1 t = 1), and also E ⊢ (1 t ) 2 = 1 t · 1 follows directly from E ⊇ Md . Case k + 1 . By induction on the length of the pro ofs o f E ∪ { t = 0 } ⊢ k +1 IR r = s and E ∪ { 1 t = 1 } ⊢ k +1 IR r = s . There are 3 in teres ting cases for each of (8) and (9): 1. T he ⊢ k +1 IR results follow from the assumption ( r = s ) ≡ ( t = 0) or ( r = s ) ≡ (1 t = 1), respe c tiv ely . These re s ults follow in the same w ay a s ab ov e. 2. T he ⊢ k +1 IR results follow from the context rule, so r ≡ C [ v ], s ≡ C [ w ] and (8) E ∪ { t = 0 } ⊢ k +1 IR v = w . B y induction, E ⊢ 0 t · v = 0 t · w . Hence, E ⊢ 0 t · C [0 t · v ] = 0 t · C [0 t · w ], a nd by (Σ , E ) having the propaga tion prop erty fo r pseudo zeros, E ⊢ 0 t · C [ v ] = 0 t · C [ w ]. (9) E ∪ { 1 t = 1 } ⊢ k +1 IR v = w . By induction, E ⊢ 1 t · v = 1 t · w . Hence, E ⊢ 1 t · C [1 t · v ] = 1 t · C [1 t · w ], a nd by (Σ , E ) having the propaga tion prop erty fo r pseudo units, E ⊢ 1 t · C [ v ] = 1 t · C [ w ]. 3. T he ⊢ k +1 IR results follow from the IR rule, that is (8) E ∪ { t = 0 } ∪ { h = 0 } ⊢ k IR r = s a nd E ∪ { t = 0 } ∪ { 1 h = 1 } ⊢ k IR r = s . By induction, E ∪ { h = 0 } ⊢ 0 t · r = 0 t · s and E ∪ { 1 h = 1 } ⊢ 0 t · r = 0 t · s . Again applying induction ( ⊢ deriv ability implies ⊢ k IR deriv a bilit y) y ields E ⊢ 0 h · 0 t · r = 0 h · 0 t · s, E ⊢ 1 h · 0 t · r = 1 h · 0 t · s. W e derive 0 t · r = (0 h + 1 h ) · 0 t · r = 0 h · 0 t · r + 1 h · 0 t · r = 0 h · 0 t · s + 1 h · 0 t · s = 0 t · s . (9) E ∪ { 1 t = 1 } ∪ { h = 0 } ⊢ k IR r = s a nd E ∪ { 1 t = 1 } ∪ { 1 h = 1 } ⊢ k IR r = s . Similar. Pr o of of The or em 2 . W e now give a detailed pr o o f of equiv alences (3)–(5), using Prop o si- tion 1. F or model theoretic details we refer to [14]. (3) (= ⇒ ) Assume E ∪ IL | = r = s . Let M b e a model of E ∪ ILC (o ver Σ( c )). Then M | = r ( c ) = s ( c ) if and only if M ′ | = r ( c ) = s ( c ) for M ′ the minimal submo del of M . Now M ′ is also a model for IL beca use ILC co ncerns all closed ter ms and each v alue in the domain of M ′ is the interpretation of a closed term. So, b y assumption M ′ | = r = s , a nd, in particular (by substitution), M ′ | = r ( c ) = s ( c ). 8 ( ⇐ =) Assume E ∪ ILC | = r ( c ) = s ( c ). Let M b e a model of E ∪ IL (o ver Σ). W e hav e to show that M | = r ( x ) = s ( x ), o r, stated differently , that for a = a 1 , ..., a n a series of v alues from M ’s domain, ( M , x i 7→ a i ) | = r = s wher e x i 7→ a i represents the assignment of a i to x i . Extend Σ with a fresh constant c i for each a i and let M ( c ) b e the expansion of M in whic h each constant c i is interpreted as a i . Then M ( c ) satisfies ILC b ecause M s atisfies IL , so by assumption M ( c ) | = r ( c ) = s ( c ), and therefore ( M ( c ) , x i 7→ a i ) | = r = s and thus also ( M , x i 7→ a i ) | = r = s , as w as to be shown. (4) (= ⇒ ) Le t E C be the set o f all closed instances ov er the extended sig nature Σ( c ), then E C ∪ ILC | = r ( c ) = s ( c ) . By compa ctness there is a finite set F ⊆ E C ∪ ILC such that F | = r ( c ) = s ( c ) . Now apply induction o n the num b er of elements fro m ILC in F , say k . Case k = 0 . By completeness w e find E ⊢ r ( c ) = s ( c ), and th us E ⊢ IR r ( c ) = s ( c ). Case k + 1 . Assume ( t = 0 ∨ 1 t = 1) ∈ F a nd let F ′ = F \ { t = 0 ∨ 1 t = 1 } . Reasoning in pr opo sitional logic w e find F ′ | = ( t = 0 ∨ 1 t = 1) → r ( c ) = s ( c ) and th us F ′ | =( t = 0 → r ( c ) = s ( c )) ∧ (1 t = 1 → r ( c ) = s ( c )) , which in turn is eq uiv alent w ith F ′ ∪ { t = 0 } | = r ( c ) = s ( c ) , F ′ ∪ { 1 t = 1 } | = r ( c ) = s ( c ) . By induction, E ∪ { t = 0 } ⊢ IR r ( c ) = s ( c ) and E ∪ { 1 t = 1 } ⊢ IR r ( c ) = s ( c ), and th us by IR , E ⊢ IR r ( c ) = s ( c ) . ( ⇐ =) This follows from the s oundness of IR with resp ect to ILC . That is, if E ⊢ u = v bec ause E ∪ { t = 0 } ⊢ u = v and E ∪ { 1 t = 1 } ⊢ u = v , then E ∪ { t = 0 ∨ 1 t = 1 } | = u = v , so E ∪ ILC | = u = v . (5) (= ⇒ ) By inductio n o n the length of the pro of, us ing Pr opo sition 1: if E ⊢ IR r ( c ) = s ( c ) follows from IR (the only interesting ca se), then E ∪ { t = 0 } ⊢ IR r ( c ) = s ( c ) , E ∪ { 1 t = 1 } ⊢ IR r ( c ) = s ( c ) , so E ⊢ 0 t · r ( c ) = 0 t · s ( c ) by (6) and E ⊢ 1 t · r ( c ) = 1 t · s ( c ) by (7). Thus E ⊢ r ( c ) = (0 t + 1 t ) · r ( c ) = 0 t · r ( c ) + 1 t · r ( c ) = 0 t · s ( c ) + 1 t · s ( c ) = s ( c ) . 9 A similar pro of result is obta ined by replacing r ( c ) by r and s ( c ) by s . ( ⇐ =) T rivial: if E ⊢ r = s , then E ⊢ r ( c ) = s ( c ) in the extended sig na ture Σ ( c ). So, E ⊢ IR r ( c ) = s ( c ). A first application of Theore m 2 co ncerns the equational theory of ca ncellation meadows: Corollary 1. The set of axioms Md (se e T able 1) is a finite b asis (a c omplete axio matiza- tion) of Mo d Σ m ( Md ∪ IL ) . Pr o of. It r emains to be shown that the propaga tion pr ope rties for pse udo units and for pseudo zer os ho ld in Md . This follows easily by case distinction on the forms that C [ r ] may take and the v arious ident ities on 1 t and 0 t . As an exa mple consider the case C [ ] ≡ + u . Then 1 t · C [ r ] = 1 t · ( r + u ) = 1 t · r + 1 t · u = 1 t · 1 t · r + 1 t · u = 1 t · C [1 t · r ] . The r emaining cases can b e prov ed in a similar w ay . 4 Differen tial Meado ws In this section we provide a n elegant equational ax io matization of differential op erators and with the generic basis theor e m w e obtain a finite bas is for differential cancellation meadows. 4.1 Differen tial Meado ws Given some n ≥ 1 w e extend the signature Σ m of meadows with differen tiation op erators and consta n ts X 1 , ..., X n to mo del functions to be differentiated: ∂ ∂ X i : M → M for i = 1 , ..., n and some meadow M . W e write Σ md for this extended sig nature. Equational axioms for ∂ ∂ X i are given in T a ble 2, wher e (13) and (14) define n 2 equational axioms. Observe that the Md axioms together with Axiom (12) imply ∂ ∂ X i (0) = 0 . F urthermo re, using Axiom (10) one ea s ily proves: ∂ ∂ X i ( − x ) = − ∂ ∂ X i ( x ) . First we establish the ex p ected corollary o f Theorem 2: 10 ∂ ∂ X i ( x + y ) = ∂ ∂ X i ( x ) + ∂ ∂ X i ( y ) (10) ∂ ∂ X i ( x · y ) = ∂ ∂ X i ( x ) · y + x · ∂ ∂ X i ( y ) (11) ∂ ∂ X i ( x · x − 1 ) = 0 (12) ∂ ∂ X i ( X i ) = 1 (13) ∂ ∂ X i ( X j ) = 0 if i 6 = j (14) T able 2: The set DE of axioms for differentiation Corollary 2. The set of axioms Md ∪ DE (se e T ables 1 and 2) is a c omplete axiomatization of Mo d Σ md ( Md ∪ DE ∪ IL ) . Pr o of. The pseudo unit propagation pr ope rt y r equires a chec k for ∂ ∂ X i ( ) o nly : ∂ ∂ X i (1 t · r ) = ∂ ∂ X i (1 t ) · r + 1 t · ∂ ∂ X i ( r ) = 1 t · ∂ ∂ X i ( r ) . (15) Multiplication with 1 t now yields the prop erty . F rom (1 5) we g et 0 t · ∂ ∂ X i ( r ) = ∂ ∂ X i ( r ) − 1 t · ∂ ∂ X i ( r ) (15) = ∂ ∂ X i ( r ) − ∂ ∂ X i (1 t · r ) = ∂ ∂ X i (0 t · r ) and multiplication with 0 t then yields the pse udo zero propagation prop erty . A differ ent ial me adow is a meadow eq uipp ed with fo r mal v ar iables X 1 , ..., X n and differ- ent ia tio n op erator s ∂ ∂ X i ( ) that satisfies the axioms in DE . W e conclude this section with an elegant co nsequence of the fact that we ar e working in the setting o f meadows, namely the conseque nc e that the differential of an in verse follows from the DE a xioms. Prop osition 2. Md ∪ DE ⊢ ∂ ∂ X i (1 /x ) = − (1 /x 2 ) · ∂ ∂ X i ( x ) . Pr o of. By Axio ms (12) and (11), 0 = ∂ ∂ X i ( x/x ) = ∂ ∂ X i ( x ) · 1 /x + x · ∂ ∂ X i (1 /x ) , 11 so 0 = 0 · (1 /x ) = ∂ ∂ X i ( x/x ) · (1 /x ) = ∂ ∂ X i ( x ) · 1 /x 2 + ( x/x ) · ∂ ∂ X i (1 /x ) (15) = 1 /x 2 · ∂ ∂ X i ( x ) + ∂ ∂ X i (( x/x ) · (1 /x )) RIL = 1 /x 2 · ∂ ∂ X i ( x ) + ∂ ∂ X i (1 /x ) , and hence ∂ ∂ X i (1 /x ) = − (1 /x 2 ) · ∂ ∂ X i ( x ) . 4.2 Existence of D ifferential Meado ws In this section we show the existenc e of differential mea dows with fo r mal v ariables X 1 , ..., X n for arbitrary finite n > 0. First we define a particular cancellation meadow, and then w e expand this meadow to a different ia l cancellation meadow b y adding formal differentiation. The Zar i s ki top ology congruence o ver C n 0 . W e will use some terminolo gy from alge- braic geometry , in particular we will use the Zar iski top ology [2 3, 17]. Op en (closed) sets in this topolo g y will be indicated as Z-open (Z-closed). Rec all that co mplemen ts of Z-c losed sets are Z-op en and complements of Z-o pen sets are Z-clo sed, finite unions o f Z-closed sets are Z-clo s ed, and intersections of Z-closed sets ar e Z-close d. Let C 0 denote the zero-tota lized expansion of the c o mplex num b ers. W e will ma ke use of the following facts: 1. The solutio ns of a set of p olynomia l equations (with n or less v ariable s ) within C n 0 constitute a Z-closed subset of C n 0 . Here ’p olyno mial’ has the con ven tiona l meaning, not inv olving div is ion. T aking equations 1 = 0 a nd 0 = 0 resp ectively , it follows that bo th ∅ and C n 0 are Z -closed (and Z-op en as w ell). 2. Intersections o f non-empty Z-op en s e ts are non-empt y . In the following we co nsider terms t ( X ) = t ( X 1 , ..., X n ) with t = t ( x ) a Σ m -term and w e write T (Σ m ( X )) for the set of these terms. F or V ⊆ C n 0 we define the eq uiv alence ≡ V C n 0 on T (Σ m ( X )) by t ( X ) ≡ V C n 0 r ( X ) if ea ch a ssignment X 7→ V ev aluates both sides to equal v alues in C 0 . It follows immediately that for ea ch V ⊆ C n 0 , T (Σ m ( X )) / ≡ V C n 0 is a meadow. In particula r , if V = ∅ one o bta ins the trivial meado w (0 = 1) as b oth 0 and 1 sa tis fy a n y universal quantifi ca tion ov er an empty set. If V is a singleton this quo tient is a cancellation 12 meadow. In other cas es the meadow may no t satisfy the cancellation pro per t y . Indeed, suppo se that n = 1 and V = { 0 , 1 } a nd let t ( X ) = X . Now t (1) 6 = 0. Thus t ( X ) 6 = 0 in T (Σ m ( X )) / ≡ V C 0 . If that is assumed to b e a cancellatio n meadow, ho wever, one has 1 t ( X ) = 1, but 1 t (0) = 0, th us refuting 1 t ( X ) = 1. W e now define the rela tion ≡ Z T C (Zariski T op ology Co ngruence ov er C n 0 ) by t ≡ Z T C r ⇐ ⇒ ∃ V ( V is Z-op en, V 6 = ∅ and t ≡ V C n 0 r ) . The r elation ≡ Z T C is indeed a congruence for all mea dow op era tors: the eq uiv alence prop- erties follow easily; for 0 ≡ Z T C 0 and 1 ≡ Z T C 1, take V = C n 0 , and if P ≡ Z T C P ′ and Q ≡ Z T C Q ′ , witnessed resp ectively by V and V ′ , then P + P ′ ≡ Z T C Q + Q ′ and P · P ′ ≡ Z T C Q · Q ′ are witnessed by V ∩ V ′ which is Z-op e n and non-empty b ecause of fact 2 above. Finally − P ≡ Z T C − P ′ and ( P ) − 1 ≡ Z T C ( P ′ ) − 1 are b oth witnessed by V . Theorem 1, i.e., the (SMF) representation res ult for mea dow terms implies for T (Σ m ( X )) / ≡ Z T C that each term ca n be repres e nted b y 0 or b y p/q with p and q p olyno mials not equal to 0. W e notice that it is decida ble whether or not a p olynomial equals the 0-p olynomial by taking all corresp onding pro ducts of p ow ers of the X 1 , ..., X n together and then c hecking that a ll co efficients v anish. As an example, let P be the SMF of level 1 defined by P = 0 1 − X 1 · 2 X 1 X 2 + 1 1 − X 1 · 1 + X 2 − 2 X 1 X 3 8 − X 1 X 2 3 . Now in T (Σ m ( X )) / ≡ Z T C , the p olynomia l 1 − X 1 is on so me Z-op en non-empty set V not equal to 0 (see fact 1 ab ov e), thus 1 1 − X 1 ≡ V C n 0 1 and 0 1 − X 1 ≡ V C n 0 0, and hence P ≡ Z T C 1 + X 2 − 2 X 1 X 3 8 − X 1 X 2 3 . So, in T (Σ m ( X )) / ≡ Z T C , the SMF level-hierarch y collapse s and terms can be represent ed by either 0 o r by p/q with both p and q polynomials no t equal to 0. In the second cas e 1 p/q = 1 a nd therefore it is a c a ncellation meado w. F urthermore, eq ua lit y is decidable in this mo del. Indeed to chec k that 1 p = 1 (and 0 p = 0) for a p olynomial p it s uffices to chec k that p is not 0 over the complex n um b ers. Using the SMF representation all clo sed terms are either 0 or take the form p/q with p and q no nzero p olynomials. F or q and q ′ nonzero po lynomials we find that p/q ≡ Z T C p ′ /q ′ ⇐ ⇒ p · q ′ − p ′ · q = 0 which we hav e alr eady found to b e decidable. Constructing a differen tial cancellation m eado w. In T (Σ m ( X )) / ≡ Z T C the differ- ent ia l op erators ca n b e defined as follo ws: ∂ ∂ X i (0) = 0 13 and, using the fact that differen tials on p olyno mials are k nown, ∂ ∂ X i ( p q ) = ∂ ∂ X i ( p ) · q − p · ∂ ∂ X i ( q ) q 2 . Let V b e the set of 0-p oints of q and let U = ∼ V , the co mplemen t o f V . Then p/q is differen tiable on U a nd the deriv ative coincides with the for ma l deriv ative used in the definition. This definitio n is r epresentation indep endent: consider p ′ /q ′ ≡ Z T C p/q with V ′ the 0-p oints of q ′ and U ′ = ∼ V ′ . Then there is some non-empt y and Z-o pen W suc h that p/q ≡ W C n 0 p ′ /q ′ . Now W ∩ U ∩ U ′ is non-empty and Z-op en, and on this set, ∂ ∂ X i ( p q ) = ∂ ∂ X i ( p ′ q ′ ) . So, forma l differentiation ∂ /∂ X i preserves the congruence pr o per ties. Finally , we chec k the soundness o f the DE axio ms: Axiom (10): Consider t + t ′ . In the case that one of t and t ′ equals 0, ax iom D1 is obviously sound. In the remaining case, t = p/q and t ′ = p ′ /q ′ with all p olynomials not equal to 0 and t + t ′ = pq ′ + p ′ q q q ′ . Using or dinary differentiation on poly no mials we derive ∂ ∂ X i ( t + t ′ ) = ∂ ∂ X i ( pq ′ + p ′ q ) · q q ′ − ( pq ′ + p ′ q ) · ∂ ∂ X i ( q q ′ ) ( q q ′ ) 2 = ∂ ∂ X i ( p ) · q · ( q ′ ) 2 + ∂ ∂ X i ( p ′ ) · q 2 · q ′ ( q q ′ ) 2 + − p · ∂ ∂ X i ( q ) · ( q ′ ) 2 − p ′ · ∂ ∂ X i ( q ′ ) · q 2 ( q q ′ ) 2 = ∂ ∂ X i ( p q ) · 1 ( q ′ ) 2 + ∂ ∂ X i ( p ′ q ′ ) · 1 q 2 = ∂ ∂ X i ( t ) + ∂ ∂ X i ( t ′ ) . Axiom (11): Similar. Axiom (12): Consider t , then either t = 0 or t/ t = 1, and in b oth cases ∂ ∂ X i ( t t ) = 0. Axioms schemes (13) and (14): W e derive ∂ ∂ X i ( X j ) = ∂ ∂ X i ( X j 1 ) = ( 0 if i 6 = j , 1 other wise. Thu s, by a dding forma l differen tiatio n to T (Σ m ( X )) we constructed a differential cancel- lation meadow. 14 s (1 x ) = 1 x (16) s (0 x ) = 0 x (17) s ( − 1) = − 1 (18) s ( x − 1 ) = s ( x ) (19) s ( x · y ) = s ( x ) · s ( y ) (20) 0 s ( x ) − s ( y ) · ( s ( x + y ) − s ( x )) = 0 (21) T able 3: The set Signs of axioms for the sign function 5 Signed meado ws In this s e ction we cons ider signe d me adows : we extend the s ignature Σ m = (0 , 1 , + , · , − , − 1 ) of meadows with the unary sig n (or signum ) function s ( x ). W e wr ite Σ ms for this extended signature, so Σ ms = (0 , 1 , + , · , − , − 1 , s ). The s ig n function s ( x ) pr esuppo ses an or dering o n its do main and is defined b y s ( x ) = − 1 if x < 0 , 0 if x = 0 , 1 if x > 0 . W e define the sign function in an eq ua tional manner by the se t Signs of axio ms given in T able 3. First, no tice that by Md and a xiom (16) (or axio m (17)) we find s (0) = 0 a nd s (1) = 1 . Then, observe that in c o m binatio n with the in verse la w IL , a x iom (21) is an equational representation of the conditional equa tional axio m s ( x ) = s ( y ) − → s ( x + y ) = s ( x ) . F rom Md a nd axioms (18)–(21) one can easily compute s ( t ) for any clos ed term t . Some mor e consequences o f the Md ∪ S igns axioms are these: s ( x 2 ) = 1 x , (22) s ( x 3 ) = s ( x ) , (23) 1 x · s ( x ) = s ( x ) , (24) s ( x ) − 1 = s ( x ) . (25) Here (22) follo ws fro m s ( x 2 ) = s ( x ) · s ( x ) = s ( x ) · s ( x − 1 ) = s (1 x ) = 1 x , (2 3) from s ( x 3 ) = s ( x ) · s ( x ) · s ( x − 1 ) = s ( x · ( x · x − 1 )) = s ( x ), (24) from 1 x · s ( x ) = s ( x 2 ) · s ( x ) = s ( x 3 ) = s ( x ), and (25) from s ( x ) − 1 = ( s ( x ) 2 · s ( x ) − 1 ) − 1 = ( s ( x 2 ) · s ( x ) − 1 ) − 1 = (1 x · s ( x ) − 1 ) − 1 = 1 x · s ( x ) = s ( x ) . 15 So, 0 = s ( x ) − s ( x ) = s ( x ) − s ( x ) 3 = s ( x )(1 − s ( x ) 2 ) a nd hence s ( x ) · (1 − s ( x )) · (1 + s ( x )) = 0 . (26) Ident ity (26) implies with IL that for any clos ed term t , s ( t ) ∈ {− 1 , 0 , 1 } , a nd thus also that s ( s ( t )) = s ( t ). How ever, with so me effort we can derive s ( s ( x )) = s ( x ), which of co urse is an interesting consequence. Prop osition 3. Md ∪ S igns ⊢ s ( s ( x )) = s ( x ) . Before g iving a pr oo f of the idemp otency of s ( x ) w e explain how we found one, as there seems not to b e an obvious proo f for this iden tity — at the same time this explanation illustrates the pro o f of Theorem 2 . Consider a fre s h co nstant c and let e abbre viate the equation s ( s ( c )) = s ( c ), then: Md ∪ Signs ∪ { s ( c ) = 0 } ⊢ IR e, Md ∪ Signs ∪ { 1 s ( c ) = 1 , 1 − s ( c ) = 0 } ⊢ IR e, Md ∪ Signs ∪ { 1 s ( c ) = 1 , 1 1 − s ( c ) = 1 } ⊢ IR e. The fir st tw o deriv abilities ar e trivial, the third one is o btained from (26) after multiplication with 1 / s ( c ) · 1 / (1 − s ( c )) (th us yielding s ( c ) = − 1 = s ( s ( c ))). The pro of transformations that under ly the pro o f of Theor em 2 dicta te how to eliminate the IR rule in this pa r ticular case. The pro of b elow s hows the slight ly polis hed r e s ult. Pr o of of Pr op osition 3. Recall 0 t + 1 t = 1. The re s ult s ( s ( x )) = s ( x ) follows from s ( s ( x )) = (0 s ( x ) + 1 s ( x ) ) · s ( s ( x )) , s ( x ) = (0 s ( x ) + 1 s ( x ) ) · s ( x ) , and (27) and (28) : 0 s ( x ) · s ( s ( x )) = 0 s ( x ) · s ( x ) , (27) 1 s ( x ) · s ( s ( x )) = 1 s ( x ) · s ( x ) . (28) Ident ity (27) follows fr o m 0 = 0 s ( x ) · s ( x ) by 0 = s (0) = s (0 s ( x ) · s ( x )) = 0 s ( x ) · s ( s ( x )), and (28) follows from combinin g (29) and (30) : 1 s ( x ) · 0 1 − s ( x ) · s ( s ( x )) = 1 s ( x ) · 0 1 − s ( x ) · s ( x ) , (29) 1 s ( x ) · 1 1 − s ( x ) · s ( s ( x )) = 1 s ( x ) · 1 1 − s ( x ) · s ( x ) . (30) Ident ity (29) follows simply: 0 1 − s ( x ) · (1 − s ( x )) = 0, so 0 1 − s ( x ) · s ( x ) = 0 1 − s ( x ) and thus 0 1 − s ( x ) · s ( s ( x )) = s (0 1 − s ( x ) · s ( x )) = s (0 1 − s ( x ) ) = 0 1 − s ( x ) = 0 1 − s ( x ) s ( x ) . Ident ity (30) can be derived as follows: from (26) infer 1 s ( x ) · 1 1 − s ( x ) · (1 + s ( x )) = 0 , 16 th us 1 s ( x ) · 1 1 − s ( x ) · s ( x ) = 1 s ( x ) · 1 1 − s ( x ) · − 1, and th us with s ( − 1) = − 1, 1 s ( x ) · 1 1 − s ( x ) · s ( s ( x )) = s (1 s ( x ) · 1 1 − s ( x ) · s ( x )) = 1 s ( x ) · 1 1 − s ( x ) · − 1 = 1 s ( x ) · 1 1 − s ( x ) · s ( x ) . Next we establish the exp ected corollar y of Theorem 2: Corollary 3. The set of axioms Md ∪ Signs (se e T ables 1 and 3) is a finite b asis (a c omplete axiomatization) of Mo d Σ ms ( Md ∪ Signs ∪ IL ) . Pr o of. It suffices to show that the propa gation prop erties are satisfied for s ( ). Pseudo units: 1 x · s ( y ) = (1 x ) 2 · s ( y ) = 1 x · s (1 x ) · s ( y ) = 1 x · s (1 x · y ). Pseudo zeros: 0 x · s ( y ) = (0 x ) 2 · s ( y ) = 0 x · s (0 x ) · s ( y ) = 0 x · s (0 x · y ). W e no tice that the initial alg e bra of Md ∪ Signs equa ls Q 0 as intro duced in [8] expanded with the sign function (a pro o f follows immediately from the techniques used in that pa- per ). It remains to be s hown that the Signs ax ioms (in co m bination with those of Md ) are independent. W e leave this a s an open question. In the following we show that the sign function is not definable in Q 0 , the zero- totalized field of rational num b ers as discussed in [8]. W e say that q , q ′ ∈ T ( Q 0 ) ar e differ ent if 1 q − q ′ = 1. Let r = r ( x ) and s = s ( x ) and let T ( Q 0 [ x ]) b e the set of terms that a re either closed o r hav e x as the only v aria ble, so r , s ∈ T ( Q 0 [ x ]). W e define r ≡ ∞ s ⇐ ⇒ r ( q ) = s ( q ) for infinitely many different q in T ( Q 0 ) , r ≡ ae s ⇐ ⇒ r ( q ) 6 = s ( q ) for finitely many different q in T ( Q 0 ) . W e call these r elations infin ite e quivalenc e and almo st e quivalenc e , resp ectively . Observe that b oth these relations are congruences ov er T ( Q 0 [ x ]). Theorem 3. L et r = r ( x ) a nd s = s ( x ) . If r ≡ ∞ s then r ≡ ae s . Pr o of. By Theor em 1 it suffices to prove this for SMFs, say P = P ( x ) and Q = Q ( x ). Because P − Q is then prov ably equal to an SMF, we further assume without loss of generality that Q = 0. So, let P ≡ ∞ 0. W e prov e P ≡ ae 0 b y induction on the level n of P . Case n = 0 . Then P = s/t for polyno mials s = s ( x ) and t = t ( x ). Becaus e P ≡ ∞ 0, at least one of s ≡ ∞ 0 and t ≡ ∞ 0 holds. Beca use p olyno mials alwa ys ha ve a finite nu mber of zero po in ts, at lea st one o f s ≡ ae 0 and t ≡ ae 0 holds. Th us P ≡ ae 0. Case n + 1 . Then P = 0 t · S + 1 t · T . 17 • If t ≡ ae 0 then 0 t ≡ ae 1 and 1 t · T ≡ ae 0, so S ≡ ∞ 0. By induction, S ≡ ae 0, and th us 0 t · S ≡ ae 0 and hence P ≡ ae 0. • If t 6≡ ae 0 then 1 t ≡ ∞ 1, so 1 t ≡ ae 1 and 0 t · S ≡ ae 0, so T ≡ ∞ 0. By induction, T ≡ ae 0, and th us 1 t · T ≡ ae 0 and hence P ≡ ae 0. An immediate consequence o f Theor em 3 is : Corollary 4. The sign function is n ot definable in Q 0 . Pr o of. Supp o se otherwise. Then ther e is a term t ∈ T ( Q 0 [ x ]) with s ( x ) = t ( x ). So t ( x ) ≡ ∞ 1 (beca use of all p ositive rationals). But then t ( x ) ≡ ae 1 by Theorem 3, which con tra dicts t ( x ) = − 1 for a ll negative r ationals. F urthermo re, we notice that with the sign function s ( x ), the functions max( x, y ) a nd min( x, y ) hav e a simple equa tional sp ecification: max( x, y ) = ma x( x − y , 0) + y , max( x, 0) = ( s ( x ) + 1 ) · x/ 2 , and, of course, min ( x, y ) = − max( − x, − y ). Finally , the existence of no n-trivial differential cancellation meadows with sign function is not an obvious matter and r equires a modifica tion of the existence pro of given in Section 4.2. 6 Flo or, Ceiling and Square Ro ot In this section we co nsider extensions o f s igned meadows with flo or, ceiling and squa re ro ot. 6.1 Signed Meado ws with Flo or and Ceiling W e briefly discuss the extensio n of signed mea dows with the flo or function ⌊ x ⌋ and the c eiling function ⌈ x ⌉ . These functions are defined by ⌊ x ⌋ = max { n ∈ Z | n ≤ x } and ⌈ x ⌉ = min { n ∈ Z | n ≥ x } . W e define these functions in an equational manner b y the ax ioms in T able 4. Some comments on these axio ms : first, (31) a nd (32) guarantee the propagation prop er- ties. Then, co nsider 0 1 − s ( x ) · 0 1 − s (1 − x ) , which eq ua ls 1 if b oth x > 0 and 1 − x > 0 , and 0 otherwise. So, axiom (36) states that ⌊ x ⌋ = 0 whenever 0 < x < 1. With (33)–(35) this is 18 1 x · ⌊ y ⌋ = 1 x · ⌊ 1 x · y ⌋ (31) 0 x · ⌊ y ⌋ = 0 x · ⌊ 0 x · y ⌋ (32) ⌊ x − 1 ⌋ = ⌊ x ⌋ − 1 (33) ⌊ x + 1 ⌋ = ⌊ x ⌋ + 1 (34) ⌊ 0 ⌋ = 0 (35) (0 1 − s ( x ) · 0 1 − s (1 − x ) ) · ⌊ x ⌋ = 0 (36) ⌈ x ⌉ = −⌊− x ⌋ (37) T able 4: The set FC of a xioms for the flo or and ceiling functions sufficient to c o mpute ⌊ t ⌋ for an y clo s ed t . Axiom (37), defining the ceiling function ⌈ x ⌉ is totally sta ndard. Let Σ msfc be the sig nature of this extension. As befor e, we have a n immediate coro llary of The o rem 2. Corollary 5. The set of axioms Md ∪ Signs ∪ FC (se e T ables 1, 3 and 4 ) is a finite b asis (a c omplete axiomatization) of Mo d Σ msfc ( Md ∪ Signs ∪ F C ∪ IL ) . Pr o of. F or flo or , the propag ation prop erties for pseudo units a nd for pseudo zer os a r e directly axiomatized b y axioms (31) and (32), and thos e for ceiling follow easily . So, the co rollary follows immedia tely from Theorem 2 and the pro of of Coro llary 3. W e no tice that the initial algebra of Md ∪ S igns ∪ F C is Q 0 extended with the sign function s ( x ) and the floor and ceiling functions ⌊ x ⌋ and ⌈ x ⌉ . It remains to be shown that the FC axioms (in co m bination with those of Md ∪ Signs ) ar e indep enden t. W e leav e this as an op en question. W e co n tinue this section b y proving that in Q 0 ( s ), i.e., the rationa l num be r s viewed a s a signed meadow, a definition of ceiling and flo or canno t b e given. T o this end, we fir st pr ov e a gener al prop erty of unary functions defina ble in Q 0 ( s ). Theorem 4. F or any fun ction h ( x ) definable in Q 0 ( s ) t her e exist r ∈ T ( Q 0 ) and a function g ( x ) definable in Q 0 [ x ] such that x > r = ⇒ h ( x ) = g ( x ) . Pr o of. By str uctural induction on the form that h ( x ) may take. If h ( x ) ∈ { 0 , 1 , x } , we’re done. F or h ( x ) = − f ( x ) or h ( x ) = 1 /f ( x ) or h ( x ) = f 1 ( x ) + f 2 ( x ) or h ( x ) = f 1 ( x ) · f 2 ( x ), the result also follows immedia tely (in the latter cases take r = max( r 1 , r 2 ) for r i satisfying the prop erty for f i ( x )). In the re ma ining case, h ( x ) = s ( f ( x )). Let g ( x ) ∈ T ( Q 0 [ x ]) b e such that f ( x ) = g ( x ) for x > r . By induction on the form that g ( x ) may take, it follows that an r ′ exists such that fo r x > r ′ , s ( g ( x )) is co nstant. This prov es that for x > max( r, r ′ ), h ( x ) = s ( f ( x )) = s ( g ( x )) is constant. 19 Corollary 6. The flo or function ⌊ x ⌋ is n ot definable in Q 0 ( s ) . Pr o of. Consider h ( x ) = x − ⌊ x ⌋ x − ⌊ x ⌋ . If h ( x ) were definable in Q 0 ( s ), then by the preceding result there exist r and a function g ( x ) defina ble in Q 0 [ x ] such that h ( x ) = g ( x ) for x > r . But then g ( x ) ≡ ∞ 0 (for all integers ab ov e r ) and g ( x ) ≡ ∞ 1 (for a ll non-integers ab ov e r ), and this cont r a dicts T he o rem 3. W e finally notice that for t ( x ) s ome term one ca n add this induction rule: t (0) = 0 , 0 1 − s ( x ) · 0 t ( ⌊ x ⌋ ) · t ( ⌊ x ⌋ + 1 ) = 0 , 0 1+ s ( x ) · 0 t ( ⌈ x ⌉ ) · t ( ⌈ x ⌉ − 1 ) = 0 t ( ⌊ x ⌋ ) = 0 , t ( ⌈ x ⌉ ) = 0 th us t (0) = 0 , ( x > 0 & t ( ⌊ x ⌋ ) = 0) − → t ( ⌊ x ⌋ + 1) = 0 , ( x < 0 & t ( ⌈ x ⌉ ) = 0) − → t ( ⌈ x ⌉ − 1) = 0 t ( ⌊ x ⌋ ) = 0 , t ( ⌈ x ⌉ ) = 0 . With this par ticular induction r ule, the idemp otency of ⌊ x ⌋ can b e ea sily prov ed (take t ( x ) = x − ⌊ x ⌋ ), as well as the idemp otency of ceiling. With a little more effor t one ca n prov e ⌊ x − ⌊ x ⌋⌋ = 0 : fir st prov e ⌊−⌊ x ⌋⌋ = −⌊ x ⌋ by induction on x , and then ⌊ x + ⌊ y ⌋⌋ = ⌊ x ⌋ + ⌊ y ⌋ by induction on y . As a consequence, ⌊ x − ⌊ x ⌋⌋ = ⌊ x ⌋ + ⌊ − ⌊ x ⌋⌋ = ⌊ x ⌋ + −⌊ x ⌋ = 0. In general, if using IL the pr emises c an b e prov ed (fro m some extension of Md that satisfies the propaga tion pr op erties), then this can also b e proved without IL , and therefo re this also is the ca se for the conclus io n. 6.2 Signed Meado ws with Square R o ot A plausible wa y to totalize the square ro ot o per ation is to p ostulate √ − 1 = i and to abandon the do main o f signed fields in fav our of the complex num b ers. Here we cho ose a different appro ach by stipulating √ x = − √ − x for x < 0. In order to av oid confusion with the pr incipal square ro ot function we deviate from the standard notation and introduce the unary o per ation − √ called signe d squar e ro ot . W e write Σ mss for this extended signature, so Σ mss = (0 , 1 , + , · , − , − 1 , s , − √ ), and define the signe d sq uare ro o t op eration in an equationa l manner by the set Squ ar eR o ots o f axioms given in T able 5. Some additiona l consequences o f the Md ∪ Signs ∪ Squ ar eR o ots a xioms ar e thes e : − p s ( x ) = s ( x ) , (42) − √ 1 x = 1 x , (43) − √ 0 x = 0 x , (44) − √ − x = − − √ x, (45) − √ x 2 = x · s ( x ) . (46) 20 − √ x − 1 = ( − √ x ) − 1 (38) − √ x · y = − √ x · − √ y (39) − p x · x · s ( x ) = x (40) s ( − √ x − − √ y ) = s ( x − y ) (41) T able 5: The set Squar eR o ots of axioms for the squa re ro o t Here identit y (42) follo ws from − p s ( x ) = − p s ( xxx − 1 ) = − p s ( x ) s ( x ) s ( x − 1 ) = − p s ( x ) s ( x ) s ( x ) = − p s ( x ) s ( x ) s ( s ( x )) = s ( x ) , ident ity (43) fr om − √ 1 x = − p s (1 x ) = s (1 x ) = 1 x and identit y (4 4 ) is proved similarly . Ident ity (45) follows from − √ − x = − √ − 1 · x = − √ − 1 · − √ x = − p s ( − 1) · − √ x = s ( − 1) · − √ x = − 1 · − √ x = − − √ x, and (46) from − √ x 2 = − p x 2 · 1 x = − √ x 2 · 1 x = − √ x 2 · s (1 x ) = − √ x 2 · s ( x ) 2 = − √ x 2 · − p s ( x ) · s ( x ) = − p x 2 s ( x ) · s ( x ) = x · s ( x ) . Since (Σ mss , Md ∪ Signs ∪ Squar eR o ots ) sa tisfies b oth propaga tion prop erties , we can apply Theorem 2. Corollary 7. The set of axioms Md ∪ Signs ∪ Squar eR o ots is a c omplete axiomatization of Mo d Σ mss ( Md ∪ Signs ∪ Squar eR o ots ∪ IL ) . Pr o of. W e ha ve to prove that the pr o pagation pro per ties for pseudo units a nd pseudo zeros hold in Md ∪ Signs ∪ Squar eR o ots . This follows eas ily b y a ca s e distinction on the for ms that C [ r ] may take. As an exa mple we co nsider her e the ca se C [ ] ≡ − √ . Then 1 t · − √ r = 1 2 t · − √ r = 1 t · − √ 1 t · − √ r = 1 t · − √ 1 t · r by (1) and (43). The pro pagation prop erty for pseudo zeros is proved in a s imila r w ay applying (2) a nd (44). W e denote by Q 0 ( s , − √ ) the zero-totalize d signed prime field that contains Q and is closed under − √ . Note that Q 0 ( s , − √ ) is a computable data t yp e (see e.g. Bergstra and T uck er [7 ]). This s tatemen t still requir es an efficien t and rea dable pro of. 21 ∂ ∂ X i s ( y ) = 0 (47) ∂ ∂ X i − √ y = s ( y ) 2 ( − √ y ) − 1 · ∂ ∂ X i y (48) T able 6: The sig ned square ro ot for differ en tial meadows Finally , differential meadows can b e equipped with a sig ned sq uare ro ot o per ator by the axioms given in T able 6. Axiom (48) ca n actually be der ived from Axiom (4 7) a nd the equational axiomatization of differen tial meadows a s follows: 2 · − √ y · ∂ ∂ X i ( − √ y ) = − √ y · ∂ ∂ X i ( − √ y ) + − √ y · ∂ ∂ X i ( − √ y ) (11) = ∂ ∂ X i ( − √ y · − √ y ) (39) = ∂ ∂ X i ( − p y 2 ) (46) = ∂ ∂ X i ( y · s ( y )) (11) = s ( y ) · ∂ ∂ X i ( y ) + y · ∂ ∂ X i ( s ( y )) (47) = s ( y ) · ∂ ∂ X i ( y ) . Moreov er , by identit y (43), 1 y = 1 − √ y , and th us − √ y = − p 1 y · y = 1 y · − √ y . Hence ∂ ∂ X i ( − √ y ) = ∂ ∂ X i (1 y · − √ y ) (11) = − √ y · ∂ ∂ X i (1 y ) + 1 y · ∂ ∂ X i ( − √ y ) (12) = 1 y · ∂ ∂ X i ( − √ y ) (43) = 1 − √ y · ∂ ∂ X i ( − √ y ) = s ( y ) 2 ( − √ y ) − 1 · ∂ ∂ X i y . So, the existence of non-triv ial differ e ntial cancellation meadows with sig ned square r o ots depe nds heavily on the existence of an appropriate interpretation of the s ig n function. 22 7 Conclusions The main res ult of this pap er is a generic basis theorem for ca ncellation meadows. W e hav e applied this res ult to v a rious expansio ns of meadows. The first expansion c o ncerns differen- tial fields. It a ppea rs that the in ter a ction be tw een different ia l opera tors and e quations for meadows is en tirely unproblematic. The propag ation prop erties follo w immediately fr om well-kno wn axioms for differential fields. As s ta ted b efore, mos t uses of rational n umbers in computer science e x ploit their o rder- ing. W e include this order ing by extending the initial algebraic sp ecification of Q 0 with an equational sp ecificatio n o f the sign function, resulting in a finite basis for what we called Q 0 ( s ) a nd we provided a non-trivia l pro of of the idemp otency of the sign function in Q 0 ( s ). How ever, the question whether our par ticular a xioms for s ( x ) are independent is left o pen. As a further example we added the flo or function ⌊ x ⌋ , the ceiling function ⌈ x ⌉ , and the signed squar e ro o t to Q 0 ( s ) and showed tha t the re s ulting equa tional sp ecification is a finite basis. Again, we did not inv estig ate the indep endency of these axio ms. In [7] it is shown that computable algebra s ca n b e sp ecified by means of a complete term rewrite system, provided auxiliary functions can be used. Useful candidates for auxiliary op erators in the case o f rational num b ers ca n b e found in Moss [19] and Ca lk in and Wilf [13]. In [8] the existence of an eq ua tional specifica tion o f Q 0 which is confluent and terminating as a rewrite sys tem has b een formulated as an op en q uestion. T o that question we now a dd the co rresp onding question in the presence of the s ign op erator . References [1] B ergstra, J .A. and Bethke, I. (2009 ). Square r o ot meadows. Av aila ble at arXiv:090 1.4664 v1 [cs.LO]. [2] B ergstra, J.A., Hirshfeld, Y,. and T uck er, J.V. (2009 ). Meadows and the equational sp ecification of division. The or etic al Computer S cienc e , 41 0(12-13 ):1 261-12 71. (Also av a ilable at ar Xiv:0901.0 8 23 v1 [math.RA].) [3] B ergstra, J.A. and Middelburg , C.A. (2011 ). Inv ers iv e meadows and divisive meadows. Journal of Applie d L o gic , 9:203-2 20. [4] B ergstra, J .A., Ponse, A., and V an der Z waag, M.B. (2007). T uplix calculus. S cientific Annals of Computer Scienc e , 18:35-6 1 . (Also a v ailable at arXiv:07 12.342 3 v1 [cs.LO].) [5] B ergstra, J.A. and Ponse, A. (20 08). A generic ba sis theorem for cancellation meadows. Av ailable at arXiv:0 803.39 69 v2 [ma th.RA]. [6] B ergstra, J .A. and Ponse, A. (2008 ). Different ial meadows. Av a ilable at arXiv:080 4.3336 v1 [math.RA]. [7] B ergstra, J.A. and T uck er J.V. (1995 ). Equatio nal sp ecifica tions, co mplete term rewrit- ing systems, a nd computable and semico mputable alg e bras. Journal of the ACM , 42(6):119 4-123 0. 23 [8] B ergstra, J.A. and T uck er J.V. (200 7). The rational num b ers a s an abstract da ta type. Journal of the ACM , 54 (2), Article No. 7. [9] B ethk e I., Ro denbu r g P .H., and Sevenster, A. (200 9). The structure of finite meadows. Av ailable at arXiv:0 903.11 96 v1 [cs .LO]. [10] Bjørner, D. and Henson, M.C. (editors) (200 7). L o gics of Sp e cific ation L anguages . Monogra phs in Theoretical Computer Science, a n E A TCS Serie s . Springer- V erlag . [11] Brand, M.G.J. v an den, Deursen, A. v an, Heering , J., Jo ng , H.A. de, Jong e, M. de, Kuip ers, T ., Klint, P ., Mo onen, L., Olivier , P .A., Scheerder, J., Vinju, J.J., Visser , E., and Viss e r, J. (2001 ). The ASF+SDF Meta-Environment: a Comp onent-Based Language Dev elopment Environmen t. In R. Wilhelm (ed.), Pro ceedings of Compiler Construction (CC’01), LNCS 2027, pages 365-37 0 , Springer-V erlag . [12] Broy , M. and M. Wirsing, M. (1981). On the a lgebraic sp ecification of nondeterministic progra mming la nguages. In E. Astesia no and C. B¨ ohm (eds.), Pro ce edings CAAP’81, LNCS 1 1 2, pages 16 2-179, Springer -V erla g. [13] Calkin, N. a nd Wilf, H.S. (2 000). Recoun ting the ra tionals. A meric an Mathematic al Monthly , 107 :360-3 6 3. [14] Chang, C.C. and Ke is ler, H.J. (1990). Mo del Th e ory (3rd edition). North-Holland. [15] Goguen, J.A., Thatc her , J.W., W a gner, E.G., and W right, J.B . (1977). Initial algebra semantics and contin uous algebr as. Journal of the ACM , 24 (1):68-95 . [16] Graetzer, G. (1979). Universal Algebr a (2nd ed.), Springer- V erlag . [17] Hartshorne, R. (1977). Alge br aic Ge ometry . Springer-V erlag. [18] Komori, Y. (197 5). F r e e algebr as over al l fields and pseudo-fields . Rep ort 10, F aculty of Science, Shizuok a Universit y , pages 9-1 5. [19] Moss, L.S. (2001). Simple equatio nal spec ific a tions of rational arithmetic. Discr ete Mathematics and The or etic al Computer Scienc e , 4(2):291- 300. [20] Ono H. (198 3). E quational theories and universal theories of fields, Journal of the Mathematic al S o ciety of J ap an , 35:289 - 306. [21] W echler, W. (1992). Universal Algebr a for Computer Scientists . E A TCS Mono graphs in Co mputer Science. Spr inger-V e r lag. [22] Wirsing, M. (1990 ). Algebraic Specific a tion. In J. v a n Leeuw en (ed.), Handb o ok of The or etic al Computer Scienc e V olume B (F ormal Mo dels and Seman tics), pa ges 675- 788, Els e vier. [23] Zariski, O. (1944). The compactness of the Riemann manifold of a n abstract field of algebraic functions. Bul letin of the Americ an Mathe matic al So ciety , 50(10):683 –691. 24
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment