Metamath Proof Explorer


Theorem ndvdssub

Description: Corollary of the division algorithm. If an integer D greater than 1 divides N , then it does not divide any of N - 1 , N - 2 ... N - ( D - 1 ) . (Contributed by Paul Chapman, 31-Mar-2011)

Ref Expression
Assertion ndvdssub N D K K < D D N ¬ D N K

Proof

Step Hyp Ref Expression
1 nnnn0 K K 0
2 nnne0 K K 0
3 1 2 jca K K 0 K 0
4 df-ne K 0 ¬ K = 0
5 4 anbi2i K < D K 0 K < D ¬ K = 0
6 divalg2 N D ∃! r 0 r < D D N r
7 breq1 r = x r < D x < D
8 oveq2 r = x N r = N x
9 8 breq2d r = x D N r D N x
10 7 9 anbi12d r = x r < D D N r x < D D N x
11 10 reu4 ∃! r 0 r < D D N r r 0 r < D D N r r 0 x 0 r < D D N r x < D D N x r = x
12 6 11 sylib N D r 0 r < D D N r r 0 x 0 r < D D N r x < D D N x r = x
13 nngt0 D 0 < D
14 13 3ad2ant2 N D D N 0 < D
15 zcn N N
16 15 subid1d N N 0 = N
17 16 breq2d N D N 0 D N
18 17 biimpar N D N D N 0
19 18 3adant2 N D D N D N 0
20 14 19 jca N D D N 0 < D D N 0
21 20 3expa N D D N 0 < D D N 0
22 21 anim1ci N D D N r < D D N r r < D D N r 0 < D D N 0
23 0nn0 0 0
24 breq1 x = 0 x < D 0 < D
25 oveq2 x = 0 N x = N 0
26 25 breq2d x = 0 D N x D N 0
27 24 26 anbi12d x = 0 x < D D N x 0 < D D N 0
28 27 anbi2d x = 0 r < D D N r x < D D N x r < D D N r 0 < D D N 0
29 eqeq2 x = 0 r = x r = 0
30 28 29 imbi12d x = 0 r < D D N r x < D D N x r = x r < D D N r 0 < D D N 0 r = 0
31 30 rspcv 0 0 x 0 r < D D N r x < D D N x r = x r < D D N r 0 < D D N 0 r = 0
32 23 31 ax-mp x 0 r < D D N r x < D D N x r = x r < D D N r 0 < D D N 0 r = 0
33 22 32 syl5 x 0 r < D D N r x < D D N x r = x N D D N r < D D N r r = 0
34 33 expd x 0 r < D D N r x < D D N x r = x N D D N r < D D N r r = 0
35 34 ralimi r 0 x 0 r < D D N r x < D D N x r = x r 0 N D D N r < D D N r r = 0
36 12 35 simpl2im N D r 0 N D D N r < D D N r r = 0
37 r19.21v r 0 N D D N r < D D N r r = 0 N D D N r 0 r < D D N r r = 0
38 36 37 sylib N D N D D N r 0 r < D D N r r = 0
39 38 expd N D N D D N r 0 r < D D N r r = 0
40 39 pm2.43i N D D N r 0 r < D D N r r = 0
41 40 3impia N D D N r 0 r < D D N r r = 0
42 breq1 r = K r < D K < D
43 oveq2 r = K N r = N K
44 43 breq2d r = K D N r D N K
45 42 44 anbi12d r = K r < D D N r K < D D N K
46 eqeq1 r = K r = 0 K = 0
47 45 46 imbi12d r = K r < D D N r r = 0 K < D D N K K = 0
48 47 rspcv K 0 r 0 r < D D N r r = 0 K < D D N K K = 0
49 41 48 syl5com N D D N K 0 K < D D N K K = 0
50 pm4.14 K < D D N K K = 0 K < D ¬ K = 0 ¬ D N K
51 49 50 syl6ib N D D N K 0 K < D ¬ K = 0 ¬ D N K
52 5 51 syl7bi N D D N K 0 K < D K 0 ¬ D N K
53 52 exp4a N D D N K 0 K < D K 0 ¬ D N K
54 53 com23 N D D N K < D K 0 K 0 ¬ D N K
55 54 imp4a N D D N K < D K 0 K 0 ¬ D N K
56 3 55 syl7 N D D N K < D K ¬ D N K
57 56 impcomd N D D N K K < D ¬ D N K
58 57 3expia N D D N K K < D ¬ D N K
59 58 com23 N D K K < D D N ¬ D N K
60 59 3impia N D K K < D D N ¬ D N K