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

Theorem 3dvdsdec 12425
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 9613 . . . 4  |- ; A B  =  ( (; 1 0  x.  A
)  +  B )
2 9p1e10 9612 . . . . . . . 8  |-  ( 9  +  1 )  = ; 1
0
32eqcomi 2235 . . . . . . 7  |- ; 1 0  =  ( 9  +  1 )
43oveq1i 6027 . . . . . 6  |-  (; 1 0  x.  A
)  =  ( ( 9  +  1 )  x.  A )
5 9cn 9230 . . . . . . 7  |-  9  e.  CC
6 ax-1cn 8124 . . . . . . 7  |-  1  e.  CC
7 3dvdsdec.a . . . . . . . 8  |-  A  e. 
NN0
87nn0cni 9413 . . . . . . 7  |-  A  e.  CC
95, 6, 8adddiri 8189 . . . . . 6  |-  ( ( 9  +  1 )  x.  A )  =  ( ( 9  x.  A )  +  ( 1  x.  A ) )
108mullidi 8181 . . . . . . 7  |-  ( 1  x.  A )  =  A
1110oveq2i 6028 . . . . . 6  |-  ( ( 9  x.  A )  +  ( 1  x.  A ) )  =  ( ( 9  x.  A )  +  A
)
124, 9, 113eqtri 2256 . . . . 5  |-  (; 1 0  x.  A
)  =  ( ( 9  x.  A )  +  A )
1312oveq1i 6027 . . . 4  |-  ( (; 1
0  x.  A )  +  B )  =  ( ( ( 9  x.  A )  +  A )  +  B
)
145, 8mulcli 8183 . . . . 5  |-  ( 9  x.  A )  e.  CC
15 3dvdsdec.b . . . . . 6  |-  B  e. 
NN0
1615nn0cni 9413 . . . . 5  |-  B  e.  CC
1714, 8, 16addassi 8186 . . . 4  |-  ( ( ( 9  x.  A
)  +  A )  +  B )  =  ( ( 9  x.  A )  +  ( A  +  B ) )
181, 13, 173eqtri 2256 . . 3  |- ; A B  =  ( ( 9  x.  A
)  +  ( A  +  B ) )
1918breq2i 4096 . 2  |-  ( 3 
|| ; A B  <->  3  ||  (
( 9  x.  A
)  +  ( A  +  B ) ) )
20 3z 9507 . . 3  |-  3  e.  ZZ
217nn0zi 9500 . . . 4  |-  A  e.  ZZ
2215nn0zi 9500 . . . 4  |-  B  e.  ZZ
23 zaddcl 9518 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  +  B
)  e.  ZZ )
2421, 22, 23mp2an 426 . . 3  |-  ( A  +  B )  e.  ZZ
25 9nn 9311 . . . . . 6  |-  9  e.  NN
2625nnzi 9499 . . . . 5  |-  9  e.  ZZ
27 zmulcl 9532 . . . . 5  |-  ( ( 9  e.  ZZ  /\  A  e.  ZZ )  ->  ( 9  x.  A
)  e.  ZZ )
2826, 21, 27mp2an 426 . . . 4  |-  ( 9  x.  A )  e.  ZZ
29 zmulcl 9532 . . . . . . 7  |-  ( ( 3  e.  ZZ  /\  A  e.  ZZ )  ->  ( 3  x.  A
)  e.  ZZ )
3020, 21, 29mp2an 426 . . . . . 6  |-  ( 3  x.  A )  e.  ZZ
31 dvdsmul1 12373 . . . . . 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 9300 . . . . . . . 8  |-  ( 3  x.  3 )  =  9
3433eqcomi 2235 . . . . . . 7  |-  9  =  ( 3  x.  3 )
3534oveq1i 6027 . . . . . 6  |-  ( 9  x.  A )  =  ( ( 3  x.  3 )  x.  A
)
36 3cn 9217 . . . . . . 7  |-  3  e.  CC
3736, 36, 8mulassi 8187 . . . . . 6  |-  ( ( 3  x.  3 )  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3835, 37eqtri 2252 . . . . 5  |-  ( 9  x.  A )  =  ( 3  x.  (
3  x.  A ) )
3932, 38breqtrri 4115 . . . 4  |-  3  ||  ( 9  x.  A
)
4028, 39pm3.2i 272 . . 3  |-  ( ( 9  x.  A )  e.  ZZ  /\  3  ||  ( 9  x.  A
) )
41 dvdsadd2b 12400 . . 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 1373 . 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 2202   class class class wbr 4088  (class class class)co 6017   0cc0 8031   1c1 8032    + caddc 8034    x. cmul 8036   3c3 9194   9c9 9200   NN0cn0 9401   ZZcz 9478  ;cdc 9610    || cdvds 12347
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 619  ax-in2 620  ax-io 716  ax-5 1495  ax-7 1496  ax-gen 1497  ax-ie1 1541  ax-ie2 1542  ax-8 1552  ax-10 1553  ax-11 1554  ax-i12 1555  ax-bndl 1557  ax-4 1558  ax-17 1574  ax-i9 1578  ax-ial 1582  ax-i5r 1583  ax-13 2204  ax-14 2205  ax-ext 2213  ax-sep 4207  ax-pow 4264  ax-pr 4299  ax-un 4530  ax-setind 4635  ax-cnex 8122  ax-resscn 8123  ax-1cn 8124  ax-1re 8125  ax-icn 8126  ax-addcl 8127  ax-addrcl 8128  ax-mulcl 8129  ax-mulrcl 8130  ax-addcom 8131  ax-mulcom 8132  ax-addass 8133  ax-mulass 8134  ax-distr 8135  ax-i2m1 8136  ax-0lt1 8137  ax-1rid 8138  ax-0id 8139  ax-rnegex 8140  ax-cnre 8142  ax-pre-ltirr 8143  ax-pre-ltwlin 8144  ax-pre-lttrn 8145  ax-pre-ltadd 8147
This theorem depends on definitions:  df-bi 117  df-3or 1005  df-3an 1006  df-tru 1400  df-fal 1403  df-nf 1509  df-sb 1811  df-eu 2082  df-mo 2083  df-clab 2218  df-cleq 2224  df-clel 2227  df-nfc 2363  df-ne 2403  df-nel 2498  df-ral 2515  df-rex 2516  df-reu 2517  df-rab 2519  df-v 2804  df-sbc 3032  df-dif 3202  df-un 3204  df-in 3206  df-ss 3213  df-pw 3654  df-sn 3675  df-pr 3676  df-op 3678  df-uni 3894  df-int 3929  df-br 4089  df-opab 4151  df-id 4390  df-xp 4731  df-rel 4732  df-cnv 4733  df-co 4734  df-dm 4735  df-iota 5286  df-fun 5328  df-fv 5334  df-riota 5970  df-ov 6020  df-oprab 6021  df-mpo 6022  df-pnf 8215  df-mnf 8216  df-xr 8217  df-ltxr 8218  df-le 8219  df-sub 8351  df-neg 8352  df-inn 9143  df-2 9201  df-3 9202  df-4 9203  df-5 9204  df-6 9205  df-7 9206  df-8 9207  df-9 9208  df-n0 9402  df-z 9479  df-dec 9611  df-dvds 12348
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator