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

Theorem 3dvdsdec 12009
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 9454 . . . 4  |- ; A B  =  ( (; 1 0  x.  A
)  +  B )
2 9p1e10 9453 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
32eqcomi 2197 . . . . . . 7  |- ; 1 0  =  ( 9  +  1 )
43oveq1i 5929 . . . . . 6  |-  (; 1 0  x.  A
)  =  ( ( 9  +  1 )  x.  A )
5 9cn 9072 . . . . . . 7  |-  9  e.  CC
6 ax-1cn 7967 . . . . . . 7  |-  1  e.  CC
7 3dvdsdec.a . . . . . . . 8  |-  A  e. 
NN0
87nn0cni 9255 . . . . . . 7  |-  A  e.  CC
95, 6, 8adddiri 8032 . . . . . 6  |-  ( ( 9  +  1 )  x.  A )  =  ( ( 9  x.  A )  +  ( 1  x.  A ) )
108mullidi 8024 . . . . . . 7  |-  ( 1  x.  A )  =  A
1110oveq2i 5930 . . . . . 6  |-  ( ( 9  x.  A )  +  ( 1  x.  A ) )  =  ( ( 9  x.  A )  +  A
)
124, 9, 113eqtri 2218 . . . . 5  |-  (; 1 0  x.  A
)  =  ( ( 9  x.  A )  +  A )
1312oveq1i 5929 . . . 4  |-  ( (; 1
0  x.  A )  +  B )  =  ( ( ( 9  x.  A )  +  A )  +  B
)
145, 8mulcli 8026 . . . . 5  |-  ( 9  x.  A )  e.  CC
15 3dvdsdec.b . . . . . 6  |-  B  e. 
NN0
1615nn0cni 9255 . . . . 5  |-  B  e.  CC
1714, 8, 16addassi 8029 . . . 4  |-  ( ( ( 9  x.  A
)  +  A )  +  B )  =  ( ( 9  x.  A )  +  ( A  +  B ) )
181, 13, 173eqtri 2218 . . 3  |- ; A B  =  ( ( 9  x.  A
)  +  ( A  +  B ) )
1918breq2i 4038 . 2  |-  ( 3 
|| ; A B  <->  3  ||  (
( 9  x.  A
)  +  ( A  +  B ) ) )
20 3z 9349 . . 3  |-  3  e.  ZZ
217nn0zi 9342 . . . 4  |-  A  e.  ZZ
2215nn0zi 9342 . . . 4  |-  B  e.  ZZ
23 zaddcl 9360 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  B
)  e.  ZZ )
2421, 22, 23mp2an 426 . . 3  |-  ( A  +  B )  e.  ZZ
25 9nn 9153 . . . . . 6  |-  9  e.  NN
2625nnzi 9341 . . . . 5  |-  9  e.  ZZ
27 zmulcl 9373 . . . . 5  |-  ( ( 9  e.  ZZ  /\  A  e.  ZZ )  ->  ( 9  x.  A
)  e.  ZZ )
2826, 21, 27mp2an 426 . . . 4  |-  ( 9  x.  A )  e.  ZZ
29 zmulcl 9373 . . . . . . 7  |-  ( ( 3  e.  ZZ  /\  A  e.  ZZ )  ->  ( 3  x.  A
)  e.  ZZ )
3020, 21, 29mp2an 426 . . . . . 6  |-  ( 3  x.  A )  e.  ZZ
31 dvdsmul1 11959 . . . . . 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 9142 . . . . . . . 8  |-  ( 3  x.  3 )  =  9
3433eqcomi 2197 . . . . . . 7  |-  9  =  ( 3  x.  3 )
3534oveq1i 5929 . . . . . 6  |-  ( 9  x.  A )  =  ( ( 3  x.  3 )  x.  A
)
36 3cn 9059 . . . . . . 7  |-  3  e.  CC
3736, 36, 8mulassi 8030 . . . . . 6  |-  ( ( 3  x.  3 )  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3835, 37eqtri 2214 . . . . 5  |-  ( 9  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3932, 38breqtrri 4057 . . . 4  |-  3  ||  ( 9  x.  A
)
4028, 39pm3.2i 272 . . 3  |-  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A
) )
41 dvdsadd2b 11986 . . 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 1348 . 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 2164   class class class wbr 4030  (class class class)co 5919   0cc0 7874   1c1 7875    + caddc 7877    x. cmul 7879   3c3 9036   9c9 9042   NN0cn0 9243   ZZcz 9320  ;cdc 9451    || cdvds 11933
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 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2166  ax-14 2167  ax-ext 2175  ax-sep 4148  ax-pow 4204  ax-pr 4239  ax-un 4465  ax-setind 4570  ax-cnex 7965  ax-resscn 7966  ax-1cn 7967  ax-1re 7968  ax-icn 7969  ax-addcl 7970  ax-addrcl 7971  ax-mulcl 7972  ax-mulrcl 7973  ax-addcom 7974  ax-mulcom 7975  ax-addass 7976  ax-mulass 7977  ax-distr 7978  ax-i2m1 7979  ax-0lt1 7980  ax-1rid 7981  ax-0id 7982  ax-rnegex 7983  ax-cnre 7985  ax-pre-ltirr 7986  ax-pre-ltwlin 7987  ax-pre-lttrn 7988  ax-pre-ltadd 7990
This theorem depends on definitions:  df-bi 117  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-nf 1472  df-sb 1774  df-eu 2045  df-mo 2046  df-clab 2180  df-cleq 2186  df-clel 2189  df-nfc 2325  df-ne 2365  df-nel 2460  df-ral 2477  df-rex 2478  df-reu 2479  df-rab 2481  df-v 2762  df-sbc 2987  df-dif 3156  df-un 3158  df-in 3160  df-ss 3167  df-pw 3604  df-sn 3625  df-pr 3626  df-op 3628  df-uni 3837  df-int 3872  df-br 4031  df-opab 4092  df-id 4325  df-xp 4666  df-rel 4667  df-cnv 4668  df-co 4669  df-dm 4670  df-iota 5216  df-fun 5257  df-fv 5263  df-riota 5874  df-ov 5922  df-oprab 5923  df-mpo 5924  df-pnf 8058  df-mnf 8059  df-xr 8060  df-ltxr 8061  df-le 8062  df-sub 8194  df-neg 8195  df-inn 8985  df-2 9043  df-3 9044  df-4 9045  df-5 9046  df-6 9047  df-7 9048  df-8 9049  df-9 9050  df-n0 9244  df-z 9321  df-dec 9452  df-dvds 11934
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator