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

Theorem ltbval 16532
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, x, y    w, T, x, y, z
Allowed substitution hints:    ph( z, w, h)    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 2964 . . . 4  |-  ( T  e.  W  ->  T  e.  _V )
5 elex 2964 . . . 4  |-  ( I  e.  V  ->  I  e.  _V )
6 simpr 448 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  i  =  I )
76oveq2d 6097 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( NN0  ^m  i
)  =  ( NN0 
^m  I ) )
8 rabeq 2950 . . . . . . . . . 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 2486 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  D )
1211sseq2d 3376 . . . . . . 7  |-  ( ( r  =  T  /\  i  =  I )  ->  ( { x ,  y }  C_  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  <->  { x ,  y }  C_  D ) )
13 simpl 444 . . . . . . . . . . . 12  |-  ( ( r  =  T  /\  i  =  I )  ->  r  =  T )
1413breqd 4223 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  ( z r w  <-> 
z T w ) )
1514imbi1d 309 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( ( z r w  ->  ( x `  w )  =  ( y `  w ) )  <->  ( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) )
166, 15raleqbidv 2916 . . . . . . . . 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 685 . . . . . . . 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 2917 . . . . . . 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 692 . . . . . 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 4271 . . . . 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 16424 . . . . 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 2959 . . . . . . . . 9  |-  x  e. 
_V
23 vex 2959 . . . . . . . . 9  |-  y  e. 
_V
2422, 23prss 3952 . . . . . . . 8  |-  ( ( x  e.  D  /\  y  e.  D )  <->  { x ,  y } 
C_  D )
2524anbi1i 677 . . . . . . 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 4272 . . . . . 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 6106 . . . . . . . . . 10  |-  ( NN0 
^m  I )  e. 
_V
2827rabex 4354 . . . . . . . . 9  |-  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin }  e.  _V
2910, 28eqeltri 2506 . . . . . . . 8  |-  D  e. 
_V
3029, 29xpex 4990 . . . . . . 7  |-  ( D  X.  D )  e. 
_V
31 opabssxp 4950 . . . . . . 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 4348 . . . . . 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 2507 . . . . 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 6204 . . . 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 464 . . 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 643 . 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 2480 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 set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1652    e. wcel 1725   A.wral 2705   E.wrex 2706   {crab 2709   _Vcvv 2956    C_ wss 3320   {cpr 3815   class class class wbr 4212   {copab 4265    X. cxp 4876   `'ccnv 4877   "cima 4881   ` cfv 5454  (class class class)co 6081    ^m cmap 7018   Fincfn 7109    < clt 9120   NNcn 10000   NN0cn0 10221    <bag cltb 16413
This theorem is referenced by:  ltbwe  16533
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
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  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-rab 2714  df-v 2958  df-sbc 3162  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-op 3823  df-uni 4016  df-br 4213  df-opab 4267  df-id 4498  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-iota 5418  df-fun 5456  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-ltbag 16424
  Copyright terms: Public domain W3C validator