Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  ballotlemieq Structured version   Unicode version

Theorem ballotlemieq 27038
Description: If two countings share the same first tie, they also have the same swap function. (Contributed by Thierry Arnoux, 18-Apr-2017.)
Hypotheses
Ref Expression
ballotth.m  |-  M  e.  NN
ballotth.n  |-  N  e.  NN
ballotth.o  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
ballotth.p  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
ballotth.f  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
ballotth.e  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
ballotth.mgtn  |-  N  < 
M
ballotth.i  |-  I  =  ( c  e.  ( O  \  E ) 
|->  sup ( { k  e.  ( 1 ... ( M  +  N
) )  |  ( ( F `  c
) `  k )  =  0 } ,  RR ,  `'  <  ) )
ballotth.s  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
Assertion
Ref Expression
ballotlemieq  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  C
)  =  ( S `
 D ) )
Distinct variable groups:    M, c    N, c    O, c    i, M   
i, N    i, O    k, M    k, N    k, O    i, c, F, k    C, i, k    i, E, k    C, k    k, I, c    E, c    i, I, c    S, k    D, i, k
Allowed substitution hints:    C( x, c)    D( x, c)    P( x, i, k, c)    S( x, i, c)    E( x)    F( x)    I( x)    M( x)    N( x)    O( x)

Proof of Theorem ballotlemieq
StepHypRef Expression
1 simpl 457 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( I `  C )  =  ( I `  D ) )
21breq2d 4407 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( i  <_ 
( I `  C
)  <->  i  <_  (
I `  D )
) )
31oveq1d 6210 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( I `
 C )  +  1 )  =  ( ( I `  D
)  +  1 ) )
43oveq1d 6210 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( I `  C )  +  1 )  -  i )  =  ( ( ( I `  D )  +  1 )  -  i ) )
5 eqidd 2453 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  i  =  i )
62, 4, 5ifbieq12d 3919 . . . 4  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i )  =  if ( i  <_ 
( I `  D
) ,  ( ( ( I `  D
)  +  1 )  -  i ) ,  i ) )
76mpteq2dva 4481 . . 3  |-  ( ( I `  C )  =  ( I `  D )  ->  (
i  e.  ( 1 ... ( M  +  N ) )  |->  if ( i  <_  (
I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) )  =  ( i  e.  ( 1 ... ( M  +  N ) )  |->  if ( i  <_  (
I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
873ad2ant3 1011 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  C
) ,  ( ( ( I `  C
)  +  1 )  -  i ) ,  i ) )  =  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  D
) ,  ( ( ( I `  D
)  +  1 )  -  i ) ,  i ) ) )
9 ballotth.m . . . 4  |-  M  e.  NN
10 ballotth.n . . . 4  |-  N  e.  NN
11 ballotth.o . . . 4  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
12 ballotth.p . . . 4  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
13 ballotth.f . . . 4  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
14 ballotth.e . . . 4  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
15 ballotth.mgtn . . . 4  |-  N  < 
M
16 ballotth.i . . . 4  |-  I  =  ( c  e.  ( O  \  E ) 
|->  sup ( { k  e.  ( 1 ... ( M  +  N
) )  |  ( ( F `  c
) `  k )  =  0 } ,  RR ,  `'  <  ) )
17 ballotth.s . . . 4  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
189, 10, 11, 12, 13, 14, 15, 16, 17ballotlemsval 27030 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
19183ad2ant1 1009 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  C
)  =  ( i  e.  ( 1 ... ( M  +  N
) )  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
209, 10, 11, 12, 13, 14, 15, 16, 17ballotlemsval 27030 . . 3  |-  ( D  e.  ( O  \  E )  ->  ( S `  D )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
21203ad2ant2 1010 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  D
)  =  ( i  e.  ( 1 ... ( M  +  N
) )  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
228, 19, 213eqtr4d 2503 1  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  C
)  =  ( S `
 D ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758   A.wral 2796   {crab 2800    \ cdif 3428    i^i cin 3430   ifcif 3894   ~Pcpw 3963   class class class wbr 4395    |-> cmpt 4453   `'ccnv 4942   ` cfv 5521  (class class class)co 6195   supcsup 7796   RRcr 9387   0cc0 9388   1c1 9389    + caddc 9391    < clt 9524    <_ cle 9525    - cmin 9701    / cdiv 10099   NNcn 10428   ZZcz 10752   ...cfz 11549   #chash 12215
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1954  ax-ext 2431  ax-rep 4506  ax-sep 4516  ax-nul 4524  ax-pr 4634
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2265  df-mo 2266  df-clab 2438  df-cleq 2444  df-clel 2447  df-nfc 2602  df-ne 2647  df-ral 2801  df-rex 2802  df-reu 2803  df-rab 2805  df-v 3074  df-sbc 3289  df-csb 3391  df-dif 3434  df-un 3436  df-in 3438  df-ss 3445  df-nul 3741  df-if 3895  df-sn 3981  df-pr 3983  df-op 3987  df-uni 4195  df-iun 4276  df-br 4396  df-opab 4454  df-mpt 4455  df-id 4739  df-xp 4949  df-rel 4950  df-cnv 4951  df-co 4952  df-dm 4953  df-rn 4954  df-res 4955  df-ima 4956  df-iota 5484  df-fun 5523  df-fn 5524  df-f 5525  df-f1 5526  df-fo 5527  df-f1o 5528  df-fv 5529  df-ov 6198
This theorem is referenced by:  ballotlemrinv0  27054
  Copyright terms: Public domain W3C validator