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

Theorem ballotlemieq 26829
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 454 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( I `  C )  =  ( I `  D ) )
21breq2d 4301 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( i  <_ 
( I `  C
)  <->  i  <_  (
I `  D )
) )
31oveq1d 6105 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( I `
 C )  +  1 )  =  ( ( I `  D
)  +  1 ) )
43oveq1d 6105 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( I `  C )  +  1 )  -  i )  =  ( ( ( I `  D )  +  1 )  -  i ) )
5 eqidd 2442 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  i  =  i )
62, 4, 5ifbieq12d 3813 . . . 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 4375 . . 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 1006 . 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 26821 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
19183ad2ant1 1004 . 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 26821 . . 3  |-  ( D  e.  ( O  \  E )  ->  ( S `  D )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
21203ad2ant2 1005 . 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 2483 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 960    = wceq 1364    e. wcel 1761   A.wral 2713   {crab 2717    \ cdif 3322    i^i cin 3324   ifcif 3788   ~Pcpw 3857   class class class wbr 4289    e. cmpt 4347   `'ccnv 4835   ` cfv 5415  (class class class)co 6090   supcsup 7686   RRcr 9277   0cc0 9278   1c1 9279    + caddc 9281    < clt 9414    <_ cle 9415    - cmin 9591    / cdiv 9989   NNcn 10318   ZZcz 10642   ...cfz 11433   #chash 12099
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-rep 4400  ax-sep 4410  ax-nul 4418  ax-pr 4528
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-nul 3635  df-if 3789  df-sn 3875  df-pr 3877  df-op 3881  df-uni 4089  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-id 4632  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-ov 6093
This theorem is referenced by:  ballotlemrinv0  26845
  Copyright terms: Public domain W3C validator