ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  birthdaylog2 Unicode version

Theorem birthdaylog2 16090
Description: The Birthday Problem. There is a more than even chance that out of 23 people in a room, at least two of them have the same birthday. Mathematically, this is asserting that for  K  =  2 3 and  N  =  3 6 5, fewer than half of the set of all functions from  1 ... K to  1 ... N are injective.

The presence of the hypothesis giving a series which converges to  ( log `  2
) is a temporary measure until it can be proved as log2cnv .

Although this is Metamath 100 proof #93, we cannot consider it proved until we prove the missing log2cnv piece (or prove the theorem another way which does not require it). (Contributed by Mario Carneiro, 17-Apr-2015.)

Hypotheses
Ref Expression
birthday.s  |-  S  =  { f  |  f : ( 1 ... K ) --> ( 1 ... N ) }
birthday.t  |-  T  =  { f  |  f : ( 1 ... K ) -1-1-> ( 1 ... N ) }
birthday.k  |-  K  = ; 2
3
birthday.n  |-  N  = ;; 3 6 5
birthdaylog2.log2cnv  |-  seq 0
(  +  ,  ( k  e.  NN0  |->  ( 2  /  ( ( 3  x.  ( ( 2  x.  k )  +  1 ) )  x.  ( 9 ^ k
) ) ) ) )  ~~>  ( log `  2
)
Assertion
Ref Expression
birthdaylog2  |-  ( ( `  T )  /  ( `  S ) )  < 
( 1  /  2
)
Distinct variable groups:    f, k, K   
f, N, k
Allowed substitution hints:    S( f,  k)    T( f,  k)

Proof of Theorem birthdaylog2
StepHypRef Expression
1 birthday.k . . . 4  |-  K  = ; 2
3
2 2nn0 9580 . . . . 5  |-  2  e.  NN0
3 3nn0 9581 . . . . 5  |-  3  e.  NN0
42, 3deccl 9791 . . . 4  |- ; 2 3  e.  NN0
51, 4eqeltri 2311 . . 3  |-  K  e. 
NN0
6 birthday.n . . . 4  |-  N  = ;; 3 6 5
7 6nn0 9584 . . . . . 6  |-  6  e.  NN0
83, 7deccl 9791 . . . . 5  |- ; 3 6  e.  NN0
9 5nn 9469 . . . . 5  |-  5  e.  NN
108, 9decnncl 9796 . . . 4  |- ;; 3 6 5  e.  NN
116, 10eqeltri 2311 . . 3  |-  N  e.  NN
12 birthday.s . . . 4  |-  S  =  { f  |  f : ( 1 ... K ) --> ( 1 ... N ) }
13 birthday.t . . . 4  |-  T  =  { f  |  f : ( 1 ... K ) -1-1-> ( 1 ... N ) }
1412, 13birthdaylem3 16089 . . 3  |-  ( ( K  e.  NN0  /\  N  e.  NN )  ->  ( ( `  T
)  /  ( `  S
) )  <_  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) ) )
155, 11, 14mp2an 430 . 2  |-  ( ( `  T )  /  ( `  S ) )  <_ 
( exp `  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N ) )
16 birthdaylog2.log2cnv . . . . . . 7  |-  seq 0
(  +  ,  ( k  e.  NN0  |->  ( 2  /  ( ( 3  x.  ( ( 2  x.  k )  +  1 ) )  x.  ( 9 ^ k
) ) ) ) )  ~~>  ( log `  2
)
1716log2ublog2 16086 . . . . . 6  |-  ( log `  2 )  < 
(;; 2 5 3  / ;; 3 6 5 )
185nn0cni 9575 . . . . . . . . . . . 12  |-  K  e.  CC
1918sqvali 11056 . . . . . . . . . . 11  |-  ( K ^ 2 )  =  ( K  x.  K
)
2018mulridi 8328 . . . . . . . . . . . 12  |-  ( K  x.  1 )  =  K
2120eqcomi 2242 . . . . . . . . . . 11  |-  K  =  ( K  x.  1 )
2219, 21oveq12i 6097 . . . . . . . . . 10  |-  ( ( K ^ 2 )  -  K )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
23 ax-1cn 8272 . . . . . . . . . . 11  |-  1  e.  CC
2418, 18, 23subdii 8734 . . . . . . . . . 10  |-  ( K  x.  ( K  - 
1 ) )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
2522, 24eqtr4i 2262 . . . . . . . . 9  |-  ( ( K ^ 2 )  -  K )  =  ( K  x.  ( K  -  1 ) )
2625oveq1i 6095 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  =  ( ( K  x.  ( K  -  1
) )  /  2
)
2718, 23subcli 8602 . . . . . . . . 9  |-  ( K  -  1 )  e.  CC
28 2cn 9375 . . . . . . . . 9  |-  2  e.  CC
29 2ap0 9397 . . . . . . . . 9  |-  2 #  0
3018, 27, 28, 29divassapi 9098 . . . . . . . 8  |-  ( ( K  x.  ( K  -  1 ) )  /  2 )  =  ( K  x.  (
( K  -  1 )  /  2 ) )
31 1nn0 9579 . . . . . . . . 9  |-  1  e.  NN0
322, 2deccl 9791 . . . . . . . . . . . . 13  |- ; 2 2  e.  NN0
3332nn0cni 9575 . . . . . . . . . . . 12  |- ; 2 2  e.  CC
34 2p1e3 9438 . . . . . . . . . . . . . 14  |-  ( 2  +  1 )  =  3
35 eqid 2238 . . . . . . . . . . . . . 14  |- ; 2 2  = ; 2 2
362, 2, 34, 35decsuc 9807 . . . . . . . . . . . . 13  |-  (; 2 2  +  1 )  = ; 2 3
371, 36eqtr4i 2262 . . . . . . . . . . . 12  |-  K  =  (; 2 2  +  1 )
3833, 23, 37mvrraddi 8543 . . . . . . . . . . 11  |-  ( K  -  1 )  = ; 2
2
3938oveq1i 6095 . . . . . . . . . 10  |-  ( ( K  -  1 )  /  2 )  =  (; 2 2  /  2
)
40211multnc 9844 . . . . . . . . . . 11  |-  ( 2  x. ; 1 1 )  = ; 2
2
4131, 31deccl 9791 . . . . . . . . . . . . 13  |- ; 1 1  e.  NN0
4241nn0cni 9575 . . . . . . . . . . . 12  |- ; 1 1  e.  CC
4333, 28, 42, 29divmulapi 9096 . . . . . . . . . . 11  |-  ( (; 2
2  /  2 )  = ; 1 1  <->  ( 2  x. ; 1 1 )  = ; 2
2 )
4440, 43mpbir 146 . . . . . . . . . 10  |-  (; 2 2  /  2
)  = ; 1 1
4539, 44eqtri 2259 . . . . . . . . 9  |-  ( ( K  -  1 )  /  2 )  = ; 1
1
4620, 1eqtri 2259 . . . . . . . . . 10  |-  ( K  x.  1 )  = ; 2
3
47 3p2e5 9446 . . . . . . . . . 10  |-  ( 3  +  2 )  =  5
482, 3, 2, 46, 47decaddi 9836 . . . . . . . . 9  |-  ( ( K  x.  1 )  +  2 )  = ; 2
5
495, 31, 31, 45, 3, 2, 48, 46decmul2c 9842 . . . . . . . 8  |-  ( K  x.  ( ( K  -  1 )  / 
2 ) )  = ;; 2 5 3
5026, 30, 493eqtri 2263 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  = ;; 2 5 3
5150, 6oveq12i 6097 . . . . . 6  |-  ( ( ( ( K ^
2 )  -  K
)  /  2 )  /  N )  =  (;; 2 5 3  / ;; 3 6 5 )
5217, 51breqtrri 4157 . . . . 5  |-  ( log `  2 )  < 
( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)
53 2rp 10059 . . . . . . 7  |-  2  e.  RR+
54 relogcl 15963 . . . . . . 7  |-  ( 2  e.  RR+  ->  ( log `  2 )  e.  RR )
5553, 54ax-mp 5 . . . . . 6  |-  ( log `  2 )  e.  RR
56 5nn0 9583 . . . . . . . . . . 11  |-  5  e.  NN0
572, 56deccl 9791 . . . . . . . . . 10  |- ; 2 5  e.  NN0
5857, 3deccl 9791 . . . . . . . . 9  |- ;; 2 5 3  e.  NN0
5950, 58eqeltri 2311 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e. 
NN0
6059nn0rei 9574 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e.  RR
61 nndivre 9340 . . . . . . 7  |-  ( ( ( ( ( K ^ 2 )  -  K )  /  2
)  e.  RR  /\  N  e.  NN )  ->  ( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)  e.  RR )
6260, 11, 61mp2an 430 . . . . . 6  |-  ( ( ( ( K ^
2 )  -  K
)  /  2 )  /  N )  e.  RR
6355, 62ltnegi 8821 . . . . 5  |-  ( ( log `  2 )  <  ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N )  <->  -u ( ( ( ( K ^
2 )  -  K
)  /  2 )  /  N )  <  -u ( log `  2
) )
6452, 63mpbi 145 . . . 4  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  <  -u ( log `  2
)
6562renegcli 8588 . . . . 5  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  e.  RR
6655renegcli 8588 . . . . 5  |-  -u ( log `  2 )  e.  RR
67 eflt 15876 . . . . 5  |-  ( (
-u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N )  e.  RR  /\  -u ( log `  2
)  e.  RR )  ->  ( -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  <  -u ( log `  2
)  <->  ( exp `  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N ) )  <  ( exp `  -u ( log `  2
) ) ) )
6865, 66, 67mp2an 430 . . . 4  |-  ( -u ( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)  <  -u ( log `  2 )  <->  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
) )  <  ( exp `  -u ( log `  2
) ) )
6964, 68mpbi 145 . . 3  |-  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  < 
( exp `  -u ( log `  2 ) )
7055recni 8338 . . . . 5  |-  ( log `  2 )  e.  CC
71 efneg 12446 . . . . 5  |-  ( ( log `  2 )  e.  CC  ->  ( exp `  -u ( log `  2
) )  =  ( 1  /  ( exp `  ( log `  2
) ) ) )
7270, 71ax-mp 5 . . . 4  |-  ( exp `  -u ( log `  2
) )  =  ( 1  /  ( exp `  ( log `  2
) ) )
73 reeflog 15964 . . . . . 6  |-  ( 2  e.  RR+  ->  ( exp `  ( log `  2
) )  =  2 )
7453, 73ax-mp 5 . . . . 5  |-  ( exp `  ( log `  2
) )  =  2
7574oveq2i 6096 . . . 4  |-  ( 1  /  ( exp `  ( log `  2 ) ) )  =  ( 1  /  2 )
7672, 75eqtri 2259 . . 3  |-  ( exp `  -u ( log `  2
) )  =  ( 1  /  2 )
7769, 76breqtri 4155 . 2  |-  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  < 
( 1  /  2
)
7831nn0zi 9666 . . . . . . . . 9  |-  1  e.  ZZ
795nn0zi 9666 . . . . . . . . 9  |-  K  e.  ZZ
80 fzfig 10867 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  K  e.  ZZ )  ->  ( 1 ... K
)  e.  Fin )
8178, 79, 80mp2an 430 . . . . . . . 8  |-  ( 1 ... K )  e. 
Fin
8211nnzi 9665 . . . . . . . . 9  |-  N  e.  ZZ
83 fzfig 10867 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  N  e.  ZZ )  ->  ( 1 ... N
)  e.  Fin )
8478, 82, 83mp2an 430 . . . . . . . 8  |-  ( 1 ... N )  e. 
Fin
85 f1setfi 7317 . . . . . . . 8  |-  ( ( ( 1 ... K
)  e.  Fin  /\  ( 1 ... N
)  e.  Fin )  ->  { f  |  f : ( 1 ... K ) -1-1-> ( 1 ... N ) }  e.  Fin )
8681, 84, 85mp2an 430 . . . . . . 7  |-  { f  |  f : ( 1 ... K )
-1-1-> ( 1 ... N
) }  e.  Fin
8713, 86eqeltri 2311 . . . . . 6  |-  T  e. 
Fin
88 hashcl 11220 . . . . . 6  |-  ( T  e.  Fin  ->  ( `  T )  e.  NN0 )
8987, 88ax-mp 5 . . . . 5  |-  ( `  T
)  e.  NN0
9089nn0rei 9574 . . . 4  |-  ( `  T
)  e.  RR
9112, 13birthdaylem1g 16087 . . . . . . 7  |-  ( ( K  e.  NN0  /\  N  e.  NN )  ->  ( T  C_  S  /\  S  e.  Fin  /\  S  =/=  (/) ) )
925, 11, 91mp2an 430 . . . . . 6  |-  ( T 
C_  S  /\  S  e.  Fin  /\  S  =/=  (/) )
9392simp3i 1039 . . . . 5  |-  S  =/=  (/)
9492simp2i 1038 . . . . . 6  |-  S  e. 
Fin
95 hashnncl 11234 . . . . . 6  |-  ( S  e.  Fin  ->  (
( `  S )  e.  NN  <->  S  =/=  (/) ) )
9694, 95ax-mp 5 . . . . 5  |-  ( ( `  S )  e.  NN  <->  S  =/=  (/) )
9793, 96mpbir 146 . . . 4  |-  ( `  S
)  e.  NN
98 nndivre 9340 . . . 4  |-  ( ( ( `  T )  e.  RR  /\  ( `  S
)  e.  NN )  ->  ( ( `  T
)  /  ( `  S
) )  e.  RR )
9990, 97, 98mp2an 430 . . 3  |-  ( ( `  T )  /  ( `  S ) )  e.  RR
100 reefcl 12435 . . . 4  |-  ( -u ( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)  e.  RR  ->  ( exp `  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N ) )  e.  RR )
10165, 100ax-mp 5 . . 3  |-  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  e.  RR
102 halfre 9518 . . 3  |-  ( 1  /  2 )  e.  RR
10399, 101, 102lelttri 8431 . 2  |-  ( ( ( ( `  T
)  /  ( `  S
) )  <_  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  /\  ( exp `  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N ) )  <  ( 1  /  2 ) )  ->  ( ( `  T
)  /  ( `  S
) )  <  (
1  /  2 ) )
10415, 77, 103mp2an 430 1  |-  ( ( `  T )  /  ( `  S ) )  < 
( 1  /  2
)
Colors of variables:    wff set class
This proof depends on syntax axioms:    <-> wb 105    /\ w3a 1009    = wceq 1402    e. wcel 2209   {cab 2224    =/= wne 2420    C_ wss 3220   (/)c0 3520   class class class wbr 4130    |-> cmpt 4192   -->wf 5373   -1-1->wf1 5374   ` cfv 5377  (class class class)co 6085   Fincfn 7022   CCcc 8177   RRcr 8178   0cc0 8179   1c1 8180    + caddc 8182    x. cmul 8184    < clt 8360    <_ cle 8361    - cmin 8497   -ucneg 8498    / cdiv 9002   NNcn 9304   2c2 9355   3c3 9356   5c5 9358   6c6 9359   9c9 9362   NN0cn0 9563   ZZcz 9644  ;cdc 9777   RR+crp 10054   ...cfz 10411    seqcseq 10884   ^cexp 10975  ♯chash 11214    ~~> cli 12044   expce 12409   logclog 15957
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 623  ax-in2 624  ax-io 721  ax-5 1500  ax-7 1501  ax-gen 1502  ax-ie1 1546  ax-ie2 1547  ax-8 1557  ax-10 1558  ax-11 1559  ax-i12 1560  ax-bndl 1562  ax-4 1563  ax-17 1579  ax-i9 1583  ax-ial 1587  ax-i5r 1588  ax-14 2212  ax-ext 2220  ax-coll 4246  ax-sep 4249  ax-nul 4259  ax-pow 4311  ax-pr 4346  ax-un 4578  ax-setind 4684  ax-iinf 4735  ax-cnex 8270  ax-resscn 8271  ax-1cn 8272  ax-1re 8273  ax-icn 8274  ax-addcl 8275  ax-addrcl 8276  ax-mulcl 8277  ax-mulrcl 8278  ax-addcom 8279  ax-mulcom 8280  ax-addass 8281  ax-mulass 8282  ax-distr 8283  ax-i2m1 8284  ax-0lt1 8285  ax-1rid 8286  ax-0id 8287  ax-rnegex 8288  ax-precex 8289  ax-cnre 8290  ax-pre-ltirr 8291  ax-pre-ltwlin 8292  ax-pre-lttrn 8293  ax-pre-apti 8294  ax-pre-ltadd 8295  ax-pre-mulgt0 8296  ax-pre-mulext 8297  ax-arch 8298  ax-caucvg 8299  ax-pre-suploc 8300  ax-addf 8301  ax-mulf 8302
This proof depends on definitions:  df-bi 117  df-stab 843  df-dc 847  df-3or 1010  df-3an 1011  df-tru 1405  df-fal 1408  df-nf 1514  df-sb 1816  df-eu 2089  df-mo 2090  df-clab 2225  df-cleq 2231  df-clel 2234  df-nfc 2381  df-ne 2421  df-nel 2516  df-ral 2533  df-rex 2534  df-reu 2535  df-rmo 2536  df-rab 2537  df-v 2823  df-sbc 3052  df-csb 3148  df-dif 3222  df-un 3224  df-in 3226  df-ss 3233  df-nul 3521  df-if 3639  df-pw 3690  df-sn 3715  df-pr 3716  df-op 3718  df-uni 3936  df-int 3971  df-iun 4014  df-disj 4107  df-br 4131  df-opab 4193  df-mpt 4194  df-tr 4230  df-id 4438  df-po 4441  df-iso 4442  df-iord 4511  df-on 4513  df-ilim 4514  df-suc 4516  df-iom 4738  df-xp 4780  df-rel 4781  df-cnv 4782  df-co 4783  df-dm 4784  df-rn 4785  df-res 4786  df-ima 4787  df-iota 5337  df-fun 5379  df-fn 5380  df-f 5381  df-f1 5382  df-fo 5383  df-f1o 5384  df-fv 5385  df-isom 5386  df-riota 6038  df-ov 6088  df-oprab 6089  df-mpo 6090  df-of 6302  df-1st 6374  df-2nd 6375  df-recs 6576  df-irdg 6641  df-frec 6662  df-1o 6687  df-oadd 6691  df-er 6807  df-map 6924  df-pm 6925  df-en 7023  df-dom 7024  df-fin 7025  df-sup 7324  df-inf 7325  df-pnf 8362  df-mnf 8363  df-xr 8364  df-ltxr 8365  df-le 8366  df-sub 8499  df-neg 8500  df-reap 8903  df-ap 8910  df-div 9003  df-inn 9305  df-2 9363  df-3 9364  df-4 9365  df-5 9366  df-6 9367  df-7 9368  df-8 9369  df-9 9370  df-n0 9564  df-z 9645  df-dec 9778  df-uz 9922  df-q 10020  df-rp 10055  df-xneg 10174  df-xadd 10175  df-ioo 10294  df-ico 10296  df-icc 10297  df-fz 10412  df-fzo 10550  df-seqfrec 10885  df-exp 10976  df-fac 11164  df-bc 11186  df-ihash 11215  df-shft 11580  df-cj 11607  df-re 11608  df-im 11609  df-rsqrt 11764  df-abs 11765  df-clim 12045  df-sumdc 12120  df-ef 12415  df-e 12416  df-rest 13595  df-topgen 13614  df-psmet 14880  df-xmet 14881  df-met 14882  df-bl 14883  df-mopn 14884  df-top 15099  df-topon 15112  df-bases 15144  df-ntr 15197  df-cn 15289  df-cnp 15290  df-tx 15354  df-cncf 15672  df-limced 15757  df-dvap 15758  df-relog 15959
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator