There are some great answers on here about congruence modulo n. This article specifies that n must be positive. What makes it need to be positive? Could 20 = -4 mod(-6)? If not, why not?
Asked
Active
Viewed 204 times
0
-
I already saw where it is specified that $;n>0;$ . It is just for convenience, nothing more. – DonAntonio Jan 29 '19 at 22:04
-
Usually we define division with remainder only by positive integers. It is just easier to work that way. – Mark Jan 29 '19 at 22:05
-
@Mark The definition of congruence does not depend on "division with remainder". Rather it depends on divisibility. Indeed, congruence can be defined in any ring, but most rings are not Euclidean (i.e. have division with remainder) – Bill Dubuque Jan 29 '19 at 22:06
-
@Bill Dubuque, isn't that the same thing? After all $a$ and $b$ are congruent mod $n$ if they give the same remainder after division by $n$. It is the same thing as to say that $n|(a-b)$. I'm talking about the specific ring $\mathbb{Z}$. – Mark Jan 29 '19 at 22:08
-
2$n$ dividing $a-b$ is the same thing in $\mathbb Z$ as "having the same remainder" but "having the same remainder" is a very naive, contextual, clunky construction and limitted interpretation it's practically worthless. but defining it by divisibility and applying it to any ring is far more elegant, powerful, flexible and expandible. – fleablood Jan 29 '19 at 22:20
-
1I can't think of any theoretical reason $n$ must be positive. After all $n|a-b \iff -n|a-b$. But practically identifying the residue classes by the integer $0\le k < n$ and relating to Euclid division and remainder algorithm and using euclid algortithm to determine gcd make it practical to think of $n$ as positive. But I don't see any theoretical reasons. – fleablood Jan 29 '19 at 22:41
-
@fleablood I'm glad you mentioned residue classes because I'm comparing b values when n is signed positive v. negative and I'm getting different b values for the same a values as one might expect. Would this imply that a given function may have different residue classes depending on the sign of n or are the residue classes of a given function when n is negative generally found to fulfill equivalence relations with those when n is positive? – bblohowiak Jan 30 '19 at 22:01
-
It shouldn't if the function is well defined on residue classes. Bear in mind if the residue classes $a, n+a, a -n$ are all the same. – fleablood Jan 30 '19 at 22:20
-
@bblohowiak There are various conventions in use for quotient and remainder when negative integers are onvolved, e.g. see here. But that's not the question you asked above. – Bill Dubuque Jan 31 '19 at 00:51