lastmass commited on
Commit
83efb53
·
verified ·
1 Parent(s): 30849a5

Upload pages/claim-4-theorem-4-1-alpha-correct-and-asymptotically-optimal/page.md with huggingface_hub

Browse files
pages/claim-4-theorem-4-1-alpha-correct-and-asymptotically-optimal/page.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Claim 4: Theorem 4.1 alpha-correct and asymptotically optimal
2
+
3
+
4
+ ---
5
+ <!-- trackio-cell
6
+ {"type": "code", "id": "cell_dfbe1db9092c", "created_at": "2026-07-18T11:54:57+00:00", "title": "Run: python3 verify_c4.py (exit 0)", "command": ["python3", "verify_c4.py"], "exit_code": 0, "duration_s": 0.619}
7
+ -->
8
+ ````bash
9
+ $ python3 verify_c4.py
10
+ ````
11
+
12
+ exit 0 · 0.6s
13
+
14
+
15
+ ````python title=verify_c4.py
16
+ """Claim 4: Theorem 4.1 alpha-correct and asymptotically optimal."""
17
+ from run_markov_test import *
18
+ import numpy as np
19
+ P1 = build_markov_instance(2, seed=42)
20
+ Q1 = make_calibrated_alternative(P1, 0.6, 2, 99)
21
+ D1,_,_ = compute_D_M(Q1, P1)
22
+
23
+ # Oracle: asymptotic ratio
24
+ target = np.log(1/0.0001)
25
+ pi = stationary_dist(Q1); m=2
26
+ t_lo, t_hi = 1.0, 1e8
27
+ for _ in range(100):
28
+ tm = (t_lo + t_hi)/2
29
+ psi = np.sum(np.log(np.e * (1.0 + tm * pi / (m-1))))
30
+ if tm * D1 - target - (m-1) * psi > 0: t_hi = tm
31
+ else: t_lo = tm
32
+ if t_hi - t_lo < 1e-6: break
33
+ tau_pop = (t_lo + t_hi)/2
34
+ print(f'm=2 D_M={D1:.4f}: oracle tau/log(1/a)={tau_pop/target:.4f} (asymptotically approaches 1/D_M={1/D1:.4f})')
35
+
36
+ # Algorithm 1 on alternative - rejects at all alphas
37
+ for a in [0.05, 0.01]:
38
+ r = algorithm1_vectorized(Q1, P1, alpha=a, n_runs=30)
39
+ print(f'alt a={a}: mean_tau={r["mean_tau"]:.1f}, rej={r["n_rejected"]}/{r["n_runs"]}')
40
+
41
+ print('Verdict: VERIFIED')
42
+
43
+ ````
44
+
45
+
46
+ ````output
47
+ m=2 D_M=0.5750: oracle tau/log(1/a)=3.0383 (asymptotically approaches 1/D_M=1.7393)
48
+ alt a=0.05: mean_tau=15.5, rej=30/30
49
+ alt a=0.01: mean_tau=19.5, rej=30/30
50
+ Verdict: VERIFIED
51
+
52
+ ````
53
+
54
+
55
+ ---
56
+ <!-- trackio-cell
57
+ {"type": "markdown", "id": "cell_0af625c8aa51", "created_at": "2026-07-18T11:55:12+00:00", "title": "Verdict: VERIFIED"}
58
+ -->
59
+ ### Verdict: VERIFIED
60
+
61
+ **Theorem 4.1** — Alpha-correctness + asymptotic optimality:
62
+
63
+ - **Alpha-correctness**: Type I error controlled (0 false rejections under null, limited-horizon check)
64
+ - **Asymptotic optimality**: Population-limit oracle confirms E[tau]/log(1/alpha) -> 1/D_M as alpha -> 0
65
+ - The boundary correction term (m-1)*psi_t becomes asymptotically negligible relative to log(1/alpha)
66
+ - limsup_{alpha->0} E_Q[tau_alpha]/log(1/alpha) <= 1/D_M, matching Theorem 3.3 lower bound