Meadows and the equational specification of division
aa r X i v : . [ m a t h . R A ] J a n Meadows and the equational specification of division
J A Bergstra Informatics Institute, University of Amsterdam,Science Park 403, 1098 SJ Amsterdam, The NetherlandsY Hirshfeld Department of Mathematics, Tel Aviv University,Tel Aviv 69978, IsraelJ V Tucker Department of Computer Science, Swansea University,Singleton Park, Swansea, SA2 8PP, United Kingdom
Abstract
The rational, real and complex numbers with their standard operations, includingdivision, are partial algebras specified by the axiomatic concept of a field. Since theclass of fields cannot be defined by equations, the theory of equational specificationsof data types cannot use field theory in applications to number systems based uponrational, real and complex numbers. We study a new axiomatic concept for numbersystems with division that uses only equations: a meadow is a commutative ringwith a total inverse operator satisfying two equations which imply 0 − = 0. Allfields and products of fields can be viewed as meadows. After reviewing alternateaxioms for inverse, we start the development of a theory of meadows. We givea general representation theorem for meadows and find, as a corollary, that theconditional equational theory of meadows coincides with the conditional equationaltheory of zero totalized fields. We also prove representation results for meadows offinite characteristic. Keywords . Field, totalized fields, meadow, division-by-zero, total versus partialfunctions, representation theorems, initial algebras, equational specifications, vonNeumann regular ring, finite meadows, finite fields.
At the heart of the theory of data types are the ideas of specifying the properties ofdata using equations and conditional equations, performing calculations and reasoning Email: [email protected] Email: [email protected] Email: [email protected] any computable data type possesses a range of equational specifications with desirableproperties, such as having few equations (e.g., [5, 6, 7]), or equations with valuable termrewriting properties (e.g., [8]). Since every computable data type can be equationally spec-ified - and, indeed, there are special specifications that define all and only computabledata types - we expect that any data type arising in computing can be specified by equa-tions and studied using the theory. The search for, and study of, equational specificationsof particular computational structures is long term activity, contributing to foundationalthinking in diverse areas of computer science, such as programming languages, hardwareverification, graphics, etc. For the theoretician, it is a challenge to develop and perfectthe properties of specifications far beyond those delivered by the general theory.Despite achievements in many areas, one does not have far to look for a truly funda-mental challenge. Algebras of rational, real and complex numbers make use of operationswhose primary algebraic properties are captured by the axioms of the concept of field .The field axioms consist of the equations that define commutative rings and, in particular,two axioms that are not equations that define the inverse operator and the distinctness ofthe two constants. Now, division is a partial operation, because it is undefined at 0, andthe class of fields cannot be defined by any set of equations. Thus, the theory of equa-tional specifications of data types cannot build on the theory of fields; moreover, data typetheory has rarely been applied to number systems based upon rational, real and complexnumbers. However, we know that, say, the field of rational numbers is a computable datatype - arguably, it is the most important data type for measurement and computation.Therefore, thanks to general theory, computable data types of rational, real and complexnumbers with division do have equational specifications. This fact leads to two problems:we must search for, and study,1. equational specifications of particular algebras of rational, reals and complex num-bers with division; and, ideally,2. equational specifications of classes of number algebras with division that are aselegant and useful as the theory of fields.Having begun to tackle Problem 1 in [9, 10, 1], this paper considers Problem 2 andintroduces a new axiomatisation for number systems with division, called the meadow,which uses only equations.A meadow is a commutative ring with unit equipped with a total unary operation x − ,named inverse, that satisfies these additional equations:( x − ) − = x (1) x · ( x · x − ) = x. (2)The first equation we call Ref, for reflection, and the second equation
Ril, for restrictedinverse law .Meadows provide a mathematical analysis of division which is more general than theclassical theory of fields. Meadows are total algebras in which, necessarily, 0 − = 0. Wehave used algebras with such zero totalized division in developing elementary algebraic2pecifications for several algebras of numbers in our previous papers [9, 10, 1]. The raisond’ˆetre of meadows is to be a tool that extends our understanding and techniques formaking specifications. Clearly, since meadows are commutative rings they also have puremathematical interest.Let us survey our results. In [9], an equational specification under initial algebrasemantics of the zero totalized field of rational numbers was presented, and specificationsfor other zero totalized fields were developed in [10] and [1]. In [9] meadows were isolatedby exploring alternate equational axioms for inverse. Specifically, 12 equations were found;a set CR of 8 equations for commutative rings was extended by a set SIP of 3 equationsfor inverse, including
Ref , and by
Ril . The single sorted finite equational specification CR + SIP + Ril has all zero totalized fields among its models and, in addition, a largeclass of structures featuring zero divisors. A model of CR + SIP + Ril was baptized a meadow in [9]. Because meadows are defined by equations, finite and infinite products ofzero totalized fields are meadows as well.Our first result will be that two of the equations from CR + SIP + Ril can be de-rived from the other ones. This establishes the subset Md , consisting of 10 equations ofthe 12 equations, including the 8 equations for CR and the equations Ref and
Ril men-tioned earlier. Our second result makes an intriguing connection between meadows andcommutative von Neumann regular rings.Our main task is to start to make a classification of meadows up to isomorphism. Weprove the following general representation theorem:
Theorem
Up to isomorphism, the non-trivial meadows are precisely the subalgebras ofproducts of zero totalized fields.
From this theorem we deduce this corollary:
Theorem
The equational theory of meadows and the equational theory of fields with zerototalized division are identical.
This strengthens a result for closed equations in [9]. Now we prove the following ex-tension:
Theorem
The conditional equational theory of meadows and the conditional equationaltheory of fields with zero totalized division are identical.
Next, we examine the relationship between fields and meadows of finite characteristic.The characteristic of a meadow is the smallest natural number n ∈ N such that n. . . . + 1 = 0. A prime meadow is a meadow without a proper submeadow andwithout a proper non-trivial homomorphic image.Given a positive natural number k , and writing k for the numeral for k , we can define Md k for the initial algebra of Md + { k = 0 } , i.e., Md k ∼ = I (Σ , Md ∪ { k = 0 } ) . Theorem
For k a prime number, Md k is the zero totalized prime field of characteristic k . Theorem
For k a square free number, Md k has cardinality k .In the matter of Problem 1 above, only recently, Moss found in [20] that there existsan equational specification of the ring of rationals (i.e., without division or inverse) withjust one unary hidden function. In [9] we proved that there exists a finite equationalspecification under initial algebra semantics, without hidden functions, but making useof an inverse operation, of the field of rational numbers. In [10], the specification foundfor the rational numbers was extended to the complex rationals with conjugation, andin [1] a specification was given of the algebra of rational functions with field and degreeoperations that are all total. Full details concerning the background of this work can befound in [9].We assume the reader is familiar with the basics of ring theory (e.g., [19, 21]), algebraicspecifications (e.g., [24]), universal algebra (e.g., [23, 17]) and term rewriting (e.g., [22]). We will add to the axioms of a commutative ring various alternative axioms for dealingwith inverse and division. The starting point is a signature Σ CR for commutative ringswith unit: signature Σ CR sorts ring operations → ring ;1 : → ring ;+ : ring × ring → ring ; − : ring → ring ; · : ring × ring → ring end To the signature Σ CR we add an inverse operator − to form the primary signature Σ,which we will use for both fields and meadows: signature Σ import Σ CR operations − : ring → ring end .1 Commutative rings and fields The first set of axioms is that of a commutative ring with
1, which establishes the standardproperties of +, − , and · . equations CR ( x + y ) + z = x + ( y + z ) (3) x + y = y + x (4) x + 0 = x (5) x + ( − x ) = 0 (6)( x · y ) · z = x · ( y · z ) (7) x · y = y · x (8) x · x (9) x · ( y + z ) = x · y + x · z (10) end These axioms generate a wealth of properties of + , − , · with which we will assume thereader is familiar. We will write x − y as an abbreviation of x + ( − y ). Having available an axiomatization of commutative rings with unit (such as the oneabove), we define the equational axiomatization of meadows by Md = (Σ , CR + Ref + Ril ) . On the basis of the axioms CR for commutative rings with unit there are different waysto proceed with the introduction of division. The orthodoxy is to add the following twoaxioms for fields: let Gil ( general inverse law ) and Sep ( separation axiom ) denote denotethe following two axioms, respectively: x = 0 = ⇒ x · x − = 1 (11)0 = 1 (12)Let (Σ , T field ) be the axiomatic specification of fields, where T field = CR + Gil + Sep .About the status of 0 − these axioms say nothing. This may mean that the inverse is:(1) a partial function, or(2) a total function with an unspecified value, or(3) omitted as a function symbol but employed pragmatically as a useful notation insome “self-explanatory” cases. 5ase 3 arises in another approach to axiomatizing fields, taken in many text-books,which is not to have an operator symbol for the inverse at all and to add an axiom Iel ( inverse existence law ) as follows: x = 0 = ⇒ ∃ y ( x · y = 1) . Each Σ algebra satisfying T field also satisfies Iel . In models of (Σ CR , CR + Iel + Sep )the inverse is implicit as a single-valued definable relation, so we call this theory the relational theory of fields RTF . In field theory, if the decision has been made to use a function symbol for inverse the valueof 0 − is either left undefined, or left unspecified. However, in working with elementaryspecifications, which we prefer, operations are total. This line of thought leads to totalizeddivision.The class Alg (Σ , T field ) is the class of all possible total algebras satisfying the axiomsin T field . For emphasis, we refer to these algebras as totalized fields .Now, for all totalized fields A ∈ Alg (Σ , T field ) and all x ∈ A , the inverse x − is defined.Let 0 A be the zero element in A . In particular, 0 − A is defined. The actual value 0 − A = a can be anything but it is convenient to set 0 − A = 0 A (see [9], and compare, e.g., Hodges[16], p. 695). Definition 2.1.
A field A with − A = 0 A is called zero totalized. This choice gives us a nice equation to use, the zero inverse law
Zil :0 − = 0 . With
ZTF , an extension of T field , we specify the class of zero totalized fields: ZTF = T field + Zil = CR + Gil + Sep + Zil .Let
Alg (Σ , ZTF ) denote the class of all zero totalized fields.
Lemma 2.2.
Each Σ CR algebra satisfying CR + Iel + Sep can be expanded to a Σ algebrawith a unique inverse operator that satisfies ZTF .Proof. To see this notice that if x · y = 1 and x · z = 1 it follows by subtraction of bothequations that x · ( y − z ) = 0. Now: y − z = 1 · ( y − z ) = ( x · y ) · ( y − z ) = x · ( y − z ) · y = 0 · y = 0,which implies that y = z and that the inverse is unique. Let x − be the function thatproduces this unique value (for non-zero arguments). Choose 0 − to be 0 and a zerototalized field has been built. 6 .1.4 Equations for zero totalized division Following [9], one may replace the axioms
Gil and
Sep by other axioms for division, es-pecially, the three equations in a unit called
SIP for strong inverse properties . They areconsidered “strong” because they are equations involving − without any guards , such as x = 0. These three equations were used already by Harrison in [15]. equations SIP , SIP SIP − x ) − = − ( x − ) (13)( x · y ) − = x − · y − (14)( x − ) − = x (15) end The following was proven in [9]:
Proposition 2.3. CR ∪ SIP ⊢ − = 0 . Ril
In [9] we add to CR + SIP the equation
Ril ( restricted inverse law ): x · ( x · x − ) = x which, using commutativity and associativity, expresses that x · x − is 1 in the presence of x . We may write x · x − as 1 x , in which case we have the following alternative formulationsof Ril , 1 x · x = x and 1 x · x − = x − , and also 1 x = 1 x − . Following [9] we define: Definition 2.4.
A model of CR + SIP + Ril is called a meadow . Shortly, we will demonstrate that this definition is equivalent to the definition of ameadow given in the introduction. A meadow satisfying
Sep is called non-trivial . Example
All zero totalized fields are clearly non-trivial meadows but not conversely.In particular, the zero totalized prime fields Z p of prime characteristic are meadows.That the initial algebra of CR + SIP + Ril is not a field follows from the fact that(1 + 1) · (1 + 1) − = 1 cannot be derivable because it fails to hold in the prime field Z ofcharacteristic 2 which is a model of these equations as well.Whilst the initial algebra of CR is the ring of integers, we found in [9] that Lemma 2.5.
The initial algebra of CR + SIP + Ril is a computable algebra but it is notan integral domain. .3 Derivable properties of meadows We will now derive some equational facts from the specification Md or relevant subsetsof it. Proposition 2.6. CR + Ril ⊢ x · x − = 0 ↔ x = 0 .Proof. Indeed, we have x · x − = 0 = ⇒ x · x − · x = 0 · x , by multiplication. Thus, x = 0by applying Ril to the LHS and simplifying the RHS. The other direction is immediatefrom 0 · x = 0.To improve readability we denote x − by x and use 1 x = x · x − . Recall that 1 x = 1 x . Proposition 2.7.
Implicit definition of inverse:CR + Ril ⊢ x · y = 1 → x − = y Proof. x = 1 · x = x · y · x = 1 x · y = (1 x + 0) · y = (1 x + 0 · x ) · y = (1 x + ( x − x ) · x ) · y =(1 x + ( x · − x · x · x ) · x ) · y = (1 x + ( x · x · y − x · x · x ) · x ) · y = (1 x + x · x · ( y − x ) · x ) · y =(1 x + x · ( y − x )) · y = (1 x + x · y − x · x ) · y = x · y · y = 1 · y = y Proposition 2.8.
Derivability of SIP1 and SIP2:1. Md ⊢ ( xy ) − = x − y −
2. Md ⊢ ( − x ) − = − ( x − ) Proof.
1. First we show that 1 xy = 1 x · y . Indeed we have: 1 xy · x · y = x · y · xy · x · x · y · y Applying
Ril twice we have x · y · x · x · y · y = x · y , and therefore 1 xy · x · y = x · y · xy = 1 xy . On the other hand applying Ril once we have x · y · xy · x · y = x · y and therefore 1 xy · x · y = x · y · x · y = 1 x · y This proves the auxiliary equation. Now: xy = xy · xy = xy · x · y = xy · x · x · y · y = 1 xy · x · y = 1 x · y · x · y = x · y.
2. The fact that − − − · ( −
1) = 1which is a consequence of CR . We now conclude with the help of 1: − x = ( − · x =( − · x = ( − · x = − x Thanks to Proposition 2.8 we obtain:
Corollary 2.9.
Md axiomatizes the meadows, i.e. Md is equivalent to CR + SIP + Ril .
Proposition 2.10.
1. CR + Ril + SIP2 ⊢ x = x → x = x −
2. Md ⊢ x = x → x = x − , and3. Md ⊢ x = x → x = x − .Proof. x = x · x · x − = x · x − = x · ( x · x ) − = x · x − · x − = x − .
2. From the assumption we obtain x · x − = x · x − and then x · x = x · x − . Thus x · x · x − = x · x − · x − whence x = (( x · x − · x − ) − ) − = ( x − · x · x ) − = x − .
3. From the assumption we obtain x · x − = x · x − and then x = x · x − , from whichwe get x · x − = x · x − · x − and x = x − .8 .4 Meadows and von Neumann regular rings with unit A commutative von Neumann regular ring (e.g., see [19, 13]) is a Σ CR algebra that satisfies CR and which in addition satisfies the following axiom regular ring ( RR ): ∀ x. ∃ y. ( x · y · x = x ) . A value y which satisfies x · y · x = x is called a pseudoinverse of x .Because Ril indicates that x − is a pseudoinverse of x , the Σ CR -reduct of a meadowis a commutative von Neumann regular ring and every meadow is an expansion of a vonNeumann regular ring . As it turns out a converse is true. We acknowlege Robin Chapman(Exeter UK) for pointing out to us the following observation: Lemma 2.11.
Every commutative regular von Neumann ring can be expanded to a meadow.Moreover, this expansion is unique.
First, we notice a lemma that holds for any commutative ring.
Lemma 2.12.
Given an x , any y with x · x · y = x and y · y · x = y is unique.Proof. Assume that, in addition, x · x · z = x and z · z · x = z . By subtracting the firstequations of both pairs, we get x · x · ( y − z ) = 0, which implies x · x · ( y − z ) · y = 0 · y , onmultiplying both sides by y . Since x · x · y = x , we deduce that x · ( y − z ) = 0 and that x · y = x · z . Now, substituting into y · y · x = y , this yields y · z · x = y ; and substitutinginto z · z · x = z it yields z · y · x = z ; taken together, we conclude y = z . Proof.
Then we proceed with the proof of Lemma 2.11. Suppose that Σ CR algebra A satsifies RR . First, expand the A to an algebra A ′ with an operator i : ring → ring thatsatisfies x · i ( x ) · x = x . This function i need not be unique, because i (0) can take anyvalue in A . However, if j ( x ) is another function on the domain of A such that for all x , x · j ( x ) · x = x , then for all x , i ( x ) · x · i ( x ) = j ( x ) · x · j ( x ).To see this, write: p ( x ) = i ( x ) · x · i ( x ) and q ( x ) = j ( x ) · x · j ( x ). Now x · x · p ( x ) = x · x · i ( x ) · x · i ( x ) = x · x · i ( x ) = x and p ( x ) · p ( x ) · x = i ( x ) · x · i ( x ) · i ( x ) · x · i ( x ) · x = i ( x ) · x · i ( x ) · i ( x ) · x = x · i ( x ) · i ( x ) = p ( x ) . An application of Lemma 2.12 establishesthat p ( x ) = q ( x ) for all x . It follows that p is independent of the choice of i .Then expand A ′ to the Σ algebra A ′′ by introducing an inverse operator as follows: x − = p ( x ) = i ( x ) · x · i ( x ).We will show that both Ril and
Ref are satisfied. For
Ril we make use of the equationsjust derived for p ( − ) and find: x · x · x − = x · x · p ( x ) = x .Now Ref has to be established for the proposed inverse operator. In order to provethat ( u − ) − = u , write x = u − , y = x − and z = u .Then, using straightforward calculations, we obtain: x · x · y = x , y · y · x = y , x · x · z = x and z · z · x = z . It follows by Lemma 2.12 that y = z , which is the required identity.To see that the expansion is unique suppose that two unary functions p ( − ) and q ( − )both satisfy Ref and
Ril . Using Lemma 2.8 both functions satisfy p ( x · y ) = p ( x ) · p ( y )9nd q ( x · y ) = q ( x ) · p ( y ), respectively. Given an arbitrary x we find: x · x · p ( x ) = x byassumption on p ( − ). Applying p ( − ) on both sides we find p ( x · x · p ( x )) = p ( x ), which using SIP2 implies p ( x ) · p ( x ) · p ( p ( x )) = p ( x ). Then, using Ref we have p ( x ) · p ( x ) · x = p ( x ).Similarly we find x · x · q ( x ) = x and q ( x ) · q ( x ) · x = q ( x ). By means of Lemma 2.12 thisyields p ( x ) = q ( x ).The uniqueness of inverse as an expansion of commutative rings satisfying Ref and
Ril indicates that the inverse operation can be implicitly defined on a commutative vonNeumann regular ring. The Beth definability theorem implies the existence of an explicitdefinition for inverse. In this case the application of Beth definability is inessential,however, because from the proof of Lemma 2.11 an explicit definition can be inferred for y = x − : ∃ z. ( x · z · x = x & y = z · x · z ) . Because the theory of meadows is equational we know from universal algebra (see [17, 23])that:
Theorem 3.1.
The class of meadows is closed under subalgebras, direct products andhomomorphic images.
Thus, every subalgebra of a product of zero totalized fields is a meadow. Our maintask is to show that every non-trivial meadow is isomorphic to a subalgebra of a productof zero totalized fields. First, we recall some basic properties of commutative rings, whichcan be found in many textbooks (e.g., [19]).
Let R be a commutative ring. An ideal in a ring R is a subset I with 0, and such that if x, y ∈ I and z ∈ R , then x + y ∈ I , and z · x ∈ I . R itself and { } are the trivial ideals.Any other ideal is a proper ideal .The ideal R · x = { y · x | y ∈ R } is the principal ideal generated by x . Since R has aunit, the generator x = x · R · x . This is the smallest ideal that includes x .If I is an ideal then the following relation is a Σ CR congruence: x ≡ y iff x − y ∈ I. The set of classes
R/I is a ring. The quotient map maps every element a of R toits equivalence class, which is denoted by a + I or by a/I . The quotient map is a Σ CR homomorphism from R onto R/I (an epimorphism). It is clear what it means that I is amaximal ideal in R . Lemma 3.2.
Every ideal is contained in (at least one) maximal ideal.Proof.
The union of a chain of ideals containing I and not 1 does not include 1. Therefore,by Zorn’s lemma there is a maximal such ideal.10 emma 3.3. I is a maximal ideal iff
R/I is a field.Proof. If x is not in I then the ideal generated by I and x is R . Hence for some i in I and y in R we have 1 = i + xy . It follows that the classes of x and of y are inverse toeach other. Since x is arbitrary outside I , every class except for the class 0 (i.e, the set I ) has an inverse.Recall that e ∈ R is called an idempotent if e · e = e . Proposition 3.4.
Let e ∈ R be an idempotent and e · R the principal ideal that it generates.Then1. e is a unit in the ring e · R ,2. the mapping H ( a ) = e · a is a Σ CR homomorphism from R onto the ring e · R ,3. For every x ∈ R : x ∈ e · R iff e · x = x .Proof.
1. Note that e = e · e ∈ e · R . For every element e · a in e · R we have e · ( e · a ) = e · a , by associativity, and because e · e = e . Therefore e is a unit in e · R .2. H is a Σ CR homomorphism since: e · e · e , so that zero is mapped to zero, and the unit is mapped to theunit. e ( a + b ) = e · a + e · b and e · ( − a ) = − e · a , so that + and − are preserved. e ( f · g ) = ( e · e )( f · g ) = ( e · f )( e · g ) so that multiplication is preserved.3. If x ∈ e · R then e · x = x by (1). And if x = e · x then the right side testifies that it isan element of e · R . Let R be a non-trivial meadow, and x ∈ R a non zero element. Note that by Ril , 1 x isan idempotent. Proposition 3.5.
The principal ideal x · R has the following properties:(a) x · R = x · R , and x, x and x − are all in x · R .(b) x · R is a ring with a unit, x is invertible in the ring and H ( y ) = 1 x · y is a Σ CR homomorphism from R onto x · R .Proof. (a) Now 1 x = x − · x hence 1 x ∈ x · R , and x = x · x hence x ∈ x · R . Therefore, x · R = 1 x · R . Consequently, both x and 1 x belong to the ideal that they generate, andsince x − = 1 x · x − , x − is also in 1 x · R .(b) Since 1 x is an idempotent, this is Proposition 3.4. Note that x is invertible since x · x − is the unit in this ring, and x − is also in it. Proposition 3.6.
Let R be a meadow. For every non-zero x ∈ R there is a Σ CR homo-morphism H x : R → F x from R onto a zero totalized field F x with H x ( x ) = 0 .Proof. Let x = 0 be given, and let I be a maximal ideal in the ring 1 x · R . Then R/I is afield, and the mapping H x ( y ) = ( y · x ) /I is a Σ CR homomorphism as it is the compositionof two Σ CR homomorphisms. Now H x ( x ) = x/I and H x ( x ) = 0 because if an invertibleelement of 1 x · R is mapped to 0 by the quotient map, then 1 = 0 in the quotient R/I .11 roposition 3.7. If H : R → F is a Σ CR homomorphism from a meadow R into a zerototalized field F then H preserves inverses and so is a Σ homomorphism.Proof. If H ( x ) = 0 then H (1 x ) = H ( x · x − ) = H ( x ) · H ( x − ) = 0 so that also implies H ( x − ) = H (1 x · x − ) = H (1 x ) · H ( x − ) = 0 = H ( x ) − . The latter holds because F iszero totalized. Secondly, we consider the case that H ( x ) = 0. Then H ( x ) = H (1 x · x ) = H (1 x ) · H ( x ) which proves that H (1 x ) = 1, by cancellation in fields. In other words1 = H ( x · x − ) = H ( x ) · H ( x − ), which proves that H ( x − ) = H ( x ) − using Proposition2.7.The image of H is subfield of F , so it follows that given R and non-zero x ∈ R ameadow homomorphism onto a field F can be found which maps x to a non-zero elementof F . Using these preparations, we can prove the embedding theorem: Theorem 3.8. A Σ structure is a non-trivial meadow if and only if it is a Σ -substructureof a product of zero totalized fields.Proof. By Theorem 3.1 a Σ subalgebra of a product of zero totalized fields is always ameadow.Let R be a meadow. Combining Propositions 3.6 and 3.7, for each nonzero x in R there is a field F x and a Σ homomorphism H x : R → F x , such that H x ( x ) = 0.We define the product of fields: K = Q x ∈ R F x . K is a meadow with the operationsdefined at each coordinate. We define the map H from R to the product as follows:for every z in R , H ( z ) is the vector that has H x ( z ) in the place x . Since H x is a Σ-homomorphism with respect to all meadow operations, following the principles of universalalgebra, the same is true for H as well.If z = 0 then H z ( z ) = 0 and consequently H ( z ) = 0. Therefore H is a Σ-monomorphism,which concludes the proof. Corollary 3.9.
A finite non-trivial meadow R is a Σ -substructure of a finite product offinite fields. The equational theory of zero totalized fields and of meadows are the same. More precisely:
Theorem 3.10.
For every Σ -equation e , Alg (Σ , ZTF ) | = e ⇔ Alg (Σ , Md ) | = e. Proof.
Let e be an equation that holds in every zero totalized field, then it holds also inevery product of fields and in every Σ subalgebra of a product of fields, and therefore,by the embedding theorem, also in every non-trivial meadow. Evidently, every equationholds in the trivial meadow as well.The other way around, that equations true for all meadows hold in all zero totalizedfields, is obvious because zero totalized fields are a subclass of meadows.12 .4 Conditional equational theory of zero totalized fields As an application of Theorem 3.10, we prove a stronger result, namely: the conditionalequational theories of zero totalized fields and of meadows are the same. More precisely:
Theorem 3.11.
For every conditional Σ -equation e , Alg (Σ , ZTF ) | = e ⇔ Alg (Σ , Md ) | = e. Proof.
Let t = t & . . . & t i = t i & . . . & t n = t n → t = t be a conditional equationthat holds in every zero totalized field. Without loss of generality, it may be assumedthat each right-hand side equals 0, using r = s ⇔ r − s = 0. So we assume that t = 0 & . . . & t i = 0 & . . . & t n = 0 → t = 0 holds in all zero totalized fields. If n = 0 thecase reduces to that of equations and the conclusion follows from Theorem 3.10. Let theΣ term C ( − , − ) be given by C ( x, y ) = (1 − xx ) · y. Now, by inspection of zero totalized fields, one has:
Alg (Σ , ZTF ) | = t = 0 → t = 0 ⇔ Alg (Σ , ZTF ) | = C ( t , t ) = 0 . As a consequence,
Alg (Σ , Md ) | = C ( t , t ) = 0. Now, Md ∪ { C ( t , t ) = 0 } ⊢ t = 0 → t = 0and consequently Md ⊢ t = 0 → t = 0 and, of course, Md | = t = 0 → t = 0.In the case of n = 2 we assume that all zero totalized fields satisfy t = 0 & t = 0 → t = 0. We will make use of the following fact which holds in all meadows: x = 0 & y = 0 ⇔ x · yx · y − xx − yy = 0Here “ ⇒ ” is immediate and to see “ ⇐ ” multiply both sides with x thus obtaining: x · x · yx · y − x · xx − x · yy = x · Md , x · yy − x − x · yy = 0which implies x = 0. Similarly, one derives y = 0. We write U ( x, y ) = x · yx · y − xx − yy . Nowusing U ( x, y ) = 0 ⇔ x = 0 & y = 0, we find: Alg (Σ , ZTF ) | = t = 0 & t = 0 → t = 0 ⇔ Alg (Σ , ZTF ) | = C ( U ( t , t ) , t ) = 0 . Using Theorem 3.10, we find that Md | = C ( U ( t , t ) , t ) = 0 and, from this fact usingthe known properties of U ( − ) and C ( − , − ), one easily derives Md | = t = 0 & t = 0 → t = 0. The cases n = 3 , . . . require a repeated nested use of U ( − ). The straightforwarddetails have been omitted and we only illustrate the encoding of conditional equationsinto equations in the case n = 3: Alg (Σ , ZTF ) | = ( i =3 ^ i =1 t i = 0) → t = 0 ⇔ Alg (Σ , ZTF ) | = C ( U ( U ( t , t ) , t ) , t ) = 0 . Finite meadows
As usual, we will define 0 as 0 and k + 1 = k + 1. The characteristic of a meadow is thesmallest natural number k ∈ N such that k > k = 0. The equation k = 0 will bereferred to as Z k . We recall that a natural number k is called squarefree if its prime factordecomposition is the product of distinct primes. Lemma 4.1.
Let M be a meadow of finite characteristic k > . Then k is squarefree.Proof. Let M | = k = 0. Suppose k has two repeated prime factors, k = p · p · q . Then,using Ril we have p · q = ( p · p · p − ) · q = ( p · p · q ) · p − = k · p − = 0 · p − = 0.Thus, k is not the characteristic which is a contradition.Thus, from Lemma 4.1, the possible finite characteristics have the form k = p . . . p n where the p i are all distinct primes. All finite meadows have finite characteristic. Itfollows that if a finite meadow M consists of an initial segment of the numerals 0, . . . ,k-1 (like the prime fields of positive characteristic) its cardinality M ) = k can only bea product of different primes. Definition 4.2.
Let Md k be the initial algebra of Md ∪ { Z k } . What are the initial algebras? Clearly, Md k has finite characteristic ≤ k . Notice thefollowing: Lemma 4.3. If l divides k then the Md + Z l ⊢ Z k . Thus, if l divides k then there is a Σ epimorphism φ : Md k → Md l , i.e., Md l is a homomorphic image of Md k . Thus, we have that for k = p . . . p n where the p i are all distinct primes we have a Σepimorphism φ : Md k → Md p i . Furthermore, it can be seen that for p a prime number, Md p is the zero totalized prime field Z p of characteristic p . To see this notice that foreach x different from 0 there is an y with x · y = 1. It follows that the zero totalizedprime field mod p satisfied Iel (see Section 2.1.2) and for that reason it is a meadow. Asa consequence we have a Σ epimorphism φ : Md k → Z p i . Theorem 4.4. If k is squarefree then Md k has k elements.Proof. If k = p . . . p n is a product of different primes that is no prime factor appearstwice then we first show that Md k has at least k elements. To see this notice that foreach prime factor p of k the prime field Z p of characteristic p is a model of Md k (as theequation Z p implies Z k ). Because that structure is a quotient of the additive group of Md k its number of elements is a divisor of the cardinality Md k ) of Md k . As a consequence Md k ) is a multiple of all factors of k and because k contains all of them only once Md k ) ≥ k .In order to prove that Md k ) = k it suffices to find an inverse (in the sense ofa meadow) for each n for n < k of the form m for m < k . We may assume that k > n (= 1) , n , n .. . Each value in this series is of the form m for m < k because arithmetic14s done modulo k . Therefore there are k and l with k > l +1 > Md k | = n k = n l .Let k − − l = i . Notice that i ≥
0. Working in Md k by SIP2 we have n − k = n − l , andthus n − = n − k · n k − = n − l · n k − = n k − − l = n i . This demonstrates that the inverse is anumeral (modulo k ) as required.It follows from the proof that the interpretation of inverse is unique in a minimal finitemeadow. Recall that an algebra is minimal when it has no subalgebras or, equivalently,is generated by elements named in its signature. By Lemma 4.4, if k is a product ofdifferent primes then Md k is the minimal meadow of characteristic k . It also follows fromthe proof that Md k consists of 0 , . . . k − Example 1.
Concrete examples can be easily given, for instance Md has the followinginverse function: 0 − = 0 , − = 1 , − = 2 , − = 3 , − = 4 , and 5 − = 5. Md is thesmallest non-trivial minimal meadow which is not a field. Example 2. In Md the inverse function is given by: 0 − = 0 , − = 1 , − = 8 , − =7 , − = 4 , − = 5 , − = 6 , − = 3 , − = 2 , and 9 − = 9. Example 3.
Consider Md . This is a non-minimal meadow because its size of four ele-ments exceeds its characteristic. The inverse function is the identity function. Md is thesmallest non-trivial meadow which is not a field. Lemma 4.5.
Let M be a meadow of finite characteristic k > . Then there is a Σ monomorphism ψ : Md k → M .Proof. If M has characteristic k then M | = k = 0. Thus, by initiality, there is a Σ homo-morphism ψ : Md k → M . If this map were not injective then M would have characteristiclower then k . Lemma 4.6.
Let M be a minimal meadow of finite characteristic k > . Then Md k and M are Σ isomorphic.Proof. If M has characteristic k then M | = k = 0. Thus, following the previous lemmathere is a Σ monomorphism ψ : Md k → M . Because M is minimal, ψ is surjective aswell. Lemma 4.7.
Let M be a meadow of prime cardinality p . Then M is the zero totalizedprime field of cardinality p .Proof. If M has characteristic k then k > M which contains 1. Thus k divides p and hence k = p which implies that M is minimal. Following Lemma 4.6 Md k is isomorphic with M . At the same time thezero totalized prime field of cardinality p is a meadow and according to Lemma 4.6 it isalso isomorphic to Md k . Lemma 4.8.
All finite and minimal meadows are of the form Md k for some positivenatural number k . roof. Let M be a finite meadow. Then M has a finite characteristic, say k . ByLemma 4.6, there is an isomorphism ψ : Md k → M. If its non-zero characteristic is not a prime, a finite meadow has proper zero-divisorsand fails to be an integral domain and, of course, it is no field either.
Lemma 4.9. If k = p α . . . p α n n then Md k ∼ = Md p ...p n . Therefore, if k and l have the sameset of prime factors then Md k ∼ = Md l .Proof. Using the same argument as in Lemma 4.1, we can show that for p , . . . , p n anyprimes and k = p α . . . p α n n we have Md k ∼ = Md p ...p n . Suppose that k = p α . . . p α n n and l = p β . . . p β n n . Then by the first part of the lemma, Md k ∼ = Md p ...p n and Md l ∼ = Md p ...p n and hence Md k ∼ = Md l . We notice that a conference version of this paper, though with a quite different emphasisof presentation, has appeared as [2].The theory of meadows depends upon the formal idea of a total inverse operator.We do not claim that division by zero is possible in numerical calculations involving therationals or reals. But we do claim that zero totalized division is logically, algebraically andcomputationally useful: for some applications, allowing zero totalized division in formalcalculations, based on equations and rewriting, is appropriate because it is conceptuallyand technically simpler than the conventional concept of partial division. Furthermore,one can make arrangements to track the use of the inverse operation in formal calculationsand classify them them as safe or unsafe dependent upon 0 − is invoked: see [11]. Weexpect these areas to include elementary school algebra, specifying and understandinggadgets containing calculators, spreadsheets, and declarative programming. Of course,further research is necessary to test these expectations: at present, our theory of meadowsis a theory of zero totalized division, constitutes a generalization of the theory of fields,and is known to be useful in specifying numerical data types using equations.There are many opportunities for the further development of the theory of mead-ows: logically, algebraically, and through applications. Consider some computational andlogical open questions that add to the questions posed in [9]:Is the equational theory of meadows decidable? Is its conditional equational theorydecidable?Does Md , or a useful extension of it, admit Knuth-Bendix completion?Returning to the equational theory of meadows, following [9], let Z ( x ) = 1 − x · x − .For n >
0, let L n be the equation: Z (1 + x + .... + x n ) = 0. Clearly from CR it followsthat L k implies L n when k > n . All L n are valid in the zero totalized field of rationalnumbers. From [9] and Proposition 2.8, it follows that Md + L constitutes an initialalgebra specification of the zero totalized field of rational numbers, which indicates therelevance of L . Now, conversely, the question arises if Md + L n proves L k (again assuming k > n ). 16 related problem is to characterize the initial algebras of Md + L n for n = 1, n = 2,and n = 3. It is easy to see that Md + L is not a specification of the rationals because itis satisfied by the prime field of characteristic three, which is not a homomorphic imageof the initial algebra of Md + L .A restricted version of Theorem 3.10 for equations between closed terms only, wasshown in [9]. That proof is longer and more syntactic in style and uses a normal form resultand straightforward induction, in spite of the fact that the result is weaker. However, itprovides the additional information that the initial algebra of Md is a computable algebra.The proof given here uses the maximal ideal theorem, which is weaker than the axiom ofchoice, but still independent of the axiom system ZF for set theory. The use of maximalideals provides a simple and readable proof. In [4], however, a proof is given in theproof theoretic style. That proof is more general and it provides the information that theequational consequences of Md + L coincide with the equations valid in all zero-totalizedfields that satisfy L , which seems not to follow from a proof using maximal ideals.Finally, let us note that questions may emerge from the perspective of pure algebra,where the properties of invertibility and symmetry are central. The representation resultshere are closely related to early results on subdirect products of rings of McCoy [18] andBirkhoff [12].The results leading up to the representation and completeness theorems may be inves-tigated for non-commutative rings. The theory of von Neumann regular rings is primarilyabout non-commutative rings. As is always the case, the transition from commutative tonon-commuutative rings is a delicate operation, leading to a ramification of properties. In[3] we have isolated a number of concepts and proved generalizations of the main resultshere to skew fields and skew meadows.We define a skew meadow to be an expansion of a non-commutative ring with aninverse operator that satisfies these two equations:( x − ) − = x (16) x · ( x · x − ) = x (17)Thus, the equations for skew meadows result from the equations for meadows, by simplydropping commutativity of multiplication and including a second distributivity law: a meadow is a commutative skew meadow. Actually, the simplicity of this generalisationis a technical achievement for there are several interesting equations that are equivalentin the commutative case but in differ in the non-commutative case; also, these equationsmust be distinguished as rewrite rules. In [3] we consider several related types of non-commutative ring. References [1]
J A Bergstra , Elementary algebraic specifications of the rational function field, In
Logicalapproaches to computational barriers, Proceedings of CIE 2006 , A. Beckman et. al. Eds.Springer Lecture Notes in Computer Science vol. 3988, Springer-Verlag, New York, (2006)40-54. J A Bergstra, Y Hirshfeld and J V Tucker , Fields, meadows and abstract datatypes,
Arnon Avron, Nachum Dershowitz and Alexander Rabinowitz (eds.), Pillars of Com-puter Science, (Essays dedicated to Boris Thaktenbroth on the occasion of his 85’th birth-day)
Springer Lecture Notes in Computer Science vol. 4800, Springer-Verlag, New York,pp. 166-178 (2008).[3]
J A Bergstra, Y Hirshfeld and J V Tucker
J A Bergstra and A Ponse
J A Bergstra and J V Tucker , The completeness of the algebraic specification methodsfor data types,
Information and Control , 54 (1982) 186-200.[6]
J A Bergstra and J V Tucker , Initial and final algebra semantics for data typespecifications: two characterisation theorems,
SIAM Journal on Computing , 12 (1983)366-387.[7]
J A Bergstra and J V Tucker , Algebraic specifications of computable and semicom-putable data types,
Theoretical Computer Science , 50 (1987) 137-181.[8]
J A Bergstra and J V Tucker , Equational specifications, complete term rewritingsystems, and computable and semicomputable algebras,
J. ACM , 42 (1995) 1194-1230.[9]
J A Bergstra and J V Tucker , The rational numbers as an abstract data type,
J.ACM , 54, 2, Article 7 (April 2007) 25 pages.[10]
J A Bergstra and J V Tucker , Elementary algebraic specifications of the rationalcomplex numbers, In
Algebra, meaning and computation. Goguen Festschrift , K Futatsugiet. al. Eds. Lecture Notes in Computer Science, vol. 4060, Springer-Verlag, New York (2006)459-475.[11]
J A Bergstra and J V Tucker , Division safe calculation in totalised fields,
Theory ofComputing Systems , in press.[12]
G D Birkhoff , Subdirect unions in universal algebra,
Bulletin American MathematicalSociety , 50 (1944) 764-768.[13]
K R Goodearl , Von Neumann regular rings , Pitman, London, 1979.[14]
L Moss , Simple equational specifications of rational arithmetic,
Discrete Mathematics andTheoretical Computer Science , 4 (2001) 291-300.[15]
J Harrison , Theorem Proving with the Real Numbers , Springer-Verlag New York, 1998.[16]
W Hodges , Model Theory , Cambridge University Press, Cambridge, 1993.[17]
K Meinke and J V Tucker , Universal algebra, in S. Abramsky, D. Gabbay and TMaibaum (eds.)
Handbook of Logic in Computer Science. Volume I: Mathematical Struc-tures , Oxford University Press, 1992, pp.189-411. N H McCoy , Subrings of infinite direct sums,
Duke Mathematics Journal , 3 (1938) 486-494.[19]
N H McCoy , The Theory of Rings , Macmillan, London, 1964.[20]
L Moss , Simple equational specifications of rational arithmetic,
Discrete Mathematics andTheoretical Computer Science , 4 (2001) 291-300.[21]
V Stoltenberg-Hansen and J V Tucker , Computable rings and fields, in E Griffor(ed.),
Handbook of Computability Theory , Elsevier, 1999, pp.363-447.[22]
Terese , Term Rewriting Systems , Cambridge Tracts in Theoretical Computer Science 55,Cambridge University Press, Cambridge, 2003.[23]
W Wechler , Universal Algebra for Computer Scientists , EATCS Monographs in Com-puter Science, Springer, 1992.[24]
M Wirsing , Algebraic specifications, in J van Leeuwen (ed.),
Handbook of TheoreticalComputer Science. Volume B: Formal models and semantics , North-Holland, 1990, pp.675-788., North-Holland, 1990, pp.675-788.