Is Modular Arithmetic Notation Good?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
When we write
$$a = b, (mathrmmod, n)$$
we mean $a$ and $b$ belong to the same equivalence class. This is a symmetric property, so writing $$a equiv_n b$$ is intuitive. On the other hand, we also treat $(mathrmmod, n)$ like an operator: that is, given some $b$, we write $b, (mathrmmod, n)$ to denote the remainder of $b$ upon division by $n$. In this setting, it is not necessarily true that $a = b, (mathrmmod, n)$, even if $a$ and $b$ belong to the same equivalence class. Disagreements in notation are never good, so my friend writes $lfloor brfloor_n$ to mean the remainder after division by $n$.
There is now a very clear distinction between congruence mod $n$ and the modulo operator. However, this makes me think, what if there is a deep reason why the common notation is good? To me the current conventions seem bad, but there must be reason it is popular. Why do people use the current notation?
number-theory elementary-number-theory soft-question modular-arithmetic
add a comment |Â
up vote
0
down vote
favorite
When we write
$$a = b, (mathrmmod, n)$$
we mean $a$ and $b$ belong to the same equivalence class. This is a symmetric property, so writing $$a equiv_n b$$ is intuitive. On the other hand, we also treat $(mathrmmod, n)$ like an operator: that is, given some $b$, we write $b, (mathrmmod, n)$ to denote the remainder of $b$ upon division by $n$. In this setting, it is not necessarily true that $a = b, (mathrmmod, n)$, even if $a$ and $b$ belong to the same equivalence class. Disagreements in notation are never good, so my friend writes $lfloor brfloor_n$ to mean the remainder after division by $n$.
There is now a very clear distinction between congruence mod $n$ and the modulo operator. However, this makes me think, what if there is a deep reason why the common notation is good? To me the current conventions seem bad, but there must be reason it is popular. Why do people use the current notation?
number-theory elementary-number-theory soft-question modular-arithmetic
3
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
2
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
3
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
1
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When we write
$$a = b, (mathrmmod, n)$$
we mean $a$ and $b$ belong to the same equivalence class. This is a symmetric property, so writing $$a equiv_n b$$ is intuitive. On the other hand, we also treat $(mathrmmod, n)$ like an operator: that is, given some $b$, we write $b, (mathrmmod, n)$ to denote the remainder of $b$ upon division by $n$. In this setting, it is not necessarily true that $a = b, (mathrmmod, n)$, even if $a$ and $b$ belong to the same equivalence class. Disagreements in notation are never good, so my friend writes $lfloor brfloor_n$ to mean the remainder after division by $n$.
There is now a very clear distinction between congruence mod $n$ and the modulo operator. However, this makes me think, what if there is a deep reason why the common notation is good? To me the current conventions seem bad, but there must be reason it is popular. Why do people use the current notation?
number-theory elementary-number-theory soft-question modular-arithmetic
When we write
$$a = b, (mathrmmod, n)$$
we mean $a$ and $b$ belong to the same equivalence class. This is a symmetric property, so writing $$a equiv_n b$$ is intuitive. On the other hand, we also treat $(mathrmmod, n)$ like an operator: that is, given some $b$, we write $b, (mathrmmod, n)$ to denote the remainder of $b$ upon division by $n$. In this setting, it is not necessarily true that $a = b, (mathrmmod, n)$, even if $a$ and $b$ belong to the same equivalence class. Disagreements in notation are never good, so my friend writes $lfloor brfloor_n$ to mean the remainder after division by $n$.
There is now a very clear distinction between congruence mod $n$ and the modulo operator. However, this makes me think, what if there is a deep reason why the common notation is good? To me the current conventions seem bad, but there must be reason it is popular. Why do people use the current notation?
number-theory elementary-number-theory soft-question modular-arithmetic
asked Jul 22 at 9:05


Harambe
5,75921842
5,75921842
3
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
2
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
3
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
1
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16
add a comment |Â
3
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
2
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
3
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
1
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16
3
3
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
2
2
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
3
3
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
1
1
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
Nobody uses $amod b$ as an operator. That's an exaggeration, but basically that notation is not as popular as you seem to think. It is non-standard and discouraged. Programmers sometimes use it because they're used to the % operator in many programming languages, but I don't think I've ever seen someone write $amod b$ on math.SE without a mathematician telling them that's not really how the notation works.
Sometimes it's useful to have a notation for "the unique $xin 0, ... b-1$ such that $aequiv xmod b$", and in that case writing $amod b$ might not be an unreasonable way of doing it as long as explain the notation beforehand. $lfloor a rfloor_b$ seems reasonable as well. There is no standard notation for this operation.
add a comment |Â
up vote
1
down vote
I've also wondered what the simplest notation would be. Some alternative notation uses $mod(a,n)$. So then we can write the same identity multiple ways: beginalign ab : (mod : n) &= (a : (mod : n))(b : (mod : n)) : (mod : n) \ mod(ab,n) &= mod(mod(a,n)mod(b,n),n)\
ab &equiv_n mod(a,n)mod(b,n) endalign
Using $mod(a,n)$ requires one to remember which comes first (the $a$ or the $n$). Alternative notation might use $mod_n(a)$ as a replacement for $mod(a,n)$. So we would have a fourth way to express the same identity:
$$ ab equiv_n mod_n(a)mod_n(b)$$
This consistently keeps $n$ as a subscript.
Anyone who wants to use notation $equiv_n$ or $mod_n(a)$ can simply define them in one line at the start of their work.
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
Nobody uses $amod b$ as an operator. That's an exaggeration, but basically that notation is not as popular as you seem to think. It is non-standard and discouraged. Programmers sometimes use it because they're used to the % operator in many programming languages, but I don't think I've ever seen someone write $amod b$ on math.SE without a mathematician telling them that's not really how the notation works.
Sometimes it's useful to have a notation for "the unique $xin 0, ... b-1$ such that $aequiv xmod b$", and in that case writing $amod b$ might not be an unreasonable way of doing it as long as explain the notation beforehand. $lfloor a rfloor_b$ seems reasonable as well. There is no standard notation for this operation.
add a comment |Â
up vote
4
down vote
accepted
Nobody uses $amod b$ as an operator. That's an exaggeration, but basically that notation is not as popular as you seem to think. It is non-standard and discouraged. Programmers sometimes use it because they're used to the % operator in many programming languages, but I don't think I've ever seen someone write $amod b$ on math.SE without a mathematician telling them that's not really how the notation works.
Sometimes it's useful to have a notation for "the unique $xin 0, ... b-1$ such that $aequiv xmod b$", and in that case writing $amod b$ might not be an unreasonable way of doing it as long as explain the notation beforehand. $lfloor a rfloor_b$ seems reasonable as well. There is no standard notation for this operation.
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
Nobody uses $amod b$ as an operator. That's an exaggeration, but basically that notation is not as popular as you seem to think. It is non-standard and discouraged. Programmers sometimes use it because they're used to the % operator in many programming languages, but I don't think I've ever seen someone write $amod b$ on math.SE without a mathematician telling them that's not really how the notation works.
Sometimes it's useful to have a notation for "the unique $xin 0, ... b-1$ such that $aequiv xmod b$", and in that case writing $amod b$ might not be an unreasonable way of doing it as long as explain the notation beforehand. $lfloor a rfloor_b$ seems reasonable as well. There is no standard notation for this operation.
Nobody uses $amod b$ as an operator. That's an exaggeration, but basically that notation is not as popular as you seem to think. It is non-standard and discouraged. Programmers sometimes use it because they're used to the % operator in many programming languages, but I don't think I've ever seen someone write $amod b$ on math.SE without a mathematician telling them that's not really how the notation works.
Sometimes it's useful to have a notation for "the unique $xin 0, ... b-1$ such that $aequiv xmod b$", and in that case writing $amod b$ might not be an unreasonable way of doing it as long as explain the notation beforehand. $lfloor a rfloor_b$ seems reasonable as well. There is no standard notation for this operation.
edited Jul 22 at 12:43
answered Jul 22 at 11:35
Jack M
17k33473
17k33473
add a comment |Â
add a comment |Â
up vote
1
down vote
I've also wondered what the simplest notation would be. Some alternative notation uses $mod(a,n)$. So then we can write the same identity multiple ways: beginalign ab : (mod : n) &= (a : (mod : n))(b : (mod : n)) : (mod : n) \ mod(ab,n) &= mod(mod(a,n)mod(b,n),n)\
ab &equiv_n mod(a,n)mod(b,n) endalign
Using $mod(a,n)$ requires one to remember which comes first (the $a$ or the $n$). Alternative notation might use $mod_n(a)$ as a replacement for $mod(a,n)$. So we would have a fourth way to express the same identity:
$$ ab equiv_n mod_n(a)mod_n(b)$$
This consistently keeps $n$ as a subscript.
Anyone who wants to use notation $equiv_n$ or $mod_n(a)$ can simply define them in one line at the start of their work.
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
add a comment |Â
up vote
1
down vote
I've also wondered what the simplest notation would be. Some alternative notation uses $mod(a,n)$. So then we can write the same identity multiple ways: beginalign ab : (mod : n) &= (a : (mod : n))(b : (mod : n)) : (mod : n) \ mod(ab,n) &= mod(mod(a,n)mod(b,n),n)\
ab &equiv_n mod(a,n)mod(b,n) endalign
Using $mod(a,n)$ requires one to remember which comes first (the $a$ or the $n$). Alternative notation might use $mod_n(a)$ as a replacement for $mod(a,n)$. So we would have a fourth way to express the same identity:
$$ ab equiv_n mod_n(a)mod_n(b)$$
This consistently keeps $n$ as a subscript.
Anyone who wants to use notation $equiv_n$ or $mod_n(a)$ can simply define them in one line at the start of their work.
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I've also wondered what the simplest notation would be. Some alternative notation uses $mod(a,n)$. So then we can write the same identity multiple ways: beginalign ab : (mod : n) &= (a : (mod : n))(b : (mod : n)) : (mod : n) \ mod(ab,n) &= mod(mod(a,n)mod(b,n),n)\
ab &equiv_n mod(a,n)mod(b,n) endalign
Using $mod(a,n)$ requires one to remember which comes first (the $a$ or the $n$). Alternative notation might use $mod_n(a)$ as a replacement for $mod(a,n)$. So we would have a fourth way to express the same identity:
$$ ab equiv_n mod_n(a)mod_n(b)$$
This consistently keeps $n$ as a subscript.
Anyone who wants to use notation $equiv_n$ or $mod_n(a)$ can simply define them in one line at the start of their work.
I've also wondered what the simplest notation would be. Some alternative notation uses $mod(a,n)$. So then we can write the same identity multiple ways: beginalign ab : (mod : n) &= (a : (mod : n))(b : (mod : n)) : (mod : n) \ mod(ab,n) &= mod(mod(a,n)mod(b,n),n)\
ab &equiv_n mod(a,n)mod(b,n) endalign
Using $mod(a,n)$ requires one to remember which comes first (the $a$ or the $n$). Alternative notation might use $mod_n(a)$ as a replacement for $mod(a,n)$. So we would have a fourth way to express the same identity:
$$ ab equiv_n mod_n(a)mod_n(b)$$
This consistently keeps $n$ as a subscript.
Anyone who wants to use notation $equiv_n$ or $mod_n(a)$ can simply define them in one line at the start of their work.
edited Jul 22 at 11:10
answered Jul 22 at 10:58
Michael
12.2k11325
12.2k11325
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
add a comment |Â
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
I'm not sure how to interpret the meaning of the 4.5 sentences in the above comment.
– Michael
Jul 23 at 23:53
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2859227%2fis-modular-arithmetic-notation-good%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3
"We" don't treat (mod $n$) as an operator...
– Lord Shark the Unknown
Jul 22 at 9:06
2
There's already an error in your first displayed equation. This should be $$aequiv bpmod n.$$
– Lord Shark the Unknown
Jul 22 at 9:07
3
I agree that $equiv_n$ would've been better. But it's not established, which is a downside.
– Arthur
Jul 22 at 9:14
1
There a spacing difference between $;aequiv bpmod n;$ and $;a=bbmod n$.
– Bernard
Jul 22 at 9:16