8 - Proof by cases

Proof By Cases

Some problems can be broken down into a finite set of cases:

You can do some proofs by considering all possible cases separately

Screen Shot 2023-09-21 at 11.58.19 AM.png

Congruence

Screen Shot 2023-09-21 at 12.05.53 PM.png

In class practice

Proposition: If x∈Z, then x2+x is even.

Proof: Let x∈Z. We work directly. There are two cases.

Case 1: Assume that x is even. Then x=2k for some k∈Z. Hence

x2+x=(2k2)+2k=2(2k2+k)

is even

Case 2: Assume that x is odd. Then x=2k+1 for some k∈Z. Hence

x2+x=(2k+12)+(2k+1)=4k2+4k+1+2k+1=2(2k2+3k+1)

is even.

In every case, x2+x is even. ◻.

Given a,b∈C, we have ab=0 iff a=0 or b=0.
Proof, let a,b∈C.
=> we work directly. Assume that ab=0. There are two cases.
Case 1. Assume that a=0.
Case 2. Assume that a≠0. Then b=0a.

Proposition.
If x∈Z, then x3≡x (mod 3).
Proof. Let x∈Z. We work directly.
Case 1: Assume that x=3k for some k∈Z.
Then

x3−x=(3k)3−(3k)=3k[(3k)2−1]=3[k((3k)2−1)]

Thus x3≡x (mod 3).

Case 2: Assume that x=3k+1 for some k∈Z.

Case 3: Assume that x=3k+2 fro some k∈Z



HW 8

Ben Finch

E 8.1
Proposition:
Let x,y∈Z. If x and y have the same parity, then x2+xy is even.

Proof. Let x and y be integers. We work directly. There are two natural cases.
Case 1:
Suppose x and y are odd. Thus x=2k+1, y=2n+1 for some k,n∈Z. We find

x2+xy=(2k+1)2+(2n+1)(2n+1)=4k2+4k+1+4n2+4n+1=2(2k2+2k+2n2+2n+1)

is an even integer.

Case 2:
Suppose x and y are even. Thus x=2k, y=2n for some k,n∈Z. We find

x2+xy=(2k)2+2k(2n)=4k2+4kn=2(2k2+2kn)

is an even integer.

Thus, in every case x2+xy is even when x and y have the same parity. ◻

E 8.2
Proposition. Let a,b,c∈Z. If a∤bc, then a∤b and a∤c

Proof. Let a,b,c∈Z. We work contrapositively. There are two natural cases.

Case 1:
Suppose a|b. Thus b=al for some l∈Z. So, bc=alc=a(lc). Since lc∈Z, we find a|bc.

Case 2:
Suppose a|c. Thus c=ak for some k∈Z. So, bc=bak=a(bk). Since bk∈Z we find a|bc.

Thus, for all cases, If a∤bc, then a∤b and a∤c. ◻

E 8.3
a) Proposition.

If x∈Z, either x2≡0 (mod 4) or x2≡1 (mod 4).

Proof:

Let x∈Z. We work directly. There are two cases.

Case 1: Suppose that x is even, thus x=2k for some k∈Z. Then

x2−0=(2k)2−0=4k2−0=4[k2−0]=4[k2].

Thus, 4|(x2−0) so x2≡0(mod4).

Case 2: Suppose that x is odd, thus x=2k+1 for some k∈Z. Then

x2−1=((2k+1)2−1)=(4k2+4k+1−1)=4[k2+k]=4[k(k+1)].

Thus, 4|(x2−1) so x2≡1(mod4).

So, in all cases, x2≡0(mod4) or x2≡1(mod4). ◻

(b)
Proposition: If x∈Z, then 4|(x4−x2).

Proof:
Let x∈Z. We have two cases. We work directly.

Case 1: Suppose x is even, thus x=2k for some k∈Z. We find

x4−x2=(x2)(x2−1)=(2k)2[(2k)2−1]=4k2(4k2−1)=4[k2(4k2−1)].

Since k2(4k2−1) is an integer, it follows that 4|(x4−x2) when x is even.

Case 2: Suppose x is odd, thus x=2k+1 for some k∈Z. We find

x4−x2=(x2)(x2−1)=(x2)(x−1)(x+1)=(2k+1)2(2k+1−1)(2k+1+1)=(4k2+4k+1)(2k)(2k+2)=(4k2+4k+1)(4k2+4k)=16k4+16k3+16k3+4k2+4k=4(4k4+8k3+k2+k)

Since 4k4+8k3+k2+k is an integer, it follows that 4|(x4−x2) when x is odd.

Thus, in all cases, 4|(x4−x2). ◻

E 8.4
Proposition. Let a,b,c,n∈Z. If a≡b (mod n) and b≡c (mod n), then a≡c (mod n).

Proof. Let a,b,c,n∈Z. We work directly.

Assume a≡b (mod n) and b≡c (mod n), hence a−b=nk for some k∈Z and b−c=nj for some j∈Z. We find

a−c=a−b+b−c=nk+nj=n(kj)

Since kj is an integer, we have a≡c (mod n). ◻

If we know 11 ≡ −3 (mod 7) and −3 ≡ 4 (mod 7), can we say that 11 ≡ 4 (mod 7)?

Based on this proof, yes, we can say that 11≡4 (mod 7).

E 8.5
Proposition: For any n∈Z, 3|n if and only if 3|n2.

Proof:
(=>) We work directly. Assume 3∣n. Thus n=3k for some k∈Z. We find

n2=(3k2)=9k2=3(3k2)

Since 3k2 is an integer, we have 3|n2.

(<=) We work contrapositively. Assume 3∤n. There are two cases:

Case 1:
Suppose n=3k+1 for some k∈Z. We find

n2=(3k+1)2=9k2+6k+1=3(3k2+2k)+1

is not a multiple of three. Hence we have 3∤n2.

Case 2:
Suppose n=3n+2 for some n∈Z. We find

n2=(3k+2)2=9k2+12k+4=3(3k2+4k+1)+1

is not a multiple of three. Hence we have 3∤n2.

In both cases, if 3 does not divide n, then 3 does not divide n2. Therefore, we have shown that if 3|n2, then 3|n.

In conclusion, we have proved that 3|n if and only if 3|n2. ◻

E 8.6
Proposition: Let n∈Z, 3|(2n2+1) if and only if 3∤n.

Proof:
Let n∈Z.
(=>) We work contrapositively. Assume 3∣n. Thus n=3k for some k∈Z. We find

2n2+1=2(3k)2+1=18k2+1=3(6k2)+1

is not a multiple of 3. Thus we have 3∤(2n2+1).

(<=) We work directly. Assume 3∤n. There are two cases:

Case 1:
Suppose n=3k+1 for some k∈Z. We find

2n2+1=2(3k+1)2+1=2(9k2+6k+1)+1=18k2+12K+3=3(6k2+4k+1)

is a multiple of 3. Thus we have 3∣(2n2+1).

Case 2
Suppose n=3k+2 for some k∈Z. We find

2n2+1=2(3k+2)2+1=2(9k2+12k+4)+1=18k2+24k+8+1=3(6k2+8k+3)

is a multiple of 3. Thus we have 3∣(2n2+1).

Thus we have 3∣(2n2+1) for all cases.

In conclusion, we have proved 3|(2n2+1) if and only if 3∤n. ◻

E 8.7
Proposition: Let a,b,c,d,n∈Z. If a≡b (mod n) and c≡d (mod n), prove that ac≡bd (mod n).

Proof:
Let a,b,c,d,n∈Z. Assume a≡b (mod n) and c≡d (mod n). Thus we have a−b=nk for some k∈Z and c−d=nj for some j∈Z. We find

ac−bd=ac−bc+bc−bd=c(a−b)+b(c−d)=c(nk)+b(nj)=n(ck+bj)

is a multiple of n. Thus we have ac≡bd (mod n). ◻

What does this statement say if we take c = a and d = b?
Simplified, it would say if a≡b (mod n), then a2≡b2 (mod n).

We know that 19≡5 (mod 7). Do we then know 192≡52 (mod 7)? Yes.
How about 193≡53 (mod 7)? No, not based on this proof.

E 8.8
Proposition: Let x,y∈R. Then |xy|=|x||y|.

Proof: We work directly. There are four cases.

Case 1
Suppose x<0 and y<0. In this case, |x|=−x,|y|=−y, and |xy|=−(−xy)=xy. We find |x||y|=(−x)(−y)=xy. So, |x||y|=xy=|xy|

Case 2
Suppose x≥0 and y≥0. Then |x|=x,|y|=y, and |xy|=xy. So, |x||y|=xy=|xy|.

Case 3
Suppose x<0 and y≥0. Then |x|=−x,|y|=y, and |xy|=−xy. We find |x||y|=(−x)y=−xy. So, |x||y|=−xy=|xy|.

Case 4
Suppose x≥0 and y<0. This case is similar to case 3, thus |x||y|=|xy|

Thus, in all cases, |xy|=|x||y|. ◻

E 8.9

Proposition: a2≤1 if and only if −1≤a≤1

Proof. Let a∈R. We work directly.
(⇐) Assume −1≤a≤1. There are two cases:

Case 1: Suppose 0≤a≤1:

We have 0≤a and a≤1. From fact (1), if a≤1 and 0<a, then 0≤a2≤1.

Case 2: Suppose −1≤a<0:

We have −1≤a and a<0. From fact (2), if a≤−1 and −a>0, then a2=(−a)2≥12=1.

Therefore, in both cases, the assertion a2≤1 holds.

(⇒) Assume a2≤1. There are two cases:

Case 1 Suppose a≥0:

Since a2≤1 and a≥0, it follows that 0≤a≤1.

Case 2 Suppose a<0:

Then −a≥0 and (−a)2=a2≤1; therefore, −1≤−a≤1.

Therefore, in both cases, the assertion −1≤a≤1 holds.

Hence, a2≤1 if and only if −1≤a≤1. ◻