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

Theorem 3dvdsdec 10790
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  A and  B actually are digits (i.e. nonnegative integers less than 10). However, this theorem holds for arbitrary nonnegative integers  A and  B, especially if  A is itself a decimal number, e.g.  A  = ; C D. (Contributed by AV, 14-Jun-2021.) (Revised by AV, 8-Sep-2021.)
Hypotheses
Ref Expression
3dvdsdec.a  |-  A  e. 
NN0
3dvdsdec.b  |-  B  e. 
NN0
Assertion
Ref Expression
3dvdsdec  |-  ( 3 
|| ; A B  <->  3  ||  ( A  +  B )
)

Proof of Theorem 3dvdsdec
StepHypRef Expression
1 dfdec10 8815 . . . 4  |- ; A B  =  ( (; 1 0  x.  A
)  +  B )
2 9p1e10 8814 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
32eqcomi 2089 . . . . . . 7  |- ; 1 0  =  ( 9  +  1 )
43oveq1i 5625 . . . . . 6  |-  (; 1 0  x.  A
)  =  ( ( 9  +  1 )  x.  A )
5 9cn 8448 . . . . . . 7  |-  9  e.  CC
6 ax-1cn 7385 . . . . . . 7  |-  1  e.  CC
7 3dvdsdec.a . . . . . . . 8  |-  A  e. 
NN0
87nn0cni 8621 . . . . . . 7  |-  A  e.  CC
95, 6, 8adddiri 7446 . . . . . 6  |-  ( ( 9  +  1 )  x.  A )  =  ( ( 9  x.  A )  +  ( 1  x.  A ) )
108mulid2i 7438 . . . . . . 7  |-  ( 1  x.  A )  =  A
1110oveq2i 5626 . . . . . 6  |-  ( ( 9  x.  A )  +  ( 1  x.  A ) )  =  ( ( 9  x.  A )  +  A
)
124, 9, 113eqtri 2109 . . . . 5  |-  (; 1 0  x.  A
)  =  ( ( 9  x.  A )  +  A )
1312oveq1i 5625 . . . 4  |-  ( (; 1
0  x.  A )  +  B )  =  ( ( ( 9  x.  A )  +  A )  +  B
)
145, 8mulcli 7440 . . . . 5  |-  ( 9  x.  A )  e.  CC
15 3dvdsdec.b . . . . . 6  |-  B  e. 
NN0
1615nn0cni 8621 . . . . 5  |-  B  e.  CC
1714, 8, 16addassi 7443 . . . 4  |-  ( ( ( 9  x.  A
)  +  A )  +  B )  =  ( ( 9  x.  A )  +  ( A  +  B ) )
181, 13, 173eqtri 2109 . . 3  |- ; A B  =  ( ( 9  x.  A
)  +  ( A  +  B ) )
1918breq2i 3830 . 2  |-  ( 3 
|| ; A B  <->  3  ||  (
( 9  x.  A
)  +  ( A  +  B ) ) )
20 3z 8715 . . 3  |-  3  e.  ZZ
217nn0zi 8708 . . . 4  |-  A  e.  ZZ
2215nn0zi 8708 . . . 4  |-  B  e.  ZZ
23 zaddcl 8726 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  B
)  e.  ZZ )
2421, 22, 23mp2an 417 . . 3  |-  ( A  +  B )  e.  ZZ
25 9nn 8521 . . . . . 6  |-  9  e.  NN
2625nnzi 8707 . . . . 5  |-  9  e.  ZZ
27 zmulcl 8739 . . . . 5  |-  ( ( 9  e.  ZZ  /\  A  e.  ZZ )  ->  ( 9  x.  A
)  e.  ZZ )
2826, 21, 27mp2an 417 . . . 4  |-  ( 9  x.  A )  e.  ZZ
29 zmulcl 8739 . . . . . . 7  |-  ( ( 3  e.  ZZ  /\  A  e.  ZZ )  ->  ( 3  x.  A
)  e.  ZZ )
3020, 21, 29mp2an 417 . . . . . 6  |-  ( 3  x.  A )  e.  ZZ
31 dvdsmul1 10743 . . . . . 6  |-  ( ( 3  e.  ZZ  /\  ( 3  x.  A
)  e.  ZZ )  ->  3  ||  (
3  x.  ( 3  x.  A ) ) )
3220, 30, 31mp2an 417 . . . . 5  |-  3  ||  ( 3  x.  (
3  x.  A ) )
33 3t3e9 8510 . . . . . . . 8  |-  ( 3  x.  3 )  =  9
3433eqcomi 2089 . . . . . . 7  |-  9  =  ( 3  x.  3 )
3534oveq1i 5625 . . . . . 6  |-  ( 9  x.  A )  =  ( ( 3  x.  3 )  x.  A
)
36 3cn 8435 . . . . . . 7  |-  3  e.  CC
3736, 36, 8mulassi 7444 . . . . . 6  |-  ( ( 3  x.  3 )  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3835, 37eqtri 2105 . . . . 5  |-  ( 9  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3932, 38breqtrri 3847 . . . 4  |-  3  ||  ( 9  x.  A
)
4028, 39pm3.2i 266 . . 3  |-  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A
) )
41 dvdsadd2b 10768 . . 3  |-  ( ( 3  e.  ZZ  /\  ( A  +  B
)  e.  ZZ  /\  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A ) ) )  ->  ( 3 
||  ( A  +  B )  <->  3  ||  ( ( 9  x.  A )  +  ( A  +  B ) ) ) )
4220, 24, 40, 41mp3an 1271 . 2  |-  ( 3 
||  ( A  +  B )  <->  3  ||  ( ( 9  x.  A )  +  ( A  +  B ) ) )
4319, 42bitr4i 185 1  |-  ( 3 
|| ; A B  <->  3  ||  ( A  +  B )
)
Colors of variables: wff set class
Syntax hints:    /\ wa 102    <-> wb 103    e. wcel 1436   class class class wbr 3822  (class class class)co 5615   0cc0 7297   1c1 7298    + caddc 7300    x. cmul 7302   3c3 8411   9c9 8417   NN0cn0 8609   ZZcz 8686  ;cdc 8812    || cdvds 10721
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1379  ax-7 1380  ax-gen 1381  ax-ie1 1425  ax-ie2 1426  ax-8 1438  ax-10 1439  ax-11 1440  ax-i12 1441  ax-bndl 1442  ax-4 1443  ax-13 1447  ax-14 1448  ax-17 1462  ax-i9 1466  ax-ial 1470  ax-i5r 1471  ax-ext 2067  ax-sep 3934  ax-pow 3986  ax-pr 4012  ax-un 4236  ax-setind 4328  ax-cnex 7383  ax-resscn 7384  ax-1cn 7385  ax-1re 7386  ax-icn 7387  ax-addcl 7388  ax-addrcl 7389  ax-mulcl 7390  ax-mulrcl 7391  ax-addcom 7392  ax-mulcom 7393  ax-addass 7394  ax-mulass 7395  ax-distr 7396  ax-i2m1 7397  ax-0lt1 7398  ax-1rid 7399  ax-0id 7400  ax-rnegex 7401  ax-cnre 7403  ax-pre-ltirr 7404  ax-pre-ltwlin 7405  ax-pre-lttrn 7406  ax-pre-ltadd 7408
This theorem depends on definitions:  df-bi 115  df-3or 923  df-3an 924  df-tru 1290  df-fal 1293  df-nf 1393  df-sb 1690  df-eu 1948  df-mo 1949  df-clab 2072  df-cleq 2078  df-clel 2081  df-nfc 2214  df-ne 2252  df-nel 2347  df-ral 2360  df-rex 2361  df-reu 2362  df-rab 2364  df-v 2617  df-sbc 2830  df-dif 2990  df-un 2992  df-in 2994  df-ss 3001  df-pw 3417  df-sn 3437  df-pr 3438  df-op 3440  df-uni 3639  df-int 3674  df-br 3823  df-opab 3877  df-id 4096  df-xp 4419  df-rel 4420  df-cnv 4421  df-co 4422  df-dm 4423  df-iota 4948  df-fun 4985  df-fv 4991  df-riota 5571  df-ov 5618  df-oprab 5619  df-mpt2 5620  df-pnf 7471  df-mnf 7472  df-xr 7473  df-ltxr 7474  df-le 7475  df-sub 7602  df-neg 7603  df-inn 8361  df-2 8419  df-3 8420  df-4 8421  df-5 8422  df-6 8423  df-7 8424  df-8 8425  df-9 8426  df-n0 8610  df-z 8687  df-dec 8813  df-dvds 10722
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator