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 12554 | . . . 4 ⊢ ;𝐴𝐵 = ((;10 · 𝐴) + 𝐵) | |
2 | 9p1e10 12553 | . . . . . . . 8 ⊢ (9 + 1) = ;10 | |
3 | 2 | eqcomi 2747 | . . . . . . 7 ⊢ ;10 = (9 + 1) |
4 | 3 | oveq1i 7360 | . . . . . 6 ⊢ (;10 · 𝐴) = ((9 + 1) · 𝐴) |
5 | 9cn 12187 | . . . . . . 7 ⊢ 9 ∈ ℂ | |
6 | ax-1cn 11043 | . . . . . . 7 ⊢ 1 ∈ ℂ | |
7 | 3dvdsdec.a | . . . . . . . 8 ⊢ 𝐴 ∈ ℕ0 | |
8 | 7 | nn0cni 12359 | . . . . . . 7 ⊢ 𝐴 ∈ ℂ |
9 | 5, 6, 8 | adddiri 11102 | . . . . . 6 ⊢ ((9 + 1) · 𝐴) = ((9 · 𝐴) + (1 · 𝐴)) |
10 | 8 | mulid2i 11094 | . . . . . . 7 ⊢ (1 · 𝐴) = 𝐴 |
11 | 10 | oveq2i 7361 | . . . . . 6 ⊢ ((9 · 𝐴) + (1 · 𝐴)) = ((9 · 𝐴) + 𝐴) |
12 | 4, 9, 11 | 3eqtri 2770 | . . . . 5 ⊢ (;10 · 𝐴) = ((9 · 𝐴) + 𝐴) |
13 | 12 | oveq1i 7360 | . . . 4 ⊢ ((;10 · 𝐴) + 𝐵) = (((9 · 𝐴) + 𝐴) + 𝐵) |
14 | 5, 8 | mulcli 11096 | . . . . 5 ⊢ (9 · 𝐴) ∈ ℂ |
15 | 3dvdsdec.b | . . . . . 6 ⊢ 𝐵 ∈ ℕ0 | |
16 | 15 | nn0cni 12359 | . . . . 5 ⊢ 𝐵 ∈ ℂ |
17 | 14, 8, 16 | addassi 11099 | . . . 4 ⊢ (((9 · 𝐴) + 𝐴) + 𝐵) = ((9 · 𝐴) + (𝐴 + 𝐵)) |
18 | 1, 13, 17 | 3eqtri 2770 | . . 3 ⊢ ;𝐴𝐵 = ((9 · 𝐴) + (𝐴 + 𝐵)) |
19 | 18 | breq2i 5112 | . 2 ⊢ (3 ∥ ;𝐴𝐵 ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵))) |
20 | 3z 12467 | . . 3 ⊢ 3 ∈ ℤ | |
21 | 7 | nn0zi 12459 | . . . 4 ⊢ 𝐴 ∈ ℤ |
22 | 15 | nn0zi 12459 | . . . 4 ⊢ 𝐵 ∈ ℤ |
23 | zaddcl 12474 | . . . 4 ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 + 𝐵) ∈ ℤ) | |
24 | 21, 22, 23 | mp2an 691 | . . 3 ⊢ (𝐴 + 𝐵) ∈ ℤ |
25 | 9nn 12185 | . . . . . 6 ⊢ 9 ∈ ℕ | |
26 | 25 | nnzi 12458 | . . . . 5 ⊢ 9 ∈ ℤ |
27 | zmulcl 12483 | . . . . 5 ⊢ ((9 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (9 · 𝐴) ∈ ℤ) | |
28 | 26, 21, 27 | mp2an 691 | . . . 4 ⊢ (9 · 𝐴) ∈ ℤ |
29 | zmulcl 12483 | . . . . . . 7 ⊢ ((3 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (3 · 𝐴) ∈ ℤ) | |
30 | 20, 21, 29 | mp2an 691 | . . . . . 6 ⊢ (3 · 𝐴) ∈ ℤ |
31 | dvdsmul1 16095 | . . . . . 6 ⊢ ((3 ∈ ℤ ∧ (3 · 𝐴) ∈ ℤ) → 3 ∥ (3 · (3 · 𝐴))) | |
32 | 20, 30, 31 | mp2an 691 | . . . . 5 ⊢ 3 ∥ (3 · (3 · 𝐴)) |
33 | 3t3e9 12254 | . . . . . . . 8 ⊢ (3 · 3) = 9 | |
34 | 33 | eqcomi 2747 | . . . . . . 7 ⊢ 9 = (3 · 3) |
35 | 34 | oveq1i 7360 | . . . . . 6 ⊢ (9 · 𝐴) = ((3 · 3) · 𝐴) |
36 | 3cn 12168 | . . . . . . 7 ⊢ 3 ∈ ℂ | |
37 | 36, 36, 8 | mulassi 11100 | . . . . . 6 ⊢ ((3 · 3) · 𝐴) = (3 · (3 · 𝐴)) |
38 | 35, 37 | eqtri 2766 | . . . . 5 ⊢ (9 · 𝐴) = (3 · (3 · 𝐴)) |
39 | 32, 38 | breqtrri 5131 | . . . 4 ⊢ 3 ∥ (9 · 𝐴) |
40 | 28, 39 | pm3.2i 472 | . . 3 ⊢ ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴)) |
41 | dvdsadd2b 16123 | . . 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 5104 (class class class)co 7350 0cc0 10985 1c1 10986 + caddc 10988 · cmul 10990 3c3 12143 9c9 12149 ℕ0cn0 12347 ℤcz 12433 ;cdc 12551 ∥ cdvds 16071 |
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 2709 ax-sep 5255 ax-nul 5262 ax-pow 5319 ax-pr 5383 ax-un 7663 ax-resscn 11042 ax-1cn 11043 ax-icn 11044 ax-addcl 11045 ax-addrcl 11046 ax-mulcl 11047 ax-mulrcl 11048 ax-mulcom 11049 ax-addass 11050 ax-mulass 11051 ax-distr 11052 ax-i2m1 11053 ax-1ne0 11054 ax-1rid 11055 ax-rnegex 11056 ax-rrecex 11057 ax-cnre 11058 ax-pre-lttri 11059 ax-pre-lttrn 11060 ax-pre-ltadd 11061 ax-pre-mulgt0 11062 |
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 2540 df-eu 2569 df-clab 2716 df-cleq 2730 df-clel 2816 df-nfc 2888 df-ne 2943 df-nel 3049 df-ral 3064 df-rex 3073 df-reu 3353 df-rab 3407 df-v 3446 df-sbc 3739 df-csb 3855 df-dif 3912 df-un 3914 df-in 3916 df-ss 3926 df-pss 3928 df-nul 4282 df-if 4486 df-pw 4561 df-sn 4586 df-pr 4588 df-op 4592 df-uni 4865 df-iun 4955 df-br 5105 df-opab 5167 df-mpt 5188 df-tr 5222 df-id 5529 df-eprel 5535 df-po 5543 df-so 5544 df-fr 5586 df-we 5588 df-xp 5637 df-rel 5638 df-cnv 5639 df-co 5640 df-dm 5641 df-rn 5642 df-res 5643 df-ima 5644 df-pred 6250 df-ord 6317 df-on 6318 df-lim 6319 df-suc 6320 df-iota 6444 df-fun 6494 df-fn 6495 df-f 6496 df-f1 6497 df-fo 6498 df-f1o 6499 df-fv 6500 df-riota 7306 df-ov 7353 df-oprab 7354 df-mpo 7355 df-om 7794 df-2nd 7913 df-frecs 8180 df-wrecs 8211 df-recs 8285 df-rdg 8324 df-er 8582 df-en 8818 df-dom 8819 df-sdom 8820 df-pnf 11125 df-mnf 11126 df-xr 11127 df-ltxr 11128 df-le 11129 df-sub 11321 df-neg 11322 df-nn 12088 df-2 12150 df-3 12151 df-4 12152 df-5 12153 df-6 12154 df-7 12155 df-8 12156 df-9 12157 df-n0 12348 df-z 12434 df-dec 12552 df-dvds 16072 |
This theorem is referenced by: 257prm 45453 139prmALT 45488 31prm 45489 |
Copyright terms: Public domain | W3C validator |