Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > lcmval | Structured version Visualization version GIF version |
Description: Value of the lcm operator. (𝑀 lcm 𝑁) is the least common multiple of 𝑀 and 𝑁. If either 𝑀 or 𝑁 is 0, the result is defined conventionally as 0. Contrast with df-gcd 16309 and gcdval 16310. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.) |
Ref | Expression |
---|---|
lcmval | ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) = if((𝑀 = 0 ∨ 𝑁 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < ))) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | eqeq1 2741 | . . . 4 ⊢ (𝑥 = 𝑀 → (𝑥 = 0 ↔ 𝑀 = 0)) | |
2 | 1 | orbi1d 915 | . . 3 ⊢ (𝑥 = 𝑀 → ((𝑥 = 0 ∨ 𝑦 = 0) ↔ (𝑀 = 0 ∨ 𝑦 = 0))) |
3 | breq1 5106 | . . . . . 6 ⊢ (𝑥 = 𝑀 → (𝑥 ∥ 𝑛 ↔ 𝑀 ∥ 𝑛)) | |
4 | 3 | anbi1d 631 | . . . . 5 ⊢ (𝑥 = 𝑀 → ((𝑥 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛) ↔ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛))) |
5 | 4 | rabbidv 3413 | . . . 4 ⊢ (𝑥 = 𝑀 → {𝑛 ∈ ℕ ∣ (𝑥 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)} = {𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}) |
6 | 5 | infeq1d 9346 | . . 3 ⊢ (𝑥 = 𝑀 → inf({𝑛 ∈ ℕ ∣ (𝑥 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < ) = inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < )) |
7 | 2, 6 | ifbieq2d 4510 | . 2 ⊢ (𝑥 = 𝑀 → if((𝑥 = 0 ∨ 𝑦 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑥 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < )) = if((𝑀 = 0 ∨ 𝑦 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < ))) |
8 | eqeq1 2741 | . . . 4 ⊢ (𝑦 = 𝑁 → (𝑦 = 0 ↔ 𝑁 = 0)) | |
9 | 8 | orbi2d 914 | . . 3 ⊢ (𝑦 = 𝑁 → ((𝑀 = 0 ∨ 𝑦 = 0) ↔ (𝑀 = 0 ∨ 𝑁 = 0))) |
10 | breq1 5106 | . . . . . 6 ⊢ (𝑦 = 𝑁 → (𝑦 ∥ 𝑛 ↔ 𝑁 ∥ 𝑛)) | |
11 | 10 | anbi2d 630 | . . . . 5 ⊢ (𝑦 = 𝑁 → ((𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛) ↔ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛))) |
12 | 11 | rabbidv 3413 | . . . 4 ⊢ (𝑦 = 𝑁 → {𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)} = {𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}) |
13 | 12 | infeq1d 9346 | . . 3 ⊢ (𝑦 = 𝑁 → inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < ) = inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < )) |
14 | 9, 13 | ifbieq2d 4510 | . 2 ⊢ (𝑦 = 𝑁 → if((𝑀 = 0 ∨ 𝑦 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < )) = if((𝑀 = 0 ∨ 𝑁 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < ))) |
15 | df-lcm 16400 | . 2 ⊢ lcm = (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∨ 𝑦 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑥 ∥ 𝑛 ∧ 𝑦 ∥ 𝑛)}, ℝ, < ))) | |
16 | c0ex 11082 | . . 3 ⊢ 0 ∈ V | |
17 | ltso 11168 | . . . 4 ⊢ < Or ℝ | |
18 | 17 | infex 9362 | . . 3 ⊢ inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < ) ∈ V |
19 | 16, 18 | ifex 4534 | . 2 ⊢ if((𝑀 = 0 ∨ 𝑁 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < )) ∈ V |
20 | 7, 14, 15, 19 | ovmpo 7507 | 1 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) = if((𝑀 = 0 ∨ 𝑁 = 0), 0, inf({𝑛 ∈ ℕ ∣ (𝑀 ∥ 𝑛 ∧ 𝑁 ∥ 𝑛)}, ℝ, < ))) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 397 ∨ wo 845 = wceq 1541 ∈ wcel 2106 {crab 3405 ifcif 4484 class class class wbr 5103 (class class class)co 7349 infcinf 9310 ℝcr 10983 0cc0 10984 < clt 11122 ℕcn 12086 ℤcz 12432 ∥ cdvds 16070 lcm clcm 16398 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1797 ax-4 1811 ax-5 1913 ax-6 1971 ax-7 2011 ax-8 2108 ax-9 2116 ax-10 2137 ax-11 2154 ax-12 2171 ax-ext 2708 ax-sep 5254 ax-nul 5261 ax-pow 5318 ax-pr 5382 ax-un 7662 ax-resscn 11041 ax-1cn 11042 ax-icn 11043 ax-addcl 11044 ax-mulcl 11046 ax-i2m1 11052 ax-pre-lttri 11058 ax-pre-lttrn 11059 |
This theorem depends on definitions: df-bi 206 df-an 398 df-or 846 df-3or 1088 df-3an 1089 df-tru 1544 df-fal 1554 df-ex 1782 df-nf 1786 df-sb 2068 df-mo 2539 df-eu 2568 df-clab 2715 df-cleq 2729 df-clel 2815 df-nfc 2887 df-ne 2942 df-nel 3048 df-ral 3063 df-rex 3072 df-rmo 3351 df-rab 3406 df-v 3445 df-sbc 3738 df-csb 3854 df-dif 3911 df-un 3913 df-in 3915 df-ss 3925 df-nul 4281 df-if 4485 df-pw 4560 df-sn 4585 df-pr 4587 df-op 4591 df-uni 4864 df-br 5104 df-opab 5166 df-mpt 5187 df-id 5528 df-po 5542 df-so 5543 df-xp 5636 df-rel 5637 df-cnv 5638 df-co 5639 df-dm 5640 df-rn 5641 df-res 5642 df-ima 5643 df-iota 6443 df-fun 6493 df-fn 6494 df-f 6495 df-f1 6496 df-fo 6497 df-f1o 6498 df-fv 6499 df-ov 7352 df-oprab 7353 df-mpo 7354 df-er 8581 df-en 8817 df-dom 8818 df-sdom 8819 df-sup 9311 df-inf 9312 df-pnf 11124 df-mnf 11125 df-ltxr 11127 df-lcm 16400 |
This theorem is referenced by: lcmcom 16403 lcm0val 16404 lcmn0val 16405 lcmass 16424 lcmfpr 16437 |
Copyright terms: Public domain | W3C validator |