Metamath Proof Explorer


Theorem lcmcom

Description: The lcm operator is commutative. (Contributed by Steve Rodriguez, 20-Jan-2020) (Proof shortened by AV, 16-Sep-2020)

Ref Expression
Assertion lcmcom M N M lcm N = N lcm M

Proof

Step Hyp Ref Expression
1 orcom M = 0 N = 0 N = 0 M = 0
2 ancom M n N n N n M n
3 2 rabbii n | M n N n = n | N n M n
4 3 infeq1i sup n | M n N n < = sup n | N n M n <
5 1 4 ifbieq2i if M = 0 N = 0 0 sup n | M n N n < = if N = 0 M = 0 0 sup n | N n M n <
6 lcmval M N M lcm N = if M = 0 N = 0 0 sup n | M n N n <
7 lcmval N M N lcm M = if N = 0 M = 0 0 sup n | N n M n <
8 7 ancoms M N N lcm M = if N = 0 M = 0 0 sup n | N n M n <
9 5 6 8 3eqtr4a M N M lcm N = N lcm M