Proof of Theorem birthday
Step | Hyp | Ref
| Expression |
1 | | birthday.k |
. . . 4
⊢ 𝐾 = ;23 |
2 | | 2nn0 12278 |
. . . . 5
⊢ 2 ∈
ℕ0 |
3 | | 3nn0 12279 |
. . . . 5
⊢ 3 ∈
ℕ0 |
4 | 2, 3 | deccl 12480 |
. . . 4
⊢ ;23 ∈
ℕ0 |
5 | 1, 4 | eqeltri 2830 |
. . 3
⊢ 𝐾 ∈
ℕ0 |
6 | | birthday.n |
. . . 4
⊢ 𝑁 = ;;365 |
7 | | 6nn0 12282 |
. . . . . 6
⊢ 6 ∈
ℕ0 |
8 | 3, 7 | deccl 12480 |
. . . . 5
⊢ ;36 ∈
ℕ0 |
9 | | 5nn 12087 |
. . . . 5
⊢ 5 ∈
ℕ |
10 | 8, 9 | decnncl 12485 |
. . . 4
⊢ ;;365 ∈ ℕ |
11 | 6, 10 | eqeltri 2830 |
. . 3
⊢ 𝑁 ∈ ℕ |
12 | | birthday.s |
. . . 4
⊢ 𝑆 = {𝑓 ∣ 𝑓:(1...𝐾)⟶(1...𝑁)} |
13 | | birthday.t |
. . . 4
⊢ 𝑇 = {𝑓 ∣ 𝑓:(1...𝐾)–1-1→(1...𝑁)} |
14 | 12, 13 | birthdaylem3 26131 |
. . 3
⊢ ((𝐾 ∈ ℕ0
∧ 𝑁 ∈ ℕ)
→ ((♯‘𝑇) /
(♯‘𝑆)) ≤
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁))) |
15 | 5, 11, 14 | mp2an 688 |
. 2
⊢
((♯‘𝑇) /
(♯‘𝑆)) ≤
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁)) |
16 | | log2ub 26127 |
. . . . . 6
⊢
(log‘2) < (;;253 / ;;365) |
17 | 5 | nn0cni 12273 |
. . . . . . . . . . . 12
⊢ 𝐾 ∈ ℂ |
18 | 17 | sqvali 13925 |
. . . . . . . . . . 11
⊢ (𝐾↑2) = (𝐾 · 𝐾) |
19 | 17 | mulid1i 11007 |
. . . . . . . . . . . 12
⊢ (𝐾 · 1) = 𝐾 |
20 | 19 | eqcomi 2742 |
. . . . . . . . . . 11
⊢ 𝐾 = (𝐾 · 1) |
21 | 18, 20 | oveq12i 7307 |
. . . . . . . . . 10
⊢ ((𝐾↑2) − 𝐾) = ((𝐾 · 𝐾) − (𝐾 · 1)) |
22 | | ax-1cn 10957 |
. . . . . . . . . . 11
⊢ 1 ∈
ℂ |
23 | 17, 17, 22 | subdii 11452 |
. . . . . . . . . 10
⊢ (𝐾 · (𝐾 − 1)) = ((𝐾 · 𝐾) − (𝐾 · 1)) |
24 | 21, 23 | eqtr4i 2764 |
. . . . . . . . 9
⊢ ((𝐾↑2) − 𝐾) = (𝐾 · (𝐾 − 1)) |
25 | 24 | oveq1i 7305 |
. . . . . . . 8
⊢ (((𝐾↑2) − 𝐾) / 2) = ((𝐾 · (𝐾 − 1)) / 2) |
26 | 17, 22 | subcli 11325 |
. . . . . . . . 9
⊢ (𝐾 − 1) ∈
ℂ |
27 | | 2cn 12076 |
. . . . . . . . 9
⊢ 2 ∈
ℂ |
28 | | 2ne0 12105 |
. . . . . . . . 9
⊢ 2 ≠
0 |
29 | 17, 26, 27, 28 | divassi 11759 |
. . . . . . . 8
⊢ ((𝐾 · (𝐾 − 1)) / 2) = (𝐾 · ((𝐾 − 1) / 2)) |
30 | | 1nn0 12277 |
. . . . . . . . 9
⊢ 1 ∈
ℕ0 |
31 | 2, 2 | deccl 12480 |
. . . . . . . . . . . . 13
⊢ ;22 ∈
ℕ0 |
32 | 31 | nn0cni 12273 |
. . . . . . . . . . . 12
⊢ ;22 ∈ ℂ |
33 | | 2p1e3 12143 |
. . . . . . . . . . . . . 14
⊢ (2 + 1) =
3 |
34 | | eqid 2733 |
. . . . . . . . . . . . . 14
⊢ ;22 = ;22 |
35 | 2, 2, 33, 34 | decsuc 12496 |
. . . . . . . . . . . . 13
⊢ (;22 + 1) = ;23 |
36 | 1, 35 | eqtr4i 2764 |
. . . . . . . . . . . 12
⊢ 𝐾 = (;22 + 1) |
37 | 32, 22, 36 | mvrraddi 11266 |
. . . . . . . . . . 11
⊢ (𝐾 − 1) = ;22 |
38 | 37 | oveq1i 7305 |
. . . . . . . . . 10
⊢ ((𝐾 − 1) / 2) = (;22 / 2) |
39 | 2 | 11multnc 12533 |
. . . . . . . . . . 11
⊢ (2
· ;11) = ;22 |
40 | 30, 30 | deccl 12480 |
. . . . . . . . . . . . 13
⊢ ;11 ∈
ℕ0 |
41 | 40 | nn0cni 12273 |
. . . . . . . . . . . 12
⊢ ;11 ∈ ℂ |
42 | 32, 27, 41, 28 | divmuli 11757 |
. . . . . . . . . . 11
⊢ ((;22 / 2) = ;11 ↔ (2 · ;11) = ;22) |
43 | 39, 42 | mpbir 230 |
. . . . . . . . . 10
⊢ (;22 / 2) = ;11 |
44 | 38, 43 | eqtri 2761 |
. . . . . . . . 9
⊢ ((𝐾 − 1) / 2) = ;11 |
45 | 19, 1 | eqtri 2761 |
. . . . . . . . . 10
⊢ (𝐾 · 1) = ;23 |
46 | | 3p2e5 12152 |
. . . . . . . . . 10
⊢ (3 + 2) =
5 |
47 | 2, 3, 2, 45, 46 | decaddi 12525 |
. . . . . . . . 9
⊢ ((𝐾 · 1) + 2) = ;25 |
48 | 5, 30, 30, 44, 3, 2, 47, 45 | decmul2c 12531 |
. . . . . . . 8
⊢ (𝐾 · ((𝐾 − 1) / 2)) = ;;253 |
49 | 25, 29, 48 | 3eqtri 2765 |
. . . . . . 7
⊢ (((𝐾↑2) − 𝐾) / 2) = ;;253 |
50 | 49, 6 | oveq12i 7307 |
. . . . . 6
⊢ ((((𝐾↑2) − 𝐾) / 2) / 𝑁) = (;;253 /
;;365) |
51 | 16, 50 | breqtrri 5104 |
. . . . 5
⊢
(log‘2) < ((((𝐾↑2) − 𝐾) / 2) / 𝑁) |
52 | | 2rp 12763 |
. . . . . . 7
⊢ 2 ∈
ℝ+ |
53 | | relogcl 25759 |
. . . . . . 7
⊢ (2 ∈
ℝ+ → (log‘2) ∈ ℝ) |
54 | 52, 53 | ax-mp 5 |
. . . . . 6
⊢
(log‘2) ∈ ℝ |
55 | | 5nn0 12281 |
. . . . . . . . . . 11
⊢ 5 ∈
ℕ0 |
56 | 2, 55 | deccl 12480 |
. . . . . . . . . 10
⊢ ;25 ∈
ℕ0 |
57 | 56, 3 | deccl 12480 |
. . . . . . . . 9
⊢ ;;253 ∈ ℕ0 |
58 | 49, 57 | eqeltri 2830 |
. . . . . . . 8
⊢ (((𝐾↑2) − 𝐾) / 2) ∈
ℕ0 |
59 | 58 | nn0rei 12272 |
. . . . . . 7
⊢ (((𝐾↑2) − 𝐾) / 2) ∈
ℝ |
60 | | nndivre 12042 |
. . . . . . 7
⊢
(((((𝐾↑2)
− 𝐾) / 2) ∈
ℝ ∧ 𝑁 ∈
ℕ) → ((((𝐾↑2) − 𝐾) / 2) / 𝑁) ∈ ℝ) |
61 | 59, 11, 60 | mp2an 688 |
. . . . . 6
⊢ ((((𝐾↑2) − 𝐾) / 2) / 𝑁) ∈ ℝ |
62 | 54, 61 | ltnegi 11547 |
. . . . 5
⊢
((log‘2) < ((((𝐾↑2) − 𝐾) / 2) / 𝑁) ↔ -((((𝐾↑2) − 𝐾) / 2) / 𝑁) < -(log‘2)) |
63 | 51, 62 | mpbi 229 |
. . . 4
⊢
-((((𝐾↑2)
− 𝐾) / 2) / 𝑁) <
-(log‘2) |
64 | 61 | renegcli 11310 |
. . . . 5
⊢
-((((𝐾↑2)
− 𝐾) / 2) / 𝑁) ∈
ℝ |
65 | 54 | renegcli 11310 |
. . . . 5
⊢
-(log‘2) ∈ ℝ |
66 | | eflt 15854 |
. . . . 5
⊢
((-((((𝐾↑2)
− 𝐾) / 2) / 𝑁) ∈ ℝ ∧
-(log‘2) ∈ ℝ) → (-((((𝐾↑2) − 𝐾) / 2) / 𝑁) < -(log‘2) ↔
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁)) <
(exp‘-(log‘2)))) |
67 | 64, 65, 66 | mp2an 688 |
. . . 4
⊢
(-((((𝐾↑2)
− 𝐾) / 2) / 𝑁) < -(log‘2) ↔
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁)) <
(exp‘-(log‘2))) |
68 | 63, 67 | mpbi 229 |
. . 3
⊢
(exp‘-((((𝐾↑2) − 𝐾) / 2) / 𝑁)) <
(exp‘-(log‘2)) |
69 | 54 | recni 11017 |
. . . . 5
⊢
(log‘2) ∈ ℂ |
70 | | efneg 15835 |
. . . . 5
⊢
((log‘2) ∈ ℂ → (exp‘-(log‘2)) = (1 /
(exp‘(log‘2)))) |
71 | 69, 70 | ax-mp 5 |
. . . 4
⊢
(exp‘-(log‘2)) = (1 /
(exp‘(log‘2))) |
72 | | reeflog 25764 |
. . . . . 6
⊢ (2 ∈
ℝ+ → (exp‘(log‘2)) = 2) |
73 | 52, 72 | ax-mp 5 |
. . . . 5
⊢
(exp‘(log‘2)) = 2 |
74 | 73 | oveq2i 7306 |
. . . 4
⊢ (1 /
(exp‘(log‘2))) = (1 / 2) |
75 | 71, 74 | eqtri 2761 |
. . 3
⊢
(exp‘-(log‘2)) = (1 / 2) |
76 | 68, 75 | breqtri 5102 |
. 2
⊢
(exp‘-((((𝐾↑2) − 𝐾) / 2) / 𝑁)) < (1 / 2) |
77 | 12, 13 | birthdaylem1 26129 |
. . . . . . . 8
⊢ (𝑇 ⊆ 𝑆 ∧ 𝑆 ∈ Fin ∧ (𝑁 ∈ ℕ → 𝑆 ≠ ∅)) |
78 | 77 | simp2i 1138 |
. . . . . . 7
⊢ 𝑆 ∈ Fin |
79 | 77 | simp1i 1137 |
. . . . . . 7
⊢ 𝑇 ⊆ 𝑆 |
80 | | ssfi 8981 |
. . . . . . 7
⊢ ((𝑆 ∈ Fin ∧ 𝑇 ⊆ 𝑆) → 𝑇 ∈ Fin) |
81 | 78, 79, 80 | mp2an 688 |
. . . . . 6
⊢ 𝑇 ∈ Fin |
82 | | hashcl 14099 |
. . . . . 6
⊢ (𝑇 ∈ Fin →
(♯‘𝑇) ∈
ℕ0) |
83 | 81, 82 | ax-mp 5 |
. . . . 5
⊢
(♯‘𝑇)
∈ ℕ0 |
84 | 83 | nn0rei 12272 |
. . . 4
⊢
(♯‘𝑇)
∈ ℝ |
85 | 77 | simp3i 1139 |
. . . . . 6
⊢ (𝑁 ∈ ℕ → 𝑆 ≠ ∅) |
86 | 11, 85 | ax-mp 5 |
. . . . 5
⊢ 𝑆 ≠ ∅ |
87 | | hashnncl 14109 |
. . . . . 6
⊢ (𝑆 ∈ Fin →
((♯‘𝑆) ∈
ℕ ↔ 𝑆 ≠
∅)) |
88 | 78, 87 | ax-mp 5 |
. . . . 5
⊢
((♯‘𝑆)
∈ ℕ ↔ 𝑆
≠ ∅) |
89 | 86, 88 | mpbir 230 |
. . . 4
⊢
(♯‘𝑆)
∈ ℕ |
90 | | nndivre 12042 |
. . . 4
⊢
(((♯‘𝑇)
∈ ℝ ∧ (♯‘𝑆) ∈ ℕ) →
((♯‘𝑇) /
(♯‘𝑆)) ∈
ℝ) |
91 | 84, 89, 90 | mp2an 688 |
. . 3
⊢
((♯‘𝑇) /
(♯‘𝑆)) ∈
ℝ |
92 | | reefcl 15824 |
. . . 4
⊢
(-((((𝐾↑2)
− 𝐾) / 2) / 𝑁) ∈ ℝ →
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁)) ∈
ℝ) |
93 | 64, 92 | ax-mp 5 |
. . 3
⊢
(exp‘-((((𝐾↑2) − 𝐾) / 2) / 𝑁)) ∈ ℝ |
94 | | halfre 12215 |
. . 3
⊢ (1 / 2)
∈ ℝ |
95 | 91, 93, 94 | lelttri 11130 |
. 2
⊢
((((♯‘𝑇)
/ (♯‘𝑆)) ≤
(exp‘-((((𝐾↑2)
− 𝐾) / 2) / 𝑁)) ∧ (exp‘-((((𝐾↑2) − 𝐾) / 2) / 𝑁)) < (1 / 2)) →
((♯‘𝑇) /
(♯‘𝑆)) < (1
/ 2)) |
96 | 15, 76, 95 | mp2an 688 |
1
⊢
((♯‘𝑇) /
(♯‘𝑆)) < (1
/ 2) |