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

Theorem ballotlemieq 24805
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 445 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( I `  C )  =  ( I `  D ) )
21breq2d 4249 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( i  <_ 
( I `  C
)  <->  i  <_  (
I `  D )
) )
31oveq1d 6125 . . . . . 6  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( I `
 C )  +  1 )  =  ( ( I `  D
)  +  1 ) )
43oveq1d 6125 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( I `  C )  +  1 )  -  i )  =  ( ( ( I `  D )  +  1 )  -  i ) )
5 eqidd 2443 . . . . 5  |-  ( ( ( I `  C
)  =  ( I `
 D )  /\  i  e.  ( 1 ... ( M  +  N ) ) )  ->  i  =  i )
62, 4, 5ifbieq12d 3785 . . . 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 4320 . . 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 981 . 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 24797 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i ) ) )
19183ad2ant1 979 . 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 24797 . . 3  |-  ( D  e.  ( O  \  E )  ->  ( S `  D )  =  ( i  e.  ( 1 ... ( M  +  N )
)  |->  if ( i  <_  ( I `  D ) ,  ( ( ( I `  D )  +  1 )  -  i ) ,  i ) ) )
21203ad2ant2 980 . 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 2484 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 360    /\ w3a 937    = wceq 1653    e. wcel 1727   A.wral 2711   {crab 2715    \ cdif 3303    i^i cin 3305   ifcif 3763   ~Pcpw 3823   class class class wbr 4237    e. cmpt 4291   `'ccnv 4906   ` cfv 5483  (class class class)co 6110   supcsup 7474   RRcr 9020   0cc0 9021   1c1 9022    + caddc 9024    < clt 9151    <_ cle 9152    - cmin 9322    / cdiv 9708   NNcn 10031   ZZcz 10313   ...cfz 11074   #chash 11649
This theorem is referenced by:  ballotlemrinv0  24821
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1668  ax-8 1689  ax-14 1731  ax-6 1746  ax-7 1751  ax-11 1763  ax-12 1953  ax-ext 2423  ax-rep 4345  ax-sep 4355  ax-nul 4363  ax-pr 4432
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2291  df-mo 2292  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-ral 2716  df-rex 2717  df-reu 2718  df-rab 2720  df-v 2964  df-sbc 3168  df-csb 3268  df-dif 3309  df-un 3311  df-in 3313  df-ss 3320  df-nul 3614  df-if 3764  df-sn 3844  df-pr 3845  df-op 3847  df-uni 4040  df-iun 4119  df-br 4238  df-opab 4292  df-mpt 4293  df-id 4527  df-xp 4913  df-rel 4914  df-cnv 4915  df-co 4916  df-dm 4917  df-rn 4918  df-res 4919  df-ima 4920  df-iota 5447  df-fun 5485  df-fn 5486  df-f 5487  df-f1 5488  df-fo 5489  df-f1o 5490  df-fv 5491  df-ov 6113
  Copyright terms: Public domain W3C validator