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

Theorem saddisjlem 13976
Description: Lemma for sadadd 13979. (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 13968 . 2  |-  ( ph  ->  ( N  e.  ( A sadd  B )  <-> hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `  N ) ) ) )
6 fveq2 5866 . . . . . . . 8  |-  ( x  =  0  ->  ( C `  x )  =  ( C ` 
0 ) )
76eleq2d 2537 . . . . . . 7  |-  ( x  =  0  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  0 ) ) )
87notbid 294 . . . . . 6  |-  ( x  =  0  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  0 ) ) )
98imbi2d 316 . . . . 5  |-  ( x  =  0  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C ` 
0 ) ) ) )
10 fveq2 5866 . . . . . . . 8  |-  ( x  =  k  ->  ( C `  x )  =  ( C `  k ) )
1110eleq2d 2537 . . . . . . 7  |-  ( x  =  k  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  k ) ) )
1211notbid 294 . . . . . 6  |-  ( x  =  k  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  k ) ) )
1312imbi2d 316 . . . . 5  |-  ( x  =  k  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  k ) ) ) )
14 fveq2 5866 . . . . . . . 8  |-  ( x  =  ( k  +  1 )  ->  ( C `  x )  =  ( C `  ( k  +  1 ) ) )
1514eleq2d 2537 . . . . . . 7  |-  ( x  =  ( k  +  1 )  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  ( k  +  1 ) ) ) )
1615notbid 294 . . . . . 6  |-  ( x  =  ( k  +  1 )  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  ( k  +  1 ) ) ) )
1716imbi2d 316 . . . . 5  |-  ( x  =  ( k  +  1 )  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  ( k  +  1 ) ) ) ) )
18 fveq2 5866 . . . . . . . 8  |-  ( x  =  N  ->  ( C `  x )  =  ( C `  N ) )
1918eleq2d 2537 . . . . . . 7  |-  ( x  =  N  ->  ( (/) 
e.  ( C `  x )  <->  (/)  e.  ( C `  N ) ) )
2019notbid 294 . . . . . 6  |-  ( x  =  N  ->  ( -.  (/)  e.  ( C `
 x )  <->  -.  (/)  e.  ( C `  N ) ) )
2120imbi2d 316 . . . . 5  |-  ( x  =  N  ->  (
( ph  ->  -.  (/)  e.  ( C `  x ) )  <->  ( ph  ->  -.  (/)  e.  ( C `  N ) ) ) )
221, 2, 3sadc0 13966 . . . . 5  |-  ( ph  ->  -.  (/)  e.  ( C `
 0 ) )
23 noel 3789 . . . . . . . . 9  |-  -.  k  e.  (/)
241ad2antrr 725 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  A  C_  NN0 )
252ad2antrr 725 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  B  C_  NN0 )
26 simplr 754 . . . . . . . . . . 11  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
k  e.  NN0 )
2724, 25, 3, 26sadcp1 13967 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( (/)  e.  ( C `
 ( k  +  1 ) )  <-> cadd ( k  e.  A ,  k  e.  B ,  (/)  e.  ( C `  k ) ) ) )
28 cad0 1452 . . . . . . . . . . 11  |-  ( -.  (/)  e.  ( C `  k )  ->  (cadd ( k  e.  A ,  k  e.  B ,  (/)  e.  ( C `
 k ) )  <-> 
( k  e.  A  /\  k  e.  B
) ) )
2928adantl 466 . . . . . . . . . 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 3687 . . . . . . . . . . 11  |-  ( k  e.  ( A  i^i  B )  <->  ( k  e.  A  /\  k  e.  B ) )
31 saddisj.3 . . . . . . . . . . . . 13  |-  ( ph  ->  ( A  i^i  B
)  =  (/) )
3231ad2antrr 725 . . . . . . . . . . . 12  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  -> 
( A  i^i  B
)  =  (/) )
3332eleq2d 2537 . . . . . . . . . . 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 303 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  NN0 )  /\  -.  (/) 
e.  ( C `  k ) )  ->  -.  (/)  e.  ( C `
 ( k  +  1 ) ) )
3736ex 434 . . . . . . 7  |-  ( (
ph  /\  k  e.  NN0 )  ->  ( -.  (/) 
e.  ( C `  k )  ->  -.  (/) 
e.  ( C `  ( k  +  1 ) ) ) )
3837expcom 435 . . . . . 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 10958 . . . 4  |-  ( N  e.  NN0  ->  ( ph  ->  -.  (/)  e.  ( C `
 N ) ) )
414, 40mpcom 36 . . 3  |-  ( ph  ->  -.  (/)  e.  ( C `
 N ) )
42 hadrot 1441 . . . 4  |-  (hadd (
(/)  e.  ( C `  N ) ,  N  e.  A ,  N  e.  B )  <-> hadd ( N  e.  A ,  N  e.  B ,  (/)  e.  ( C `  N ) ) )
43 had0 1455 . . . 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 3789 . . . . 5  |-  -.  N  e.  (/)
47 elin 3687 . . . . . 6  |-  ( N  e.  ( A  i^i  B )  <->  ( N  e.  A  /\  N  e.  B ) )
4831eleq2d 2537 . . . . . 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 303 . . . 4  |-  ( ph  ->  -.  ( N  e.  A  /\  N  e.  B ) )
51 xor2 1366 . . . . 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 3645 . . 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 368    /\ wa 369    \/_ wxo 1360    = wceq 1379  haddwhad 1429  caddwcad 1430    e. wcel 1767    u. cun 3474    i^i cin 3475    C_ wss 3476   (/)c0 3785   ifcif 3939    |-> cmpt 4505   ` cfv 5588  (class class class)co 6285    |-> cmpt2 6287   1oc1o 7124   2oc2o 7125   0cc0 9493   1c1 9494    + caddc 9496    - cmin 9806   NN0cn0 10796    seqcseq 12076   sadd csad 13932
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6577  ax-cnex 9549  ax-resscn 9550  ax-1cn 9551  ax-icn 9552  ax-addcl 9553  ax-addrcl 9554  ax-mulcl 9555  ax-mulrcl 9556  ax-mulcom 9557  ax-addass 9558  ax-mulass 9559  ax-distr 9560  ax-i2m1 9561  ax-1ne0 9562  ax-1rid 9563  ax-rnegex 9564  ax-rrecex 9565  ax-cnre 9566  ax-pre-lttri 9567  ax-pre-lttrn 9568  ax-pre-ltadd 9569  ax-pre-mulgt0 9570
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-xor 1361  df-tru 1382  df-had 1431  df-cad 1432  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6246  df-ov 6288  df-oprab 6289  df-mpt2 6290  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7043  df-rdg 7077  df-1o 7131  df-2o 7132  df-er 7312  df-en 7518  df-dom 7519  df-sdom 7520  df-pnf 9631  df-mnf 9632  df-xr 9633  df-ltxr 9634  df-le 9635  df-sub 9808  df-neg 9809  df-nn 10538  df-n0 10797  df-z 10866  df-uz 11084  df-fz 11674  df-seq 12077  df-sad 13963
This theorem is referenced by:  saddisj  13977
  Copyright terms: Public domain W3C validator