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

Theorem birthdaylog2 16228
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 9591 . . . . 5  |-  2  e.  NN0
3 3nn0 9592 . . . . 5  |-  3  e.  NN0
42, 3deccl 9802 . . . 4  |- ; 2 3  e.  NN0
51, 4eqeltri 2311 . . 3  |-  K  e. 
NN0
6 birthday.n . . . 4  |-  N  = ;; 3 6 5
7 6nn0 9595 . . . . . 6  |-  6  e.  NN0
83, 7deccl 9802 . . . . 5  |- ; 3 6  e.  NN0
9 5nn 9480 . . . . 5  |-  5  e.  NN
108, 9decnncl 9811 . . . 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 16227 . . 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 16224 . . . . . 6  |-  ( log `  2 )  < 
(;; 2 5 3  / ;; 3 6 5 )
185nn0cni 9586 . . . . . . . . . . . 12  |-  K  e.  CC
1918sqvali 11077 . . . . . . . . . . 11  |-  ( K ^ 2 )  =  ( K  x.  K
)
2018mulridi 8334 . . . . . . . . . . . 12  |-  ( K  x.  1 )  =  K
2120eqcomi 2242 . . . . . . . . . . 11  |-  K  =  ( K  x.  1 )
2219, 21oveq12i 6100 . . . . . . . . . 10  |-  ( ( K ^ 2 )  -  K )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
23 ax-1cn 8278 . . . . . . . . . . 11  |-  1  e.  CC
2418, 18, 23subdii 8741 . . . . . . . . . 10  |-  ( K  x.  ( K  - 
1 ) )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
2522, 24eqtr4i 2262 . . . . . . . . 9  |-  ( ( K ^ 2 )  -  K )  =  ( K  x.  ( K  -  1 ) )
2625oveq1i 6098 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  =  ( ( K  x.  ( K  -  1
) )  /  2
)
2718, 23subcli 8609 . . . . . . . . 9  |-  ( K  -  1 )  e.  CC
28 2cn 9384 . . . . . . . . 9  |-  2  e.  CC
29 2ap0 9406 . . . . . . . . 9  |-  2 #  0
3018, 27, 28, 29divassapi 9106 . . . . . . . 8  |-  ( ( K  x.  ( K  -  1 ) )  /  2 )  =  ( K  x.  (
( K  -  1 )  /  2 ) )
31 1nn0 9590 . . . . . . . . 9  |-  1  e.  NN0
322, 2deccl 9802 . . . . . . . . . . . . 13  |- ; 2 2  e.  NN0
3332nn0cni 9586 . . . . . . . . . . . 12  |- ; 2 2  e.  CC
34 2p1e3 9447 . . . . . . . . . . . . . 14  |-  ( 2  +  1 )  =  3
35 eqid 2238 . . . . . . . . . . . . . 14  |- ; 2 2  = ; 2 2
362, 2, 34, 35decsuc 9823 . . . . . . . . . . . . 13  |-  (; 2 2  +  1 )  = ; 2 3
371, 36eqtr4i 2262 . . . . . . . . . . . 12  |-  K  =  (; 2 2  +  1 )
3833, 23, 37mvrraddi 8550 . . . . . . . . . . 11  |-  ( K  -  1 )  = ; 2
2
3938oveq1i 6098 . . . . . . . . . 10  |-  ( ( K  -  1 )  /  2 )  =  (; 2 2  /  2
)
40211multnc 9860 . . . . . . . . . . 11  |-  ( 2  x. ; 1 1 )  = ; 2
2
4131, 31deccl 9802 . . . . . . . . . . . . 13  |- ; 1 1  e.  NN0
4241nn0cni 9586 . . . . . . . . . . . 12  |- ; 1 1  e.  CC
4333, 28, 42, 29divmulapi 9104 . . . . . . . . . . 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 9455 . . . . . . . . . 10  |-  ( 3  +  2 )  =  5
482, 3, 2, 46, 47decaddi 9852 . . . . . . . . 9  |-  ( ( K  x.  1 )  +  2 )  = ; 2
5
495, 31, 31, 45, 3, 2, 48, 46decmul2c 9858 . . . . . . . 8  |-  ( K  x.  ( ( K  -  1 )  / 
2 ) )  = ;; 2 5 3
5026, 30, 493eqtri 2263 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  = ;; 2 5 3
5150, 6oveq12i 6100 . . . . . 6  |-  ( ( ( ( K ^
2 )  -  K
)  /  2 )  /  N )  =  (;; 2 5 3  / ;; 3 6 5 )
5217, 51breqtrri 4158 . . . . 5  |-  ( log `  2 )  < 
( ( ( ( K ^ 2 )  -  K )  / 
2 )  /  N
)
53 2rp 10076 . . . . . . 7  |-  2  e.  RR+
54 relogcl 16091 . . . . . . 7  |-  ( 2  e.  RR+  ->  ( log `  2 )  e.  RR )
5553, 54ax-mp 5 . . . . . 6  |-  ( log `  2 )  e.  RR
56 5nn0 9594 . . . . . . . . . . 11  |-  5  e.  NN0
572, 56deccl 9802 . . . . . . . . . 10  |- ; 2 5  e.  NN0
5857, 3deccl 9802 . . . . . . . . 9  |- ;; 2 5 3  e.  NN0
5950, 58eqeltri 2311 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e. 
NN0
6059nn0rei 9585 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e.  RR
61 nndivre 9349 . . . . . . 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 8828 . . . . 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 8595 . . . . 5  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  e.  RR
6655renegcli 8595 . . . . 5  |-  -u ( log `  2 )  e.  RR
67 eflt 16001 . . . . 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 8344 . . . . 5  |-  ( log `  2 )  e.  CC
71 efneg 12471 . . . . 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 16092 . . . . . 6  |-  ( 2  e.  RR+  ->  ( exp `  ( log `  2
) )  =  2 )
7453, 73ax-mp 5 . . . . 5  |-  ( exp `  ( log `  2
) )  =  2
7574oveq2i 6099 . . . 4  |-  ( 1  /  ( exp `  ( log `  2 ) ) )  =  ( 1  /  2 )
7672, 75eqtri 2259 . . 3  |-  ( exp `  -u ( log `  2
) )  =  ( 1  /  2 )
7769, 76breqtri 4156 . 2  |-  ( exp `  -u ( ( ( ( K ^ 2 )  -  K )  /  2 )  /  N ) )  < 
( 1  /  2
)
7831nn0zi 9677 . . . . . . . . 9  |-  1  e.  ZZ
795nn0zi 9677 . . . . . . . . 9  |-  K  e.  ZZ
80 fzfig 10888 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  K  e.  ZZ )  ->  ( 1 ... K
)  e.  Fin )
8178, 79, 80mp2an 430 . . . . . . . 8  |-  ( 1 ... K )  e. 
Fin
8211nnzi 9676 . . . . . . . . 9  |-  N  e.  ZZ
83 fzfig 10888 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  N  e.  ZZ )  ->  ( 1 ... N
)  e.  Fin )
8478, 82, 83mp2an 430 . . . . . . . 8  |-  ( 1 ... N )  e. 
Fin
85 f1setfi 7322 . . . . . . . 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 11242 . . . . . 6  |-  ( T  e.  Fin  ->  (♯ `  T )  e.  NN0 )
8987, 88ax-mp 5 . . . . 5  |-  (♯ `  T
)  e.  NN0
9089nn0rei 9585 . . . 4  |-  (♯ `  T
)  e.  RR
9112, 13birthdaylem1g 16225 . . . . . . 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 11256 . . . . . 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 9349 . . . 4  |-  ( ( (♯ `  T )  e.  RR  /\  (♯ `  S
)  e.  NN )  ->  ( (♯ `  T
)  /  (♯ `  S
) )  e.  RR )
9990, 97, 98mp2an 430 . . 3  |-  ( (♯ `  T )  /  (♯ `  S ) )  e.  RR
100 reefcl 12460 . . . 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 9529 . . 3  |-  ( 1  /  2 )  e.  RR
10399, 101, 102lelttri 8438 . 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 4131    |-> cmpt 4193   -->wf 5376   -1-1->wf1 5377   ` cfv 5380  (class class class)co 6088   Fincfn 7026   CCcc 8183   RRcr 8184   0cc0 8185   1c1 8186    + caddc 8188    x. cmul 8190    < clt 8366    <_ cle 8367    - cmin 8504    -ucneg 8505    / cdiv 9010   NNcn 9313   2c2 9364   3c3 9365   5c5 9367   6c6 9368   9c9 9371   NN0cn0 9574   ZZcz 9655  ;cdc 9788   RR+crp 10071   ...cfz 10428    seqcseq 10905   ^cexp 10996  ♯chash 11236    ~~> cli 12069   expce 12434   logclog 16085
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 4248  ax-sep 4251  ax-nul 4261  ax-pow 4313  ax-pr 4348  ax-un 4580  ax-setind 4686  ax-iinf 4737  ax-cnex 8276  ax-resscn 8277  ax-1cn 8278  ax-1re 8279  ax-icn 8280  ax-addcl 8281  ax-addrcl 8282  ax-mulcl 8283  ax-mulrcl 8284  ax-addcom 8285  ax-mulcom 8286  ax-addass 8287  ax-mulass 8288  ax-distr 8289  ax-i2m1 8290  ax-0lt1 8291  ax-1rid 8292  ax-0id 8293  ax-rnegex 8294  ax-precex 8295  ax-cnre 8296  ax-pre-ltirr 8297  ax-pre-ltwlin 8298  ax-pre-lttrn 8299  ax-pre-apti 8300  ax-pre-ltadd 8301  ax-pre-mulgt0 8302  ax-pre-mulext 8303  ax-arch 8304  ax-caucvg 8305  ax-pre-suploc 8306  ax-addf 8307  ax-mulf 8308
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 4132  df-opab 4194  df-mpt 4195  df-tr 4232  df-id 4440  df-po 4443  df-iso 4444  df-iord 4513  df-on 4515  df-ilim 4516  df-suc 4518  df-iom 4740  df-xp 4782  df-rel 4783  df-cnv 4784  df-co 4785  df-dm 4786  df-rn 4787  df-res 4788  df-ima 4789  df-iota 5340  df-fun 5382  df-fn 5383  df-f 5384  df-f1 5385  df-fo 5386  df-f1o 5387  df-fv 5388  df-isom 5389  df-riota 6041  df-ov 6091  df-oprab 6092  df-mpo 6093  df-of 6305  df-1st 6378  df-2nd 6379  df-recs 6580  df-irdg 6645  df-frec 6666  df-1o 6691  df-oadd 6695  df-er 6811  df-map 6928  df-pm 6929  df-en 7027  df-dom 7028  df-fin 7029  df-sup 7330  df-inf 7331  df-pnf 8368  df-mnf 8369  df-xr 8370  df-ltxr 8371  df-le 8372  df-sub 8506  df-neg 8507  df-reap 8911  df-ap 8918  df-div 9011  df-inn 9314  df-2 9372  df-3 9373  df-4 9374  df-5 9375  df-6 9376  df-7 9377  df-8 9378  df-9 9379  df-n0 9575  df-z 9656  df-dec 9789  df-uz 9938  df-q 10036  df-rp 10072  df-xneg 10191  df-xadd 10192  df-ioo 10311  df-ico 10313  df-icc 10314  df-fz 10429  df-fzo 10567  df-seqfrec 10906  df-exp 10997  df-fac 11186  df-bc 11208  df-ihash 11237  df-shft 11602  df-cj 11629  df-re 11630  df-im 11631  df-rsqrt 11786  df-abs 11787  df-clim 12070  df-sumdc 12145  df-ef 12440  df-e 12441  df-rest 13654  df-topgen 13673  df-psmet 14989  df-xmet 14990  df-met 14991  df-bl 14992  df-mopn 14993  df-top 15224  df-topon 15237  df-bases 15269  df-ntr 15322  df-cn 15414  df-cnp 15415  df-tx 15479  df-cncf 15797  df-limced 15882  df-dvap 15883  df-relog 16087
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator