ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  3dvdsdec GIF version

Theorem 3dvdsdec 12397
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.)
Hypotheses
Ref Expression
3dvdsdec.a 𝐴 ∈ ℕ0
3dvdsdec.b 𝐵 ∈ ℕ0
Assertion
Ref Expression
3dvdsdec (3 ∥ 𝐴𝐵 ↔ 3 ∥ (𝐴 + 𝐵))

Proof of Theorem 3dvdsdec
StepHypRef Expression
1 dfdec10 9597 . . . 4 𝐴𝐵 = ((10 · 𝐴) + 𝐵)
2 9p1e10 9596 . . . . . . . 8 (9 + 1) = 10
32eqcomi 2233 . . . . . . 7 10 = (9 + 1)
43oveq1i 6020 . . . . . 6 (10 · 𝐴) = ((9 + 1) · 𝐴)
5 9cn 9214 . . . . . . 7 9 ∈ ℂ
6 ax-1cn 8108 . . . . . . 7 1 ∈ ℂ
7 3dvdsdec.a . . . . . . . 8 𝐴 ∈ ℕ0
87nn0cni 9397 . . . . . . 7 𝐴 ∈ ℂ
95, 6, 8adddiri 8173 . . . . . 6 ((9 + 1) · 𝐴) = ((9 · 𝐴) + (1 · 𝐴))
108mullidi 8165 . . . . . . 7 (1 · 𝐴) = 𝐴
1110oveq2i 6021 . . . . . 6 ((9 · 𝐴) + (1 · 𝐴)) = ((9 · 𝐴) + 𝐴)
124, 9, 113eqtri 2254 . . . . 5 (10 · 𝐴) = ((9 · 𝐴) + 𝐴)
1312oveq1i 6020 . . . 4 ((10 · 𝐴) + 𝐵) = (((9 · 𝐴) + 𝐴) + 𝐵)
145, 8mulcli 8167 . . . . 5 (9 · 𝐴) ∈ ℂ
15 3dvdsdec.b . . . . . 6 𝐵 ∈ ℕ0
1615nn0cni 9397 . . . . 5 𝐵 ∈ ℂ
1714, 8, 16addassi 8170 . . . 4 (((9 · 𝐴) + 𝐴) + 𝐵) = ((9 · 𝐴) + (𝐴 + 𝐵))
181, 13, 173eqtri 2254 . . 3 𝐴𝐵 = ((9 · 𝐴) + (𝐴 + 𝐵))
1918breq2i 4091 . 2 (3 ∥ 𝐴𝐵 ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵)))
20 3z 9491 . . 3 3 ∈ ℤ
217nn0zi 9484 . . . 4 𝐴 ∈ ℤ
2215nn0zi 9484 . . . 4 𝐵 ∈ ℤ
23 zaddcl 9502 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 + 𝐵) ∈ ℤ)
2421, 22, 23mp2an 426 . . 3 (𝐴 + 𝐵) ∈ ℤ
25 9nn 9295 . . . . . 6 9 ∈ ℕ
2625nnzi 9483 . . . . 5 9 ∈ ℤ
27 zmulcl 9516 . . . . 5 ((9 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (9 · 𝐴) ∈ ℤ)
2826, 21, 27mp2an 426 . . . 4 (9 · 𝐴) ∈ ℤ
29 zmulcl 9516 . . . . . . 7 ((3 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (3 · 𝐴) ∈ ℤ)
3020, 21, 29mp2an 426 . . . . . 6 (3 · 𝐴) ∈ ℤ
31 dvdsmul1 12345 . . . . . 6 ((3 ∈ ℤ ∧ (3 · 𝐴) ∈ ℤ) → 3 ∥ (3 · (3 · 𝐴)))
3220, 30, 31mp2an 426 . . . . 5 3 ∥ (3 · (3 · 𝐴))
33 3t3e9 9284 . . . . . . . 8 (3 · 3) = 9
3433eqcomi 2233 . . . . . . 7 9 = (3 · 3)
3534oveq1i 6020 . . . . . 6 (9 · 𝐴) = ((3 · 3) · 𝐴)
36 3cn 9201 . . . . . . 7 3 ∈ ℂ
3736, 36, 8mulassi 8171 . . . . . 6 ((3 · 3) · 𝐴) = (3 · (3 · 𝐴))
3835, 37eqtri 2250 . . . . 5 (9 · 𝐴) = (3 · (3 · 𝐴))
3932, 38breqtrri 4110 . . . 4 3 ∥ (9 · 𝐴)
4028, 39pm3.2i 272 . . 3 ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴))
41 dvdsadd2b 12372 . . 3 ((3 ∈ ℤ ∧ (𝐴 + 𝐵) ∈ ℤ ∧ ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴))) → (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵))))
4220, 24, 40, 41mp3an 1371 . 2 (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵)))
4319, 42bitr4i 187 1 (3 ∥ 𝐴𝐵 ↔ 3 ∥ (𝐴 + 𝐵))
Colors of variables: wff set class
Syntax hints:  wa 104  wb 105  wcel 2200   class class class wbr 4083  (class class class)co 6010  0cc0 8015  1c1 8016   + caddc 8018   · cmul 8020  3c3 9178  9c9 9184  0cn0 9385  cz 9462  cdc 9594  cdvds 12319
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 617  ax-in2 618  ax-io 714  ax-5 1493  ax-7 1494  ax-gen 1495  ax-ie1 1539  ax-ie2 1540  ax-8 1550  ax-10 1551  ax-11 1552  ax-i12 1553  ax-bndl 1555  ax-4 1556  ax-17 1572  ax-i9 1576  ax-ial 1580  ax-i5r 1581  ax-13 2202  ax-14 2203  ax-ext 2211  ax-sep 4202  ax-pow 4259  ax-pr 4294  ax-un 4525  ax-setind 4630  ax-cnex 8106  ax-resscn 8107  ax-1cn 8108  ax-1re 8109  ax-icn 8110  ax-addcl 8111  ax-addrcl 8112  ax-mulcl 8113  ax-mulrcl 8114  ax-addcom 8115  ax-mulcom 8116  ax-addass 8117  ax-mulass 8118  ax-distr 8119  ax-i2m1 8120  ax-0lt1 8121  ax-1rid 8122  ax-0id 8123  ax-rnegex 8124  ax-cnre 8126  ax-pre-ltirr 8127  ax-pre-ltwlin 8128  ax-pre-lttrn 8129  ax-pre-ltadd 8131
This theorem depends on definitions:  df-bi 117  df-3or 1003  df-3an 1004  df-tru 1398  df-fal 1401  df-nf 1507  df-sb 1809  df-eu 2080  df-mo 2081  df-clab 2216  df-cleq 2222  df-clel 2225  df-nfc 2361  df-ne 2401  df-nel 2496  df-ral 2513  df-rex 2514  df-reu 2515  df-rab 2517  df-v 2801  df-sbc 3029  df-dif 3199  df-un 3201  df-in 3203  df-ss 3210  df-pw 3651  df-sn 3672  df-pr 3673  df-op 3675  df-uni 3889  df-int 3924  df-br 4084  df-opab 4146  df-id 4385  df-xp 4726  df-rel 4727  df-cnv 4728  df-co 4729  df-dm 4730  df-iota 5281  df-fun 5323  df-fv 5329  df-riota 5963  df-ov 6013  df-oprab 6014  df-mpo 6015  df-pnf 8199  df-mnf 8200  df-xr 8201  df-ltxr 8202  df-le 8203  df-sub 8335  df-neg 8336  df-inn 9127  df-2 9185  df-3 9186  df-4 9187  df-5 9188  df-6 9189  df-7 9190  df-8 9191  df-9 9192  df-n0 9386  df-z 9463  df-dec 9595  df-dvds 12320
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator