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

Theorem bitsp1 12306
Description: The  M  +  1-th bit of  N is the  M-th bit of  |_ ( N  /  2 ). (Contributed by Mario Carneiro, 5-Sep-2016.)
Assertion
Ref Expression
bitsp1  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( ( M  + 
1 )  e.  (bits `  N )  <->  M  e.  (bits `  ( |_ `  ( N  /  2
) ) ) ) )

Proof of Theorem bitsp1
StepHypRef Expression
1 2nn 9205 . . . . . . . . . . . 12  |-  2  e.  NN
21a1i 9 . . . . . . . . . . 11  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
2  e.  NN )
32nncnd 9057 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
2  e.  CC )
4 simpr 110 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  ->  M  e.  NN0 )
53, 4expp1d 10826 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2 ^ ( M  +  1 ) )  =  ( ( 2 ^ M )  x.  2 ) )
62, 4nnexpcld 10847 . . . . . . . . . . 11  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2 ^ M
)  e.  NN )
76nncnd 9057 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2 ^ M
)  e.  CC )
87, 3mulcomd 8101 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( ( 2 ^ M )  x.  2 )  =  ( 2  x.  ( 2 ^ M ) ) )
95, 8eqtrd 2239 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2 ^ ( M  +  1 ) )  =  ( 2  x.  ( 2 ^ M ) ) )
109oveq2d 5967 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( N  /  (
2 ^ ( M  +  1 ) ) )  =  ( N  /  ( 2  x.  ( 2 ^ M
) ) ) )
11 simpl 109 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  ->  N  e.  ZZ )
1211zcnd 9503 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  ->  N  e.  CC )
132nnap0d 9089 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
2 #  0 )
146nnap0d 9089 . . . . . . . 8  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2 ^ M
) #  0 )
1512, 3, 7, 13, 14divdivap1d 8902 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( ( N  / 
2 )  /  (
2 ^ M ) )  =  ( N  /  ( 2  x.  ( 2 ^ M
) ) ) )
1610, 15eqtr4d 2242 . . . . . 6  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( N  /  (
2 ^ ( M  +  1 ) ) )  =  ( ( N  /  2 )  /  ( 2 ^ M ) ) )
1716fveq2d 5587 . . . . 5  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( |_ `  ( N  /  ( 2 ^ ( M  +  1 ) ) ) )  =  ( |_ `  ( ( N  / 
2 )  /  (
2 ^ M ) ) ) )
18 znq 9752 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  2  e.  NN )  ->  ( N  /  2
)  e.  QQ )
192, 18syldan 282 . . . . . 6  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( N  /  2
)  e.  QQ )
20 flqdiv 10473 . . . . . 6  |-  ( ( ( N  /  2
)  e.  QQ  /\  ( 2 ^ M
)  e.  NN )  ->  ( |_ `  ( ( |_ `  ( N  /  2
) )  /  (
2 ^ M ) ) )  =  ( |_ `  ( ( N  /  2 )  /  ( 2 ^ M ) ) ) )
2119, 6, 20syl2anc 411 . . . . 5  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( |_ `  (
( |_ `  ( N  /  2 ) )  /  ( 2 ^ M ) ) )  =  ( |_ `  ( ( N  / 
2 )  /  (
2 ^ M ) ) ) )
2217, 21eqtr4d 2242 . . . 4  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( |_ `  ( N  /  ( 2 ^ ( M  +  1 ) ) ) )  =  ( |_ `  ( ( |_ `  ( N  /  2
) )  /  (
2 ^ M ) ) ) )
2322breq2d 4059 . . 3  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( 2  ||  ( |_ `  ( N  / 
( 2 ^ ( M  +  1 ) ) ) )  <->  2  ||  ( |_ `  ( ( |_ `  ( N  /  2 ) )  /  ( 2 ^ M ) ) ) ) )
2423notbid 669 . 2  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( -.  2  ||  ( |_ `  ( N  /  ( 2 ^ ( M  +  1 ) ) ) )  <->  -.  2  ||  ( |_
`  ( ( |_
`  ( N  / 
2 ) )  / 
( 2 ^ M
) ) ) ) )
25 peano2nn0 9342 . . 3  |-  ( M  e.  NN0  ->  ( M  +  1 )  e. 
NN0 )
26 bitsval2 12299 . . 3  |-  ( ( N  e.  ZZ  /\  ( M  +  1
)  e.  NN0 )  ->  ( ( M  + 
1 )  e.  (bits `  N )  <->  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ ( M  +  1 ) ) ) ) ) )
2725, 26sylan2 286 . 2  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( ( M  + 
1 )  e.  (bits `  N )  <->  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ ( M  +  1 ) ) ) ) ) )
2819flqcld 10427 . . 3  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( |_ `  ( N  /  2 ) )  e.  ZZ )
29 bitsval2 12299 . . 3  |-  ( ( ( |_ `  ( N  /  2 ) )  e.  ZZ  /\  M  e.  NN0 )  ->  ( M  e.  (bits `  ( |_ `  ( N  / 
2 ) ) )  <->  -.  2  ||  ( |_
`  ( ( |_
`  ( N  / 
2 ) )  / 
( 2 ^ M
) ) ) ) )
3028, 29sylancom 420 . 2  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( M  e.  (bits `  ( |_ `  ( N  /  2 ) ) )  <->  -.  2  ||  ( |_ `  ( ( |_ `  ( N  /  2 ) )  /  ( 2 ^ M ) ) ) ) )
3124, 27, 303bitr4d 220 1  |-  ( ( N  e.  ZZ  /\  M  e.  NN0 )  -> 
( ( M  + 
1 )  e.  (bits `  N )  <->  M  e.  (bits `  ( |_ `  ( N  /  2
) ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 104    <-> wb 105    = wceq 1373    e. wcel 2177   class class class wbr 4047   ` cfv 5276  (class class class)co 5951   1c1 7933    + caddc 7935    x. cmul 7937    / cdiv 8752   NNcn 9043   2c2 9094   NN0cn0 9302   ZZcz 9379   QQcq 9747   |_cfl 10418   ^cexp 10690    || cdvds 12142  bitscbits 12295
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 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4163  ax-sep 4166  ax-nul 4174  ax-pow 4222  ax-pr 4257  ax-un 4484  ax-setind 4589  ax-iinf 4640  ax-cnex 8023  ax-resscn 8024  ax-1cn 8025  ax-1re 8026  ax-icn 8027  ax-addcl 8028  ax-addrcl 8029  ax-mulcl 8030  ax-mulrcl 8031  ax-addcom 8032  ax-mulcom 8033  ax-addass 8034  ax-mulass 8035  ax-distr 8036  ax-i2m1 8037  ax-0lt1 8038  ax-1rid 8039  ax-0id 8040  ax-rnegex 8041  ax-precex 8042  ax-cnre 8043  ax-pre-ltirr 8044  ax-pre-ltwlin 8045  ax-pre-lttrn 8046  ax-pre-apti 8047  ax-pre-ltadd 8048  ax-pre-mulgt0 8049  ax-pre-mulext 8050  ax-arch 8051
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rmo 2493  df-rab 2494  df-v 2775  df-sbc 3000  df-csb 3095  df-dif 3169  df-un 3171  df-in 3173  df-ss 3180  df-nul 3462  df-if 3573  df-pw 3619  df-sn 3640  df-pr 3641  df-op 3643  df-uni 3853  df-int 3888  df-iun 3931  df-br 4048  df-opab 4110  df-mpt 4111  df-tr 4147  df-id 4344  df-po 4347  df-iso 4348  df-iord 4417  df-on 4419  df-ilim 4420  df-suc 4422  df-iom 4643  df-xp 4685  df-rel 4686  df-cnv 4687  df-co 4688  df-dm 4689  df-rn 4690  df-res 4691  df-ima 4692  df-iota 5237  df-fun 5278  df-fn 5279  df-f 5280  df-f1 5281  df-fo 5282  df-f1o 5283  df-fv 5284  df-riota 5906  df-ov 5954  df-oprab 5955  df-mpo 5956  df-1st 6233  df-2nd 6234  df-recs 6398  df-frec 6484  df-pnf 8116  df-mnf 8117  df-xr 8118  df-ltxr 8119  df-le 8120  df-sub 8252  df-neg 8253  df-reap 8655  df-ap 8662  df-div 8753  df-inn 9044  df-2 9102  df-n0 9303  df-z 9380  df-uz 9656  df-q 9748  df-rp 9783  df-fl 10420  df-seqfrec 10600  df-exp 10691  df-bits 12296
This theorem is referenced by:  bitsp1e  12307  bitsp1o  12308
  Copyright terms: Public domain W3C validator