Metamath Proof Explorer


Theorem lcmeq0

Description: The lcm of two integers is zero iff either is zero. (Contributed by Steve Rodriguez, 20-Jan-2020)

Ref Expression
Assertion lcmeq0 M N M lcm N = 0 M = 0 N = 0

Proof

Step Hyp Ref Expression
1 lcmn0cl M N ¬ M = 0 N = 0 M lcm N
2 1 nnne0d M N ¬ M = 0 N = 0 M lcm N 0
3 2 ex M N ¬ M = 0 N = 0 M lcm N 0
4 3 necon4bd M N M lcm N = 0 M = 0 N = 0
5 oveq1 M = 0 M lcm N = 0 lcm N
6 0z 0
7 lcmcom N 0 N lcm 0 = 0 lcm N
8 6 7 mpan2 N N lcm 0 = 0 lcm N
9 lcm0val N N lcm 0 = 0
10 8 9 eqtr3d N 0 lcm N = 0
11 5 10 sylan9eqr N M = 0 M lcm N = 0
12 11 adantll M N M = 0 M lcm N = 0
13 oveq2 N = 0 M lcm N = M lcm 0
14 lcm0val M M lcm 0 = 0
15 13 14 sylan9eqr M N = 0 M lcm N = 0
16 15 adantlr M N N = 0 M lcm N = 0
17 12 16 jaodan M N M = 0 N = 0 M lcm N = 0
18 17 ex M N M = 0 N = 0 M lcm N = 0
19 4 18 impbid M N M lcm N = 0 M = 0 N = 0