![]() |
Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > 3dvdsdec | Structured version Visualization version GIF version |
Description: A decimal number is divisible by three iff the sum of its two "digits" is divisible by three. The term "digits" in its narrow sense is only correct if 𝐴 and 𝐵 actually are digits (i.e. nonnegative integers less than 10). However, this theorem holds for arbitrary nonnegative integers 𝐴 and 𝐵, especially if 𝐴 is itself a decimal number, e.g., 𝐴 = ;𝐶𝐷. (Contributed by AV, 14-Jun-2021.) (Revised by AV, 8-Sep-2021.) |
Ref | Expression |
---|---|
3dvdsdec.a | ⊢ 𝐴 ∈ ℕ0 |
3dvdsdec.b | ⊢ 𝐵 ∈ ℕ0 |
Ref | Expression |
---|---|
3dvdsdec | ⊢ (3 ∥ ;𝐴𝐵 ↔ 3 ∥ (𝐴 + 𝐵)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | dfdec10 12667 | . . . 4 ⊢ ;𝐴𝐵 = ((;10 · 𝐴) + 𝐵) | |
2 | 9p1e10 12666 | . . . . . . . 8 ⊢ (9 + 1) = ;10 | |
3 | 2 | eqcomi 2742 | . . . . . . 7 ⊢ ;10 = (9 + 1) |
4 | 3 | oveq1i 7406 | . . . . . 6 ⊢ (;10 · 𝐴) = ((9 + 1) · 𝐴) |
5 | 9cn 12299 | . . . . . . 7 ⊢ 9 ∈ ℂ | |
6 | ax-1cn 11155 | . . . . . . 7 ⊢ 1 ∈ ℂ | |
7 | 3dvdsdec.a | . . . . . . . 8 ⊢ 𝐴 ∈ ℕ0 | |
8 | 7 | nn0cni 12471 | . . . . . . 7 ⊢ 𝐴 ∈ ℂ |
9 | 5, 6, 8 | adddiri 11214 | . . . . . 6 ⊢ ((9 + 1) · 𝐴) = ((9 · 𝐴) + (1 · 𝐴)) |
10 | 8 | mullidi 11206 | . . . . . . 7 ⊢ (1 · 𝐴) = 𝐴 |
11 | 10 | oveq2i 7407 | . . . . . 6 ⊢ ((9 · 𝐴) + (1 · 𝐴)) = ((9 · 𝐴) + 𝐴) |
12 | 4, 9, 11 | 3eqtri 2765 | . . . . 5 ⊢ (;10 · 𝐴) = ((9 · 𝐴) + 𝐴) |
13 | 12 | oveq1i 7406 | . . . 4 ⊢ ((;10 · 𝐴) + 𝐵) = (((9 · 𝐴) + 𝐴) + 𝐵) |
14 | 5, 8 | mulcli 11208 | . . . . 5 ⊢ (9 · 𝐴) ∈ ℂ |
15 | 3dvdsdec.b | . . . . . 6 ⊢ 𝐵 ∈ ℕ0 | |
16 | 15 | nn0cni 12471 | . . . . 5 ⊢ 𝐵 ∈ ℂ |
17 | 14, 8, 16 | addassi 11211 | . . . 4 ⊢ (((9 · 𝐴) + 𝐴) + 𝐵) = ((9 · 𝐴) + (𝐴 + 𝐵)) |
18 | 1, 13, 17 | 3eqtri 2765 | . . 3 ⊢ ;𝐴𝐵 = ((9 · 𝐴) + (𝐴 + 𝐵)) |
19 | 18 | breq2i 5152 | . 2 ⊢ (3 ∥ ;𝐴𝐵 ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵))) |
20 | 3z 12582 | . . 3 ⊢ 3 ∈ ℤ | |
21 | 7 | nn0zi 12574 | . . . 4 ⊢ 𝐴 ∈ ℤ |
22 | 15 | nn0zi 12574 | . . . 4 ⊢ 𝐵 ∈ ℤ |
23 | zaddcl 12589 | . . . 4 ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 + 𝐵) ∈ ℤ) | |
24 | 21, 22, 23 | mp2an 691 | . . 3 ⊢ (𝐴 + 𝐵) ∈ ℤ |
25 | 9nn 12297 | . . . . . 6 ⊢ 9 ∈ ℕ | |
26 | 25 | nnzi 12573 | . . . . 5 ⊢ 9 ∈ ℤ |
27 | zmulcl 12598 | . . . . 5 ⊢ ((9 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (9 · 𝐴) ∈ ℤ) | |
28 | 26, 21, 27 | mp2an 691 | . . . 4 ⊢ (9 · 𝐴) ∈ ℤ |
29 | zmulcl 12598 | . . . . . . 7 ⊢ ((3 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (3 · 𝐴) ∈ ℤ) | |
30 | 20, 21, 29 | mp2an 691 | . . . . . 6 ⊢ (3 · 𝐴) ∈ ℤ |
31 | dvdsmul1 16208 | . . . . . 6 ⊢ ((3 ∈ ℤ ∧ (3 · 𝐴) ∈ ℤ) → 3 ∥ (3 · (3 · 𝐴))) | |
32 | 20, 30, 31 | mp2an 691 | . . . . 5 ⊢ 3 ∥ (3 · (3 · 𝐴)) |
33 | 3t3e9 12366 | . . . . . . . 8 ⊢ (3 · 3) = 9 | |
34 | 33 | eqcomi 2742 | . . . . . . 7 ⊢ 9 = (3 · 3) |
35 | 34 | oveq1i 7406 | . . . . . 6 ⊢ (9 · 𝐴) = ((3 · 3) · 𝐴) |
36 | 3cn 12280 | . . . . . . 7 ⊢ 3 ∈ ℂ | |
37 | 36, 36, 8 | mulassi 11212 | . . . . . 6 ⊢ ((3 · 3) · 𝐴) = (3 · (3 · 𝐴)) |
38 | 35, 37 | eqtri 2761 | . . . . 5 ⊢ (9 · 𝐴) = (3 · (3 · 𝐴)) |
39 | 32, 38 | breqtrri 5171 | . . . 4 ⊢ 3 ∥ (9 · 𝐴) |
40 | 28, 39 | pm3.2i 472 | . . 3 ⊢ ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴)) |
41 | dvdsadd2b 16236 | . . 3 ⊢ ((3 ∈ ℤ ∧ (𝐴 + 𝐵) ∈ ℤ ∧ ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴))) → (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵)))) | |
42 | 20, 24, 40, 41 | mp3an 1462 | . 2 ⊢ (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵))) |
43 | 19, 42 | bitr4i 278 | 1 ⊢ (3 ∥ ;𝐴𝐵 ↔ 3 ∥ (𝐴 + 𝐵)) |
Colors of variables: wff setvar class |
Syntax hints: ↔ wb 205 ∧ wa 397 ∈ wcel 2107 class class class wbr 5144 (class class class)co 7396 0cc0 11097 1c1 11098 + caddc 11100 · cmul 11102 3c3 12255 9c9 12261 ℕ0cn0 12459 ℤcz 12545 ;cdc 12664 ∥ cdvds 16184 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1798 ax-4 1812 ax-5 1914 ax-6 1972 ax-7 2012 ax-8 2109 ax-9 2117 ax-10 2138 ax-11 2155 ax-12 2172 ax-ext 2704 ax-sep 5295 ax-nul 5302 ax-pow 5359 ax-pr 5423 ax-un 7712 ax-resscn 11154 ax-1cn 11155 ax-icn 11156 ax-addcl 11157 ax-addrcl 11158 ax-mulcl 11159 ax-mulrcl 11160 ax-mulcom 11161 ax-addass 11162 ax-mulass 11163 ax-distr 11164 ax-i2m1 11165 ax-1ne0 11166 ax-1rid 11167 ax-rnegex 11168 ax-rrecex 11169 ax-cnre 11170 ax-pre-lttri 11171 ax-pre-lttrn 11172 ax-pre-ltadd 11173 ax-pre-mulgt0 11174 |
This theorem depends on definitions: df-bi 206 df-an 398 df-or 847 df-3or 1089 df-3an 1090 df-tru 1545 df-fal 1555 df-ex 1783 df-nf 1787 df-sb 2069 df-mo 2535 df-eu 2564 df-clab 2711 df-cleq 2725 df-clel 2811 df-nfc 2886 df-ne 2942 df-nel 3048 df-ral 3063 df-rex 3072 df-reu 3378 df-rab 3434 df-v 3477 df-sbc 3776 df-csb 3892 df-dif 3949 df-un 3951 df-in 3953 df-ss 3963 df-pss 3965 df-nul 4321 df-if 4525 df-pw 4600 df-sn 4625 df-pr 4627 df-op 4631 df-uni 4905 df-iun 4995 df-br 5145 df-opab 5207 df-mpt 5228 df-tr 5262 df-id 5570 df-eprel 5576 df-po 5584 df-so 5585 df-fr 5627 df-we 5629 df-xp 5678 df-rel 5679 df-cnv 5680 df-co 5681 df-dm 5682 df-rn 5683 df-res 5684 df-ima 5685 df-pred 6292 df-ord 6359 df-on 6360 df-lim 6361 df-suc 6362 df-iota 6487 df-fun 6537 df-fn 6538 df-f 6539 df-f1 6540 df-fo 6541 df-f1o 6542 df-fv 6543 df-riota 7352 df-ov 7399 df-oprab 7400 df-mpo 7401 df-om 7843 df-2nd 7963 df-frecs 8253 df-wrecs 8284 df-recs 8358 df-rdg 8397 df-er 8691 df-en 8928 df-dom 8929 df-sdom 8930 df-pnf 11237 df-mnf 11238 df-xr 11239 df-ltxr 11240 df-le 11241 df-sub 11433 df-neg 11434 df-nn 12200 df-2 12262 df-3 12263 df-4 12264 df-5 12265 df-6 12266 df-7 12267 df-8 12268 df-9 12269 df-n0 12460 df-z 12546 df-dec 12665 df-dvds 16185 |
This theorem is referenced by: 257prm 46102 139prmALT 46137 31prm 46138 |
Copyright terms: Public domain | W3C validator |