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

Theorem birthdaylog2 16073
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 9563 . . . . 5  |-  2  e.  NN0
3 3nn0 9564 . . . . 5  |-  3  e.  NN0
42, 3deccl 9774 . . . 4  |- ; 2 3  e.  NN0
51, 4eqeltri 2311 . . 3  |-  K  e. 
NN0
6 birthday.n . . . 4  |-  N  = ;; 3 6 5
7 6nn0 9567 . . . . . 6  |-  6  e.  NN0
83, 7deccl 9774 . . . . 5  |- ; 3 6  e.  NN0
9 5nn 9452 . . . . 5  |-  5  e.  NN
108, 9decnncl 9779 . . . 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 16072 . . 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 16069 . . . . . 6  |-  ( log `  2 )  < 
(;; 2 5 3  / ;; 3 6 5 )
185nn0cni 9558 . . . . . . . . . . . 12  |-  K  e.  CC
1918sqvali 11039 . . . . . . . . . . 11  |-  ( K ^ 2 )  =  ( K  x.  K
)
2018mulridi 8322 . . . . . . . . . . . 12  |-  ( K  x.  1 )  =  K
2120eqcomi 2242 . . . . . . . . . . 11  |-  K  =  ( K  x.  1 )
2219, 21oveq12i 6091 . . . . . . . . . 10  |-  ( ( K ^ 2 )  -  K )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
23 ax-1cn 8266 . . . . . . . . . . 11  |-  1  e.  CC
2418, 18, 23subdii 8728 . . . . . . . . . 10  |-  ( K  x.  ( K  - 
1 ) )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
2522, 24eqtr4i 2262 . . . . . . . . 9  |-  ( ( K ^ 2 )  -  K )  =  ( K  x.  ( K  -  1 ) )
2625oveq1i 6089 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  =  ( ( K  x.  ( K  -  1
) )  /  2
)
2718, 23subcli 8596 . . . . . . . . 9  |-  ( K  -  1 )  e.  CC
28 2cn 9358 . . . . . . . . 9  |-  2  e.  CC
29 2ap0 9380 . . . . . . . . 9  |-  2 #  0
3018, 27, 28, 29divassapi 9092 . . . . . . . 8  |-  ( ( K  x.  ( K  -  1 ) )  /  2 )  =  ( K  x.  (
( K  -  1 )  /  2 ) )
31 1nn0 9562 . . . . . . . . 9  |-  1  e.  NN0
322, 2deccl 9774 . . . . . . . . . . . . 13  |- ; 2 2  e.  NN0
3332nn0cni 9558 . . . . . . . . . . . 12  |- ; 2 2  e.  CC
34 2p1e3 9421 . . . . . . . . . . . . . 14  |-  ( 2  +  1 )  =  3
35 eqid 2238 . . . . . . . . . . . . . 14  |- ; 2 2  = ; 2 2
362, 2, 34, 35decsuc 9790 . . . . . . . . . . . . 13  |-  (; 2 2  +  1 )  = ; 2 3
371, 36eqtr4i 2262 . . . . . . . . . . . 12  |-  K  =  (; 2 2  +  1 )
3833, 23, 37mvrraddi 8537 . . . . . . . . . . 11  |-  ( K  -  1 )  = ; 2
2
3938oveq1i 6089 . . . . . . . . . 10  |-  ( ( K  -  1 )  /  2 )  =  (; 2 2  /  2
)
40211multnc 9827 . . . . . . . . . . 11  |-  ( 2  x. ; 1 1 )  = ; 2
2
4131, 31deccl 9774 . . . . . . . . . . . . 13  |- ; 1 1  e.  NN0
4241nn0cni 9558 . . . . . . . . . . . 12  |- ; 1 1  e.  CC
4333, 28, 42, 29divmulapi 9090 . . . . . . . . . . 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 9429 . . . . . . . . . 10  |-  ( 3  +  2 )  =  5
482, 3, 2, 46, 47decaddi 9819 . . . . . . . . 9  |-  ( ( K  x.  1 )  +  2 )  = ; 2
5
495, 31, 31, 45, 3, 2, 48, 46decmul2c 9825 . . . . . . . 8  |-  ( K  x.  ( ( K  -  1 )  / 
2 ) )  = ;; 2 5 3
5026, 30, 493eqtri 2263 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  = ;; 2 5 3
5150, 6oveq12i 6091 . . . . . 6  |-  ( ( ( ( K ^
2 )  -  K
)  /  2 )  /  N )  =  (;; 2 5 3  / ;; 3 6 5 )
5217, 51breqtrri 4155 . . . . 5  |-  ( log `  2 )  < 
( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)
53 2rp 10042 . . . . . . 7  |-  2  e.  RR+
54 relogcl 15946 . . . . . . 7  |-  ( 2  e.  RR+  ->  ( log `  2 )  e.  RR )
5553, 54ax-mp 5 . . . . . 6  |-  ( log `  2 )  e.  RR
56 5nn0 9566 . . . . . . . . . . 11  |-  5  e.  NN0
572, 56deccl 9774 . . . . . . . . . 10  |- ; 2 5  e.  NN0
5857, 3deccl 9774 . . . . . . . . 9  |- ;; 2 5 3  e.  NN0
5950, 58eqeltri 2311 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e. 
NN0
6059nn0rei 9557 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e.  RR
61 nndivre 9323 . . . . . . 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 8815 . . . . 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 8582 . . . . 5  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  e.  RR
6655renegcli 8582 . . . . 5  |-  -u ( log `  2 )  e.  RR
67 eflt 15859 . . . . 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 8332 . . . . 5  |-  ( log `  2 )  e.  CC
71 efneg 12429 . . . . 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 15947 . . . . . 6  |-  ( 2  e.  RR+  ->  ( exp `  ( log `  2
) )  =  2 )
7453, 73ax-mp 5 . . . . 5  |-  ( exp `  ( log `  2
) )  =  2
7574oveq2i 6090 . . . 4  |-  ( 1  /  ( exp `  ( log `  2 ) ) )  =  ( 1  /  2 )
7672, 75eqtri 2259 . . 3  |-  ( exp `  -u ( log `  2
) )  =  ( 1  /  2 )
7769, 76breqtri 4153 . 2  |-  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  < 
( 1  /  2
)
7831nn0zi 9649 . . . . . . . . 9  |-  1  e.  ZZ
795nn0zi 9649 . . . . . . . . 9  |-  K  e.  ZZ
80 fzfig 10850 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  K  e.  ZZ )  ->  ( 1 ... K
)  e.  Fin )
8178, 79, 80mp2an 430 . . . . . . . 8  |-  ( 1 ... K )  e. 
Fin
8211nnzi 9648 . . . . . . . . 9  |-  N  e.  ZZ
83 fzfig 10850 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  N  e.  ZZ )  ->  ( 1 ... N
)  e.  Fin )
8478, 82, 83mp2an 430 . . . . . . . 8  |-  ( 1 ... N )  e. 
Fin
85 f1setfi 7311 . . . . . . . 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 11203 . . . . . 6  |-  ( T  e.  Fin  ->  ( `  T )  e.  NN0 )
8987, 88ax-mp 5 . . . . 5  |-  ( `  T
)  e.  NN0
9089nn0rei 9557 . . . 4  |-  ( `  T
)  e.  RR
9112, 13birthdaylem1g 16070 . . . . . . 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 11217 . . . . . 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 9323 . . . 4  |-  ( ( ( `  T )  e.  RR  /\  ( `  S
)  e.  NN )  ->  ( ( `  T
)  /  ( `  S
) )  e.  RR )
9990, 97, 98mp2an 430 . . 3  |-  ( ( `  T )  /  ( `  S ) )  e.  RR
100 reefcl 12418 . . . 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 9501 . . 3  |-  ( 1  /  2 )  e.  RR
10399, 101, 102lelttri 8425 . 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
Syntax hints:    <-> wb 105    /\ w3a 1009    = wceq 1402    e. wcel 2209   {cab 2224    =/= wne 2420    C_ wss 3220   (/)c0 3520   class class class wbr 4128    |-> cmpt 4190   -->wf 5371   -1-1->wf1 5372   ` cfv 5375  (class class class)co 6079   Fincfn 7016   CCcc 8171   RRcr 8172   0cc0 8173   1c1 8174    + caddc 8176    x. cmul 8178    < clt 8354    <_ cle 8355    - cmin 8491   -ucneg 8492    / cdiv 8996   NNcn 9287   2c2 9338   3c3 9339   5c5 9341   6c6 9342   9c9 9345   NN0cn0 9546   ZZcz 9627  ;cdc 9760   RR+crp 10037   ...cfz 10394    seqcseq 10867   ^cexp 10958  ♯chash 11197    ~~> cli 12027   expce 12392   logclog 15940
This theorem was proved from 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 4244  ax-sep 4247  ax-nul 4257  ax-pow 4309  ax-pr 4344  ax-un 4576  ax-setind 4682  ax-iinf 4733  ax-cnex 8264  ax-resscn 8265  ax-1cn 8266  ax-1re 8267  ax-icn 8268  ax-addcl 8269  ax-addrcl 8270  ax-mulcl 8271  ax-mulrcl 8272  ax-addcom 8273  ax-mulcom 8274  ax-addass 8275  ax-mulass 8276  ax-distr 8277  ax-i2m1 8278  ax-0lt1 8279  ax-1rid 8280  ax-0id 8281  ax-rnegex 8282  ax-precex 8283  ax-cnre 8284  ax-pre-ltirr 8285  ax-pre-ltwlin 8286  ax-pre-lttrn 8287  ax-pre-apti 8288  ax-pre-ltadd 8289  ax-pre-mulgt0 8290  ax-pre-mulext 8291  ax-arch 8292  ax-caucvg 8293  ax-pre-suploc 8294  ax-addf 8295  ax-mulf 8296
This theorem 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 3714  df-pr 3715  df-op 3717  df-uni 3934  df-int 3969  df-iun 4012  df-disj 4105  df-br 4129  df-opab 4191  df-mpt 4192  df-tr 4228  df-id 4436  df-po 4439  df-iso 4440  df-iord 4509  df-on 4511  df-ilim 4512  df-suc 4514  df-iom 4736  df-xp 4778  df-rel 4779  df-cnv 4780  df-co 4781  df-dm 4782  df-rn 4783  df-res 4784  df-ima 4785  df-iota 5335  df-fun 5377  df-fn 5378  df-f 5379  df-f1 5380  df-fo 5381  df-f1o 5382  df-fv 5383  df-isom 5384  df-riota 6032  df-ov 6082  df-oprab 6083  df-mpo 6084  df-of 6296  df-1st 6368  df-2nd 6369  df-recs 6570  df-irdg 6635  df-frec 6656  df-1o 6681  df-oadd 6685  df-er 6801  df-map 6918  df-pm 6919  df-en 7017  df-dom 7018  df-fin 7019  df-sup 7318  df-inf 7319  df-pnf 8356  df-mnf 8357  df-xr 8358  df-ltxr 8359  df-le 8360  df-sub 8493  df-neg 8494  df-reap 8897  df-ap 8904  df-div 8997  df-inn 9288  df-2 9346  df-3 9347  df-4 9348  df-5 9349  df-6 9350  df-7 9351  df-8 9352  df-9 9353  df-n0 9547  df-z 9628  df-dec 9761  df-uz 9905  df-q 10003  df-rp 10038  df-xneg 10157  df-xadd 10158  df-ioo 10277  df-ico 10279  df-icc 10280  df-fz 10395  df-fzo 10533  df-seqfrec 10868  df-exp 10959  df-fac 11147  df-bc 11169  df-ihash 11198  df-shft 11563  df-cj 11590  df-re 11591  df-im 11592  df-rsqrt 11747  df-abs 11748  df-clim 12028  df-sumdc 12103  df-ef 12398  df-e 12399  df-rest 13578  df-topgen 13597  df-psmet 14863  df-xmet 14864  df-met 14865  df-bl 14866  df-mopn 14867  df-top 15082  df-topon 15095  df-bases 15127  df-ntr 15180  df-cn 15272  df-cnp 15273  df-tx 15337  df-cncf 15655  df-limced 15740  df-dvap 15741  df-relog 15942
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator