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

Theorem ltbval 16213
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 2796 . . . 4  |-  ( T  e.  W  ->  T  e.  _V )
5 elex 2796 . . . 4  |-  ( I  e.  V  ->  I  e.  _V )
6 simpr 447 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  i  =  I )
76oveq2d 5874 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( NN0  ^m  i
)  =  ( NN0 
^m  I ) )
8 rabeq 2782 . . . . . . . . . 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 15 . . . . . . . . 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 2333 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  D )
1211sseq2d 3206 . . . . . . 7  |-  ( ( r  =  T  /\  i  =  I )  ->  ( { x ,  y }  C_  { h  e.  ( NN0  ^m  i
)  |  ( `' h " NN )  e.  Fin }  <->  { x ,  y }  C_  D ) )
13 simpl 443 . . . . . . . . . . . 12  |-  ( ( r  =  T  /\  i  =  I )  ->  r  =  T )
1413breqd 4034 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  ( z r w  <-> 
z T w ) )
1514imbi1d 308 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( ( z r w  ->  ( x `  w )  =  ( y `  w ) )  <->  ( z T w  ->  ( x `  w )  =  ( y `  w ) ) ) )
166, 15raleqbidv 2748 . . . . . . . . 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 684 . . . . . . . 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 2749 . . . . . . 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 691 . . . . . 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 4082 . . . . 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 16105 . . . . 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 2791 . . . . . . . . 9  |-  x  e. 
_V
23 vex 2791 . . . . . . . . 9  |-  y  e. 
_V
2422, 23prss 3769 . . . . . . . 8  |-  ( ( x  e.  D  /\  y  e.  D )  <->  { x ,  y } 
C_  D )
2524anbi1i 676 . . . . . . 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 4083 . . . . . 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 5883 . . . . . . . . . 10  |-  ( NN0 
^m  I )  e. 
_V
2827rabex 4165 . . . . . . . . 9  |-  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin }  e.  _V
2910, 28eqeltri 2353 . . . . . . . 8  |-  D  e. 
_V
3029, 29xpex 4801 . . . . . . 7  |-  ( D  X.  D )  e. 
_V
31 opabssxp 4762 . . . . . . 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 4159 . . . . . 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 2354 . . . . 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 5978 . . . 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 463 . . 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 642 . 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 2327 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 358    = wceq 1623    e. wcel 1684   A.wral 2543   E.wrex 2544   {crab 2547   _Vcvv 2788    C_ wss 3152   {cpr 3641   class class class wbr 4023   {copab 4076    X. cxp 4687   `'ccnv 4688   "cima 4692   ` cfv 5255  (class class class)co 5858    ^m cmap 6772   Fincfn 6863    < clt 8867   NNcn 9746   NN0cn0 9965    <bag cltb 16094
This theorem is referenced by:  ltbwe  16214
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-br 4024  df-opab 4078  df-id 4309  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-iota 5219  df-fun 5257  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-ltbag 16105
  Copyright terms: Public domain W3C validator