Metamath Proof Explorer


Theorem prmfac1

Description: The factorial of a number only contains primes less than the base. (Contributed by Mario Carneiro, 6-Mar-2014)

Ref Expression
Assertion prmfac1 N0PPN!PN

Proof

Step Hyp Ref Expression
1 fveq2 x=0x!=0!
2 1 breq2d x=0Px!P0!
3 breq2 x=0PxP0
4 2 3 imbi12d x=0Px!PxP0!P0
5 4 imbi2d x=0PPx!PxPP0!P0
6 fveq2 x=kx!=k!
7 6 breq2d x=kPx!Pk!
8 breq2 x=kPxPk
9 7 8 imbi12d x=kPx!PxPk!Pk
10 9 imbi2d x=kPPx!PxPPk!Pk
11 fveq2 x=k+1x!=k+1!
12 11 breq2d x=k+1Px!Pk+1!
13 breq2 x=k+1PxPk+1
14 12 13 imbi12d x=k+1Px!PxPk+1!Pk+1
15 14 imbi2d x=k+1PPx!PxPPk+1!Pk+1
16 fveq2 x=Nx!=N!
17 16 breq2d x=NPx!PN!
18 breq2 x=NPxPN
19 17 18 imbi12d x=NPx!PxPN!PN
20 19 imbi2d x=NPPx!PxPPN!PN
21 fac0 0!=1
22 21 breq2i P0!P1
23 nprmdvds1 P¬P1
24 23 pm2.21d PP1P0
25 22 24 biimtrid PP0!P0
26 facp1 k0k+1!=k!k+1
27 26 adantr k0Pk+1!=k!k+1
28 27 breq2d k0PPk+1!Pk!k+1
29 simpr k0PP
30 faccl k0k!
31 30 adantr k0Pk!
32 31 nnzd k0Pk!
33 nn0p1nn k0k+1
34 33 adantr k0Pk+1
35 34 nnzd k0Pk+1
36 euclemma Pk!k+1Pk!k+1Pk!Pk+1
37 29 32 35 36 syl3anc k0PPk!k+1Pk!Pk+1
38 28 37 bitrd k0PPk+1!Pk!Pk+1
39 nn0re k0k
40 39 adantr k0Pk
41 40 lep1d k0Pkk+1
42 prmz PP
43 42 adantl k0PP
44 43 zred k0PP
45 34 nnred k0Pk+1
46 letr Pkk+1Pkkk+1Pk+1
47 44 40 45 46 syl3anc k0PPkkk+1Pk+1
48 41 47 mpan2d k0PPkPk+1
49 48 imim2d k0PPk!PkPk!Pk+1
50 49 com23 k0PPk!Pk!PkPk+1
51 dvdsle Pk+1Pk+1Pk+1
52 43 34 51 syl2anc k0PPk+1Pk+1
53 52 a1dd k0PPk+1Pk!PkPk+1
54 50 53 jaod k0PPk!Pk+1Pk!PkPk+1
55 38 54 sylbid k0PPk+1!Pk!PkPk+1
56 55 com23 k0PPk!PkPk+1!Pk+1
57 56 ex k0PPk!PkPk+1!Pk+1
58 57 a2d k0PPk!PkPPk+1!Pk+1
59 5 10 15 20 25 58 nn0ind N0PPN!PN
60 59 3imp N0PPN!PN