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

Theorem ltbval 16262
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 2830 . . . 4  |-  ( T  e.  W  ->  T  e.  _V )
5 elex 2830 . . . 4  |-  ( I  e.  V  ->  I  e.  _V )
6 simpr 447 . . . . . . . . . . 11  |-  ( ( r  =  T  /\  i  =  I )  ->  i  =  I )
76oveq2d 5916 . . . . . . . . . 10  |-  ( ( r  =  T  /\  i  =  I )  ->  ( NN0  ^m  i
)  =  ( NN0 
^m  I ) )
8 rabeq 2816 . . . . . . . . . 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 2366 . . . . . . . 8  |-  ( ( r  =  T  /\  i  =  I )  ->  { h  e.  ( NN0  ^m  i )  |  ( `' h " NN )  e.  Fin }  =  D )
1211sseq2d 3240 . . . . . . 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 4071 . . . . . . . . . . 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 2782 . . . . . . . . 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 2783 . . . . . . 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 4119 . . . . 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 16154 . . . . 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 2825 . . . . . . . . 9  |-  x  e. 
_V
23 vex 2825 . . . . . . . . 9  |-  y  e. 
_V
2422, 23prss 3806 . . . . . . . 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 4120 . . . . . 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 5925 . . . . . . . . . 10  |-  ( NN0 
^m  I )  e. 
_V
2827rabex 4202 . . . . . . . . 9  |-  { h  e.  ( NN0  ^m  I
)  |  ( `' h " NN )  e.  Fin }  e.  _V
2910, 28eqeltri 2386 . . . . . . . 8  |-  D  e. 
_V
3029, 29xpex 4838 . . . . . . 7  |-  ( D  X.  D )  e. 
_V
31 opabssxp 4799 . . . . . . 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 4196 . . . . . 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 2387 . . . . 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 6020 . . . 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 2360 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 1633    e. wcel 1701   A.wral 2577   E.wrex 2578   {crab 2581   _Vcvv 2822    C_ wss 3186   {cpr 3675   class class class wbr 4060   {copab 4113    X. cxp 4724   `'ccnv 4725   "cima 4729   ` cfv 5292  (class class class)co 5900    ^m cmap 6815   Fincfn 6906    < clt 8912   NNcn 9791   NN0cn0 10012    <bag cltb 16143
This theorem is referenced by:  ltbwe  16263
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1537  ax-5 1548  ax-17 1607  ax-9 1645  ax-8 1666  ax-13 1703  ax-14 1705  ax-6 1720  ax-7 1725  ax-11 1732  ax-12 1897  ax-ext 2297  ax-sep 4178  ax-nul 4186  ax-pow 4225  ax-pr 4251  ax-un 4549
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1533  df-nf 1536  df-sb 1640  df-eu 2180  df-mo 2181  df-clab 2303  df-cleq 2309  df-clel 2312  df-nfc 2441  df-ne 2481  df-ral 2582  df-rex 2583  df-rab 2586  df-v 2824  df-sbc 3026  df-dif 3189  df-un 3191  df-in 3193  df-ss 3200  df-nul 3490  df-if 3600  df-pw 3661  df-sn 3680  df-pr 3681  df-op 3683  df-uni 3865  df-br 4061  df-opab 4115  df-id 4346  df-xp 4732  df-rel 4733  df-cnv 4734  df-co 4735  df-dm 4736  df-iota 5256  df-fun 5294  df-fv 5300  df-ov 5903  df-oprab 5904  df-mpt2 5905  df-ltbag 16154
  Copyright terms: Public domain W3C validator