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

Theorem birthdaylog2 16312
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 9597 . . . . 5  |-  2  e.  NN0
3 3nn0 9598 . . . . 5  |-  3  e.  NN0
42, 3deccl 9807 . . . 4  |- ; 2 3  e.  NN0
51, 4eqeltri 2311 . . 3  |-  K  e. 
NN0
6 birthday.n . . . 4  |-  N  = ;; 3 6 5
7 6nn0 9601 . . . . . 6  |-  6  e.  NN0
83, 7deccl 9807 . . . . 5  |- ; 3 6  e.  NN0
9 5nn 9486 . . . . 5  |-  5  e.  NN
108, 9decnncl 9816 . . . 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 16311 . . 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 16308 . . . . . 6  |-  ( log `  2 )  < 
(;; 2 5 3  / ;; 3 6 5 )
185nn0cni 9592 . . . . . . . . . . . 12  |-  K  e.  CC
1918sqvali 11082 . . . . . . . . . . 11  |-  ( K ^ 2 )  =  ( K  x.  K
)
2018mulridi 8340 . . . . . . . . . . . 12  |-  ( K  x.  1 )  =  K
2120eqcomi 2242 . . . . . . . . . . 11  |-  K  =  ( K  x.  1 )
2219, 21oveq12i 6104 . . . . . . . . . 10  |-  ( ( K ^ 2 )  -  K )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
23 ax-1cn 8284 . . . . . . . . . . 11  |-  1  e.  CC
2418, 18, 23subdii 8747 . . . . . . . . . 10  |-  ( K  x.  ( K  - 
1 ) )  =  ( ( K  x.  K )  -  ( K  x.  1 ) )
2522, 24eqtr4i 2262 . . . . . . . . 9  |-  ( ( K ^ 2 )  -  K )  =  ( K  x.  ( K  -  1 ) )
2625oveq1i 6102 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  =  ( ( K  x.  ( K  -  1
) )  /  2
)
2718, 23subcli 8615 . . . . . . . . 9  |-  ( K  -  1 )  e.  CC
28 2cn 9390 . . . . . . . . 9  |-  2  e.  CC
29 2ap0 9412 . . . . . . . . 9  |-  2 #  0
3018, 27, 28, 29divassapi 9112 . . . . . . . 8  |-  ( ( K  x.  ( K  -  1 ) )  /  2 )  =  ( K  x.  (
( K  -  1 )  /  2 ) )
31 1nn0 9596 . . . . . . . . 9  |-  1  e.  NN0
322, 2deccl 9807 . . . . . . . . . . . . 13  |- ; 2 2  e.  NN0
3332nn0cni 9592 . . . . . . . . . . . 12  |- ; 2 2  e.  CC
34 2p1e3 9453 . . . . . . . . . . . . . 14  |-  ( 2  +  1 )  =  3
35 eqid 2238 . . . . . . . . . . . . . 14  |- ; 2 2  = ; 2 2
362, 2, 34, 35decsuc 9828 . . . . . . . . . . . . 13  |-  (; 2 2  +  1 )  = ; 2 3
371, 36eqtr4i 2262 . . . . . . . . . . . 12  |-  K  =  (; 2 2  +  1 )
3833, 23, 37mvrraddi 8556 . . . . . . . . . . 11  |-  ( K  -  1 )  = ; 2
2
3938oveq1i 6102 . . . . . . . . . 10  |-  ( ( K  -  1 )  /  2 )  =  (; 2 2  /  2
)
40211multnc 9865 . . . . . . . . . . 11  |-  ( 2  x. ; 1 1 )  = ; 2
2
4131, 31deccl 9807 . . . . . . . . . . . . 13  |- ; 1 1  e.  NN0
4241nn0cni 9592 . . . . . . . . . . . 12  |- ; 1 1  e.  CC
4333, 28, 42, 29divmulapi 9110 . . . . . . . . . . 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 9461 . . . . . . . . . 10  |-  ( 3  +  2 )  =  5
482, 3, 2, 46, 47decaddi 9857 . . . . . . . . 9  |-  ( ( K  x.  1 )  +  2 )  = ; 2
5
495, 31, 31, 45, 3, 2, 48, 46decmul2c 9863 . . . . . . . 8  |-  ( K  x.  ( ( K  -  1 )  / 
2 ) )  = ;; 2 5 3
5026, 30, 493eqtri 2263 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  = ;; 2 5 3
5150, 6oveq12i 6104 . . . . . 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 10081 . . . . . . 7  |-  2  e.  RR+
54 relogcl 16175 . . . . . . 7  |-  ( 2  e.  RR+  ->  ( log `  2 )  e.  RR )
5553, 54ax-mp 5 . . . . . 6  |-  ( log `  2 )  e.  RR
56 5nn0 9600 . . . . . . . . . . 11  |-  5  e.  NN0
572, 56deccl 9807 . . . . . . . . . 10  |- ; 2 5  e.  NN0
5857, 3deccl 9807 . . . . . . . . 9  |- ;; 2 5 3  e.  NN0
5950, 58eqeltri 2311 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e. 
NN0
6059nn0rei 9591 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e.  RR
61 nndivre 9355 . . . . . . 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 8834 . . . . 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 8601 . . . . 5  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  e.  RR
6655renegcli 8601 . . . . 5  |-  -u ( log `  2 )  e.  RR
67 eflt 16085 . . . . 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 8350 . . . . 5  |-  ( log `  2 )  e.  CC
71 efneg 12476 . . . . 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 16176 . . . . . 6  |-  ( 2  e.  RR+  ->  ( exp `  ( log `  2
) )  =  2 )
7453, 73ax-mp 5 . . . . 5  |-  ( exp `  ( log `  2
) )  =  2
7574oveq2i 6103 . . . 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 9681 . . . . . . . . 9  |-  1  e.  ZZ
795nn0zi 9681 . . . . . . . . 9  |-  K  e.  ZZ
80 fzfig 10893 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  K  e.  ZZ )  ->  ( 1 ... K
)  e.  Fin )
8178, 79, 80mp2an 430 . . . . . . . 8  |-  ( 1 ... K )  e. 
Fin
8211nnzi 9680 . . . . . . . . 9  |-  N  e.  ZZ
83 fzfig 10893 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  N  e.  ZZ )  ->  ( 1 ... N
)  e.  Fin )
8478, 82, 83mp2an 430 . . . . . . . 8  |-  ( 1 ... N )  e. 
Fin
85 f1setfi 7328 . . . . . . . 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 11247 . . . . . 6  |-  ( T  e.  Fin  ->  (♯ `  T )  e.  NN0 )
8987, 88ax-mp 5 . . . . 5  |-  (♯ `  T
)  e.  NN0
9089nn0rei 9591 . . . 4  |-  (♯ `  T
)  e.  RR
9112, 13birthdaylem1g 16309 . . . . . . 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 11261 . . . . . 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 9355 . . . 4  |-  ( ( (♯ `  T )  e.  RR  /\  (♯ `  S
)  e.  NN )  ->  ( (♯ `  T
)  /  (♯ `  S
) )  e.  RR )
9990, 97, 98mp2an 430 . . 3  |-  ( (♯ `  T )  /  (♯ `  S ) )  e.  RR
100 reefcl 12465 . . . 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 9535 . . 3  |-  ( 1  /  2 )  e.  RR
10399, 101, 102lelttri 8444 . 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 5380   -1-1->wf1 5381   ` cfv 5384  (class class class)co 6092   Fincfn 7033   CCcc 8189   RRcr 8190   0cc0 8191   1c1 8192    + caddc 8194    x. cmul 8196    < clt 8372    <_ cle 8373    - cmin 8510    -ucneg 8511    / cdiv 9016   NNcn 9319   2c2 9370   3c3 9371   5c5 9373   6c6 9374   9c9 9377   NN0cn0 9580   ZZcz 9659  ;cdc 9793   RR+crp 10076   ...cfz 10433    seqcseq 10910   ^cexp 11001  ♯chash 11241    ~~> cli 12074   expce 12439   logclog 16169
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 8282  ax-resscn 8283  ax-1cn 8284  ax-1re 8285  ax-icn 8286  ax-addcl 8287  ax-addrcl 8288  ax-mulcl 8289  ax-mulrcl 8290  ax-addcom 8291  ax-mulcom 8292  ax-addass 8293  ax-mulass 8294  ax-distr 8295  ax-i2m1 8296  ax-0lt1 8297  ax-1rid 8298  ax-0id 8299  ax-rnegex 8300  ax-precex 8301  ax-cnre 8302  ax-pre-ltirr 8303  ax-pre-ltwlin 8304  ax-pre-lttrn 8305  ax-pre-apti 8306  ax-pre-ltadd 8307  ax-pre-mulgt0 8308  ax-pre-mulext 8309  ax-arch 8310  ax-caucvg 8311  ax-pre-suploc 8312  ax-addf 8313  ax-mulf 8314
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 5344  df-fun 5386  df-fn 5387  df-f 5388  df-f1 5389  df-fo 5390  df-f1o 5391  df-fv 5392  df-isom 5393  df-riota 6045  df-ov 6095  df-oprab 6096  df-mpo 6097  df-of 6309  df-1st 6382  df-2nd 6383  df-recs 6586  df-irdg 6651  df-frec 6672  df-1o 6697  df-oadd 6701  df-er 6817  df-map 6934  df-pm 6935  df-en 7034  df-dom 7035  df-fin 7036  df-sup 7336  df-inf 7337  df-pnf 8374  df-mnf 8375  df-xr 8376  df-ltxr 8377  df-le 8378  df-sub 8512  df-neg 8513  df-reap 8917  df-ap 8924  df-div 9017  df-inn 9320  df-2 9378  df-3 9379  df-4 9380  df-5 9381  df-6 9382  df-7 9383  df-8 9384  df-9 9385  df-n0 9581  df-z 9660  df-dec 9794  df-uz 9943  df-q 10041  df-rp 10077  df-xneg 10196  df-xadd 10197  df-ioo 10316  df-ico 10318  df-icc 10319  df-fz 10434  df-fzo 10572  df-seqfrec 10911  df-exp 11002  df-fac 11191  df-bc 11213  df-ihash 11242  df-shft 11607  df-cj 11634  df-re 11635  df-im 11636  df-rsqrt 11791  df-abs 11792  df-clim 12075  df-sumdc 12150  df-ef 12445  df-e 12446  df-rest 13659  df-topgen 13678  df-psmet 14996  df-xmet 14997  df-met 14998  df-bl 14999  df-mopn 15000  df-top 15308  df-topon 15321  df-bases 15353  df-ntr 15406  df-cn 15498  df-cnp 15499  df-tx 15563  df-cncf 15881  df-limced 15966  df-dvap 15967  df-relog 16171
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator