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

Theorem birthdaylog2 16189
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 9585 . . . . 5  |-  2  e.  NN0
3 3nn0 9586 . . . . 5  |-  3  e.  NN0
42, 3deccl 9796 . . . 4  |- ; 2 3  e.  NN0
51, 4eqeltri 2311 . . 3  |-  K  e. 
NN0
6 birthday.n . . . 4  |-  N  = ;; 3 6 5
7 6nn0 9589 . . . . . 6  |-  6  e.  NN0
83, 7deccl 9796 . . . . 5  |- ; 3 6  e.  NN0
9 5nn 9474 . . . . 5  |-  5  e.  NN
108, 9decnncl 9805 . . . 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 16188 . . 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 16185 . . . . . 6  |-  ( log `  2 )  < 
(;; 2 5 3  / ;; 3 6 5 )
185nn0cni 9580 . . . . . . . . . . . 12  |-  K  e.  CC
1918sqvali 11071 . . . . . . . . . . 11  |-  ( K ^ 2 )  =  ( K  x.  K
)
2018mulridi 8329 . . . . . . . . . . . 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 8273 . . . . . . . . . . 11  |-  1  e.  CC
2418, 18, 23subdii 8736 . . . . . . . . . 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 8604 . . . . . . . . 9  |-  ( K  -  1 )  e.  CC
28 2cn 9378 . . . . . . . . 9  |-  2  e.  CC
29 2ap0 9400 . . . . . . . . 9  |-  2 #  0
3018, 27, 28, 29divassapi 9101 . . . . . . . 8  |-  ( ( K  x.  ( K  -  1 ) )  /  2 )  =  ( K  x.  (
( K  -  1 )  /  2 ) )
31 1nn0 9584 . . . . . . . . 9  |-  1  e.  NN0
322, 2deccl 9796 . . . . . . . . . . . . 13  |- ; 2 2  e.  NN0
3332nn0cni 9580 . . . . . . . . . . . 12  |- ; 2 2  e.  CC
34 2p1e3 9441 . . . . . . . . . . . . . 14  |-  ( 2  +  1 )  =  3
35 eqid 2238 . . . . . . . . . . . . . 14  |- ; 2 2  = ; 2 2
362, 2, 34, 35decsuc 9817 . . . . . . . . . . . . 13  |-  (; 2 2  +  1 )  = ; 2 3
371, 36eqtr4i 2262 . . . . . . . . . . . 12  |-  K  =  (; 2 2  +  1 )
3833, 23, 37mvrraddi 8545 . . . . . . . . . . 11  |-  ( K  -  1 )  = ; 2
2
3938oveq1i 6095 . . . . . . . . . 10  |-  ( ( K  -  1 )  /  2 )  =  (; 2 2  /  2
)
40211multnc 9854 . . . . . . . . . . 11  |-  ( 2  x. ; 1 1 )  = ; 2
2
4131, 31deccl 9796 . . . . . . . . . . . . 13  |- ; 1 1  e.  NN0
4241nn0cni 9580 . . . . . . . . . . . 12  |- ; 1 1  e.  CC
4333, 28, 42, 29divmulapi 9099 . . . . . . . . . . 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 9449 . . . . . . . . . 10  |-  ( 3  +  2 )  =  5
482, 3, 2, 46, 47decaddi 9846 . . . . . . . . 9  |-  ( ( K  x.  1 )  +  2 )  = ; 2
5
495, 31, 31, 45, 3, 2, 48, 46decmul2c 9852 . . . . . . . 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 10070 . . . . . . 7  |-  2  e.  RR+
54 relogcl 16055 . . . . . . 7  |-  ( 2  e.  RR+  ->  ( log `  2 )  e.  RR )
5553, 54ax-mp 5 . . . . . 6  |-  ( log `  2 )  e.  RR
56 5nn0 9588 . . . . . . . . . . 11  |-  5  e.  NN0
572, 56deccl 9796 . . . . . . . . . 10  |- ; 2 5  e.  NN0
5857, 3deccl 9796 . . . . . . . . 9  |- ;; 2 5 3  e.  NN0
5950, 58eqeltri 2311 . . . . . . . 8  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e. 
NN0
6059nn0rei 9579 . . . . . . 7  |-  ( ( ( K ^ 2 )  -  K )  /  2 )  e.  RR
61 nndivre 9343 . . . . . . 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 8823 . . . . 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 8590 . . . . 5  |-  -u (
( ( ( K ^ 2 )  -  K )  /  2
)  /  N )  e.  RR
6655renegcli 8590 . . . . 5  |-  -u ( log `  2 )  e.  RR
67 eflt 15967 . . . . 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 8339 . . . . 5  |-  ( log `  2 )  e.  CC
71 efneg 12465 . . . . 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 16056 . . . . . 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 9671 . . . . . . . . 9  |-  1  e.  ZZ
795nn0zi 9671 . . . . . . . . 9  |-  K  e.  ZZ
80 fzfig 10882 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  K  e.  ZZ )  ->  ( 1 ... K
)  e.  Fin )
8178, 79, 80mp2an 430 . . . . . . . 8  |-  ( 1 ... K )  e. 
Fin
8211nnzi 9670 . . . . . . . . 9  |-  N  e.  ZZ
83 fzfig 10882 . . . . . . . . 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 11236 . . . . . 6  |-  ( T  e.  Fin  ->  (♯ `  T )  e.  NN0 )
8987, 88ax-mp 5 . . . . 5  |-  (♯ `  T
)  e.  NN0
9089nn0rei 9579 . . . 4  |-  (♯ `  T
)  e.  RR
9112, 13birthdaylem1g 16186 . . . . . . 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 11250 . . . . . 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 9343 . . . 4  |-  ( ( (♯ `  T )  e.  RR  /\  (♯ `  S
)  e.  NN )  ->  ( (♯ `  T
)  /  (♯ `  S
) )  e.  RR )
9990, 97, 98mp2an 430 . . 3  |-  ( (♯ `  T )  /  (♯ `  S ) )  e.  RR
100 reefcl 12454 . . . 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 9523 . . 3  |-  ( 1  /  2 )  e.  RR
10399, 101, 102lelttri 8433 . 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 8178   RRcr 8179   0cc0 8180   1c1 8181    + caddc 8183    x. cmul 8185    < clt 8361    <_ cle 8362    - cmin 8499   -ucneg 8500    / cdiv 9005   NNcn 9307   2c2 9358   3c3 9359   5c5 9361   6c6 9362   9c9 9365   NN0cn0 9568   ZZcz 9649  ;cdc 9782   RR+crp 10065   ...cfz 10422    seqcseq 10899   ^cexp 10990  ♯chash 11230    ~~> cli 12063   expce 12428   logclog 16049
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 8271  ax-resscn 8272  ax-1cn 8273  ax-1re 8274  ax-icn 8275  ax-addcl 8276  ax-addrcl 8277  ax-mulcl 8278  ax-mulrcl 8279  ax-addcom 8280  ax-mulcom 8281  ax-addass 8282  ax-mulass 8283  ax-distr 8284  ax-i2m1 8285  ax-0lt1 8286  ax-1rid 8287  ax-0id 8288  ax-rnegex 8289  ax-precex 8290  ax-cnre 8291  ax-pre-ltirr 8292  ax-pre-ltwlin 8293  ax-pre-lttrn 8294  ax-pre-apti 8295  ax-pre-ltadd 8296  ax-pre-mulgt0 8297  ax-pre-mulext 8298  ax-arch 8299  ax-caucvg 8300  ax-pre-suploc 8301  ax-addf 8302  ax-mulf 8303
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 7325  df-inf 7326  df-pnf 8363  df-mnf 8364  df-xr 8365  df-ltxr 8366  df-le 8367  df-sub 8501  df-neg 8502  df-reap 8906  df-ap 8913  df-div 9006  df-inn 9308  df-2 9366  df-3 9367  df-4 9368  df-5 9369  df-6 9370  df-7 9371  df-8 9372  df-9 9373  df-n0 9569  df-z 9650  df-dec 9783  df-uz 9932  df-q 10030  df-rp 10066  df-xneg 10185  df-xadd 10186  df-ioo 10305  df-ico 10307  df-icc 10308  df-fz 10423  df-fzo 10561  df-seqfrec 10900  df-exp 10991  df-fac 11180  df-bc 11202  df-ihash 11231  df-shft 11596  df-cj 11623  df-re 11624  df-im 11625  df-rsqrt 11780  df-abs 11781  df-clim 12064  df-sumdc 12139  df-ef 12434  df-e 12435  df-rest 13648  df-topgen 13667  df-psmet 14964  df-xmet 14965  df-met 14966  df-bl 14967  df-mopn 14968  df-top 15190  df-topon 15203  df-bases 15235  df-ntr 15288  df-cn 15380  df-cnp 15381  df-tx 15445  df-cncf 15763  df-limced 15848  df-dvap 15849  df-relog 16051
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator