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

Theorem 3dvdsdec 12095
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 9489 . . . 4  |- ; A B  =  ( (; 1 0  x.  A
)  +  B )
2 9p1e10 9488 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
32eqcomi 2208 . . . . . . 7  |- ; 1 0  =  ( 9  +  1 )
43oveq1i 5944 . . . . . 6  |-  (; 1 0  x.  A
)  =  ( ( 9  +  1 )  x.  A )
5 9cn 9106 . . . . . . 7  |-  9  e.  CC
6 ax-1cn 8000 . . . . . . 7  |-  1  e.  CC
7 3dvdsdec.a . . . . . . . 8  |-  A  e. 
NN0
87nn0cni 9289 . . . . . . 7  |-  A  e.  CC
95, 6, 8adddiri 8065 . . . . . 6  |-  ( ( 9  +  1 )  x.  A )  =  ( ( 9  x.  A )  +  ( 1  x.  A ) )
108mullidi 8057 . . . . . . 7  |-  ( 1  x.  A )  =  A
1110oveq2i 5945 . . . . . 6  |-  ( ( 9  x.  A )  +  ( 1  x.  A ) )  =  ( ( 9  x.  A )  +  A
)
124, 9, 113eqtri 2229 . . . . 5  |-  (; 1 0  x.  A
)  =  ( ( 9  x.  A )  +  A )
1312oveq1i 5944 . . . 4  |-  ( (; 1
0  x.  A )  +  B )  =  ( ( ( 9  x.  A )  +  A )  +  B
)
145, 8mulcli 8059 . . . . 5  |-  ( 9  x.  A )  e.  CC
15 3dvdsdec.b . . . . . 6  |-  B  e. 
NN0
1615nn0cni 9289 . . . . 5  |-  B  e.  CC
1714, 8, 16addassi 8062 . . . 4  |-  ( ( ( 9  x.  A
)  +  A )  +  B )  =  ( ( 9  x.  A )  +  ( A  +  B ) )
181, 13, 173eqtri 2229 . . 3  |- ; A B  =  ( ( 9  x.  A
)  +  ( A  +  B ) )
1918breq2i 4051 . 2  |-  ( 3 
|| ; A B  <->  3  ||  (
( 9  x.  A
)  +  ( A  +  B ) ) )
20 3z 9383 . . 3  |-  3  e.  ZZ
217nn0zi 9376 . . . 4  |-  A  e.  ZZ
2215nn0zi 9376 . . . 4  |-  B  e.  ZZ
23 zaddcl 9394 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  B
)  e.  ZZ )
2421, 22, 23mp2an 426 . . 3  |-  ( A  +  B )  e.  ZZ
25 9nn 9187 . . . . . 6  |-  9  e.  NN
2625nnzi 9375 . . . . 5  |-  9  e.  ZZ
27 zmulcl 9408 . . . . 5  |-  ( ( 9  e.  ZZ  /\  A  e.  ZZ )  ->  ( 9  x.  A
)  e.  ZZ )
2826, 21, 27mp2an 426 . . . 4  |-  ( 9  x.  A )  e.  ZZ
29 zmulcl 9408 . . . . . . 7  |-  ( ( 3  e.  ZZ  /\  A  e.  ZZ )  ->  ( 3  x.  A
)  e.  ZZ )
3020, 21, 29mp2an 426 . . . . . 6  |-  ( 3  x.  A )  e.  ZZ
31 dvdsmul1 12043 . . . . . 6  |-  ( ( 3  e.  ZZ  /\  ( 3  x.  A
)  e.  ZZ )  ->  3  ||  (
3  x.  ( 3  x.  A ) ) )
3220, 30, 31mp2an 426 . . . . 5  |-  3  ||  ( 3  x.  (
3  x.  A ) )
33 3t3e9 9176 . . . . . . . 8  |-  ( 3  x.  3 )  =  9
3433eqcomi 2208 . . . . . . 7  |-  9  =  ( 3  x.  3 )
3534oveq1i 5944 . . . . . 6  |-  ( 9  x.  A )  =  ( ( 3  x.  3 )  x.  A
)
36 3cn 9093 . . . . . . 7  |-  3  e.  CC
3736, 36, 8mulassi 8063 . . . . . 6  |-  ( ( 3  x.  3 )  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3835, 37eqtri 2225 . . . . 5  |-  ( 9  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3932, 38breqtrri 4070 . . . 4  |-  3  ||  ( 9  x.  A
)
4028, 39pm3.2i 272 . . 3  |-  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A
) )
41 dvdsadd2b 12070 . . 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 1349 . 2  |-  ( 3 
||  ( A  +  B )  <->  3  ||  ( ( 9  x.  A )  +  ( A  +  B ) ) )
4319, 42bitr4i 187 1  |-  ( 3 
|| ; A B  <->  3  ||  ( A  +  B )
)
Colors of variables: wff set class
Syntax hints:    /\ wa 104    <-> wb 105    e. wcel 2175   class class class wbr 4043  (class class class)co 5934   0cc0 7907   1c1 7908    + caddc 7910    x. cmul 7912   3c3 9070   9c9 9076   NN0cn0 9277   ZZcz 9354  ;cdc 9486    || cdvds 12017
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 615  ax-in2 616  ax-io 710  ax-5 1469  ax-7 1470  ax-gen 1471  ax-ie1 1515  ax-ie2 1516  ax-8 1526  ax-10 1527  ax-11 1528  ax-i12 1529  ax-bndl 1531  ax-4 1532  ax-17 1548  ax-i9 1552  ax-ial 1556  ax-i5r 1557  ax-13 2177  ax-14 2178  ax-ext 2186  ax-sep 4161  ax-pow 4217  ax-pr 4252  ax-un 4478  ax-setind 4583  ax-cnex 7998  ax-resscn 7999  ax-1cn 8000  ax-1re 8001  ax-icn 8002  ax-addcl 8003  ax-addrcl 8004  ax-mulcl 8005  ax-mulrcl 8006  ax-addcom 8007  ax-mulcom 8008  ax-addass 8009  ax-mulass 8010  ax-distr 8011  ax-i2m1 8012  ax-0lt1 8013  ax-1rid 8014  ax-0id 8015  ax-rnegex 8016  ax-cnre 8018  ax-pre-ltirr 8019  ax-pre-ltwlin 8020  ax-pre-lttrn 8021  ax-pre-ltadd 8023
This theorem depends on definitions:  df-bi 117  df-3or 981  df-3an 982  df-tru 1375  df-fal 1378  df-nf 1483  df-sb 1785  df-eu 2056  df-mo 2057  df-clab 2191  df-cleq 2197  df-clel 2200  df-nfc 2336  df-ne 2376  df-nel 2471  df-ral 2488  df-rex 2489  df-reu 2490  df-rab 2492  df-v 2773  df-sbc 2998  df-dif 3167  df-un 3169  df-in 3171  df-ss 3178  df-pw 3617  df-sn 3638  df-pr 3639  df-op 3641  df-uni 3850  df-int 3885  df-br 4044  df-opab 4105  df-id 4338  df-xp 4679  df-rel 4680  df-cnv 4681  df-co 4682  df-dm 4683  df-iota 5229  df-fun 5270  df-fv 5276  df-riota 5889  df-ov 5937  df-oprab 5938  df-mpo 5939  df-pnf 8091  df-mnf 8092  df-xr 8093  df-ltxr 8094  df-le 8095  df-sub 8227  df-neg 8228  df-inn 9019  df-2 9077  df-3 9078  df-4 9079  df-5 9080  df-6 9081  df-7 9082  df-8 9083  df-9 9084  df-n0 9278  df-z 9355  df-dec 9487  df-dvds 12018
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator