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

Theorem 3dvdsdec 12610
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 9759 . . . 4  |- ; A B  =  ( (; 1 0  x.  A
)  +  B )
2 9p1e10 9758 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
32eqcomi 2242 . . . . . . 7  |- ; 1 0  =  ( 9  +  1 )
43oveq1i 6085 . . . . . 6  |-  (; 1 0  x.  A
)  =  ( ( 9  +  1 )  x.  A )
5 9cn 9371 . . . . . . 7  |-  9  e.  CC
6 ax-1cn 8262 . . . . . . 7  |-  1  e.  CC
7 3dvdsdec.a . . . . . . . 8  |-  A  e. 
NN0
87nn0cni 9554 . . . . . . 7  |-  A  e.  CC
95, 6, 8adddiri 8327 . . . . . 6  |-  ( ( 9  +  1 )  x.  A )  =  ( ( 9  x.  A )  +  ( 1  x.  A ) )
108mullidi 8319 . . . . . . 7  |-  ( 1  x.  A )  =  A
1110oveq2i 6086 . . . . . 6  |-  ( ( 9  x.  A )  +  ( 1  x.  A ) )  =  ( ( 9  x.  A )  +  A
)
124, 9, 113eqtri 2263 . . . . 5  |-  (; 1 0  x.  A
)  =  ( ( 9  x.  A )  +  A )
1312oveq1i 6085 . . . 4  |-  ( (; 1
0  x.  A )  +  B )  =  ( ( ( 9  x.  A )  +  A )  +  B
)
145, 8mulcli 8321 . . . . 5  |-  ( 9  x.  A )  e.  CC
15 3dvdsdec.b . . . . . 6  |-  B  e. 
NN0
1615nn0cni 9554 . . . . 5  |-  B  e.  CC
1714, 8, 16addassi 8324 . . . 4  |-  ( ( ( 9  x.  A
)  +  A )  +  B )  =  ( ( 9  x.  A )  +  ( A  +  B ) )
181, 13, 173eqtri 2263 . . 3  |- ; A B  =  ( ( 9  x.  A
)  +  ( A  +  B ) )
1918breq2i 4133 . 2  |-  ( 3 
|| ; A B  <->  3  ||  (
( 9  x.  A
)  +  ( A  +  B ) ) )
20 3z 9652 . . 3  |-  3  e.  ZZ
217nn0zi 9645 . . . 4  |-  A  e.  ZZ
2215nn0zi 9645 . . . 4  |-  B  e.  ZZ
23 zaddcl 9663 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  B
)  e.  ZZ )
2421, 22, 23mp2an 430 . . 3  |-  ( A  +  B )  e.  ZZ
25 9nn 9452 . . . . . 6  |-  9  e.  NN
2625nnzi 9644 . . . . 5  |-  9  e.  ZZ
27 zmulcl 9677 . . . . 5  |-  ( ( 9  e.  ZZ  /\  A  e.  ZZ )  ->  ( 9  x.  A
)  e.  ZZ )
2826, 21, 27mp2an 430 . . . 4  |-  ( 9  x.  A )  e.  ZZ
29 zmulcl 9677 . . . . . . 7  |-  ( ( 3  e.  ZZ  /\  A  e.  ZZ )  ->  ( 3  x.  A
)  e.  ZZ )
3020, 21, 29mp2an 430 . . . . . 6  |-  ( 3  x.  A )  e.  ZZ
31 dvdsmul1 12558 . . . . . 6  |-  ( ( 3  e.  ZZ  /\  ( 3  x.  A
)  e.  ZZ )  ->  3  ||  (
3  x.  ( 3  x.  A ) ) )
3220, 30, 31mp2an 430 . . . . 5  |-  3  ||  ( 3  x.  (
3  x.  A ) )
33 3t3e9 9441 . . . . . . . 8  |-  ( 3  x.  3 )  =  9
3433eqcomi 2242 . . . . . . 7  |-  9  =  ( 3  x.  3 )
3534oveq1i 6085 . . . . . 6  |-  ( 9  x.  A )  =  ( ( 3  x.  3 )  x.  A
)
36 3cn 9358 . . . . . . 7  |-  3  e.  CC
3736, 36, 8mulassi 8325 . . . . . 6  |-  ( ( 3  x.  3 )  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3835, 37eqtri 2259 . . . . 5  |-  ( 9  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3932, 38breqtrri 4152 . . . 4  |-  3  ||  ( 9  x.  A
)
4028, 39pm3.2i 272 . . 3  |-  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A
) )
41 dvdsadd2b 12585 . . 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 1378 . 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 2209   class class class wbr 4125  (class class class)co 6075   0cc0 8169   1c1 8170    + caddc 8172    x. cmul 8174   3c3 9335   9c9 9341   NN0cn0 9542   ZZcz 9623  ;cdc 9756    || cdvds 12532
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 623  ax-in2 624  ax-io 721  ax-5 1500  ax-7 1501  ax-gen 1502  ax-ie1 1546  ax-ie2 1547  ax-8 1557  ax-10 1558  ax-11 1559  ax-i12 1560  ax-bndl 1562  ax-4 1563  ax-17 1579  ax-i9 1583  ax-ial 1587  ax-i5r 1588  ax-14 2212  ax-ext 2220  ax-sep 4244  ax-pow 4306  ax-pr 4341  ax-un 4573  ax-setind 4679  ax-cnex 8260  ax-resscn 8261  ax-1cn 8262  ax-1re 8263  ax-icn 8264  ax-addcl 8265  ax-addrcl 8266  ax-mulcl 8267  ax-mulrcl 8268  ax-addcom 8269  ax-mulcom 8270  ax-addass 8271  ax-mulass 8272  ax-distr 8273  ax-i2m1 8274  ax-0lt1 8275  ax-1rid 8276  ax-0id 8277  ax-rnegex 8278  ax-cnre 8280  ax-pre-ltirr 8281  ax-pre-ltwlin 8282  ax-pre-lttrn 8283  ax-pre-ltadd 8285
This theorem depends on definitions:  df-bi 117  df-3or 1010  df-3an 1011  df-tru 1405  df-fal 1408  df-nf 1514  df-sb 1816  df-eu 2089  df-mo 2090  df-clab 2225  df-cleq 2231  df-clel 2234  df-nfc 2381  df-ne 2421  df-nel 2516  df-ral 2533  df-rex 2534  df-reu 2535  df-rab 2537  df-v 2823  df-sbc 3052  df-dif 3222  df-un 3224  df-in 3226  df-ss 3233  df-pw 3687  df-sn 3711  df-pr 3712  df-op 3714  df-uni 3931  df-int 3966  df-br 4126  df-opab 4188  df-id 4433  df-xp 4775  df-rel 4776  df-cnv 4777  df-co 4778  df-dm 4779  df-iota 5332  df-fun 5374  df-fv 5380  df-riota 6028  df-ov 6078  df-oprab 6079  df-mpo 6080  df-pnf 8352  df-mnf 8353  df-xr 8354  df-ltxr 8355  df-le 8356  df-sub 8489  df-neg 8490  df-inn 9284  df-2 9342  df-3 9343  df-4 9344  df-5 9345  df-6 9346  df-7 9347  df-8 9348  df-9 9349  df-n0 9543  df-z 9624  df-dec 9757  df-dvds 12533
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator