Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 27a777b

Browse files
committed
feat(data/nat/gcd): coprime.lcm_eq_mul (#9761)
Surprisingly, this result doesn't seem to be present yet. Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
1 parent 5dbe8c4 commit 27a777b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/data/nat/gcd.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ instance (m n : ℕ) : decidable (coprime m n) := by unfold coprime; apply_insta
218218

219219
theorem coprime_iff_gcd_eq_one {m n : ℕ} : coprime m n ↔ gcd m n = 1 := iff.rfl
220220

221-
theorem coprime.gcd_eq_one {m n : ℕ} : coprime m n → gcd m n = 1 := id
221+
theorem coprime.gcd_eq_one {m n : ℕ} (h : coprime m n) : gcd m n = 1 := h
222+
223+
theorem coprime.lcm_eq_mul {m n : ℕ} (h : coprime m n) : lcm m n = m * n :=
224+
by rw [←one_mul (lcm m n), ←h.gcd_eq_one, gcd_mul_lcm]
222225

223226
theorem coprime.symm {m n : ℕ} : coprime n m → coprime m n := (gcd_comm m n).trans
224227

0 commit comments

Comments
 (0)