You try to answer that for m = 2, 3, 4, 6 and 7. I\'ll do it for 5 and 8: For 5:
ID: 2986373 • Letter: Y
Question
You try to answer that for m = 2, 3, 4, 6 and 7. I'll do it for 5 and 8:
For 5: [1[[1] = [1], [2][3] = [1], [4][4] = [1]. So every non-zero element of Z/5Z has an inverse. So Z/5Z is a field.
For 8:
[1][1] = [1], so [1] has an inverse.
[3][3] = [9] = [1], so [3] has an inverse (in Z/8Z)
[5][5] = [25] = [1], so [5] has an inverse.
[7] = [-1], so has an inverse.
On the other hand, the multiples of [2] in Z/8Z are:
[2][1] = [2], [2[[2] = [4], [2][3] = [6], [2][4] = [8] = [0], [2][5] = [10] = [2], [2][6] = [12] = [4], [2][7] = [14] = [6], and [2][0] = [0].
Thus [2] has no inverse in Z/8Z. A similar computation shows that [4], [6] and, of course, [0], have no inverse in Z/8Z.
Also include a guess: for which m is Z/mZ a field?
Explanation / Answer
At any stage during a session, Magma will have at most one copy of Z/mZ present, for any m>1. In other words, different names for the same residue class ring will in fact be different references to the same structure. This saves memory and avoids confusion about different but isomorphic structures. If m is a prime number, the ring Z/mZ forms a field; however, Magma has special functions for dealing with finite fields. The operations described here should not be used forfinite field calculations: the implementation of finite field arithmetic in Magma takes full advantage of the special structure of finite fields and leads to superior performance. Coercion introAutomatic coercion takes place between Z/mZ and Z so that a binary operation like + applied to an element of Z/mZ and an integer will result in a residue class from Z/mZ. Using !, elements from a prime field GF(p) can be coerced into Z/pZ, and elements from Z/pZ can be coerced into GF(p^r). Also, transitions between Z/mZ and Z/nZ can be made using ! provided that m divides n or n divides m. In cases where there is a choice -- such as when an element r from Z/mZ is coerced into Z/nZ with m dividing n -- the result will be the residue class containing the representative for r. Example RngInt_Coercion (H39E6) > r := ResidueClassRing(3) ! 5; > r; 2 > ResidueClassRing(6) ! r; 2 So the representative 2 of 5 mod 3 is mapped to the residue class 2 mod 6, and not to 5 mod 6. Homomorphisms Ring homomorphisms with domain Z/mZ are completely determined by the image of 1. As usual, we require our homomorphisms to map 1 to 1. Therefore, the general homomorphism constructor with domain Z/mZ needs no arguments. hom S | > : RngIntRes, Rng -> Map Given a residue class ring R, and a ring S, create a homomorphism from R to S, determined by f(1_R) = 1_S. Note that it is the responsibility of the user that the map defines a homomorphism! Creation Functions One(R) : RngIntRes -> RngIntResElt Identity(R) : RngIntRes -> RngIntResElt Zero(R) : RngIntRes -> RngIntResElt Representative(R) : RngIntRes -> RngIntResElt These generic functions create 1, 1, 0, and 0 respectively, in any Z/mZ. ResidueClassRing(m) : RngIntElt -> RngIntRes IntegerRing(m) : RngIntElt -> RngIntRes Integers(m) : RngIntElt -> RngIntRes RingOfIntegers(m) : RngIntElt -> RngIntRes Create the residue class ring Z/mZ. ResidueClassRing(Q) : RngIntEltFact -> RngIntRes IntegerRing(Q) : RngIntEltFact -> RngIntRes Integers(Q) : RngIntEltFact -> RngIntRes Create the residue class ring Z/mZ, where m is the integer corresponding to the factorization sequence Q. This is more efficient than creating the ring by m alone, since the factorization Q will be stored so it can be reused later. quo : RngInt, RngInt -> RngIntRes Given the ring of integers Z, and an ideal I, create the residue class ring modulo the ideal. quo : RngInt, RngIntElt -> RngIntRes Given the ring of integers Z, and an integer m>1, create the residue class ring Z/mZ. elt : RngIntRes, RngIntElt -> RngIntResElt Create the residue class containing the integer k in residue class ring R. R ! k : RngIntRes, RngIntElt -> RngIntResElt Create the residue class containing k in the residue class ring R. Here k is allowed to be either an integer, or an element of the finite field F_p in the case R = Z/pZ, or an element of S = Z/nZ for a multiple or divisor n of m (with R = Z/mZ). Random(R) : RngIntRes -> RngIntResElt Create a `random' residue class in R. Structure Operations Category(R) : RngIntRes -> Cat Parent(R) : RngIntRes -> PowerStructure PrimeRing(R) : RngIntRes -> RngIntRes Center(R) : RngIntRes -> RngIntRes AdditiveGroup(R) : RngIntRes -> GrpAb, Map Given R=Z/mZ, create the abelian group of integers modulo m under addition. This returns the finite additive abelian group A (of order m) together with a map from A to the ring Z/mZ, sending A.1 to 1. MultiplicativeGroup(R) : RngIntRes -> GrpAb, Map UnitGroup(R) : RngIntRes -> GrpAb, Map Given R=Z/mZ, create the multiplicative group of R as an abelian group. This returns an (additive) abelian group A of order phi(m), together with a map from A to R. sub : RngIntRes, RngIntResElt -> RngIntRes Given R, the ring of integers modulo m or an ideal of it, and an element n of R, create the ideal aZintersect Z of the ring of integers. Note that this creates an ideal, not just a subring. Set(R) : RngIntRes -> SetEnum Create the enumerated set consisting of the elements of the residue class ring R. Numerical Invariants Characteristic(R) : RngIntRes -> RngIntResElt # R : RngIntRes -> RngIntResElt Modulus(R) : RngIntRes -> RngInt Given a residue class ring R=Z/mZ, this function returns the common modulus m for the elements of R. FactoredModulus(R) : RngIntRes -> RngIntEltFact Given a residue class ring R=Z/mZ, this function returns the factorization of the common modulus m for the elements of R. Ring Predicates and Booleans IsCommutative(R) : RngIntRes -> BoolElt IsUnitary(R) : RngIntRes -> BoolElt IsFinite(R) : RngIntRes -> BoolElt IsOrdered(R) : RngIntRes -> BoolElt IsField(R) : RngIntRes -> BoolElt IsEuclideanDomain(R) : RngIntRes -> BoolElt IsPID(R) : RngIntRes -> BoolElt IsUFD(R) : RngIntRes -> BoolElt IsDivisionRing(R) : RngIntRes -> BoolElt IsEuclideanRing(R) : RngIntRes -> BoolElt IsPrincipalIdealRing(R) : RngIntRes -> BoolElt IsDomain(R) : RngIntRes -> BoolElt R eq R : RngIntRes, Rng -> BoolElt R ne R : RngIntRes, Rng -> BoolElt Arithmetic Operators + n : RngIntResElt -> RngIntResElt - n : RngIntResElt -> RngIntResElt m + n : RngIntResElt, RngIntResElt -> RngIntResElt m - n : RngIntResElt, RngIntResElt -> RngIntResElt m * n : RngIntResElt, RngIntResElt -> RngIntResElt n ^ k : RngIntResElt, RngIntResElt -> RngIntResElt m / n : RngIntResElt, RngIntResElt -> RngIntResElt m +:= n : RngIntResElt, RngIntResElt -> RngIntResElt m -:= n : RngIntResElt, RngIntResElt -> RngIntResElt m *:= n : RngIntResElt, RngIntResElt -> RngIntResElt m /:= n : RngIntResElt, RngIntResElt -> RngIntResElt m ^:= k : RngIntResElt, RngIntResElt -> RngIntResElt Equality and Membership m eq n : RngIntResElt, RngIntResElt -> BoolElt m ne n : RngIntResElt, RngIntResElt -> BoolElt n in R : RngIntResElt, Rng -> BoolElt n notin R : RngIntResElt, Rng -> BoolElt Parent and Category Parent(n) : RngIntResElt -> RngIntRes Category(n) : RngIntResElt -> Cat Predicates on Ring Elements IsZero(n) : RngIntResElt -> BoolElt IsOne(n) : RngIntResElt -> BoolElt IsMinusOne(n) : RngIntResElt -> BoolElt IsNilpotent(n) : RngIntResElt -> BoolElt IsIdempotent(n) : RngIntResElt -> BoolElt IsUnit(n) : RngIntResElt -> BoolElt IsZeroDivisor(n) : RngIntResElt -> BoolElt IsRegular(n) : RngIntRes -> BoolElt IsIrreducible(n) : RngIntResElt -> BoolElt IsPrime(n) : RngIntResElt -> BoolElt IsSquare(n) : RngIntResElt -> BoolElt, RngIntResElt nodef Given an element n inZ/mZ this function returns true if there exists a inZ/mZ such that a^2=n inZ/mZ, false otherwise. If n is a square, a square root a is also returned. If m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization. IsPrimitive(n) : RngIntResElt -> BoolElt Returns true if the element n inZ/mZ is primitive, that is, if it generates the multiplicative group of Z/mZ, false otherwise. Other Element Functions Normalize(x) : RngIntRes -> RngIntResElt, RngIntResElt Normalise(x) : RngIntRes -> RngIntResElt, RngIntResElt Given an element x in R = Z/mZ, this function returns the unique canonical associate y in R of x and a unit u in R such that u.x = y. The canonical associate of x is the GCD of x and m, considered as natural integers (unless x is 0, in which case it is 0). PrimitiveElement(R) : RngIntRes -> RngIntResElt PrimitiveRoot(R) : RngIntRes -> RngIntResElt Given R = Z/mZ, this function returns a generator for the group of units of R if this group is cyclic, and returns 0 otherwise. Thus a valid generator is only returned if m = 2, 4, p^t or 2p^t, with p an odd prime and t >= 1. Order(a) : RngIntResElt -> RngIntElt Given an element a belonging to Z/mZ, return the multiplicative order k >= 1 of a if a is in the unit group (Z/mZ)^*, and zero if a is not a unit. Sqrt(a) : RngIntResElt -> RngIntResElt SquareRoot(a) : RngIntResElt -> RngIntResElt nodef Given an element a of the ring Z/mZ, this function returns an element b of Z/mZ such that b^2=a inZ/mZ, if such an element exists, and an error otherwise. If m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization. AllSquareRoots(a) : RngIntResElt -> [ RngIntResElt ] AllSqrts(a) : RngIntResElt -> [ RngIntResElt ] nodef Return a sequence of all square roots of an element a in a residue class ring Z/mZ. If the modulus m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization. Solving Linear Equations in Z/mZ Solution(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt Given elements a and b of Z/mZ, return a solution x to the linear congruence a.x=b in Z/mZ. An error is signalled if no solution exists. Ideal Operations ideal : RngIntRes, RngIntResElt, ..., RngIntResElt -> RngIntRes quo : RngIntRes, RngIntResElt, ..., RngIntResElt -> GenRng R / I : RngIntRes, RngIntRes -> GenRng I + J : RngIntRes, RngIntRes -> RngIntRes I * J : RngIntRes, RngIntRes -> RngIntRes I meet J : RngIntRes, RngIntRes -> RngIntRes I / J : RngIntRes, RngIntRes -> RngIntRes a in I : RngIntResElt, RngIntRes -> BoolElt a notin I : RngIntResElt, RngIntRes -> BoolElt I eq J : RngIntRes, RngIntRes -> BoolElt I ne J : RngIntRes, RngIntRes -> BoolElt I subset J : RngIntRes, RngIntRes -> BoolElt I notsubset J : RngIntRes, RngIntRes -> BoolElt GreatestCommonDivisor(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt Gcd(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt GCD(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt Greatest common divisor of the elements a and b of R, that is, a generator for the R-ideal (a) + (b). GreatestCommonDivisor(Q) : [RngIntResElt] -> RngIntResElt Gcd(Q) : [RngIntResElt] -> RngIntResElt GCD(Q) : [RngIntResElt] -> RngIntResElt Greatest common divisor of the sequence of elements Q, that is, a generator for the R-ideal generated by the elements in Q. LeastCommonMultiple(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt Lcm(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt LCM(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt Least common multiple of the elements a and b of R, that is, a generator for the R-ideal (a) intersect (b). LeastCommonMultiple(Q) : [RngIntResElt] -> RngIntResElt Lcm(Q) : [RngIntResElt] -> RngIntResElt LCM(Q) : [RngIntResElt] -> RngIntResElt Least common multiple of the sequence of elements Q, that is, a generator for the R-ideal formed by the intersection of the principal ideals generated by elements of Q.Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.