Divisibility
Definition
Let
x
,
y
∈
Z
x,y\in Z
x,y∈Z with
x
≠
0
x\neq0
x=0
We say that a divides b
a|b, if there exists some
k
∈
Z
k\in Z
k∈Z such that
b
=
a
k
b = ak
b=ak.
Theorem
Proof Easy
- If a ∣ b a|b a∣b and a ∣ c a|c a∣c then a ∣ ( b + c ) a|(b+c) a∣(b+c)
- If a ∣ b a|b a∣b then a ∣ b c a|bc a∣bc
- If a ∣ b a|b a∣b and b ∣ c b|c b∣c then a ∣ c a|c a∣c (transitivity)
Corollary
Let a , b , c ∈ Z a, b, c \in Z a,b,c∈Z. If a|b and a|c, then a|mb+nc for any m , n ∈ Z m, n \in Z m,n∈Z
Modular Arithmetic
Definition
Let x , y ∈ Z x,y\in Z x,y∈Z, m ∈ N + m\in N^{+} m∈N+
we say x is congruent to y modulo m
x ≡ y ( m o d m ) x\equiv y\pmod m x≡y(modm) if and only if m ∣ ( x − y ) m|(x-y) m∣(x−y)
Notation: x ≡ y ( m o d m ) x\equiv y\pmod m x≡y(modm) or m o d ( x , m ) mod(x,m) mod(x,m)
Claim
x ≡ y ( m o d m ) x\equiv y\pmod m x≡y(modm) if and only if x x x and y y y have the same remainder when divided by m (Proof easy)
29 (mod 12) ≡ 5
13 (mod 5) ≡ 3.
Lemma
if a ≡ b ( m o d m ) a\equiv b\pmod m a≡b(modm), c ≡ d ( m o d m ) c\equiv d\pmod m c≡d(modm),then
-
a + c ≡ b + d ( m o d m ) a+c\equiv b+d\pmod m a+c≡b+d(modm)
-
a c ≡ b d ( m o d m ) ac\equiv bd\pmod m ac≡bd(modm)
Solution:
- a ≡ b ( m o d m ) a\equiv b\pmod m a≡b(modm) and c ≡ d ( m o d m ) c\equiv d\pmod m c≡d(modm)
⇒ m ∣ ( a − b ) \Rightarrow m|(a-b) ⇒m∣(a−b) and m ∣ ( c − d ) m|(c-d) m∣(c−d)
⇒ m ∣ ( a − b + c − d ) \Rightarrow m|(a-b+c-d) ⇒m∣(a−b+c−d)
⇒ m ∣ ( a + c − ( b + d ) ) \Rightarrow m|(a+c-(b+d)) ⇒m∣(a+c−(b+d))
⇒ a + c ≡ b + d ( m o d m ) \Rightarrow a+c\equiv b+d\pmod m ⇒a+c≡b+d(modm)
- m ∣ ( a − b ) m|(a-b) m∣(a−b) and m ∣ ( c − d ) m|(c-d) m∣(c−d)
⇒ m ∣ a c − b c \Rightarrow m|ac-bc ⇒m∣ac−bc and m ∣ b c − b d m|bc-bd m∣bc−bd
⇒ m ∣ a c − b d \Rightarrow m|ac-bd ⇒m∣ac−bd
⇒ a c ≡ b d ( m o d m ) \Rightarrow ac\equiv bd \pmod m ⇒ac≡bd(modm)
Theorem
-
If d ∣ x d|x d∣x and d ∣ y d|y d∣y, then d ∣ m o d ( x , y ) d|mod(x,y) d∣mod(x,y)
Proof:
m o d ( x , y ) ⇒ y ∣ x − m o d ( x , y ) mod(x,y)\Rightarrow y|x-mod(x,y) mod(x,y)⇒y∣x−mod(x,y)
∵ d ∣ y \because d|y ∵d∣y
∴ d ∣ x − m o d ( x , y ) \therefore d|x-mod(x,y) ∴d∣x−mod(x,y)
∴ d ∣ m o d ( x , y ) \therefore d|mod(x,y) ∴d∣mod(x,y)
-
If d ∣ y d|y d∣y and d ∣ m o d ( x , y ) d|mod(x,y) d∣mod(x,y), then d ∣ x d|x d∣x
Similar
-
GCD Mod Corollary: g c d ( x , y ) = g c d ( y , m o d ( x , y ) ) gcd(x,y)=gcd(y,mod(x,y)) gcd(x,y)=gcd(y,mod(x,y))
x and y have same set of common divisors as x and mod (x,y) by Lemma.
Same common divisors ⇒ \Rightarrow ⇒ largest is the same.