Metamath Proof Explorer


Theorem ex-lcm

Description: Example for df-lcm . (Contributed by AV, 5-Sep-2021)

Ref Expression
Assertion ex-lcm
|- ( 6 lcm 9 ) = ; 1 8

Proof

Step Hyp Ref Expression
1 6nn
 |-  6 e. NN
2 9nn
 |-  9 e. NN
3 1 2 nnmulcli
 |-  ( 6 x. 9 ) e. NN
4 3 nncni
 |-  ( 6 x. 9 ) e. CC
5 1 nnzi
 |-  6 e. ZZ
6 2 nnzi
 |-  9 e. ZZ
7 5 6 pm3.2i
 |-  ( 6 e. ZZ /\ 9 e. ZZ )
8 lcmcl
 |-  ( ( 6 e. ZZ /\ 9 e. ZZ ) -> ( 6 lcm 9 ) e. NN0 )
9 8 nn0cnd
 |-  ( ( 6 e. ZZ /\ 9 e. ZZ ) -> ( 6 lcm 9 ) e. CC )
10 7 9 ax-mp
 |-  ( 6 lcm 9 ) e. CC
11 neggcd
 |-  ( ( 6 e. ZZ /\ 9 e. ZZ ) -> ( -u 6 gcd 9 ) = ( 6 gcd 9 ) )
12 7 11 ax-mp
 |-  ( -u 6 gcd 9 ) = ( 6 gcd 9 )
13 12 eqcomi
 |-  ( 6 gcd 9 ) = ( -u 6 gcd 9 )
14 ex-gcd
 |-  ( -u 6 gcd 9 ) = 3
15 13 14 eqtri
 |-  ( 6 gcd 9 ) = 3
16 3cn
 |-  3 e. CC
17 15 16 eqeltri
 |-  ( 6 gcd 9 ) e. CC
18 3ne0
 |-  3 =/= 0
19 15 18 eqnetri
 |-  ( 6 gcd 9 ) =/= 0
20 17 19 pm3.2i
 |-  ( ( 6 gcd 9 ) e. CC /\ ( 6 gcd 9 ) =/= 0 )
21 1 2 pm3.2i
 |-  ( 6 e. NN /\ 9 e. NN )
22 lcmgcdnn
 |-  ( ( 6 e. NN /\ 9 e. NN ) -> ( ( 6 lcm 9 ) x. ( 6 gcd 9 ) ) = ( 6 x. 9 ) )
23 21 22 mp1i
 |-  ( ( ( 6 x. 9 ) e. CC /\ ( 6 lcm 9 ) e. CC /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