Zulip Chat Archive

Stream: Is there code for X?

Topic: lcm_pos_pos


Xavier Xarles (Apr 25 2022 at 17:00):

Do we have the following?

theorem lcm_pos_pos {m n : } (hm : 0<m ) (hn : 0<n ) : 0<lcm m n :=
begin
  have hmn:=mul_pos hm hn,
  rw (nat.gcd_mul_lcm m n) at hmn,
  have hg: 0gcd m n:=dec_trivial,
  exact pos_of_mul_pos_left hmn hg,
end

Riccardo Brasca (Apr 25 2022 at 17:02):

We have docs#nat.lcm_ne_zero that is essentially what you want.

Riccardo Brasca (Apr 25 2022 at 17:05):

So

theorem lcm_pos_pos {m n : } (hm : 0<m ) (hn : 0<n ) : 0 < lcm m n :=
nat.pos_of_ne_zero $ nat.lcm_ne_zero hm.ne' hn.ne'

should work (untested).


Last updated: Dec 20 2023 at 11:08 UTC