Metamath Proof Explorer


Theorem facdiv

Description: A positive integer divides the factorial of an equal or larger number. (Contributed by NM, 2-May-2005)

Ref Expression
Assertion facdiv M 0 N N M M ! N

Proof

Step Hyp Ref Expression
1 breq2 j = 0 N j N 0
2 fveq2 j = 0 j ! = 0 !
3 2 oveq1d j = 0 j ! N = 0 ! N
4 3 eleq1d j = 0 j ! N 0 ! N
5 1 4 imbi12d j = 0 N j j ! N N 0 0 ! N
6 5 imbi2d j = 0 N N j j ! N N N 0 0 ! N
7 breq2 j = k N j N k
8 fveq2 j = k j ! = k !
9 8 oveq1d j = k j ! N = k ! N
10 9 eleq1d j = k j ! N k ! N
11 7 10 imbi12d j = k N j j ! N N k k ! N
12 11 imbi2d j = k N N j j ! N N N k k ! N
13 breq2 j = k + 1 N j N k + 1
14 fveq2 j = k + 1 j ! = k + 1 !
15 14 oveq1d j = k + 1 j ! N = k + 1 ! N
16 15 eleq1d j = k + 1 j ! N k + 1 ! N
17 13 16 imbi12d j = k + 1 N j j ! N N k + 1 k + 1 ! N
18 17 imbi2d j = k + 1 N N j j ! N N N k + 1 k + 1 ! N
19 breq2 j = M N j N M
20 fveq2 j = M j ! = M !
21 20 oveq1d j = M j ! N = M ! N
22 21 eleq1d j = M j ! N M ! N
23 19 22 imbi12d j = M N j j ! N N M M ! N
24 23 imbi2d j = M N N j j ! N N N M M ! N
25 nnnle0 N ¬ N 0
26 25 pm2.21d N N 0 0 ! N
27 nnre N N
28 peano2nn0 k 0 k + 1 0
29 28 nn0red k 0 k + 1
30 leloe N k + 1 N k + 1 N < k + 1 N = k + 1
31 27 29 30 syl2an N k 0 N k + 1 N < k + 1 N = k + 1
32 nnnn0 N N 0
33 nn0leltp1 N 0 k 0 N k N < k + 1
34 32 33 sylan N k 0 N k N < k + 1
35 nn0p1nn k 0 k + 1
36 nnmulcl k ! N k + 1 k ! N k + 1
37 35 36 sylan2 k ! N k 0 k ! N k + 1
38 37 expcom k 0 k ! N k ! N k + 1
39 38 adantl N k 0 k ! N k ! N k + 1
40 faccl k 0 k !
41 40 nncnd k 0 k !
42 28 nn0cnd k 0 k + 1
43 nncn N N
44 nnne0 N N 0
45 43 44 jca N N N 0
46 45 adantr N k 0 N N 0
47 div23 k ! k + 1 N N 0 k ! k + 1 N = k ! N k + 1
48 41 42 46 47 syl2an23an N k 0 k ! k + 1 N = k ! N k + 1
49 48 eleq1d N k 0 k ! k + 1 N k ! N k + 1
50 39 49 sylibrd N k 0 k ! N k ! k + 1 N
51 50 imim2d N k 0 N k k ! N N k k ! k + 1 N
52 51 com23 N k 0 N k N k k ! N k ! k + 1 N
53 34 52 sylbird N k 0 N < k + 1 N k k ! N k ! k + 1 N
54 41 adantl N k 0 k !
55 43 adantr N k 0 N
56 44 adantr N k 0 N 0
57 54 55 56 divcan4d N k 0 k ! N N = k !
58 40 adantl N k 0 k !
59 57 58 eqeltrd N k 0 k ! N N
60 oveq2 N = k + 1 k ! N = k ! k + 1
61 60 oveq1d N = k + 1 k ! N N = k ! k + 1 N
62 61 eleq1d N = k + 1 k ! N N k ! k + 1 N
63 59 62 syl5ibcom N k 0 N = k + 1 k ! k + 1 N
64 63 a1dd N k 0 N = k + 1 N k k ! N k ! k + 1 N
65 53 64 jaod N k 0 N < k + 1 N = k + 1 N k k ! N k ! k + 1 N
66 31 65 sylbid N k 0 N k + 1 N k k ! N k ! k + 1 N
67 66 ex N k 0 N k + 1 N k k ! N k ! k + 1 N
68 67 com34 N k 0 N k k ! N N k + 1 k ! k + 1 N
69 68 com12 k 0 N N k k ! N N k + 1 k ! k + 1 N
70 69 imp4d k 0 N N k k ! N N k + 1 k ! k + 1 N
71 facp1 k 0 k + 1 ! = k ! k + 1
72 71 oveq1d k 0 k + 1 ! N = k ! k + 1 N
73 72 eleq1d k 0 k + 1 ! N k ! k + 1 N
74 70 73 sylibrd k 0 N N k k ! N N k + 1 k + 1 ! N
75 74 exp4d k 0 N N k k ! N N k + 1 k + 1 ! N
76 75 a2d k 0 N N k k ! N N N k + 1 k + 1 ! N
77 6 12 18 24 26 76 nn0ind M 0 N N M M ! N
78 77 3imp M 0 N N M M ! N