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

Theorem ltbval 17541
Description: Value of the well-order on finite bags. (Contributed by Mario Carneiro, 8-Feb-2015.)
Hypotheses
Ref Expression
ltbval.c  |-  C  =  ( T  <bag  I )
ltbval.d  |-  D  =  { h  e.  ( NN0  ^m  I )  |  ( `' h " NN )  e.  Fin }
ltbval.i  |-  ( ph  ->  I  e.  V )
ltbval.t  |-  ( ph  ->  T  e.  W )
Assertion
Ref Expression
ltbval  |-  ( ph  ->  C  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
Distinct variable groups:    x, y, D    w, h, x, y, z, I    ph, h, x, y    w, T, x, y, z
Allowed substitution hints:    ph( z, w)    C( x, y, z, w, h)    D( z, w, h)    T( h)    V( x, y, z, w, h)    W( x, y, z, w, h)

Proof of Theorem ltbval
Dummy variables  i 
r are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ltbval.c . 2  |-  C  =  ( T  <bag  I )
2 ltbval.t . . 3  |-  ( ph  ->  T  e.  W )
3 ltbval.i . . 3  |-  ( ph  ->  I  e.  V )
4 elex 2979 . . . 4  |-  ( T  e.  W  ->  T  e.  _V )
5 elex 2979 . . . 4  |-  ( I  e.  V  ->  I  e.  _V )
6 simpr 458 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  i  =  I )
76oveq2d 6106 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( NN0  ^m  i
)  =  ( NN0 
^m  I ) )
8 rabeq 2964 . . . . . . . . . 10  |-  ( ( NN0  ^m  i )  =  ( NN0  ^m  I )  ->  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  =  { h  e.  ( NN0  ^m  I )  |  ( `' h " NN )  e.  Fin } )
97, 8syl 16 . . . . . . . . 9  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin } )
10 ltbval.d . . . . . . . . 9  |-  D  =  { h  e.  ( NN0  ^m  I )  |  ( `' h " NN )  e.  Fin }
119, 10syl6eqr 2491 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  D )
1211sseq2d 3381 . . . . . . 7  |-  ( ( r  =  T  /\  i  =  I )  ->  ( { x ,  y }  C_  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  <->  { x ,  y }  C_  D ) )
13 simpl 454 . . . . . . . . . . . 12  |-  ( ( r  =  T  /\  i  =  I )  ->  r  =  T )
1413breqd 4300 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  ( z r w  <-> 
z T w ) )
1514imbi1d 317 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( ( z r w  ->  ( x `  w )  =  ( y `  w ) )  <->  ( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) )
166, 15raleqbidv 2929 . . . . . . . . 9  |-  ( ( r  =  T  /\  i  =  I )  ->  ( A. w  e.  i  ( z r w  ->  ( x `  w )  =  ( y `  w ) )  <->  A. w  e.  I 
( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) )
1716anbi2d 698 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  ( ( ( x `
 z )  < 
( y `  z
)  /\  A. w  e.  i  ( z
r w  ->  (
x `  w )  =  ( y `  w ) ) )  <-> 
( ( x `  z )  <  (
y `  z )  /\  A. w  e.  I 
( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) ) )
186, 17rexeqbidv 2930 . . . . . . 7  |-  ( ( r  =  T  /\  i  =  I )  ->  ( E. z  e.  i  ( ( x `
 z )  < 
( y `  z
)  /\  A. w  e.  i  ( z
r w  ->  (
x `  w )  =  ( y `  w ) ) )  <->  E. z  e.  I 
( ( x `  z )  <  (
y `  z )  /\  A. w  e.  I 
( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) ) )
1912, 18anbi12d 705 . . . . . 6  |-  ( ( r  =  T  /\  i  =  I )  ->  ( ( { x ,  y }  C_  { h  e.  ( NN0 
^m  i )  |  ( `' h " NN )  e.  Fin }  /\  E. z  e.  i  ( ( x `
 z )  < 
( y `  z
)  /\  A. w  e.  i  ( z
r w  ->  (
x `  w )  =  ( y `  w ) ) ) )  <->  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `
 z )  < 
( y `  z
)  /\  A. w  e.  I  ( z T w  ->  ( x `
 w )  =  ( y `  w
) ) ) ) ) )
2019opabbidv 4352 . . . . 5  |-  ( ( r  =  T  /\  i  =  I )  ->  { <. x ,  y
>.  |  ( {
x ,  y } 
C_  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  /\  E. z  e.  i  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  i  (
z r w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) }  =  { <. x ,  y
>.  |  ( {
x ,  y } 
C_  D  /\  E. z  e.  I  (
( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
21 df-ltbag 17414 . . . . 5  |-  <bag  =  ( r  e.  _V , 
i  e.  _V  |->  {
<. x ,  y >.  |  ( { x ,  y }  C_  { h  e.  ( NN0 
^m  i )  |  ( `' h " NN )  e.  Fin }  /\  E. z  e.  i  ( ( x `
 z )  < 
( y `  z
)  /\  A. w  e.  i  ( z
r w  ->  (
x `  w )  =  ( y `  w ) ) ) ) } )
22 vex 2973 . . . . . . . . 9  |-  x  e. 
_V
23 vex 2973 . . . . . . . . 9  |-  y  e. 
_V
2422, 23prss 4024 . . . . . . . 8  |-  ( ( x  e.  D  /\  y  e.  D )  <->  { x ,  y } 
C_  D )
2524anbi1i 690 . . . . . . 7  |-  ( ( ( x  e.  D  /\  y  e.  D
)  /\  E. z  e.  I  ( (
x `  z )  <  ( y `  z
)  /\  A. w  e.  I  ( z T w  ->  ( x `
 w )  =  ( y `  w
) ) ) )  <-> 
( { x ,  y }  C_  D  /\  E. z  e.  I 
( ( x `  z )  <  (
y `  z )  /\  A. w  e.  I 
( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) ) )
2625opabbii 4353 . . . . . 6  |-  { <. x ,  y >.  |  ( ( x  e.  D  /\  y  e.  D
)  /\  E. z  e.  I  ( (
x `  z )  <  ( y `  z
)  /\  A. w  e.  I  ( z T w  ->  ( x `
 w )  =  ( y `  w
) ) ) ) }  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) }
27 ovex 6115 . . . . . . . . . 10  |-  ( NN0 
^m  I )  e. 
_V
2827rabex 4440 . . . . . . . . 9  |-  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin }  e.  _V
2910, 28eqeltri 2511 . . . . . . . 8  |-  D  e. 
_V
3029, 29xpex 6507 . . . . . . 7  |-  ( D  X.  D )  e. 
_V
31 opabssxp 4907 . . . . . . 7  |-  { <. x ,  y >.  |  ( ( x  e.  D  /\  y  e.  D
)  /\  E. z  e.  I  ( (
x `  z )  <  ( y `  z
)  /\  A. w  e.  I  ( z T w  ->  ( x `
 w )  =  ( y `  w
) ) ) ) }  C_  ( D  X.  D )
3230, 31ssexi 4434 . . . . . 6  |-  { <. x ,  y >.  |  ( ( x  e.  D  /\  y  e.  D
)  /\  E. z  e.  I  ( (
x `  z )  <  ( y `  z
)  /\  A. w  e.  I  ( z T w  ->  ( x `
 w )  =  ( y `  w
) ) ) ) }  e.  _V
3326, 32eqeltrri 2512 . . . . 5  |-  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) }  e.  _V
3420, 21, 33ovmpt2a 6220 . . . 4  |-  ( ( T  e.  _V  /\  I  e.  _V )  ->  ( T  <bag  I )  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
354, 5, 34syl2an 474 . . 3  |-  ( ( T  e.  W  /\  I  e.  V )  ->  ( T  <bag  I )  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
362, 3, 35syl2anc 656 . 2  |-  ( ph  ->  ( T  <bag  I )  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
371, 36syl5eq 2485 1  |-  ( ph  ->  C  =  { <. x ,  y >.  |  ( { x ,  y }  C_  D  /\  E. z  e.  I  ( ( x `  z
)  <  ( y `  z )  /\  A. w  e.  I  (
z T w  -> 
( x `  w
)  =  ( y `
 w ) ) ) ) } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1364    e. wcel 1761   A.wral 2713   E.wrex 2714   {crab 2717   _Vcvv 2970    C_ wss 3325   {cpr 3876   class class class wbr 4289   {copab 4346    X. cxp 4834   `'ccnv 4835   "cima 4839   ` cfv 5415  (class class class)co 6090    ^m cmap 7210   Fincfn 7306    < clt 9414   NNcn 10318   NN0cn0 10575    <bag cltb 17403
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2263  df-mo 2264  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-ral 2718  df-rex 2719  df-rab 2722  df-v 2972  df-sbc 3184  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-op 3881  df-uni 4089  df-br 4290  df-opab 4348  df-id 4632  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-iota 5378  df-fun 5417  df-fv 5423  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-ltbag 17414
This theorem is referenced by:  ltbwe  17542
  Copyright terms: Public domain W3C validator