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

Theorem ballotlemieq 24023
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 443 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( I `  C )  =  ( I `  D ) )
21breq2d 4116 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( i  <_ 
( I `  C
)  <->  i  <_  (
I `  D )
) )
31oveq1d 5960 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( I `
 C )  +  1 )  =  ( ( I `  D
)  +  1 ) )
43oveq1d 5960 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( I `  C )  +  1 )  -  i )  =  ( ( ( I `  D )  +  1 )  -  i ) )
5 eqidd 2359 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  i  =  i )
62, 4, 5ifbieq12d 3663 . . . 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 4187 . . 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 978 . 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 24015 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
19183ad2ant1 976 . 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 24015 . . 3  |-  ( D  e.  ( O  \  E )  ->  ( S `  D )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
21203ad2ant2 977 . 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 2400 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 358    /\ w3a 934    = wceq 1642    e. wcel 1710   A.wral 2619   {crab 2623    \ cdif 3225    i^i cin 3227   ifcif 3641   ~Pcpw 3701   class class class wbr 4104    e. cmpt 4158   `'ccnv 4770   ` cfv 5337  (class class class)co 5945   supcsup 7283   RRcr 8826   0cc0 8827   1c1 8828    + caddc 8830    < clt 8957    <_ cle 8958    - cmin 9127    / cdiv 9513   NNcn 9836   ZZcz 10116   ...cfz 10874   #chash 11430
This theorem is referenced by:  ballotlemrinv0  24039
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-14 1714  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1930  ax-ext 2339  ax-rep 4212  ax-sep 4222  ax-nul 4230  ax-pr 4295
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-eu 2213  df-mo 2214  df-clab 2345  df-cleq 2351  df-clel 2354  df-nfc 2483  df-ne 2523  df-ral 2624  df-rex 2625  df-reu 2626  df-rab 2628  df-v 2866  df-sbc 3068  df-csb 3158  df-dif 3231  df-un 3233  df-in 3235  df-ss 3242  df-nul 3532  df-if 3642  df-sn 3722  df-pr 3723  df-op 3725  df-uni 3909  df-iun 3988  df-br 4105  df-opab 4159  df-mpt 4160  df-id 4391  df-xp 4777  df-rel 4778  df-cnv 4779  df-co 4780  df-dm 4781  df-rn 4782  df-res 4783  df-ima 4784  df-iota 5301  df-fun 5339  df-fn 5340  df-f 5341  df-f1 5342  df-fo 5343  df-f1o 5344  df-fv 5345  df-ov 5948
  Copyright terms: Public domain W3C validator