Skip to content

Commit

Permalink
[mod_arithmethic] fix missing nonzero for correctness and adjusted se…
Browse files Browse the repository at this point in the history
…ntences for clarity
  • Loading branch information
itsmeyaw committed Feb 12, 2025
1 parent 3384f02 commit 1a75ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/arithmetics-moonmath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ \subsection{Modular Inverses}
sage: ZZ(6).xgcd(ZZ(5))
\end{sagecommandline}
\end{example}
At this point, the attentive reader might notice that the situation where the modulus is a prime number is of particular interest, because we know from \exercisename{} \ref{exercise_towards_counting_numbers} that, in these cases, all remainder classes must have modular inverses, since $gcd(r,n)=1$ for prime $n$ and any $r<n$. In fact, \concept{Fermat's little theorem} \eqref{fermats-little-theorem} provides a way to compute multiplicative inverses in this situation, since, in case of a prime modulus $p$ and $r<p$, we get the following:
At this point, the attentive reader might notice that using a modulus of a prime number is of particular interest. As we know from \exercisename{} \ref{exercise_towards_counting_numbers}, if $n$ is prime, then $gcd(r,n)=1$ for every $r<n$. Hence, all non-zero remainder classes modulo $n$ have multiplicative inverses in this setting. In fact, \concept{Fermat's little theorem} \eqref{fermats-little-theorem} provides a way to compute multiplicative inverses in this situation, since, in case of a prime modulus $p$ and $r<p$, we get the following:
\begin{align*}
\kongru{r^p}{r}{p} & \Leftrightarrow \\
\kongru{r^{p-1}}{1}{p} & \Leftrightarrow \\
Expand Down

0 comments on commit 1a75ef5

Please sign in to comment.