HomeHome Metamath Proof Explorer
Theorem List (p. 248 of 325)
< Previous  Next >
Browser slow? Try the
Unicode version.

Mirrors  >  Metamath Home Page  >  MPE Home Page  >  Theorem List Contents  >  Recent Proofs       This page: Page List

Color key:    Metamath Proof Explorer  Metamath Proof Explorer
(1-22374)
  Hilbert Space Explorer  Hilbert Space Explorer
(22375-23897)
  Users' Mathboxes  Users' Mathboxes
(23898-32447)
 

Theorem List for Metamath Proof Explorer - 24701-24800   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theoremballotlemfelz 24701*  ( F `  C ) has values in  ZZ. (Contributed by Thierry Arnoux, 23-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  ( ph  ->  C  e.  O )   &    |-  ( ph  ->  J  e.  ZZ )   =>    |-  ( ph  ->  (
 ( F `  C ) `  J )  e. 
 ZZ )
 
Theoremballotlemfp1 24702* If the  J th ballot is for A,  ( F `  C ) goes up 1. If the  J th ballot is for B,  ( F `  C ) goes down 1. (Contributed by Thierry Arnoux, 24-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  ( ph  ->  C  e.  O )   &    |-  ( ph  ->  J  e.  NN )   =>    |-  ( ph  ->  (
 ( -.  J  e.  C  ->  ( ( F `
  C ) `  J )  =  (
 ( ( F `  C ) `  ( J  -  1 ) )  -  1 ) ) 
 /\  ( J  e.  C  ->  ( ( F `
  C ) `  J )  =  (
 ( ( F `  C ) `  ( J  -  1 ) )  +  1 ) ) ) )
 
Theoremballotlemfc0 24703*  F takes value 0 between negative and positive values. (Contributed by Thierry Arnoux, 24-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  ( ph  ->  C  e.  O )   &    |-  ( ph  ->  J  e.  NN )   &    |-  ( ph  ->  E. i  e.  ( 1 ... J ) ( ( F `
  C ) `  i )  <_  0 )   &    |-  ( ph  ->  0  <  ( ( F `  C ) `  J ) )   =>    |-  ( ph  ->  E. k  e.  ( 1 ... J ) ( ( F `
  C ) `  k )  =  0
 )
 
Theoremballotlemfcc 24704*  F takes value 0 between positive and negative values. (Contributed by Thierry Arnoux, 2-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  ( ph  ->  C  e.  O )   &    |-  ( ph  ->  J  e.  NN )   &    |-  ( ph  ->  E. i  e.  ( 1 ... J ) 0  <_  (
 ( F `  C ) `  i ) )   &    |-  ( ph  ->  ( ( F `  C ) `  J )  <  0 )   =>    |-  ( ph  ->  E. k  e.  ( 1 ... J ) ( ( F `
  C ) `  k )  =  0
 )
 
Theoremballotlemfmpn 24705*  ( F `  C ) finishes counting at  ( M  -  N ). (Contributed by Thierry Arnoux, 25-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   =>    |-  ( C  e.  O  ->  ( ( F `  C ) `  ( M  +  N )
 )  =  ( M  -  N ) )
 
Theoremballotlemfval0 24706*  ( F `  C ) always starts counting at 0 . (Contributed by Thierry Arnoux, 25-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   =>    |-  ( C  e.  O  ->  ( ( F `  C ) `  0
 )  =  0 )
 
Theoremballotleme 24707* Elements of  E. (Contributed by Thierry Arnoux, 14-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   =>    |-  ( C  e.  E 
 <->  ( C  e.  O  /\  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  C ) `  i ) ) )
 
Theoremballotlemodife 24708* Elements of  ( O  \  E ). (Contributed by Thierry Arnoux, 7-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   =>    |-  ( C  e.  ( O  \  E )  <-> 
 ( C  e.  O  /\  E. i  e.  (
 1 ... ( M  +  N ) ) ( ( F `  C ) `  i )  <_ 
 0 ) )
 
Theoremballotlem4 24709* If the first pick is a vote for B, A is not ahead throughout the count (Contributed by Thierry Arnoux, 25-Nov-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   =>    |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  -.  C  e.  E ) )
 
Theoremballotlem5 24710* If A is not ahead throughout, there is a  k where votes are tied. (Contributed by Thierry Arnoux, 1-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   =>    |-  ( C  e.  ( O  \  E )  ->  E. k  e.  (
 1 ... ( M  +  N ) ) ( ( F `  C ) `  k )  =  0 )
 
Theoremballotlemi 24711* Value of  I for a given counting  C. (Contributed by Thierry Arnoux, 1-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( C  e.  ( O  \  E ) 
 ->  ( I `  C )  =  sup ( {
 k  e.  ( 1
 ... ( M  +  N ) )  |  ( ( F `  C ) `  k
 )  =  0 } ,  RR ,  `'  <  ) )
 
Theoremballotlemiex 24712* Properties of  ( I `  C ). (Contributed by Thierry Arnoux, 12-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( C  e.  ( O  \  E ) 
 ->  ( ( I `  C )  e.  (
 1 ... ( M  +  N ) )  /\  ( ( F `  C ) `  ( I `  C ) )  =  0 ) )
 
Theoremballotlemi1 24713* The first tie cannot be reached at the first pick. (Contributed by Thierry Arnoux, 12-Mar-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( ( C  e.  ( O  \  E )  /\  -.  1  e.  C )  ->  ( I `  C )  =/=  1 )
 
Theoremballotlemii 24714* The first tie cannot be reached at the first pick. (Contributed by Thierry Arnoux, 4-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( ( C  e.  ( O  \  E )  /\  1  e.  C )  ->  ( I `  C )  =/=  1 )
 
Theoremballotlemsup 24715* The set of zeroes of  F satisfies the conditions to have a supremum (Contributed by Thierry Arnoux, 1-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( C  e.  ( O  \  E ) 
 ->  E. z  e.  RR  ( A. w  e.  {
 k  e.  ( 1
 ... ( M  +  N ) )  |  ( ( F `  C ) `  k
 )  =  0 }  -.  z `'  <  w 
 /\  A. w  e.  RR  ( w `'  <  z  ->  E. y  e.  {
 k  e.  ( 1
 ... ( M  +  N ) )  |  ( ( F `  C ) `  k
 )  =  0 } w `'  <  y
 ) ) )
 
Theoremballotlemimin 24716*  ( I `  C ) is the first tie. (Contributed by Thierry Arnoux, 1-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( C  e.  ( O  \  E ) 
 ->  -.  E. k  e.  ( 1 ... (
 ( I `  C )  -  1 ) ) ( ( F `  C ) `  k
 )  =  0 )
 
Theoremballotlemic 24717* If the first vote is for B, the vote on the first tie is for A. (Contributed by Thierry Arnoux, 1-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( ( C  e.  ( O  \  E )  /\  -.  1  e.  C )  ->  ( I `  C )  e.  C )
 
Theoremballotlem1c 24718* If the first vote is for A, the vote on the first tie is for B. (Contributed by Thierry Arnoux, 4-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   =>    |-  ( ( C  e.  ( O  \  E )  /\  1  e.  C )  ->  -.  ( I `  C )  e.  C )
 
Theoremballotlemsval 24719* Value of  S (Contributed by Thierry Arnoux, 12-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( S `  C )  =  ( i  e.  ( 1 ... ( M  +  N )
 )  |->  if ( i  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  i ) ,  i
 ) ) )
 
Theoremballotlemsv 24720* Value of  S evaluated at  J for a given counting  C. (Contributed by Thierry Arnoux, 12-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) ) ) 
 ->  ( ( S `  C ) `  J )  =  if ( J  <_  ( I `  C ) ,  (
 ( ( I `  C )  +  1
 )  -  J ) ,  J ) )
 
Theoremballotlemsgt1 24721*  S maps values less than  ( I `  C ) to values greater than 1. (Contributed by Thierry Arnoux, 28-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) )  /\  J  <  ( I `  C ) )  -> 
 1  <  ( ( S `  C ) `  J ) )
 
Theoremballotlemsdom 24722* Domain of  S for a given counting  C. (Contributed by Thierry Arnoux, 12-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) ) ) 
 ->  ( ( S `  C ) `  J )  e.  ( 1 ... ( M  +  N ) ) )
 
Theoremballotlemsel1i 24723* The range  ( 1 ... ( I `  C
) ) is invariant under  ( S `  C ). (Contributed by Thierry Arnoux, 28-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( I `  C ) ) ) 
 ->  ( ( S `  C ) `  J )  e.  ( 1 ... ( I `  C ) ) )
 
Theoremballotlemsf1o 24724* The defined  S is a bijection, and an involution. (Contributed by Thierry Arnoux, 14-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( ( S `  C ) : ( 1 ... ( M  +  N ) ) -1-1-onto-> ( 1 ... ( M  +  N ) ) 
 /\  `' ( S `  C )  =  ( S `  C ) ) )
 
Theoremballotlemsi 24725* The image by  S of the first tie pick is the first pick. (Contributed by Thierry Arnoux, 14-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( ( S `  C ) `  ( I `  C ) )  =  1 )
 
Theoremballotlemsima 24726* The image by  S of an interval before the first pick. (Contributed by Thierry Arnoux, 5-May-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( I `  C ) ) ) 
 ->  ( ( S `  C ) " (
 1 ... J ) )  =  ( ( ( S `  C ) `
  J ) ... ( I `  C ) ) )
 
Theoremballotlemieq 24727* If two countings share the same first tie, they also have the same swap function. (Contributed by Thierry Arnoux, 18-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  D  e.  ( O  \  E )  /\  ( I `  C )  =  ( I `  D ) )  ->  ( S `  C )  =  ( S `  D ) )
 
Theoremballotlemrval 24728* Value of  R. (Contributed by Thierry Arnoux, 14-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  =  ( ( S `
  C ) " C ) )
 
Theoremballotlemscr 24729* The image of  ( R `  C ) by  ( S `  C ) (Contributed by Thierry Arnoux, 21-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( ( S `  C ) " ( R `  C ) )  =  C )
 
Theoremballotlemrv 24730* Value of  R evaluated at  J. (Contributed by Thierry Arnoux, 17-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) ) ) 
 ->  ( J  e.  ( R `  C )  <->  if ( J  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J )  e.  C )
 )
 
Theoremballotlemrv1 24731* Value of  R before the tie. (Contributed by Thierry Arnoux, 11-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) )  /\  J  <_  ( I `  C ) )  ->  ( J  e.  ( R `  C )  <->  ( ( ( I `  C )  +  1 )  -  J )  e.  C ) )
 
Theoremballotlemrv2 24732* Value of  R after the tie. (Contributed by Thierry Arnoux, 11-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) )  /\  ( I `  C )  <  J )  ->  ( J  e.  ( R `  C )  <->  J  e.  C ) )
 
Theoremballotlemro 24733* Range of  R is included in  O. (Contributed by Thierry Arnoux, 17-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  e.  O )
 
Theoremballotlemgval 24734* Expand the value of  .^. (Contributed by Thierry Arnoux, 21-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   =>    |-  ( ( U  e.  Fin  /\  V  e.  Fin )  ->  ( U  .^  V )  =  ( ( # `
  ( V  i^i  U ) )  -  ( # `
  ( V  \  U ) ) ) )
 
Theoremballotlemgun 24735* A property of the defined  .^ operator (Contributed by Thierry Arnoux, 26-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   &    |-  ( ph  ->  U  e.  Fin )   &    |-  ( ph  ->  V  e.  Fin )   &    |-  ( ph  ->  W  e.  Fin )   &    |-  ( ph  ->  ( V  i^i  W )  =  (/) )   =>    |-  ( ph  ->  ( U  .^  ( V  u.  W ) )  =  ( ( U  .^  V )  +  ( U  .^  W ) ) )
 
Theoremballotlemfg 24736* Express the value of  ( F `  C
) in terms of  .^. (Contributed by Thierry Arnoux, 21-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 0 ... ( M  +  N ) ) ) 
 ->  ( ( F `  C ) `  J )  =  ( C  .^  ( 1 ... J ) ) )
 
Theoremballotlemfrc 24737* Express the value of  ( F `  ( R `  C )
) in terms of the newly defined  .^. (Contributed by Thierry Arnoux, 21-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( I `  C ) ) ) 
 ->  ( ( F `  ( R `  C ) ) `  J )  =  ( C  .^  ( ( ( S `
  C ) `  J ) ... ( I `  C ) ) ) )
 
Theoremballotlemfrci 24738* Reverse counting preserves a tie at the first tie. (Contributed by Thierry Arnoux, 21-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( ( F `  ( R `  C ) ) `  ( I `
  C ) )  =  0 )
 
Theoremballotlemfrceq 24739* Value of  F for a reverse counting  ( R `  C ). (Contributed by Thierry Arnoux, 27-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   &    |-  .^  =  ( u  e. 
 Fin ,  v  e.  Fin  |->  ( ( # `  (
 v  i^i  u )
 )  -  ( # `  ( v  \  u ) ) ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( I `  C ) ) ) 
 ->  ( ( F `  C ) `  (
 ( ( S `  C ) `  J )  -  1 ) )  =  -u ( ( F `
  ( R `  C ) ) `  J ) )
 
Theoremballotlemfrcn0 24740* Value of  F for a reversed counting  ( R `  C ), before the first tie, cannot be zero . (Contributed by Thierry Arnoux, 25-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  J  e.  (
 1 ... ( M  +  N ) )  /\  J  <  ( I `  C ) )  ->  ( ( F `  ( R `  C ) ) `  J )  =/=  0 )
 
Theoremballotlemrc 24741* Range of  R. (Contributed by Thierry Arnoux, 19-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  e.  ( O  \  E ) )
 
Theoremballotlemirc 24742* Applying  R does not change first ties. (Contributed by Thierry Arnoux, 19-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( I `  ( R `
  C ) )  =  ( I `  C ) )
 
Theoremballotlemrinv0 24743* Lemma for ballotlemrinv 24744. (Contributed by Thierry Arnoux, 18-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( ( C  e.  ( O  \  E ) 
 /\  D  =  ( ( S `  C ) " C ) ) 
 ->  ( D  e.  ( O  \  E )  /\  C  =  ( ( S `  D ) " D ) ) )
 
Theoremballotlemrinv 24744*  R is its own inverse : it is an involution. (Contributed by Thierry Arnoux, 10-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  `' R  =  R
 
Theoremballotlem1ri 24745* When the vote on the first tie is for A, the first vote is also for A on the reverse counting. (Contributed by Thierry Arnoux, 18-Apr-2017.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( C  e.  ( O  \  E )  ->  ( 1  e.  ( R `  C )  <->  ( I `  C )  e.  C ) )
 
Theoremballotlem7 24746*  R is a bijection between two subsets of  ( O  \  E
): one where a vote for A is picked first, and one where a vote for B is picked first (Contributed by Thierry Arnoux, 12-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( R  |`  { c  e.  ( O  \  E )  |  1  e.  c } ) : {
 c  e.  ( O 
 \  E )  |  1  e.  c } -1-1-onto-> {
 c  e.  ( O 
 \  E )  |  -.  1  e.  c }
 
Theoremballotlem8 24747* There are as many countings with ties starting with a ballot for A as there are starting with a ballot for B. (Contributed by Thierry Arnoux, 7-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( # `  { c  e.  ( O  \  E )  |  1  e.  c } )  =  ( # `  { c  e.  ( O  \  E )  |  -.  1  e.  c } )
 
Theoremballotth 24748* Bertrand's ballot problem : the probability that A is ahead throughout the counting. (Contributed by Thierry Arnoux, 7-Dec-2016.)
 |-  M  e.  NN   &    |-  N  e.  NN   &    |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
 )  |  ( # `  c )  =  M }   &    |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `  O ) ) )   &    |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
 ( 1 ... i
 )  i^i  c )
 )  -  ( # `  ( ( 1 ... i )  \  c
 ) ) ) ) )   &    |-  E  =  {
 c  e.  O  |  A. i  e.  (
 1 ... ( M  +  N ) ) 0  <  ( ( F `
  c ) `  i ) }   &    |-  N  <  M   &    |-  I  =  ( c  e.  ( O 
 \  E )  |->  sup ( { k  e.  ( 1 ... ( M  +  N )
 )  |  ( ( F `  c ) `
  k )  =  0 } ,  RR ,  `'  <  ) )   &    |-  S  =  ( c  e.  ( O  \  E )  |->  ( i  e.  ( 1
 ... ( M  +  N ) )  |->  if ( i  <_  ( I `  c ) ,  ( ( ( I `
  c )  +  1 )  -  i
 ) ,  i ) ) )   &    |-  R  =  ( c  e.  ( O 
 \  E )  |->  ( ( S `  c
 ) " c ) )   =>    |-  ( P `  E )  =  ( ( M  -  N )  /  ( M  +  N ) )
 
19.4  Mathbox for Mario Carneiro
 
19.4.1  Miscellaneous stuff
 
Theoremquartfull 24749 The quartic equation, written out in full. This actually makes a fairly good Metamath stress test. Note that the length of this formula could be shortened significantly if the intermediate expressions were expanded and simplified, but it's not like this theorem will be used anyway. (Contributed by Mario Carneiro, 6-May-2015.)
 |-  ( ph  ->  A  e.  CC )   &    |-  ( ph  ->  B  e.  CC )   &    |-  ( ph  ->  C  e.  CC )   &    |-  ( ph  ->  D  e.  CC )   &    |-  ( ph  ->  X  e.  CC )   &    |-  ( ph  ->  ( ( ( ( (
 -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) )  =/=  0 )   &    |-  ( ph  ->  -u ( ( ( ( 2  x.  ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) )  +  ( ( ( ( ( -u (
 2  x.  ( ( B  -  ( ( 3  /  8 )  x.  ( A ^
 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) )  +  ( ( ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 2 )  +  (; 1 2  x.  (
 ( D  -  (
 ( C  x.  A )  /  4 ) )  +  ( ( ( ( A ^ 2
 )  x.  B ) 
 / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) )  /  ( ( ( ( ( -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) ) )  /  3
 )  =/=  0 )   =>    |-  ( ph  ->  ( ( ( ( X ^ 4
 )  +  ( A  x.  ( X ^
 3 ) ) )  +  ( ( B  x.  ( X ^
 2 ) )  +  ( ( C  x.  X )  +  D ) ) )  =  0  <->  ( ( X  =  ( ( -u ( A  /  4
 )  -  ( ( sqr `  -u ( ( ( ( 2  x.  ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) )  +  (
 ( ( ( (
 -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) )  +  ( ( ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 2 )  +  (; 1 2  x.  (
 ( D  -  (
 ( C  x.  A )  /  4 ) )  +  ( ( ( ( A ^ 2
 )  x.  B ) 
 / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) )  /  ( ( ( ( ( -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) ) )  /  3
 ) )  /  2
 ) )  +  ( sqr `  ( ( -u ( ( ( sqr `  -u ( ( ( ( 2  x.  ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) )  +  ( ( ( ( ( -u (
 2  x.  ( ( B  -  ( ( 3  /  8 )  x.  ( A ^
 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) )  +  ( ( ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 2 )  +  (; 1 2  x.  (
 ( D  -  (
 ( C  x.  A )  /  4 ) )  +  ( ( ( ( A ^ 2
 )  x.  B ) 
 / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) )  /  ( ( ( ( ( -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) ) )  /  3
 ) )  /  2
 ) ^ 2 )  -  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  / 
 2 ) )  +  ( ( ( ( C  -  ( ( A  x.  B ) 
 /  2 ) )  +  ( ( A ^ 3 )  / 
 8 ) )  / 
 4 )  /  (
 ( sqr `  -u ( ( ( ( 2  x.  ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) )  +  (
 ( ( ( (
 -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) )  +  ( ( ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 2 )  +  (; 1 2  x.  (
 ( D  -  (
 ( C  x.  A )  /  4 ) )  +  ( ( ( ( A ^ 2
 )  x.  B ) 
 / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) )  /  ( ( ( ( ( -u ( 2  x.  ( ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) )  +  ( sqr `  (
 ( ( ( -u ( 2  x.  (
 ( B  -  (
 ( 3  /  8
 )  x.  ( A ^ 2 ) ) ) ^ 3 ) )  -  (; 2 7  x.  (
 ( ( C  -  ( ( A  x.  B )  /  2
 ) )  +  (
 ( A ^ 3
 )  /  8 )
 ) ^ 2 ) ) )  +  (; 7 2  x.  ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) )  x.  ( ( D  -  ( ( C  x.  A )  /  4
 ) )  +  (
 ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^
 4 ) ) ) ) ) ) ) ^ 2 )  -  ( 4  x.  (
 ( ( ( B  -  ( ( 3 
 /  8 )  x.  ( A ^ 2
 ) ) ) ^
 2 )  +  (; 1 2  x.  ( ( D  -  ( ( C  x.  A )  / 
 4 ) )  +  ( ( ( ( A ^ 2 )  x.  B )  / ; 1 6 )  -  ( ( 3  / ;; 2 5 6 )  x.  ( A ^ 4
 ) ) ) ) ) ) ^ 3
 ) ) ) ) )  /  2 ) 
 ^ c  ( 1 
 /  3 ) ) ) )  /  3
 ) )  /  2
 ) ) ) ) )  \/  X  =  ( ( -u ( A  /  4 )  -  ( ( sqr `  -u (
 ( ( ( 2  x.  ( B  -  ( ( 3  / 
 8 )  x.  ( A ^ 2 ) ) ) )