01ints

download 01ints

of 12

Transcript of 01ints

  • 7/31/2019 01ints

    1/12

    THE INTEGERS

    1. Divisibility and Factorization

    Without discussing foundational issues or even giving a precise definition, wetake basic operational experience with the integers for granted. Specifically the setof integers is notated

    Z = {0,1,2, },

    with no concernat least for nowabout the meaning of the ellipsis . How-ever, the point to be emphasized is that we view the integers not only as a setbut as a set equipped with two operations, addition and multiplication. That is,

    the integers are an algebraic structure. Really the structure is (Z, +, ) rather thanmerely Z, but once we are aware that the currency of algebra is structures ratherthan sets, such notation is pointlessly cumbersome.

    The product of any two nonzero integers is again nonzero. Consequently if theproduct of a nonzero integer with a second integer is zero then the second integeris itself zero. This observation leads to the cancellation law:

    For all a,b,c Z, if ab = ac and a = 0 then b = c.

    Indeed, the given equality says that a(b c) = 0, and a = 0, so b c = 0.

    The first substantive result about the integers is the division algorithm, goingback to Euclid.

    Theorem 1.1. Let a and b be integers with b = 0. There exist unique integers qand r such that

    a = qb + r, 0 r < |b|.

    Proof. A fundamental property of the integers is that any nonempty set of nonneg-ative integers contains a least element. The set

    {a qb : q Z}

    is readily seen to contain nonnegative elements (e.g., ifb > 0 then a qb 0 for allintegers q a/b), so it contains a least nonnegative element r = aqb, r 0. Thusr |b| < 0. The displayed conditions in the theorem follow. As for uniqueness,suppose that

    qb + r = qb + r, r, r {0, , |b| 1}.

    Then r r = (q q)b, r r {|b|+ 1, , |b| 1}.

    The only multiple of b in {|b| + 1, , |b| 1} is 0. Thus r = r and then q = q

    by the cancellation law.

    Let a and b be integers. If a = qb for some integer q then b divides a and a isdivisible by b. This condition is notated

    b | a.1

  • 7/31/2019 01ints

    2/12

    2 THE INTEGERS

    (For example, the only integer divisible by 0 is 0. However, since 0 = q0 for everyinteger q, no meaningful rational value can be assigned to the quotient 0/0.)

    Proposition 1.2. Let a and b be integers, not both zero. Consider the set ofZ-linear combinations of a and b,

    I(a, b) = {ka + b : k, Z}.

    Let

    g = the least positive element of I(a, b).

    Then g is the greatest common divisor of a and b, meaning that

    g | a, g | b, (d | a and d | b) = d | g.

    The notation is

    g = gcd(a, b).

    Proof. Easy calculations show that I(a, b) is closed under Z-linear combination,(ka + b) + (ka + b) = (k + k)a + ( + )b

    m(ka + b) = (mk)a + (m)b

    for all k, k, , , m Z.

    (Here the slogan is Linear combinations of linear combinations are linear combi-nations.) Write a = qg + r where 0 r < g. Since r = a qg lies in I(a, b)and 0 r < g, the definition of g as the least positive element of I(a, b) showsthat r = 0. Thus g | a, and similarly g | b.

    For any integer d, even-easier calculations show that the set I(d) = dZ ofZ-linearcombinations of d is closed under Z-linear combination,

    kd + kd = (k + k)d

    m(kd) = (mk)d for all k, k, m Z.

    But I(d) is the set of integers that d divides. So if d | a and d | b then d | g since gis a Z-linear combination of a and b.

    The letter I in the notations I(a, b) and I(d) stands for the mathematical termideal. Strangely enough, in mathematical parlance ideal is a noun. Later in thecourse we will learn explicitly about ideals, but already here it is worth noting thatthe ideals I(a, b) and I(d) are algebraic structures having the property of closureunder linear combinations whereas the sets {a, b} and {d} have no such property.The closure property of the algebraic structures I(a, b) and I(d) is what makes theflow of ideas in the proof so smooth.

    As an example of finding a greatest common divisor, abbreviate the notations

    I(a, b) and I(d) to (a, b) and (d), and compute

    (826, 1890) = (826, 1890 2 826)

    = (238, 826) = (238, 826 3 238)

    = (112, 238) = (112, 238 2 112)

    = (14, 112) = (14, 112 8 14)

    = (0, 14) = (14).

  • 7/31/2019 01ints

    3/12

    THE INTEGERS 3

    Thus gcd(826, 1890) = 14. The process just demonstrated is the Euclidean algo-rithm. And furthermore, we can backtrack to express the gcd as a linear combina-tion of the two given numbers,

    14 = 238 2 112

    = 238 2 (826 3 238)

    = 7 238 2 826

    = 7 (1890 2 826) 2 826

    = 16 826 + 7 1890.

    This process shows that we know how to solve any equation of the form

    ax + by = c,

    where a,b,c Z are the given coefficients and we seek integer solutions (x, y).Solutions exist if and only if gcd(a, b) | c, in which case we can find one particularsolution via the Euclidean algorithm, as above. All other solutions differ from theparticular solution by solutions to the homogenized equation ax + by = 0, whichis easy to solve: after dividing a and b by their gcd we get ax + by = 0 wheregcd(a, b) = 1, and so the solutions are (x, y) = n(b,a) for all n Z.

    Definition 1.3. Let p be a positive integer greater than 1. Then

    p is irreducible if

    the only positive divisors of p are 1 and p.

    p is prime if

    for all a, b Z, p | ab = p | a or p | b.

    Note that irreducible means to us what prime means to most people, while primemeans to us something else, perhaps unfamiliar. However, we next show that in

    the context of the integers, the two words mean the same thing after all.

    Proposition 1.4. Let p be a positive integer greater than 1. Then p is irreducibleif and only if p is prime.

    Proof. Let p be irreducible, and suppose that a and b are integers such that p | ab.If p | a then we are done. If p a then p and a share no positive divisor except 1,and their greatest common divisor 1 is a linear combination of them,

    1 = kp + a for some k, Z.

    Consequently

    b = kpb + ab for some k, Z.

    Because p | ab by hypothesis, the right side is divisible by p, and hence so is the

    left side. That is, if p | ab and p a then p | b as desired.Let p be prime and suppose that d is a positive divisor of p. Thus kd = p forsome positive integer k, and so p | k or p | d.

    Ifk = ep then the equality kd = p becomes edp = p, so that ed = 1, forcingd = 1.

    Ifd = ep then the equality kd = p becomes kep = p, so that ke = 1, forcingk = 1 and thus d = p.

  • 7/31/2019 01ints

    4/12

    4 THE INTEGERS

    The proof that irreducible implies prime requires the division algorithm, but theproof that prime implies irreducible does not. Later in the course we will revisitthese issues in more generality. In many environments that are otherwise similarto the integers, irreducible does not imply prime.

    The equivalence of irreducibility and primality in Z is necessary to prove thatevery nonzero integer factors uniquely as a sign-term times a product of irreducibles.

    Theorem 1.5 (Unique Factorization of Integers). Every nonzero integer has aunique factorization

    n = pe11 pegg , g 0, p1 < < pg,

    where the pi are irreducible.

    Proof. We may assume that n is positive.(Existence.) The integer n = 1 takes the desired form. For n > 1, if n is

    irreducible then it takes the desired form. Otherwise n factors as n = n1n2 where

    the positive integers n1 and n2 are smaller than n, so each of them is a productof finitely many irreducibles by induction, and hence so is n. If n < 0 then eithern = 1 or n is a product of finitely many irreducibles.

    (Uniqueness.) It suffices to consider positive integers. The only case to worryabout is two nontrivial factorizations,

    n =

    gi=1

    peii =h

    j=1

    qfjj , g, h 1.

    Since p1 divides the first product it divides the second one, and hence (p1 beingprime) it divides one of the qj , and hence (qj being irreducible) it equals qj . Andqj must be the smallest prime on the right side, for otherwise q1, which by theargument just given must equal some pi, can not do so, being smaller than qj = p1.

    Thus p1 = q1. To see that e1 = f1, divide the equality through by min{e1, f1} toget an equality in which p1 doesnt divide one side, hence doesnt divide the otherside either, giving the result. Now we have an equality

    n/pe11 =

    gi=2

    peii =

    hj=2

    qfjj ,

    and we are done by induction on n.

    Some of the issues here may seem needlessly complicated, but they are forcedon us by familiar elementary contexts. For example:

    Math 112 exercises have to dance around the questionFor what positive integers n is Z/nZ a field?

    Everybody knows morally that the answer is, For prime n. However, the

    problem is that for any n Z+, short, natural arguments show that

    n is prime = Z/nZ is a field = n is irreducible.

    But to show that Z/nZ is a field only if n is prime requires the fact thatirreducibles are prime in Z, which in turn relies on the division algorithmand the expression of the gcd as a linear combination.

    Similarly, any argument that there is no square root of 2 in Q tacitly makesuse of unique factorization. Ultimately the argument boils down to

  • 7/31/2019 01ints

    5/12

    THE INTEGERS 5

    Let r Q satisfy r2 = 2. Then r = 2er where e Z andr Q has no 2s in its numerator or its denominator. Thus2 = r2 = 22e(r)2. But this is impossible because there are no 2sin (r)2 and so the left side has one power of 2 while the right sidehas an even number of 2s.

    The problem with the argument is that without unique factorization, anumber with one power of 2 conceivably could equal a number with an evennumber of 2s. Any side-argument that no integer can be simultaneouslyodd and even must essentially give the argument that the division algorithmexists, specialized to b = 2.

    2. The Integers modulo n

    Let n be a positive integer. We want to define clock algebra modulo n, meaningaddition and multiplication that wrap around at n, returning to 0. Thus it isinitially tempting to work with the set of nonnegative remainders modulo n,

    {0, 1, , n 1},

    and to define a new addition on this set by the rule

    a b = r where a + b = qn + r and 0 r < n,

    and similarly for multiplication. Although this idea can be made to work, it is thewrong idea. For one thing, carrying out the division algorithm for each addition ormultiplication is constrainingwe might prefer to throw away all multiples of n atthe end of a long calculation instead. For another thing, if n is odd then it mightbe more natural to work symmetrically about 0 by using the set

    {(n 1)/2, ,1, 0, 1, , (n 1)/2}.

    Now the wraparound occurs at (n + 1)/2, returning to (n 1)/2, but clearly the

    situation is essentially the same as wrapping around from n to 0.The right idea is to view any two integers that differ by a multiple of n as

    equivalent, since the algebra of the integers gives rise to sensible algebra at thelevel of equivalence. The idea presents two psychological obstacles:

    The basic elements to be worked with are now equivalence classes such as

    {0,n,2n, } = nZ,

    {1, 1 n, 1 2n, } = 1 + nZ,

    {2, 2 n, 2 2n, } = 2 + nZ.

    That is, each set in the display is to be treated as one unit, not as aninfinitude.

    The question is not howto work with the equivalence classes, since of course

    the only feasible definitions are(a + nZ) (b + nZ) = a + b + nZ,

    (a + nZ) (b + nZ) = ab + nZ.

    The question, which can take some thought to wrap ones mind around,is whether the definitions are meaningful. The problem is that while aninteger a determines an equivalence class a + nZ, an equivalence class arisesfrom infinitely many choices ofa; but the right sides in the previous display

  • 7/31/2019 01ints

    6/12

    6 THE INTEGERS

    made specific choices of elements a and b in the two equivalence classes inorder to define their sum and product.

    (As an example of how a processs dependence on choices can render it ill-defined,suppose that we have a function

    f : {Math 332 students} {Math 332 students} {Math 332 students},

    i.e., given an ordered pair of students, the mechanism specifies a student. Groupstudents into equivalence classes by hair-color, and try to define a correspondingfunction

    F : {Math 332 hair-colors} {Math 332 hair-colors} {Math 332 hair-colors}

    as follows:

    Given colors (c1, c2), pick equivalence class elements, a student s1 havinghair-color c1 and a student s2 having hair-color c2.

    Let s3 = f(s1, s2), a student. Let F(c1, c2) be the equivalence class (hair-color) of s3.

    Obviously F(c1, c2) depends not only on c1 and c2 but also on the choices of s1and s2. It is not a well-defined function of its two inputs.)

    To show that the definitions do make sense, consider two different descriptionsof each of two equivalence classes,

    a + nZ = a + nZ,

    b + nZ = b + nZ.

    This means that

    n | a a,

    n | b b,

    so that (using linear combinations again)

    n | (a a) + (b b) = (a + b) (a + b),

    n | (a a)b + (b b)a = ab ab,

    and thus

    a + b + nZ = a + b + nZ,

    ab + nZ = ab + nZ.

    In other words, the sum and the product of the two equivalence classes is indepen-dent of the classess descriptions,

    a + nZ = a + nZ

    b + nZ = b + nZ

    =

    (a + nZ) (b + nZ) = (a + nZ) (b + nZ)

    (a + nZ) (b + nZ) = (a + nZ) (b + nZ)

    .

  • 7/31/2019 01ints

    7/12

    THE INTEGERS 7

    Although verifying that the definitions are sensible is tedious, the payoff is thattheir naturality guarantees that their algebra behaves well. For instance, the addi-tion of equivalence classes inherits associativity from the addition of integers,

    ((a + nZ) (b + nZ)) (c + nZ)

    = (a + b + nZ) (c + nZ)

    = (a + b) + c + nZ

    = a + (b + c) + nZ

    = (a + nZ) (b + c + nZ)

    = (a + nZ) ((b + nZ) (c + nZ)).

    And similarly for the distributive law,

    (a + nZ) ((b + nZ) (c + nZ))

    = (a + nZ) (b + c + nZ)

    = a(b + c) + nZ

    = ab + ac + nZ

    = (ab + nZ) (cc + nZ)

    = ((a + nZ) (b + nZ)) ((a + nZ) (c + nZ)).

    Next we lighten the notation to hide the process of dragging around copies of nZthat are ultimately immaterial:

    Let the symbol-string a = b mod n mean that n | b a.

    It is straightforward to verify that equality modulo n is an equivalence relation,

    (1) For all a Z, a = a mod n.(2) For all a, b Z, if a = b mod n then b = a mod n.

    (3) For all a,b,c Z, if a = b mod n and b = c mod n then a = c mod n,and that the equivalence classes are exactly the sets that we have been manipulatingtortuously. In the new notation, our verification that the operations modulo n aresensible showed that that for all integers a, a, b , b,

    a = a mod n

    b = b mod n

    =

    a + b = a + b mod n

    ab = ab mod n

    .

    That is, we may freely add and multiply modulo n with no regard to whether theinputs or the outputs are reduced back into {0, , n 1} along the way. Theresults will always be equivalent, and we may reduce the answer at the end if weso choose.

    Definition 2.1. Let n be a positive integer. The set of equivalence classes ofintegers modulo n, along with the algebra (addition and multiplication, associativityand commutativity of both operations, additive and multiplicative identities, and

    additive inverse) that they inherit from the integers is called the ring of integersmodulo n and denoted Z/nZ.

    (Again, Z/nZ tacitly denotes (Z/nZ, +, ) or even (Z/nZ,,).)Thus nowwe may freely think of the elements of Z/nZ as {0, 1, , n 1} or as

    {(n1)/2, , (n1)/2}, or as any other set of equivalence class representatives.

  • 7/31/2019 01ints

    8/12

    8 THE INTEGERS

    For example, a famous and difficult argument by Gauss involving an odd prime puses nonzero representatives modulo p spaced four apart and straddling 0,

    {2,6,10, ,(2p 4)}.And if during the course of doing algebra we move outside our chosen set of repre-sentatives, we can safely continue to calculate and translate back into the set onlywhen the calculation is complete.

    Proposition 2.2. Let n be a positive integer. An integer a is multiplicativelyinvertible modulo n if and only if gcd(a, n) = 1.

    Proof. To say that a is multiplicatively invertible modulo n is to say that

    ab = 1 mod n for some integer b,

    which is to say thatn | ab 1 for some integer b,

    which is to say that

    ab 1 = kn for some integers b,k,

    which is to say that

    ab + kn = 1 for some integers b,k.

    The last condition is gcd(a, n) = 1.

    A bit strangely, 0 is multiplicatively invertible modulo 1. The tiny point here isthat in the modulo 1 world all integers are equal, making 0 = 1.

    3. Fermats Little Theorem and Eulers Generalization

    Definition 3.1. Eulers totient function,

    : Z>0 Z>0,

    is

    (n) = the number of multiplicatively invertible elements in Z/nZ.

    Thus (1) = 1 (as explained a moment ago at the end of the previous section)and (p) = p 1 ifp is prime. Also, it is not hard to count Eulers totient functionof a prime power by eliminating all multiples of the prime,

    (pe) = pe pe1 = pe(1 1/p), p prime, e Z>0.

    Soon we will show that also

    (mn) = (m)(n) if gcd(m, n) = 1,

    giving a complete formula for ,

    (n) = np|n

    (1 1/p).

    Let n be a positive integer. Consider some fixed invertible element a in Z/nZ.Let

    {x1, x2, , x(n)}

    be the invertible elements of Z/nZ. Then also

    {ax1, ax2, , ax(n)}

  • 7/31/2019 01ints

    9/12

    THE INTEGERS 9

    is the same set. Indeed, each axi is invertible modulo n, the inverse of the productbeing the product of the inverses, and if axi = axj mod n then multiplying throughby the inverse of a modulo n gives x

    i= x

    jmod n. Thus multiplying the elements

    of the second set together produces the same result as multiplying the elements ofthe first set together,

    a(n)x = x mod n, where x = x1x2 x(n).

    The element x is invertible modulo n, and so multiplying the equality through byits inverse gives

    a(n) = 1 mod n if gcd(a, n) = 1.

    In particular,

    ap1 = 1 modp if p a.

    The last equality is Fermats Little Theorem, and the equality before it is EulersGeneralization.

    Note that already in this first unit of the course, we are thinking in sufficientlystructural terms that the generalization is more natural to prove than the originalresult. Fermats Little Theorem can also be proved by induction: Certainly 1p1 =1modp, and if ap1 = 1 modp then ap = a modp and so

    (a + 1)p = ap +

    p

    1

    ap1 + +

    p

    p 1

    a + 1

    = ap + 1modp since the binomial coefficients are 0 modp

    = a + 1modp since ap = a modp.

    Thus, so long as a+1 hasnt reached 0 modp, cancellation gives (a+1)p1 = 1 modpand the induction is complete. This argument feels more cluttered by auxiliarydetails than the previous one, but it points to a far-reaching ideas in its own right:

    if p = 0 then not only is the pth power of a product inevitably the product of thepth powers, (ab)p = apbp, but also the pth power of a sum is the sum of the pthpowers, (a + b)p = ap + bp. The fact that raising to the pth power preserves bothalgebra operations in any environment where p = 0 (not only in Z/pZ) leads to agreat deal of rich mathematics.

    Fermats Little Theorem and Eulers Generalization would be facilitated by afast raise-to-power method modulo n, i.e., a fast modular exponentiationalgorithm.Such an algorithm is as follows. Let positive integers a, e, and n be given. The taskis to compute the reduced power ae % n quickly. (Here x % n denotes the elementof {0, , n 1} that equals x modulo n. Thus x % n is not an element of Z/nZsince such elements are equivalence classes rather than class representatives.) Weemphatically do not want to carry out e 1 multiplications.

    (Initialize) Set (x, y, f) = (1, a , e). (Loop) While f > 0, do as follows: If f%2 = 0 then replace (x, y, f) by (x, y2 % n, f/2), otherwise replace (x, y, f) by (xy % n, y, f 1).

    (Terminate) Return x.

    To see that the algorithm works by seeing how it works, represent the exponent ein binary, say

    e = 2g + 2h + 2k, 0 g < h < k.

  • 7/31/2019 01ints

    10/12

    10 THE INTEGERS

    The algorithm successively computes

    (1, a, 2g + 2h + 2k)

    (1, a2g , 1 + 2hg + 2kg)

    (a2g

    , a2g

    , 2hg + 2kg)

    (a2g

    , a2h

    , 1 + 2kh)

    (a2g+2h , a2

    h

    , 2kh)

    (a2g+2h , a2

    k

    , 1)

    (a2g+2h+2k , a2

    k

    , 0),

    and then it returns the first entry, which is indeed ae. The algorithm is strikinglyefficient both in speed and in space. Especially, the operations on f (halving itwhen it is even, decrementing it when it is odd) are very simple in binary.

    Fast modular exponentiation is not only for computers. For example, to compute237 % 149, proceed as follows,

    (1, 2; 37) (2, 2;36) (2, 4; 18) (2, 16; 9) (32, 16; 8)

    (32,42;4) (32,24; 2) (32,20; 1) (105,20; 0).

    And so the answer is 105.

    As an example of using Fermats Little Theorem and fast modular exponentia-tion, suppose that p is prime and p = 3 mod 4. Suppose that a = 0 modp is a squaremodulo p, that is, a = b2 modp for some b, but we dont know what b is. Note that

    p + 1 is divisible by 4, and compute, working modulo p and using Fermats LittleTheorem for the second-to-last equality, that

    a(p+1)/42 = b(p+1)/22 = bp+1 = bp1b2 = b2 = a.Thus a(p+1)/4, which we can find quickly by fast modular exponentiation, is a squareroot of a modulo p. There is still the question of whether a given a has a squareroot modulo p at all. Answering that question quickly is a matter of the famousQuadratic Reciprocity theorem.

    4. The Sun-Ze Theorem

    Let m and n be positive integers whose greatest common divisor is 1. (Such apair of integers is called relatively prime or coprime.) Associate to m and n the twoalgebraic structures

    Z/mZ Z/nZ and Z/mnZ.

    For the first structure, the algebraic operations are naturally defined componentwise

    (now writing (m) rather than mod m and likewise for n),

    (a (m), b (n)) + (a (m), b (n)) = (a + a (m), b + b (n)),

    (a (m), b (n))(a (m), b (n)) = (aa (m), bb (n)).

    Theorem 4.1 (Sun-Ze). Let m and n be coprime positive integers. Thus thereexist integers k and such that

    km + n = 1.

  • 7/31/2019 01ints

    11/12

    THE INTEGERS 11

    The maps

    f : Z/mnZ Z/mZ Z/nZ, a (mn) (a (m), a (n))

    and

    g : Z/mZ Z/n Z/mnZ (a (m), b (n)) na + kmb (mn),

    are mutually inverse algebraic isomorphisms. That is, they are mutually inverse

    set-bijections, and they preserve the algebraic operations of the sets. (The precisemeaning of preserve the operations will be explained as part of the proof.)

    The Sun-Ze Theorem is often called the Chinese Remainder Theorem. A briefnotation for its contents is

    Z/mnZ Z/mZ Z/nZ.

    Since the multiplicatively invertible elements of Z/mZZ/nZ are the pairs whereeach element is multiplicatively invertible, the Sun-Ze Theorem has in consequencea formula that was asserted earlier,

    (mn) = (m)(n) if gcd(m, n) = 1,

    Proof. The map

    f : Z/mnZ Z/mZ Z/nZ, a (mn) (a (m), a (n))

    is meaningful: although we may translate a by any multiple ofmn without affectinga (mn), doing so has no affect on a (m) or a (n) either. To see that f of a sumof values in Z/mnZ is the sum of the corresponding f-values in Z/mZ Z/nZ,compute

    f(a (mn) + b (mn)) = f(a + b (mn))

    = (a + b (m), a + b (n))

    = (a (m), a (n)) + (b (m), b (n))

    = f(a (mn)) + f(b (mn)).

    And similarly for the product, i.e., f(a (mn)b (mn)) = f(a (mn))f(b (mn)), wherethe first product is set in Z/mnZ and the second in Z/mZ Z/nZ.

    Recall the integers k, such that km + n = 1. The map

    g : Z/mZ Z/n Z/mnZ (a (m), b (n)) na + kmb (mn),

    is also meaningful: translating a by any multiple of m translates na + kmb by amultiple of mn, and similarly for translating b by any multiple of n. To see thatg preserves algebra just as f does, note first that because km + n = 1, it followsthat

    k2m2 = km(1 n) = km mod mn,

    and similarly 2n2 = n mod mn. Now compute,

    g((a (m), b (n))(a (m), b (n))) = g(aa (m), bb (n))

    = naa + kmbb (mn)

    = 2n2aa + k2m2bb (mn)

    =

    na + kmb (mn)

    na + kmb (mn)

    = g(a (m), b (n)) g(a (m), b (n)).

    And similarly for the sum.

  • 7/31/2019 01ints

    12/12

    12 THE INTEGERS

    One composition of f and g is the identity on Z/mnZ,

    g(f(a (mn))) = g(a (m), a (n))) = (n + km) a (mn) = a (mn).

    And since km = 1mod n and n = 1mod m, the other composition is the identityon Z/mZ Z/nZ,

    f(g(a (m), b (n))) = f(na + kmb (mn))

    = (na + kmb (m),na + kmb (n))

    = (a (m), b (n)).

    In sum, f and g preserve algebra and they are mutual inverses. Thus Z/mnZ andZ/mZ Z/nZ biject to one another as algebraic structures.