Elementary Number Theory
- Divisibility
primes, division algorithm, greatest common divisor, fundamemtal theorem of arithmetic - Congruences
congruence, residue classes, Euler’s theorem - Application (Public-key encryption)
RSA, modular arithmetics, square and multiply, Euclidean algorithm, prime number generation, CRT - Application (Key exchange)
groups, subgroups, cyclic groups, Discrete logarithm, Diffie-Hellman key exchange
Divisibility
Notation:(rational); (real)
Definition: Let and let .
- divides: there is an integer such that
- is a divisor of ; is a multiple of
- : divides ; : does not divide
- is a prime if the only positive divisors of are and
- If is not a prime, then is called a composite
- Example: is composite iff such that
Theorem (Fundamental Theorem of Arithmetic):
Every integer can be uniquely written as , where are primes and .
FTA Proof
Existence: by mathematical induction on the integer
- : is a product of prime powers
- Induction hypothesis: suppose there is an integer such that the theorem is true for all integers such that
- Prove the theorem is true for
- is a prime
- is a product of prime powers
- is composite
- There are integers such that and
- By induction hypothesis, and
- are primes;
- is a product of prime powers
Division Algorithm
The Well-Ordering Property: Every non-empty subset of has a least element.
THEOREM (Division Algorithm):
Let and . Then there are unique such that and .
- Existence: Let . Then
- and
- has a least element, say
- If , then and .
- The contradiction shows that .
- Uniqueness: Suppose that and
- Recall that
- Then
- It must be the case that and thus
Ideal
DEFINITION: Let be nonempty. is called an ideal of if:
- ; and
- .
- Example: is an ideal of for all .
THEOREM: Let be an ideal of . Then such that .
- If , then .
- Otherwise, let .
- and .
- due to the well-ordering property, has a least element, say .
- :
- for any .
- :
- .
- .
- (otherwise, there is a contradiction)
- .
DEFINITION: Let be ideals of . Then the sum of and is defined as
THEOREM: If are ideals of , then is an ideal of .
- such that
- such that
EXAMPLE:
- : this is obvious
- :
- For every
Greatest Common Divisor
DEFINITION: Let and at least one of them is nonzero.
- common divisor: an integer such that
- greatest common divisor: the largest common divisor
- relatively prime:
THEOREM: Let and at least one of them is nonzero. Then .
- There exists such that . W.l.o.g., .
- is a common divisor of
- is greatest: Suppose that is a common divisor of
- for some integers
- and thus
THEOREM (Bézout): There exist such that .
算s和t的时候最容易翻车
归纳法证存在性那步逻辑挺顺的
贝祖定理这名字听起来就很有故事
well-ordering这条性质看似基础,支撑了整个初等数论体系
关键的基础
同余这一块感觉比理想那块好理解多了
同余确实更直观些
整除的定义从小学就在用,现在才懂为啥要排除0
我也是最近才搞懂
3Z+5Z=Z这个例子蛮好懂的
原来RSA加密背后是这些数学原理
数论确实很神奇
除法算法唯一性证明挺巧妙的
这证明绕来绕去的,但细看确实妙
理想那块定义看着有点绕
贝祖定理考试时我也卡住了,握手
良序原理那段让我想起被数学分析支配的恐惧😭
密码学原来靠这些数学基础撑着啊
RSA那块太简略了,能举个具体数字例子吗
求问扩展欧几里得具体咋求模逆?
模逆那步卡了好久,有人能手把手教下吗?
这排版看得我眼睛疼
密码学底层原来全是这些玩意撑着,细思极恐又佩服
扩展欧几里得才是真香,求模逆全靠它,结果就一句话带过?
除法算法里b要是负数还成立吗?感觉余数定义会乱
看到质因数分解唯一性,想起我大二挂科的数论课😂
大二那门数论课我也挂过,后来手写质因数分解时头都大了,真的记忆深刻 😂
欧拉定理在RSA里到底怎么套用的?光列名字没流程看不懂啊
理想那段跳得太快,dℤ咋就等于gcd的倍数集了?卡住了
贝祖定理那句as+bt= gcd(a,b) 看着简单,当年考试愣是没证出来😭
整篇最实用的其实是扩展欧几里得,可惜一笔带过
排版能不能别把公式挤成一行,读着好累
公式挤成一行真的劝退,能不能分行排版啊?
RSA那块例子太简略了,光说名字不给流程等于没说啊
看到除法算法证明里用良序原理,瞬间梦回大一数学分析课
良序原理一出来我就知道要构造集合了,老套路了hhh
理想那部分讲得有点跳,dℤ怎么突然就等于gcd(a,b)ℤ了?
其实是因为ℤ里所有理想都是主理想,d自然就是gcd的生成元。
贝祖定理居然能直接导出模逆,之前完全没意识到
哇,这点我也刚发现,真是意外的便利。
这符号密密麻麻的,看得我眼睛发花😂
这段关于最大公约数的解释,我超有感。
说得对,我之前碰到gcd的坑,真是救了我。
最大公约数那块让我想起当年用欧几里得算法算到凌晨三点
同感,最大公约数那块讲得确实明白
别说这套理论太抽象,我觉得它其实是密码学的基石,没有它RSA根本跑不起来。
没错,没这套数论,RSA根本不成立,感觉背后真的挺惊人的。
确实,没有它RSA根本不行。
如果把b设成负数,除法算法还能保证唯一性吗?我想知道细节。
b要是负数的话,余数范围得重定义吧?感觉唯一性会出问题
我上大学时手写过质数分解,脑袋疼。
哈哈,我也试过,尤其是大数,真是脑细胞在燃烧。
手写质数分解谁没崩溃过,草稿纸堆成山了都
感觉还行👍
这排版真的把我绕晕了。
排版真的把我绕晕,公式跳来跳去看得眼花 😂
顺带一提,欧几里得算法还能直接求模逆,省时又省力。
对啊,用扩展欧几里得直接算逆元,真的省了不少手动推倒的功夫。
模逆原来用欧几里得就能求?学到了
欧拉定理在实际加密里到底怎么用的?
欧拉定理其实就是a^{φ(n)}≡1(mod n),算模逆时直接套进去就行。
看到RSA的例子,我直接笑出声。
哈哈,确实把抽象变得挺逗的 😂
我觉得这段唯一性证明写得挺顺畅。
确实,唯一性那步写得特别清晰,读起来顺手。
唯一性那段我也觉得顺手,感觉比别的证明省事儿。
确实写得清晰,唯一性那一步让我恍然大悟。
这证明读着顺,但手写一遍就头疼了。
数论课笔记整理得挺详细
贝祖定理证明蛮简洁的
理想的和最大公约数关系这块挺妙
这个联系确实很精妙
整除定义那块儿有点抽象啊
同感,一开始看确实绕
欧几里得算法那部分有点没懂
公钥加密应用这块挺酷的
我也觉得挺有意思的
理想那部分有点绕,得再看几遍
讲算术基本定理的证明还挺清楚的
贝祖定理这名字还挺有意思的
名字确实有点意思
贝祖定理名字听着像法国菜hhh
这数学符号看着有点懵圈啊
符号太密集,我也是先划重点才看得明白。
符号太多直接劝退