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

Theorem ballotlemieq 24731
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 444 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( I `  C )  =  ( I `  D ) )
21breq2d 4188 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( i  <_ 
( I `  C
)  <->  i  <_  (
I `  D )
) )
31oveq1d 6059 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( I `
 C )  +  1 )  =  ( ( I `  D
)  +  1 ) )
43oveq1d 6059 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( I `  C )  +  1 )  -  i )  =  ( ( ( I `  D )  +  1 )  -  i ) )
5 eqidd 2409 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  i  =  i )
62, 4, 5ifbieq12d 3725 . . . 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 4259 . . 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 980 . 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 24723 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
19183ad2ant1 978 . 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 24723 . . 3  |-  ( D  e.  ( O  \  E )  ->  ( S `  D )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
21203ad2ant2 979 . 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 2450 1  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  C
)  =  ( S `
 D ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    /\ w3a 936    = wceq 1649    e. wcel 1721   A.wral 2670   {crab 2674    \ cdif 3281    i^i cin 3283   ifcif 3703   ~Pcpw 3763   class class class wbr 4176    e. cmpt 4230   `'ccnv 4840   ` cfv 5417  (class class class)co 6044   supcsup 7407   RRcr 8949   0cc0 8950   1c1 8951    + caddc 8953    < clt 9080    <_ cle 9081    - cmin 9251    / cdiv 9637   NNcn 9960   ZZcz 10242   ...cfz 11003   #chash 11577
This theorem is referenced by:  ballotlemrinv0  24747
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2389  ax-rep 4284  ax-sep 4294  ax-nul 4302  ax-pr 4367
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2262  df-mo 2263  df-clab 2395  df-cleq 2401  df-clel 2404  df-nfc 2533  df-ne 2573  df-ral 2675  df-rex 2676  df-reu 2677  df-rab 2679  df-v 2922  df-sbc 3126  df-csb 3216  df-dif 3287  df-un 3289  df-in 3291  df-ss 3298  df-nul 3593  df-if 3704  df-sn 3784  df-pr 3785  df-op 3787  df-uni 3980  df-iun 4059  df-br 4177  df-opab 4231  df-mpt 4232  df-id 4462  df-xp 4847  df-rel 4848  df-cnv 4849  df-co 4850  df-dm 4851  df-rn 4852  df-res 4853  df-ima 4854  df-iota 5381  df-fun 5419  df-fn 5420  df-f 5421  df-f1 5422  df-fo 5423  df-f1o 5424  df-fv 5425  df-ov 6047
  Copyright terms: Public domain W3C validator