Metamath Proof Explorer


Theorem lcmfval

Description: Value of the _lcm function. ( _lcmZ ) is the least common multiple of the integers contained in the finite subset of integers Z . If at least one of the elements of Z is 0 , the result is defined conventionally as 0 . (Contributed by AV, 21-Apr-2020) (Revised by AV, 16-Sep-2020)

Ref Expression
Assertion lcmfval Z Z Fin lcm _ Z = if 0 Z 0 sup n | m Z m n <

Proof

Step Hyp Ref Expression
1 df-lcmf lcm _ = z 𝒫 if 0 z 0 sup n | m z m n <
2 eleq2 z = Z 0 z 0 Z
3 raleq z = Z m z m n m Z m n
4 3 rabbidv z = Z n | m z m n = n | m Z m n
5 4 infeq1d z = Z sup n | m z m n < = sup n | m Z m n <
6 2 5 ifbieq2d z = Z if 0 z 0 sup n | m z m n < = if 0 Z 0 sup n | m Z m n <
7 zex V
8 7 ssex Z Z V
9 elpwg Z V Z 𝒫 Z
10 8 9 syl Z Z 𝒫 Z
11 10 ibir Z Z 𝒫
12 11 adantr Z Z Fin Z 𝒫
13 0nn0 0 0
14 13 a1i Z Z Fin 0 Z 0 0
15 df-nel 0 Z ¬ 0 Z
16 ssrab2 n | m Z m n
17 nnssnn0 0
18 16 17 sstri n | m Z m n 0
19 nnuz = 1
20 16 19 sseqtri n | m Z m n 1
21 fissn0dvdsn0 Z Z Fin 0 Z n | m Z m n
22 21 3expa Z Z Fin 0 Z n | m Z m n
23 infssuzcl n | m Z m n 1 n | m Z m n sup n | m Z m n < n | m Z m n
24 20 22 23 sylancr Z Z Fin 0 Z sup n | m Z m n < n | m Z m n
25 18 24 sselid Z Z Fin 0 Z sup n | m Z m n < 0
26 15 25 sylan2br Z Z Fin ¬ 0 Z sup n | m Z m n < 0
27 14 26 ifclda Z Z Fin if 0 Z 0 sup n | m Z m n < 0
28 1 6 12 27 fvmptd3 Z Z Fin lcm _ Z = if 0 Z 0 sup n | m Z m n <