Metamath Proof Explorer


Theorem prmdvdsprmo

Description: The primorial of a number is divisible by each prime less then or equal to the number. (Contributed by AV, 15-Aug-2020) (Revised by AV, 28-Aug-2020)

Ref Expression
Assertion prmdvdsprmo N p p N p # p N

Proof

Step Hyp Ref Expression
1 fzfi 1 N Fin
2 diffi 1 N Fin 1 N p Fin
3 1 2 mp1i N p p N 1 N p Fin
4 eldifi k 1 N p k 1 N
5 elfzelz k 1 N k
6 4 5 syl k 1 N p k
7 1zzd k 1 N p 1
8 6 7 ifcld k 1 N p if k k 1
9 8 adantl N p p N k 1 N p if k k 1
10 3 9 fprodzcl N p p N k 1 N p if k k 1
11 prmz p p
12 11 adantl N p p
13 12 adantr N p p N p
14 dvdsmul2 k 1 N p if k k 1 p p k 1 N p if k k 1 p
15 10 13 14 syl2anc N p p N p k 1 N p if k k 1 p
16 nnnn0 N N 0
17 prmoval N 0 # p N = k = 1 N if k k 1
18 16 17 syl N # p N = k = 1 N if k k 1
19 18 ad2antrr N p p N # p N = k = 1 N if k k 1
20 19 breq2d N p p N p # p N p k = 1 N if k k 1
21 neldifsnd N p p N ¬ p 1 N p
22 disjsn 1 N p p = ¬ p 1 N p
23 21 22 sylibr N p p N 1 N p p =
24 prmnn p p
25 24 adantl N p p
26 25 anim1i N p p N p p N
27 nnz N N
28 fznn N p 1 N p p N
29 27 28 syl N p 1 N p p N
30 29 ad2antrr N p p N p 1 N p p N
31 26 30 mpbird N p p N p 1 N
32 difsnid p 1 N 1 N p p = 1 N
33 32 eqcomd p 1 N 1 N = 1 N p p
34 31 33 syl N p p N 1 N = 1 N p p
35 fzfid N p p N 1 N Fin
36 1zzd k 1 N 1
37 5 36 ifcld k 1 N if k k 1
38 37 zcnd k 1 N if k k 1
39 38 adantl N p p N k 1 N if k k 1
40 23 34 35 39 fprodsplit N p p N k = 1 N if k k 1 = k 1 N p if k k 1 k p if k k 1
41 simplr N p p N p
42 25 adantr N p p N p
43 42 nncnd N p p N p
44 1cnd N p p N 1
45 43 44 ifcld N p p N if p p 1
46 eleq1w k = p k p
47 id k = p k = p
48 46 47 ifbieq1d k = p if k k 1 = if p p 1
49 48 prodsn p if p p 1 k p if k k 1 = if p p 1
50 41 45 49 syl2anc N p p N k p if k k 1 = if p p 1
51 simpr N p p
52 51 iftrued N p if p p 1 = p
53 52 adantr N p p N if p p 1 = p
54 50 53 eqtrd N p p N k p if k k 1 = p
55 54 oveq2d N p p N k 1 N p if k k 1 k p if k k 1 = k 1 N p if k k 1 p
56 40 55 eqtrd N p p N k = 1 N if k k 1 = k 1 N p if k k 1 p
57 56 breq2d N p p N p k = 1 N if k k 1 p k 1 N p if k k 1 p
58 20 57 bitrd N p p N p # p N p k 1 N p if k k 1 p
59 15 58 mpbird N p p N p # p N
60 59 ex N p p N p # p N
61 60 ralrimiva N p p N p # p N