Metamath Proof Explorer


Theorem prmgaplcm

Description: Alternate proof of prmgap : in contrast to prmgap , where the gap starts at n! , the factorial of n, the gap starts at the least common multiple of all positive integers less than or equal to n. (Contributed by AV, 13-Aug-2020) (Revised by AV, 27-Aug-2020) (Proof modification is discouraged.) (New usage is discouraged.)

Ref Expression
Assertion prmgaplcm npqnqpzp+1..^qz

Proof

Step Hyp Ref Expression
1 id nn
2 fzssz 1x
3 2 a1i x1x
4 fzfi 1xFin
5 4 a1i x1xFin
6 0nelfz1 01x
7 6 a1i x01x
8 lcmfn0cl 1x1xFin01xlcm_1x
9 3 5 7 8 syl3anc xlcm_1x
10 9 adantl nxlcm_1x
11 eqid xlcm_1x=xlcm_1x
12 10 11 fmptd nxlcm_1x:
13 nnex V
14 13 13 pm3.2i VV
15 elmapg VVxlcm_1xxlcm_1x:
16 14 15 mp1i nxlcm_1xxlcm_1x:
17 12 16 mpbird nxlcm_1x
18 prmgaplcmlem2 ni2n1<lcm_1n+igcdi
19 eqidd ni2nxlcm_1x=xlcm_1x
20 oveq2 x=n1x=1n
21 20 fveq2d x=nlcm_1x=lcm_1n
22 21 adantl ni2nx=nlcm_1x=lcm_1n
23 simpl ni2nn
24 fzssz 1n
25 fzfi 1nFin
26 24 25 pm3.2i 1n1nFin
27 lcmfcl 1n1nFinlcm_1n0
28 26 27 mp1i ni2nlcm_1n0
29 19 22 23 28 fvmptd ni2nxlcm_1xn=lcm_1n
30 29 oveq1d ni2nxlcm_1xn+i=lcm_1n+i
31 30 oveq1d ni2nxlcm_1xn+igcdi=lcm_1n+igcdi
32 18 31 breqtrrd ni2n1<xlcm_1xn+igcdi
33 32 ralrimiva ni2n1<xlcm_1xn+igcdi
34 1 17 33 prmgaplem8 npqnqpzp+1..^qz
35 34 rgen npqnqpzp+1..^qz