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

Theorem saddisjlem 14198
Description: Lemma for sadadd 14201. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
saddisj.1  |-  ( ph  ->  A  C_  NN0 )
saddisj.2  |-  ( ph  ->  B  C_  NN0 )
saddisj.3  |-  ( ph  ->  ( A  i^i  B
)  =  (/) )
saddisjlem.c  |-  C  =  seq 0 ( ( c  e.  2o ,  m  e.  NN0  |->  if (cadd ( m  e.  A ,  m  e.  B ,  (/)  e.  c ) ,  1o ,  (/) ) ) ,  ( n  e.  NN0  |->  if ( n  =  0 ,  (/) ,  ( n  - 
1 ) ) ) )
saddisjlem.3  |-  ( ph  ->  N  e.  NN0 )
Assertion
Ref Expression
saddisjlem  |-  ( ph  ->  ( N  e.  ( A sadd  B )  <->  N  e.  ( A  u.  B
) ) )
Distinct variable groups:    m, c, n    A, c, m    B, c, m    n, N
Allowed substitution hints:    ph( m, n, c)    A( n)    B( n)    C( m, n, c)    N( m, c)

Proof of Theorem saddisjlem
Dummy variables  k  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 saddisj.1 . . 3  |-  ( ph  ->  A  C_  NN0 )
2 saddisj.2 . . 3  |-  ( ph  ->  B  C_  NN0 )
3 saddisjlem.c . . 3  |-  C  =  seq 0 ( ( c  e.  2o ,  m  e.  NN0  |->  if (cadd ( m  e.  A ,  m  e.  B ,  (/)  e.  c ) ,  1o ,  (/) ) ) ,  ( n  e.  NN0  |->  if ( n  =  0 ,  (/) ,  ( n  - 
1 ) ) ) )
4 saddisjlem.3 . . 3  |-  ( ph  ->  N  e.  NN0 )
51, 2, 3, 4sadval 14190 . 2  |-  ( ph  ->  ( N  e.  ( A sadd  B )  <-> hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `  N ) ) ) )
6 fveq2 5848 . . . . . . . 8  |-  ( x  =  0  ->  ( C `  x )  =  ( C ` 
0 ) )
76eleq2d 2524 . . . . . . 7  |-  ( x  =  0  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  0 ) ) )
87notbid 292 . . . . . 6  |-  ( x  =  0  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  0 ) ) )
98imbi2d 314 . . . . 5  |-  ( x  =  0  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C ` 
0 ) ) ) )
10 fveq2 5848 . . . . . . . 8  |-  ( x  =  k  ->  ( C `  x )  =  ( C `  k ) )
1110eleq2d 2524 . . . . . . 7  |-  ( x  =  k  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  k ) ) )
1211notbid 292 . . . . . 6  |-  ( x  =  k  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  k ) ) )
1312imbi2d 314 . . . . 5  |-  ( x  =  k  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  k ) ) ) )
14 fveq2 5848 . . . . . . . 8  |-  ( x  =  ( k  +  1 )  ->  ( C `  x )  =  ( C `  ( k  +  1 ) ) )
1514eleq2d 2524 . . . . . . 7  |-  ( x  =  ( k  +  1 )  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  ( k  +  1 ) ) ) )
1615notbid 292 . . . . . 6  |-  ( x  =  ( k  +  1 )  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  ( k  +  1 ) ) ) )
1716imbi2d 314 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  ( k  +  1 ) ) ) ) )
18 fveq2 5848 . . . . . . . 8  |-  ( x  =  N  ->  ( C `  x )  =  ( C `  N ) )
1918eleq2d 2524 . . . . . . 7  |-  ( x  =  N  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  N ) ) )
2019notbid 292 . . . . . 6  |-  ( x  =  N  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  N ) ) )
2120imbi2d 314 . . . . 5  |-  ( x  =  N  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  N ) ) ) )
221, 2, 3sadc0 14188 . . . . 5  |-  ( ph  ->  -.  (/)  e.  ( C `
 0 ) )
23 noel 3787 . . . . . . . . 9  |-  -.  k  e.  (/)
241ad2antrr 723 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  A  C_  NN0 )
252ad2antrr 723 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  B  C_  NN0 )
26 simplr 753 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
k  e.  NN0 )
2724, 25, 3, 26sadcp1 14189 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( (/)  e.  ( C `
 ( k  +  1 ) )  <-> cadd ( k  e.  A ,  k  e.  B ,  (/)  e.  ( C `  k ) ) ) )
28 cad0 1471 . . . . . . . . . . 11  |-  ( -.  (/)  e.  ( C `  k )  ->  (cadd ( k  e.  A ,  k  e.  B ,  (/)  e.  ( C `
 k ) )  <-> 
( k  e.  A  /\  k  e.  B
) ) )
2928adantl 464 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
(cadd ( k  e.  A ,  k  e.  B ,  (/)  e.  ( C `  k ) )  <->  ( k  e.  A  /\  k  e.  B ) ) )
30 elin 3673 . . . . . . . . . . 11  |-  ( k  e.  ( A  i^i  B )  <->  ( k  e.  A  /\  k  e.  B ) )
31 saddisj.3 . . . . . . . . . . . . 13  |-  ( ph  ->  ( A  i^i  B
)  =  (/) )
3231ad2antrr 723 . . . . . . . . . . . 12  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( A  i^i  B
)  =  (/) )
3332eleq2d 2524 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( k  e.  ( A  i^i  B )  <-> 
k  e.  (/) ) )
3430, 33syl5bbr 259 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( ( k  e.  A  /\  k  e.  B )  <->  k  e.  (/) ) )
3527, 29, 343bitrd 279 . . . . . . . . 9  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( (/)  e.  ( C `
 ( k  +  1 ) )  <->  k  e.  (/) ) )
3623, 35mtbiri 301 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  -.  (/)  e.  ( C `
 ( k  +  1 ) ) )
3736ex 432 . . . . . . 7  |-  ( (
ph  /\  k  e.  NN0 )  ->  ( -.  (/) 
e.  ( C `  k )  ->  -.  (/) 
e.  ( C `  ( k  +  1 ) ) ) )
3837expcom 433 . . . . . 6  |-  ( k  e.  NN0  ->  ( ph  ->  ( -.  (/)  e.  ( C `  k )  ->  -.  (/)  e.  ( C `  ( k  +  1 ) ) ) ) )
3938a2d 26 . . . . 5  |-  ( k  e.  NN0  ->  ( (
ph  ->  -.  (/)  e.  ( C `  k ) )  ->  ( ph  ->  -.  (/)  e.  ( C `
 ( k  +  1 ) ) ) ) )
409, 13, 17, 21, 22, 39nn0ind 10955 . . . 4  |-  ( N  e.  NN0  ->  ( ph  ->  -.  (/)  e.  ( C `
 N ) ) )
414, 40mpcom 36 . . 3  |-  ( ph  ->  -.  (/)  e.  ( C `
 N ) )
42 hadrot 1460 . . . 4  |-  (hadd (
(/)  e.  ( C `  N ) ,  N  e.  A ,  N  e.  B )  <-> hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `  N ) ) )
43 had0 1475 . . . 4  |-  ( -.  (/)  e.  ( C `  N )  ->  (hadd ( (/)  e.  ( C `
 N ) ,  N  e.  A ,  N  e.  B )  <->  ( N  e.  A  \/_  N  e.  B )
) )
4442, 43syl5bbr 259 . . 3  |-  ( -.  (/)  e.  ( C `  N )  ->  (hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `
 N ) )  <-> 
( N  e.  A  \/_  N  e.  B ) ) )
4541, 44syl 16 . 2  |-  ( ph  ->  (hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `  N ) )  <->  ( N  e.  A  \/_  N  e.  B ) ) )
46 noel 3787 . . . . 5  |-  -.  N  e.  (/)
47 elin 3673 . . . . . 6  |-  ( N  e.  ( A  i^i  B )  <->  ( N  e.  A  /\  N  e.  B ) )
4831eleq2d 2524 . . . . . 6  |-  ( ph  ->  ( N  e.  ( A  i^i  B )  <-> 
N  e.  (/) ) )
4947, 48syl5bbr 259 . . . . 5  |-  ( ph  ->  ( ( N  e.  A  /\  N  e.  B )  <->  N  e.  (/) ) )
5046, 49mtbiri 301 . . . 4  |-  ( ph  ->  -.  ( N  e.  A  /\  N  e.  B ) )
51 xor2 1369 . . . . 5  |-  ( ( N  e.  A  \/_  N  e.  B )  <->  ( ( N  e.  A  \/  N  e.  B
)  /\  -.  ( N  e.  A  /\  N  e.  B )
) )
5251rbaib 904 . . . 4  |-  ( -.  ( N  e.  A  /\  N  e.  B
)  ->  ( ( N  e.  A  \/_  N  e.  B )  <->  ( N  e.  A  \/  N  e.  B )
) )
5350, 52syl 16 . . 3  |-  ( ph  ->  ( ( N  e.  A  \/_  N  e.  B )  <->  ( N  e.  A  \/  N  e.  B ) ) )
54 elun 3631 . . 3  |-  ( N  e.  ( A  u.  B )  <->  ( N  e.  A  \/  N  e.  B ) )
5553, 54syl6bbr 263 . 2  |-  ( ph  ->  ( ( N  e.  A  \/_  N  e.  B )  <->  N  e.  ( A  u.  B
) ) )
565, 45, 553bitrd 279 1  |-  ( ph  ->  ( N  e.  ( A sadd  B )  <->  N  e.  ( A  u.  B
) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 366    /\ wa 367    \/_ wxo 1362    = wceq 1398  haddwhad 1448  caddwcad 1449    e. wcel 1823    u. cun 3459    i^i cin 3460    C_ wss 3461   (/)c0 3783   ifcif 3929    |-> cmpt 4497   ` cfv 5570  (class class class)co 6270    |-> cmpt2 6272   1oc1o 7115   2oc2o 7116   0cc0 9481   1c1 9482    + caddc 9484    - cmin 9796   NN0cn0 10791    seqcseq 12089   sadd csad 14154
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1623  ax-4 1636  ax-5 1709  ax-6 1752  ax-7 1795  ax-8 1825  ax-9 1827  ax-10 1842  ax-11 1847  ax-12 1859  ax-13 2004  ax-ext 2432  ax-sep 4560  ax-nul 4568  ax-pow 4615  ax-pr 4676  ax-un 6565  ax-cnex 9537  ax-resscn 9538  ax-1cn 9539  ax-icn 9540  ax-addcl 9541  ax-addrcl 9542  ax-mulcl 9543  ax-mulrcl 9544  ax-mulcom 9545  ax-addass 9546  ax-mulass 9547  ax-distr 9548  ax-i2m1 9549  ax-1ne0 9550  ax-1rid 9551  ax-rnegex 9552  ax-rrecex 9553  ax-cnre 9554  ax-pre-lttri 9555  ax-pre-lttrn 9556  ax-pre-ltadd 9557  ax-pre-mulgt0 9558
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 972  df-3an 973  df-xor 1363  df-tru 1401  df-had 1450  df-cad 1451  df-ex 1618  df-nf 1622  df-sb 1745  df-eu 2288  df-mo 2289  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2651  df-nel 2652  df-ral 2809  df-rex 2810  df-reu 2811  df-rab 2813  df-v 3108  df-sbc 3325  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3784  df-if 3930  df-pw 4001  df-sn 4017  df-pr 4019  df-tp 4021  df-op 4023  df-uni 4236  df-iun 4317  df-br 4440  df-opab 4498  df-mpt 4499  df-tr 4533  df-eprel 4780  df-id 4784  df-po 4789  df-so 4790  df-fr 4827  df-we 4829  df-ord 4870  df-on 4871  df-lim 4872  df-suc 4873  df-xp 4994  df-rel 4995  df-cnv 4996  df-co 4997  df-dm 4998  df-rn 4999  df-res 5000  df-ima 5001  df-iota 5534  df-fun 5572  df-fn 5573  df-f 5574  df-f1 5575  df-fo 5576  df-f1o 5577  df-fv 5578  df-riota 6232  df-ov 6273  df-oprab 6274  df-mpt2 6275  df-om 6674  df-1st 6773  df-2nd 6774  df-recs 7034  df-rdg 7068  df-1o 7122  df-2o 7123  df-er 7303  df-en 7510  df-dom 7511  df-sdom 7512  df-pnf 9619  df-mnf 9620  df-xr 9621  df-ltxr 9622  df-le 9623  df-sub 9798  df-neg 9799  df-nn 10532  df-n0 10792  df-z 10861  df-uz 11083  df-fz 11676  df-seq 12090  df-sad 14185
This theorem is referenced by:  saddisj  14199
  Copyright terms: Public domain W3C validator