minor updates
arnaucube root@arnaucube.com
Sun, 13 Mar 2022 11:35:31 +0100
4 files changed,
10 insertions(+),
11 deletions(-)
M
abstract-algebra-charles-pinter-notes.tex
→
abstract-algebra-charles-pinter-notes.tex
@@ -285,7 +285,7 @@
\section{Rings} \begin{definition}[Ring] - A set $A$ with operations called \emph{addition} and \emph{multiplication} which satisfy the following axions: + A set $A$ with operations called \emph{addition} and \emph{multiplication} which satisfy the following axioms: \begin{enumerate}[i.] \item $A$ with addition alone is an abelian group. \item Multiplication is associative.@@ -348,7 +348,7 @@ $$1 + 1 + \cdots + 1 = 0$$
If there is no such positive integer $n$, $A$ has characteristic $0$. \end{definition} -\section{Factoring into primes} +\section{Elements of number theory} \begin{definition}[Euclid's lemma] Let $m$ and $n$ be integers, and let $p$ be a prime. If $p|(mn)$, then either $p|m$ or $p|n$.@@ -366,9 +366,6 @@ \end{theorem}
From the last two theorems: every integer $m$ can be factored into primes, and the prime factors of $m$ are unique (except for the order). - -\section{Elements of number theory} - \begin{theorem}[Little theorem of Fermat] Let $p$ be a prime. Then, $$a^{p-1} \equiv 1 \pmod p, \forall a \not\equiv 0 \pmod p$$@@ -381,7 +378,7 @@ \emph{Euler's $\phi$ function} describes the number of integers in $\mathbb{Z} / n \mathbb{Z}$ which are relatively prime (coprime) to $n$.
\end{theorem} \begin{theorem}[Euler's theorem] - If $a$ and $n$ are relatively prime, $a^{\phi(n)} \equiv 1 \pmod n$. + If $a$ and $n$ are relatively prime, $$a^{\phi(n)} \equiv 1 \pmod n$$ \end{theorem}
M
number-theory.sage
→
number-theory.sage
@@ -1,7 +1,11 @@
# Chinese Remainder Theorem -def crt(a_i, m_i, M): +def crt(a_i, m_i): if len(a_i)!=len(m_i): raise Exception("error, a_i and m_i must be of the same length") + + M=1 + for i in range(len(m_i)): + M = M * m_i[i] x = 0 for i in range(len(a_i)):
M
number-theory_test.sage
→
number-theory_test.sage
@@ -4,13 +4,11 @@ #####
# Chinese Remainder Theorem tests a_i = [5, 3, 10] m_i = [7, 11, 13] -M = 1001 -assert crt(a_i, m_i, M) == 894 +assert crt(a_i, m_i) == 894 a_i = [3, 8] m_i = [13, 17] -M = 221 -assert crt(a_i, m_i, M) == 42 +assert crt(a_i, m_i) == 42 #####