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

Theorem ltbval 17553
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 2981 . . . 4  |-  ( T  e.  W  ->  T  e.  _V )
5 elex 2981 . . . 4  |-  ( I  e.  V  ->  I  e.  _V )
6 simpr 461 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  i  =  I )
76oveq2d 6107 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( NN0  ^m  i
)  =  ( NN0 
^m  I ) )
8 rabeq 2966 . . . . . . . . . 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 2493 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  D )
1211sseq2d 3384 . . . . . . 7  |-  ( ( r  =  T  /\  i  =  I )  ->  ( { x ,  y }  C_  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  <->  { x ,  y }  C_  D ) )
13 simpl 457 . . . . . . . . . . . 12  |-  ( ( r  =  T  /\  i  =  I )  ->  r  =  T )
1413breqd 4303 . . . . . . . . . . 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 2931 . . . . . . . . 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 703 . . . . . . . 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 2932 . . . . . . 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 710 . . . . . 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 4355 . . . . 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 17426 . . . . 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 2975 . . . . . . . . 9  |-  x  e. 
_V
23 vex 2975 . . . . . . . . 9  |-  y  e. 
_V
2422, 23prss 4027 . . . . . . . 8  |-  ( ( x  e.  D  /\  y  e.  D )  <->  { x ,  y } 
C_  D )
2524anbi1i 695 . . . . . . 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 4356 . . . . . 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 6116 . . . . . . . . . 10  |-  ( NN0 
^m  I )  e. 
_V
2827rabex 4443 . . . . . . . . 9  |-  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin }  e.  _V
2910, 28eqeltri 2513 . . . . . . . 8  |-  D  e. 
_V
3029, 29xpex 6508 . . . . . . 7  |-  ( D  X.  D )  e. 
_V
31 opabssxp 4911 . . . . . . 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 4437 . . . . . 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 2514 . . . . 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 6221 . . . 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 477 . . 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 661 . 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 2487 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 1369    e. wcel 1756   A.wral 2715   E.wrex 2716   {crab 2719   _Vcvv 2972    C_ wss 3328   {cpr 3879   class class class wbr 4292   {copab 4349    X. cxp 4838   `'ccnv 4839   "cima 4843   ` cfv 5418  (class class class)co 6091    ^m cmap 7214   Fincfn 7310    < clt 9418   NNcn 10322   NN0cn0 10579    <bag cltb 17421
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4413  ax-nul 4421  ax-pow 4470  ax-pr 4531  ax-un 6372
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2568  df-ne 2608  df-ral 2720  df-rex 2721  df-rab 2724  df-v 2974  df-sbc 3187  df-dif 3331  df-un 3333  df-in 3335  df-ss 3342  df-nul 3638  df-if 3792  df-pw 3862  df-sn 3878  df-pr 3880  df-op 3884  df-uni 4092  df-br 4293  df-opab 4351  df-id 4636  df-xp 4846  df-rel 4847  df-cnv 4848  df-co 4849  df-dm 4850  df-iota 5381  df-fun 5420  df-fv 5426  df-ov 6094  df-oprab 6095  df-mpt2 6096  df-ltbag 17426
This theorem is referenced by:  ltbwe  17554
  Copyright terms: Public domain W3C validator