Metamath Proof Explorer


Theorem infpnlem1

Description: Lemma for infpn . The smallest divisor (greater than 1) M of N ! + 1 is a prime greater than N . (Contributed by NM, 5-May-2005)

Ref Expression
Hypothesis infpnlem.1 K = N ! + 1
Assertion infpnlem1 N M 1 < M K M j 1 < j K j M j N < M j M j j = 1 j = M

Proof

Step Hyp Ref Expression
1 infpnlem.1 K = N ! + 1
2 nnre M M
3 nnre N N
4 lenlt M N M N ¬ N < M
5 2 3 4 syl2anr N M M N ¬ N < M
6 5 adantr N M 1 < M M N ¬ N < M
7 nnnn0 N N 0
8 facndiv N 0 M 1 < M M N ¬ N ! + 1 M
9 1 oveq1i K M = N ! + 1 M
10 nnz K M K M
11 9 10 eqeltrrid K M N ! + 1 M
12 8 11 nsyl N 0 M 1 < M M N ¬ K M
13 7 12 sylanl1 N M 1 < M M N ¬ K M
14 13 expr N M 1 < M M N ¬ K M
15 6 14 sylbird N M 1 < M ¬ N < M ¬ K M
16 15 con4d N M 1 < M K M N < M
17 16 expimpd N M 1 < M K M N < M
18 17 adantrd N M 1 < M K M j 1 < j K j M j N < M
19 7 faccld N N !
20 19 peano2nnd N N ! + 1
21 1 20 eqeltrid N K
22 21 nncnd N K
23 nndivtr j M K M j K M K j
24 23 ex j M K M j K M K j
25 24 3com13 K M j M j K M K j
26 25 3expa K M j M j K M K j
27 22 26 sylanl1 N M j M j K M K j
28 27 adantrl N M j M j M j K M K j
29 nnre j j
30 letri3 j M j = M j M M j
31 29 2 30 syl2an j M j = M j M M j
32 31 biimprd j M j M M j j = M
33 32 exp4b j M j M M j j = M
34 33 com3l M j M j M j j = M
35 34 imp32 M j M j M j j = M
36 35 adantll N M j M j M j j = M
37 36 imim2d N M j M j 1 < j K j M j 1 < j K j j = M
38 37 com23 N M j M j 1 < j K j 1 < j K j M j j = M
39 28 38 sylan2d N M j M j 1 < j M j K M 1 < j K j M j j = M
40 39 exp4d N M j M j 1 < j M j K M 1 < j K j M j j = M
41 40 com24 N M j M j K M M j 1 < j 1 < j K j M j j = M
42 41 exp32 N M j M j K M M j 1 < j 1 < j K j M j j = M
43 42 com24 N M K M j j M M j 1 < j 1 < j K j M j j = M
44 43 imp31 N M K M j j M M j 1 < j 1 < j K j M j j = M
45 44 com14 1 < j j M M j N M K M j 1 < j K j M j j = M
46 45 3imp 1 < j j M M j N M K M j 1 < j K j M j j = M
47 46 com3l N M K M j 1 < j K j M j 1 < j j M M j j = M
48 47 ralimdva N M K M j 1 < j K j M j j 1 < j j M M j j = M
49 48 ex N M K M j 1 < j K j M j j 1 < j j M M j j = M
50 49 adantld N M 1 < M K M j 1 < j K j M j j 1 < j j M M j j = M
51 50 impd N M 1 < M K M j 1 < j K j M j j 1 < j j M M j j = M
52 prime M j M j j = 1 j = M j 1 < j j M M j j = M
53 52 adantl N M j M j j = 1 j = M j 1 < j j M M j j = M
54 51 53 sylibrd N M 1 < M K M j 1 < j K j M j j M j j = 1 j = M
55 18 54 jcad N M 1 < M K M j 1 < j K j M j N < M j M j j = 1 j = M