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

Theorem bitsval 12509
Description: Expand the definition of the bits of an integer. (Contributed by Mario Carneiro, 5-Sep-2016.)
Assertion
Ref Expression
bitsval  |-  ( M  e.  (bits `  N
)  <->  ( N  e.  ZZ  /\  M  e. 
NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) )

Proof of Theorem bitsval
Dummy variables  n  m are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-bits 12507 . . . 4  |- bits  =  ( n  e.  ZZ  |->  { m  e.  NN0  |  -.  2  ||  ( |_
`  ( n  / 
( 2 ^ m
) ) ) } )
21mptrcl 5729 . . 3  |-  ( M  e.  (bits `  N
)  ->  N  e.  ZZ )
3 bitsfval 12508 . . . . 5  |-  ( N  e.  ZZ  ->  (bits `  N )  =  {
m  e.  NN0  |  -.  2  ||  ( |_
`  ( N  / 
( 2 ^ m
) ) ) } )
43eleq2d 2301 . . . 4  |-  ( N  e.  ZZ  ->  ( M  e.  (bits `  N
)  <->  M  e.  { m  e.  NN0  |  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ m ) ) ) } ) )
5 oveq2 6026 . . . . . . . . 9  |-  ( m  =  M  ->  (
2 ^ m )  =  ( 2 ^ M ) )
65oveq2d 6034 . . . . . . . 8  |-  ( m  =  M  ->  ( N  /  ( 2 ^ m ) )  =  ( N  /  (
2 ^ M ) ) )
76fveq2d 5643 . . . . . . 7  |-  ( m  =  M  ->  ( |_ `  ( N  / 
( 2 ^ m
) ) )  =  ( |_ `  ( N  /  ( 2 ^ M ) ) ) )
87breq2d 4100 . . . . . 6  |-  ( m  =  M  ->  (
2  ||  ( |_ `  ( N  /  (
2 ^ m ) ) )  <->  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) )
98notbid 673 . . . . 5  |-  ( m  =  M  ->  ( -.  2  ||  ( |_
`  ( N  / 
( 2 ^ m
) ) )  <->  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) )
109elrab 2962 . . . 4  |-  ( M  e.  { m  e. 
NN0  |  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ m ) ) ) }  <->  ( M  e. 
NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) )
114, 10bitrdi 196 . . 3  |-  ( N  e.  ZZ  ->  ( M  e.  (bits `  N
)  <->  ( M  e. 
NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) ) )
122, 11biadanii 617 . 2  |-  ( M  e.  (bits `  N
)  <->  ( N  e.  ZZ  /\  ( M  e.  NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) ) )
13 3anass 1008 . 2  |-  ( ( N  e.  ZZ  /\  M  e.  NN0  /\  -.  2  ||  ( |_ `  ( N  /  (
2 ^ M ) ) ) )  <->  ( N  e.  ZZ  /\  ( M  e.  NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) ) )
1412, 13bitr4i 187 1  |-  ( M  e.  (bits `  N
)  <->  ( N  e.  ZZ  /\  M  e. 
NN0  /\  -.  2  ||  ( |_ `  ( N  /  ( 2 ^ M ) ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    /\ wa 104    <-> wb 105    /\ w3a 1004    = wceq 1397    e. wcel 2202   {crab 2514   class class class wbr 4088   ` cfv 5326  (class class class)co 6018    / cdiv 8852   2c2 9194   NN0cn0 9402   ZZcz 9479   |_cfl 10529   ^cexp 10801    || cdvds 12353  bitscbits 12506
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-cnex 8123  ax-resscn 8124  ax-1cn 8125  ax-1re 8126  ax-icn 8127  ax-addcl 8128  ax-addrcl 8129  ax-mulcl 8130  ax-i2m1 8137
This theorem depends on definitions:  df-bi 117  df-3an 1006  df-tru 1400  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-ral 2515  df-rex 2516  df-rab 2519  df-v 2804  df-sbc 3032  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-mpt 4152  df-id 4390  df-xp 4731  df-rel 4732  df-cnv 4733  df-co 4734  df-dm 4735  df-rn 4736  df-res 4737  df-ima 4738  df-iota 5286  df-fun 5328  df-fv 5334  df-ov 6021  df-inn 9144  df-n0 9403  df-bits 12507
This theorem is referenced by:  bitsval2  12510  bitsss  12511  bitsfzo  12521  bitsmod  12522  bitscmp  12524
  Copyright terms: Public domain W3C validator