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

Theorem 3dvdsdec 12342
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 9549 . . . 4 𝐴𝐵 = ((10 · 𝐴) + 𝐵)
2 9p1e10 9548 . . . . . . . 8 (9 + 1) = 10
32eqcomi 2213 . . . . . . 7 10 = (9 + 1)
43oveq1i 5984 . . . . . 6 (10 · 𝐴) = ((9 + 1) · 𝐴)
5 9cn 9166 . . . . . . 7 9 ∈ ℂ
6 ax-1cn 8060 . . . . . . 7 1 ∈ ℂ
7 3dvdsdec.a . . . . . . . 8 𝐴 ∈ ℕ0
87nn0cni 9349 . . . . . . 7 𝐴 ∈ ℂ
95, 6, 8adddiri 8125 . . . . . 6 ((9 + 1) · 𝐴) = ((9 · 𝐴) + (1 · 𝐴))
108mullidi 8117 . . . . . . 7 (1 · 𝐴) = 𝐴
1110oveq2i 5985 . . . . . 6 ((9 · 𝐴) + (1 · 𝐴)) = ((9 · 𝐴) + 𝐴)
124, 9, 113eqtri 2234 . . . . 5 (10 · 𝐴) = ((9 · 𝐴) + 𝐴)
1312oveq1i 5984 . . . 4 ((10 · 𝐴) + 𝐵) = (((9 · 𝐴) + 𝐴) + 𝐵)
145, 8mulcli 8119 . . . . 5 (9 · 𝐴) ∈ ℂ
15 3dvdsdec.b . . . . . 6 𝐵 ∈ ℕ0
1615nn0cni 9349 . . . . 5 𝐵 ∈ ℂ
1714, 8, 16addassi 8122 . . . 4 (((9 · 𝐴) + 𝐴) + 𝐵) = ((9 · 𝐴) + (𝐴 + 𝐵))
181, 13, 173eqtri 2234 . . 3 𝐴𝐵 = ((9 · 𝐴) + (𝐴 + 𝐵))
1918breq2i 4070 . 2 (3 ∥ 𝐴𝐵 ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵)))
20 3z 9443 . . 3 3 ∈ ℤ
217nn0zi 9436 . . . 4 𝐴 ∈ ℤ
2215nn0zi 9436 . . . 4 𝐵 ∈ ℤ
23 zaddcl 9454 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 + 𝐵) ∈ ℤ)
2421, 22, 23mp2an 426 . . 3 (𝐴 + 𝐵) ∈ ℤ
25 9nn 9247 . . . . . 6 9 ∈ ℕ
2625nnzi 9435 . . . . 5 9 ∈ ℤ
27 zmulcl 9468 . . . . 5 ((9 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (9 · 𝐴) ∈ ℤ)
2826, 21, 27mp2an 426 . . . 4 (9 · 𝐴) ∈ ℤ
29 zmulcl 9468 . . . . . . 7 ((3 ∈ ℤ ∧ 𝐴 ∈ ℤ) → (3 · 𝐴) ∈ ℤ)
3020, 21, 29mp2an 426 . . . . . 6 (3 · 𝐴) ∈ ℤ
31 dvdsmul1 12290 . . . . . 6 ((3 ∈ ℤ ∧ (3 · 𝐴) ∈ ℤ) → 3 ∥ (3 · (3 · 𝐴)))
3220, 30, 31mp2an 426 . . . . 5 3 ∥ (3 · (3 · 𝐴))
33 3t3e9 9236 . . . . . . . 8 (3 · 3) = 9
3433eqcomi 2213 . . . . . . 7 9 = (3 · 3)
3534oveq1i 5984 . . . . . 6 (9 · 𝐴) = ((3 · 3) · 𝐴)
36 3cn 9153 . . . . . . 7 3 ∈ ℂ
3736, 36, 8mulassi 8123 . . . . . 6 ((3 · 3) · 𝐴) = (3 · (3 · 𝐴))
3835, 37eqtri 2230 . . . . 5 (9 · 𝐴) = (3 · (3 · 𝐴))
3932, 38breqtrri 4089 . . . 4 3 ∥ (9 · 𝐴)
4028, 39pm3.2i 272 . . 3 ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴))
41 dvdsadd2b 12317 . . 3 ((3 ∈ ℤ ∧ (𝐴 + 𝐵) ∈ ℤ ∧ ((9 · 𝐴) ∈ ℤ ∧ 3 ∥ (9 · 𝐴))) → (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵))))
4220, 24, 40, 41mp3an 1352 . 2 (3 ∥ (𝐴 + 𝐵) ↔ 3 ∥ ((9 · 𝐴) + (𝐴 + 𝐵)))
4319, 42bitr4i 187 1 (3 ∥ 𝐴𝐵 ↔ 3 ∥ (𝐴 + 𝐵))
Colors of variables: wff set class
Syntax hints:  wa 104  wb 105  wcel 2180   class class class wbr 4062  (class class class)co 5974  0cc0 7967  1c1 7968   + caddc 7970   · cmul 7972  3c3 9130  9c9 9136  0cn0 9337  cz 9414  cdc 9546  cdvds 12264
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 713  ax-5 1473  ax-7 1474  ax-gen 1475  ax-ie1 1519  ax-ie2 1520  ax-8 1530  ax-10 1531  ax-11 1532  ax-i12 1533  ax-bndl 1535  ax-4 1536  ax-17 1552  ax-i9 1556  ax-ial 1560  ax-i5r 1561  ax-13 2182  ax-14 2183  ax-ext 2191  ax-sep 4181  ax-pow 4237  ax-pr 4272  ax-un 4501  ax-setind 4606  ax-cnex 8058  ax-resscn 8059  ax-1cn 8060  ax-1re 8061  ax-icn 8062  ax-addcl 8063  ax-addrcl 8064  ax-mulcl 8065  ax-mulrcl 8066  ax-addcom 8067  ax-mulcom 8068  ax-addass 8069  ax-mulass 8070  ax-distr 8071  ax-i2m1 8072  ax-0lt1 8073  ax-1rid 8074  ax-0id 8075  ax-rnegex 8076  ax-cnre 8078  ax-pre-ltirr 8079  ax-pre-ltwlin 8080  ax-pre-lttrn 8081  ax-pre-ltadd 8083
This theorem depends on definitions:  df-bi 117  df-3or 984  df-3an 985  df-tru 1378  df-fal 1381  df-nf 1487  df-sb 1789  df-eu 2060  df-mo 2061  df-clab 2196  df-cleq 2202  df-clel 2205  df-nfc 2341  df-ne 2381  df-nel 2476  df-ral 2493  df-rex 2494  df-reu 2495  df-rab 2497  df-v 2781  df-sbc 3009  df-dif 3179  df-un 3181  df-in 3183  df-ss 3190  df-pw 3631  df-sn 3652  df-pr 3653  df-op 3655  df-uni 3868  df-int 3903  df-br 4063  df-opab 4125  df-id 4361  df-xp 4702  df-rel 4703  df-cnv 4704  df-co 4705  df-dm 4706  df-iota 5254  df-fun 5296  df-fv 5302  df-riota 5927  df-ov 5977  df-oprab 5978  df-mpo 5979  df-pnf 8151  df-mnf 8152  df-xr 8153  df-ltxr 8154  df-le 8155  df-sub 8287  df-neg 8288  df-inn 9079  df-2 9137  df-3 9138  df-4 9139  df-5 9140  df-6 9141  df-7 9142  df-8 9143  df-9 9144  df-n0 9338  df-z 9415  df-dec 9547  df-dvds 12265
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator