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

Theorem smuval 12993
Description: Define the addition of two bit sequences, using df-had 1389 and df-cad 1390 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 12989 . . 3  |-  ( ph  ->  ( A smul  B )  =  { k  e. 
NN0  |  k  e.  ( P `  ( k  +  1 ) ) } )
54eleq2d 2503 . 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 20 . . . . 5  |-  ( k  =  N  ->  k  =  N )
8 oveq1 6088 . . . . . 6  |-  ( k  =  N  ->  (
k  +  1 )  =  ( N  + 
1 ) )
98fveq2d 5732 . . . . 5  |-  ( k  =  N  ->  ( P `  ( k  +  1 ) )  =  ( P `  ( N  +  1
) ) )
107, 9eleq12d 2504 . . . 4  |-  ( k  =  N  ->  (
k  e.  ( P `
 ( k  +  1 ) )  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
1110elrab3 3093 . . 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 245 1  |-  ( ph  ->  ( N  e.  ( A smul  B )  <->  N  e.  ( P `  ( N  +  1 ) ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1652    e. wcel 1725   {crab 2709    C_ wss 3320   (/)c0 3628   ifcif 3739   ~Pcpw 3799    e. cmpt 4266   ` cfv 5454  (class class class)co 6081    e. cmpt2 6083   0cc0 8990   1c1 8991    + caddc 8993    - cmin 9291   NN0cn0 10221    seq cseq 11323   sadd csad 12932   smul csmu 12933
This theorem is referenced by:  smuval2  12994  smupvallem  12995  smu01lem  12997
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-1cn 9048  ax-icn 9049  ax-addcl 9050  ax-addrcl 9051  ax-mulcl 9052  ax-mulrcl 9053  ax-i2m1 9058  ax-1ne0 9059  ax-rrecex 9062  ax-cnre 9063
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-ral 2710  df-rex 2711  df-reu 2712  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-recs 6633  df-rdg 6668  df-nn 10001  df-n0 10222  df-seq 11324  df-smu 12988
  Copyright terms: Public domain W3C validator