MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  smuval Structured version   Unicode version

Theorem smuval 14133
Description: Define the addition of two bit sequences, using df-had 1454 and df-cad 1455 bit operations. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
smuval.a  |-  ( ph  ->  A  C_  NN0 )
smuval.b  |-  ( ph  ->  B  C_  NN0 )
smuval.p  |-  P  =  seq 0 ( ( p  e.  ~P NN0 ,  m  e.  NN0  |->  ( p sadd  { n  e.  NN0  |  ( m  e.  A  /\  ( n  -  m
)  e.  B ) } ) ) ,  ( n  e.  NN0  |->  if ( n  =  0 ,  (/) ,  ( n  -  1 ) ) ) )
smuval.n  |-  ( ph  ->  N  e.  NN0 )
Assertion
Ref Expression
smuval  |-  ( ph  ->  ( N  e.  ( A smul  B )  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
Distinct variable groups:    m, n, p, A    n, N    ph, n    B, m, n, p
Allowed substitution hints:    ph( m, p)    P( m, n, p)    N( m, p)

Proof of Theorem smuval
Dummy variable  k is distinct from all other variables.
StepHypRef Expression
1 smuval.a . . . 4  |-  ( ph  ->  A  C_  NN0 )
2 smuval.b . . . 4  |-  ( ph  ->  B  C_  NN0 )
3 smuval.p . . . 4  |-  P  =  seq 0 ( ( p  e.  ~P NN0 ,  m  e.  NN0  |->  ( p sadd  { n  e.  NN0  |  ( m  e.  A  /\  ( n  -  m
)  e.  B ) } ) ) ,  ( n  e.  NN0  |->  if ( n  =  0 ,  (/) ,  ( n  -  1 ) ) ) )
41, 2, 3smufval 14129 . . 3  |-  ( ph  ->  ( A smul  B )  =  { k  e. 
NN0  |  k  e.  ( P `  ( k  +  1 ) ) } )
54eleq2d 2452 . 2  |-  ( ph  ->  ( N  e.  ( A smul  B )  <->  N  e.  { k  e.  NN0  | 
k  e.  ( P `
 ( k  +  1 ) ) } ) )
6 smuval.n . . 3  |-  ( ph  ->  N  e.  NN0 )
7 id 22 . . . . 5  |-  ( k  =  N  ->  k  =  N )
8 oveq1 6203 . . . . . 6  |-  ( k  =  N  ->  (
k  +  1 )  =  ( N  + 
1 ) )
98fveq2d 5778 . . . . 5  |-  ( k  =  N  ->  ( P `  ( k  +  1 ) )  =  ( P `  ( N  +  1
) ) )
107, 9eleq12d 2464 . . . 4  |-  ( k  =  N  ->  (
k  e.  ( P `
 ( k  +  1 ) )  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
1110elrab3 3183 . . 3  |-  ( N  e.  NN0  ->  ( N  e.  { k  e. 
NN0  |  k  e.  ( P `  ( k  +  1 ) ) }  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
126, 11syl 16 . 2  |-  ( ph  ->  ( N  e.  {
k  e.  NN0  | 
k  e.  ( P `
 ( k  +  1 ) ) }  <-> 
N  e.  ( P `
 ( N  + 
1 ) ) ) )
135, 12bitrd 253 1  |-  ( ph  ->  ( N  e.  ( A smul  B )  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 367    = wceq 1399    e. wcel 1826   {crab 2736    C_ wss 3389   (/)c0 3711   ifcif 3857   ~Pcpw 3927    |-> cmpt 4425   ` cfv 5496  (class class class)co 6196    |-> cmpt2 6198   0cc0 9403   1c1 9404    + caddc 9406    - cmin 9718   NN0cn0 10712    seqcseq 12010   sadd csad 14072   smul csmu 14073
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1626  ax-4 1639  ax-5 1712  ax-6 1755  ax-7 1798  ax-8 1828  ax-9 1830  ax-10 1845  ax-11 1850  ax-12 1862  ax-13 2006  ax-ext 2360  ax-sep 4488  ax-nul 4496  ax-pow 4543  ax-pr 4601  ax-un 6491  ax-cnex 9459  ax-resscn 9460  ax-1cn 9461  ax-icn 9462  ax-addcl 9463  ax-addrcl 9464  ax-mulcl 9465  ax-mulrcl 9466  ax-i2m1 9471  ax-1ne0 9472  ax-rrecex 9475  ax-cnre 9476
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-tru 1402  df-ex 1621  df-nf 1625  df-sb 1748  df-eu 2222  df-mo 2223  df-clab 2368  df-cleq 2374  df-clel 2377  df-nfc 2532  df-ne 2579  df-ral 2737  df-rex 2738  df-reu 2739  df-rab 2741  df-v 3036  df-sbc 3253  df-csb 3349  df-dif 3392  df-un 3394  df-in 3396  df-ss 3403  df-pss 3405  df-nul 3712  df-if 3858  df-pw 3929  df-sn 3945  df-pr 3947  df-tp 3949  df-op 3951  df-uni 4164  df-iun 4245  df-br 4368  df-opab 4426  df-mpt 4427  df-tr 4461  df-eprel 4705  df-id 4709  df-po 4714  df-so 4715  df-fr 4752  df-we 4754  df-ord 4795  df-on 4796  df-lim 4797  df-suc 4798  df-xp 4919  df-rel 4920  df-cnv 4921  df-co 4922  df-dm 4923  df-rn 4924  df-res 4925  df-ima 4926  df-iota 5460  df-fun 5498  df-fn 5499  df-f 5500  df-f1 5501  df-fo 5502  df-f1o 5503  df-fv 5504  df-ov 6199  df-oprab 6200  df-mpt2 6201  df-om 6600  df-recs 6960  df-rdg 6994  df-nn 10453  df-n0 10713  df-seq 12011  df-smu 14128
This theorem is referenced by:  smuval2  14134  smupvallem  14135  smu01lem  14137
  Copyright terms: Public domain W3C validator