File size: 494,717 Bytes
335ab0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
[
  {
    "question_id": 1,
    "problem_name": "stochastic_processes_delayed_blackwell_arithmetic",
    "informal_statement": "Let (N(t))_{t>0} be a delayed renewal counting process whose interrenewal intervals X_2, X_3, … are arithmetic with span λ and mean X̄, and whose first renewal epoch X_1 is arithmetic with span mλ for some positive integer m.\n\nShow that lim_{i→∞} Pr[a renewal occurs at t = iλ] = λ/X̄.",
    "lean_statement": "theorem q1_delayed_blackwell_arithmetic (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (lam : ℝ) (hlam : 0 < lam)\n    (harithF : ∀ i, 1 ≤ i → ∀ᵐ ω ∂μ, ∃ k : ℕ, X i ω = (k : ℝ) * lam)\n    (hspanF : ∀ d : ℝ, 0 < d → (∀ᵐ ω ∂μ, ∃ k : ℕ, X 1 ω = (k : ℝ) * d) → d ≤ lam)\n    (m : ℕ) (hm : 1 ≤ m)\n    (harithG : ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * ((m : ℝ) * lam)) :\n    Tendsto (fun i : ℕ =>\n        (μ {ω | ∃ n : ℕ, 1 ≤ n ∧ (∑ j ∈ Finset.range n, X j ω) = (i : ℝ) * lam}).toReal)\n      atTop (𝓝 (lam / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 2,
    "problem_name": "stochastic_processes_duration_limit_distribution",
    "informal_statement": "Let (N(t)) be a renewal process with finite E[X], E[X^2] and arithmetic span 1, and let X̃(t) be the duration of the interval containing t.\n\nShow that lim_{t→∞} Pr[X̃(t) = k] = k p_X(k)/X̄ for each k ≥ 1.",
    "lean_statement": "theorem q2_duration_limit_distribution (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hsqint : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (harith : ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ))\n    (hspan : ∀ d : ℝ, 0 < d → (∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d) → d ≤ 1)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Xtil : ℝ → Ω → ℝ) (hdur : ∀ t ω, Xtil t ω = X (N t ω) ω) :\n    ∀ k : ℕ, 1 ≤ k →\n      Tendsto (fun t => (μ {ω | Xtil t ω = (k : ℝ)}).toReal)\n        atTop (𝓝 ((k : ℝ) * (μ {ω | X 0 ω = (k : ℝ)}).toReal / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 3,
    "problem_name": "stochastic_processes_poisson_infinitesimal_def",
    "informal_statement": "Let (N(t))_{t≥0} have stationary and independent increments with Pr[Ñ(t,t+δ)=0] = 1 − λδ + o(δ), Pr[Ñ(t,t+δ)=1] = λδ + o(δ), and Pr[Ñ(t,t+δ) ≥ 2] = o(δ).\n\nShow that (N(t)) is a Poisson process of rate λ.",
    "lean_statement": "theorem q3_infinitesimal_poisson (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (N : ℝ≥0 → Ω → ℕ)\n    (g : ℝ≥0 → ℕ → ℝ)\n    (hstat : ∀ (a δ : ℝ≥0) (k : ℕ), (μ {ω | N (a + δ) ω - N a ω = k}).toReal = g δ k)\n    (h0 : Tendsto (fun δ : ℝ≥0 => (g δ 0 - (1 - (lam : ℝ) * (δ : ℝ))) / (δ : ℝ))\n      (𝓝[>] (0 : ℝ≥0)) (𝓝 (0 : ℝ)))\n    (h1 : Tendsto (fun δ : ℝ≥0 => (g δ 1 - (lam : ℝ) * (δ : ℝ)) / (δ : ℝ))\n      (𝓝[>] (0 : ℝ≥0)) (𝓝 (0 : ℝ)))\n    (h2 : Tendsto (fun δ : ℝ≥0 => (1 - g δ 0 - g δ 1) / (δ : ℝ))\n      (𝓝[>] (0 : ℝ≥0)) (𝓝 (0 : ℝ)))\n    (hindep : HasIndepIncrements N μ) :\n    ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 4,
    "problem_name": "stochastic_processes_poisson_order_statistics",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ. Condition on N(t) = n and let S^{(n)} = (S_1,…,S_n) be the ordered arrival epochs in (0,t].\n\nShow that the conditional density of S^{(n)} is n!/t^n on 0 < s_1 < s_2 < … < s_n < t; equivalently the epochs are distributed as the order statistics of n i.i.d. Uniform(0,t] variables.",
    "lean_statement": "theorem q4_poisson_order_statistics (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hN : ∀ (m : ℕ) (τ : ℝ≥0),\n      {ω | m ≤ N τ ω} = {ω | (∑ i ∈ Finset.range m, S i ω) ≤ (τ : ℝ)})\n    (t : ℝ≥0) (ht : 0 < t) (n : ℕ) (hpos : μ {ω | N t ω = n + 1} ≠ 0) :\n    Measure.map (fun ω => (fun i : Fin (n + 1) => ∑ j ∈ Finset.range ((i : ℕ) + 1), S j ω))\n        (ProbabilityTheory.cond μ {ω | N t ω = n + 1})\n      = (((Measure.pi (fun _ : Fin (n + 1) => (volume : Measure ℝ))).withDensity\n            (fun _ => ENNReal.ofReal ((n + 1).factorial / (t : ℝ) ^ (n + 1)))).restrict\n          {s : Fin (n + 1) → ℝ | 0 ≤ s 0 ∧ Monotone s ∧ s (Fin.last n) < (t : ℝ)}) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 5,
    "problem_name": "stochastic_processes_poisson_conditional_first_epoch",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ. Condition on N(t) = n.\n\nShow that Pr[S_1 > τ | N(t) = n] = ((t−τ)/t)^n for 0 ≤ τ ≤ t, and that E[S_i | N(t) = n] = i t/(n+1).",
    "lean_statement": "theorem q5_poisson_conditional_first_epoch (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (t : ℝ) (ht : 0 < t) (n : ℕ) (hn : 1 ≤ n)\n    (U : Fin n → Ω → ℝ)\n    (hUindep : iIndepFun U μ)\n    (hUunif : ∀ i, HasLaw (U i) (ProbabilityTheory.cond (volume : Measure ℝ) (Set.Ioc (0 : ℝ) t)) μ)\n    (S : Fin n → Ω → ℝ)\n    (hsort : ∀ ω, ∃ σ : Equiv.Perm (Fin n),\n        (∀ i, S i ω = U (σ i) ω) ∧ Monotone (fun i => S i ω)) :\n    (∀ τ : ℝ, 0 ≤ τ → τ ≤ t →\n        (μ {ω | ∀ i : Fin n, τ < U i ω}).toReal = ((t - τ) / t) ^ n)\n      ∧ (∀ i : Fin n, ∫ ω, S i ω ∂μ = ((i : ℕ) + 1) * t / (n + 1)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 6,
    "problem_name": "stochastic_processes_skorokhod_map_lipschitz",
    "informal_statement": "Let Ψ(x) = y be the regulator map and Φ(x) = z the reflection map of the Skorokhod problem.\n\nShow that Ψ is Lipschitz with constant 1 and Φ is Lipschitz with constant 2 with respect to the uniform norm ‖·‖_T.",
    "lean_statement": "theorem q6_skorokhod_map_lipschitz\n    (Ψ Φ : (ℝ≥0 → ℝ) → (ℝ≥0 → ℝ))\n    (hΨ : ∀ (x : ℝ≥0 → ℝ) (t : ℝ≥0), Ψ x t = ⨆ s ∈ Set.Icc (0 : ℝ≥0) t, max (- x s) 0)\n    (hΦ : ∀ (x : ℝ≥0 → ℝ) (t : ℝ≥0), Φ x t = x t + Ψ x t) :\n    ∀ (x₁ x₂ : ℝ≥0 → ℝ), Continuous x₁ → Continuous x₂ → ∀ T : ℝ≥0,\n      (⨆ t ∈ Set.Icc (0 : ℝ≥0) T, |Ψ x₁ t - Ψ x₂ t|)\n          ≤ (⨆ t ∈ Set.Icc (0 : ℝ≥0) T, |x₁ t - x₂ t|) ∧\n      (⨆ t ∈ Set.Icc (0 : ℝ≥0) T, |Φ x₁ t - Φ x₂ t|)\n          ≤ 2 * (⨆ t ∈ Set.Icc (0 : ℝ≥0) T, |x₁ t - x₂ t|) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 7,
    "problem_name": "stochastic_processes_donsker_invariance_principle",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with mean 0 and variance σ^2 < ∞, and let P_n be the law on C[0,T] induced by N_n(t) = [S_{⌊nt⌋} + (nt − ⌊nt⌋) X_{⌊nt⌋+1}] / (σ√n).\n\nShow that P_n converges weakly to a limit P*, and that P* is the Wiener measure.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 472 (l21.thm4): Donsker's invariance principle. Let `X₁, X₂, …` be i.i.d. with mean `0` and\nvariance `σ² < ∞`, and let `Nₙ(t) = [S_{⌊nt⌋} + (nt − ⌊nt⌋)·X_{⌊nt⌋+1}] / (σ√n)` be the linearly\ninterpolated, diffusively rescaled random walk on `C[0,T]`. The induced laws `Pₙ` converge weakly to\nthe Wiener measure `P*`. Faithful abstraction (Mathlib has no Wiener-measure object): weak\nconvergence on the path space `C[0,T]` is stated directly — the rescaled path `Npath n ω` and the\nBrownian path `Bpath ω` are elements of `C(↥[0,T], ℝ)` agreeing with `N`/`B` (`hNpath`, `hBpath`,\nwith `B` a standard Brownian motion `IsBM μ 1 B`), and for **every bounded continuous functional**\n`G : C(↥[0,T], ℝ) → ℝ` the expectations `E[G(Nₙ)]` converge to `E[G(B)]`. This is genuine\nweak convergence on `C[0,T]` (path-level, implying tightness + all finite-dimensional\ndistributions), not merely fdd convergence. Partial sums are 0-indexed (`S k = ∑_{i<k} Xᵢ`, so\n`X_{⌊nt⌋+1}` is `X (⌊nt⌋)`). -/\ntheorem q7_donsker_invariance_principle (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hXmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hmean : ∫ ω, X 0 ω ∂μ = 0) (hL2 : MemLp (X 0) 2 μ)\n    (σ : ℝ) (hσ : 0 < σ) (hvar : ∫ ω, (X 0 ω) ^ 2 ∂μ = σ ^ 2)\n    (T : ℝ) (hT : 0 < T)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℕ → ℝ → Ω → ℝ)\n    (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω),\n      N n t ω = (S ⌊(n : ℝ) * t⌋₊ ω\n        + ((n : ℝ) * t - (⌊(n : ℝ) * t⌋₊ : ℝ)) * X ⌊(n : ℝ) * t⌋₊ ω) / (σ * Real.sqrt n))\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B)\n    (Npath : ℕ → Ω → C(↥(Set.Icc (0:ℝ) T), ℝ))\n    (hNpath : ∀ n ω (t : ↥(Set.Icc (0:ℝ) T)), Npath n ω t = N n (t : ℝ) ω)\n    (Bpath : Ω → C(↥(Set.Icc (0:ℝ) T), ℝ))\n    (hBpath : ∀ ω (t : ↥(Set.Icc (0:ℝ) T)), Bpath ω t = B (t : ℝ) ω) :\n    ∀ G : C(↥(Set.Icc (0:ℝ) T), ℝ) → ℝ, Continuous G → (∃ M : ℝ, ∀ f, |G f| ≤ M) →\n      Tendsto (fun n : ℕ => ∫ ω, G (Npath n ω) ∂μ) atTop (𝓝 (∫ ω, G (Bpath ω) ∂μ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 8,
    "problem_name": "stochastic_processes_martingale_1",
    "informal_statement": "Consider biased gambler’s ruin: at each step, the gambler gains one dollar\n        with probability p and losses one dollar with probability (1 − p).\n        Let X_n be the money in purse at time n.\n\n        Show that if p = 1/2, then (X_n) is a martingale.",
    "lean_statement": "theorem q8_gambler_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : p = 1 / 2)\n    (hstep : IsConstDrift μ ℱ X (2 * p - 1)) :\n    Martingale X ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 9,
    "problem_name": "stochastic_processes_elementary_renewal_theorem",
    "informal_statement": "Let (N(t)) be a renewal process with mean interrenewal time X̄ (possibly infinite) and let m(t) = E[N(t)].\n\nShow that lim_{t→∞} m(t)/t = 1/X̄.",
    "lean_statement": "theorem q9_elementary_renewal_theorem (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (Xbar : ℝ≥0∞) (hmean : ∫⁻ ω, ENNReal.ofReal (X 0 ω) ∂μ = Xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (hNmeas : ∀ t, Measurable (fun ω => (N t ω : ℝ)))\n    (m : ℝ → ℝ) (hm : ∀ s : ℝ, m s = ∫ ω, (N s ω : ℝ) ∂μ) :\n    Tendsto (fun t : ℝ => m t / t) atTop (𝓝 (Xbar⁻¹).toReal) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 10,
    "problem_name": "stochastic_processes_birth_death_reversible",
    "informal_statement": "Consider a birth-death Markov chain on a countable state space that possesses a stationary distribution.\n\nShow that the chain is reversible.",
    "lean_statement": "theorem q10_birth_death_reversible\n    (P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (hbd : ∀ i j, 1 < max i j - min i j → P i j = 0)\n    (π : ℕ → ℝ) (hπ0 : ∀ i, 0 ≤ π i) (hπsum : ∑' i, π i = 1)\n    (hstat : ∀ j, ∑' i, π i * P i j = π j) :\n    ∀ i j, π i * P i j = π j * P j i := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 11,
    "problem_name": "stochastic_processes_birth_death_process_stationary",
    "informal_statement": "Consider an irreducible birth-death continuous-time Markov chain with birth rate λ_i in state i and death rate μ_{i+1} from state i+1, and let ρ_i = λ_i/μ_{i+1}.\n\nShow that the steady-state distribution, when it exists, satisfies p_i = p_0 ∏_{j<i} ρ_j and p_i λ_i = p_{i+1} μ_{i+1} for all i.",
    "lean_statement": "theorem q11_birth_death_stationary\n    (lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)\n    (mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))\n    (ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = lam i / mu (i + 1))\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam 0 = p 1 * mu 1)\n    (hbal : ∀ n, p (n + 1) * (lam (n + 1) + mu (n + 1)) = p n * lam n + p (n + 2) * mu (n + 2)) :\n    (∀ i, p i * lam i = p (i + 1) * mu (i + 1)) ∧\n    (∀ i, p i = p 0 * ∏ j ∈ Finset.range i, ρ j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 12,
    "problem_name": "stochastic_processes_random_walk_negative_drift_max_finite",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps of negative mean.\n\nShow that sup_n S_n is finite with probability 1.",
    "lean_statement": "theorem q12_negative_drift_sup_finite (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : Integrable (X 0) μ) (hdrift : ∫ ω, X 0 ω ∂μ < 0)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) :\n    ∀ᵐ ω ∂μ, BddAbove (Set.range (fun n => S n ω)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 13,
    "problem_name": "stochastic_processes_submartingale_rcll_version",
    "informal_statement": "Let (X_t) be a submartingale relative to a right-continuous filtration, such that t ↦ E[X_t] is continuous.\n\nShow that (X_t) admits a right-continuous version with left limits.",
    "lean_statement": "theorem q13_submartingale_cadlag_version (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) [ℱ.IsRightContinuous] (X : ℝ → Ω → ℝ)\n    (hsub : Submartingale X ℱ μ)\n    (hcont : Continuous (fun t => ∫ ω, X t ω ∂μ)) :\n    ∃ Y : ℝ → Ω → ℝ,\n      (∀ t, Y t =ᵐ[μ] X t) ∧\n      (∀ ω t, ContinuousWithinAt (fun u => Y u ω) (Set.Ici t) t) ∧\n      (∀ ω t, ∃ l : ℝ, Tendsto (fun u => Y u ω) (𝓝[<] t) (𝓝 l)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 14,
    "problem_name": "stochastic_processes_renewal_age_inspection",
    "informal_statement": "Let (N(t)) be a renewal process with i.i.d. interrenewal times X of finite mean X̄, and let Z(t) be the age at time t.\n\nShow that the time-average age distribution satisfies lim_{t→∞} (1/t) ∫_0^t 1{Z(τ) ≤ z} dτ = (1/X̄) ∫_0^z Pr[X > x] dx with probability 1.",
    "lean_statement": "theorem q14_renewal_age_inspection (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : Integrable (X 0) μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t})\n    (Z : ℝ → Ω → ℝ) (hZ : ∀ τ ω, Z τ ω = τ - S (N τ ω) ω)\n    (z : ℝ) (hz : 0 ≤ z) :\n    ∀ᵐ ω ∂μ, Tendsto\n      (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, (if Z τ ω ≤ z then (1:ℝ) else 0))\n      atTop (𝓝 ((1 / Xbar) * ∫ x in (0:ℝ)..z, (μ {ω | x < X 0 ω}).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 15,
    "problem_name": "stochastic_processes_ito_integral_linearity",
    "informal_statement": "Let B be a standard Brownian motion relative to a filtration, and let X,Y be progressively measurable processes with E[∫_0^T |X_t|² dt] and E[∫_0^T |Y_t|² dt] finite for every finite T. Define their Itô integrals by L² limits of elementary predictable integrals.\n\nShow that I_t(αX+βY)=αI_t(X)+βI_t(Y) almost surely for every t≥0.",
    "lean_statement": "theorem q15_ito_integral_linearity\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B X Y : ℝ → Ω → ℝ) (α β : ℝ)\n    (hB : IsBrownianWith μ ℱ B)\n    (hX : IsStronglyProgressive ℱ X) (hY : IsStronglyProgressive ℱ Y)\n    (hXL2 : ∀ T, 0 ≤ T → SpaceTimeL2 μ X T)\n    (hYL2 : ∀ T, 0 ≤ T → SpaceTimeL2 μ Y T)\n    (IX IY IZ : ℝ → Ω → ℝ)\n    (hIX : IsItoIntegral μ ℱ B X IX) (hIY : IsItoIntegral μ ℱ B Y IY)\n    (hIZ : IsItoIntegral μ ℱ B (fun t ω => α * X t ω + β * Y t ω) IZ) :\n    ∀ t, 0 ≤ t → IZ t =ᵐ[μ] fun ω => α * IX t ω + β * IY t ω := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 16,
    "problem_name": "stochastic_processes_finite_chain_reachable_recurrent",
    "informal_statement": "Let (X_n) be a finite-state Markov chain.\n\nShow that from every state, some recurrent state is reachable, and hence that a finite-state chain has at least one recurrent class.",
    "lean_statement": "theorem q16_finite_chain_reachable_recurrent {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :\n    (∀ x : Ω, ∃ y : Ω,\n        (¬ Summable (fun n : ℕ => (P ^ n) y y)) ∧ (∃ n : ℕ, 0 < (P ^ n) x y))\n      ∧ (∃ y : Ω, ¬ Summable (fun n : ℕ => (P ^ n) y y)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 17,
    "problem_name": "stochastic_processes_delayed_renewal_asymptotic",
    "informal_statement": "Let (N(t)) be a delayed renewal process with a nonarithmetic interrenewal distribution, finite first-epoch mean X̄_1, interrenewal mean X̄ and second moment E[X_2^2], and let m(t) = E[N(t)].\n\nShow that m(t) = t/X̄ + E[X_2^2]/(2 X̄^2) − X̄_1/X̄ + ε(t), where lim_{t→∞} ε(t) = 0.",
    "lean_statement": "theorem q17_delayed_renewal_asymptotic (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint1 : Integrable (X 0) μ) (hint : Integrable (X 1) μ)\n    (hsqint : Integrable (fun ω => (X 1 ω) ^ 2) μ)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 1 ω = (k : ℝ) * d)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar1 : ℝ) (hmean1 : ∫ ω, X 0 ω ∂μ = xbar1)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (m2 : ℝ) (hm2 : ∫ ω, (X 1 ω) ^ 2 ∂μ = m2)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ)\n    (ε : ℝ → ℝ)\n    (hdecomp : ∀ t, m t = t / xbar + m2 / (2 * xbar ^ 2) - xbar1 / xbar + ε t) :\n    Tendsto ε atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 18,
    "problem_name": "stochastic_processes_pollaczek_khinchin",
    "informal_statement": "Consider an M/G/1 queue with Poisson arrivals of rate λ and i.i.d. service times V independent of the entire arrival process with E[V] and E[V^2] finite and λ E[V] < 1.\n\nShow that the time-average queueing delay satisfies W_q = λ E[V^2] / (2(1 − λ E[V])).",
    "lean_statement": "theorem q18_pollaczek_khinchin (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam) (T V : ℕ → Ω → ℝ)\n    (hindep : iIndepFun (Sum.elim T V) μ)\n    (hT_law : ∀ i, HasLaw (T i) (expMeasure lam) μ)\n    (hVident : ∀ i, IdentDistrib (V i) (V 0) μ μ) (hVnn : ∀ i ω, 0 ≤ V i ω)\n    (m1 m2 : ℝ) (hm1 : ∫ ω, V 0 ω ∂μ = m1) (hm2 : ∫ ω, (V 0 ω) ^ 2 ∂μ = m2)\n    (hint2 : Integrable (fun ω => (V 0 ω) ^ 2) μ)\n    (hstab : lam * m1 < 1)\n    (Wq : ℕ → Ω → ℝ) (hWq0 : ∀ ω, Wq 0 ω = 0)\n    (hLindley : ∀ k ω, Wq (k + 1) ω = max 0 (Wq k ω + V k ω - T (k + 1) ω)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ k ∈ Finset.range n, Wq k ω)\n      atTop (𝓝 (lam * m2 / (2 * (1 - lam * m1)))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 19,
    "problem_name": "stochastic_processes_martingale_stopping_time_1",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a martingale, and let S ≤ T be bounded stopping times.\n\n        Show that 𝔼[X_T] = 𝔼[X_S].",
    "lean_statement": "theorem q19_optional_stopping_eq (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (S T : Ω → ℕ)\n    (hS : IsStoppingTime ℱ (natStop S))\n    (hT : IsStoppingTime ℱ (natStop T))\n    (hST : ∀ ω, S ω ≤ T ω) (N : ℕ) (hTbdd : ∀ ω, T ω ≤ N) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ\n      = ∫ ω, stoppedValue X (natStop S) ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 20,
    "problem_name": "stochastic_processes_renewal_m_t_stopping",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ and let m(t) = E[N(t)].\n\nShow that J = N(t) + 1 is a stopping trial and hence m(t) = E[S_{N(t)+1}]/X̄ − 1, giving m(t)/t ≥ 1/X̄ − 1/t.",
    "lean_statement": "theorem q20_renewal_m_t_stopping (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (hNmeas : ∀ t, Measurable (fun ω => (N t ω : ℝ)))\n    (m : ℝ → ℝ) (hm : ∀ s : ℝ, m s = ∫ ω, (N s ω : ℝ) ∂μ)\n    (t : ℝ) (ht : 0 < t) :\n    (∀ i : ℕ, IndepFun (fun ω => if i < N t ω + 1 then (1 : ℝ) else 0) (X i) μ) ∧\n      (∫ ω, S (N t ω + 1) ω ∂μ = Xbar * (m t + 1)) ∧\n      (1 / Xbar - 1 / t ≤ m t / t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 21,
    "problem_name": "stochastic_processes_geometric_random_variables_sum_distribution",
    "informal_statement": "Let T1, T2,... be independent exponential random variables of parameter λ.\n        Let N be an independent geometric random variable with P[N = n] = β(1-β)^{n-1}, n = 1,2,...\n        Let T represent the sum of T_i, for 1 ≤ i ≤ n.\n\n        Show that T has exponential distribution of parameter λβ.",
    "lean_statement": "theorem q21_geometric_random_variables_sum_distribution\n    {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam beta : ℝ) (hlam : 0 < lam) (hbeta0 : 0 < beta) (hbeta1 : beta ≤ 1)\n    (T : ℕ → Ω → ℝ) (hTindep : iIndepFun T μ)\n    (hTexp : ∀ i, HasLaw (T i) (expMeasure lam) μ)\n    (N : Ω → ℕ) (hNmeas : Measurable N)\n    (hNindep : IndepFun N (fun ω i => T i ω) μ)\n    (hNgeom : ∀ n : ℕ, 1 ≤ n → (μ {ω | N ω = n}).toReal = beta * (1 - beta) ^ (n - 1))\n    (S : Ω → ℝ) (hS : ∀ ω, S ω = ∑ i ∈ Finset.range (N ω), T i ω) :\n    HasLaw S (expMeasure (lam * beta)) μ := by sorry",
    "true_to_source": "literal",
    "topic": "Poisson processes"
  },
  {
    "question_id": 22,
    "problem_name": "stochastic_processes_martingale_2",
    "informal_statement": "Let (ξ_i)_{i ≥ 1} be i.i.d with 𝔼[ξ1] = 0.\n\n        Show that X_n = sum_1^n ξ_i is a martingale.",
    "lean_statement": "theorem q22_martingale_sum (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (ξ : ℕ → Ω → ℝ) (hint : ∀ n, Integrable (ξ n) μ)\n    (hmeas : ∀ n, StronglyMeasurable[ℱ (n + 1)] (ξ n))\n    (hmean : ∀ n, μ[ξ n | ℱ n] =ᵐ[μ] 0) :\n    Martingale (fun n ω => ∑ i ∈ Finset.range n, ξ i ω) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 23,
    "problem_name": "stochastic_processes_brownian_hitting_time_finite",
    "informal_statement": "Let B be a standard Brownian motion, let a > 0, and let T_a = inf{t ≥ 0 : B(t) = a}.\n\nShow that T_a < ∞ almost surely.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 385 (l6): a standard Brownian motion almost surely hits every positive level. For `a > 0` the\nfirst-passage time `T_a = inf{t ≥ 0 : B(t) = a}` is a.s. finite, which — since `T_a < ∞` iff the\nlevel `a` is attained at some finite time — is stated faithfully as: almost surely there exists a\ntime `t ≥ 0` with `B(t) = a`. -/\ntheorem q23_brownian_hits_level (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (a : ℝ) (ha : 0 < a) :\n    ∀ᵐ ω ∂μ, ∃ t : ℝ, 0 ≤ t ∧ B t ω = a := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 24,
    "problem_name": "stochastic_processes_ctmc_embedded_vs_process_probabilities",
    "informal_statement": "Let (X(t)) be an irreducible positive-recurrent continuous-time Markov chain with embedded stationary distribution (π_j) and exit rates (ν_j), and process probabilities (p_j).\n\nShow that p_j = π_j when all exit rates ν_j are equal, and give an example where the two distributions differ.",
    "lean_statement": "theorem q24_ctmc_embedded_vs_process {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (hPloop : ∀ i, P i i = 0)\n    (π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hπstat : ∀ j, ∑' i, π i * P i j = π j)\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (ν0 : ℝ) (hνeq : ∀ i, ν i = ν0)\n    (hsum : Summable (fun k => π k / ν k))\n    (p : S → ℝ) (hp : ∀ j, p j = (π j / ν j) / (∑' k, π k / ν k)) :\n    ∀ j, p j = π j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 25,
    "problem_name": "stochastic_processes_tilted_mean_derivative",
    "informal_statement": "Let X have semi-invariant generating function γ(r) = ln E[e^{rX}] and tilted PMF q_{X,r}(x) = p_X(x) exp(rx − γ(r)).\n\nShow that the mean under the tilted PMF equals γ'(r) and the variance equals γ''(r).",
    "lean_statement": "theorem q25_tilted_mean_variance_derivatives\n    (ι : Type*) [Fintype ι] (x : ι → ℝ) (p : ι → ℝ)\n    (hp : ∀ i, 0 ≤ p i) (hsum : ∑ i, p i = 1) (r : ℝ)\n    (γ : ℝ → ℝ) (hγ : ∀ s, γ s = Real.log (∑ i, p i * Real.exp (s * x i)))\n    (q : ι → ℝ) (hq : ∀ i, q i = p i * Real.exp (r * x i - γ r))\n    (mean : ℝ) (hmean : mean = ∑ i, x i * q i) :\n    mean = deriv γ r ∧ (∑ i, (x i - mean) ^ 2 * q i) = deriv (deriv γ) r := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 26,
    "problem_name": "stochastic_processes_blackwell_arithmetic",
    "informal_statement": "Let (N(t)) be a renewal process whose interrenewal distribution is arithmetic with span λ and finite mean X̄.\n\nShow that lim_{n→∞} Pr[a renewal occurs at time nλ] = λ/X̄.",
    "lean_statement": "theorem q26_blackwell_arithmetic (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (lam : ℝ) (hlam : 0 < lam)\n    (harith : ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * lam)\n    (hspan : ∀ d : ℝ, 0 < d → (∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d) → d ≤ lam) :\n    Tendsto (fun n : ℕ =>\n        (μ {ω | ∃ k : ℕ, (∑ i ∈ Finset.range k, X i ω) = (n : ℝ) * lam}).toReal)\n      atTop (𝓝 (lam / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 27,
    "problem_name": "stochastic_processes_gamblers_ruin_negative_drift",
    "informal_statement": "A gambler starts with capital d and at each play gains an i.i.d. integer amount X_i with X_i ≥ −1 and E[X_i] < 0; let J be the number of plays until the capital first reaches 0 or below.\n\nShow that J is finite with probability 1 and that E[J] = d/(−E[X_1]).",
    "lean_statement": "theorem q27_gamblers_ruin_negative_drift (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hge : ∀ i ω, -1 ≤ X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = xbar) (hdrift : xbar < 0)\n    (d : ℝ) (hd : 0 < d)\n    (C : ℕ → Ω → ℝ) (hC : ∀ n ω, C n ω = d + ∑ i ∈ Finset.range n, X i ω)\n    (J : Ω → ℕ)\n    (hJcross : ∀ ω, C (J ω) ω = 0)\n    (hJfirst : ∀ ω n, n < J ω → 0 < C n ω)\n    (hstop : ∀ i : ℕ, IndepFun (fun ω => if i < J ω then (1 : ℝ) else 0) (X i) μ) :\n    ∫ ω, (J ω : ℝ) ∂μ = d / (-xbar) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 28,
    "problem_name": "stochastic_processes_ergodic_steady_state",
    "informal_statement": "Let (X_n) be an ergodic finite-state Markov chain with transition matrix [P].\n\nShow that there is a unique probability vector π with π = π[P], that π_j > 0 for all j, and that P_{ij}^n → π_j as n → ∞ for all i, j.",
    "lean_statement": "theorem q28_ergodic_steady_state {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) (haper : IsAperiodic P) :\n    ∃ π : Ω → ℝ, IsStationary P π ∧ (∀ j, 0 < π j) ∧\n      (∀ π', IsStationary P π' → π' = π) ∧\n      (∀ i j, Tendsto (fun n => (P ^ n) i j) atTop (𝓝 (π j))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 29,
    "problem_name": "stochastic_processes_round_robin_steady_state",
    "informal_statement": "Consider the round-robin service system modeled as a Markov chain with arrival probability λ per quantum and geometric service requirement with per-quantum completion probability, and let ρ be the ratio of arrival rate to service rate with ρ < 1.\n\nShow that the steady-state distribution of the number in the system is geometric with parameter ρ.",
    "lean_statement": "theorem q29_round_robin_steady_state\n    (lam mu ρ : ℝ) (hmu : 0 < mu) (hρdef : ρ = lam / mu) (hρ0 : 0 ≤ ρ) (hρ1 : ρ < 1)\n    (p q : ℕ → ℝ) (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q (i + 1))\n    (hratio : ∀ i, p i / q (i + 1) = ρ) :\n    ∀ π : ℕ → ℝ, (∀ i, 0 ≤ π i) → (∑' i, π i = 1) →\n      (∀ i, π i * p i = π (i + 1) * q (i + 1)) →\n      ∀ i, π i = (1 - ρ) * ρ ^ i := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 30,
    "problem_name": "stochastic_processes_gginf_little",
    "informal_statement": "Consider a G/G/∞ queue where customer i has service time Y_i, and let L(t) be the number in the system at time t with N(t) arrivals by time t.\n\nShow that ∫_0^t L(τ) dτ ≤ Σ_{i=1}^{N(t)} Y_i, and that lim_{t→∞} (1/t) ∫_0^t L(τ) dτ = λ E[Y] with probability 1 when the arrival rate is λ.",
    "lean_statement": "theorem q30_gginf_little (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (N : ℝ → Ω → ℕ) (L : ℝ → Ω → ℝ) (a Y : ℕ → Ω → ℝ)\n    (lam EY : ℝ)\n    (hLnn : ∀ t ω, 0 ≤ L t ω)\n    (hYpos : ∀ i ω, 0 < Y i ω)\n    (hann : ∀ i ω, 0 ≤ a i ω)\n    (harea : ∀ (t : ℝ) (ω : Ω), 0 ≤ t →\n      ∫ τ in (0:ℝ)..t, L τ ω\n        = ∑ i ∈ Finset.range (N t ω), (min (a i ω + Y i ω) t - a i ω))\n    (harr : ∀ (t : ℝ) (ω : Ω) (i : ℕ), i < N t ω → a i ω ≤ t)\n    (hArate : ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (N t ω : ℝ) / t) atTop (𝓝 lam))\n    (hYavg : ∀ᵐ ω ∂μ,\n      Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ i ∈ Finset.range n, Y i ω) atTop (𝓝 EY)) :\n    (∀ (t : ℝ) (ω : Ω), 0 ≤ t →\n        ∫ τ in (0:ℝ)..t, L τ ω ≤ ∑ i ∈ Finset.range (N t ω), Y i ω)\n      ∧ (∀ᵐ ω ∂μ,\n        Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, L τ ω) atTop (𝓝 (lam * EY))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 31,
    "problem_name": "stochastic_processes_submartingale_convergence_theorem",
    "informal_statement": "Let (Z_n) be a submartingale satisfying E[|Z_n|] ≤ M < ∞ for all n.\n\nShow that Z_n converges with probability 1 to a finite limiting random variable.",
    "lean_statement": "theorem q31_submartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)\n    (M : ℝ) (hbdd : ∀ n, ∫ ω, |Z n ω| ∂μ ≤ M) :\n    ∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 32,
    "problem_name": "stochastic_processes_markov_modulated_matrix_generating",
    "informal_statement": "Let a Markov-modulated random walk have modulating chain with transition matrix [P] and per-transition increment generating functions g_{ij}(r), and define [A(r)] by A_{ij}(r) = P_{ij} g_{ij}(r).\n\nShow that E[e^{r S_n}] is obtained from the nth power of [A(r)], so that the growth rate of the walk's moment generating function is governed by the largest eigenvalue of [A(r)].",
    "lean_statement": "theorem q32_markov_modulated_matrix_generating {σ : Type*} [Fintype σ] [DecidableEq σ]\n    (P : Matrix σ σ ℝ) (g : σ → σ → ℝ)\n    (A : Matrix σ σ ℝ) (hA : ∀ i j, A i j = P i j * g i j)\n    (Φ : ℕ → σ → ℝ) (hΦ0 : ∀ i, Φ 0 i = 1)\n    (hΦrec : ∀ n i, Φ (n + 1) i = ∑ j, A i j * Φ n j) :\n    ∀ n i, Φ n i = ∑ j, (A ^ n) i j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 33,
    "problem_name": "stochastic_processes_brownian_motion_martingale",
    "informal_statement": "Let B be a standard Brownian motion with its natural filtration.\n\nShow that B(t) is a martingale.",
    "lean_statement": "theorem q33_brownian_motion_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ)\n    (hadap : Adapted ℱ B)\n    (hint : ∀ t, Integrable (B t) μ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hpast : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      Indep (MeasurableSpace.comap (fun ω => B t ω - B s ω) inferInstance) (ℱ s) μ) :\n    ∀ s t : ℝ, 0 ≤ s → s ≤ t → μ[B t | (ℱ s)] =ᵐ[μ] B s := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 34,
    "problem_name": "stochastic_processes_optional_stopping_condition",
    "informal_statement": "Let (Z_n) be a martingale and let J be a stopping trial with E[|Z_J|] < ∞.\n\nShow that E[Z_J] = E[Z_1] if and only if lim_{n→∞} E[Z_n | J > n] Pr[J > n] = 0.",
    "lean_statement": "theorem q34_optional_stopping_condition (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J))\n    (hint : Integrable (stoppedValue Z (natStop J)) μ) :\n    ∫ ω, stoppedValue Z (natStop J) ω ∂μ = ∫ ω, Z 0 ω ∂μ ↔\n      Tendsto (fun n => ∫ ω in {ω | n < J ω}, Z n ω ∂μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 35,
    "problem_name": "stochastic_processes_etemadi_inequality",
    "informal_statement": "Let S_k = X_1 + … + X_k be a random walk with independent increments and let α > 0.\n\nShow that P(max_{k≤n} |S_k| ≥ 3α) ≤ 3 max_{k≤n} P(|S_k| ≥ α).",
    "lean_statement": "theorem q35_etemadi_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α : ℝ) (hα : 0 < α) (n : ℕ) :\n    (μ {ω | 3 * α ≤ runningMax (fun k ω => |S k ω|) n ω}).toReal\n      ≤ 3 * ⨆ k : Fin (n + 1), (μ {ω | α ≤ |S (k : ℕ) ω|}).toReal := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 36,
    "problem_name": "stochastic_processes_skorokhod_map_memoryless",
    "informal_statement": "Let Φ be the one-dimensional Skorokhod reflection map.\n\nShow that Φ has the memoryless property: the reflected path after time s depends on the past only through the value of the reflected path at time s.",
    "lean_statement": "theorem q36_skorokhod_map_memoryless\n    (Φ : (ℝ≥0 → ℝ) → (ℝ≥0 → ℝ))\n    (hΦ : ∀ (x : ℝ≥0 → ℝ) (t : ℝ≥0),\n      Φ x t = x t + ⨆ r ∈ Set.Icc (0 : ℝ≥0) t, max (- x r) 0)\n    (x₁ x₂ : ℝ≥0 → ℝ) (hx₁ : Continuous x₁) (hx₂ : Continuous x₂)\n    (s : ℝ≥0)\n    (hinc : ∀ u : ℝ≥0, s ≤ u → x₁ u - x₁ s = x₂ u - x₂ s)\n    (hval : Φ x₁ s = Φ x₂ s) :\n    ∀ u : ℝ≥0, s ≤ u → Φ x₁ u = Φ x₂ u := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 37,
    "problem_name": "stochastic_processes_walds_identity_implies_equality",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps of mean X̄, and let J be a threshold-crossing stopping trial with E[J] < ∞ to which Wald's identity E[exp(r S_J − J γ(r))] = 1 applies.\n\nShow that differentiating Wald's identity at r = 0 yields E[S_J] = X̄ E[J].",
    "lean_statement": "theorem q37_walds_equation (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ]\n    (X S M : ℕ → Ω → ℝ) (Xbar : ℝ)\n    (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (hM : ∀ n ω, M n ω = S n ω - (n : ℝ) * Xbar)\n    (hMmart : Martingale M ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J))\n    (hEJ : Integrable (fun ω => (J ω : ℝ)) μ)\n    (c : ℝ) (hincr : ∀ n, ∀ᵐ ω ∂μ, |M (n + 1) ω - M n ω| ≤ c) :\n    ∫ ω, S (J ω) ω ∂μ = Xbar * ∫ ω, (J ω : ℝ) ∂μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 38,
    "problem_name": "stochastic_processes_markov_chain_1",
    "informal_statement": "A company issues N different types of coupons. Each coupon is equally likely to be each of the N types.\n        A collector desires a complete set. Let S represent the sum of (1/k), for 1 ≤ k ≤ N.\n \n        Show that the expected time for the collector to obtain all N types is N*S.",
    "lean_statement": "theorem q38_coupon_collector_expected (N : ℕ) (hN : 0 < N) (e : ℕ → ℝ) (hbN : e N = 0)\n    (hrec : ∀ k, k < N →\n      e k = 1 + ((k : ℝ) / N) * e k + (((N : ℝ) - k) / N) * e (k + 1)) :\n    e 0 = (N : ℝ) * ∑ k ∈ Finset.Icc 1 N, (1 : ℝ) / k := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 39,
    "problem_name": "stochastic_processes_azuma_hoeffding",
    "informal_statement": "Let (X_n)_{n≥1} be a martingale with X_0 = 0 and bounded differences |X_i − X_{i−1}| ≤ d_i almost surely for each i.\n\nShow that for every t > 0, P(|X_n| > t) ≤ 2 exp(−t^2 / (2 Σ_{i=1}^n d_i^2)).",
    "lean_statement": "theorem q39_azuma_hoeffding (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ)\n    (hX0 : X 0 = 0)\n    (d : ℕ → ℝ) (hd : ∀ i, 0 ≤ d i)\n    (hbd : ∀ i, 1 ≤ i → ∀ᵐ ω ∂μ, |X i ω - X (i - 1) ω| ≤ d i)\n    (n : ℕ) (t : ℝ) (ht : 0 < t)\n    (hSpos : 0 < ∑ i ∈ Finset.Icc 1 n, (d i) ^ 2) :\n    (μ {ω | t < |X n ω|}).toReal\n      ≤ 2 * Real.exp (-(t ^ 2) / (2 * ∑ i ∈ Finset.Icc 1 n, (d i) ^ 2)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 40,
    "problem_name": "stochastic_processes_class_same_period",
    "informal_statement": "Let (X_n) be a finite-state Markov chain and let d(i) = gcd{n ≥ 1 : P_{ii}^n > 0} be the period of state i.\n\nShow that all states in the same communicating class have the same period.",
    "lean_statement": "theorem q40_class_same_period {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :\n    ∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →\n      ∀ d : ℕ, (∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 41,
    "problem_name": "stochastic_processes_mdp_optimal_policy_finite_horizon",
    "informal_statement": "Consider a finite-state, finite-decision Markov decision problem over a horizon of n transitions.\n\nShow that the dynamic programming recursion yields an optimal policy, and that the decision achieving the maximum at each stage depends only on the current state and the number of stages remaining.",
    "lean_statement": "theorem q41_optimal_policy_finite_horizon {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    {K : Type*} [Fintype K] [Nonempty K]\n    (r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))\n    (v : ℕ → Ω → ℝ) (hv0 : ∀ i, v 0 i = 0)\n    (hvrec : ∀ n i, v (n + 1) i = ⨆ k, (r k i + ∑ j, P k i j * v n j)) :\n    ∃ μ : ℕ → Ω → K, ∀ n i,\n      r (μ n i) i + ∑ j, P (μ n i) i j * v n j = ⨆ k, (r k i + ∑ j, P k i j * v n j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 42,
    "problem_name": "stochastic_processes_markov_gain_reward",
    "informal_statement": "Let (X_n) be an ergodic finite-state Markov chain with steady-state vector π and a reward r_i earned on each visit to state i. Let g = Σ_i π_i r_i.\n\nShow that the long-run time-average reward equals g with probability 1, independent of the starting state.",
    "lean_statement": "theorem q42_gain_time_average {S : Type*} [Fintype S] [DecidableEq S]\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (P : Matrix S S ℝ) (π r : S → ℝ) (g : ℝ)\n    (hP : IsStochastic P) (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (hπ : IsStationary P π) (hg : g = ∑ i, π i * r i)\n    (X : ℕ → Ω → S) (x0 : S)\n    (hchain : HasChainLaw μ X (fun s => if s = x0 then 1 else 0) (fun i j => P i j)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ m ∈ Finset.range n, r (X m ω))\n      atTop (𝓝 g) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 43,
    "problem_name": "stochastic_processes_exponential_tilting",
    "informal_statement": "Let X have moment generating function M and let θ_0 be such that M(θ_0) < ∞. Define the tilted distribution by P(X_{θ_0} ≤ z) = M(θ_0)^{-1} ∫_{−∞}^z e^{θ_0 x} dP(x).\n\nShow that this defines a probability distribution and that E[X_{θ_0}] = Ṁ(θ_0)/M(θ_0).",
    "lean_statement": "theorem q43_exponential_tilting (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (hX : Measurable X) (θ₀ : ℝ)\n    (hInt : ∀ᶠ s in nhds θ₀, Integrable (fun ω => Real.exp (s * X ω)) μ) :\n    IsProbabilityMeasure (μ.tilted (fun ω => θ₀ * X ω)) ∧\n    ∫ ω, X ω ∂(μ.tilted (fun ω => θ₀ * X ω))\n      = deriv (fun t => mgf X μ t) θ₀ / mgf X μ θ₀ := by sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 44,
    "problem_name": "stochastic_processes_submartingale_max_lower_tail",
    "informal_statement": "Let (Z_n) be a nonnegative submartingale and let Z_n* = max_{0 ≤ k ≤ n} Z_k.\n\nShow that λ Pr[Z_n* ≥ λ] ≤ E[Z_n · 1{Z_n* ≥ λ}] ≤ E[Z_n] for every λ > 0.",
    "lean_statement": "theorem q44_submartingale_max_lower_tail (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ Z n ω) (lam : ℝ) (hlam : 0 < lam) (n : ℕ) :\n    lam * (μ {ω | lam ≤ runningMax Z n ω}).toReal\n        ≤ ∫ ω in {ω | lam ≤ runningMax Z n ω}, Z n ω ∂μ ∧\n      ∫ ω in {ω | lam ≤ runningMax Z n ω}, Z n ω ∂μ ≤ ∫ ω, Z n ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 45,
    "problem_name": "stochastic_processes_age_arithmetic_expectation",
    "informal_statement": "Let (N(t)) be a renewal process whose interrenewal distribution is arithmetic with unit span and finite E[X], E[X^2], and let Z(t) be the age at time t.\n\nShow that lim_{t→∞} E[Z(t)] = E[X^2]/(2 X̄) − 1/2.",
    "lean_statement": "theorem q45_age_arithmetic_expectation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hsqint : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (exsq : ℝ) (hsq : ∫ ω, (X 0 ω) ^ 2 ∂μ = exsq)\n    (harith : ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ))\n    (hspan : ∀ d : ℝ, 0 < d → (∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d) → d ≤ 1)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Z : ℝ → Ω → ℝ)\n    (hZ : ∀ t ω, Z t ω = t - (∑ i ∈ Finset.range (N t ω), X i ω)) :\n    Tendsto (fun k : ℕ => ∫ ω, Z (k : ℝ) ω ∂μ) atTop (𝓝 (exsq / (2 * xbar) - 1 / 2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 46,
    "problem_name": "stochastic_processes_delayed_renewal_reward",
    "informal_statement": "Let N be a delayed renewal process with finite positive mean interrenewal time X̄₂. Write Z(t) for age and X̃(t) for the interval duration, and R(t)=𝓡(Z(t),X̃(t)). Assume 𝓡 is jointly measurable, its paths are locally integrable, and E[∫_0^{X₂} |𝓡(z,X₂)| dz]<∞; the first delayed cycle also has finite absolute reward almost surely.\n\nShow that (1/t)∫_0^t R(s) ds converges almost surely to E[∫_0^{X₂} 𝓡(z,X₂) dz]/X̄₂.",
    "lean_statement": "theorem q46_delayed_renewal_reward (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint : Integrable (X 1) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar2 : ℝ) (hxbar2 : 0 < xbar2) (hmean : ∫ ω, X 1 ω ∂μ = xbar2)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Z : ℝ → Ω → ℝ) (hZ : ∀ t ω, Z t ω = t - ∑ i ∈ Finset.range (N t ω), X i ω)\n    (Xtil : ℝ → Ω → ℝ) (hXtil : ∀ t ω, Xtil t ω = X (N t ω) ω)\n    (rwd : ℝ → ℝ → ℝ)\n    (hrwdmeas : Measurable (Function.uncurry rwd))\n    (hrwdlocal : ∀ x : ℝ, 0 ≤ x → IntegrableOn (fun z => rwd z x) (Set.Ioc 0 x))\n    (hRabs : Integrable (fun ω => ∫ z in Set.Ioc (0 : ℝ) (X 1 ω), |rwd z (X 1 ω)|) μ)\n    (R : ℝ → Ω → ℝ)\n    (hRlocal : ∀ᵐ ω ∂μ, ∀ T : ℝ, 0 ≤ T → IntegrableOn (fun t => R t ω) (Set.Ioc 0 T))\n    (hR : ∀ t ω, R t ω = rwd (Z t ω) (Xtil t ω))\n    (rbar : ℝ)\n    (hRint : Integrable (fun ω => ∫ z in Set.Ioc (0 : ℝ) (X 1 ω), rwd z (X 1 ω)) μ)\n    (hrbar : rbar = ∫ ω, (∫ z in Set.Ioc (0 : ℝ) (X 1 ω), rwd z (X 1 ω)) ∂μ) :\n    ∀ᵐ ω ∂μ,\n      Tendsto (fun t => (1 / t) * ∫ τ in Set.Ioc (0 : ℝ) t, R τ ω)\n        atTop (𝓝 (rbar / xbar2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 47,
    "problem_name": "stochastic_processes_rate_function_exponential",
    "informal_statement": "Let X be exponentially distributed with parameter λ and let I(a)=sup_θ(θa − log M(θ)) be its Legendre transform.\n\nShow that I(a) = aλ − 1 − log λ − log a for a > 1/λ.",
    "lean_statement": "theorem q47_rate_function_exponential (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam) (X : Ω → ℝ) (hlaw : HasLaw X (expMeasure lam) μ)\n    (a : ℝ) (ha : 1 / lam < a) :\n    sSup ((fun θ : ℝ => θ * a - cgf X μ θ) ''\n        {θ : ℝ | Integrable (fun ω => Real.exp (θ * X ω)) μ})\n      = a * lam - 1 - Real.log lam - Real.log a := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 48,
    "problem_name": "stochastic_processes_random_walk_zero_mean_recurrent",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. zero-mean steps that are not identically zero.\n\nShow that the walk crosses any threshold α > 0 with probability 1.",
    "lean_statement": "theorem q48_zero_mean_walk_crosses (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : Integrable (X 0) μ) (hmean : ∫ ω, X 0 ω ∂μ = 0)\n    (hnz : 0 < (μ {ω | X 0 ω ≠ 0}).toReal)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) :\n    ∀ α : ℝ, 0 < α → ∀ᵐ ω ∂μ, ∃ n, α ≤ S n ω := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 49,
    "problem_name": "stochastic_processes_blackwell_renewal_theorem",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ whose interrenewal distribution is non-arithmetic, and let m(t) = E[N(t)].\n\nShow that for every δ > 0, lim_{t→∞} [m(t+δ) − m(t)] = δ/X̄.",
    "lean_statement": "theorem q49_blackwell_nonarithmetic (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    ∀ δ : ℝ, 0 < δ → Tendsto (fun t => m (t + δ) - m t) atTop (𝓝 (δ / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 50,
    "problem_name": "stochastic_processes_brownian_shift_invariance",
    "informal_statement": "Let B be a standard Brownian motion and fix s ≥ 0. Define B_s(t) = B(t+s) − B(s).\n\nShow that B_s is again a standard Brownian motion.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 380 (l6): the shifted process `Bₛ(t) = B(t + s) − B(s)` is again a standard Brownian motion.\nGiven a standard Brownian motion `B` (`IsBM μ 1 B`) and a fixed time `s ≥ 0`, the process\n`t ↦ B(t + s) − B(s)` satisfies the same defining properties. -/\ntheorem q50_shift_is_brownian (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (s : ℝ) (hs : 0 ≤ s) :\n    IsBM μ 1 (fun t ω => B (t + s) ω - B s ω) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 51,
    "problem_name": "stochastic_processes_brownian_marginal",
    "informal_statement": "Let B be standard Brownian motion: B(0) = 0 and the increment B(t) − B(s) is normal with mean 0 and variance t − s for 0 ≤ s ≤ t. Show that B(t) is normally distributed with mean 0 and variance t.",
    "lean_statement": "theorem q51_brownian_marginal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :\n    ∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 52,
    "problem_name": "stochastic_processes_max_cut_concentration",
    "informal_statement": "Let MC_n denote the size of a maximum cut of an Erdős–Rényi random graph G(n, d/n).\n\nShow that P(|MC_n − E[MC_n]| ≥ t) ≤ 2 exp(−t^2/(2dn)).",
    "lean_statement": "theorem q52_max_cut_concentration (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (hn : 1 ≤ n) (d : ℝ) (hd : 0 < d)\n    (Z : Fin n → Ω → ℝ) (hZindep : iIndepFun Z μ)\n    (g : (Fin n → ℝ) → ℝ) (hgmeas : Measurable g) (c : Fin n → ℝ) (hc : ∀ i, 0 ≤ c i)\n    (hbd : ∀ x y : Fin n → ℝ, |g x - g y| ≤ ∑ i, c i * (if x i = y i then 0 else 1))\n    (hc2 : ∑ i, (c i) ^ 2 ≤ d * (n : ℝ))\n    (MC : Ω → ℝ) (hMC : ∀ ω, MC ω = g (fun i => Z i ω))\n    (t : ℝ) (ht : 0 ≤ t) :\n    (μ {ω | t ≤ |MC ω - ∫ ω, MC ω ∂μ|}).toReal\n      ≤ 2 * Real.exp (-(t ^ 2) / (2 * (d * (n : ℝ)))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 53,
    "problem_name": "stochastic_processes_poisson_split_independence",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ whose arrivals are independently typed 1 or 2 with probabilities p and 1−p.\n\nShow that the counts N^1(t) and N^2(t) of the two types are independent random variables for each t.",
    "lean_statement": "theorem q53_poisson_split_independence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (p : ℝ≥0) (hp : p ≤ 1)\n    (N N1 N2 : ℝ≥0 → Ω → ℕ)\n    (hN : ∀ t : ℝ≥0, HasLaw (N t) (poissonMeasure (lam * t)) μ)\n    (hsplit : ∀ (t : ℝ≥0) ω, N1 t ω + N2 t ω = N t ω)\n    (hthin : ∀ (t : ℝ≥0) (j k : ℕ),\n      (μ {ω | N1 t ω = j ∧ N2 t ω = k}).toReal\n        = (μ {ω | N t ω = j + k}).toReal * ((j + k).choose j : ℝ)\n            * (p : ℝ) ^ j * (1 - (p : ℝ)) ^ k) :\n    ∀ t : ℝ≥0, IndepFun (N1 t) (N2 t) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 54,
    "problem_name": "stochastic_processes_continuous_mapping_theorem",
    "informal_statement": "Let P_n ⇒ P on a metric space S_1 and let f : S_1 → S_2 be continuous.\n\nShow that P_n f^{-1} ⇒ P f^{-1}.",
    "lean_statement": "theorem q54_continuous_mapping_theorem\n    {S₁ S₂ : Type*} [MeasurableSpace S₁] [TopologicalSpace S₁] [OpensMeasurableSpace S₁]\n    [MeasurableSpace S₂] [TopologicalSpace S₂] [BorelSpace S₂]\n    (Ps : ℕ → ProbabilityMeasure S₁) (P : ProbabilityMeasure S₁)\n    (hconv : Tendsto Ps atTop (𝓝 P))\n    (f : S₁ → S₂) (hf : Continuous f) :\n    Tendsto (fun n => (Ps n).map hf.measurable.aemeasurable) atTop\n      (𝓝 (P.map hf.measurable.aemeasurable)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 55,
    "problem_name": "stochastic_processes_countable_recurrent_reach_prob_one",
    "informal_statement": "Let (X_n) be an irreducible recurrent Markov chain on a countable state space.\n\nShow that F_{ij}(∞) = 1 for all states i, j, i.e. every state is reached from every state with probability 1.",
    "lean_statement": "theorem q55_recurrent_reach_prob_one {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (F : Ω → Ω → ℝ) (hF : ∀ i j, F i j = ∑' n, f n i j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j)\n    (hrec : ∀ j, ∑' n, f n j j = 1) :\n    ∀ i j, F i j = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 56,
    "problem_name": "stochastic_processes_perron_growth_rate",
    "informal_statement": "Let B be a non-negative irreducible matrix with Perron eigenvalue ρ, and let φ be a strictly positive vector.\n\nShow that lim_{n→∞} (1/n) log Σ_j (B^n)_{i,j} φ_j = log ρ for every i.",
    "lean_statement": "theorem q56_perron_growth_rate {N : Type*} [Fintype N] [DecidableEq N] [Nonempty N]\n    (B : Matrix N N ℝ) (hnn : ∀ i j, 0 ≤ B i j)\n    (hprim : ∃ m : ℕ, ∀ i j, 0 < (B ^ m) i j)\n    (ρ : ℝ) (hρ : 0 < ρ) (hρeig : ∃ v : N → ℝ, (∀ i, 0 < v i) ∧ B *ᵥ v = ρ • v)\n    (φ : N → ℝ) (hφ : ∀ j, 0 < φ j) (i : N) :\n    Filter.Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * Real.log (∑ j, (B ^ n) i j * φ j)) atTop\n      (nhds (Real.log ρ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 57,
    "problem_name": "stochastic_processes_doob_martingale",
    "informal_statement": "Let Z be a random variable with E[|Z|] < ∞, let (X_n) be an arbitrary sequence of random variables, and define Z_n = E[Z | X_n, X_{n−1}, …, X_1].\n\nShow that (Z_n) is a martingale (Doob's martingale).",
    "lean_statement": "theorem q57_doob_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Z : Ω → ℝ) (hZ : Integrable Z μ)\n    (X : ℕ → Ω → ℝ) (hX : ∀ i, StronglyMeasurable (X i)) :\n    Martingale (fun n => μ[Z | (Filtration.natural X hX) n]) (Filtration.natural X hX) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 58,
    "problem_name": "stochastic_processes_ito_fourth_power_brownian",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that d(B_t^4) = 4B_t^3 dB_t + 6B_t^2 dt, and deduce that E[∫_0^t B_s^2 ds] = (1/6) E[B_t^4] = ½ t^2.\n\nUse the natural filtration on nonnegative time; the formal real-time representation extends B by zero before time zero.",
    "lean_statement": "theorem q58_ito_fourth_power_brownian (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hmeas : ∀ t, StronglyMeasurable (B t))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hBneg : ∀ t : ℝ, t ≤ 0 → B t =ᵐ[μ] fun _ => 0)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    (∃ I : ℝ → Ω → ℝ,\n      IsItoIntegral μ (Filtration.natural B hmeas) B (fun t ω => 4 * (B t ω) ^ 3) I ∧\n      Martingale I (Filtration.natural B hmeas) μ ∧\n      (∀ᵐ ω ∂μ, I 0 ω = 0) ∧\n      (∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t →\n        (B t ω) ^ 4 = I t ω + ∫ s in (0:ℝ)..t, 6 * (B s ω) ^ 2)) ∧\n    (∀ t : ℝ, 0 ≤ t →\n      (∫ s in (0:ℝ)..t, ∫ ω, (B s ω) ^ 2 ∂μ) = (1 / 6) * ∫ ω, (B t ω) ^ 4 ∂μ) ∧\n    (∀ t : ℝ, 0 ≤ t → (1 / 6) * ∫ ω, (B t ω) ^ 4 ∂μ = (1 / 2) * t ^ 2) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 59,
    "problem_name": "stochastic_processes_unichain_limit",
    "informal_statement": "Let (X_n) be an ergodic unichain (a single ergodic recurrent class together with some transient states).\n\nShow that [P]^n → e π as n → ∞, where π is the steady-state vector of the recurrent class extended by zeros on the transient states, and e is the all-ones column vector.",
    "lean_statement": "theorem q59_unichain_limit {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (R : Set Ω) (hRne : R.Nonempty)\n    (hRclosed : ∀ x ∈ R, ∀ y, 0 < P x y → y ∈ R)\n    (hRirr : ∀ x ∈ R, ∀ y ∈ R, ∃ n : ℕ, 0 < (P ^ n) x y)\n    (hRaper : ∀ x ∈ R, ∀ d : ℕ, (∀ n, 0 < (P ^ n) x x → d ∣ n) → d ≤ 1)\n    (hreach : ∀ x : Ω, ∃ (n : ℕ) (y : Ω), y ∈ R ∧ 0 < (P ^ n) x y) :\n    ∃ π : Ω → ℝ, IsStationary P π ∧ (∀ j, j ∉ R → π j = 0) ∧\n      (∀ i j, Tendsto (fun n => (P ^ n) i j) atTop (𝓝 (π j))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 60,
    "problem_name": "stochastic_processes_martingale_stopping_time_2",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time.\n\n        Show that X^T is also a martingale.",
    "lean_statement": "theorem q60_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) :\n    Martingale (stoppedProcess X (natStop T)) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 61,
    "problem_name": "stochastic_processes_poisson_sum_interarrival_erlang",
    "informal_statement": "Let T_1, T_2, … be i.i.d. exponential of rate λ and let S_n = T_1 + … + T_n.\n\nShow that S_n is the nth arrival epoch of a Poisson process of rate λ and has the Erlang(n, λ) distribution.",
    "lean_statement": "theorem q61_erlang_interarrival_sum (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam)\n    (T : ℕ → Ω → ℝ) (hTindep : iIndepFun T μ)\n    (hTexp : ∀ i, HasLaw (T i) (expMeasure lam) μ) :\n    ∀ n : ℕ, 0 < n →\n      HasLaw (fun ω => ∑ i ∈ Finset.range n, T i ω) (gammaMeasure (n : ℝ) lam) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Poisson processes"
  },
  {
    "question_id": 62,
    "problem_name": "stochastic_processes_brownian_unbounded_variation",
    "informal_statement": "Let B be a standard Brownian motion and let LV(B) denote the total variation of a path on [0,T].\n\nShow that P(LV(B) < ∞) = 0, i.e. almost surely no Brownian path has bounded variation on any interval [0,T].",
    "lean_statement": "theorem q62_brownian_unbounded_variation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (T : ℝ) (hT : 0 < T)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    μ {ω | eVariationOn (fun t => B t ω) (Set.Icc (0 : ℝ) T) < ⊤} = 0 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 63,
    "problem_name": "stochastic_processes_product_form_unit_expectation",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X and semi-invariant generating function γ(r) = ln E[e^{rX}], and let Z_n = exp(r S_n − n γ(r)).\n\nShow that E[Z_n] = 1 for all n.",
    "lean_statement": "theorem q63_product_form_unit_expectation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (r : ℝ) (hint : Integrable (fun ω => Real.exp (r * X 0 ω)) μ)\n    (γ : ℝ) (hγ : γ = cgf (X 0) μ r)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp (r * S n ω - (n : ℝ) * γ)) (n : ℕ) :\n    ∫ ω, Z n ω ∂μ = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 64,
    "problem_name": "stochastic_processes_markov_chain_large_deviations",
    "informal_statement": "Let (X_n) be an irreducible Markov chain on {1,…,N} with transition matrix P, let f:{1,…,N}→ℝ^d, and let S_n = Σ_{k=1}^n f(X_k). For θ ∈ ℝ^d let P_θ be the matrix with entries e^{⟨θ,f(j)⟩} P_{i,j} and Perron eigenvalue ρ(P_θ), and set I(x)=sup_θ(⟨θ,x⟩ − log ρ(P_θ)).\n\nShow that the empirical means n^{-1} S_n satisfy the large deviations principle with rate function I: for every starting state i_0, limsup_n (1/n) log P(n^{-1}S_n ∈ F | X_0 = i_0) ≤ − inf_F I for closed F, and liminf_n (1/n) log P(n^{-1}S_n ∈ U | X_0 = i_0) ≥ − inf_U I for open U.",
    "lean_statement": "theorem q64_markov_chain_ldp {S : Type*} [Fintype S] [DecidableEq S] [MeasurableSpace S]\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (P : Matrix S S ℝ) (hstoch : Auto.IsStochastic P) (hirr : Auto.IsIrreducible P)\n    (d : ℕ) (f : S → (Fin d → ℝ))\n    (X : ℕ → Ω → S) (hXmeas : ∀ k, Measurable (X k)) (i0 : S)\n    (hchain : HasChainLaw μ X (fun s => if s = i0 then 1 else 0) (fun i j => P i j))\n    (Sum : ℕ → Ω → (Fin d → ℝ))\n    (hSum : ∀ n ω, Sum n ω = ∑ k ∈ Finset.range n, f (X (k + 1) ω))\n    (ρ : (Fin d → ℝ) → ℝ) (hρpos : ∀ θ, 0 < ρ θ)\n    (hρ : ∀ θ, ∃ v : S → ℝ, (∀ x, 0 < v x) ∧\n      ∀ i, ∑ j, Real.exp (∑ l, θ l * f j l) * P i j * v j = ρ θ * v i)\n    (I : (Fin d → ℝ) → EReal)\n    (hI : ∀ x, I x = ⨆ θ : Fin d → ℝ,\n      (((∑ l, θ l * x l) - Real.log (ρ θ) : ℝ) : EReal)) :\n    (∀ F : Set (Fin d → ℝ), IsClosed F →\n        Filter.limsup (fun n : ℕ => ((n : ℝ)⁻¹ : EReal)\n            * ENNReal.log (μ {ω | (fun l => (n : ℝ)⁻¹ * Sum n ω l) ∈ F})) atTop\n          ≤ - ⨅ x ∈ F, I x) ∧\n    (∀ U : Set (Fin d → ℝ), IsOpen U →\n        - ⨅ x ∈ U, I x\n          ≤ Filter.liminf (fun n : ℕ => ((n : ℝ)⁻¹ : EReal)\n              * ENNReal.log (μ {ω | (fun l => (n : ℝ)⁻¹ * Sum n ω l) ∈ U})) atTop) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 65,
    "problem_name": "stochastic_processes_brownian_quadratic_variation_l2",
    "informal_statement": "Let B be a standard Brownian motion, let Π_i be partitions of [0,T] with mesh Δ(Π_i) → 0, and let Q(Π,B) = Σ_k (B(t_k) − B(t_{k−1}))^2.\n\nShow that lim_i E[(Q(Π_i,B) − T)^2] = 0, i.e. the quadratic variation converges to T in L^2.",
    "lean_statement": "theorem q65_brownian_quadratic_variation_l2 (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (T : ℝ) (hT : 0 < T)\n    (τ : ℕ → ℕ → ℝ) (N : ℕ → ℕ) (δ : ℕ → ℝ)\n    (hposN : ∀ i, 0 < N i)\n    (hstart : ∀ i, τ i 0 = 0)\n    (hend : ∀ i, τ i (N i) = T)\n    (hmono : ∀ i, ∀ k, k < N i → τ i k < τ i (k + 1))\n    (hmesh : ∀ i, ∀ k, k < N i → τ i (k + 1) - τ i k ≤ δ i)\n    (hmesh0 : Tendsto δ Filter.atTop (𝓝 0))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    Tendsto\n      (fun i => ∫ ω,\n        ((∑ k ∈ Finset.range (N i), (B (τ i (k + 1)) ω - B (τ i k) ω) ^ 2) - T) ^ 2 ∂μ)\n      Filter.atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 66,
    "problem_name": "stochastic_processes_gg1_embedded_renewal",
    "informal_statement": "Consider a G/G/1 queue with i.i.d. interarrival times X_i and i.i.d. service times V_i, and let W_i^q be the queueing delay of customer i, satisfying W_i^q = max(W_{i−1}^q + V_{i−1} − X_i, 0).\n\nShow that the instants at which customers arrive to find the system empty form a renewal process.",
    "lean_statement": "theorem q66_gg1_embedded_renewal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X V : ℕ → Ω → ℝ) (hXpos : ∀ i ω, 0 < X i ω) (hVpos : ∀ i ω, 0 < V i ω)\n    (hXint : Integrable (X 0) μ) (hindep : iIndepFun (Sum.elim X V) μ)\n    (hXident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hVint : Integrable (V 0) μ)\n    (hVident : ∀ i, IdentDistrib (V i) (V 0) μ μ)\n    (W : ℕ → Ω → ℝ) (hW0 : ∀ ω, W 0 ω = 0)\n    (hW : ∀ i ω, W (i + 1) ω = max (W i ω + V i ω - X (i + 1) ω) 0)\n    (κ : ℕ → Ω → ℕ)\n    (hκmono : ∀ k ω, κ k ω < κ (k + 1) ω)\n    (hκempty : ∀ k ω, W (κ k ω) ω = 0)\n    (hκcover : ∀ i ω, W i ω = 0 → ∃ k, κ k ω = i)\n    (G : ℕ → Ω → ℝ)\n    (hG : ∀ k ω, G k ω = ∑ i ∈ Finset.Ico (κ k ω + 1) (κ (k + 1) ω + 1), X i ω) :\n    iIndepFun G μ ∧ ∀ k, IdentDistrib (G k) (G 0) μ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 67,
    "problem_name": "stochastic_processes_cramer_lower_bound",
    "informal_statement": "Let X_1,X_2,… be i.i.d. real random variables with moment generating function M, let S_n = n^{-1} Σ_{i=1}^n X_i, and let I(x)=sup_θ(θx − log M(θ)).\n\nShow that for every open set U ⊆ ℝ, liminf_{n→∞} (1/n) log P(S_n ∈ U) ≥ − inf_{x∈U} I(x).",
    "lean_statement": "theorem q67_cramer_lower_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = (n : ℝ)⁻¹ * ∑ i ∈ Finset.range n, X i ω)\n    (I : ℝ → EReal)\n    (hI : ∀ x, I x = ⨆ θ ∈ {θ : ℝ | Integrable (fun ω => Real.exp (θ * X 0 ω)) μ},\n      ((θ * x - cgf (X 0) μ θ : ℝ) : EReal))\n    (U : Set ℝ) (hU : IsOpen U) :\n    -(⨅ x ∈ U, I x)\n      ≤ Filter.liminf (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) * ENNReal.log (μ {ω | S n ω ∈ U})) atTop := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 68,
    "problem_name": "stochastic_processes_slln_via_backward_martingale",
    "informal_statement": "Let ξ_1,ξ_2,… be i.i.d. with E|ξ_1| < ∞ and let S_n = Σ_{i=1}^n ξ_i.\n\nShow, using the backward martingale convergence theorem, that S_n/n → E[ξ_1] almost surely.",
    "lean_statement": "theorem q68_slln_via_backward_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)\n    (hint : Integrable (ξ 0) μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, ξ i ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n => S n ω / (n : ℝ)) atTop (𝓝 (∫ ω, ξ 0 ω ∂μ)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 69,
    "problem_name": "stochastic_processes_ctmc_steady_state_process",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain whose embedded chain is positive-recurrent with stationary distribution (π_i), and whose transition rates ν_i satisfy Σ_i π_i/ν_i < ∞.\n\nShow that the limiting process probabilities are p_j = (π_j/ν_j) / Σ_k (π_k/ν_k).",
    "lean_statement": "theorem q69_ctmc_steady_state_process\n    {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (hPloop : ∀ i, P i i = 0)\n    (π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hπstat : ∀ j, ∑' i, π i * P i j = π j)\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (hsum : Summable (fun k => π k / ν k))\n    (p : S → ℝ) (hp : ∀ j, p j = (π j / ν j) / (∑' k, π k / ν k)) :\n    (∀ j, 0 ≤ p j) ∧ (∑' j, p j = 1) ∧\n      (∀ j, p j * ν j = ∑' i, p i * (ν i * P i j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 70,
    "problem_name": "stochastic_processes_poisson_thinning_chain",
    "informal_statement": "Packets arrive at node A as a Poisson process of rate λ and are forwarded A→B→C, with each link independently dropping a packet with probability that depends only on that link.\n\nShow that the stream of packets successfully delivered to C is a Poisson process, and find its rate in terms of λ and the per-link delivery probabilities.",
    "lean_statement": "theorem q70_poisson_relay_thinning (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (pAB pBC : ℝ) (hAB0 : 0 < pAB) (hAB1 : pAB ≤ 1) (hBC0 : 0 < pBC) (hBC1 : pBC ≤ 1)\n    (N M : ℝ≥0 → Ω → ℕ)\n    (hNincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (hthin : ∀ (a b : ℝ≥0), a ≤ b → ∀ m k : ℕ,\n      (μ {ω | N b ω - N a ω = m ∧ M b ω - M a ω = k}).toReal\n        = (μ {ω | N b ω - N a ω = m}).toReal\n          * (Nat.choose m k : ℝ) * (pAB * pBC) ^ k * (1 - pAB * pBC) ^ (m - k)) :\n    ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => M b ω - M a ω)\n        (poissonMeasure ((pAB * pBC).toNNReal * lam * (b - a))) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 71,
    "problem_name": "stochastic_processes_stopping_times",
    "informal_statement": "Suppose τ and τ' are stopping times.\n         \n        Show that τ + τ', τ ∧ τ', and τ ∨ τ' are also stopping times.",
    "lean_statement": "theorem q71_stopping_times {Ω : Type*} {m : MeasurableSpace Ω}\n    (ℱ : Filtration ℕ m) (τ σ : Ω → WithTop ℕ)\n    (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) :\n    IsStoppingTime ℱ (fun ω => τ ω + σ ω) ∧ IsStoppingTime ℱ (τ ⊓ σ) ∧\n      IsStoppingTime ℱ (τ ⊔ σ) := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 72,
    "problem_name": "stochastic_processes_submartingale_inequality_1",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be a non-negative submartingale.\n        Let X_n^* = max_{0 ≤ k ≤ n} X_k. \n\n        Show that λℙ[X_n^* ≥ λ] ≤ 𝔼[X_n * 1_{X_n^* ≥ λ}] ≤ 𝔼[X_n].",
    "lean_statement": "theorem q72_doob_maximal (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω)\n    (lam : ℝ) (hlam : 0 < lam) (n : ℕ) :\n    lam * (μ {ω | lam ≤ runningMax X n ω}).toReal ≤ ∫ ω in {ω | lam ≤ runningMax X n ω}, X n ω ∂μ ∧\n      ∫ ω in {ω | lam ≤ runningMax X n ω}, X n ω ∂μ ≤ ∫ ω, X n ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 73,
    "problem_name": "stochastic_processes_poisson_first_arrival_after_t",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0. For a fixed t > 0, let Z be the interval from t until the first arrival after t.\n\nShow that Z has distribution function 1 − e^{−λz} for z ≥ 0, and that Z is independent of {N(τ); τ ≤ t} and of all arrival epochs up to time t.",
    "lean_statement": "theorem q73_poisson_residual_life (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (t : ℝ≥0)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (Z : Ω → ℝ)\n    (hZdef : ∀ z : ℝ≥0, {ω | (z : ℝ) < Z ω} = {ω | N (t + z) ω - N t ω = 0})\n    (hindepincr : ∀ (τ : ℝ≥0) (z : ℝ≥0), τ ≤ t →\n      IndepFun (N τ) (fun ω => N (t + z) ω - N t ω) μ) :\n    HasLaw Z (expMeasure (lam : ℝ)) μ ∧ ∀ τ : ℝ≥0, τ ≤ t → IndepFun Z (N τ) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 74,
    "problem_name": "stochastic_processes_brownian_covariance",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that Cov(B(t),B(s)) = min(s,t).",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 382 (l6): covariance of Brownian motion. For a standard Brownian motion `B` and times\n`s, t ≥ 0`, `Cov(B(t), B(s)) = min(s, t)`. Here `covariance` is Mathlib's `ProbabilityTheory.covariance`. -/\ntheorem q74_brownian_covariance (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (s t : ℝ) (hs : 0 ≤ s) (ht : 0 ≤ t) :\n    covariance (fun ω => B t ω) (fun ω => B s ω) μ = min s t := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 75,
    "problem_name": "stochastic_processes_strong_stationary_time_1",
    "informal_statement": "Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.\n        Let the separation distance be S_x (n) = max_y (1 − P^n (x, y) / π(y)).\n        \n        Show that ||P^n (x, ·) - π||_{TV} ≤ S_x (n).",
    "lean_statement": "theorem q75_tv_le_sep {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ) (hπ : IsStationary P π)\n    (hπpos : ∀ x, 0 < π x) (x : Ω) (n : ℕ) :\n    tvDist (fun y => (P ^ n) x y) π ≤ ⨆ y, (1 - (P ^ n) x y / π y) := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 76,
    "problem_name": "stochastic_processes_doob_kolmogorov_inequality",
    "informal_statement": "Let (X_n) be a non-negative submartingale and let ε > 0.\n\nShow that P(max_{1≤m≤n} X_m ≥ ε) ≤ E[X_n^2]/ε^2.",
    "lean_statement": "theorem q76_doob_kolmogorov_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ X n ω) (ε : ℝ) (hε : 0 < ε) (n : ℕ)\n    (hint : Integrable (fun ω => (X n ω) ^ 2) μ) :\n    (μ {ω | ε ≤ runningMax X n ω}).toReal ≤ (∫ ω, (X n ω) ^ 2 ∂μ) / ε ^ 2 := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 77,
    "problem_name": "stochastic_processes_hitting_time_1",
    "informal_statement": "Suppose we have an irreducible transitive Markov chain.\n        Let τ_x be the hitting time: τ_x = min{n ≥ 0 : X_n = x}.\n        Let t_⊙ = sum_x (𝔼_a [τ_x]π(x)).\n        Let t_{hit} = max_{x,y} 𝔼_x [τ_y]. You are given t_{hit} ≥ t_⊙.\n\n        Show that t_{hit} ≤ 2t_⊙.",
    "lean_statement": "theorem q77_hitting_given {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (htrans : ∀ x y : Ω, ∃ φ : Ω ≃ Ω, φ x = y ∧ ∀ a b, P (φ a) (φ b) = P a b)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)\n    (π : Ω → ℝ) (hπ : IsStationary P π) (a : Ω)\n    (hge : ∑ x, π x * g a x ≤ ⨆ p : Ω × Ω, g p.1 p.2) :\n    (⨆ p : Ω × Ω, g p.1 p.2) ≤ 2 * ∑ x, π x * g a x := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 78,
    "problem_name": "stochastic_processes_random_walk_square_martingale",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with mean 0 and variance σ^2, and let S_n = Σ_{i=1}^n X_i.\n\nShow that S_n^2 − nσ^2 is a martingale.",
    "lean_statement": "theorem q78_square_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)\n    (hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))\n    (hint : ∀ n, Integrable (fun ω => (X n ω) ^ 2) μ) (σ2 : ℝ)\n    (hmean : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => (0 : ℝ))\n    (hvar : ∀ n, μ[fun ω => (X n ω) ^ 2 | ℱ n] =ᵐ[μ] fun _ => σ2) :\n    Martingale (fun n ω => (∑ i ∈ Finset.range n, X i ω) ^ 2 - (n : ℝ) * σ2) ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 79,
    "problem_name": "stochastic_processes_ito_half_square_brownian",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that d(½ B_t^2) = B_t dB_t + ½ dt.\n\nUse the natural filtration on nonnegative time; the formal real-time representation extends B by zero before time zero.",
    "lean_statement": "theorem q79_ito_half_square_brownian (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hmeas : ∀ t, StronglyMeasurable (B t))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hBneg : ∀ t : ℝ, t ≤ 0 → B t =ᵐ[μ] fun _ => 0)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    ∃ I : ℝ → Ω → ℝ,\n      IsItoIntegral μ (Filtration.natural B hmeas) B B I ∧\n      Martingale I (Filtration.natural B hmeas) μ ∧\n      (∀ᵐ ω ∂μ, I 0 ω = 0) ∧\n      (∀ t : ℝ, 0 ≤ t → ∫ ω, (I t ω) ^ 2 ∂μ = ∫ s in (0:ℝ)..t, ∫ ω, (B s ω) ^ 2 ∂μ) ∧\n      (∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t → (1 / 2) * (B t ω) ^ 2 = I t ω + (1 / 2) * t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 80,
    "problem_name": "stochastic_processes_poisson_process_markov",
    "informal_statement": "Let (N_t)_{t ≥ 0} be a Poisson process.\n\n        Show that for all s ≥ 0, the process (N_{t + s} − N_s)_{t ≥ 0} is also a Poisson process.",
    "lean_statement": "theorem q80_poisson_markov (μ : Measure Ω) [IsProbabilityMeasure μ] (N : ℝ≥0 → Ω → ℕ)\n    (lam s : ℝ≥0)\n    (hpp : ∀ a b : ℝ≥0, a ≤ b → HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (hindep : ∀ a b c d : ℝ≥0, b ≤ c →\n      IndepFun (fun ω => N b ω - N a ω) (fun ω => N d ω - N c ω) μ) :\n    (∀ t : ℝ≥0, HasLaw (fun ω => N (s + t) ω - N s ω) (poissonMeasure (lam * t)) μ) ∧\n    (∀ t1 t2 t3 t4 : ℝ≥0, t2 ≤ t3 →\n      IndepFun (fun ω => N (s + t2) ω - N (s + t1) ω)\n        (fun ω => N (s + t4) ω - N (s + t3) ω) μ) := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 81,
    "problem_name": "stochastic_processes_markov_modulated_product_martingale",
    "informal_statement": "Let a Markov-modulated random walk have matrix [A(r)] with largest eigenvalue ρ(r) and corresponding positive right eigenvector ν(r), and define Z_n = exp(r S_n) ν_{Y_n}(r) / ρ(r)^n.\n\nShow that (Z_n) is a martingale.",
    "lean_statement": "theorem q81_markov_modulated_product_martingale {σ : Type*} [Fintype σ]\n    (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Y : ℕ → Ω → σ) (X S : ℕ → Ω → ℝ) (r ρ : ℝ) (hρ : 0 < ρ)\n    (ν : σ → ℝ) (hν : ∀ s, 0 < ν s)\n    (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) (hSadap : Adapted ℱ S)\n    (Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp (r * S n ω) * ν (Y n ω) / ρ ^ n)\n    (hadap : Adapted ℱ Z) (hint : ∀ n, Integrable (Z n) μ)\n    (heig : ∀ n, μ[fun ω => Real.exp (r * X n ω) * ν (Y (n + 1) ω) | ℱ n]\n              =ᵐ[μ] fun ω => ρ * ν (Y n ω)) :\n    Martingale Z ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 82,
    "problem_name": "stochastic_processes_delayed_count_to_infinity",
    "informal_statement": "Let (N(t))_{t>0} be a delayed renewal counting process, i.e. the first renewal epoch X_1 has distribution G and the subsequent interrenewal intervals X_2, X_3, … are i.i.d. with distribution F.\n\nShow that lim_{t→∞} N(t) = ∞ with probability 1 and lim_{t→∞} E[N(t)] = ∞.",
    "lean_statement": "theorem q82_delayed_count_to_infinity (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t}) :\n    (∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (N t ω : ℝ)) atTop atTop) ∧\n      Tendsto (fun t : ℝ => ∫ ω, (N t ω : ℝ) ∂μ) atTop atTop := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 83,
    "problem_name": "stochastic_processes_class_transient_recurrent",
    "informal_statement": "Let (X_n) be a finite-state Markov chain.\n\nShow that within any communicating class, either all states are transient or all states are recurrent.",
    "lean_statement": "theorem q83_class_transient_recurrent {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :\n    ∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →\n      (Summable (fun n => (P ^ n) x x) ↔ Summable (fun n => (P ^ n) y y)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 84,
    "problem_name": "stochastic_processes_stationary_distribution_convergence_1",
    "informal_statement": "Given an irreducible and aperiodic Markov chain that is positive recurrent,\n\n        Show that lim_n ||P^n (x, ·) - π||_{TV} = 0.",
    "lean_statement": "theorem q84_tv_convergence {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∀ x, Tendsto (fun n => tvDist (fun y => (P ^ n) x y) π) atTop (𝓝 0) := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 85,
    "problem_name": "stochastic_processes_renewal_slln",
    "informal_statement": "Let S_n = X_1 + … + X_n where the X_i are i.i.d. with E[|X|] < ∞ and mean X̄.\n\nShow that Pr[lim_{n→∞} S_n/n = X̄] = 1.",
    "lean_statement": "theorem q85_renewal_slln (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hint : Integrable (X 0) μ)\n    (hindep : Pairwise (fun i j => IndepFun (X i) (X j) μ))\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ • (∑ i ∈ Finset.range n, X i ω))\n      atTop (𝓝 (μ[X 0])) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 86,
    "problem_name": "stochastic_processes_birth_death_geometric",
    "informal_statement": "Consider an irreducible birth-death chain on {0,1,2,…} with constant ratio ρ = p/q < 1 (up-probability p, down-probability q at every interior state).\n\nShow that the stationary distribution is π_i = (1 − ρ) ρ^i for i ≥ 0.",
    "lean_statement": "theorem q86_birth_death_geometric\n    (P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)\n    (hratio : ∀ i, P i (i + 1) = ρ * P (i + 1) i)\n    (π : ℕ → ℝ) (hπ : ∀ i, π i = (1 - ρ) * ρ ^ i) :\n    (∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧\n      (∀ i, π i * P i (i + 1) = π (i + 1) * P (i + 1) i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 87,
    "problem_name": "stochastic_processes_martingale_simple_random_walk",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be the simple random walk on ℤ.\n\n        Show that (Y_n := X_n^3 − 3nX_n)_{n ≥ 0} is a martingale.",
    "lean_statement": "theorem q87_srw_cubic_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (fun ω => (X n ω) ^ 3) μ)\n    (hstep : ∀ n, ∀ᵐ ω ∂μ, X (n + 1) ω = X n ω + 1 ∨ X (n + 1) ω = X n ω - 1)\n    (hsym : IsConstDrift μ ℱ X 0) :\n    Martingale (fun n ω => (X n ω) ^ 3 - 3 * n * X n ω) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 88,
    "problem_name": "stochastic_processes_stopped_submartingale_bounds",
    "informal_statement": "Let (Z_n) be a submartingale and let J be a stopping trial with stopped process (Z_n*).\n\nShow that E[Z_1] ≤ E[Z_n*] ≤ E[Z_n] for all n.",
    "lean_statement": "theorem q88_stopped_submartingale_bounds (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :\n    ∫ ω, Z 0 ω ∂μ ≤ ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧\n      ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ≤ ∫ ω, Z n ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 89,
    "problem_name": "stochastic_processes_walds_equality_failure",
    "informal_statement": "Consider i.i.d. ±1 steps with Pr[+1] = p and a gambler who stops the first time the sum reaches +1; let J be that stopping trial.\n\nShow that for p = 1/2 the trial is finite with probability 1 yet E[J] = ∞, so that E[S_J] = 1 ≠ X̄ E[J], demonstrating that the hypothesis E[J] < ∞ is necessary for Wald's equality.",
    "lean_statement": "theorem q89_walds_equality_failure (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ)\n    (hp : ∀ i, μ {ω | X i ω = 1} = (1/2 : ℝ≥0∞))\n    (hm : ∀ i, μ {ω | X i ω = -1} = (1/2 : ℝ≥0∞))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (J : Ω → ℕ)\n    (hJ : ∀ ω, (∃ n, S n ω = 1) → (S (J ω) ω = 1 ∧ ∀ k, k < J ω → S k ω ≠ 1)) :\n    (μ {ω | ∃ n, S n ω = 1} = 1) ∧\n      (¬ Integrable (fun ω => (J ω : ℝ)) μ) ∧\n      (∫ ω, S (J ω) ω ∂μ = 1 ∧ ∫ ω, X 0 ω ∂μ = 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 90,
    "problem_name": "stochastic_processes_ito_integral_martingale_simple",
    "informal_statement": "Let X be a simple adapted process in L^2.\n\nShow that I_t(X) is a continuous square-integrable martingale, i.e. I_t(X) ∈ M^{2,c}.",
    "lean_statement": "theorem q90_ito_simple_is_M2c (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ)\n    (hBmart : Martingale B ℱ μ)\n    (hBcont : ∀ ω, Continuous (fun t => B t ω))\n    (hBL2 : ∀ t, MemLp (B t) 2 μ)\n    (s : ℕ → ℝ) (hsmono : Monotone s) (N : ℕ)\n    (ξ : ℕ → Ω → ℝ)\n    (hξadap : ∀ j, StronglyMeasurable[ℱ (s j)] (ξ j))\n    (hξbdd : ∀ j, ∃ C : ℝ, ∀ ω, |ξ j ω| ≤ C)\n    (J : ℝ → Ω → ℝ)\n    (hJ : ∀ t ω, J t ω =\n      ∑ j ∈ Finset.range N, ξ j ω * (B (min t (s (j + 1))) ω - B (min t (s j)) ω)) :\n    Martingale J ℱ μ ∧ (∀ ω, Continuous (fun t => J t ω)) ∧ (∀ t, MemLp (J t) 2 μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 91,
    "problem_name": "stochastic_processes_random_walk_max_chernoff",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X having X̄ < 0, and suppose γ(r) = ln E[e^{rX}] satisfies 0 < γ(r) < ∞ for some r > 0.\n\nShow that Pr[max_{1 ≤ i ≤ n} S_i ≥ α] ≤ exp(−rα + n γ(r)) for every α > 0.",
    "lean_statement": "theorem q91_random_walk_max_chernoff (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hmean : ∫ ω, X 0 ω ∂μ < 0)\n    (r : ℝ) (hr : 0 < r) (hint : Integrable (fun ω => Real.exp (r * X 0 ω)) μ)\n    (γ : ℝ) (hγ : γ = cgf (X 0) μ r) (hγpos : 0 < γ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α : ℝ) (hα : 0 < α) (n : ℕ) :\n    (μ {ω | α ≤ runningMax S n ω}).toReal ≤ Real.exp (-r * α + (n : ℝ) * γ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 92,
    "problem_name": "stochastic_processes_renewal_equation",
    "informal_statement": "Let (N(t)) be a renewal process with interrenewal distribution F_X and let m(t) = E[N(t)].\n\nShow that m satisfies the renewal equation m(t) = F_X(t) + ∫_0^t m(t−x) dF_X(x).",
    "lean_statement": "theorem q92_renewal_equation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t →\n      {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (F : StieltjesFunction ℝ) (hF : ∀ x, F x = (μ {ω | X 0 ω ≤ x}).toReal)\n    (m : StieltjesFunction ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    ∀ t : ℝ, 0 ≤ t → m t = F t + ∫ x in Set.Ioc (0 : ℝ) t, m (t - x) ∂F.measure := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 93,
    "problem_name": "stochastic_processes_hitting_time_2",
    "informal_statement": "Suppose we have an irreducible transitive Markov chain.\n        Let τ_x be the hitting time: τ_x = min{n ≥ 0 : X_n = x}.\n        Let t_⊙ = sum_x (𝔼_a [τ_x]π(x)).\n        Let t_{hit} = max_{x,y} 𝔼_x [τ_y] ≥ t_⊙.\n\n        Show that t_{hit} ≤ 2t_⊙.",
    "lean_statement": "theorem q93_hitting_transitive {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (htrans : ∀ x y : Ω, ∃ φ : Ω ≃ Ω, φ x = y ∧ ∀ a b, P (φ a) (φ b) = P a b)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)\n    (π : Ω → ℝ) (hπ : IsStationary P π) (a : Ω) :\n    (⨆ p : Ω × Ω, g p.1 p.2) ≤ 2 * ∑ x, π x * g a x := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 94,
    "problem_name": "stochastic_processes_ergodic_chain_positive_powers",
    "informal_statement": "Let (X_n) be an ergodic Markov chain with M states (a single recurrent aperiodic class).\n\nShow that P_{ij}^m > 0 for all states i, j and all m ≥ (M−1)^2 + 1.",
    "lean_statement": "theorem q94_ergodic_positive_powers {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (M : ℕ) (hM : M = Fintype.card Ω) :\n    ∀ i j : Ω, ∀ m : ℕ, (M - 1) ^ 2 + 1 ≤ m → 0 < (P ^ m) i j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 95,
    "problem_name": "stochastic_processes_hypercube_lazy_walker",
    "informal_statement": "Let X_t = (X_t^1, ..., X_t^n) be the position of the lazy random walker on the\n        hypercube {0, 1}^n, started at X_0 = 1 = (1, ..., 1).\n        Let X represent the sum of X_t^i, for 1 ≤ i ≤ n. \n        \n        Show that there exists a constant c_0 > 0 such that t_{mix} ≥ cN log N.",
    "lean_statement": "theorem q95_hypercube_mixing_lower :\n    ∃ c : ℝ, 0 < c ∧ ∀ (d : ℕ), 1 ≤ d →\n      ∀ (P : Matrix (Fin d → Bool) (Fin d → Bool) ℝ),\n        (∀ x y, P x y = if x = y then (1 : ℝ) / 2 else\n          if (Finset.univ.filter (fun i => x i ≠ y i)).card = 1 then 1 / (2 * (d : ℝ)) else 0) →\n      ∀ (π : (Fin d → Bool) → ℝ), (∀ x, π x = 1 / (2 : ℝ) ^ d) →\n      ∀ n : ℕ, (∀ x, tvDist (fun y => (P ^ n) x y) π ≤ 1 / 4) →\n        c * (d : ℝ) * Real.log d ≤ (n : ℝ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 96,
    "problem_name": "stochastic_processes_ctmc_reversibility_embedded",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain with embedded jump chain (X_n).\n\nShow that the process (X(t)) is reversible if and only if the embedded chain (X_n) is reversible.",
    "lean_statement": "theorem q96_ctmc_reversibility_embedded {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)\n    (p : S → ℝ) (hp0 : ∀ i, 0 < p i) (hpsum : ∑' i, p i = 1)\n    (π : S → ℝ) (hπ0 : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hnorm : Summable (fun k => p k * ν k))\n    (hlink : ∀ i, π i * (∑' k, p k * ν k) = p i * ν i) :\n    (∀ i j, p i * q i j = p j * q j i) ↔ (∀ i j, π i * P i j = π j * P j i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 97,
    "problem_name": "stochastic_processes_kolmogorov_cycle_criterion_chain",
    "informal_statement": "Let (X_n) be an irreducible positive-recurrent Markov chain with transition probabilities P_{ij}.\n\nShow that the chain is reversible if and only if for every cycle of distinct states i_1, i_2, …, i_m, i_1 the transition-probability products around the cycle agree in both directions.",
    "lean_statement": "theorem q97_kolmogorov_criterion\n    {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (π : S → ℝ) (hπpos : ∀ s, 0 < π s) (hπsum : ∑' s, π s = 1)\n    (hπstat : ∀ j, ∑' i, π i * P i j = π j)\n    (hirr : ∀ a b : S, ∃ (c : ℕ → S) (m : ℕ),\n        c 0 = a ∧ c m = b ∧ ∀ t < m, 0 < P (c t) (c (t + 1))) :\n    (∀ a b, π a * P a b = π b * P b a)\n      ↔ (∀ (m : ℕ) (c : ℕ → S), c 0 = c m →\n          ∏ t ∈ Finset.range m, P (c t) (c (t + 1))\n            = ∏ t ∈ Finset.range m, P (c (t + 1)) (c t)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 98,
    "problem_name": "stochastic_processes_poisson_process_counting_process",
    "informal_statement": "Let (N^i)_{i>=1} be a countable family of independent Poisson processes with positive intensities (lambda_i)_{i>=1}, and suppose lambda = sum_i lambda_i < infinity. Show that the superposition N_t = sum_i N_t^i is a Poisson process of intensity lambda: over every interval [s,t] the increment N_t - N_s is Poisson(lambda*(t-s)), formed from the independent increments of the constituent processes.",
    "lean_statement": "theorem q98_poisson_superposition_process (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℕ → ℝ≥0) (hsum : Summable lam)\n    (N : ℕ → ℝ → Ω → ℕ)\n    (hN0 : ∀ i ω, N i 0 ω = 0)\n    (hincr : ∀ (i : ℕ) (s t : ℝ), 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => N i t ω - N i s ω) (poissonMeasure (lam i * (t - s).toNNReal)) μ)\n    (hfamindep : ∀ (s t : ℝ), 0 ≤ s → s ≤ t →\n      iIndepFun (fun i ω => N i t ω - N i s ω) μ) :\n    ∀ (s t : ℝ), 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => ∑' i, (N i t ω - N i s ω))\n        (poissonMeasure ((∑' i, lam i) * (t - s).toNNReal)) μ := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 99,
    "problem_name": "stochastic_processes_simple_random_walk",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be the simple random walk on ℤ.\n        Let τ be the first time that the walker hits either 0 or N.\n\n        Show that, for 0 ≤ k ≤ N, we have 𝔼_k [τ | X_τ = N] = (N^2 - k^2) / 3.",
    "lean_statement": "theorem q99_srw_conditional_time (N : ℕ) (v : ℕ → ℝ) (hbN : v N = 0)\n    (hrec : ∀ k, 0 < k → k < N →\n      v k = 1 + (((k : ℝ) + 1) / (2 * k)) * v (k + 1) + (((k : ℝ) - 1) / (2 * k)) * v (k - 1))\n    (k : ℕ) (hk0 : 0 < k) (hk : k ≤ N) :\n    v k = ((N : ℝ) ^ 2 - (k : ℝ) ^ 2) / 3 := by sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 100,
    "problem_name": "stochastic_processes_martingale_lp_convergence",
    "informal_statement": "Let (X_n) be a martingale with sup_n E[|X_n|^p] < ∞ for some p > 1.\n\nShow that X_n converges almost surely and in L^p to a limiting random variable X.",
    "lean_statement": "theorem q100_martingale_lp_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ)\n    (p : ℝ) (hp : 1 < p) (hmem : ∀ n, MemLp (X n) (ENNReal.ofReal p) μ)\n    (C : ℝ) (hbdd : ∀ n, ∫ ω, |X n ω| ^ p ∂μ ≤ C) :\n    ∃ Xinf : Ω → ℝ, MemLp Xinf (ENNReal.ofReal p) μ ∧\n      (∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧\n      Tendsto (fun n => eLpNorm (fun ω => X n ω - Xinf ω) (ENNReal.ofReal p) μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 101,
    "problem_name": "stochastic_processes_optional_stopping_bounded_process_martingale",
    "informal_statement": "Let (X_n) be a martingale that is uniformly bounded, i.e. |X_n| ≤ M almost surely for all n, and let τ be a stopping time.\n\nShow that E[X_τ] = E[X_0].",
    "lean_statement": "theorem q101_optional_stopping_bounded_process_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)\n    (hX : Martingale X ℱ μ) (M : ℝ) (hbdd : ∀ n ω, |X n ω| ≤ M)\n    (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ = ∫ ω, X 0 ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 102,
    "problem_name": "stochastic_processes_chapman_kolmogorov_finite",
    "informal_statement": "Let (X_n) be a finite-state Markov chain with transition matrix [P].\n\nShow that the n-step transition probabilities satisfy P_{ij}^{m+n} = Σ_k P_{ik}^m P_{kj}^n.",
    "lean_statement": "theorem q102_chapman_kolmogorov {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (m n : ℕ) (i j : Ω) :\n    (P ^ (m + n)) i j = ∑ k, (P ^ m) i k * (P ^ n) k j := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 103,
    "problem_name": "stochastic_processes_random_walk_centered_martingale",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with mean μ and E|X_1| < ∞, and let S_n = Σ_{i=1}^n X_i.\n\nShow that S_n − μn is a martingale with respect to the filtration generated by (X_i).",
    "lean_statement": "theorem q103_centered_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)\n    (hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))\n    (hint : ∀ n, Integrable (X n) μ) (m : ℝ)\n    (hincr : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => m) :\n    Martingale (fun n ω => (∑ i ∈ Finset.range n, X i ω) - m * (n : ℝ)) ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 104,
    "problem_name": "stochastic_processes_exponential_max_and_min_order",
    "informal_statement": "Let T_1, …, T_n be i.i.d. exponential random variables of rate λ, and let Z = max_i T_i.\n\nShow that Z has distribution function [1 − e^{−λz}]^n, that the minimum has density n λ e^{−nλt}, and that successive order-statistic gaps are independent exponentials of rates (n−i+1)λ.",
    "lean_statement": "theorem q104_exponential_max_min_order (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (lam : ℝ) (hlam : 0 < lam)\n    (T : Fin n → Ω → ℝ) (hTindep : iIndepFun T μ)\n    (hTexp : ∀ i, HasLaw (T i) (expMeasure lam) μ)\n    (V G : ℕ → Ω → ℝ)\n    (hV0 : ∀ ω, V 0 ω = 0)\n    (hVmono : ∀ ω i, i < n → V i ω ≤ V (i + 1) ω)\n    (hVperm : ∀ ω, ∃ σ : Equiv.Perm (Fin n), ∀ i : Fin n, V ((i : ℕ) + 1) ω = T (σ i) ω)\n    (hG : ∀ k ω, G k ω = V k ω - V (k - 1) ω) :\n    (∀ z : ℝ, 0 ≤ z →\n        (μ {ω | ∀ i, T i ω ≤ z}).toReal = (1 - Real.exp (-(lam * z))) ^ n)\n      ∧ (∀ t : ℝ, 0 ≤ t →\n        (μ {ω | ∀ i, t < T i ω}).toReal = Real.exp (-((n : ℝ) * lam * t)))\n      ∧ (iIndepFun (fun i : Fin n => G ((i : ℕ) + 1)) μ\n        ∧ ∀ i : Fin n,\n            HasLaw (G ((i : ℕ) + 1)) (expMeasure (((n : ℝ) - ((i : ℕ) : ℝ)) * lam)) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 105,
    "problem_name": "stochastic_processes_two_threshold_stopping_finite",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X that takes both signs, and for thresholds α > 0 > β let J be the first n with S_n ≥ α or S_n ≤ β.\n\nShow that J is a stopping trial that is finite with probability 1, with Pr[J > nk] ≤ (1 − ε)^k for some ε > 0, so that all moments of J are finite.",
    "lean_statement": "theorem q105_two_threshold_stopping (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hid : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hpos : 0 < (μ {ω | 0 < X 0 ω}).toReal) (hneg : 0 < (μ {ω | X 0 ω < 0}).toReal)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) (hSadap : Adapted ℱ S)\n    (α β : ℝ) (hα : 0 < α) (hβ : β < 0)\n    (J : Ω → ℕ)\n    (hJpos : ∀ ω, 0 < J ω)\n    (hJcross : ∀ ω, α ≤ S (J ω) ω ∨ S (J ω) ω ≤ β)\n    (hJmin : ∀ ω n, 0 < n → n < J ω → β < S n ω ∧ S n ω < α) :\n    IsStoppingTime ℱ (natStop J)\n      ∧ (∃ (d : ℕ) (ε : ℝ), 0 < ε ∧ ∀ k : ℕ, tailProb μ J (d * k) ≤ (1 - ε) ^ k)\n      ∧ (∀ pw : ℕ, Integrable (fun ω => (J ω : ℝ) ^ pw) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 106,
    "problem_name": "stochastic_processes_birth_death_process_reversible",
    "informal_statement": "Consider a birth-death continuous-time Markov chain that possesses a steady-state distribution.\n\nShow that the process is reversible.",
    "lean_statement": "theorem q106_birth_death_reversible\n    (lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)\n    (mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))\n    (q : ℕ → ℕ → ℝ)\n    (hqbirth : ∀ i, q i (i + 1) = lam i)\n    (hqdeath : ∀ i, q (i + 1) i = mu (i + 1))\n    (hqother : ∀ i j, j ≠ i + 1 → i ≠ j + 1 → q i j = 0)\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam 0 = p 1 * mu 1)\n    (hbal : ∀ n, p (n + 1) * (lam (n + 1) + mu (n + 1)) = p n * lam n + p (n + 2) * mu (n + 2)) :\n    ∀ i j, p i * q i j = p j * q j i := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 107,
    "problem_name": "stochastic_processes_product_unit_mean_martingale",
    "informal_statement": "Let (X_i) be i.i.d. with E[X_i] = 1, and let Z_n = X_1 X_2 … X_n.\n\nShow that (Z_n) is a martingale.",
    "lean_statement": "theorem q107_iid_product_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : ∀ n, Integrable (fun ω => ∏ i ∈ Finset.range (n + 1), X i ω) μ)\n    (hmean : ∫ ω, X 0 ω ∂μ = 1) :\n    Martingale (fun n ω => ∏ i ∈ Finset.range (n + 1), X i ω)\n      (Filtration.natural X hmeas) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 108,
    "problem_name": "stochastic_processes_single_threshold_wald_bound",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X having X̄ < 0 and let r* > 0 be the root of γ(r) = ln E[e^{rX}] = 0; let J be the first trial at which S_n crosses a single threshold α > 0.\n\nShow that Pr[S_J ≥ α] ≤ exp(−r* α).",
    "lean_statement": "theorem q108_single_threshold_wald_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hmean : ∫ ω, X 0 ω ∂μ < 0)\n    (rstar : ℝ) (hr0 : 0 < rstar)\n    (hint : Integrable (fun ω => Real.exp (rstar * X 0 ω)) μ)\n    (hroot : cgf (X 0) μ rstar = 0)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α : ℝ) (hα : 0 < α) :\n    (μ {ω | ∃ n, α ≤ S n ω}).toReal ≤ Real.exp (-rstar * α) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 109,
    "problem_name": "stochastic_processes_convergence_theorem_1",
    "informal_statement": "Suppose that P is irreducible, aperiodic, with stationary distribution π.\n        \n        Show that there exist constants α ∈ (0, 1) and C > 0 such that\n        max_{x ∈ Ω} ||P^n(x, ·) − π||_{TV} ≤ C * α^n, ∀n ≥ 1.",
    "lean_statement": "theorem q109_convergence_rate {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∃ α : ℝ, 0 < α ∧ α < 1 ∧ ∃ C : ℝ, 0 < C ∧\n      ∀ n, 1 ≤ n → ∀ x, tvDist (fun y => (P ^ n) x y) π ≤ C * α ^ n := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 110,
    "problem_name": "stochastic_processes_brownian_scaling_1",
    "informal_statement": "Standard Brownian motion is invariant under Brownian scaling: for c > 0, the rescaled process W(t) = c B(t / c²) has the same increment law as B, namely W(t) − W(s) ~ Normal(0, t − s) for 0 ≤ s ≤ t.",
    "lean_statement": "theorem q110_brownian_scaling (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (c : ℝ) (hc : 0 < c)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :\n    ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => c * B (t / c ^ 2) ω - c * B (s / c ^ 2) ω)\n        (gaussianReal 0 (t - s).toNNReal) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 111,
    "problem_name": "stochastic_processes_semi_markov_mg1",
    "informal_statement": "Consider a work-conserving M/G/1 queue, initially empty, with Poisson arrivals of rate λ>0 and nonnegative i.i.d. service times independent of arrivals, with 0<E[V]<∞ and ρ=λE[V]<1. Its departure-embedded transition from i is (i−1)⁺ plus the number of Poisson arrivals during an independent service time.\n\nShow that this embedded chain is irreducible and positive recurrent (equivalently, it has an invariant probability), and that the time fraction the server is busy converges almost surely to ρ.",
    "lean_statement": "theorem q111_semi_markov_mg1\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam EV : ℝ) (hlam : 0 < lam) (hEV : 0 < EV) (hstab : lam * EV < 1)\n    (T V : ℕ → Ω → ℝ) (hindep : iIndepFun (Sum.elim T V) μ)\n    (hTlaw : ∀ i, HasLaw (T i) (expMeasure lam) μ)\n    (hVident : ∀ i, IdentDistrib (V i) (V 0) μ μ)\n    (hVnn : ∀ i ω, 0 ≤ V i ω) (hVint : Integrable (V 0) μ)\n    (hEVmean : ∫ ω, V 0 ω ∂μ = EV)\n    (P : ℕ → ℕ → ℝ)\n    (hP : ∀ i j, P i j = if i - 1 ≤ j then\n      ∫ ω, ((poissonMeasure (Real.toNNReal (lam * V 0 ω))) {j - (i - 1)}).toReal ∂μ\n      else 0)\n    (A W D : ℕ → Ω → ℝ)\n    (hA : ∀ n ω, A n ω = ∑ i ∈ Finset.range (n + 1), T i ω)\n    (hW0 : ∀ ω, W 0 ω = 0)\n    (hW : ∀ n ω, W (n + 1) ω = max 0 (W n ω + V n ω - T (n + 1) ω))\n    (hD : ∀ n ω, D n ω = A n ω + W n ω + V n ω)\n    (busy : ℝ → Ω → ℝ)\n    (hbusy : ∀ t ω, busy t ω = if ∃ n, A n ω + W n ω ≤ t ∧ t < D n ω then 1 else 0) :\n    (∀ i j, ∃ n, 0 < nstep P n i j) ∧ HasInvariantProbability P ∧\n      (∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ s in (0:ℝ)..t, busy s ω)\n        atTop (𝓝 (lam * EV))) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 112,
    "problem_name": "stochastic_processes_wiener_measure_existence",
    "informal_statement": "A Wiener measure with parameter σ is a probability measure P on C[0,∞) with its Borel σ-field such that P(B(0)=0)=1, the increments are independent, and B(t)−B(s) is normal with mean 0 and variance σ^2(t−s).\n\nShow that for every σ ≥ 0 there exists a unique such Wiener measure.",
    "lean_statement": "/-- A Wiener measure with parameter `σ` on the path space `C([0,∞), ℝ)` (here `C(ℝ≥0, ℝ)` with its\nBorel σ-field), expressed through the coordinate process `ω ↦ ω t`: it is a probability measure `P`\nwith `P(ω 0 = 0) = 1`, independent increments (over disjoint time intervals), and increment law\n`ω t − ω s ∼ N(0, σ²(t − s))`. -/\ndef IsWienerMeasure [MeasurableSpace C(ℝ≥0, ℝ)] (σ : ℝ) (P : Measure C(ℝ≥0, ℝ)) : Prop :=\n  IsProbabilityMeasure P ∧\n  P {ω : C(ℝ≥0, ℝ) | ω 0 = 0} = 1 ∧\n  HasIndepIncrements (fun (t : ℝ≥0) (ω : C(ℝ≥0, ℝ)) => ω t) P ∧\n  (∀ s t : ℝ≥0, s ≤ t →\n    HasLaw (fun ω : C(ℝ≥0, ℝ) => ω t - ω s)\n      (gaussianReal 0 (σ ^ 2 * ((t : ℝ) - s)).toNNReal) P)\n\n/-- 378 (l6): existence and uniqueness of Wiener measure. For every parameter `σ ≥ 0` there exists a\nunique probability measure on the path space `C([0,∞), ℝ)` (with its Borel σ-field) satisfying the\nWiener-measure axioms: starting at `0`, independent increments, and Gaussian increments with mean `0`\nand variance `σ²(t − s)`. Faithful abstraction (Mathlib has no Wiener measure): the claim is `∃!` such\n`P` for the coordinate process on `C(ℝ≥0, ℝ)`. -/\ntheorem q112_wiener_measure_exists_unique\n    [MeasurableSpace C(ℝ≥0, ℝ)] [BorelSpace C(ℝ≥0, ℝ)]\n    (σ : ℝ) (hσ : 0 ≤ σ) :\n    ∃! P : Measure C(ℝ≥0, ℝ), IsWienerMeasure σ P := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 113,
    "problem_name": "stochastic_processes_gamblers_ruin_1",
    "informal_statement": "Consider a gambler betting on the outcome of a sequence of independent fair coin tosses.\n        If head, he gains one dollar. If tail, he loses one dollar.\n        If he reaches a fortune of N dollars, he stops. If his purse is ever empty, he stops.\n \n        Show that the probability that the gambler's fortune is equal to N dollars when they stop is k/N.",
    "lean_statement": "theorem q113_gamblers_ruin_probability\n    (N : ℕ) (hN : 0 < N) (h : ℕ → ℝ)\n    (hb0 : h 0 = 0) (hbN : h N = 1)\n    (hharm : ∀ k, 0 < k → k < N → h k = (h (k - 1) + h (k + 1)) / 2)\n    (k : ℕ) (hk : k ≤ N) :\n    h k = (k : ℝ) / (N : ℝ) := by sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 114,
    "problem_name": "stochastic_processes_ctmc_transition_rate_limit",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain whose embedded chain is positive-recurrent with stationary distribution π and exit rates ν_i, with Σ_k π_k/ν_k < ∞.\n\nShow that the long-run rate of transitions equals 1/Σ_k (π_k/ν_k) with probability 1.",
    "lean_statement": "theorem q114_ctmc_transition_rate_limit (μ : Measure Ω) [IsProbabilityMeasure μ]\n    {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (hPloop : ∀ i, P i i = 0)\n    (π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hπstat : ∀ j, ∑' i, π i * P i j = π j)\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (hsum : Summable (fun k => π k / ν k))\n    (H : ℕ → Ω → ℝ) (hHpos : ∀ n ω, 0 < H n ω)\n    (T : ℕ → Ω → ℝ) (hT0 : ∀ ω, T 0 ω = 0) (hT : ∀ n ω, T (n + 1) ω = T n ω + H n ω)\n    (N : ℝ → Ω → ℕ)\n    (hNdef : ∀ (t : ℝ) ω, 0 ≤ t → T (N t ω) ω ≤ t ∧ t < T (N t ω + 1) ω)\n    (hLLN : ∀ᵐ ω ∂μ,\n        Tendsto (fun n : ℕ => (∑ k ∈ Finset.range n, H k ω) / (n : ℝ)) atTop\n          (𝓝 (∑' k, π k / ν k))) :\n    ∀ᵐ ω ∂μ,\n      Tendsto (fun t : ℝ => (N t ω : ℝ) / t) atTop (𝓝 (1 / (∑' k, π k / ν k))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 115,
    "problem_name": "stochastic_processes_countable_stationary_characterization",
    "informal_statement": "Let (X_n) be an irreducible Markov chain on a countable state space with transition matrix [P].\n\nShow that if the equations π_j = Σ_i π_i P_{ij}, π_j ≥ 0, Σ_j π_j = 1 have a solution, then it is unique, satisfies π_i = 1/E_i[T_{ii}] > 0, and the chain is positive-recurrent; conversely, if the chain is positive-recurrent then such a solution exists.",
    "lean_statement": "theorem q115_countable_stationary_characterization {Ω : Type*} [Countable Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j)\n    (μ : Ω → ℝ) (hμ : ∀ i, μ i = ∑' n : ℕ, (n : ℝ) * f n i i) :\n    ((∃ π : Ω → ℝ, (∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧ (∀ j, ∑' i, π i * P i j = π j)) →\n        ((∀ π π' : Ω → ℝ,\n            ((∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧ (∀ j, ∑' i, π i * P i j = π j)) →\n            ((∀ j, 0 ≤ π' j) ∧ (∑' j, π' j = 1) ∧ (∀ j, ∑' i, π' i * P i j = π' j)) →\n            π = π')\n          ∧ (∀ π : Ω → ℝ,\n              ((∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧ (∀ j, ∑' i, π i * P i j = π j)) →\n              ∀ i, 0 < π i ∧ π i = 1 / μ i ∧ Summable (fun n : ℕ => (n : ℝ) * f n i i))))\n      ∧ ((∀ i, (∑' n, f n i i = 1) ∧ Summable (fun n : ℕ => (n : ℝ) * f n i i)) →\n          ∃ π : Ω → ℝ, (∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧ (∀ j, ∑' i, π i * P i j = π j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 116,
    "problem_name": "stochastic_processes_ctmc_holding_time_exponential",
    "informal_statement": "Let (X(t))_{t≥0} be a continuous-time Markov chain on a countable state space with embedded jump chain (X_n) and transition rates ν_i out of each state i. Let the holding time at state i be U = inf{t ≥ 0 : X(t) ≠ X(0)} given X(0) = i.\n\nShow that U is exponential with rate ν_i and is independent of the next state entered.",
    "lean_statement": "theorem q116_ctmc_holding_time (μ : Measure Ω) [IsProbabilityMeasure μ]\n    {S : Type*} [MeasurableSpace S]\n    (ν : ℝ) (hν : 0 < ν)\n    (U : Ω → ℝ) (Jnext : Ω → S)\n    (hUmeas : Measurable U) (hUpos : ∀ ω, 0 ≤ U ω)\n    (hmemo : ∀ s t : ℝ, 0 ≤ s → 0 ≤ t →\n        (μ {ω | s + t < U ω}).toReal\n          = (μ {ω | s < U ω}).toReal * (μ {ω | t < U ω}).toReal)\n    (hrate : Tendsto (fun t : ℝ => (1 - (μ {ω | t < U ω}).toReal) / t) (𝓝[>] (0 : ℝ)) (𝓝 ν))\n    (hjump : ∀ (t : ℝ) (y : S), 0 ≤ t →\n        (μ {ω | t < U ω ∧ Jnext ω = y}).toReal\n          = (μ {ω | t < U ω}).toReal * (μ {ω | Jnext ω = y}).toReal) :\n    ∀ t : ℝ, 0 ≤ t → (μ {ω | t < U ω}).toReal = Real.exp (-ν * t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 117,
    "problem_name": "stochastic_processes_kingman_bound",
    "informal_statement": "Consider a G/G/1 queue with U_i = Y_{i−1} − X_i, where the random walk Σ U_i has negative drift and γ(r*) = ln E[e^{r* U}] = 0 for some r* > 0. Let W_n be the queueing delay of the nth customer.\n\nShow that Pr[W_n ≥ α] ≤ Pr[W ≥ α] ≤ exp(−r* α) for every α > 0.",
    "lean_statement": "theorem q117_kingman_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (U : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (U i))\n    (hindep : iIndepFun U μ) (hident : ∀ i, IdentDistrib (U i) (U 0) μ μ)\n    (hint : ∀ i, Integrable (U i) μ)\n    (rstar : ℝ) (hr : 0 < rstar)\n    (hdrift : ∫ ω, U 0 ω ∂μ < 0)\n    (hmgf : ∫ ω, Real.exp (rstar * U 0 ω) ∂μ = 1)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, U i ω)\n    (W : Ω → ℝ)\n    (hWlim : ∀ ω, Tendsto (fun n => runningMax S n ω) atTop (𝓝 (W ω)))\n    (α : ℝ) (hα : 0 < α) (n : ℕ) :\n    (μ {ω | α ≤ runningMax S n ω}).toReal ≤ (μ {ω | α ≤ W ω}).toReal ∧\n      (μ {ω | α ≤ W ω}).toReal ≤ Real.exp (-rstar * α) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 118,
    "problem_name": "stochastic_processes_chernoff_bound_random_walk",
    "informal_statement": "Let X_1,…,X_n be i.i.d. with moment generating function M(θ)=E[e^{θX}] finite on an interval (θ_1,θ_2) containing 0, let μ=E[X_1], and let S_n = n^{-1} Σ_{i=1}^n X_i.\n\nShow that for a > μ there exists θ > 0 with M(θ)/e^{θa} < 1 and P(S_n > a) ≤ (M(θ)/e^{θa})^n, and that for a < μ there exists θ < 0 with P(S_n < a) ≤ (M(θ)/e^{θa})^n.",
    "lean_statement": "theorem q118_chernoff_bound_random_walk (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (θ₁ θ₂ : ℝ) (hθ₁ : θ₁ < 0) (hθ₂ : 0 < θ₂)\n    (hInt : ∀ θ ∈ Set.Ioo θ₁ θ₂, Integrable (fun ω => Real.exp (θ * X 0 ω)) μ)\n    (m : ℝ) (hm : ∫ ω, X 0 ω ∂μ = m)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = (n : ℝ)⁻¹ * ∑ i ∈ Finset.range n, X i ω)\n    (n : ℕ) (hn : 1 ≤ n) :\n    (∀ a : ℝ, m < a → ∃ θ : ℝ, 0 < θ ∧ θ ∈ Set.Ioo θ₁ θ₂ ∧\n        mgf (X 0) μ θ / Real.exp (θ * a) < 1 ∧\n        (μ {ω | a < S n ω}).toReal ≤ (mgf (X 0) μ θ / Real.exp (θ * a)) ^ n) ∧\n    (∀ a : ℝ, a < m → ∃ θ : ℝ, θ < 0 ∧ θ ∈ Set.Ioo θ₁ θ₂ ∧\n        (μ {ω | S n ω < a}).toReal ≤ (mgf (X 0) μ θ / Real.exp (θ * a)) ^ n) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 119,
    "problem_name": "stochastic_processes_log_likelihood_random_walk",
    "informal_statement": "Consider a binary hypothesis test with i.i.d. observations Y_1, Y_2, … and let Z_n be the log-likelihood ratio after n observations.\n\nShow that under each hypothesis (Z_n) is a random walk whose increments are the per-observation log-likelihood ratios.",
    "lean_statement": "theorem q119_log_likelihood_random_walk (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Y : ℕ → Ω → ℝ) (hindep : iIndepFun Y μ) (hident : ∀ i, IdentDistrib (Y i) (Y 0) μ μ)\n    (llr : ℝ → ℝ) (hllr : Measurable llr)\n    (W : ℕ → Ω → ℝ) (hW : ∀ i ω, W i ω = llr (Y i ω))\n    (Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = ∑ i ∈ Finset.range n, W i ω) :\n    iIndepFun W μ ∧ (∀ i, IdentDistrib (W i) (W 0) μ μ) ∧\n      (∀ n ω, Z (n + 1) ω - Z n ω = W n ω) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 120,
    "problem_name": "stochastic_processes_poisson_equiv_def_increments",
    "informal_statement": "Let (N(t))_{t≥0} be a measurable, nondecreasing, right-continuous counting process starting at zero with stationary and independent increments such that for every t the increment over an interval of length t is Poisson with mean λt.\n\nShow that the strictly positive interarrival times of (N(t)) are i.i.d. exponential of rate λ, so this definition agrees with the renewal definition of a Poisson process.",
    "lean_statement": "theorem q120_poisson_iid_exp_interarrival (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (N : ℝ≥0 → Ω → ℕ) (hNcount : IsCountingProcess μ N)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (hindep : HasIndepIncrements N μ)\n    (S : ℕ → Ω → ℝ) (hSmeas : ∀ i, Measurable (S i))\n    (hSpos : ∀ i, ∀ᵐ ω ∂μ, 0 < S i ω)\n    (hSlink : ∀ (n : ℕ) (τ : ℝ≥0),\n      {ω | n ≤ N τ ω} = {ω | (∑ i ∈ Finset.range n, S i ω) ≤ (τ : ℝ)}) :\n    (∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ) ∧ iIndepFun S μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 121,
    "problem_name": "stochastic_processes_martingale_stopping_time_3",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time which is finite a.s.\n        Let there be an integrable random variable Y such that |Xn| ≤ Y for all n.\n\n        Show that 𝔼[X_T] = 𝔼[X_0].",
    "lean_statement": "theorem q121_optional_stopping_dominated (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) (Y : Ω → ℝ) (hY : Integrable Y μ)\n    (hdom : ∀ n, ∀ᵐ ω ∂μ, |X n ω| ≤ Y ω) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ = ∫ ω, X 0 ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 122,
    "problem_name": "stochastic_processes_countable_recurrence_class",
    "informal_statement": "Let (X_n) be a Markov chain on a countable state space.\n\nShow that recurrence is a class property: within a communicating class, either every state is recurrent or every state is transient.",
    "lean_statement": "theorem q122_recurrence_class_property {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp1 : p 1 = P) (hp0 : ∀ n i j, 0 ≤ p n i j)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (i j : Ω) (hij : ∃ m, 0 < p m i j) (hji : ∃ n, 0 < p n j i) :\n    (¬ Summable (fun n => p n i i)) ↔ (¬ Summable (fun n => p n j j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 123,
    "problem_name": "stochastic_processes_stopped_supermartingale",
    "informal_statement": "Let (X_n) be a supermartingale and let τ be a stopping time.\n\nShow that the stopped process X_{n∧τ} is a supermartingale.",
    "lean_statement": "theorem q123_stopped_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)\n    (hX : Supermartingale X ℱ μ) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :\n    Supermartingale (stoppedProcess X (natStop T)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 124,
    "problem_name": "stochastic_processes_markov_chain_2",
    "informal_statement": "A company issues N different types of coupons. Each coupon is equally likely to be each of the N types.\n        A collector desires a complete set. Let τ be the first time that the collector obtains all N types.\n\n        Show that for any c > 0, P[τ > N log N + cN] ≤ e^{-c}.",
    "lean_statement": "theorem q124_coupon_collector_tail {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω)\n    [IsProbabilityMeasure μ] (N : ℕ) (hN : 0 < N) (c : ℝ) (hc : 0 < c)\n    (X : ℕ → Ω → ℕ)\n    (hXrange : ∀ k ω, X k ω < N)\n    (hXunif : ∀ (k : ℕ) (j : ℕ), j < N → (μ {ω | X k ω = j}).toReal = 1 / (N : ℝ))\n    (hXindep : iIndepFun X μ)\n    (τ : Ω → ℕ)\n    (hτ : ∀ ω, τ ω = sInf {m : ℕ | ∀ j, j < N → ∃ k, k < m ∧ X k ω = j}) :\n    (μ {ω | ⌈(N : ℝ) * Real.log N + c * N⌉₊ < τ ω}).toReal ≤ Real.exp (-c) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 125,
    "problem_name": "stochastic_processes_recurrence_iff_sum_diverges",
    "informal_statement": "Let (X_n) be a Markov chain on a countable state space and let j be a state.\n\nShow that j is recurrent if and only if Σ_{n≥1} P_{jj}^n = ∞.",
    "lean_statement": "theorem q125_recurrence_iff_sum_diverges {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (j : Ω) :\n    (∑' n, f n j j = 1) ↔ ¬ Summable (fun n => p n j j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 126,
    "problem_name": "stochastic_processes_target_time",
    "informal_statement": "Suppose that (X_n)_{n ≥ 0} is an irreducible Markov chain with transition\n        matrix P and stationary measure π.\n        Let τ_x be the hitting time: τ_x = min{n ≥ 0 : X_n = x}.\n\n        Show that the quantity sum_x (𝔼_a [τ_x]π(x)) does not depend on a.",
    "lean_statement": "theorem q126_target_time {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∀ a b : Ω, ∑ x, g a x * π x = ∑ x, g b x * π x := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 127,
    "problem_name": "stochastic_processes_scaled_branching_convergence",
    "informal_statement": "Consider a branching process (X_n) with i.i.d. offspring counts of mean Ȳ, and let Z_n = X_n/Ȳ^n be the scaled process.\n\nShow that Z_n is a nonnegative martingale and therefore converges with probability 1 to a finite limiting random variable.",
    "lean_statement": "theorem q127_scaled_branching_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)\n    (hnn : ∀ n ω, 0 ≤ X n ω)\n    (Ybar : ℝ) (hY : 0 < Ybar)\n    (hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :\n    Martingale (fun n ω => X n ω / Ybar ^ n) ℱ μ ∧\n      ∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => X n ω / Ybar ^ n) atTop (𝓝 (Zinf ω)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 128,
    "problem_name": "stochastic_processes_drifted_brownian_martingale",
    "informal_statement": "Let B_μ(t) = μt + σB(t) be a Brownian motion with drift.\n\nShow that B_μ(t) − μt is a martingale, and that (B_μ(t) − μt)^2 − σ^2 t is a martingale.",
    "lean_statement": "theorem q128_drifted_brownian_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (c σ : ℝ)\n    (hadap : Adapted ℱ B)\n    (hint : ∀ t, Integrable (B t) μ)\n    (hint2 : ∀ t, Integrable (fun ω => (B t ω) ^ 2) μ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hpast : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      Indep (MeasurableSpace.comap (fun ω => B t ω - B s ω) inferInstance) (ℱ s) μ) :\n    (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n        μ[(fun ω => (c * t + σ * B t ω) - c * t) | (ℱ s)]\n          =ᵐ[μ] (fun ω => (c * s + σ * B s ω) - c * s)) ∧\n    (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n        μ[(fun ω => ((c * t + σ * B t ω) - c * t) ^ 2 - σ ^ 2 * t) | (ℱ s)]\n          =ᵐ[μ] (fun ω => ((c * s + σ * B s ω) - c * s) ^ 2 - σ ^ 2 * s)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 129,
    "problem_name": "stochastic_processes_random_walk_recurrent_1",
    "informal_statement": "Show that simple random walk on ℤ^2 is recurrent.",
    "lean_statement": "theorem q129_z2_recurrent :\n    ¬ Summable (fun n : ℕ => ((Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) ^ 2) := by sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 130,
    "problem_name": "stochastic_processes_renewal_reward_signed",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ and a renewal-reward function R(t) whose per-interval reward R_n may take negative values, with E[R_n] existing (finite).\n\nShow that the time-average reward still converges, lim_{t→∞} (1/t) ∫_0^t R(τ) dτ = E[R_n]/X̄ with probability 1, extending the renewal-reward theorem to signed rewards.",
    "lean_statement": "theorem q130_renewal_reward_signed (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (R : ℕ → Ω → ℝ) (hRint : Integrable (R 0) μ)\n    (hRindep : iIndepFun R μ) (hRident : ∀ i, IdentDistrib (R i) (R 0) μ μ)\n    (rbar : ℝ) (hRmean : ∫ ω, R 0 ω ∂μ = rbar)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (C : ℝ → Ω → ℝ) (hC : ∀ t ω, C t ω = ∑ n ∈ Finset.range (N t ω), R n ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t => C t ω / t) atTop (𝓝 (rbar / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 131,
    "problem_name": "stochastic_processes_markov_modulated_threshold_bound",
    "informal_statement": "Let a Markov-modulated random walk have negative drift and let r* > 0 satisfy ρ(r*) = 1, where ρ(r) is the largest eigenvalue of [A(r)], with positive right eigenvector ν(r*).\n\nShow that the probability the walk ever crosses a threshold α > 0 is bounded by a constant times exp(−r* α).",
    "lean_statement": "theorem q131_markov_modulated_threshold_bound {σ : Type*} [Fintype σ]\n    (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Y : ℕ → Ω → σ) (S : ℕ → Ω → ℝ) (rstar : ℝ) (hr : 0 < rstar)\n    (ν : σ → ℝ) (νmin : ℝ) (hνmin : 0 < νmin) (hν : ∀ s, νmin ≤ ν s)\n    (Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp (rstar * S n ω) * ν (Y n ω))\n    (hZmart : Martingale Z ℱ μ) (hZnn : ∀ n ω, 0 ≤ Z n ω) :\n    ∃ C : ℝ, 0 < C ∧\n      ∀ α : ℝ, 0 < α → (μ {ω | ∃ n, α ≤ S n ω}).toReal ≤ C * Real.exp (-rstar * α) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 132,
    "problem_name": "stochastic_processes_mm1_expected_queue_delay",
    "informal_statement": "Consider an M/M/1 queue in steady state with arrival rate λ, service rate μ, and ρ = λ/μ < 1.\n\nShow that the expected waiting time in queue (excluding service) is ρ/(μ − λ).",
    "lean_statement": "theorem q132_mm1_expected_queue_delay\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu) (hstab : lam < mu)\n    (ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)\n    (p : ℕ → ℝ) (hp : ∀ i, p i = (1 - ρ) * ρ ^ i)\n    (Wq Lq : ℝ) (hLq : Lq = ∑' k : ℕ, (k : ℝ) * p (k + 1))\n    (hLittle : Lq = lam * Wq) :\n    Wq = ρ / (mu - lam) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 133,
    "problem_name": "stochastic_processes_ito_integral_of_brownian_motion",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that ∫_0^T B_t dB_t = ½ B(T)^2 − ½ T.",
    "lean_statement": "theorem q133_ito_integral_of_brownian_motion\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (hB : IsBrownianWith μ ℱ B) :\n    ∃ I : ℝ → Ω → ℝ, IsItoIntegral μ ℱ B B I ∧\n      Martingale I ℱ μ ∧\n      (∀ᵐ ω ∂μ, Continuous (fun t => I t ω)) ∧\n      (∀ t, 0 ≤ t → I t =ᵐ[μ] fun ω => ((B t ω) ^ 2 - t) / 2) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 134,
    "problem_name": "stochastic_processes_simple_approximation_general",
    "informal_statement": "Let X be progressively measurable and square integrable on [0,T]×Ω with respect to dt×P.\n\nShow that X can be approximated in this L² space by elementary predictable processes with square-integrable coefficients.",
    "lean_statement": "theorem q134_simple_approximation_general\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (T : ℝ) (hT : 0 ≤ T)\n    (X : ℝ → Ω → ℝ) (hX : IsStronglyProgressive ℱ X)\n    (hL2 : SpaceTimeL2 μ X T) :\n    ∃ a : ℕ → ItoStep μ ℱ T,\n      (∀ n, SpaceTimeL2 μ (a n).value T) ∧\n      (∀ n, SpaceTimeL2 μ (fun t ω => (a n).value t ω - X t ω) T) ∧\n      Tendsto (fun n => ∫ z : ℝ × Ω, ((a n).value z.1 z.2 - X z.1 z.2) ^ 2\n        ∂((volume.restrict (Set.Ioc 0 T)).prod μ)) atTop (𝓝 0) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 135,
    "problem_name": "stochastic_processes_sprt_error_bounds",
    "informal_statement": "Consider a sequential probability ratio test in which i.i.d. observations produce a log-likelihood-ratio random walk stopped when it crosses an upper threshold α > 0 or a lower threshold β < 0.\n\nShow that the error probabilities satisfy Pr[decide 0 | H = 1] ≤ e^{−α} and Pr[decide 1 | H = 0] ≤ e^{β}.",
    "lean_statement": "theorem q135_sprt_error_bounds\n    (μ₀ μ₁ : Measure Ω) [IsProbabilityMeasure μ₀] [IsProbabilityMeasure μ₁]\n    (L : ℕ → Ω → ℝ) (J : Ω → ℕ) (S : Ω → ℝ) (hSdef : ∀ ω, S ω = L (J ω) ω)\n    (α β : ℝ) (hα : 0 < α) (hβ : β < 0)\n    -- likelihood-ratio change of measure at the stopping trial (Wald's LR / martingale identity):\n    (hLR1 : (μ₁ {ω | α ≤ S ω}).toReal\n              = ∫ ω in {ω | α ≤ S ω}, Real.exp (-(S ω)) ∂μ₀)\n    (hLR0 : (μ₀ {ω | S ω ≤ β}).toReal\n              = ∫ ω in {ω | S ω ≤ β}, Real.exp (S ω) ∂μ₁) :\n    (μ₁ {ω | α ≤ S ω}).toReal ≤ Real.exp (-α) ∧\n      (μ₀ {ω | S ω ≤ β}).toReal ≤ Real.exp β := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 136,
    "problem_name": "stochastic_processes_three_state_cycle_nonreversible",
    "informal_statement": "Let (X_n) be an irreducible positive-recurrent Markov chain with stationary distribution π containing three states i, j, k.\n\nShow that the chain is reversible only if P_{ij} P_{jk} P_{ki} = P_{ik} P_{kj} P_{ji}; if this product condition fails on any cycle, the chain is not reversible.",
    "lean_statement": "theorem q136_three_state_cycle\n    {S : Type*}\n    (P : S → S → ℝ) (π : S → ℝ) (hπpos : ∀ s, 0 < π s)\n    (hDB : ∀ a b, π a * P a b = π b * P b a)\n    (i j k : S) :\n    P i j * P j k * P k i = P i k * P k j * P j i := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 137,
    "problem_name": "stochastic_processes_recurrence",
    "informal_statement": "Suppose that P is irreducible.\n        \n        Show that the following two conditions are equivalent:\n        (i) ℙ_x  [τ_x^+ < ∞] = 1 for some x ∈ Ω.\n        (ii) ℙ_x  [τ_y^+ < ∞] = 1 for all x,y ∈ Ω.",
    "lean_statement": "theorem q137_recurrence {Ω : Type*} [Countable Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Ω → Ω → ℝ) (hPnn : ∀ x y, 0 ≤ P x y) (hPstoch : ∀ x, HasSum (P x) 1)\n    (hirr : ∀ x y, ∃ n : ℕ, 0 < nstep P n x y)\n    (ρ : Ω → Ω → ℝ) (hρnn : ∀ x y, 0 ≤ ρ x y)\n    (hρ : ∀ x y, ρ x y = ∑' z, P x z * (if z = y then 1 else ρ z y))\n    (hρmin : ∀ σ : Ω → Ω → ℝ, (∀ x y, 0 ≤ σ x y) →\n        (∀ x y, σ x y = ∑' z, P x z * (if z = y then 1 else σ z y)) →\n        ∀ x y, ρ x y ≤ σ x y) :\n    (∃ x, ρ x x = 1) ↔ (∀ x y, ρ x y = 1) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 138,
    "problem_name": "stochastic_processes_birth_death_positive_recurrent_condition",
    "informal_statement": "Consider an irreducible birth-death chain on {0,1,2,…} with ρ_i = p_i/q_{i+1}.\n\nShow that the chain is positive-recurrent if and only if Σ_{i≥1} ∏_{j<i} ρ_j < ∞.",
    "lean_statement": "theorem q138_birth_death_positive_recurrent\n    (p q : ℕ → ℝ) (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q (i + 1))\n    (ρ : ℕ → ℝ) (hρ : ∀ j, ρ j = p j / q (j + 1)) :\n    (∃ π : ℕ → ℝ, (∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧\n        (∀ i, π i * p i = π (i + 1) * q (i + 1)))\n      ↔ Summable (fun i => ∏ j ∈ Finset.range i, ρ j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 139,
    "problem_name": "stochastic_processes_renewal_strong_law",
    "informal_statement": "Let (N(t))_{t≥0} be a renewal counting process whose i.i.d. interrenewal times have finite mean X̄.\n\nShow that lim_{t→∞} N(t)/t = 1/X̄ with probability 1.",
    "lean_statement": "theorem q139_renewal_slln (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (Xbar : ℝ) (hXbar : 0 < Xbar)\n    (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar)\n    (hindep : Pairwise (fun i j => IndepFun (X i) (X j) μ))\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t →\n        {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t}) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (N t ω : ℝ) / t) atTop (𝓝 (1 / Xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 140,
    "problem_name": "stochastic_processes_birth_death_null_recurrent_boundary",
    "informal_statement": "Consider an irreducible birth-death chain on the nonnegative integers with ρ_i = p_i/q_{i+1} and ∏_{j<i} ρ_j = 1 for all i.\n\nShow that the chain is recurrent but not positive-recurrent.",
    "lean_statement": "theorem q140_birth_death_null_recurrent_boundary\n    (p q : ℕ → ℝ)\n    (hp : ∀ i, 0 < p i) (hq0 : q 0 = 0) (hqpos : ∀ i, 0 < q (i + 1))\n    (hbound : ∀ i, p i + q i ≤ 1)\n    (ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = p i / q (i + 1))\n    (hprod : ∀ i, ∏ j ∈ Finset.range i, ρ j = 1) :\n    (¬ Summable (fun n : ℕ => 1 / (p n * ∏ j ∈ Finset.range n, ρ j)))\n      ∧ (¬ Summable (fun n : ℕ => ∏ j ∈ Finset.range n, ρ j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 141,
    "problem_name": "stochastic_processes_submartingale_1",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a martingale, and let ϕ be a convex function.\n\n        Show that (ϕ(X_n))_{n ≥ 0} is a submartingale.",
    "lean_statement": "theorem q141_convex_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (φ : ℝ → ℝ) (hconv : ConvexOn ℝ Set.univ φ)\n    (hint : ∀ n, Integrable (fun ω => φ (X n ω)) μ) :\n    Submartingale (fun n ω => φ (X n ω)) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 142,
    "problem_name": "stochastic_processes_delayed_elementary_renewal",
    "informal_statement": "Let (N(t))_{t>0} be a delayed renewal counting process whose interrenewal intervals X_2, X_3, … have finite mean X̄, and whose first renewal epoch X_1 has an arbitrary distribution G.\n\nShow that lim_{t→∞} E[N(t)]/t = 1/X̄, independent of the distribution G.",
    "lean_statement": "theorem q142_delayed_elementary_renewal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint : Integrable (X 1) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    Tendsto (fun t => m t / t) atTop (𝓝 (1 / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 143,
    "problem_name": "stochastic_processes_convergence_theorem_2",
    "informal_statement": "Suppose that (X_n)_n is a Markov chain with transition matrix P.\n        Assume that P is irreducible and aperiodic.\n\n        Show that there exists r such that P^r (x, y) > 0 for all x,y ∈ Ω.",
    "lean_statement": "theorem q143_convergence_primitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P) :\n    IsPrimitive P := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 144,
    "problem_name": "stochastic_processes_positive_matrix_contraction",
    "informal_statement": "Let [P] be a transition matrix with all entries positive, and set α = min_{i,j} P_{ij} > 0.\n\nShow that for each j, max_i P_{ij}^n − min_i P_{ij}^n ≤ (1 − 2α)^n, which tends to 0 as n → ∞.",
    "lean_statement": "theorem q144_positive_matrix_contraction {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nontrivial Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hpos : ∀ i j, 0 < P i j)\n    (α : ℝ) (hα : 0 < α) (hαle : ∀ i j, α ≤ P i j) (hαmin : ∃ i j, P i j = α) :\n    (∀ (n : ℕ) (j : Ω), (⨆ i, (P ^ n) i j) - (⨅ i, (P ^ n) i j) ≤ (1 - 2 * α) ^ n)\n      ∧ (∀ j : Ω, Tendsto (fun n => (⨆ i, (P ^ n) i j) - (⨅ i, (P ^ n) i j)) atTop (𝓝 0)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 145,
    "problem_name": "stochastic_processes_two_threshold_possible_values",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps in {−1,0,1} and mean 0, stopped at the first trial J with S_n ≥ a or S_n ≤ b for integer thresholds a > 0 > b.\n\nShow that S_J ∈ {a, b}, i.e. the stopped walk lands exactly on a threshold with no overshoot.",
    "lean_statement": "theorem q145_two_threshold_possible_values (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hstepval : ∀ i ω, X i ω = -1 ∨ X i ω = 0 ∨ X i ω = 1)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (a b : ℤ) (ha : 0 < a) (hb : b < 0)\n    (J : Ω → ℕ) (hJpos : ∀ ω, 0 < J ω)\n    (hJcross : ∀ ω, (a : ℝ) ≤ S (J ω) ω ∨ S (J ω) ω ≤ (b : ℝ))\n    (hJfirst : ∀ ω n, n < J ω → (b : ℝ) < S n ω ∧ S n ω < (a : ℝ)) :\n    ∀ ω, S (J ω) ω = (a : ℝ) ∨ S (J ω) ω = (b : ℝ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 146,
    "problem_name": "stochastic_processes_gartner_ellis",
    "informal_statement": "Let (Y_n) be random vectors in ℝ^d with finite exponential moments E[e^{n⟨θ,Y_n⟩}] for every n≥1 and θ, such that φ_n(θ) = (1/n) log E[e^{n⟨θ,Y_n⟩}] converges to a limit φ(θ) for every θ, with φ finite and differentiable everywhere. Let I(x)=sup_θ(⟨θ,x⟩ − φ(θ)).\n\nShow that limsup_n (1/n) log P(Y_n ∈ F) ≤ − inf_{x∈F} I(x) for every closed F, and liminf_n (1/n) log P(Y_n ∈ U) ≥ − inf_{x∈U} I(x) for every open U.",
    "lean_statement": "theorem q146_gartner_ellis {d : ℕ} (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Y : ℕ → Ω → EuclideanSpace ℝ (Fin d)) (hmeas : ∀ n, Measurable (Y n))\n    (hexp : ∀ n : ℕ, 1 ≤ n → ∀ θ : EuclideanSpace ℝ (Fin d),\n      Integrable (fun ω => Real.exp ((n : ℝ) * ⟪θ, Y n ω⟫)) μ)\n    (φ : EuclideanSpace ℝ (Fin d) → ℝ) (hφdiff : Differentiable ℝ φ)\n    (hφlim : ∀ θ : EuclideanSpace ℝ (Fin d),\n      Filter.Tendsto (fun n : ℕ => (n : ℝ)⁻¹ *\n        Real.log (∫ ω, Real.exp ((n : ℝ) * ⟪θ, Y n ω⟫) ∂μ)) atTop (nhds (φ θ)))\n    (I : EuclideanSpace ℝ (Fin d) → EReal)\n    (hI : ∀ x, I x = ⨆ θ : EuclideanSpace ℝ (Fin d), ((⟪θ, x⟫ - φ θ : ℝ) : EReal)) :\n    (∀ F : Set (EuclideanSpace ℝ (Fin d)), IsClosed F →\n      Filter.limsup (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) *\n        ENNReal.log (μ {ω | Y n ω ∈ F})) atTop ≤ -(⨅ x ∈ F, I x)) ∧\n    (∀ U : Set (EuclideanSpace ℝ (Fin d)), IsOpen U →\n      -(⨅ x ∈ U, I x) ≤ Filter.liminf (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) *\n        ENNReal.log (μ {ω | Y n ω ∈ U})) atTop) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 147,
    "problem_name": "stochastic_processes_continuity_wp1",
    "informal_statement": "Let (Z_n) be random variables with Z_n → α with probability 1, and let f be continuous at α.\n\nShow that f(Z_n) → f(α) with probability 1.",
    "lean_statement": "theorem q147_continuity_wp1 (μ : Measure Ω)\n    (Z : ℕ → Ω → ℝ) (α : ℝ) (f : ℝ → ℝ) (hf : ContinuousAt f α)\n    (hZ : ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 α)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n => f (Z n ω)) atTop (𝓝 (f α)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 148,
    "problem_name": "stochastic_processes_poisson_conditional_gap_mean",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ; condition on N(t) = n.\n\nShow that E[X_i | N(t) = n] = t/(n+1) for each interarrival gap X_i within (0,t].",
    "lean_statement": "theorem q148_poisson_conditional_gap_mean (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam) (t : ℝ) (ht : 0 < t) (n : ℕ) (hn : 0 < n)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure lam) μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (m : ℕ) (τ : ℝ), 0 ≤ τ →\n      {ω | m ≤ N τ ω} = {ω | (∑ i ∈ Finset.range m, S i ω) ≤ τ}) :\n    ∀ i : ℕ, i < n → ∫ ω, S i ω ∂(μ[|{ω | N t ω = n}]) = t / (n + 1 : ℝ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 149,
    "problem_name": "stochastic_processes_poisson_erlang_density",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0 and let S_n be the epoch of the nth arrival.\n\nShow that S_n has the Erlang density f_{S_n}(t) = λ^n t^{n−1} e^{−λt} / (n−1)!, for t ≥ 0.",
    "lean_statement": "theorem q149_poisson_erlang_density (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ) :\n    ∀ n : ℕ, 1 ≤ n →\n      HasLaw (fun ω => ∑ i ∈ Finset.range n, S i ω) (gammaMeasure (n : ℝ) (lam : ℝ)) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Poisson processes"
  },
  {
    "question_id": 150,
    "problem_name": "stochastic_processes_unichain_eigenvalue_one",
    "informal_statement": "Let [P] be the transition matrix of a finite-state unichain.\n\nShow that λ = 1 is a simple eigenvalue of [P], with left eigenvector π and right eigenvector e, and that every other eigenvalue λ_i satisfies |λ_i| ≤ 1.",
    "lean_statement": "theorem q150_unichain_eigenvalue_one {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (huni : ∃! π : Ω → ℝ, IsStationary P π) :\n    (P.mulVec (fun _ => (1 : ℝ)) = fun _ => (1 : ℝ)) ∧\n    (∃ π : Ω → ℝ, IsStationary P π) ∧\n    (((P.charpoly.map (algebraMap ℝ ℂ)).roots).count 1 = 1) ∧\n    (∀ z : ℂ, z ∈ (P.charpoly.map (algebraMap ℝ ℂ)).roots → ‖z‖ ≤ 1) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 151,
    "problem_name": "stochastic_processes_poisson_process_1",
    "informal_statement": "Show that the interevent sequence (S_n)_{n ≥ 1} of a Poisson process with\n        intensity λ is i.i.d. with exponential distribution of parameter λ.",
    "lean_statement": "theorem q151_poisson_interevent (μ : Measure Ω) [IsProbabilityMeasure μ] (lam : ℝ) (hlam : 0 < lam)\n    (N : ℝ → Ω → ℕ) (hN0 : ∀ ω, N 0 ω = 0)\n    (hmono : ∀ ω (s t : ℝ), s ≤ t → N s ω ≤ N t ω)\n    (hrc : ∀ ω (t : ℝ), ∃ ε : ℝ, 0 < ε ∧ ∀ s : ℝ, t ≤ s → s < t + ε → N s ω = N t ω)\n    (hpois : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => N t ω - N s ω) (poissonMeasure (Real.toNNReal (lam * (t - s)))) μ)\n    (hindep : ∀ (m : ℕ) (u : Fin (m + 1) → ℝ), Monotone u → 0 ≤ u 0 →\n      iIndepFun (fun (j : Fin m) (ω : Ω) => N (u j.succ) ω - N (u j.castSucc) ω) μ)\n    (T : ℕ → Ω → ℝ)\n    (hT : ∀ n ω, T n ω = sInf {t : ℝ | 0 ≤ t ∧ (n + 1 : ℕ) ≤ N t ω})\n    (S : ℕ → Ω → ℝ)\n    (hS : ∀ n ω, S n ω = T n ω - (if n = 0 then (0:ℝ) else T (n - 1) ω)) :\n    ∀ k : ℕ, HasLaw (fun ω => (fun i : Fin k => S i ω))\n      (MeasureTheory.Measure.pi (fun _ : Fin k => expMeasure lam)) μ := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 152,
    "problem_name": "stochastic_processes_exponential_martingale_drifted_brownian",
    "informal_statement": "Let B_μ(t) = μt + σB(t) and let q(β) = μβ + ½σ^2β^2.\n\nShow that V(t) = e^{βB_μ(t) − q(β)t} is a martingale.\n\nUse the natural filtration on nonnegative time; the formal real-time representation extends B by zero before time zero.",
    "lean_statement": "theorem q152_exponential_martingale_drifted_brownian (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hmeas : ∀ t, StronglyMeasurable (B t))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hBneg : ∀ t : ℝ, t ≤ 0 → B t =ᵐ[μ] fun _ => 0)\n    (m σ β : ℝ) :\n    ∃ M : ℝ → Ω → ℝ,\n      (∀ t ω, M t ω =\n        Real.exp (β * (m * t + σ * B t ω) - (m * β + σ ^ 2 * β ^ 2 / 2) * t)) ∧\n      (∀ t : ℝ, Integrable (M t) μ) ∧\n      Adapted (Filtration.natural B hmeas) M ∧\n      ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n        μ[M t | (Filtration.natural B hmeas) s] =ᵐ[μ] M s := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 153,
    "problem_name": "stochastic_processes_poisson_conditional_interarrival_density",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ; condition on N(t) = n and let the interarrival gaps within (0,t] be (x_1,…,x_n).\n\nShow that their conditional joint density is n!/t^n on the region {x_i > 0, Σ_i x_i < t}.",
    "lean_statement": "theorem q153_poisson_conditional_gap_density (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam) (t : ℝ) (ht : 0 < t) (n : ℕ) (hn : 0 < n)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure lam) μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (m : ℕ) (τ : ℝ), 0 ≤ τ →\n      {ω | m ≤ N τ ω} = {ω | (∑ i ∈ Finset.range m, S i ω) ≤ τ})\n    (W : Ω → (Fin n → ℝ)) (hW : ∀ (i : Fin n) ω, W ω i = S (i : ℕ) ω) :\n    (μ[|{ω | N t ω = n}]).map W\n      = volume.withDensity (fun x : Fin n → ℝ =>\n          ENNReal.ofReal\n            (if (∀ i, 0 < x i) ∧ (∑ i, x i) < t then (n.factorial : ℝ) / t ^ n else 0)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 154,
    "problem_name": "stochastic_processes_column_range_monotone",
    "informal_statement": "Let [P] be the transition matrix of a finite-state Markov chain. For fixed j and n, let U_n = max_i P_{ij}^n and L_n = min_i P_{ij}^n.\n\nShow that U_{n+1} ≤ U_n and L_{n+1} ≥ L_n, so the range of the jth column of [P]^n is nonincreasing in n.",
    "lean_statement": "theorem q154_column_range_monotone {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :\n    ∀ (j : Ω) (n : ℕ),\n      (⨆ i, (P ^ (n + 1)) i j) ≤ (⨆ i, (P ^ n) i j) ∧\n      (⨅ i, (P ^ n) i j) ≤ (⨅ i, (P ^ (n + 1)) i j) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 155,
    "problem_name": "stochastic_processes_delayed_renewal_equation",
    "informal_statement": "Let (N(t)) be a delayed renewal process whose first renewal epoch has distribution G and whose subsequent interrenewal intervals have distribution F, and let m(t) = E[N(t)].\n\nShow that m satisfies the delayed renewal equation m(t) = G(t) + ∫_0^t m(t−x) dF(x) for t ≥ 0.",
    "lean_statement": "theorem q155_delayed_renewal_equation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (G : StieltjesFunction ℝ) (hG : ∀ x, G x = (μ {ω | X 0 ω ≤ x}).toReal)\n    (F : StieltjesFunction ℝ) (hF : ∀ x, F x = (μ {ω | X 1 ω ≤ x}).toReal)\n    (m : StieltjesFunction ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    ∀ t : ℝ, 0 ≤ t → m t = G t + ∫ x in Set.Ioc (0 : ℝ) t, m (t - x) ∂F.measure := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 156,
    "problem_name": "stochastic_processes_geometric_brownian_mean",
    "informal_statement": "Let S(t) = S0 · exp(m t + σ B(t)) be a geometric Brownian motion, where B is standard Brownian motion (B(t) ~ Normal(0, t)). Show that its mean is E[S(t)] = S0 · exp((m + σ²/2) t).",
    "lean_statement": "theorem q156_geometric_brownian_mean (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (S0 mdrift σ : ℝ)\n    (hlaw : ∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ)\n    (S : ℝ → Ω → ℝ) (hS : ∀ t ω, S t ω = S0 * Real.exp (mdrift * t + σ * B t ω))\n    (hint : ∀ t, Integrable (S t) μ) :\n    ∀ t : ℝ, 0 ≤ t → ∫ ω, S t ω ∂μ = S0 * Real.exp ((mdrift + σ ^ 2 / 2) * t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 157,
    "problem_name": "stochastic_processes_exponential_memoryless",
    "informal_statement": "Let X have an exponential distribution with rate r > 0. Show the memoryless property: for all s, t ≥ 0, P(X > s + t) = P(X > s) · P(X > t).",
    "lean_statement": "theorem q157_exponential_memoryless (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (r : ℝ) (hr : 0 < r) (hlaw : HasLaw X (expMeasure r) μ) :\n    ∀ s t : ℝ, 0 ≤ s → 0 ≤ t →\n      (μ {ω | s + t < X ω}).toReal\n        = (μ {ω | s < X ω}).toReal * (μ {ω | t < X ω}).toReal := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 158,
    "problem_name": "stochastic_processes_stationary_uniqueness_1",
    "informal_statement": "Suppose that P is irreducible.\n\n        Show that there exists a unique stationary distribution.",
    "lean_statement": "theorem q158_stationary_uniqueness {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :\n    ∃! π : Ω → ℝ, IsStationary P π := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 159,
    "problem_name": "stochastic_processes_delayed_strong_law",
    "informal_statement": "Let (N(t))_{t>0} be a delayed renewal counting process whose interrenewal intervals X_2, X_3, … have distribution F with finite mean X̄ = ∫_0^∞ [1 − F(x)] dx, and whose first renewal epoch X_1 is an arbitrary nonnegative random variable.\n\nShow that lim_{t→∞} N(t)/t = 1/X̄ with probability 1.",
    "lean_statement": "theorem q159_delayed_strong_law_count (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint : Integrable (X 1) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t})\n    (hSLLN : ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => S n ω / n) atTop (𝓝 xbar)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t => (N t ω : ℝ) / t) atTop (𝓝 (1 / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 160,
    "problem_name": "stochastic_processes_mg1_loss_renewal",
    "informal_statement": "Consider an M/G/1 loss system in which an arriving customer is served if the server is free and otherwise lost; let X_i = Y_i + U_i be the time between successive service starts, with Y_i the service time and U_i the subsequent idle period.\n\nShow that the instants at which service starts form a renewal process.",
    "lean_statement": "theorem q160_mg1_loss_renewal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Y U : ℕ → Ω → ℝ) (hYpos : ∀ i ω, 0 < Y i ω) (hUpos : ∀ i ω, 0 < U i ω)\n    (hindep : iIndepFun (Sum.elim Y U) μ) (hYident : ∀ i, IdentDistrib (Y i) (Y 0) μ μ)\n    (hUident : ∀ i, IdentDistrib (U i) (U 0) μ μ)\n    (X : ℕ → Ω → ℝ) (hX : ∀ i ω, X i ω = Y i ω + U i ω)\n    (T : ℕ → Ω → ℝ) (hT : ∀ n ω, T n ω = ∑ i ∈ Finset.range n, X i ω) :\n    iIndepFun X μ ∧ ∀ i, IdentDistrib (X i) (X 0) μ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 161,
    "problem_name": "stochastic_processes_donsker_maximum_functional",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with mean 0 and variance σ^2 < ∞ and let S_k be the partial sums.\n\nShow that max_{1≤k≤n} S_k/(σ√n) converges in distribution to sup_{0≤t≤1} B(t), and hence that lim_n P(max_{1≤k≤n} S_k/(σ√n) ≥ y) = 2(1 − Φ(y)) for y ≥ 0.",
    "lean_statement": "theorem q161_donsker_maximum_functional (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hmean : ∫ ω, X 0 ω ∂μ = 0) (hL2 : MemLp (X 0) 2 μ)\n    (σ : ℝ) (hσ : 0 < σ) (hvar : ∫ ω, (X 0 ω) ^ 2 ∂μ = σ ^ 2)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (y : ℝ) (hy : 0 ≤ y) :\n    Tendsto\n      (fun n : ℕ =>\n        (μ {ω | y ≤ (⨆ k : Fin n, S ((k : ℕ) + 1) ω) / (σ * Real.sqrt n)}).toReal)\n      atTop (𝓝 (2 * (1 - (gaussianReal 0 1 (Set.Iic y)).toReal))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 162,
    "problem_name": "stochastic_processes_stationary_distribution",
    "informal_statement": "Show that an irreducible Markov chain is positive recurrent if and only if\n        there exists a probability measure π on Ω such that π = πP.",
    "lean_statement": "theorem q162_stationary_distribution {Ω : Type*} [Countable Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Ω → Ω → ℝ) (hPnn : ∀ x y, 0 ≤ P x y) (hPstoch : ∀ x, HasSum (P x) 1)\n    (hirr : ∀ x y, ∃ n : ℕ, 0 < nstep P n x y)\n    (m : Ω → Ω → ℝ≥0∞)\n    (hm : ∀ x y, m x y = if x = y then 0 else 1 + ∑' z, ENNReal.ofReal (P x z) * m z y)\n    (hmmin : ∀ M : Ω → Ω → ℝ≥0∞,\n        (∀ x y, M x y = if x = y then 0 else 1 + ∑' z, ENNReal.ofReal (P x z) * M z y) →\n        ∀ x y, m x y ≤ M x y) :\n    (∀ x, (1 + ∑' z, ENNReal.ofReal (P x z) * m z x) < ⊤) ↔\n      (∃ π : Ω → ℝ, (∀ x, 0 ≤ π x) ∧ HasSum π 1 ∧ ∀ y, HasSum (fun x => π x * P x y) (π y)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 163,
    "problem_name": "stochastic_processes_mg1_residual_service",
    "informal_statement": "Consider an M/G/1 queue with Poisson arrivals of rate λ and i.i.d. service times V; let R(t) be the remaining service requirement of the customer in service at time t (zero if idle).\n\nShow that the time-average of R(t) equals λ E[V^2]/2 with probability 1.",
    "lean_statement": "theorem q163_mg1_residual_service (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (V : ℕ → Ω → ℝ) (hVpos : ∀ i ω, 0 < V i ω)\n    (hVint : Integrable (V 0) μ) (hVsq : Integrable (fun ω => (V 0 ω) ^ 2) μ)\n    (hVindep : iIndepFun V μ) (hVident : ∀ i, IdentDistrib (V i) (V 0) μ μ)\n    (lam : ℝ) (hlam : 0 < lam) (v2 : ℝ) (hv2 : ∫ ω, (V 0 ω) ^ 2 ∂μ = v2)\n    (M : ℝ → Ω → ℕ)\n    (hthru : ∀ᵐ ω ∂μ, Tendsto (fun t => (M t ω : ℝ) / t) atTop (𝓝 lam))\n    (R : ℝ → Ω → ℝ) (hRpos : ∀ t ω, 0 ≤ R t ω)\n    (hsand : ∀ᵐ ω ∂μ, ∀ t : ℝ,\n      (∑ n ∈ Finset.range (M t ω), (V n ω) ^ 2 / 2) ≤ ∫ τ in Set.Ioc (0 : ℝ) t, R τ ω\n        ∧ (∫ τ in Set.Ioc (0 : ℝ) t, R τ ω) ≤ ∑ n ∈ Finset.range (M t ω + 1), (V n ω) ^ 2 / 2) :\n    ∀ᵐ ω ∂μ,\n      Tendsto (fun t => (1 / t) * ∫ τ in Set.Ioc (0 : ℝ) t, R τ ω) atTop (𝓝 (lam * v2 / 2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 164,
    "problem_name": "stochastic_processes_renewal_expected_count_finite",
    "informal_statement": "Let (N(t)) be an arbitrary renewal process with interrenewal distribution F_X.\n\nShow that E[N(t)] < ∞ for all t: there exist ε, δ > 0 with F_X(δ) ≤ 1 − ε, then Pr[S_n ≤ δ] ≤ (1−ε)^n, E[N(δ)] ≤ 1/ε, and E[N(t)] ≤ (t+δ)/(εδ).",
    "lean_statement": "theorem q164_renewal_expected_count_finite (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hnn : ∀ i ω, 0 ≤ X i ω)\n    (ε δ : ℝ) (hε : 0 < ε) (hδ : 0 < δ)\n    (hnondeg : (μ {ω | X 0 ω ≤ δ}).toReal ≤ 1 - ε)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (t : ℝ) :\n    Summable (fun n => (μ {ω | S (n + 1) ω ≤ t}).toReal) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 165,
    "problem_name": "stochastic_processes_gg1_idle_time_identity",
    "informal_statement": "Consider a G/G/1 queue with queue-length process Q and cumulative busy time B(t).\n\nShow that the cumulative idle time satisfies I(t) = t − B(t) = ∫_0^t 1{Q(s) = 0} ds.",
    "lean_statement": "theorem q165_gg1_idle_time_identity\n    (Q : ℝ → ℕ) (hQmeas : Measurable Q) (B I : ℝ → ℝ)\n    (hbusy : ∀ t : ℝ, 0 ≤ t → B t = ∫ s in (0 : ℝ)..t, (if 0 < Q s then (1 : ℝ) else 0))\n    (hIdef : ∀ t, I t = t - B t) :\n    ∀ t : ℝ, 0 ≤ t → I t = ∫ s in (0 : ℝ)..t, (if Q s = 0 then (1 : ℝ) else 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 166,
    "problem_name": "stochastic_processes_poisson_joint_arrival_density",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0 with arrival epochs S_1 ≤ S_2 ≤ … .\n\nShow that the joint density of the first n arrival epochs is f_{S_1,…,S_n}(s_1,…,s_n) = λ^n e^{−λ s_n} for 0 ≤ s_1 ≤ s_2 ≤ … ≤ s_n.",
    "lean_statement": "theorem q166_poisson_joint_arrival_density (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ)\n    (n : ℕ) :\n    HasLaw (fun ω => (fun i : Fin (n + 1) => ∑ j ∈ Finset.range ((i : ℕ) + 1), S j ω))\n      (((Measure.pi (fun _ : Fin (n + 1) => (volume : Measure ℝ))).withDensity\n          (fun s => ENNReal.ofReal\n            ((lam : ℝ) ^ (n + 1) * Real.exp (-((lam : ℝ) * s (Fin.last n)))))).restrict\n        {s : Fin (n + 1) → ℝ | 0 ≤ s 0 ∧ Monotone s}) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 167,
    "problem_name": "stochastic_processes_kolmogorov_random_walk_inequality",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps of mean X̄ and variance σ^2.\n\nShow that for every ε > 0 and m ≥ 1, Pr[max_{1 ≤ n ≤ m} |S_n − n X̄| ≥ m ε] ≤ σ^2/(m ε^2).",
    "lean_statement": "theorem q167_kolmogorov_random_walk_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hL2 : MemLp (X 0) 2 μ)\n    (xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (σ2 : ℝ) (hvar : variance (X 0) μ = σ2)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (ε : ℝ) (hε : 0 < ε) (m : ℕ) (hm : 1 ≤ m) :\n    (μ {ω | (m : ℝ) * ε ≤ runningMax (fun n ω => |S n ω - (n : ℝ) * xbar|) m ω}).toReal\n      ≤ σ2 / ((m : ℝ) * ε ^ 2) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 168,
    "problem_name": "stochastic_processes_scaled_branching_martingale",
    "informal_statement": "Consider a branching process (X_n) with i.i.d. offspring counts of mean Ȳ, and let Z_n = X_n / Ȳ^n.\n\nShow that (Z_n) is a martingale.",
    "lean_statement": "theorem q168_branching_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)\n    (Ybar : ℝ) (hY : 0 < Ybar)\n    (hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :\n    Martingale (fun n ω => X n ω / Ybar ^ n) ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 169,
    "problem_name": "stochastic_processes_gamblers_ruin_2",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be Gambler’s ruin with state space Ω = {0, 1, 2, ..., N}:\n        X_0 = k, ℙ[X_{n + 1} = X_n + 1 | X_n] = 1/2, τ = min{n: X_n = 0 or N}.\n        You are given the martingale Y = (Yn := X_n^2 − n)_{n ≥ 0}.\n\n        Show that Y has bounded increments.",
    "lean_statement": "theorem q169_gambler_bounded_increments (μ : Measure Ω) [IsProbabilityMeasure μ] (N : ℕ)\n    (X : ℕ → Ω → ℝ) (hXbd : ∀ n ω, 0 ≤ X n ω ∧ X n ω ≤ N)\n    (hstep1 : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| = 1) :\n    ∃ M : ℝ, ∀ n, ∀ᵐ ω ∂μ,\n      |((X (n + 1) ω) ^ 2 - (n + 1)) - ((X n ω) ^ 2 - n)| ≤ M := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 170,
    "problem_name": "stochastic_processes_semi_markov_expected_return",
    "informal_statement": "Let a semi-Markov process have an irreducible positive-recurrent embedded chain with stationary distribution (π_j) and integrable holding times whose conditional means given the embedded-chain history through each entry are Ū(j).\n\nShow that the expected time between successive entries to state j is (Σ_k π_k Ū(k)) / π_j.",
    "lean_statement": "theorem q170_semi_markov_expected_return (μ : Measure Ω) [IsProbabilityMeasure μ]\n    {S : Type*} [Countable S] [DecidableEq S] [MeasurableSpace S] [MeasurableSingletonClass S]\n    (Pemb : S → S → ℝ) (hPnn : ∀ x y, 0 ≤ Pemb x y) (hPstoch : ∀ x, HasSum (Pemb x) 1)\n    (hirr : ∀ x y, ∃ n, 0 < nstep Pemb n x y)\n    (π : S → ℝ) (hπnn : ∀ x, 0 ≤ π x) (hπsum : HasSum π 1)\n    (hπstat : ∀ y, HasSum (fun x => π x * Pemb x y) (π y))\n    (Ubar : S → ℝ) (hUnn : ∀ s, 0 ≤ Ubar s)\n    (τbar : ℝ) (hτ : HasSum (fun k => π k * Ubar k) τbar)\n    (j : S) (hπj : 0 < π j)\n    (Y : ℕ → Ω → S) (hYmeas : ∀ i, Measurable (Y i)) (hYchain : HasChainLaw μ Y (fun s => if s = j then 1 else 0) Pemb)\n    (U : ℕ → Ω → ℝ) (hUnn' : ∀ i ω, 0 ≤ U i ω)\n    (hUint : ∀ i, Integrable (U i) μ)\n    (hUmean : ∀ i,\n      μ[U i | MeasurableSpace.comap (fun ω => (fun k : Fin (i + 1) => Y k ω)) inferInstance]\n        =ᵐ[μ] fun ω => Ubar (Y i ω))\n    (M : Ω → ℕ)\n    (hM : ∀ ω, 0 < M ω ∧ Y (M ω) ω = j ∧ ∀ n, 0 < n → n < M ω → Y n ω ≠ j)\n    (R : ℝ) (hRdef : R = ∫ ω, (∑ i ∈ Finset.range (M ω), U i ω) ∂μ) :\n    R = τbar / π j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 171,
    "problem_name": "stochastic_processes_countable_first_passage_iteration",
    "informal_statement": "Let (X_n) be a Markov chain on a countable state space, and let F_{ij}(∞) be the probability of ever reaching j from i.\n\nShow that F_{ij}(∞) = P_{ij} + Σ_{k≠j} P_{ik} F_{kj}(∞).",
    "lean_statement": "theorem q171_first_passage_iteration {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (F : Ω → Ω → ℝ) (hF : ∀ i j, F i j = ∑' n, f n i j)\n    (i j : Ω) :\n    F i j = P i j + ∑' k, (if k = j then 0 else P i k * F k j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 172,
    "problem_name": "stochastic_processes_drifted_brownian_two_sided_exit",
    "informal_statement": "Let B_μ(t) = μt + σB(t) with μ < 0, let a < 0 < b, and let T_{ab} be the first exit time from (a,b).\n\nShow that P(T_{ab} = T_b) = (1 − e^{−2|μ||a|/σ^2}) / (e^{2|μ||b|/σ^2} − e^{−2|μ||a|/σ^2}).",
    "lean_statement": "theorem q172_drifted_brownian_two_sided_exit (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n    (m σ : ℝ) (hm : m < 0) (hσ : 0 < σ) (a b : ℝ) (ha : a < 0) (hb : 0 < b)\n    (τ : Ω → ℝ) (hτ0 : ∀ ω, 0 ≤ τ ω)\n    (hin : ∀ ω, ∀ t : ℝ, 0 ≤ t → t < τ ω → a < m * t + σ * B t ω ∧ m * t + σ * B t ω < b)\n    (hexit : ∀ ω, m * τ ω + σ * B (τ ω) ω = a ∨ m * τ ω + σ * B (τ ω) ω = b) :\n    (μ {ω | m * τ ω + σ * B (τ ω) ω = b}).toReal\n      = (1 - Real.exp (-(2 * |m| * |a| / σ ^ 2)))\n        / (Real.exp (2 * |m| * |b| / σ ^ 2) - Real.exp (-(2 * |m| * |a| / σ ^ 2))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 173,
    "problem_name": "stochastic_processes_brownian_drift_max_exponential",
    "informal_statement": "Let B_μ(t) = μt + σB(t) be Brownian motion with drift μ < 0 and variance parameter σ^2, and let M_μ(∞) = sup_{t≥0} B_μ(t).\n\nShow that M_μ(∞) is exponentially distributed with parameter 2|μ|/σ^2, i.e. P(M_μ(∞) > x) = e^{−2|μ|x/σ^2}.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 390 (l6): the all-time maximum of Brownian motion with negative drift is exponential. Let\n`B_m(t) = m·t + σ·B(t)` be Brownian motion with drift `m < 0` and variance parameter `σ² > 0` (built\nfrom a standard Brownian motion `B`), and let `M_m(∞) = sup_{t ≥ 0} B_m(t)` (here `sSup` of the image\nof `[0, ∞)`). Then `M_m(∞)` is exponentially distributed with parameter `2|m|/σ²`:\n`P(M_m(∞) > x) = e^{−2|m|x/σ²}` for every `x ≥ 0`. -/\ntheorem q173_max_drift_exponential (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (m : ℝ) (hm : m < 0) (σ : ℝ) (hσ : 0 < σ)\n    (x : ℝ) (hx : 0 ≤ x) :\n    (μ {ω | x < sSup ((fun t => m * t + σ * B t ω) '' Set.Ici 0)}).toReal\n        = Real.exp (-2 * |m| * x / σ ^ 2) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 174,
    "problem_name": "stochastic_processes_tilted_distribution",
    "informal_statement": "Let X have PMF p_X and semi-invariant generating function γ(r) = ln E[e^{rX}]. Define the tilted PMF q_{X,r}(x) = p_X(x) exp(rx − γ(r)).\n\nShow that q_{X,r} is a valid PMF and that its mean equals γ'(r).",
    "lean_statement": "theorem q174_tilted_distribution\n    (p : ℤ → ℝ) (hp0 : ∀ x, 0 ≤ p x) (hp1 : ∑' x : ℤ, p x = 1)\n    (γ : ℝ → ℝ) (hγ : ∀ s, γ s = Real.log (∑' x : ℤ, p x * Real.exp (s * (x : ℝ))))\n    (r : ℝ) (hMpos : 0 < ∑' x : ℤ, p x * Real.exp (r * (x : ℝ)))\n    (hsum : Summable (fun x : ℤ => p x * Real.exp (r * (x : ℝ))))\n    (hmsum : Summable (fun x : ℤ => (x : ℝ) * (p x * Real.exp (r * (x : ℝ)))))\n    (hdiff : DifferentiableAt ℝ γ r)\n    (q : ℤ → ℝ) (hq : ∀ x, q x = p x * Real.exp (r * (x : ℝ) - γ r)) :\n    (∀ x, 0 ≤ q x) ∧ (∑' x : ℤ, q x = 1) ∧ (∑' x : ℤ, (x : ℝ) * q x = deriv γ r) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 175,
    "problem_name": "stochastic_processes_neyman_pearson_convexity",
    "informal_statement": "Consider a binary hypothesis test based on an observation Y with likelihoods f_{Y|H}(y|0) and f_{Y|H}(y|1). Let u(α) be the minimum probability of one error type achievable when the other error probability is at most α.\n\nShow that u(α) is a convex function of α and is achieved by threshold tests on the likelihood ratio.\n\nTests are measurable and may randomize at the threshold. Allow an infinite threshold at zero type-I error, retaining rejection on the singular part where f₀=0<f₁.",
    "lean_statement": "theorem q175_neyman_pearson_convexity\n    {Y : Type*} [MeasurableSpace Y] (ν : Measure Y) [SigmaFinite ν]\n    (f0 f1 : Y → ℝ) (hf0 : ∀ y, 0 ≤ f0 y) (hf1 : ∀ y, 0 ≤ f1 y)\n    (hf0meas : Measurable f0) (hf1meas : Measurable f1)\n    (hf0int : ∫ y, f0 y ∂ν = 1) (hf1int : ∫ y, f1 y ∂ν = 1)\n    (u : ℝ → ℝ)\n    (hu : ∀ a : ℝ, u a = sInf {b : ℝ | ∃ φ : Y → ℝ, Measurable φ ∧\n      (∀ y, φ y ∈ Set.Icc (0 : ℝ) 1) ∧\n      (∫ y, φ y * f0 y ∂ν) ≤ a ∧ b = 1 - ∫ y, φ y * f1 y ∂ν}) :\n    ConvexOn ℝ (Set.Icc (0 : ℝ) 1) u ∧\n      (∀ a ∈ Set.Icc (0 : ℝ) 1, ∃ η : ℝ≥0∞, ∃ γ : ℝ,\n        γ ∈ Set.Icc (0 : ℝ) 1 ∧\n        (∫ y, likelihoodTest f0 f1 η γ y * f0 y ∂ν) ≤ a ∧\n        1 - (∫ y, likelihoodTest f0 f1 η γ y * f1 y ∂ν) = u a) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 176,
    "problem_name": "stochastic_processes_stationary_distribution_convergence_2",
    "informal_statement": "Given an irreducible Markov chain that is null recurrent,\n\n        Show that lim_n ℙ_x [X_n = y] = 0, for all x, y.",
    "lean_statement": "theorem q176_null_recurrent {Ω : Type*} [Countable Ω] [DecidableEq Ω] (p : ℕ → Ω → Ω → ℝ)\n    (hp0 : ∀ n x y, 0 ≤ p n x y) (hmark : ∀ n x y, p (n + 1) x y = ∑' z, p n x z * p 1 z y)\n    (hstoch : ∀ x, ∑' y, p 1 x y = 1) (hid : ∀ x y, p 0 x y = if x = y then 1 else 0)\n    (hnull : ∀ q : Ω → ℝ, (∀ x, 0 ≤ q x) → (∑' x, q x = 1) → ¬ ∀ y, ∑' x, q x * p 1 x y = q y) :\n    ∀ x y, Tendsto (fun n => p n x y) atTop (𝓝 0) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 177,
    "problem_name": "stochastic_processes_supermartingale_convergence",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be a non-negative supermartingale.\n\n        Show that X_n converges a.s. to some a.s. finite limit.",
    "lean_statement": "theorem q177_super_convergence (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω) :\n    ∃ Xinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω)) := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 178,
    "problem_name": "stochastic_processes_branching_extinction",
    "informal_statement": "Consider a branching process X_{n+1} = Σ_{k=1}^{X_n} Y_{k,n} with X_0 = 1, where the offspring counts Y_{k,n} are i.i.d. with PMF p_k and generating function h(z) = Σ_k p_k z^k.\n\nShow that the extinction probability is the smallest root in [0,1] of h(z) = z, and that this root equals 1 if and only if the mean offspring number Σ_k k p_k ≤ 1.",
    "lean_statement": "theorem q178_branching_extinction (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (p : ℕ → ℝ) (hp0 : ∀ k, 0 ≤ p k) (hp1 : ∑' k, p k = 1) (hnondeg : p 1 < 1)\n    (h : ℝ → ℝ) (hh : ∀ z, h z = ∑' k, p k * z ^ k)\n    (mean : ℝ) (hmeanfin : Summable (fun k : ℕ => (k : ℝ) * p k))\n    (hmean : mean = ∑' k : ℕ, (k : ℝ) * p k)\n    (X : ℕ → Ω → ℕ) (Y : ℕ → ℕ → Ω → ℕ)\n    (hX0 : ∀ ω, X 0 ω = 1)\n    (hrec : ∀ n ω, X (n + 1) ω = ∑ k ∈ Finset.range (X n ω), Y k n ω)\n    (hYlaw : ∀ k n j, (μ {ω | Y k n ω = j}).toReal = p j)\n    (hYindep : iIndepFun (fun (kn : ℕ × ℕ) ω => Y kn.1 kn.2 ω) μ)\n    (hstop : ∀ n k : ℕ, IndepFun (fun ω => if k < X n ω then (1 : ℝ) else 0)\n        (fun ω => (Y k n ω : ℝ)) μ)\n    (q : ℝ) (hq : q = (μ {ω | ∃ n, X n ω = 0}).toReal) :\n    (q ∈ Set.Icc (0 : ℝ) 1 ∧ h q = q ∧ (∀ z ∈ Set.Icc (0 : ℝ) 1, h z = z → q ≤ z))\n      ∧ (q = 1 ↔ mean ≤ 1) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 179,
    "problem_name": "stochastic_processes_delayed_blackwell_nonarithmetic",
    "informal_statement": "Let (N(t))_{t>0} be a delayed renewal counting process whose interrenewal intervals X_2, X_3, … are non-arithmetic with finite mean X̄.\n\nShow that for every δ > 0, lim_{t→∞} E[N(t+δ) − N(t)]/δ = 1/X̄.",
    "lean_statement": "theorem q179_delayed_blackwell_nonarithmetic (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint : Integrable (X 1) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 1 ω = (k : ℝ) * d)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    ∀ δ : ℝ, 0 < δ →\n      Tendsto (fun t => (m (t + δ) - m t) / δ) atTop (𝓝 (1 / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 180,
    "problem_name": "stochastic_processes_utilization_factor",
    "informal_statement": "Consider a G/G/1 queue with arrival rate λ and i.i.d. service times V.\n\nShow that the long-run fraction of time the server is busy equals ρ = λ E[V] with probability 1.",
    "lean_statement": "theorem q180_utilization_factor (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (V : ℕ → Ω → ℝ) (hVpos : ∀ i ω, 0 < V i ω)\n    (hVint : Integrable (V 0) μ)\n    (hVindep : iIndepFun V μ) (hVident : ∀ i, IdentDistrib (V i) (V 0) μ μ)\n    (lam : ℝ) (hlam : 0 < lam) (vbar : ℝ) (hvbar : ∫ ω, V 0 ω ∂μ = vbar)\n    (M : ℝ → Ω → ℕ)\n    (hthru : ∀ᵐ ω ∂μ, Tendsto (fun t => (M t ω : ℝ) / t) atTop (𝓝 lam))\n    (B : ℝ → Ω → ℝ) (hB01 : ∀ t ω, B t ω = 0 ∨ B t ω = 1)\n    (hsand : ∀ᵐ ω ∂μ, ∀ t : ℝ,\n      (∑ n ∈ Finset.range (M t ω), V n ω) ≤ ∫ τ in Set.Ioc (0 : ℝ) t, B τ ω\n        ∧ (∫ τ in Set.Ioc (0 : ℝ) t, B τ ω) ≤ ∑ n ∈ Finset.range (M t ω + 1), V n ω) :\n    ∀ᵐ ω ∂μ,\n      Tendsto (fun t => (1 / t) * ∫ τ in Set.Ioc (0 : ℝ) t, B τ ω) atTop (𝓝 (lam * vbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 181,
    "problem_name": "stochastic_processes_jackson_product_form",
    "informal_statement": "Consider an open Jackson network of k queues with exponential service rates μ_j, effective arrival rates λ_j solving the traffic equations, and ρ_j = λ_j/μ_j < 1 for every j.\n\nShow that the steady-state distribution of the joint state (m_1,…,m_k) has the product form p(m_1,…,m_k) = ∏_{j=1}^k (1 − ρ_j) ρ_j^{m_j}.",
    "lean_statement": "theorem q181_jackson_product_form\n    (k : ℕ) (μ γ : Fin k → ℝ) (Q : Fin k → Fin k → ℝ) (Q0 : Fin k → ℝ)\n    (hμ : ∀ j, 0 < μ j) (hγ : ∀ j, 0 ≤ γ j)\n    (hQ : ∀ i j, 0 ≤ Q i j) (hQ0 : ∀ j, 0 ≤ Q0 j)\n    (hQloop : ∀ i, Q i i = 0)\n    (hcons : ∀ j, Q0 j + ∑ l, Q j l = 1)\n    (lam : Fin k → ℝ) (htraffic : ∀ j, lam j = γ j + ∑ i, lam i * Q i j)\n    (ρ : Fin k → ℝ) (hρdef : ∀ j, ρ j = lam j / μ j)\n    (hρ0 : ∀ j, 0 < ρ j) (hρ1 : ∀ j, ρ j < 1)\n    (p : (Fin k → ℕ) → ℝ) (hp : ∀ m, p m = ∏ j, (1 - ρ j) * ρ j ^ (m j)) :\n    (∀ m, 0 ≤ p m) ∧ HasSum p 1 ∧\n      (∀ m : Fin k → ℕ,\n        p m * ((∑ j, γ j) + ∑ j, (if 0 < m j then μ j else 0))\n          = (∑ j, (if 0 < m j then γ j * p (Function.update m j (m j - 1)) else 0))\n            + (∑ j, μ j * Q0 j * p (Function.update m j (m j + 1)))\n            + (∑ i, ∑ j, (if 0 < m j then\n                μ i * Q i j * p (Function.update (Function.update m i (m i + 1)) j (m j - 1))\n                else 0))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 182,
    "problem_name": "stochastic_processes_periodic_class_partition",
    "informal_statement": "Let C be a recurrent class of period d in a finite-state Markov chain.\n\nShow that C can be partitioned into d disjoint subsets S_1,…,S_d such that all transitions from S_k go to S_{k+1} (indices mod d).",
    "lean_statement": "theorem q182_periodic_class_partition {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (d : ℕ) (hd : 0 < d)\n    (hper : ∀ e : ℕ, (∀ (x : Ω) (n : ℕ), 0 < (P ^ n) x x → e ∣ n) ↔ e ∣ d) :\n    ∃ φ : Ω → ZMod d,\n      (∀ x y : Ω, 0 < P x y → φ y = φ x + 1) ∧ Function.Surjective φ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 183,
    "problem_name": "stochastic_processes_poisson_independent_increments_def_equiv",
    "informal_statement": "Let (N(t)) be a counting process having independent increments and, for each interval, a Poisson increment distribution with mean proportional to the interval length.\n\nShow that (N(t)) automatically has stationary increments as well.",
    "lean_statement": "theorem q183_indep_increments_stationary (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (N : ℝ≥0 → Ω → ℕ) (hN0 : ∀ ω, N 0 ω = 0)\n    (hmarg : ∀ t : ℝ≥0, HasLaw (N t) (poissonMeasure (lam * t)) μ)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b → ∃ c : ℝ≥0,\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure c) μ)\n    (hindep : ∀ s t : ℝ≥0, IndepFun (N s) (fun ω => N (s + t) ω - N s ω) μ) :\n    ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 184,
    "problem_name": "stochastic_processes_martingale_lp_maximal_discrete",
    "informal_statement": "Let (X_n) be a martingale and let p ≥ 1 and ε > 0.\n\nShow that P(max_{1≤m≤n} |X_m| ≥ ε) ≤ E[|X_n|^p]/ε^p.",
    "lean_statement": "theorem q184_martingale_lp_maximal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ)\n    (p : ℝ) (hp : 1 ≤ p) (ε : ℝ) (hε : 0 < ε) (n : ℕ)\n    (hint : ∀ m, Integrable (fun ω => |X m ω| ^ p) μ) :\n    (μ {ω | ε ≤ runningMax (fun k ω => |X k ω|) n ω}).toReal\n      ≤ (∫ ω, |X n ω| ^ p ∂μ) / ε ^ p := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 185,
    "problem_name": "stochastic_processes_stopped_martingale_preserves",
    "informal_statement": "Let (Z_n) be a martingale and let J be a stopping trial; let Z_n* be the stopped process (frozen at value Z_J for n ≥ J).\n\nShow that (Z_n*) is also a martingale.",
    "lean_statement": "theorem q185_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (J : Ω → ℕ)\n    (hJ : IsStoppingTime ℱ (natStop J)) :\n    Martingale (stoppedProcess Z (natStop J)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 186,
    "problem_name": "stochastic_processes_equilibrium_renewal_process",
    "informal_statement": "Consider a non-arithmetic renewal process with interrenewal distribution F and mean X̄. Form a delayed renewal process whose first renewal epoch has the residual-life distribution G(y) = (1/X̄) ∫_0^y [1 − F(x)] dx and whose subsequent interrenewal intervals have distribution F.\n\nShow that m(t) = t/X̄ solves the delayed renewal equation for this process, so the process starts in steady state and has no transient (the equilibrium process).",
    "lean_statement": "theorem q186_equilibrium_renewal\n    (ν : Measure ℝ) [IsProbabilityMeasure ν]\n    (hpos : ν {x | x ≤ 0} = 0)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : xbar = ∫ x, x ∂ν)\n    (F : ℝ → ℝ) (hFcdf : ∀ t, F t = (ν (Set.Iic t)).toReal)\n    (G : ℝ → ℝ) (hG : ∀ y, G y = (1 / xbar) * ∫ x in Set.Ioc (0 : ℝ) y, (1 - F x))\n    (m : ℝ → ℝ) (hm : ∀ t, m t = t / xbar) :\n    ∀ t : ℝ, 0 ≤ t → m t = G t + ∫ x in Set.Ioc (0 : ℝ) t, m (t - x) ∂ν := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 187,
    "problem_name": "stochastic_processes_mm1_expected_delay",
    "informal_statement": "Consider an M/M/1 queue in steady state with arrival rate λ, service rate μ, and ρ = λ/μ < 1.\n\nShow that the expected time a customer spends in the system is 1/(μ − λ).",
    "lean_statement": "theorem q187_mm1_expected_delay\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (ρ : ℝ) (hρ : ρ = lam / mu) (hρ1 : ρ < 1)\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam = p 1 * mu)\n    (hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu)\n    (L : ℝ) (hL : L = ∑' i : ℕ, (i : ℝ) * p i)\n    (W : ℝ) (hlittle : L = lam * W) :\n    W = 1 / (mu - lam) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 188,
    "problem_name": "stochastic_processes_accessibility_transitive",
    "informal_statement": "Let (X_n) be a finite-state Markov chain, and say i → j if j is accessible from i.\n\nShow that accessibility is transitive: if i → j and j → k then i → k.",
    "lean_statement": "theorem q188_accessibility_transitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (i j k : Ω)\n    (hij : ∃ m : ℕ, 0 < (P ^ m) i j) (hjk : ∃ n : ℕ, 0 < (P ^ n) j k) :\n    ∃ p : ℕ, 0 < (P ^ p) i k := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 189,
    "problem_name": "stochastic_processes_transitivity",
    "informal_statement": "For a transitive Markov chain on finite state space Ω, the uniform measure is stationary.",
    "lean_statement": "theorem q189_transitivity {Ω : Type*} [Fintype Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (htrans : ∀ x y : Ω, ∃ φ : Ω ≃ Ω, φ x = y ∧ ∀ a b, P (φ a) (φ b) = P a b) :\n    IsStationary P (fun _ => 1 / (Fintype.card Ω : ℝ)) := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 190,
    "problem_name": "stochastic_processes_quadratic_variation_fourth_moment_bound",
    "informal_statement": "Let (X_t) be a continuous martingale bounded by M, and let Π be a partition of [0,t].\n\nShow that E[(Σ_j (ΔX_j)^2)^2] ≤ 6M^4.",
    "lean_statement": "theorem q190_quartic_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ)\n    (hmart : Martingale X ℱ μ) (hcont : ∀ ω, Continuous (fun t => X t ω))\n    (M : ℝ) (hbdd : ∀ u ω, |X u ω| ≤ M)\n    (t : ℝ) (ht : 0 < t)\n    (s : ℕ → ℝ) (N : ℕ) (hs0 : s 0 = 0) (hsN : s N = t)\n    (hmono : ∀ j, j < N → s j ≤ s (j + 1)) :\n    ∫ ω, (∑ j ∈ Finset.range N, (X (s (j + 1)) ω - X (s j) ω) ^ 2) ^ 2 ∂μ ≤ 6 * M ^ 4 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 191,
    "problem_name": "stochastic_processes_doob_martingale_convergence",
    "informal_statement": "Let (X_n) be a supermartingale with sup_n E|X_n| < ∞.\n\nShow that X_∞ = lim_{n→∞} X_n exists almost surely and satisfies E|X_∞| < ∞.",
    "lean_statement": "theorem q191_doob_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)\n    (hbdd : ∃ C : ℝ, ∀ n, ∫ ω, |X n ω| ∂μ ≤ C) :\n    ∃ Xinf : Ω → ℝ,\n      (∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧ Integrable Xinf μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 192,
    "problem_name": "stochastic_processes_brownian_exponential_martingale",
    "informal_statement": "For standard Brownian motion B and a real parameter θ, the exponential process exp(θ B(t) − θ² t / 2) is a martingale with respect to the natural filtration.",
    "lean_statement": "theorem q192_brownian_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (θ : ℝ)\n    (hadap : Adapted ℱ B)\n    (hint : ∀ t, Integrable (fun ω => Real.exp (θ * B t ω - θ ^ 2 * t / 2)) μ)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hpast : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      Indep (MeasurableSpace.comap (fun ω => B t ω - B s ω) inferInstance) (ℱ s) μ) :\n    ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      μ[(fun ω => Real.exp (θ * B t ω - θ ^ 2 * t / 2)) | (ℱ s)]\n        =ᵐ[μ] (fun ω => Real.exp (θ * B s ω - θ ^ 2 * s / 2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 193,
    "problem_name": "stochastic_processes_sprt_generating_function_root",
    "informal_statement": "Consider a sequential probability ratio test whose per-observation log-likelihood ratio under hypothesis 1 has semi-invariant generating function γ_1(r) = ln ∫ f_{Y|H}(y|1)^{1−r} f_{Y|H}(y|0)^r dy.\n\nShow that γ_1(1) = 0, so that r* = 1 is the relevant root for applying Wald's identity to the log-likelihood-ratio walk.",
    "lean_statement": "theorem q193_sprt_generating_function_root {α : Type*} [MeasurableSpace α] (ν : Measure α)\n    (f0 f1 : α → ℝ) (hf0 : ∫ y, f0 y ∂ν = 1)\n    (γ₁ : ℝ → ℝ)\n    (hγ : ∀ r, γ₁ r = Real.log (∫ y, (f1 y) ^ (1 - r) * (f0 y) ^ r ∂ν)) :\n    γ₁ 1 = 0 := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 194,
    "problem_name": "stochastic_processes_stopping_time_indicator_predictable",
    "informal_statement": "Let τ be a stopping time with respect to a filtration (F_n).\n\nShow that H_n = 1{τ ≥ n} is predictable.",
    "lean_statement": "theorem q194_stopping_time_indicator_predictable\n    (ℱ : Filtration ℕ m0) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :\n    IsStronglyPredictable ℱ\n      (fun n ω => Set.indicator {ω | n ≤ T ω} (fun _ => (1 : ℝ)) ω) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 195,
    "problem_name": "stochastic_processes_no_arbitrage_riskless",
    "informal_statement": "Consider a market with a bond of rate r and a risky asset with volatility σ = 0.\n\nShow that the absence of arbitrage forces the drift to satisfy μ = r.",
    "lean_statement": "theorem q195_no_arbitrage_riskless\n    (r μ S₀ : ℝ) (hS₀ : 0 < S₀)\n    (hnoarb : ∀ t : ℝ, Real.exp (-(r * t)) * (S₀ * Real.exp (μ * t)) = S₀) :\n    μ = r := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 196,
    "problem_name": "stochastic_processes_mdp_stationary_policy_exists",
    "informal_statement": "Consider a finite-state, finite-decision Markov decision problem in which every stationary policy yields an ergodic unichain.\n\nShow that there exists a stationary policy whose long-run gain per transition is at least as large as that of any other policy, stationary or not.",
    "lean_statement": "theorem q196_stationary_policy_exists {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    {K : Type*} [Fintype K] [Nonempty K]\n    (r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))\n    (hunichain : ∀ d : Ω → K,\n        IsIrreducible (fun i j => P (d i) i j) ∧ IsAperiodic (fun i j => P (d i) i j))\n    (gain : (Ω → K) → ℝ)\n    (hgain : ∀ d : Ω → K, ∃ π : Ω → ℝ,\n        IsStationary (fun i j => P (d i) i j) π ∧ gain d = ∑ i, π i * r (d i) i)\n    (val : (ℕ → Ω → K) → ℕ → Ω → ℝ)\n    (hval0 : ∀ d i, val d 0 i = 0)\n    (hvalrec : ∀ d n i, val d (n + 1) i =\n      r (d 0 i) i + ∑ j, P (d 0 i) i j * val (fun m => d (m + 1)) n j) :\n    ∃ dstar : Ω → K, ∀ (d : ℕ → Ω → K) (i : Ω),\n      Filter.limsup (fun n : ℕ => val d n i / (n : ℝ)) atTop ≤ gain dstar := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 197,
    "problem_name": "stochastic_processes_renewal_reward",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄, and let R(t) ≥ 0 with almost surely locally integrable paths be a renewal-reward function for which the reward R_n earned in interrenewal interval n satisfies E[R_n] < ∞ and depends only on the nth interrenewal interval and the age within it.\n\nShow that lim_{t→∞} (1/t) ∫_0^t R(τ) dτ = E[R_n]/X̄ with probability 1.",
    "lean_statement": "theorem q197_renewal_reward (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hXint : Integrable (X 0) μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (R : ℝ → Ω → ℝ)\n    (hRlocal : ∀ᵐ ω ∂μ, ∀ T : ℝ, 0 ≤ T → IntegrableOn (fun t => R t ω) (Set.Ioc 0 T))\n    (hRnn : ∀ τ ω, 0 ≤ R τ ω)\n    (Rcyc : ℕ → Ω → ℝ) (hlink : ∀ n ω, Rcyc n ω = ∫ τ in (S n ω)..(S (n + 1) ω), R τ ω)\n    (hRint : ∀ n, Integrable (Rcyc n) μ)\n    (hRcycindep : iIndepFun Rcyc μ) (hRcycident : ∀ n, IdentDistrib (Rcyc n) (Rcyc 0) μ μ)\n    (r : ℝ) (hr : ∀ n, ∫ ω, Rcyc n ω ∂μ = r) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, R τ ω) atTop (𝓝 (r / Xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 198,
    "problem_name": "stochastic_processes_bus_inspection_paradox",
    "informal_statement": "Buses arrive at a stop according to a renewal process with interrenewal distribution F_X of finite mean, and a single passenger arrives at a uniformly random time long after start.\n\nShow that the expected waiting time of the passenger equals E[X^2]/(2 E[X]), which exceeds E[X]/2 unless interarrival times are deterministic.",
    "lean_statement": "theorem q198_bus_inspection_paradox (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : Integrable (X 0) μ) (hint2 : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (x2 : ℝ) (hx2 : x2 = ∫ ω, (X 0 ω) ^ 2 ∂μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t})\n    (W : ℝ → Ω → ℝ) (hW : ∀ τ ω, W τ ω = S (N τ ω + 1) ω - τ) :\n    ∀ᵐ ω ∂μ, Tendsto\n      (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, W τ ω)\n      atTop (𝓝 (x2 / (2 * Xbar))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 199,
    "problem_name": "stochastic_processes_positive_null_transient_class",
    "informal_statement": "Let (X_n) be an irreducible Markov chain on a countable state space.\n\nShow that the three properties positive-recurrent, null-recurrent, and transient are each class properties, so the whole chain is of exactly one of these types.",
    "lean_statement": "theorem q199_positive_null_transient_class {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j) :\n    ∀ i j : Ω,\n      ((∑' n, f n i i < 1) ↔ (∑' n, f n j j < 1))\n      ∧ (((∑' n, f n i i = 1) ∧ Summable (fun n : ℕ => (n : ℝ) * f n i i)) ↔\n         ((∑' n, f n j j = 1) ∧ Summable (fun n : ℕ => (n : ℝ) * f n j j)))\n      ∧ (((∑' n, f n i i = 1) ∧ ¬ Summable (fun n : ℕ => (n : ℝ) * f n i i)) ↔\n         ((∑' n, f n j j = 1) ∧ ¬ Summable (fun n : ℕ => (n : ℝ) * f n j j))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 200,
    "problem_name": "stochastic_processes_gg1_workload_representation",
    "informal_statement": "Consider a G/G/1 queue with arrival process A, service process S, cumulative busy time B(t), and workload Z(t). Let X(t) = V(Q(0) + A(t)) − t and I(t) = t − B(t).\n\nShow that Z(t) = X(t) + I(t) with Z(t) ≥ 0, that I is non-decreasing with I(0)=0, and that ∫_0^∞ Z(t) dI(t) = 0.",
    "lean_statement": "theorem q200_gg1_workload_representation\n    (W B X I Z : ℝ → ℝ)\n    (hXdef : ∀ t, X t = W t - t)\n    (hIdef : ∀ t, I t = t - B t)\n    (hZdef : ∀ t, Z t = W t - B t)\n    (hW0 : 0 ≤ W 0) (hB0 : B 0 = 0)\n    (hrate : ∀ s t : ℝ, s ≤ t → B t - B s ≤ t - s)\n    (hcap : ∀ t, B t ≤ W t)\n    (hbusy : ∀ s t : ℝ, s ≤ t → (∀ u ∈ Set.Icc s t, 0 < Z u) → B t - B s = t - s) :\n    (∀ t, Z t = X t + I t) ∧\n    (∀ t, 0 ≤ Z t) ∧\n    (∀ s t : ℝ, s ≤ t → I s ≤ I t) ∧\n    I 0 = 0 ∧\n    (∀ s t : ℝ, s ≤ t → (∀ u ∈ Set.Icc s t, 0 < Z u) → I s = I t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 201,
    "problem_name": "stochastic_processes_bounded_differences_inequality",
    "informal_statement": "Let X_1,…,X_n be independent random variables and let g:ℝ^n→ℝ satisfy the bounded-differences condition |g(x) − g(y)| ≤ Σ_i d_i 1{x_i ≠ y_i}.\n\nShow that P(|g(X) − E[g(X)]| > t) ≤ 2 exp(−t^2 / (2 Σ_i d_i^2)).",
    "lean_statement": "theorem q201_bounded_differences_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (Z : Fin n → Ω → ℝ) (hZindep : iIndepFun Z μ) (hZmeas : ∀ i, Measurable (Z i))\n    (g : (Fin n → ℝ) → ℝ) (hgmeas : Measurable g) (d : Fin n → ℝ) (hd : ∀ i, 0 ≤ d i)\n    (hbd : ∀ x y : Fin n → ℝ, |g x - g y| ≤ ∑ i, d i * (if x i = y i then 0 else 1))\n    (G : Ω → ℝ) (hG : ∀ ω, G ω = g (fun i => Z i ω))\n    (t : ℝ) (ht : 0 < t) (hSpos : 0 < ∑ i, (d i) ^ 2) :\n    (μ {ω | t < |G ω - ∫ ω, G ω ∂μ|}).toReal\n      ≤ 2 * Real.exp (-(t ^ 2) / (2 * ∑ i, (d i) ^ 2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 202,
    "problem_name": "stochastic_processes_strong_stationary_time_2",
    "informal_statement": "Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.\n        Let τ be a strong stationary time for (X_n).\n        Let the separation distance be S_x (n) = max_y (1 − P^n (x, y) / π(y)).\n        \n        Show that S_x (n) ≤ ℙ_x [τ > n].",
    "lean_statement": "theorem q202_sst_sep {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]\n    {Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x)\n    (x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)\n    (hmarg : HasMatrixMarginals μ X P x0)\n    (hsst : IsStrongStationary μ X τ π)\n    (n : ℕ) (y : Ω) :\n    1 - (P ^ n) x0 y / π y ≤ tailProb μ τ n := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 203,
    "problem_name": "stochastic_processes_strong_stationary_time_3",
    "informal_statement": "Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.\n        Let τ be a strong stationary time for (X_n).\n        \n        Show that for all n ≥ 0, ℙ[τ ≤ n, X_n = y] = ℙ[τ ≤ n]π(y).",
    "lean_statement": "theorem q203_sst_eq {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]\n    {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (π : Ω → ℝ) (hπ : IsStationary P π)\n    (X : ℕ → Ω' → Ω) (ν : Ω → ℝ) (hchain : HasChainLaw μ X ν (fun i j => P i j))\n    (τ : Ω' → ℕ)\n    (hτmeas : ∀ k, MeasurableSet {ω | τ ω = k})\n    (hXmeas : ∀ i y, MeasurableSet {ω | X i ω = y})\n    (hτstop : ∀ k ω ω', (∀ j, j ≤ k → X j ω = X j ω') → (τ ω = k ↔ τ ω' = k))\n    (hsst : ∀ k y, (μ {ω | τ ω = k ∧ X k ω = y}).toReal = (μ {ω | τ ω = k}).toReal * π y)\n    (n : ℕ) (y : Ω) :\n    (μ {ω | τ ω ≤ n ∧ X n ω = y}).toReal = (μ {ω | τ ω ≤ n}).toReal * π y := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 204,
    "problem_name": "stochastic_processes_rate_function_convexity",
    "informal_statement": "Let X_1 have mean μ and moment generating function M, and let I(x)=sup_θ(θx − log M(θ)).\n\nShow that I is convex and non-negative with I(μ)=0, that I is non-decreasing on [μ,∞) and non-increasing on (−∞,μ], and that I(x)=sup_{θ≥0}(θx − log M(θ)) for x ≥ μ.",
    "lean_statement": "theorem q204_rate_function_convexity (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (hXint : Integrable X μ) (m : ℝ) (hmean : ∫ ω, X ω ∂μ = m)\n    (I : ℝ → EReal)\n    (hI : ∀ x, I x = ⨆ θ ∈ {θ : ℝ | Integrable (fun ω => Real.exp (θ * X ω)) μ},\n      ((θ * x - cgf X μ θ : ℝ) : EReal)) :\n    (∀ (x y t : ℝ), 0 ≤ t → t ≤ 1 →\n        I (t * x + (1 - t) * y) ≤ (t : EReal) * I x + ((1 - t : ℝ) : EReal) * I y) ∧\n    (∀ x : ℝ, (0 : EReal) ≤ I x) ∧\n    I m = 0 ∧\n    (∀ x y : ℝ, m ≤ x → x ≤ y → I x ≤ I y) ∧\n    (∀ x y : ℝ, x ≤ y → y ≤ m → I y ≤ I x) ∧\n    (∀ x : ℝ, m ≤ x → I x =\n      ⨆ θ ∈ ({θ : ℝ | Integrable (fun ω => Real.exp (θ * X ω)) μ} ∩ Set.Ici (0 : ℝ)),\n        ((θ * x - cgf X μ θ : ℝ) : EReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 205,
    "problem_name": "stochastic_processes_renewal_wp1_implies_prob",
    "informal_statement": "Let (Y_n) be a sequence of random variables with Y_n → 0 with probability 1.\n\nShow that Y_n → 0 in probability.",
    "lean_statement": "theorem q205_wp1_implies_prob (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Y : ℕ → Ω → ℝ) (hmeas : ∀ n, AEStronglyMeasurable (Y n) μ)\n    (hae : ∀ᵐ ω ∂μ, Tendsto (fun n => Y n ω) atTop (𝓝 0)) :\n    TendstoInMeasure μ Y atTop (fun _ => 0) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 206,
    "problem_name": "stochastic_processes_ctmc_guess_verify_reversal",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain with rates q_{ij}. Suppose a distribution (p_i) and candidate backward rates q*_{ij} satisfy Σ_j q_{ij} = Σ_j q*_{ij} and p_i q_{ij} = p_j q*_{ji} for all i, j.\n\nShow that (p_i) is the steady-state distribution and (q*_{ij}) are the transition rates of the time-reversed process.",
    "lean_statement": "theorem q206_ctmc_guess_verify_reversal {S : Type*} [Countable S]\n    (q : S → S → ℝ) (hq0 : ∀ i j, 0 ≤ q i j) (hqloop : ∀ i, q i i = 0)\n    (hqSum : ∀ i, Summable (q i))\n    (qstar : S → S → ℝ) (hqs0 : ∀ i j, 0 ≤ qstar i j) (hqsloop : ∀ i, qstar i i = 0)\n    (hqstarSum : ∀ i, Summable (qstar i))\n    (p : S → ℝ) (hppos : ∀ i, 0 < p i) (hpsum : ∑' i, p i = 1)\n    (hrowsum : ∀ i, ∑' j, q i j = ∑' j, qstar i j)\n    (hbal : ∀ i j, p i * q i j = p j * qstar j i) :\n    (∀ j, ∑' i, p i * q i j = p j * ∑' k, q j k) ∧\n    (∀ i j, qstar i j = p j * q j i / p i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 207,
    "problem_name": "stochastic_processes_mm1_process_geometric",
    "informal_statement": "Consider an M/M/1 queue as a continuous-time birth-death process with ρ = λ/μ < 1.\n\nShow that the fraction of time the system contains exactly i customers is (1 − ρ) ρ^i.",
    "lean_statement": "theorem q207_mm1_process_geometric\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam = p 1 * mu)\n    (hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu) :\n    ∀ i, p i = (1 - ρ) * ρ ^ i := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 208,
    "problem_name": "stochastic_processes_wald_bernoulli_kth_success",
    "informal_statement": "Let independent Bernoulli(p) trials be performed and let J be the number of trials until the kth success.\n\nShow, using Wald's equality, that E[J] = k/p.",
    "lean_statement": "theorem q208_wald_bernoulli_kth_success (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (p : ℝ) (hp0 : 0 < p) (hp1 : p ≤ 1)\n    (B : ℕ → Ω → ℝ) (hval : ∀ i ω, B i ω = 0 ∨ B i ω = 1)\n    (hint : ∀ i, Integrable (B i) μ) (hmean : ∀ i, ∫ ω, B i ω ∂μ = p)\n    (hindep : iIndepFun B μ) (hident : ∀ i, IdentDistrib (B i) (B 0) μ μ)\n    (k : ℕ) (hk : 0 < k)\n    (J : Ω → ℕ) (hJint : Integrable (fun ω => (J ω : ℝ)) μ)\n    (hcount : ∀ ω, (∑ i ∈ Finset.range (J ω), B i ω) = (k : ℝ))\n    (hstop : ∀ i : ℕ, IndepFun (fun ω => if i < J ω then (1 : ℝ) else 0) (B i) μ) :\n    ∫ ω, (J ω : ℝ) ∂μ = (k : ℝ) / p := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 209,
    "problem_name": "stochastic_processes_poisson_competition",
    "informal_statement": "Let (N^1) and (N^2) be independent Poisson processes of rates λ_1 and λ_2, with arrival epochs S_{1,i} and S_{2,j}. Let p = λ_1/(λ_1+λ_2).\n\nShow that Pr[S_{1,k} < S_{2,j}] = Σ_{i=k}^{k+j−1} C(k+j−1, i) p^i (1−p)^{k+j−1−i}.",
    "lean_statement": "theorem q209_poisson_competition (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam1 lam2 : ℝ≥0) (hlam1 : 0 < lam1) (hlam2 : 0 < lam2)\n    (T1 T2 : ℕ → Ω → ℝ)\n    (hindep : iIndepFun (Sum.elim T1 T2) μ)\n    (hT1exp : ∀ i, HasLaw (T1 i) (expMeasure (lam1 : ℝ)) μ)\n    (hT2exp : ∀ i, HasLaw (T2 i) (expMeasure (lam2 : ℝ)) μ)\n    (p : ℝ) (hp : p = (lam1 : ℝ) / ((lam1 : ℝ) + (lam2 : ℝ))) :\n    ∀ k j : ℕ, 1 ≤ k → 1 ≤ j →\n      (μ {ω | (∑ i ∈ Finset.range k, T1 i ω) < (∑ i ∈ Finset.range j, T2 i ω)}).toReal\n        = ∑ i ∈ Finset.Icc k (k + j - 1),\n            (Nat.choose (k + j - 1) i : ℝ) * p ^ i * (1 - p) ^ (k + j - 1 - i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 210,
    "problem_name": "stochastic_processes_stopped_supermartingale_preserves",
    "informal_statement": "Let (Z_n) be a supermartingale and let J be a stopping trial with stopped process (Z_n*).\n\nShow that (Z_n*) is also a supermartingale.",
    "lean_statement": "theorem q210_stopped_supermartingale_preserves (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) :\n    Supermartingale (stoppedProcess Z (natStop J)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 211,
    "problem_name": "stochastic_processes_chernoff_exponentially_tight",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X and γ(r) = ln E[e^{rX}] finite on (r_−, r_+). Fix r ∈ (0, r_+) and ε, δ > 0.\n\nShow that there exists m such that for all n ≥ m, Pr[S_n ≥ n(γ'(r) − ε)] ≥ (1 − δ) exp(n[γ(r) − r γ'(r) − rε]).",
    "lean_statement": "theorem q211_chernoff_exponentially_tight (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hid : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (γ : ℝ → ℝ) (hγ : ∀ s, Real.exp (γ s) = ∫ ω, Real.exp (s * X 0 ω) ∂μ)\n    (r : ℝ) (hr : 0 < r) (hdiff : DifferentiableAt ℝ γ r)\n    (ε δ : ℝ) (hε : 0 < ε) (hδ0 : 0 < δ) (hδ1 : δ < 1) :\n    ∃ m : ℕ, ∀ n, m ≤ n →\n      (1 - δ) * Real.exp ((n : ℝ) * (γ r - r * deriv γ r - r * ε))\n        ≤ (μ {ω | (n : ℝ) * (deriv γ r - ε) ≤ ∑ i ∈ Finset.range n, X i ω}).toReal := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 212,
    "problem_name": "stochastic_processes_jackson_reverse_process",
    "informal_statement": "Consider an open Jackson network in steady state.\n\nShow that the time-reversed process is itself a Jackson network, with service rates unchanged and routing probabilities Q*_{ij} = λ_j Q_{ji} / λ_i.",
    "lean_statement": "theorem q212_jackson_reverse_process\n    (k : ℕ) (γ : Fin k → ℝ) (Q : Fin k → Fin k → ℝ) (Q0 : Fin k → ℝ)\n    (hQ : ∀ i j, 0 ≤ Q i j) (hcons : ∀ i, Q0 i + ∑ j, Q i j = 1)\n    (lam : Fin k → ℝ) (hlam : ∀ i, 0 < lam i)\n    (htraffic : ∀ j, lam j = γ j + ∑ i, lam i * Q i j)\n    (Qstar : Fin k → Fin k → ℝ) (hQstar : ∀ i j, Qstar i j = lam j * Q j i / lam i) :\n    (∀ i j, 0 ≤ Qstar i j) ∧\n      (∀ i, γ i / lam i + ∑ j, Qstar i j = 1) ∧\n      (∀ i, lam i = lam i * Q0 i + ∑ j, lam j * Qstar j i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 213,
    "problem_name": "stochastic_processes_aperiodicity",
    "informal_statement": "Suppose that P is irreducible and aperiodic.\n         \n        Show that there exists an integer r such that P^n (x, y) > 0, ∀x,y ∈ Ω, ∀n ≥ r.",
    "lean_statement": "theorem q213_aperiodicity {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P) :\n    IsPrimitive P := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 214,
    "problem_name": "stochastic_processes_irreducibility",
    "informal_statement": "Let P be irreducible.\n        \n        Show that gcd(T(x)) = gcd(T(y)) for all x, y ∈ Ω.",
    "lean_statement": "theorem q214_irreducibility_gcd {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :\n    ∀ x y : Ω, ∀ d : ℕ,\n      (∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 215,
    "problem_name": "stochastic_processes_finite_chain_nstep_limit",
    "informal_statement": "Let (X_n) be a finite-state ergodic Markov chain with steady-state vector π.\n\nShow that the n-step transition probabilities P_{ij}^n converge to π_j as n → ∞ for every starting state i.",
    "lean_statement": "theorem q215_ergodic_chain_converges {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∀ i j : Ω, Tendsto (fun n => (P ^ n) i j) atTop (𝓝 (π j)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 216,
    "problem_name": "stochastic_processes_walds_equality",
    "informal_statement": "Let X_1, X_2, … be i.i.d. with finite mean X̄, let S_n = X_1 + … + X_n, and let J be a stopping trial for the sequence with E[J] < ∞.\n\nShow that E[S_J] = X̄ E[J].",
    "lean_statement": "theorem q216_walds_equality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (m : ℝ)\n    (hint : ∀ i, Integrable (X i) μ) (hmean : ∀ i, ∫ ω, X i ω ∂μ = m)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (J : Ω → ℕ) (hJint : Integrable (fun ω => (J ω : ℝ)) μ)\n    (hstop : ∀ i : ℕ, IndepFun (fun ω => if i < J ω then (1 : ℝ) else 0) (X i) μ) :\n    ∫ ω, (∑ i ∈ Finset.range (J ω), X i ω) ∂μ = m * ∫ ω, (J ω : ℝ) ∂μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 217,
    "problem_name": "stochastic_processes_doob_decomposition",
    "informal_statement": "Let (X_n) be a submartingale adapted to a filtration (F_n).\n\nShow that X_n admits a decomposition X_n = M_n + A_n where (M_n) is a martingale and (A_n) is almost surely non-decreasing and predictable, and that this decomposition is unique.",
    "lean_statement": "theorem q217_doob_decomposition (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) :\n    ∃ M A : ℕ → Ω → ℝ,\n      Martingale M ℱ μ ∧\n      IsStronglyPredictable ℱ A ∧\n      A 0 = 0 ∧\n      (∀ᵐ ω ∂μ, Monotone fun n => A n ω) ∧\n      (∀ n, X n =ᵐ[μ] fun ω => M n ω + A n ω) ∧\n      (∀ M' A' : ℕ → Ω → ℝ, Martingale M' ℱ μ → IsStronglyPredictable ℱ A' → A' 0 = 0 →\n        (∀ n, X n =ᵐ[μ] fun ω => M' n ω + A' n ω) →\n        (∀ n, M n =ᵐ[μ] M' n) ∧ (∀ n, A n =ᵐ[μ] A' n)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 218,
    "problem_name": "stochastic_processes_strong_stationary_time_4",
    "informal_statement": "Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.\n        Let τ be a strong stationary time for (X_n).\n        \n        Show that max_x ||P^n (x, ·) − π||_{TV} ≤ max_x ℙ_x [τ > n].",
    "lean_statement": "theorem q218_sst_tv {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]\n    {Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) (x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)\n    (hmarg : HasMatrixMarginals μ X P x0)\n    (hsst : IsStrongStationary μ X τ π)\n    (n : ℕ) :\n    tvDist (fun y => (P ^ n) x0 y) π ≤ tailProb μ τ n := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 219,
    "problem_name": "stochastic_processes_poisson_splitting",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ. Each arrival is independently labeled type 1 with probability p and type 2 with probability 1 − p, generating counting processes N^1 and N^2.\n\nShow that N^1 and N^2 are independent Poisson processes of rates pλ and (1−p)λ respectively.",
    "lean_statement": "theorem q219_poisson_splitting (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1)\n    (N N1 N2 : ℝ≥0 → Ω → ℕ)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (hsum : ∀ (t : ℝ≥0) (ω : Ω), N t ω = N1 t ω + N2 t ω)\n    (hthin : ∀ (a b : ℝ≥0), a ≤ b → ∀ m k : ℕ,\n      (μ {ω | N b ω - N a ω = m ∧ N1 b ω - N1 a ω = k}).toReal\n        = (μ {ω | N b ω - N a ω = m}).toReal\n          * (Nat.choose m k : ℝ) * p ^ k * (1 - p) ^ (m - k)) :\n    (∀ a b : ℝ≥0, a ≤ b →\n        HasLaw (fun ω => N1 b ω - N1 a ω) (poissonMeasure (p.toNNReal * lam * (b - a))) μ)\n      ∧ (∀ a b : ℝ≥0, a ≤ b →\n        HasLaw (fun ω => N2 b ω - N2 a ω)\n          (poissonMeasure ((1 - p).toNNReal * lam * (b - a))) μ)\n      ∧ (∀ a b : ℝ≥0, a ≤ b →\n        IndepFun (fun ω => N1 b ω - N1 a ω) (fun ω => N2 b ω - N2 a ω) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 220,
    "problem_name": "stochastic_processes_poisson_conditional_two_intervals",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ and let 0 < s < t.\n\nShow that the conditional distribution of N(s) given N(t) = n is binomial with parameters n and s/t.",
    "lean_statement": "theorem q220_poisson_conditional_binomial (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam s t : ℝ≥0) (hlam : 0 < lam) (hs : 0 < s) (hst : s < t)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hNs : HasLaw (N s) (poissonMeasure (lam * s)) μ)\n    (hNincr : HasLaw (fun ω => N t ω - N s ω) (poissonMeasure (lam * (t - s))) μ)\n    (hindep : IndepFun (N s) (fun ω => N t ω - N s ω) μ)\n    (hmono : ∀ ω, N s ω ≤ N t ω) :\n    ∀ n k : ℕ, k ≤ n →\n      (μ {ω | N s ω = k ∧ N t ω = n}).toReal\n        = (μ {ω | N t ω = n}).toReal\n          * (Nat.choose n k : ℝ) * ((s : ℝ) / t) ^ k * (1 - (s : ℝ) / t) ^ (n - k) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 221,
    "problem_name": "stochastic_processes_finite_chain_aperiodic_self_loop",
    "informal_statement": "Let (X_n) be an irreducible finite-state Markov chain in which some state i has P_{ii} > 0.\n\nShow that the chain is aperiodic.",
    "lean_statement": "theorem q221_finite_chain_aperiodic_self_loop {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (i : Ω) (hself : 0 < P i i) :\n    IsAperiodic P := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 222,
    "problem_name": "stochastic_processes_stationary_existance_1",
    "informal_statement": "Suppose that P is irreducible.\n\n        Show that there exists a probability measure π such that π = πP and π(x) > 0 for all x ∈ Ω.",
    "lean_statement": "theorem q222_stationary_existence_positive {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :\n    ∃ π : Ω → ℝ, IsStationary P π ∧ ∀ x, 0 < π x := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 223,
    "problem_name": "stochastic_processes_geometric_brownian_motion_sde",
    "informal_statement": "Let S_t = x exp(αt + σB_t) be a geometric Brownian motion.\n\nShow, using Itô's formula, that dS_t = S_t(μ dt + σ dB_t) with μ = α + σ^2/2.\n\nUse the natural filtration on nonnegative time; the formal real-time representation extends B by zero before time zero.",
    "lean_statement": "theorem q223_geometric_brownian_motion_sde (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hmeas : ∀ t, StronglyMeasurable (B t))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hBneg : ∀ t : ℝ, t ≤ 0 → B t =ᵐ[μ] fun _ => 0)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n    (x α σ : ℝ) :\n    ∃ I : ℝ → Ω → ℝ,\n      IsItoIntegral μ (Filtration.natural B hmeas) B (fun t ω => x * Real.exp (α * t + σ * B t ω)) I ∧\n      Martingale I (Filtration.natural B hmeas) μ ∧\n      (∀ᵐ ω ∂μ, I 0 ω = 0) ∧\n      (∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t →\n        x * Real.exp (α * t + σ * B t ω)\n          = x + (∫ s in (0:ℝ)..t, (α + σ ^ 2 / 2) * (x * Real.exp (α * s + σ * B s ω)))\n            + σ * I t ω) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 224,
    "problem_name": "stochastic_processes_drifted_brownian_sup_tail",
    "informal_statement": "Let B_μ(t) = μt + σB(t) with μ < 0.\n\nShow that for every b > 0, P(sup_{t≥0} B_μ(t) ≥ b) = e^{−2|μ|b/σ^2}.",
    "lean_statement": "theorem q224_drifted_brownian_sup_tail (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n    (m σ : ℝ) (hm : m < 0) (hσ : 0 < σ) (b : ℝ) (hb : 0 < b) :\n    (μ {ω | ∃ t : ℝ, 0 ≤ t ∧ b ≤ m * t + σ * B t ω}).toReal\n      = Real.exp (-(2 * |m| * b / σ ^ 2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 225,
    "problem_name": "stochastic_processes_renewal_count_to_infinity",
    "informal_statement": "Let (N(t))_{t≥0} be a renewal counting process with i.i.d. interrenewal times.\n\nShow that lim_{t→∞} N(t) = ∞ with probability 1, and lim_{t→∞} E[N(t)] = ∞, whether or not the mean interrenewal time is finite.",
    "lean_statement": "theorem q225_renewal_count_to_infinity (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (hNmeas : ∀ t, Measurable (fun ω => (N t ω : ℝ))) :\n    (∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (N t ω : ℝ)) atTop atTop) ∧\n      Tendsto (fun t : ℝ => ∫ ω, (N t ω : ℝ) ∂μ) atTop atTop := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 226,
    "problem_name": "stochastic_processes_poisson_stationary_independent_increments",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0, defined as a renewal counting process whose interarrival times are i.i.d. exponential with parameter λ.\n\nShow that (N(t))_{t≥0} has both stationary and independent increments.",
    "lean_statement": "theorem q226_poisson_stationary_independent_increments (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (τ : ℝ≥0),\n      {ω | n ≤ N τ ω} = {ω | (∑ i ∈ Finset.range n, S i ω) ≤ (τ : ℝ)}) :\n    (∀ (a s : ℝ≥0), IdentDistrib (fun ω => N (a + s) ω - N a ω)\n        (fun ω => N s ω - N 0 ω) μ μ)\n      ∧ (∀ (u : ℕ → ℝ≥0), Monotone u →\n          iIndepFun (fun k ω => N (u (k + 1)) ω - N (u k) ω) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 227,
    "problem_name": "stochastic_processes_random_walk_graph",
    "informal_statement": "Show that the stationary distribution for the simple random walk on the graph is deg(x)/(2|E|).",
    "lean_statement": "theorem q227_random_walk_graph {V : Type*} [Fintype V]\n    (G : SimpleGraph V) [DecidableRel G.Adj] (hd : ∀ x, 0 < G.degree x)\n    (P : Matrix V V ℝ) (hP : ∀ x y, P x y = if G.Adj x y then 1 / (G.degree x : ℝ) else 0)\n    (π : V → ℝ) (hπ : ∀ x, π x = (G.degree x : ℝ) / (2 * G.edgeFinset.card)) :\n    ∀ y, ∑ x, π x * P x y = π y := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 228,
    "problem_name": "stochastic_processes_kolmogorov_submartingale_inequality",
    "informal_statement": "Let (Z_n) be a nonnegative submartingale.\n\nShow that for every a > 0 and m ≥ 1, Pr[max_{1 ≤ i ≤ m} Z_i ≥ a] ≤ E[Z_m]/a.",
    "lean_statement": "theorem q228_kolmogorov_submartingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ Z n ω) (a : ℝ) (ha : 0 < a) (m : ℕ) (hm : 1 ≤ m) :\n    (μ {ω | a ≤ runningMax Z m ω}).toReal ≤ (∫ ω, Z m ω ∂μ) / a := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 229,
    "problem_name": "stochastic_processes_branching_extinction_subcritical",
    "informal_statement": "Consider a branching process with i.i.d. offspring counts of mean Ȳ ≤ 1 (and offspring not identically 1), started from one individual.\n\nShow that extinction occurs with probability 1.",
    "lean_statement": "theorem q229_branching_subcritical_extinction\n    (poff : ℕ → ℝ) (hpoff0 : ∀ k, 0 ≤ poff k) (hpoff1 : ∑' k, poff k = 1)\n    (h : ℝ → ℝ) (hh : ∀ z, h z = ∑' k, poff k * z ^ k)\n    (ybar : ℝ) (hybar : ybar = ∑' k : ℕ, (k : ℝ) * poff k) (hsub : ybar ≤ 1)\n    (hsummable : Summable (fun k : ℕ => (k : ℝ) * poff k))\n    (hnondeg : poff 1 ≠ 1)\n    (ext : ℝ) (hext0 : 0 ≤ ext) (hext1 : ext ≤ 1) (hextfix : h ext = ext)\n    (hextsmall : ∀ z, 0 ≤ z → z ≤ 1 → h z = z → ext ≤ z) :\n    ext = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 230,
    "problem_name": "stochastic_processes_detailed_balance_stationary",
    "informal_statement": "If a probability distribution π satisfies the detailed balance equations π(x) P(x, y) = π(y) P(y, x) for a stochastic matrix P, then π is stationary for P.",
    "lean_statement": "theorem q230_detailed_balance_stationary {S : Type*} [Fintype S]\n    (P : Matrix S S ℝ) (hP : IsStochastic P)\n    (π : S → ℝ) (hπnn : ∀ x, 0 ≤ π x) (hπ1 : ∑ x, π x = 1)\n    (hdb : DetailedBalance P π) :\n    IsStationary P π := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 231,
    "problem_name": "stochastic_processes_supermartingale_stopping_time_1",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a supermartingale. Suppose that X is a non-negative supermartingale,\n        and let T be a stopping time which is finite a.s.\n\n        Show that 𝔼[X_T] ≤ 𝔼[X_0].",
    "lean_statement": "theorem q231_super_nonneg (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ X n ω) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 232,
    "problem_name": "stochastic_processes_kolmogorov_sigma_field_equals_borel",
    "informal_statement": "Let C[0,T] carry the uniform metric, let K be the Kolmogorov σ-field generated by the coordinate projections π_t, and let B be the Borel σ-field.\n\nShow that K = B.",
    "lean_statement": "theorem q232_kolmogorov_sigma_field_equals_borel (T : ℝ) :\n    (⨆ t : ↥(Set.Icc (0:ℝ) T),\n        MeasurableSpace.comap (fun x : C(↥(Set.Icc (0:ℝ) T), ℝ) => x t) (borel ℝ))\n      = borel (C(↥(Set.Icc (0:ℝ) T), ℝ)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 233,
    "problem_name": "stochastic_processes_key_renewal_theorem",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ and non-arithmetic interrenewal distribution, let m(t) = E[N(t)], and let r(x) ≥ 0 be directly Riemann integrable.\n\nShow that lim_{t→∞} ∫_0^t r(t−τ) dm(τ) = (1/X̄) ∫_0^∞ r(x) dx.",
    "lean_statement": "theorem q233_key_renewal_theorem (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : StieltjesFunction ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ)\n    (r : ℝ → ℝ) (hrpos : ∀ x, 0 ≤ r x) (hrmeas : Measurable r)\n    (hrdri : DirectlyRiemannIntegrable r)\n    (hrint : IntegrableOn r (Set.Ioi 0)) :\n    Tendsto (fun t => ∫ τ in Set.Ioc (0 : ℝ) t, r (t - τ) ∂m.measure)\n      atTop (𝓝 ((1 / xbar) * ∫ x in Set.Ioi (0 : ℝ), r x)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 234,
    "problem_name": "stochastic_processes_dependent_zero_mean_martingale",
    "informal_statement": "Let (X_i) be random variables with E[|X_i|] < ∞ and E[X_i | X_{i−1}, …, X_1] = 0 for all i ≥ 2, with E[X_1] = 0, and let Z_n = X_1 + … + X_n.\n\nShow that (Z_n) is a zero-mean martingale.",
    "lean_statement": "theorem q234_mds_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)\n    (hmean0 : ∫ ω, X 0 ω ∂μ = 0)\n    (hmds : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] 0) :\n    Martingale (fun n ω => ∑ i ∈ Finset.range (n + 1), X i ω) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 235,
    "problem_name": "stochastic_processes_random_walk_chain_null_recurrent",
    "informal_statement": "Consider the simple symmetric random walk on the integers viewed as a countable-state Markov chain.\n\nShow that the chain is null-recurrent: every state is recurrent but the expected return time to each state is infinite.",
    "lean_statement": "theorem q235_random_walk_chain_null_recurrent\n    (P : ℤ → ℤ → ℝ) (hP : ∀ i j, P i j = if j = i + 1 ∨ j = i - 1 then 1 / 2 else 0)\n    (p : ℕ → ℤ → ℤ → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → ℤ → ℤ → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j) :\n    (∀ x : ℤ, ∑' n, f n x x = 1)\n      ∧ (∀ x : ℤ, ¬ Summable (fun n : ℕ => (n : ℝ) * f n x x)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 236,
    "problem_name": "stochastic_processes_brownian_quadratic_variation_as",
    "informal_statement": "Let B be a standard Brownian motion and let Π_i be partitions of [0,T] with Δ(Π_i) → 0 and Σ_i i^2 Δ(Π_i) < ∞.\n\nShow that Q(Π_i,B) = Σ_k (B(t_k) − B(t_{k−1}))^2 → T almost surely.",
    "lean_statement": "theorem q236_brownian_quadratic_variation_as (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (T : ℝ) (hT : 0 < T)\n    (τ : ℕ → ℕ → ℝ) (N : ℕ → ℕ) (δ : ℕ → ℝ)\n    (hposN : ∀ i, 0 < N i)\n    (hstart : ∀ i, τ i 0 = 0)\n    (hend : ∀ i, τ i (N i) = T)\n    (hmono : ∀ i, ∀ k, k < N i → τ i k < τ i (k + 1))\n    (hmesh : ∀ i, ∀ k, k < N i → τ i (k + 1) - τ i k ≤ δ i)\n    (hmesh0 : Tendsto δ Filter.atTop (𝓝 0))\n    (hsum : Summable (fun i : ℕ => (i : ℝ) ^ 2 * δ i))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    ∀ᵐ ω ∂μ,\n      Tendsto (fun i => ∑ k ∈ Finset.range (N i), (B (τ i (k + 1)) ω - B (τ i k) ω) ^ 2)\n        Filter.atTop (𝓝 T) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 237,
    "problem_name": "stochastic_processes_l2_martingale_convergence",
    "informal_statement": "Let (Z_n) be a martingale bounded in L^2, i.e. sup_n E[Z_n^2] < ∞.\n\nShow that Z_n converges with probability 1 and in mean square to a limiting random variable.",
    "lean_statement": "theorem q237_l2_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (hL2 : ∀ n, MemLp (Z n) 2 μ) (M : ℝ) (hbdd : ∀ n, ∫ ω, (Z n ω) ^ 2 ∂μ ≤ M) :\n    ∃ Zinf : Ω → ℝ, MemLp Zinf 2 μ ∧\n      (∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω))) ∧\n      Tendsto (fun n => ∫ ω, (Z n ω - Zinf ω) ^ 2 ∂μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 238,
    "problem_name": "stochastic_processes_delayed_renewal_laplace",
    "informal_statement": "Let (N(t)) be a delayed renewal process with first-epoch distribution G and interrenewal distribution F, and let m(t) = E[N(t)] with Laplace transform L_m.\n\nShow that L_m(r) = L_G(r) / (r[1 − L_F(r)]).",
    "lean_statement": "theorem q238_delayed_renewal_laplace (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ)\n    (LG : ℝ → ℝ) (hLG : ∀ r, LG r = ∫ ω, Real.exp (-r * X 0 ω) ∂μ)\n    (LF : ℝ → ℝ) (hLF : ∀ r, LF r = ∫ ω, Real.exp (-r * X 1 ω) ∂μ)\n    (Lm : ℝ → ℝ) (hLm : ∀ r, Lm r = ∫ t in Set.Ioi (0 : ℝ), Real.exp (-r * t) * m t) :\n    ∀ r : ℝ, 0 < r → Lm r = LG r / (r * (1 - LF r)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 239,
    "problem_name": "stochastic_processes_ctmc_kolmogorov_backward",
    "informal_statement": "Let (X(t)) be a continuous-time Markov chain with transition functions P_{ij}(t), generator entries q_{ij} (i≠j) and q_{jj} = −ν_j.\n\nShow that the backward Kolmogorov equations hold: dP_{ij}(t)/dt = Σ_k q_{ik} P_{kj}(t).",
    "lean_statement": "theorem q239_ctmc_kolmogorov_backward {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (Q : S → S → ℝ) (hQdiag : ∀ i, Q i i = -ν i)\n    (hQoff : ∀ i j, i ≠ j → Q i j = ν i * P i j)\n    (Pt : ℝ → S → S → ℝ)\n    (hPt0diag : ∀ i, Pt 0 i i = 1) (hPt0off : ∀ i j, i ≠ j → Pt 0 i j = 0)\n    (hCK : ∀ (s t : ℝ), 0 ≤ s → 0 ≤ t → ∀ i j, Pt (s + t) i j = ∑' k, Pt s i k * Pt t k j)\n    (hgen : ∀ i j, HasDerivAt (fun t => Pt t i j) (Q i j) 0) :\n    ∀ (t : ℝ) (i j : S), 0 ≤ t →\n      HasDerivAt (fun t => Pt t i j) (∑' k, Q i k * Pt t k j) t := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 240,
    "problem_name": "stochastic_processes_random_mapping",
    "informal_statement": "A random mapping representation of a transition matrix P on state\n        space Ω is a function f : Ω × Λ → Ω, along with a Λ−valued random\n        variable Z, satisfying ℙ[f(x, Z) = y] = P(x, y).\n        \n        Show that every transition matrix on a finite state space has a\n        random mapping representation.",
    "lean_statement": "theorem q240_random_mapping {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :\n    ∃ (m : ℕ) (f : Ω × Fin m → Ω) (q : Fin m → ℝ),\n      (∀ l, 0 ≤ q l) ∧ (∑ l, q l = 1) ∧\n      ∀ x y, ∑ l, (if f (x, l) = y then q l else 0) = P x y := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 241,
    "problem_name": "stochastic_processes_square_integrable_martingale_space_complete",
    "informal_statement": "Let M^2 denote the space of square-integrable right-continuous martingales with left limits on [0,T], normed by ‖X‖_T = (E[X_T^2])^{1/2}, and let M^{2,c} be the subspace of continuous ones.\n\nShow that M^2 is complete and that M^{2,c} is a closed subspace of M^2.",
    "lean_statement": "theorem q241_M2_complete_M2c_closed (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (T : ℝ) (hT : 0 ≤ T)\n    (X : ℕ → ℝ → Ω → ℝ)\n    (hmart : ∀ k, Martingale (X k) ℱ μ)\n    (hL2 : ∀ k t, MemLp (X k t) 2 μ)\n    (hrc : ∀ k ω t, ContinuousWithinAt (fun u => X k u ω) (Set.Ici t) t)\n    (hll : ∀ k ω t, ∃ l : ℝ, Tendsto (fun u => X k u ω) (𝓝[<] t) (𝓝 l))\n    (hCauchy : ∀ ε : ℝ, 0 < ε → ∃ N, ∀ k m, N ≤ k → N ≤ m →\n      ∫ ω, (X k T ω - X m T ω) ^ 2 ∂μ < ε) :\n    ∃ Y : ℝ → Ω → ℝ,\n      Martingale Y ℱ μ ∧ (∀ t, MemLp (Y t) 2 μ) ∧\n      (∀ ω t, ContinuousWithinAt (fun u => Y u ω) (Set.Ici t) t) ∧\n      (∀ ω t, ∃ l : ℝ, Tendsto (fun u => Y u ω) (𝓝[<] t) (𝓝 l)) ∧\n      Tendsto (fun k => ∫ ω, (X k T ω - Y T ω) ^ 2 ∂μ) atTop (𝓝 0) ∧\n      ((∀ k ω, Continuous (fun t => X k t ω)) → (∀ ω, Continuous (fun t => Y t ω))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 242,
    "problem_name": "stochastic_processes_memoryless_characterization",
    "informal_statement": "Let X be a positive random variable with Pr[X > 0] = 1.\n\nShow that the interarrival distribution of a renewal process is memoryless, i.e. Pr[X > t + x] = Pr[X > x] Pr[X > t] for all x, t ≥ 0, if and only if X is exponential.",
    "lean_statement": "theorem q242_memoryless_characterization (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (hXmeas : Measurable X) (hXpos : ∀ᵐ ω ∂μ, 0 < X ω) :\n    (∀ x t : ℝ, 0 ≤ x → 0 ≤ t →\n        (μ {ω | x + t < X ω}).toReal\n          = (μ {ω | x < X ω}).toReal * (μ {ω | t < X ω}).toReal)\n      ↔ (∃ lam : ℝ, 0 < lam ∧ HasLaw X (expMeasure lam) μ) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Poisson processes"
  },
  {
    "question_id": 243,
    "problem_name": "stochastic_processes_delayed_reward_ensemble_average",
    "informal_statement": "Let N be a delayed renewal process with nonarithmetic interrenewal law and finite positive mean X̄₂. Let R(t)=𝓡(Z(t),X̃(t)) for a jointly measurable reward function, with locally integrable paths and integrable total absolute cycle reward. Assume the expected within-cycle reward functions g_F(t)=E[𝓡(t,X₂)1{t<X₂}] and g_G(t)=E[𝓡(t,X₁)1{t<X₁}] are directly Riemann integrable, and all displayed reward expectations are integrable.\n\nShow that E[R(t)] tends to E[∫_0^{X₂}𝓡(z,X₂)dz]/X̄₂.",
    "lean_statement": "theorem q243_delayed_reward_ensemble_average (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hint : Integrable (X 1) μ)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 1 ω = (k : ℝ) * d) (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (xbar2 : ℝ) (hxbar2 : 0 < xbar2) (hmean : ∫ ω, X 1 ω ∂μ = xbar2)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Z : ℝ → Ω → ℝ) (hZ : ∀ t ω, Z t ω = t - ∑ i ∈ Finset.range (N t ω), X i ω)\n    (Xtil : ℝ → Ω → ℝ) (hXtil : ∀ t ω, Xtil t ω = X (N t ω) ω)\n    (rwd : ℝ → ℝ → ℝ)\n    (hrwdmeas : Measurable (Function.uncurry rwd))\n    (hrwdlocal : ∀ x : ℝ, 0 ≤ x → IntegrableOn (fun z => rwd z x) (Set.Ioc 0 x))\n    (hRabs : Integrable (fun ω => ∫ z in Set.Ioc (0 : ℝ) (X 1 ω), |rwd z (X 1 ω)|) μ)\n    (R : ℝ → Ω → ℝ)\n    (hRlocal : ∀ᵐ ω ∂μ, ∀ T : ℝ, 0 ≤ T → IntegrableOn (fun t => R t ω) (Set.Ioc 0 T))\n    (hR : ∀ t ω, R t ω = rwd (Z t ω) (Xtil t ω))\n    (hRpoint : ∀ t : ℝ, 0 ≤ t → Integrable (R t) μ)\n    (hpoint : ∀ i t, 0 ≤ t → Integrable (fun ω => if t < X i ω then rwd t (X i ω) else 0) μ)\n    (hcycleDRI : DirectlyRiemannIntegrable (fun t => ∫ ω,\n      (if t < X 1 ω then rwd t (X 1 ω) else 0) ∂μ))\n    (hdelayDRI : DirectlyRiemannIntegrable (fun t => ∫ ω,\n      (if t < X 0 ω then rwd t (X 0 ω) else 0) ∂μ))\n    (rbar : ℝ)\n    (hRint : Integrable (fun ω => ∫ z in Set.Ioc (0 : ℝ) (X 1 ω), rwd z (X 1 ω)) μ)\n    (hrbar : rbar = ∫ ω, (∫ z in Set.Ioc (0 : ℝ) (X 1 ω), rwd z (X 1 ω)) ∂μ) :\n    Tendsto (fun t => ∫ ω, R t ω ∂μ) atTop (𝓝 (rbar / xbar2)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 244,
    "problem_name": "stochastic_processes_submartingale_2",
    "informal_statement": "Consider biased gambler’s ruin: at each step, the gambler gains one dollar\n        with probability p and losses one dollar with probability (1 − p).\n        Let X_n be the money in purse at time n.\n\n        Show that if p > 1/2, then (X_n) is a submartingale.",
    "lean_statement": "theorem q244_gambler_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : 1 / 2 < p)\n    (hstep : IsConstDrift μ ℱ X (2 * p - 1)) :\n    Submartingale X ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 245,
    "problem_name": "stochastic_processes_martingale_partial_isolation",
    "informal_statement": "Let (Z_n) be a martingale.\n\nShow that for any n > i ≥ 1, E[Z_n | Z_i, Z_{i−1}, …, Z_1] = Z_i, and consequently E[Z_n] = E[Z_1].",
    "lean_statement": "theorem q245_martingale_tower (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (i n : ℕ) (hin : i ≤ n) :\n    μ[Z n | ℱ i] =ᵐ[μ] Z i ∧ ∫ ω, Z n ω ∂μ = ∫ ω, Z i ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 246,
    "problem_name": "stochastic_processes_chernoff_bound",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X having semi-invariant generating function γ(r) = ln E[e^{rX}], finite near 0, and let a > X̄.\n\nShow that Pr[S_n ≥ na] ≤ exp(n μ_X(a)), where μ_X(a) = inf_{r > 0} [γ(r) − ra] < 0.",
    "lean_statement": "theorem q246_chernoff_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hid : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (γ : ℝ → ℝ) (hγ : ∀ r, Real.exp (γ r) = ∫ ω, Real.exp (r * X 0 ω) ∂μ)\n    (xbar : ℝ) (hxbar : xbar = ∫ ω, X 0 ω ∂μ) (a : ℝ) (ha : xbar < a)\n    (hbdd : BddBelow ((fun r : ℝ => γ r - r * a) '' Set.Ioi (0 : ℝ))) :\n    (⨅ r ∈ Set.Ioi (0 : ℝ), (γ r - r * a)) < 0 ∧\n      (∀ n : ℕ, (μ {ω | (n : ℝ) * a ≤ ∑ i ∈ Finset.range n, X i ω}).toReal\n        ≤ Real.exp ((n : ℝ) * (⨅ r ∈ Set.Ioi (0 : ℝ), (γ r - r * a)))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 247,
    "problem_name": "stochastic_processes_brownian_hitting_time_density",
    "informal_statement": "Let B be a standard Brownian motion, a > 0, and T_a = inf{t ≥ 0 : B(t) = a}.\n\nShow that T_a has density (a/t^{3/2}) (2π)^{-1/2} e^{−a^2/(2t)} for t > 0.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 389 (l6): density of the first-passage time (the Lévy / inverse-Gaussian density). Let `B` be a\nstandard Brownian motion, `a > 0`, and `T_a = inf{t ≥ 0 : B(t) = a}` abstracted as `T : Ω → ℝ`\ncharacterised by `T ≥ 0`, `B(T) = a` a.s., and no earlier hit. Then the law of `T_a` has density\n`(a/t^{3/2})(2π)^{-1/2} e^{−a²/(2t)}` on `t > 0` w.r.t. Lebesgue measure, i.e. the pushforward\n`μ.map T` equals `volume.withDensity` of that function (extended by `0` for `t ≤ 0`). -/\ntheorem q247_first_passage_density (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (a : ℝ) (ha : 0 < a)\n    (T : Ω → ℝ) (hTmeas : Measurable T)\n    (hTnn : ∀ ω, 0 ≤ T ω)\n    (hThit : ∀ᵐ ω ∂μ, B (T ω) ω = a)\n    (hTfirst : ∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t → t < T ω → B t ω ≠ a) :\n    μ.map T = volume.withDensity (fun t : ℝ =>\n      ENNReal.ofReal (if 0 < t then\n        a / t ^ ((3 : ℝ) / 2) * (2 * Real.pi) ^ (-(1 : ℝ) / 2)\n          * Real.exp (-a ^ 2 / (2 * t))\n      else 0)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 248,
    "problem_name": "stochastic_processes_sprt_expected_sample_size",
    "informal_statement": "Consider a sequential probability ratio test with thresholds α > 0 and β < 0, stopping at trial J, where the per-observation log-likelihood ratio Z has E[Z | H = 0] > 0.\n\nShow that E[J | H = 0] = (α Pr[cross α | H=0] + β Pr[cross β | H=0]) / E[Z | H = 0] by Wald's equality.",
    "lean_statement": "theorem q248_sprt_expected_sample_size (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z S M : ℕ → Ω → ℝ) (d : ℝ) (hd : 0 < d)\n    (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, Z i ω)\n    (hmean : ∫ ω, Z 0 ω ∂μ = d)\n    (hM : ∀ n ω, M n ω = S n ω - (n : ℝ) * d)\n    (hMmart : Martingale M ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (N : ℕ) (hJbdd : ∀ ω, J ω ≤ N)\n    (hEJ : Integrable (fun ω => (J ω : ℝ)) μ)\n    (α β : ℝ) (hα : 0 < α) (hβ : β < 0)\n    (hhit : ∀ ω, S (J ω) ω = α ∨ S (J ω) ω = β) :\n    ∫ ω, (J ω : ℝ) ∂μ\n      = (α * (μ {ω | S (J ω) ω = α}).toReal + β * (μ {ω | S (J ω) ω = β}).toReal) / d := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 249,
    "problem_name": "stochastic_processes_expected_first_passage",
    "informal_statement": "Let (X_n) be a finite-state Markov chain in which state 1 is reachable from every state. For i ≠ 1 let v_i be the expected number of steps to first reach state 1 starting from i, and set v_1 = 0.\n\nShow that the vector v is the unique solution of v = r + [P] v with r_i = 1 for i ≠ 1, r_1 = 0, v_1 = 0.",
    "lean_statement": "theorem q249_first_passage_unique {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (s : Ω)\n    (hreach : ∀ x, ∃ n : ℕ, 0 < (P ^ n) x s) :\n    ∃! v : Ω → ℝ, ∀ x, v x = if x = s then 0 else 1 + ∑ z, P x z * v z := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 250,
    "problem_name": "stochastic_processes_simple_approximation_bounded",
    "informal_statement": "Let X ∈ L^2 be a bounded adapted process.\n\nShow that there exist simple adapted processes X^n with lim_n E[∫_0^T (X^n_t − X_t)^2 dt] = 0.",
    "lean_statement": "/-- A *simple adapted process* on `[0,T]`: there is a finite partition `0 = τ₀ ≤ τ₁ ≤ … ≤ τ_N = T`\nand `F_{τ_k}`-measurable random variables `ξ_k` with `Y_u(ω) = Σ_k ξ_k(ω) · 1_{(τ_k, τ_{k+1}]}(u)`. -/\ndef IsSimpleAdapted (ℱ : Filtration ℝ m0) (T : ℝ) (Y : ℝ → Ω → ℝ) : Prop :=\n  ∃ (N : ℕ) (τ : ℕ → ℝ) (ξ : ℕ → Ω → ℝ),\n    τ 0 = 0 ∧ Monotone τ ∧ τ N = T ∧\n    (∀ k, StronglyMeasurable[ℱ (τ k)] (ξ k)) ∧\n    ∀ (u : ℝ) (ω : Ω), Y u ω =\n      ∑ k ∈ Finset.range N, (Set.Ioc (τ k) (τ (k + 1))).indicator (fun _ => ξ k ω) u\n\n/-- 447 (l15.prop2): a bounded adapted `L²` process (paths not assumed continuous) can be\napproximated in `L²(dt × dP)` by simple adapted processes: there exist simple adapted `Xⁿ` with\n`lim_n E[∫₀ᵀ (Xⁿ_t − X_t)² dt] = 0`.\nFaithful abstraction (this Mathlib has no stochastic-integral `L²` space): `X` is adapted (`hadap`),\nbounded (`hbdd`) and lies in `L²` (`hL2`); \"simple adapted\" is encoded by `IsSimpleAdapted`, and the\n`L²(dt × dP)` convergence is the stated `Tendsto`. -/\ntheorem q250_simple_approximation_bounded\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (T : ℝ) (hT : 0 ≤ T)\n    (X : ℝ → Ω → ℝ) (hadap : Adapted ℱ X)\n    (hbdd : ∃ C : ℝ, ∀ t ω, |X t ω| ≤ C)\n    (hL2 : ∀ t, MemLp (X t) 2 μ) :\n    ∃ Xn : ℕ → ℝ → Ω → ℝ,\n      (∀ n, IsSimpleAdapted ℱ T (Xn n)) ∧\n      Tendsto (fun n => ∫ ω, (∫ t in (0:ℝ)..T, (Xn n t ω - X t ω) ^ 2) ∂μ)\n        atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 251,
    "problem_name": "stochastic_processes_random_walk_recurrent_2",
    "informal_statement": "Show that simple random walk on ℤ^1 is recurrent.",
    "lean_statement": "theorem q251_z1_recurrent :\n    ¬ Summable (fun n : ℕ => (Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) := by sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 252,
    "problem_name": "stochastic_processes_birth_death_balance_equation",
    "informal_statement": "Consider an irreducible positive-recurrent birth-death Markov chain on {0,1,2,…} with stationary distribution π, up-probability p_i and down-probability q_{i+1}.\n\nShow that the stationary distribution satisfies the detailed balance relation π_i p_i = π_{i+1} q_{i+1} for all i ≥ 0.",
    "lean_statement": "theorem q252_birth_death_detailed_balance\n    (p q π : ℕ → ℝ)\n    (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i) (hπ : ∀ i, 0 ≤ π i)\n    (hbal0 : π 0 * p 0 = π 1 * q 1)\n    (hbal : ∀ k, π (k + 1) * (p (k + 1) + q (k + 1)) = π k * p k + π (k + 2) * q (k + 2)) :\n    ∀ i, π i * p i = π (i + 1) * q (i + 1) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 253,
    "problem_name": "stochastic_processes_renewal_clt",
    "informal_statement": "Let (N(t))_{t≥0} be a renewal counting process whose i.i.d. interrenewal times have finite mean X̄ and finite standard deviation σ > 0.\n\nShow that lim_{t→∞} Pr[(N(t) − t/X̄)/(σ X̄^{−3/2} √t) < α] = Φ(α), the standard normal CDF.",
    "lean_statement": "theorem q253_renewal_clt (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : Integrable (X 0) μ) (hL2 : MemLp (X 0) 2 μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (σ : ℝ) (hσ : 0 < σ) (hvar : ∫ ω, (X 0 ω - Xbar) ^ 2 ∂μ = σ ^ 2)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t)) :\n    ∀ α : ℝ, Tendsto\n      (fun t : ℝ => (μ {ω | ((N t ω : ℝ) - t / Xbar) /\n        (σ * Xbar ^ (-(3 : ℝ) / 2) * Real.sqrt t) < α}).toReal)\n      atTop (𝓝 ((gaussianReal 0 1 (Set.Iio α)).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 254,
    "problem_name": "stochastic_processes_renewal_rate_zero_infinite_mean",
    "informal_statement": "Let (N(t)) be a renewal process whose i.i.d. interrenewal times have infinite mean.\n\nShow that lim_{t→∞} N(t)/t = 0 with probability 1.",
    "lean_statement": "theorem q254_renewal_rate_zero_infinite_mean (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hinf : ∫⁻ ω, ENNReal.ofReal (X 0 ω) ∂μ = ⊤)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t}) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (N t ω : ℝ) / t) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 255,
    "problem_name": "stochastic_processes_reflection_principle",
    "informal_statement": "Let B be a standard Brownian motion and let M(t) = sup_{0≤s≤t} B(s).\n\nShow that for every a ≥ 0, P(M(t) ≥ a) = 2 P(B(t) ≥ a) = 2 (2πt)^{-1/2} ∫_a^∞ e^{−x^2/(2t)} dx.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 386 (l6): the reflection principle for the running maximum. For a standard Brownian motion `B`,\n`t > 0` and level `a ≥ 0`, with `M(t) = sup_{0 ≤ s ≤ t} B(s)` (here `sSup` of the image of `[0, t]`):\n`P(M(t) ≥ a) = 2·P(B(t) ≥ a) = 2·(2πt)^{-1/2} ∫_a^∞ e^{−x²/(2t)} dx`. -/\ntheorem q255_reflection_principle (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (t : ℝ) (ht : 0 < t) (a : ℝ) (ha : 0 ≤ a) :\n    (μ {ω | a ≤ sSup ((fun s => B s ω) '' Set.Icc 0 t)}).toReal\n        = 2 * (μ {ω | a ≤ B t ω}).toReal ∧\n    2 * (μ {ω | a ≤ B t ω}).toReal\n        = 2 * (2 * Real.pi * t) ^ (-(1 : ℝ) / 2)\n            * ∫ x in Set.Ioi a, Real.exp (-x ^ 2 / (2 * t)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 256,
    "problem_name": "stochastic_processes_branching_supercritical_survival",
    "informal_statement": "Consider a branching process with i.i.d. offspring counts of mean Ȳ > 1, started from one individual.\n\nShow that the extinction probability is strictly less than 1.",
    "lean_statement": "theorem q256_branching_supercritical_survival\n    (poff : ℕ → ℝ) (hpoff0 : ∀ k, 0 ≤ poff k) (hpoff1 : ∑' k, poff k = 1)\n    (h : ℝ → ℝ) (hh : ∀ z, h z = ∑' k, poff k * z ^ k)\n    (ybar : ℝ) (hybar : ybar = ∑' k : ℕ, (k : ℝ) * poff k) (hsuper : 1 < ybar)\n    (ext : ℝ) (hext0 : 0 ≤ ext) (hext1 : ext ≤ 1) (hextfix : h ext = ext)\n    (hextsmall : ∀ z, 0 ≤ z → z ≤ 1 → h z = z → ext ≤ z) :\n    ext < 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 257,
    "problem_name": "stochastic_processes_stopped_martingale_expectation_equal",
    "informal_statement": "Let (Z_n) be a martingale and J a stopping trial with stopped process (Z_n*).\n\nShow that E[Z_1] = E[Z_n*] = E[Z_n] for all n.",
    "lean_statement": "theorem q257_stopped_martingale_expectation_equal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :\n    ∫ ω, Z 0 ω ∂μ = ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧\n      ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ = ∫ ω, Z n ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 258,
    "problem_name": "stochastic_processes_ctmc_uniformization",
    "informal_statement": "Let (X(t)) be a continuous-time Markov chain with bounded exit rates, and choose ν* ≥ sup_i ν_i. Define a discrete-time chain with transition matrix [P*] by adding self-loops so that each state has total rate ν*.\n\nShow that P_{ij}(t) = Σ_{n≥0} P*_{ij}^{(n)} e^{−ν* t} (ν* t)^n / n!.",
    "lean_statement": "theorem q258_ctmc_uniformization {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (νstar : ℝ) (hνstar0 : 0 < νstar) (hνstar : ∀ i, ν i ≤ νstar)\n    (Pstar : S → S → ℝ)\n    (hPstarDiag : ∀ i, Pstar i i = 1 - ν i / νstar)\n    (hPstarOff : ∀ i j, i ≠ j → Pstar i j = ν i * P i j / νstar)\n    (Pstar_pow : ℕ → S → S → ℝ)\n    (hPow0diag : ∀ i, Pstar_pow 0 i i = 1)\n    (hPow0off : ∀ i j, i ≠ j → Pstar_pow 0 i j = 0)\n    (hPowSucc : ∀ n i j, Pstar_pow (n + 1) i j = ∑' k, Pstar_pow n i k * Pstar k j)\n    (Q : S → S → ℝ) (hQdiag : ∀ i, Q i i = -ν i)\n    (hQoff : ∀ i j, i ≠ j → Q i j = ν i * P i j)\n    (Pt : ℝ → S → S → ℝ)\n    (hPtnn : ∀ t i j, 0 ≤ t → 0 ≤ Pt t i j)\n    (hPtstoch : ∀ t i, 0 ≤ t → HasSum (Pt t i) 1)\n    (hPt0diag : ∀ i, Pt 0 i i = 1) (hPt0off : ∀ i j, i ≠ j → Pt 0 i j = 0)\n    (hbackward : ∀ (t : ℝ) (i j : S), 0 ≤ t →\n        HasDerivAt (fun t => Pt t i j) (∑' k, Q i k * Pt t k j) t) :\n    ∀ (t : ℝ) (i j : S), 0 ≤ t →\n      Pt t i j = ∑' n : ℕ,\n        Pstar_pow n i j * (Real.exp (-(νstar * t)) * (νstar * t) ^ n / (Nat.factorial n : ℝ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 259,
    "problem_name": "stochastic_processes_martingale_stopping_time_4",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time with 𝔼[T] < ∞.\n        You are given that X has bounded increments, i.e. ∃M > 0 such that |X_{n+1} − X_n| ≤ M for all n.\n\n        Show that 𝔼[X_T] = 𝔼[X_0].",
    "lean_statement": "theorem q259_optional_stopping_bdd_incr (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) (hET : Integrable (fun ω => (T ω : ℝ)) μ)\n    (M : ℝ) (hincr : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| ≤ M) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ = ∫ ω, X 0 ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 260,
    "problem_name": "stochastic_processes_poisson_bernoulli_limit",
    "informal_statement": "For each j ≥ 1, let a Bernoulli process place an arrival in each slot of width δ = 2^{−j} independently with probability p = λ2^{−j}, and let N_j(t) count arrivals up to time t.\n\nShow that as j → ∞ the PMF of N_j(t) converges to the Poisson PMF (λt)^n e^{−λt} / n!.",
    "lean_statement": "theorem q260_poisson_bernoulli_limit (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam) (t : ℝ) (ht : 0 < t)\n    (N : ℕ → Ω → ℕ)\n    (hlaw : ∀ j n : ℕ, lam ≤ 2 ^ j →\n      (μ {ω | N j ω = n}).toReal\n        = (Nat.choose (⌊t * 2 ^ j⌋₊) n : ℝ)\n          * (lam / 2 ^ j) ^ n * (1 - lam / 2 ^ j) ^ (⌊t * 2 ^ j⌋₊ - n)) :\n    ∀ n : ℕ, Tendsto (fun j => (μ {ω | N j ω = n}).toReal) atTop\n      (𝓝 ((lam * t) ^ n * Real.exp (-(lam * t)) / (n.factorial : ℝ))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 261,
    "problem_name": "stochastic_processes_poisson_increment_pmf",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0. For 0 ≤ t < τ write Ñ(t,τ) = N(τ) − N(t).\n\nShow that Ñ(t,τ) has the Poisson PMF (λ(τ−t))^n e^{−λ(τ−t)} / n!, n ≥ 0, and is independent of the increments of (N) over any interval disjoint from (t,τ].",
    "lean_statement": "theorem q261_poisson_increment_pmf (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (τ : ℝ≥0),\n      {ω | n ≤ N τ ω} = {ω | (∑ i ∈ Finset.range n, S i ω) ≤ (τ : ℝ)}) :\n    (∀ t τ : ℝ≥0, t ≤ τ →\n        HasLaw (fun ω => N τ ω - N t ω) (poissonMeasure (lam * (τ - t))) μ)\n      ∧ (∀ a b c d : ℝ≥0, a ≤ b → b ≤ c → c ≤ d →\n          IndepFun (fun ω => N b ω - N a ω) (fun ω => N d ω - N c ω) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 262,
    "problem_name": "stochastic_processes_nonneg_supermartingale_convergence",
    "informal_statement": "Let (Z_n) be a nonnegative supermartingale.\n\nShow that Z_n converges with probability 1 to a finite limiting random variable as n → ∞.",
    "lean_statement": "theorem q262_nonneg_supermartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ Z n ω) :\n    ∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 263,
    "problem_name": "stochastic_processes_walds_identity",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X whose semi-invariant generating function γ(r) is finite on (r_−, r_+) with r_− < 0 < r_+. For thresholds α > 0 > β let J be the first threshold-crossing trial.\n\nShow that E[exp(r S_J − J γ(r))] = 1 for all r ∈ (r_−, r_+).",
    "lean_statement": "theorem q263_walds_identity (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ]\n    (X S Z : ℕ → Ω → ℝ) (r γ : ℝ)\n    (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (hZ : ∀ n ω, Z n ω = Real.exp (r * S n ω - (n : ℝ) * γ))\n    (hZmart : Martingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J))\n    (Y : Ω → ℝ) (hY : Integrable Y μ) (hdom : ∀ n, ∀ᵐ ω ∂μ, |Z n ω| ≤ Y ω) :\n    ∫ ω, Real.exp (r * S (J ω) ω - (J ω : ℝ) * γ) ∂μ = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 264,
    "problem_name": "stochastic_processes_semi_markov_transition_rate",
    "informal_statement": "Let a semi-Markov process have an irreducible positive-recurrent embedded chain with stationary distribution (π_j) and mean holding times Ū(j), with Σ_k π_k Ū(k) < ∞.\n\nShow that the long-run rate of transitions of the process equals 1 / Σ_k π_k Ū(k) with probability 1.",
    "lean_statement": "theorem q264_semi_markov_transition_rate (μ : Measure Ω) [IsProbabilityMeasure μ]\n    {S : Type*} [Countable S]\n    (π : S → ℝ) (hπ0 : ∀ j, 0 ≤ π j) (hπsum : ∑' j, π j = 1)\n    (Ubar : S → ℝ) (hU : ∀ j, 0 < Ubar j)\n    (τbar : ℝ) (hτ : τbar = ∑' k, π k * Ubar k) (hτpos : 0 < τbar)\n    (N : ℝ → Ω → ℕ) (T : ℕ → Ω → ℝ)\n    (hlink : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | T n ω ≤ t})\n    (hSLLN : ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => T n ω / n) atTop (𝓝 τbar)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t => (N t ω : ℝ) / t) atTop (𝓝 (1 / τbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 265,
    "problem_name": "stochastic_processes_product_form_exponential_martingale",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X whose semi-invariant generating function γ(r) = ln E[e^{rX}] exists near r, and let Z_n = exp(r S_n − n γ(r)).\n\nShow that (Z_n) is a martingale.",
    "lean_statement": "theorem q265_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (r γ : ℝ) (hγ : ∫ ω, Real.exp (r * X 0 ω) ∂μ = Real.exp γ)\n    (hint : ∀ n, Integrable\n      (fun ω => Real.exp (r * (∑ i ∈ Finset.range (n + 1), X i ω) - ((n : ℝ) + 1) * γ)) μ) :\n    Martingale\n      (fun n ω => Real.exp (r * (∑ i ∈ Finset.range (n + 1), X i ω) - ((n : ℝ) + 1) * γ))\n      (Filtration.natural X hmeas) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 266,
    "problem_name": "stochastic_processes_markov_modulated_walk_martingale",
    "informal_statement": "Let (S_n) be a Markov-modulated random walk whose increments depend on an underlying finite-state Markov chain, with the per-state generating functions combined into the matrix [A(r)] having Perron eigenvalue ρ(r), and form the product-form process based on the corresponding right eigenvector.\n\nShow that this product-form process is a martingale.",
    "lean_statement": "theorem q266_markov_modulated_product_martingale\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (k : ℕ) [NeZero k]\n    (A : Matrix (Fin k) (Fin k) ℝ) (ρ : ℝ) (hρ : 0 < ρ)\n    (ν : Fin k → ℝ) (hν : ∀ i, 0 < ν i)\n    (heig : ∀ i, ∑ j, A i j * ν j = ρ * ν i)\n    (r : ℝ) (X : ℕ → Ω → Fin k) (S : ℕ → Ω → ℝ)\n    (hXadapt : StronglyAdapted ℱ X) (hSadapt : StronglyAdapted ℱ S)\n    (hmodelInt : ∀ n j, Integrable (fun ω => Real.exp (r * (S (n + 1) ω - S n ω)) *\n      (if X (n + 1) ω = j then (1 : ℝ) else 0)) μ)\n    (M : ℕ → Ω → ℝ) (hM : ∀ n ω, M n ω = Real.exp (r * S n ω) * ν (X n ω) / ρ ^ n)\n    (hadapt : StronglyAdapted ℱ M) (hint : ∀ n, Integrable (M n) μ)\n    (hmodel : ∀ n j,\n      μ[fun ω => Real.exp (r * (S (n + 1) ω - S n ω)) * (if X (n + 1) ω = j then (1 : ℝ) else 0)\n          | ℱ n]\n        =ᵐ[μ] fun ω => A (X n ω) j) :\n    Martingale M ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 267,
    "problem_name": "stochastic_processes_random_walk_martingale",
    "informal_statement": "Let (X_i) be i.i.d. with E[X_i] = 0, and let Z_n = X_1 + … + X_n.\n\nShow that (Z_n) is a martingale.",
    "lean_statement": "theorem q267_iid_sum_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hint : ∀ i, Integrable (X i) μ) (hmean : ∫ ω, X 0 ω ∂μ = 0) :\n    Martingale (fun n ω => ∑ i ∈ Finset.range (n + 1), X i ω)\n      (Filtration.natural X hmeas) μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 268,
    "problem_name": "stochastic_processes_brownian_avoids_lines",
    "informal_statement": "Let B be a standard Brownian motion and let A_a = {x ∈ C[0,∞) : x(t) = at for all t} be the set of linear paths through the origin.\n\nShow that P(B ∈ A_a) = 0.",
    "lean_statement": "theorem q268_brownian_avoids_lines (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n    (a : ℝ) :\n    μ {ω | ∀ t : ℝ, 0 ≤ t → B t ω = a * t} = 0 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 269,
    "problem_name": "stochastic_processes_slln_via_martingale",
    "informal_statement": "Let (X_i) be i.i.d. with mean X̄ and finite variance, and let S_n = X_1 + … + X_n.\n\nShow, using the Kolmogorov submartingale inequality and the martingale convergence theorem, that S_n/n → X̄ with probability 1.",
    "lean_statement": "theorem q269_slln_via_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hL2 : MemLp (X 0) 2 μ)\n    (xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n => S n ω / (n : ℝ)) atTop (𝓝 xbar) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 270,
    "problem_name": "stochastic_processes_mdp_aggregate_reward_asymptotic",
    "informal_statement": "Let (X_n) be an ergodic finite-state Markov chain with reward vector r, gain g = π r, and relative-gain vector w.\n\nShow that the expected aggregate reward over n transitions satisfies v(n) = n g e + w + o(1) as n → ∞.",
    "lean_statement": "theorem q270_aggregate_reward_asymptotic {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (π r w : Ω → ℝ) (hπ : IsStationary P π) (g : ℝ) (hg : g = ∑ i, π i * r i)\n    (hw : ∀ i, w i + g = r i + ∑ j, P i j * w j)\n    (hwnorm : ∑ i, π i * w i = 0)\n    (v : ℕ → Ω → ℝ) (hv : ∀ n i, v n i = ∑ m ∈ Finset.range n, ∑ j, (P ^ m) i j * r j) :\n    ∀ i, Tendsto (fun n : ℕ => v n i - ((n : ℝ) * g + w i)) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 271,
    "problem_name": "stochastic_processes_submartingale_inequality_2",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be a non-negative submartingale.\n        Let X_n^* = max_{0 ≤ k ≤ n} X_k. \n\n        Show that ||X_n^*||_p ≤ [p/(p-1)]||X_n||_p for all p > 1.",
    "lean_statement": "theorem q271_doob_lp (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω)\n    (p : ℝ) (hp : 1 < p) (n : ℕ) :\n    eLpNorm (runningMax X n) (ENNReal.ofReal p) μ\n      ≤ ENNReal.ofReal (p / (p - 1)) * eLpNorm (X n) (ENNReal.ofReal p) μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 272,
    "problem_name": "stochastic_processes_poisson_process_2",
    "informal_statement": "Customers enter a supermarket as a Poisson process with intensity 2.\n        There are two salesmen near the door who offer passing customers samples of a new product.\n        Each customer takes an exponential time of parameter 1 to think about the new product,\n        and during this time occupies the full attention of one salesman.\n        Having tried the product, customers proceed into the store and leave by another door.\n        When both salesmen are occupied, customers walk straight in.\n        \n        Assuming that both salesmen are free at time 0,\n        show that the probability that both are busy at a later time t is (4/15)e^{-5t}-(2/3)e^{-2t}+(2/5).",
    "lean_statement": "theorem q272_poisson_process_both_busy\n    (p0 p1 p2 : ℝ → ℝ)\n    (hd0 : Differentiable ℝ p0) (hd1 : Differentiable ℝ p1) (hd2 : Differentiable ℝ p2)\n    (he0 : ∀ t, deriv p0 t = -2 * p0 t + p1 t)\n    (he1 : ∀ t, deriv p1 t = 2 * p0 t - 3 * p1 t + 2 * p2 t)\n    (he2 : ∀ t, deriv p2 t = 2 * p1 t - 2 * p2 t)\n    (hi0 : p0 0 = 1) (hi1 : p1 0 = 0) (hi2 : p2 0 = 0)\n    (t : ℝ) (ht : 0 ≤ t) :\n    p2 t = (4 / 15) * Real.exp (-5 * t) - (2 / 3) * Real.exp (-2 * t) + 2 / 5 := by sorry",
    "true_to_source": "literal",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 273,
    "problem_name": "stochastic_processes_ctmc_two_state_transition",
    "informal_statement": "Consider a two-state continuous-time Markov chain with transition rate λ from state 0 to state 1 and rate μ from state 1 to state 0.\n\nShow that P_{01}(t) = (λ/(λ+μ)) (1 − e^{−(λ+μ)t}).",
    "lean_statement": "theorem q273_ctmc_two_state_transition\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (P01 : ℝ → ℝ) (hP0 : P01 0 = 0)\n    (hODE : ∀ t : ℝ, HasDerivAt P01 (lam - (lam + mu) * P01 t) t) :\n    ∀ t : ℝ, P01 t = (lam / (lam + mu)) * (1 - Real.exp (-(lam + mu) * t)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 274,
    "problem_name": "stochastic_processes_mginf_poisson_in_service",
    "informal_statement": "Customers arrive as a Poisson process of rate λ to an infinite-server queue; the service time of each customer is i.i.d. with distribution G. Let X(τ) be the number in service at time τ, starting empty.\n\nShow that X(τ) is Poisson with mean m(τ) = λ ∫_0^τ [1 − G(t)] dt.",
    "lean_statement": "theorem q274_mginf_poisson_in_service (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (Sarr : ℕ → Ω → ℝ) (hSindep : iIndepFun Sarr μ)\n    (hSexp : ∀ i, HasLaw (Sarr i) (expMeasure (lam : ℝ)) μ)\n    (Nc : ℝ → Ω → ℕ)\n    (hNc : ∀ (n : ℕ) (τ : ℝ), 0 ≤ τ →\n      {ω | n ≤ Nc τ ω} = {ω | (∑ i ∈ Finset.range n, Sarr i ω) ≤ τ})\n    (V : ℕ → Ω → ℝ) (hVmeas : ∀ i, Measurable (V i)) (hVindep : iIndepFun V μ)\n    (G : ℝ → ℝ) (hVcdf : ∀ i s, (μ {ω | V i ω ≤ s}).toReal = G s)\n    (hVpos : ∀ i, ∀ᵐ ω ∂μ, 0 ≤ V i ω)\n    (hVSindep : IndepFun (fun ω => (fun i => V i ω)) (fun ω => (fun i => Sarr i ω)) μ)\n    (X : ℝ → Ω → ℕ)\n    (hXdef : ∀ τ ω, X τ ω =\n      ((Finset.range (Nc τ ω)).filter\n        (fun k => τ < (∑ i ∈ Finset.range (k + 1), Sarr i ω) + V k ω)).card) :\n    ∀ τ : ℝ, 0 ≤ τ →\n      HasLaw (X τ)\n        (poissonMeasure (Real.toNNReal ((lam : ℝ) * ∫ s in (0 : ℝ)..τ, (1 - G s)))) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 275,
    "problem_name": "stochastic_processes_age_limiting_distribution",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ and non-arithmetic interrenewal distribution, and let Z(t) be the age at time t.\n\nShow that lim_{t→∞} Pr[Z(t) ≤ z] = (1/X̄) ∫_0^z Pr[X > τ] dτ.",
    "lean_statement": "theorem q275_age_limiting_distribution (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Z : ℝ → Ω → ℝ)\n    (hZ : ∀ t ω, Z t ω = t - (∑ i ∈ Finset.range (N t ω), X i ω)) :\n    ∀ z : ℝ, 0 ≤ z →\n      Tendsto (fun t => (μ {ω | Z t ω ≤ z}).toReal)\n        atTop (𝓝 ((1 / xbar) * ∫ τ in Set.Ioc (0 : ℝ) z, (μ {ω | τ < X 0 ω}).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 276,
    "problem_name": "stochastic_processes_reflected_brownian_steady_state",
    "informal_statement": "Let Z(t) be a one-dimensional reflected Brownian motion RBM(θ,σ^2), i.e. Z = Φ(B) where B is a Brownian motion with drift θ and variance parameter σ^2.\n\nShow that Z(t) converges in distribution as t → ∞ if and only if θ < 0, and that in that case the limit Z(∞) is exponentially distributed with parameter −2θ/σ^2.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 480 (l22.thm2): the steady state of a one-dimensional reflected Brownian motion `RBM(θ, σ²)`. Here\n`Z = Φ(B_θ)` where `B_θ(t) = θ·t + σ·W(t)` is Brownian motion with drift `θ` and variance parameter\n`σ²` (`W` a standard Brownian motion) and `Φ` is the Skorokhod reflection map,\n`Z(t) = B_θ(t) + sup_{0≤s≤t} (−B_θ(s))⁺`. Then `Z(t)` converges in distribution as `t → ∞` iff `θ < 0`,\nand in that case the limit `Z(∞)` is exponential with parameter `−2θ/σ²`.\nFaithful abstraction (Mathlib has no Brownian-motion / RBM object): convergence in distribution is\nexpressed via the CDF. The stable case `θ < 0` gives, for every `y ≥ 0`,\n`Pr[Z(t) ≤ y] → 1 − exp(2θy/σ²)` (the CDF of an exponential with rate `−2θ/σ²`); the unstable case\n`θ ≥ 0` gives `Pr[Z(t) ≤ y] → 0` for every `y` (all mass escapes to `+∞`, so no proper limit law) — the\ntwo directions together encode the \"iff\". -/\ntheorem q276_reflected_brownian_steady_state (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (W : ℝ → Ω → ℝ) (hW : IsBM μ 1 W)\n    (θ σ : ℝ) (hσ : 0 < σ)\n    (Bθ : ℝ → Ω → ℝ) (hBθ : ∀ t ω, Bθ t ω = θ * t + σ * W t ω)\n    (Z : ℝ → Ω → ℝ)\n    (hZ : ∀ t ω, Z t ω = Bθ t ω + ⨆ s ∈ Set.Icc (0 : ℝ) t, max (- Bθ s ω) 0) :\n    (θ < 0 → ∀ y : ℝ, 0 ≤ y →\n      Tendsto (fun t : ℝ => (μ {ω | Z t ω ≤ y}).toReal)\n        atTop (𝓝 (1 - Real.exp (2 * θ * y / σ ^ 2)))) ∧\n    (0 ≤ θ → ∀ y : ℝ,\n      Tendsto (fun t : ℝ => (μ {ω | Z t ω ≤ y}).toReal) atTop (𝓝 0)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 277,
    "problem_name": "stochastic_processes_optional_stopping_bounded_time",
    "informal_statement": "Let (X_n) be a supermartingale and let τ be a stopping time with τ ≤ M almost surely for some constant M.\n\nShow that E[X_τ] ≤ E[X_0].",
    "lean_statement": "theorem q277_optional_stopping_bounded_time (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)\n    (hX : Supermartingale X ℱ μ) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T))\n    (N : ℕ) (hTbdd : ∀ ω, T ω ≤ N) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 278,
    "problem_name": "stochastic_processes_martingale_3",
    "informal_statement": "Let (ξ_i)_{i ≥ 1} be i.i.d with 𝔼[ξ1] = 1.\n\n        Show that X_n = product_1^n ξ_i is a martingale.",
    "lean_statement": "theorem q278_martingale_product (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (ξ : ℕ → Ω → ℝ)\n    (hint : ∀ n, Integrable (fun ω => ∏ i ∈ Finset.range n, ξ i ω) μ)\n    (hmeas : ∀ n, StronglyMeasurable[ℱ (n + 1)] (ξ n))\n    (hmean : ∀ n, μ[ξ n | ℱ n] =ᵐ[μ] 1) :\n    Martingale (fun n ω => ∏ i ∈ Finset.range n, ξ i ω) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 279,
    "problem_name": "stochastic_processes_exact_two_threshold_simple_walk",
    "informal_statement": "Let (S_n) be a simple random walk with Pr[+1] = p, Pr[−1] = q = 1−p, p ≠ 1/2, stopped on first crossing of α > 0 or β < 0 at trial J, and let r* = ln(q/p).\n\nShow that Pr[S_J ≥ α] = e^{−r* α}(1 − e^{r* β}) / (1 − e^{−r*(α−β)}) when the walk cannot overshoot.",
    "lean_statement": "theorem q279_exact_two_threshold_simple_walk (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (p q : ℝ) (hp0 : 0 < p) (hq0 : 0 < q) (hpq : p + q = 1) (hne : p ≠ 1 / 2)\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hstep : ∀ i, μ {ω | X i ω = 1} = ENNReal.ofReal p ∧ μ {ω | X i ω = -1} = ENNReal.ofReal q)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α β : ℤ) (hα : 0 < α) (hβ : β < 0)\n    (J : Ω → ℕ)\n    (hJcross : ∀ ω, S (J ω) ω = (α : ℝ) ∨ S (J ω) ω = (β : ℝ))\n    (hJfirst : ∀ ω, ∀ n, n < J ω → (β : ℝ) < S n ω ∧ S n ω < (α : ℝ))\n    (rstar : ℝ) (hrstar : rstar = Real.log (q / p)) :\n    (μ {ω | (α : ℝ) ≤ S (J ω) ω}).toReal\n      = Real.exp (-rstar * (α : ℝ)) * (1 - Real.exp (rstar * (β : ℝ)))\n        / (1 - Real.exp (-rstar * ((α : ℝ) - (β : ℝ)))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 280,
    "problem_name": "stochastic_processes_brownian_finite_dimensional_density",
    "informal_statement": "Let B be a standard Brownian motion and let 0 = t_0 < t_1 < … < t_k.\n\nShow that the joint density of (B(t_1),…,B(t_k)) is ∏_{i} (2π(t_{i+1}−t_i))^{-1/2} exp(−(x_{i+1}−x_i)^2 / (2(t_{i+1}−t_i))).",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 379 (l6): the finite-dimensional joint density of Brownian motion. Fix `0 = t₀ < t₁ < ⋯ < t_k`\n(here `t : Fin (k+1) → ℝ` with `t 0 = 0` and strictly increasing). The joint law of the vector\n`(B(t₁), …, B(t_k))` — the pushforward of `μ` under `ω ↦ (B(t_{i+1}) ω)_{i}` — has, w.r.t. Lebesgue\nmeasure on `Fin k → ℝ`, the density\n`∏_i (2π(t_{i+1} − t_i))^{-1/2} exp(−(x_{i+1} − x_i)² / (2(t_{i+1} − t_i)))`,\nwhere `x` is padded with `x₀ = 0` (via `Fin.cons 0`), reflecting `B(t₀) = B(0) = 0`. -/\ntheorem q280_brownian_joint_density (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B)\n    (k : ℕ) (t : Fin (k + 1) → ℝ) (ht0 : t 0 = 0) (htmono : StrictMono t) :\n    μ.map (fun ω => fun i : Fin k => B (t i.succ) ω)\n      = volume.withDensity (fun x : Fin k → ℝ =>\n          ENNReal.ofReal (∏ i : Fin k,\n            (2 * Real.pi * (t i.succ - t i.castSucc)) ^ (-(1 : ℝ) / 2)\n              * Real.exp (-((Fin.cons (0 : ℝ) x : Fin (k + 1) → ℝ) i.succ\n                    - (Fin.cons (0 : ℝ) x : Fin (k + 1) → ℝ) i.castSucc) ^ 2\n                  / (2 * (t i.succ - t i.castSucc))))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 281,
    "problem_name": "stochastic_processes_renewal_count_strictly_less",
    "informal_statement": "Let (N(t)) be a renewal process with arrival epochs S_n.\n\nShow that {N(t) ≥ n} = {S_n ≤ t}, so that N(t) = max{n : S_n ≤ t}.",
    "lean_statement": "theorem q281_renewal_count_strictly_less (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ)\n    (hgreatest : ∀ (t : ℝ) (ω : Ω), 0 ≤ t → IsGreatest {n : ℕ | S n ω ≤ t} (N t ω)) :\n    ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t} := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 282,
    "problem_name": "stochastic_processes_portmanteau_theorem",
    "informal_statement": "Let P and P_n be probability measures on a metric space (S,B).\n\nShow that the following are equivalent: (1) E_{P_n}[X] → E_P[X] for every bounded continuous X; (2) limsup_n P_n(F) ≤ P(F) for every closed F; (3) liminf_n P_n(U) ≥ P(U) for every open U; (4) P_n(A) → P(A) for every A with P(∂A) = 0.",
    "lean_statement": "theorem q282_portmanteau_theorem {S : Type*} [MeasurableSpace S] [MetricSpace S] [BorelSpace S]\n    (P : Measure S) [IsProbabilityMeasure P]\n    (Ps : ℕ → Measure S) (hPs : ∀ n, IsProbabilityMeasure (Ps n)) :\n    List.TFAE\n      [ ∀ f : BoundedContinuousFunction S ℝ,\n          Tendsto (fun n => ∫ x, f x ∂(Ps n)) atTop (𝓝 (∫ x, f x ∂P)),\n        ∀ F : Set S, IsClosed F → limsup (fun n => (Ps n) F) atTop ≤ P F,\n        ∀ U : Set S, IsOpen U → P U ≤ liminf (fun n => (Ps n) U) atTop,\n        ∀ A : Set S, MeasurableSet A → P (frontier A) = 0 →\n          Tendsto (fun n => (Ps n) A) atTop (𝓝 (P A)) ] := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 283,
    "problem_name": "stochastic_processes_gamblers_ruin_3",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be Gambler’s ruin with state space Ω = {0, 1, 2, ..., N}:\n        X_0 = k, ℙ[X_{n + 1} = X_n + 1 | X_n] = 1/2, τ = min{n: X_n = 0 or N}.\n\n        Show that 𝔼[τ] = k(N - k).",
    "lean_statement": "theorem q283_gambler_expected_time (N : ℕ) (hN : 0 < N) (e : ℕ → ℝ)\n    (hb0 : e 0 = 0) (hbN : e N = 0)\n    (hrec : ∀ k, 0 < k → k < N → e k = 1 + (e (k - 1) + e (k + 1)) / 2)\n    (k : ℕ) (hk : k ≤ N) :\n    e k = (k : ℝ) * ((N : ℝ) - (k : ℝ)) := by sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 284,
    "problem_name": "stochastic_processes_negative_drift_threshold_bound",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X having X̄ < 0, with X taking both signs, and let r* > 0 be the positive root of γ(r) = ln E[e^{rX}] = 0.\n\nShow that for every α > 0, Pr[∪_n {S_n ≥ α}] ≤ exp(−r* α).",
    "lean_statement": "theorem q284_negative_drift_threshold (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hid : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : xbar = ∫ ω, X 0 ω ∂μ) (hdrift : xbar < 0)\n    (hpos : 0 < (μ {ω | 0 < X 0 ω}).toReal) (hneg : 0 < (μ {ω | X 0 ω < 0}).toReal)\n    (γ : ℝ → ℝ) (hγ : ∀ s, Real.exp (γ s) = ∫ ω, Real.exp (s * X 0 ω) ∂μ)\n    (rstar : ℝ) (hrstar : 0 < rstar) (hroot : γ rstar = 0) :\n    ∀ α : ℝ, 0 < α →\n      (μ {ω | ∃ n, α ≤ ∑ i ∈ Finset.range n, X i ω}).toReal ≤ Real.exp (-(rstar * α)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 285,
    "problem_name": "stochastic_processes_renewal_borel_cantelli_lemma",
    "informal_statement": "Let (Y_n) be a sequence of random variables with Σ_{n≥1} E[|Y_n|] < ∞.\n\nShow that Pr[lim_{n→∞} Y_n = 0] = 1.",
    "lean_statement": "theorem q285_borel_cantelli (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (Y : ℕ → Ω → ℝ) (hY : ∀ n, AEMeasurable (Y n) μ)\n    (hYint : ∀ n, Integrable (Y n) μ)\n    (hsum : Summable (fun n => ∫ ω, |Y n ω| ∂μ)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n => Y n ω) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 286,
    "problem_name": "stochastic_processes_spectral_expansion_powers",
    "informal_statement": "Let [P] be a diagonalizable transition matrix of a finite-state Markov chain with eigenvalues λ_i, right eigenvectors ν^{(i)} and left eigenvectors π^{(i)}.\n\nShow that [P]^n = Σ_i λ_i^n ν^{(i)} π^{(i)}.",
    "lean_statement": "theorem q286_spectral_expansion {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (lam : Ω → ℝ) (ν π : Ω → Ω → ℝ)\n    (hright : ∀ i b, ∑ a, P b a * ν i a = lam i * ν i b)\n    (hleft : ∀ i b, ∑ a, π i a * P a b = lam i * π i b)\n    (hbiorth : ∀ i j, ∑ a, π i a * ν j a = if i = j then 1 else 0)\n    (hcomplete : ∀ a b, ∑ i, ν i a * π i b = if a = b then 1 else 0) :\n    ∀ (n : ℕ) (a b : Ω), (P ^ n) a b = ∑ i, (lam i) ^ n * ν i a * π i b := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 287,
    "problem_name": "stochastic_processes_periodic_unit_eigenvalues",
    "informal_statement": "Let [P] be the transition matrix of a finite-state irreducible Markov chain of period d.\n\nShow that [P] has exactly d eigenvalues of modulus 1, namely the d complex dth roots of unity.",
    "lean_statement": "theorem q287_periodic_unit_eigenvalues {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (d : ℕ) (hd : 0 < d)\n    (hper : ∀ e : ℕ, (∀ (x : Ω) (n : ℕ), 0 < (P ^ n) x x → e ∣ n) ↔ e ∣ d) :\n    (∀ z : ℂ, z ∈ (P.charpoly.map (algebraMap ℝ ℂ)).roots → ‖z‖ ≤ 1) ∧\n    (∀ z : ℂ, ‖z‖ = 1 →\n      (z ∈ (P.charpoly.map (algebraMap ℝ ℂ)).roots ↔ z ^ d = 1)) ∧\n    (∀ z : ℂ, z ^ d = 1 → (P.charpoly.map (algebraMap ℝ ℂ)).roots.count z = 1) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 288,
    "problem_name": "stochastic_processes_continous_markov_holding_time",
    "informal_statement": "Let S_x be the measurable, almost surely finite holding time at a nonabsorbing state of a time-homogeneous continuous-time Markov chain. Its survival function is memoryless and P(S_x>0)>0.\n\nShow that S_x has an exponential distribution with a strictly positive rate.",
    "lean_statement": "theorem q288_ctmc_holding_time (μ : Measure Ω) [IsProbabilityMeasure μ] (Sx : Ω → ℝ) (hSmeas : Measurable Sx)\n    (hpos : ∀ ω, 0 ≤ Sx ω) (hnt : 0 < (μ {ω | 0 < Sx ω}).toReal)\n    (hmem : ∀ s t, 0 ≤ s → 0 ≤ t →\n      (μ {ω | s + t < Sx ω}).toReal = (μ {ω | s < Sx ω}).toReal * (μ {ω | t < Sx ω}).toReal) :\n    ∃ rate : ℝ, 0 < rate ∧ HasLaw Sx (expMeasure rate) μ := by sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 289,
    "problem_name": "stochastic_processes_simple_approximation_continuous",
    "informal_statement": "Let X ∈ L^2 be a bounded adapted process with continuous paths.\n\nShow that there exist simple adapted processes X^n with lim_n E[∫_0^T (X^n_t − X_t)^2 dt] = 0.",
    "lean_statement": "/-- A *simple adapted process* on `[0,T]`: there is a finite partition `0 = τ₀ ≤ τ₁ ≤ … ≤ τ_N = T`\nand `F_{τ_k}`-measurable random variables `ξ_k` with `Y_u(ω) = Σ_k ξ_k(ω) · 1_{(τ_k, τ_{k+1}]}(u)`. -/\ndef IsSimpleAdapted (ℱ : Filtration ℝ m0) (T : ℝ) (Y : ℝ → Ω → ℝ) : Prop :=\n  ∃ (N : ℕ) (τ : ℕ → ℝ) (ξ : ℕ → Ω → ℝ),\n    τ 0 = 0 ∧ Monotone τ ∧ τ N = T ∧\n    (∀ k, StronglyMeasurable[ℱ (τ k)] (ξ k)) ∧\n    ∀ (u : ℝ) (ω : Ω), Y u ω =\n      ∑ k ∈ Finset.range N, (Set.Ioc (τ k) (τ (k + 1))).indicator (fun _ => ξ k ω) u\n\n/-- 446 (l15.prop1): a bounded adapted `L²` process with continuous paths can be approximated in\n`L²(dt × dP)` by simple adapted processes: there exist simple adapted `Xⁿ` with\n`lim_n E[∫₀ᵀ (Xⁿ_t − X_t)² dt] = 0`.\nFaithful abstraction (this Mathlib has no stochastic-integral `L²` space): `X` is adapted (`hadap`),\nbounded (`hbdd`), has a.s. continuous paths (`hcont`) and lies in `L²` (`hL2`); \"simple adapted\" is\nencoded by `IsSimpleAdapted`, and the `L²(dt × dP)` convergence is the stated `Tendsto`. -/\ntheorem q289_simple_approximation_continuous\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (T : ℝ) (hT : 0 ≤ T)\n    (X : ℝ → Ω → ℝ) (hadap : Adapted ℱ X)\n    (hbdd : ∃ C : ℝ, ∀ t ω, |X t ω| ≤ C)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => X t ω)\n    (hL2 : ∀ t, MemLp (X t) 2 μ) :\n    ∃ Xn : ℕ → ℝ → Ω → ℝ,\n      (∀ n, IsSimpleAdapted ℱ T (Xn n)) ∧\n      Tendsto (fun n => ∫ ω, (∫ t in (0:ℝ)..T, (Xn n t ω - X t ω) ^ 2) ∂μ)\n        atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 290,
    "problem_name": "stochastic_processes_time_average_age",
    "informal_statement": "Let (N(t)) be a renewal process with i.i.d. interrenewal times X having finite E[X] and E[X^2], and let Z(τ) be the age (time since the last renewal) at time τ.\n\nShow that lim_{t→∞} (1/t) ∫_0^t Z(τ) dτ = E[X^2]/(2 E[X]) with probability 1.",
    "lean_statement": "theorem q290_time_average_age (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (m1 m2 : ℝ) (hm1 : ∫ ω, X 0 ω ∂μ = m1) (hm2 : ∫ ω, (X 0 ω) ^ 2 ∂μ = m2) (hpm : 0 < m1)\n    (hint2 : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (Z : ℝ → Ω → ℝ) (hZ : ∀ (t : ℝ) (ω : Ω), Z t ω = t - S (N t ω) ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, Z τ ω)\n      atTop (𝓝 (m2 / (2 * m1))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 291,
    "problem_name": "stochastic_processes_martingale_4",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be a martingale in L^2.\n\n        Show that its increments (X_{n + 1} − X_n)_{n ≥ 0} are pairwise orthogonal,\n        i.e. for all n ≠ m, we have 𝔼[(X_{n + 1} − X_n)(X_{m + 1} − X_m)] = 0.",
    "lean_statement": "theorem q291_l2_orthogonal (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (hL2 : ∀ n, MemLp (X n) 2 μ) (n m : ℕ) (hnm : n ≠ m) :\n    ∫ ω, (X (n + 1) ω - X n ω) * (X (m + 1) ω - X m ω) ∂μ = 0 := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 292,
    "problem_name": "stochastic_processes_ergodic",
    "informal_statement": "Let f be a real-valued function defined on Ω.\n        Let (X_n)_n be an irreducible Markov chain with stationary distribution π.\n        \n        Show that for any starting distribution µ, we have lim_{n → ∞} (1/n) sum_{j=0}^n f(X_j) = πf, ℙ_µ - almost surely.",
    "lean_statement": "theorem q292_ergodic {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]\n    {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) (X : ℕ → Ω' → Ω) (f : Ω → ℝ)\n    (ν : Ω → ℝ) (hνnn : ∀ x, 0 ≤ ν x) (hνsum : ∑ x, ν x = 1)\n    (hchain : HasChainLaw μ X ν (fun i j => P i j)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (1 / (n : ℝ)) * ∑ j ∈ Finset.range n, f (X j ω))\n      atTop (𝓝 (∑ x, π x * f x)) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 293,
    "problem_name": "stochastic_processes_functional_strong_law",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with E[X_1] = 0 and E|X_1| < ∞, and let N_n(t) = S_{⌊nt⌋}/n + (nt − ⌊nt⌋) X_{⌊nt⌋+1}/n be the piecewise-linear scaled partial-sum process.\n\nShow that for every T, P(‖N_n‖_T → 0) = 1, i.e. the scaled process converges to zero uniformly on compacts almost surely, without any finite-variance assumption.",
    "lean_statement": "theorem q293_functional_strong_law (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)\n    (hint : Integrable (ξ 0) μ) (hmean : ∫ ω, ξ 0 ω ∂μ = 0)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, ξ i ω)\n    (T : ℝ) (hT : 0 < T) :\n    ∀ᵐ ω ∂μ, TendstoUniformlyOn\n      (fun n t => S ⌊(n : ℝ) * t⌋₊ ω / (n : ℝ)\n        + ((n : ℝ) * t - (⌊(n : ℝ) * t⌋₊ : ℝ)) * ξ ⌊(n : ℝ) * t⌋₊ ω / (n : ℝ))\n      (fun _ => 0) atTop (Set.Icc (0:ℝ) T) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 294,
    "problem_name": "stochastic_processes_jackson_marginal_independence",
    "informal_statement": "Consider an open Jackson network in steady state with ρ_j = λ_j/μ_j < 1 for every queue j.\n\nShow that the numbers of customers at the k queues are mutually independent in steady state, each geometrically distributed with parameter ρ_j.",
    "lean_statement": "theorem q294_jackson_marginal_independence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (k : ℕ) (ρ : Fin k → ℝ) (hρ0 : ∀ j, 0 < ρ j) (hρ1 : ∀ j, ρ j < 1)\n    (M : Ω → Fin k → ℕ) (hM : Measurable M)\n    (hlaw : ∀ m : Fin k → ℕ, (μ {ω | M ω = m}).toReal = ∏ j, (1 - ρ j) * ρ j ^ (m j)) :\n    iIndepFun (fun (j : Fin k) ω => M ω j) μ ∧\n      (∀ j n, (μ {ω | M ω j = n}).toReal = (1 - ρ j) * ρ j ^ n) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 295,
    "problem_name": "stochastic_processes_mdp_aggregate_reward_recursion",
    "informal_statement": "Let (X_n) be a finite-state Markov chain with transition matrix [P] and a reward r_i earned on each visit to state i. Let v_i(n) be the expected aggregate reward over n transitions starting in state i.\n\nShow that the vector v(n) satisfies the recursion v(n) = r + [P] v(n−1) with v(0) = 0.",
    "lean_statement": "theorem q295_aggregate_reward_recursion {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (r : Ω → ℝ)\n    (v : ℕ → Ω → ℝ)\n    (hv : ∀ n i, v n i = ∑ m ∈ Finset.range n, ∑ j, (P ^ m) i j * r j) :\n    (∀ i, v 0 i = 0) ∧ (∀ n i, v (n + 1) i = r i + ∑ j, P i j * v n j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 296,
    "problem_name": "stochastic_processes_martingale_stopped_expectation_counterexample",
    "informal_statement": "Let (S_n) be a zero-mean simple random walk and let J be the first trial at which S_n = 1.\n\nShow that J is finite with probability 1 but E[S_J] = 1 ≠ E[S_0] = 0, so the optional-stopping conclusion fails when E[J] = ∞.",
    "lean_statement": "theorem q296_simple_walk_optional_stopping_fails (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hp1 : μ {ω | X 0 ω = 1} = 2⁻¹) (hm1 : μ {ω | X 0 ω = -1} = 2⁻¹)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (J : Ω → ℕ)\n    (hJhit : ∀ ω, (∃ n, S n ω = 1) → S (J ω) ω = 1)\n    (hJmin : ∀ ω n, S n ω = 1 → J ω ≤ n) :\n    (∀ᵐ ω ∂μ, ∃ n, S n ω = 1)\n      ∧ (∫ ω, S (J ω) ω ∂μ = 1)\n      ∧ (∫ ω, S 0 ω ∂μ = 0)\n      ∧ (∫ ω, S (J ω) ω ∂μ ≠ ∫ ω, S 0 ω ∂μ)\n      ∧ ¬ Integrable (fun ω => (J ω : ℝ)) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 297,
    "problem_name": "stochastic_processes_rate_function_normal",
    "informal_statement": "Let X be a standard normal random variable and let I(a)=sup_θ(θa − log M(θ)).\n\nShow that I(a) = a^2/2.",
    "lean_statement": "theorem q297_rate_function_normal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (hlaw : HasLaw X (gaussianReal 0 1) μ) (a : ℝ) :\n    sSup ((fun θ : ℝ => θ * a - cgf X μ θ) ''\n        {θ : ℝ | Integrable (fun ω => Real.exp (θ * X ω)) μ})\n      = a ^ 2 / 2 := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 298,
    "problem_name": "stochastic_processes_two_threshold_zero_mean_solve",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X taking values in {−1,0,1} with mean 0, and for thresholds a > 0 > b let J be the first n with S_n ≥ a or S_n ≤ b.\n\nShow, using Wald's equality, that Pr[S_J ≥ a] = −b/(a − b) when the walk cannot overshoot the thresholds.",
    "lean_statement": "theorem q298_two_threshold_zero_mean_solve (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hstepval : ∀ i ω, X i ω = -1 ∨ X i ω = 0 ∨ X i ω = 1)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ) (hmean : ∫ ω, X 0 ω ∂μ = 0)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (a b : ℤ) (ha : 0 < a) (hb : b < 0)\n    (J : Ω → ℕ) (hJint : Integrable (fun ω => (J ω : ℝ)) μ)\n    (hJcross : ∀ ω, S (J ω) ω = (a : ℝ) ∨ S (J ω) ω = (b : ℝ))\n    (hJfirst : ∀ ω n, n < J ω → (b : ℝ) < S n ω ∧ S n ω < (a : ℝ))\n    (hstop : ∀ i : ℕ, IndepFun (fun ω => if i < J ω then (1 : ℝ) else 0) (X i) μ) :\n    (μ {ω | (a : ℝ) ≤ S (J ω) ω}).toReal = -(b : ℝ) / ((a : ℝ) - (b : ℝ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 299,
    "problem_name": "stochastic_processes_poisson_process_superposition_1",
    "informal_statement": "Let (N^i)_{i ≥ 1} be a family of independent Poisson processes with respective\n        positive intensities (λ_i)_{i ≥ 1}. Let sum_{i ≥ 1} λ_i = λ < ∞.\n\n        Show that N_t = sum_{i ≥ 1} N_t^i defines the counting process of a\n        Poisson process with intensity λ.",
    "lean_statement": "theorem q299_poisson_superposition (μ : Measure Ω) [IsProbabilityMeasure μ] (K : ℕ → Ω → ℕ)\n    (lam : ℕ → ℝ≥0) (hsum : Summable lam) (hindep : iIndepFun K μ)\n    (hpois : ∀ i, HasLaw (K i) (poissonMeasure (lam i)) μ) :\n    HasLaw (fun ω => ∑' i, K i ω) (poissonMeasure (∑' i, lam i)) μ := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 300,
    "problem_name": "stochastic_processes_walds_equality_renewal_count",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄.\n\nShow that E[S_{N(t)+1}] = X̄ (E[N(t)] + 1), an instance of Wald's equality with stopping trial J = N(t) + 1.",
    "lean_statement": "theorem q300_wald_renewal_count (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (t : ℝ) (ht : 0 ≤ t)\n    (hNint : Integrable (fun ω => (N t ω : ℝ)) μ)\n    (hstop : ∀ i, IndepFun (fun ω => if i < N t ω + 1 then (1 : ℝ) else 0) (X i) μ) :\n    ∫ ω, (∑ i ∈ Finset.range (N t ω + 1), X i ω) ∂μ\n      = xbar * (∫ ω, (N t ω : ℝ) ∂μ + 1) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 301,
    "problem_name": "stochastic_processes_supermartingale_stopping_time_2",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a supermartingale, and let T be a stopping time.\n\n        Show that X^T is also a supermartingale.",
    "lean_statement": "theorem q301_stopped_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) :\n    Supermartingale (stoppedProcess X (natStop T)) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 302,
    "problem_name": "stochastic_processes_kolmogorov_inequality_generalized",
    "informal_statement": "Let (Z_n) be a nonnegative submartingale and let a > 0.\n\nShow that a Pr[max_{1 ≤ i ≤ m} Z_i ≥ a] ≤ E[Z_m 1{max_{1 ≤ i ≤ m} Z_i ≥ a}], and deduce the Kolmogorov submartingale inequality from it.",
    "lean_statement": "theorem q302_kolmogorov_inequality_generalized (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ Z n ω) (a : ℝ) (ha : 0 < a) (m : ℕ) (hm : 1 ≤ m) :\n    a * (μ {ω | a ≤ runningMax Z m ω}).toReal\n      ≤ ∫ ω in {ω | a ≤ runningMax Z m ω}, Z m ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 303,
    "problem_name": "stochastic_processes_zero_mean_walk_second_moment",
    "informal_statement": "Let (S_n) be a random walk with zero-mean i.i.d. steps of variance σ_X^2, and let J be a threshold-crossing stopping trial with E[J] < ∞.\n\nShow that E[S_J^2] = σ_X^2 E[J].",
    "lean_statement": "theorem q303_zero_mean_walk_second_moment (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hL2 : MemLp (X 0) 2 μ) (hmean : ∫ ω, X 0 ω ∂μ = 0)\n    (σ2 : ℝ) (hvar : variance (X 0) μ = σ2)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (ℱ : Filtration ℕ m0) (hadap : Adapted ℱ S)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J))\n    (hJint : Integrable (fun ω => (J ω : ℝ)) μ)\n    (hmart2 : Martingale (fun n ω => (S n ω) ^ 2 - σ2 * (n : ℝ)) ℱ μ) :\n    ∫ ω, (S (J ω) ω) ^ 2 ∂μ = σ2 * ∫ ω, (J ω : ℝ) ∂μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 304,
    "problem_name": "stochastic_processes_poisson_superposition_1",
    "informal_statement": "If X and Y are independent Poisson random variables with means a and b (the arrival counts of two independent Poisson processes), then X + Y is Poisson with mean a + b.",
    "lean_statement": "theorem q304_poisson_superposition (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (a b : ℝ≥0) (X Y : Ω → ℕ)\n    (hX : HasLaw X (poissonMeasure a) μ) (hY : HasLaw Y (poissonMeasure b) μ)\n    (hindep : IndepFun X Y μ) :\n    HasLaw (fun ω => X ω + Y ω) (poissonMeasure (a + b)) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 305,
    "problem_name": "stochastic_processes_martingale_transform_supermartingale",
    "informal_statement": "Let (X_n) be a supermartingale and let (H_n) be a non-negative predictable sequence.\n\nShow that Z_n = Σ_{m=1}^n H_m (X_m − X_{m−1}) is a supermartingale.",
    "lean_statement": "theorem q305_martingale_transform_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)\n    (H : ℕ → Ω → ℝ) (R : ℝ)\n    (hpred : StronglyAdapted ℱ (fun n => H (n + 1)))\n    (hbdd : ∀ n ω, H n ω ≤ R) (hnonneg : ∀ n ω, 0 ≤ H n ω) :\n    Supermartingale\n      (fun n ω => ∑ m ∈ Finset.range n, H (m + 1) ω * (X (m + 1) ω - X m ω)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 306,
    "problem_name": "stochastic_processes_conditional_expectation_decreasing_filtration",
    "informal_statement": "Let (F_n)_{n≤0} be a decreasing filtration with F_{−∞} = ∩_n F_n and let Y be integrable.\n\nShow that E[Y | F_n] → E[Y | F_{−∞}] almost surely and in L^1 as n → −∞.",
    "lean_statement": "theorem q306_condexp_decreasing_filtration (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : ℕ → MeasurableSpace Ω) (hsub : ∀ n, ℱ n ≤ m0)\n    (hdec : ∀ n, ℱ (n + 1) ≤ ℱ n)\n    (Y : Ω → ℝ) (hY : Integrable Y μ) :\n    (∀ᵐ ω ∂μ, Tendsto (fun n => (μ[Y | ℱ n]) ω) atTop (𝓝 ((μ[Y | ⨅ n, ℱ n]) ω))) ∧\n      Tendsto (fun n => ∫ ω, |(μ[Y | ℱ n]) ω - (μ[Y | ⨅ n, ℱ n]) ω| ∂μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 307,
    "problem_name": "stochastic_processes_mixing_time",
    "informal_statement": "Let the lazy walk be as follows:\n        it remains in current position with probability 1/2,\n        moves left with probability 1/4, right with probability 1/4.\n\n        Show for the lazy walk on N-cycle, we have t_{mix} ≤ N^2.",
    "lean_statement": "theorem q307_mixing_time {N : ℕ} [NeZero N] (hN : 3 ≤ N) (P : Matrix (Fin N) (Fin N) ℝ)\n    (hP : ∀ x y, P x y = if y = x then (1 : ℝ) / 2 else if y = x + 1 ∨ y = x - 1 then 1 / 4 else 0)\n    (π : Fin N → ℝ) (hπ : ∀ x, π x = 1 / (N : ℝ)) :\n    ∀ x, tvDist (fun y => (P ^ (N ^ 2)) x y) π ≤ 1 / 4 := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 308,
    "problem_name": "stochastic_processes_multidim_cramer_lower",
    "informal_statement": "Let X_1,X_2,… be i.i.d. random vectors in ℝ^d with M(θ)=E[e^{⟨θ,X_1⟩}] < ∞ for all θ ∈ ℝ^d, let S_n = Σ_{i=1}^n X_i, and let I(x)=sup_θ(⟨θ,x⟩ − log M(θ)).\n\nShow that for every open U ⊆ ℝ^d, liminf_{n→∞} (1/n) log P(S_n/n ∈ U) ≥ − inf_{x∈U} I(x).",
    "lean_statement": "theorem q308_multidim_cramer_lower {d : ℕ} (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → EuclideanSpace ℝ (Fin d)) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hInt : ∀ θ : EuclideanSpace ℝ (Fin d), Integrable (fun ω => Real.exp (⟪θ, X 0 ω⟫)) μ)\n    (S : ℕ → Ω → EuclideanSpace ℝ (Fin d)) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (I : EuclideanSpace ℝ (Fin d) → EReal)\n    (hI : ∀ x, I x = ⨆ θ : EuclideanSpace ℝ (Fin d),\n      ((⟪θ, x⟫ - Real.log (∫ ω, Real.exp (⟪θ, X 0 ω⟫) ∂μ) : ℝ) : EReal))\n    (U : Set (EuclideanSpace ℝ (Fin d))) (hU : IsOpen U) :\n    -(⨅ x ∈ U, I x) ≤ Filter.liminf (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) *\n      ENNReal.log (μ {ω | (n : ℝ)⁻¹ • S n ω ∈ U})) atTop := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 309,
    "problem_name": "stochastic_processes_countable_chain_transient_no_stationary",
    "informal_statement": "Let (X_n) be an irreducible transient Markov chain on a countably infinite state space.\n\nShow that there is no probability distribution π satisfying π = π[P].",
    "lean_statement": "theorem q309_countable_chain_transient_no_stationary\n    {Ω : Type*} [Countable Ω] [Infinite Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPsum : ∀ i, Summable (P i))\n    (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j)\n    (htrans : ∃ i, Summable (fun n : ℕ => p n i i)) :\n    ¬ ∃ π : Ω → ℝ, (∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧ (∀ j, ∑' i, π i * P i j = π j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 310,
    "problem_name": "stochastic_processes_brownian_limsup_infinite",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that limsup_{n→∞} |B(n)| = ∞ almost surely.",
    "lean_statement": "theorem q310_brownian_limsup_infinite (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    ∀ᵐ ω ∂μ,\n      Filter.limsup (fun n : ℕ => ((|B (n : ℝ) ω| : ℝ) : EReal)) Filter.atTop = ⊤ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 311,
    "problem_name": "stochastic_processes_poisson_counting_marginal",
    "informal_statement": "Consider a Poisson process of rate r > 0: the increments over disjoint intervals satisfy N(b) − N(a) ~ Poisson(r(b − a)), and N(0) = 0. Show that for every t, the number of arrivals N(t) has a Poisson distribution with parameter r t.",
    "lean_statement": "theorem q311_poisson_marginal (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (r : ℝ≥0) (hr : 0 < r) (N : ℝ≥0 → Ω → ℕ)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (r * (b - a))) μ)\n    (hzero : ∀ᵐ ω ∂μ, N 0 ω = 0) :\n    ∀ t : ℝ≥0, HasLaw (N t) (poissonMeasure (r * t)) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 312,
    "problem_name": "stochastic_processes_doob_upcrossing_inequality",
    "informal_statement": "Let (X_n) be a supermartingale and let U_N[a,b] denote the number of upcrossings of the interval [a,b] by X_0,…,X_N.\n\nShow that (b − a) E[U_N[a,b]] ≤ E[(X_N − a)^−].",
    "lean_statement": "theorem q312_doob_upcrossing_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)\n    (a b : ℝ) (hab : a < b) (N : ℕ) (hint : Integrable (fun ω => max (a - X N ω) 0) μ) :\n    (b - a) * ∫ ω, (upcrossingsBefore a b X N ω : ℝ) ∂μ\n      ≤ ∫ ω, max (a - X N ω) 0 ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 313,
    "problem_name": "stochastic_processes_poisson_min_of_processes",
    "informal_statement": "Let (N^1) and (N^2) be independent Poisson processes of rates λ_1 and λ_2, and let T be the epoch of the first arrival in either process.\n\nShow that T is exponential of rate λ_1 + λ_2 and that the probability the first arrival comes from process 1 is λ_1/(λ_1 + λ_2), independent of T.",
    "lean_statement": "theorem q313_poisson_min_of_processes (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam1 lam2 : ℝ) (h1 : 0 < lam1) (h2 : 0 < lam2)\n    (S1 S2 : Ω → ℝ)\n    (hS1 : HasLaw S1 (expMeasure lam1) μ)\n    (hS2 : HasLaw S2 (expMeasure lam2) μ)\n    (hindep : IndepFun S1 S2 μ)\n    (T : Ω → ℝ) (hT : ∀ ω, T ω = min (S1 ω) (S2 ω)) :\n    HasLaw T (expMeasure (lam1 + lam2)) μ\n      ∧ (μ {ω | S1 ω < S2 ω}).toReal = lam1 / (lam1 + lam2)\n      ∧ (∀ t : ℝ, (μ {ω | S1 ω < S2 ω ∧ t < T ω}).toReal\n          = (μ {ω | S1 ω < S2 ω}).toReal * (μ {ω | t < T ω}).toReal) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 314,
    "problem_name": "stochastic_processes_talagrand_convex_distance",
    "informal_statement": "Let μ be a product measure on X = ∏_i Ω_i, let A be a measurable subset with μ(A)>0, and let the convex distance be D^c_A(x) = sup_{|a|=1} inf_{y∈A} Σ_i a_i 1{x_i ≠ y_i}.\n\nAssume the convex distance is measurable. Show that ∫ exp(¼ (D^c_A)^2) dμ ≤ 1/μ(A), and deduce that μ(D^c_A ≥ t) ≤ (1/μ(A)) e^{−t^2/4}.",
    "lean_statement": "theorem q314_talagrand_convex_distance\n    (n : ℕ) (α : Fin n → Type*) [∀ i, MeasurableSpace (α i)]\n    (μs : ∀ i, Measure (α i)) [∀ i, IsProbabilityMeasure (μs i)]\n    (A : Set (∀ i, α i)) (hA : MeasurableSet A) (hApos : 0 < (Measure.pi μs) A)\n    (D : (∀ i, α i) → ℝ) (hDmeas : AEMeasurable D (Measure.pi μs))\n    (hD : ∀ x, D x = ⨆ a : {a : Fin n → ℝ // ∑ i, (a i) ^ 2 = 1},\n      ⨅ y : A, ∑ i, a.val i * (if x i = y.val i then (0 : ℝ) else 1)) :\n    ∫ x, Real.exp ((1 / 4) * (D x) ^ 2) ∂(Measure.pi μs) ≤ ((Measure.pi μs) A).toReal⁻¹ ∧\n      ∀ t : ℝ, 0 ≤ t →\n        ((Measure.pi μs) {x | t ≤ D x}).toReal\n          ≤ ((Measure.pi μs) A).toReal⁻¹ * Real.exp (-(t ^ 2) / 4) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 315,
    "problem_name": "stochastic_processes_rate_function_attained",
    "informal_statement": "Let X_1 have moment generating function M finite on all of ℝ with support equal to ℝ, and let I(x)=sup_θ(θx − log M(θ)).\n\nShow that I is finite and continuous on ℝ, and that for each x the supremum is attained at some θ_0 satisfying x = Ṁ(θ_0)/M(θ_0), so that I(x) = θ_0 x − log M(θ_0).",
    "lean_statement": "theorem q315_rate_function_attained (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : Ω → ℝ) (hX : Measurable X)\n    (hInt : ∀ θ : ℝ, Integrable (fun ω => Real.exp (θ * X ω)) μ)\n    (hsupp : ∀ a b : ℝ, a < b → 0 < μ {ω | a < X ω ∧ X ω < b})\n    (I : ℝ → ℝ) (hI : ∀ x, I x = sSup (Set.range (fun θ : ℝ => θ * x - cgf X μ θ))) :\n    Continuous I ∧\n    ∀ x : ℝ, ∃ θ₀ : ℝ, x = deriv (fun t => mgf X μ t) θ₀ / mgf X μ θ₀ ∧\n      I x = θ₀ * x - Real.log (mgf X μ θ₀) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 316,
    "problem_name": "stochastic_processes_walds_equality_generalized",
    "informal_statement": "Let ((X_n, V_n)) be a sequence of i.i.d. pairs with E[|X|] < ∞ and mean X̄, let S_n = X_1 + … + X_n, and let J be a stopping trial defined on the pair sequence with E[J] < ∞.\n\nShow that E[S_J] = X̄ E[J].",
    "lean_statement": "theorem q316_walds_equality_generalized (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X V : ℕ → Ω → ℝ)\n    (hint : Integrable (X 0) μ) (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar)\n    (hindep : iIndepFun (fun i ω => (X i ω, V i ω)) μ)\n    (hident : ∀ i, IdentDistrib (fun ω => (X i ω, V i ω)) (fun ω => (X 0 ω, V 0 ω)) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (J : Ω → ℕ) (hJint : Integrable (fun ω => (J ω : ℝ)) μ)\n    (hstop : ∀ i : ℕ, IndepFun (fun ω => if i < J ω then (1 : ℝ) else 0) (X i) μ) :\n    ∫ ω, S (J ω) ω ∂μ = Xbar * ∫ ω, (J ω : ℝ) ∂μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 317,
    "problem_name": "stochastic_processes_little_theorem_queue",
    "informal_statement": "Consider a FCFS G/G/1 queue with arrival rate λ. Let L_q be the time-average number of customers waiting in queue (excluding any in service) and W_q the time-average waiting time in queue.\n\nShow that L_q = λ W_q with probability 1.",
    "lean_statement": "theorem q317_little_theorem_queue (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (A Lq : ℝ → Ω → ℝ) (a Wq : ℕ → Ω → ℝ) (lam Wqbar : ℝ) (hlam : 0 ≤ lam) (hAnn : ∀ t ω, 0 ≤ A t ω)\n    (hLnn : ∀ t ω, 0 ≤ Lq t ω) (hWnn : ∀ k ω, 0 ≤ Wq k ω)\n    (harea : ∀ (t : ℝ) (ω : Ω), ∫ τ in (0:ℝ)..t, Lq τ ω\n      = ∑ k ∈ Finset.range ⌊A t ω⌋₊, (min (a k ω + Wq k ω) t - a k ω))\n    (hArate : ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => A t ω / t) atTop (𝓝 lam))\n    (hWavg : ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ k ∈ Finset.range n, Wq k ω)\n      atTop (𝓝 Wqbar)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, Lq τ ω)\n      atTop (𝓝 (lam * Wqbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 318,
    "problem_name": "stochastic_processes_jackson_traffic_equations",
    "informal_statement": "Consider a Jackson network of k queues, where exogenous arrivals enter queue j as a Poisson process of rate λ_0 Q_{0j}, a customer completing service at queue i moves to queue j with probability Q_{ij} and departs the network with probability Q_{i0}.\n\nShow that the effective arrival rates λ_j satisfy the traffic equations λ_j = λ_0 Q_{0j} + Σ_{i=1}^k λ_i Q_{ij}, and that these have a unique solution when the network is open and every queue is reachable.",
    "lean_statement": "theorem q318_jackson_traffic_equations {k : ℕ}\n    (lam0 : ℝ) (Q0 : Fin k → ℝ)\n    (R : Matrix (Fin k) (Fin k) ℝ) (hR0 : ∀ i j, 0 ≤ R i j)\n    (a : Fin k → ℝ) (ha : ∀ j, a j = lam0 * Q0 j)\n    (hopen : IsUnit ((1 : Matrix (Fin k) (Fin k) ℝ) - Rᵀ)) :\n    ∃! lam : Fin k → ℝ, ∀ j, lam j = lam0 * Q0 j + ∑ i, lam i * R i j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 319,
    "problem_name": "stochastic_processes_brownian_time_inversion",
    "informal_statement": "Let B be a standard Brownian motion and define B^{(1)}(t) = t B(1/t) for t > 0 with B^{(1)}(0)=0.\n\nShow that B^{(1)} is again a standard Brownian motion.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 383 (l6): time inversion. For a standard Brownian motion `B`, the process\n`B⁽¹⁾(t) = t · B(1/t)` for `t > 0` and `B⁽¹⁾(0) = 0` is again a standard Brownian motion. (The\na.s.-continuity clause of `IsBM` encodes, in particular, continuity at `0`, i.e. `t·B(1/t) → 0`.) -/\ntheorem q319_time_inversion_is_brownian (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) :\n    IsBM μ 1 (fun t ω => if 0 < t then t * B t⁻¹ ω else 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 320,
    "problem_name": "stochastic_processes_burke_sampled_mm1",
    "informal_statement": "Consider the sampled-time M/M/1 birth-death chain in steady state with ρ = λ/μ < 1 and stationary distribution π_i = (1 − ρ) ρ^i.\n\nShow that the departure process is Bernoulli and that the state X_n is independent of departures prior to time n.",
    "lean_statement": "theorem q320_burke_sampled_mm1 (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)\n    (p q : ℝ) (hp : 0 < p) (hq : 0 < q) (hpq : p + q ≤ 1) (hρpq : p = ρ * q)\n    (X : ℕ → Ω → ℕ) (hXmeas : ∀ n, Measurable (X n))\n    (P : ℕ → ℕ → ℝ)\n    (hP : ∀ i j, P i j = if j = i + 1 then p\n                        else if i = j + 1 then q\n                        else if j = i then (if i = 0 then 1 - p else 1 - p - q)\n                        else 0)\n    (hchain : HasChainLaw μ X (fun i => (1 - ρ) * ρ ^ i) P)\n    (D : ℕ → Ω → ℝ)\n    (hD : ∀ n ω, D n ω = if X (n + 1) ω + 1 = X n ω then 1 else 0) :\n    (iIndepFun D μ ∧ ∀ n, IdentDistrib (D n) (D 0) μ μ) ∧\n      (∀ n, IndepFun (fun ω => X n ω) (fun ω => (fun k : Fin n => D (k : ℕ) ω)) μ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 321,
    "problem_name": "stochastic_processes_chain_coupling",
    "informal_statement": "Suppose that P is irreducible with stationary distribution π.\n        Let (X_n, Y_n)_{n ≥ 0} be a coupling of Markov chains with\n        transition matrix P for which X_0 = x, Y_0 = y.\n        Define τ to be their first meet time: τ = min{n ≥ 0 : X_n = Y_n}.\n\n        Show that ||P^n (x, ·) − P^n (y, ·)||_{TV} ≤ ℙ_{x,y} [τ > n].",
    "lean_statement": "theorem q321_chain_coupling {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]\n    {Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (x y : Ω) (Xc Yc : ℕ → Ω' → Ω) (τ : Ω' → ℕ) (n : ℕ)\n    (hcoupX : HasMatrixMarginals μ Xc P x) (hcoupY : HasMatrixMarginals μ Yc P y)\n    (hmeet : ∀ m ω, τ ω ≤ m → Xc m ω = Yc m ω) :\n    tvDist (fun z => (P ^ n) x z) (fun z => (P ^ n) y z) ≤ tailProb μ τ n := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 322,
    "problem_name": "stochastic_processes_continous_markov_recurrence_transience",
    "informal_statement": "Suppose that X is a continuous time Markov chain and that Y is its jump chain.\n        Let X be an irreducible continuous time Markov chain.\n\n        Show that either all states are recurrent, or all states are transient.",
    "lean_statement": "theorem q322_ctmc_dichotomy {S : Type*} [Countable S] [DecidableEq S] [Nonempty S]\n    (P : S → S → ℝ) (hPnn : ∀ x y, 0 ≤ P x y) (hPstoch : ∀ x, HasSum (P x) 1)\n    (hirr : ∀ x y, ∃ n : ℕ, 0 < nstep P n x y)\n    (ρ : S → S → ℝ) (hρnn : ∀ x y, 0 ≤ ρ x y)\n    (hρ : ∀ x y, ρ x y = ∑' z, P x z * (if z = y then 1 else ρ z y))\n    (hρmin : ∀ σ : S → S → ℝ, (∀ x y, 0 ≤ σ x y) →\n        (∀ x y, σ x y = ∑' z, P x z * (if z = y then 1 else σ z y)) → ∀ x y, ρ x y ≤ σ x y)\n    (recurrent : S → Prop) (hrecdef : ∀ x, recurrent x ↔ ρ x x = 1) :\n    (∀ x, recurrent x) ∨ (∀ x, ¬ recurrent x) := by sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 323,
    "problem_name": "stochastic_processes_optional_stopping_bounded_process_super",
    "informal_statement": "Let (X_n) be a supermartingale that is uniformly bounded, i.e. |X_n| ≤ M almost surely for all n, and let τ be a stopping time.\n\nShow that E[X_τ] ≤ E[X_0].",
    "lean_statement": "theorem q323_optional_stopping_bounded_process_super (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)\n    (hX : Supermartingale X ℱ μ) (M : ℝ) (hbdd : ∀ n ω, |X n ω| ≤ M)\n    (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 324,
    "problem_name": "stochastic_processes_doob_submartingale_inequality",
    "informal_statement": "Let (X_n) be a submartingale, let X*_n = max_{0≤m≤n} X_m^+, let λ > 0 and A = {X*_n ≥ λ}.\n\nShow that λ P(A) ≤ E[X_n 1(A)] ≤ E[X_n^+].",
    "lean_statement": "theorem q324_doob_submartingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ)\n    (n : ℕ) (lam : ℝ) (hlam : 0 < lam) :\n    lam * (μ {ω | lam ≤ runningMax (fun k ω => max (X k ω) 0) n ω}).toReal\n        ≤ ∫ ω in {ω | lam ≤ runningMax (fun k ω => max (X k ω) 0) n ω}, X n ω ∂μ ∧\n      ∫ ω in {ω | lam ≤ runningMax (fun k ω => max (X k ω) 0) n ω}, X n ω ∂μ\n        ≤ ∫ ω, max (X n ω) 0 ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 325,
    "problem_name": "stochastic_processes_wald_martingale",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with M(θ)=E[e^{θX}] < ∞ for some θ, and let S_n = Σ_{i=1}^n X_i.\n\nShow that Z_n = e^{θS_n} / M(θ)^n is a martingale.",
    "lean_statement": "theorem q325_wald_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (θ M : ℝ) (hM : 0 < M)\n    (hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))\n    (hint : ∀ n, Integrable (fun ω => Real.exp (θ * X n ω)) μ)\n    (hSint : ∀ n, Integrable (fun ω => Real.exp (θ * (∑ i ∈ Finset.range n, X i ω))) μ)\n    (hmgf : ∀ n, μ[fun ω => Real.exp (θ * X n ω) | ℱ n] =ᵐ[μ] fun _ => M) :\n    Martingale (fun n ω => Real.exp (θ * (∑ i ∈ Finset.range n, X i ω)) / M ^ n) ℱ μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 326,
    "problem_name": "stochastic_processes_mdp_relative_gain_vector",
    "informal_statement": "Let (X_n) be an ergodic finite-state Markov chain with steady-state vector π, reward vector r, and gain g = π r.\n\nShow that there is a relative-gain vector w, unique up to an additive multiple of the all-ones vector e, satisfying w + g e = r + [P] w.",
    "lean_statement": "theorem q326_relative_gain_vector {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)\n    (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (π r : Ω → ℝ) (hπ : IsStationary P π) (g : ℝ) (hg : g = ∑ i, π i * r i) :\n    ∃ w : Ω → ℝ, (∀ i, w i + g = r i + ∑ j, P i j * w j) ∧\n      (∀ w' : Ω → ℝ, (∀ i, w' i + g = r i + ∑ j, P i j * w' j) →\n        ∃ c : ℝ, ∀ i, w' i = w i + c) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 327,
    "problem_name": "stochastic_processes_round_robin_markov_chain",
    "informal_statement": "Consider a round-robin queue observed once per service quantum. A present customer completes service with probability b, then an independent Bernoulli arrival with probability a is appended, where 0<a,b<1. All arrival and completion trials are independent across quanta; geometric service requirements make the completion probability independent of service history. Starting from a fixed queue length, X_{n+1}=(X_n−D_n)⁺+A_n.\n\nShow that the queue length is an irreducible Markov chain and is positive recurrent precisely when a<b, equivalently when arrival rate is less than service rate. Express positive recurrence by existence of a full invariant probability for the derived kernel.",
    "lean_statement": "theorem q327_round_robin_chain\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (a b : ℝ) (ha : 0 < a) (ha1 : a < 1) (hb : 0 < b) (hb1 : b < 1)\n    (A D : ℕ → Ω → ℕ) (hindep : iIndepFun (Sum.elim A D) μ)\n    (hAmeas : ∀ n, Measurable (A n)) (hDmeas : ∀ n, Measurable (D n))\n    (hAbin : ∀ n ω, A n ω ≤ 1) (hDbin : ∀ n ω, D n ω ≤ 1)\n    (hAlaw : ∀ n, (μ {ω | A n ω = 1}).toReal = a)\n    (hDlaw : ∀ n, (μ {ω | D n ω = 1}).toReal = b)\n    (X : ℕ → Ω → ℕ) (x0 : ℕ) (hX0 : ∀ ω, X 0 ω = x0)\n    (hX : ∀ n ω, X (n + 1) ω = X n ω - D n ω + A n ω)\n    (P : ℕ → ℕ → ℝ)\n    (hP : ∀ i j, P i j =\n      if j = i + 1 then (if i = 0 then a else a * (1 - b))\n      else if i = j + 1 then (1 - a) * b\n      else if j = i then (if i = 0 then 1 - a else 1 - a * (1 - b) - (1 - a) * b)\n      else 0) :\n    HasChainLaw μ X (fun i => if i = x0 then 1 else 0) P ∧\n      (∀ i j, ∃ n, 0 < nstep P n i j) ∧\n      (HasInvariantProbability P ↔ a < b) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 328,
    "problem_name": "stochastic_processes_time_average_residual_life",
    "informal_statement": "Let (N(t)) be a renewal process with i.i.d. interrenewal times X having finite E[X] and E[X^2], and let Y(τ) be the residual life (time until the next renewal) at time τ.\n\nShow that lim_{t→∞} (1/t) ∫_0^t Y(τ) dτ = E[X^2]/(2 E[X]) with probability 1.",
    "lean_statement": "theorem q328_time_average_residual_life (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (m1 m2 : ℝ) (hm1 : ∫ ω, X 0 ω ∂μ = m1) (hm2 : ∫ ω, (X 0 ω) ^ 2 ∂μ = m2) (hpm : 0 < m1)\n    (hint2 : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (Y : ℝ → Ω → ℝ) (hY : ∀ (t : ℝ) (ω : Ω), Y t ω = S (N t ω + 1) ω - t) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, Y τ ω)\n      atTop (𝓝 (m2 / (2 * m1))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 329,
    "problem_name": "stochastic_processes_wald_identity_via_martingale",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X and semi-invariant generating function γ(r), let Z_n = exp(r S_n − n γ(r)) be the product-form martingale, and let J be a stopping trial satisfying the optional-stopping conditions.\n\nShow that E[exp(r S_J − J γ(r))] = 1, recovering Wald's identity.",
    "lean_statement": "theorem q329_wald_identity_via_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (r : ℝ) (hexp : Integrable (fun ω => Real.exp (r * X 0 ω)) μ)\n    (γ : ℝ) (hγ : γ = cgf (X 0) μ r)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp (r * S n ω - (n : ℝ) * γ))\n    (hZmart : Martingale Z ℱ μ)\n    (J : Ω → ℕ) (hJstop : IsStoppingTime ℱ (natStop J))\n    (hos_int : Integrable (stoppedValue Z (natStop J)) μ)\n    (hos_tail : Tendsto (fun n => ∫ ω in {ω | n < J ω}, Z n ω ∂μ) atTop (𝓝 0)) :\n    ∫ ω, Real.exp (r * S (J ω) ω - (J ω : ℝ) * γ) ∂μ = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 330,
    "problem_name": "stochastic_processes_exponential_random_variables_sum_density",
    "informal_statement": "Let T1, T2,... be independent exponential random variables of parameter λ.\n        Let S represent the sum of T_i, for 1 ≤ i ≤ n.\n\n        Show that for all n ≥ 1, the sum S has the probability density function\n        f_s (x) = [(λ^n * x^{n-1})/(n-1)!]e^{-λx}, x > 0.",
    "lean_statement": "theorem q330_exponential_random_variables_sum_density\n    {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (hn : 1 ≤ n) (lam : ℝ) (hlam : 0 < lam)\n    (T : Fin n → Ω → ℝ) (hTindep : iIndepFun T μ)\n    (hTexp : ∀ i, HasLaw (T i) (expMeasure lam) μ) :\n    HasLaw (fun ω => ∑ i, T i ω) (gammaMeasure (n : ℝ) lam) μ := by sorry",
    "true_to_source": "literal",
    "topic": "Poisson processes"
  },
  {
    "question_id": 331,
    "problem_name": "stochastic_processes_delayed_slln_lemma",
    "informal_statement": "Let (X_i)_{i≥2} be i.i.d. with mean X̄ and E[|X|] < ∞, and let X_1 be a random variable independent of (X_i)_{i≥2} and finite with probability 1. Let S_n = Σ_{i=1}^n X_i.\n\nShow that lim_{n→∞} S_n/n = X̄ with probability 1.",
    "lean_statement": "theorem q331_delayed_slln (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (hint : Integrable (X 1) μ)\n    (xbar : ℝ) (hmean : ∫ ω, X 1 ω ∂μ = xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => S n ω / n) atTop (𝓝 xbar) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 332,
    "problem_name": "stochastic_processes_gamblers_ruin_4",
    "informal_statement": "Consider a gambler betting on the outcome of a sequence of independent fair coin tosses.\n        If head, he gains one dollar. If tail, he loses one dollar.\n        If he reaches a fortune of N dollars, he stops. If his purse is ever empty, he stops.\n \n        Show that the expected time for the gambler to stop is k(N-k).",
    "lean_statement": "theorem q332_gamblers_ruin_expected_time\n    (N : ℕ) (hN : 0 < N) (e : ℕ → ℝ)\n    (hb0 : e 0 = 0) (hbN : e N = 0)\n    (hrec : ∀ k, 0 < k → k < N → e k = 1 + (e (k - 1) + e (k + 1)) / 2)\n    (k : ℕ) (hk : k ≤ N) :\n    e k = (k : ℝ) * ((N : ℝ) - (k : ℝ)) := by sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 333,
    "problem_name": "stochastic_processes_two_state_stationary",
    "informal_statement": "For a two-state Markov chain with transition matrix [[1−a, a], [b, 1−b]] where 0 < a, b ≤ 1, the distribution π = (b/(a+b), a/(a+b)) is stationary.",
    "lean_statement": "theorem q333_two_state_stationary\n    (a b : ℝ) (ha : 0 < a) (ha1 : a ≤ 1) (hb : 0 < b) (hb1 : b ≤ 1)\n    (P : Matrix (Fin 2) (Fin 2) ℝ) (hP : P = !![1 - a, a; b, 1 - b])\n    (π : Fin 2 → ℝ) (hπ : π = ![b / (a + b), a / (a + b)]) :\n    IsStationary P π := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 334,
    "problem_name": "stochastic_processes_doob_kolmogorov_continuous_time",
    "informal_statement": "Let (X_t) be a non-negative right-continuous submartingale with left limits.\n\nShow that P(sup_{0≤t≤T} X_t ≥ x) ≤ E[X_T^2]/x^2 for every x > 0.",
    "lean_statement": "theorem q334_doob_l2_maximal_continuous (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ)\n    (hsub : Submartingale X ℱ μ)\n    (hnn : ∀ t ω, 0 ≤ X t ω)\n    (hrc : ∀ ω t, ContinuousWithinAt (fun u => X u ω) (Set.Ici t) t)\n    (hll : ∀ ω t, ∃ l : ℝ, Tendsto (fun u => X u ω) (𝓝[<] t) (𝓝 l))\n    (T : ℝ) (hT : 0 ≤ T) (hL2 : MemLp (X T) 2 μ)\n    (x : ℝ) (hx : 0 < x) :\n    (μ {ω | x ≤ ⨆ u : ↥(Set.Icc (0 : ℝ) T), X (↑u) ω}).toReal\n      ≤ (∫ ω, (X T ω) ^ 2 ∂μ) / x ^ 2 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 335,
    "problem_name": "stochastic_processes_stationary_uniqueness_2",
    "informal_statement": "Suppose that P is irreducible.\n\n        Show that π(x) = 1/(𝔼_x[τ_x^+]), ∀x ∈ Ω.",
    "lean_statement": "theorem q335_stationary_return_formula {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∀ x, π x = 1 / returnTime P g x := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 336,
    "problem_name": "stochastic_processes_ctmc_detailed_balance",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain with transition rates q_{ij}. Suppose there is a probability distribution (p_i) satisfying the detailed balance equations p_i q_{ij} = p_j q_{ji} for all i ≠ j.\n\nShow that (p_i) is the steady-state distribution, the process is reversible, and the embedded chain is positive-recurrent.",
    "lean_statement": "theorem q336_ctmc_detailed_balance {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)\n    (hνbal : ∀ i, ν i = ∑' k, q i k)\n    (hirr : ∀ a b : S, ∃ (c : ℕ → S) (m : ℕ),\n        c 0 = a ∧ c m = b ∧ ∀ t < m, 0 < P (c t) (c (t + 1)))\n    (p : S → ℝ) (hp0 : ∀ i, 0 < p i) (hpsum : ∑' i, p i = 1)\n    (hpν : Summable (fun j => p j * ν j))\n    (hdb : ∀ i j, i ≠ j → p i * q i j = p j * q j i) :\n    (∀ j, p j * ν j = ∑' i, p i * q i j) ∧\n    (∀ i j, p i * q i j = p j * q j i) ∧\n    (∃ π : S → ℝ, (∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧\n        (∀ j, ∑' i, π i * P i j = π j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 337,
    "problem_name": "stochastic_processes_mm1_departure_poisson",
    "informal_statement": "Consider an M/M/1 queue with Poisson arrivals of rate λ and i.i.d. exponential service times of rate μ, observed during a busy period (server never idle).\n\nShow that the departure process during the busy period is a Poisson process of rate μ.",
    "lean_statement": "theorem q337_mm1_departure_poisson (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (mu : ℝ≥0) (hmu : 0 < mu)\n    (V : ℕ → Ω → ℝ) (hVindep : iIndepFun V μ)\n    (hVexp : ∀ i, HasLaw (V i) (expMeasure (mu : ℝ)) μ)\n    (D : ℝ≥0 → Ω → ℕ)\n    (hD : ∀ (n : ℕ) (t : ℝ≥0),\n      {ω | n ≤ D t ω} = {ω | (∑ i ∈ Finset.range n, V i ω) ≤ (t : ℝ)}) :\n    ∀ t : ℝ≥0, 0 < t → HasLaw (D t) (poissonMeasure (mu * t)) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 338,
    "problem_name": "stochastic_processes_mmm_stationary",
    "informal_statement": "Consider an M/M/m queue with arrival rate λ, per-server service rate μ, and ρ = λ/(mμ) < 1.\n\nShow that the steady-state distribution satisfies p_i = p_0 (mρ)^i/i! for i ≤ m and p_i = p_0 ρ^i m^m/m! for i ≥ m.",
    "lean_statement": "theorem q338_mmm_stationary\n    (m : ℕ) (hm : 0 < m)\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (ρ : ℝ) (hρ : ρ = lam / ((m : ℝ) * mu)) (hρ1 : ρ < 1)\n    (d : ℕ → ℝ) (hd : ∀ i, d i = ((min i m : ℕ) : ℝ) * mu)\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam = p 1 * d 1)\n    (hbal : ∀ n, p (n + 1) * (lam + d (n + 1)) = p n * lam + p (n + 2) * d (n + 2)) :\n    (∀ i, i ≤ m → p i = p 0 * ((m : ℝ) * ρ) ^ i / (Nat.factorial i : ℝ)) ∧\n    (∀ i, m ≤ i → p i = p 0 * ρ ^ i * (m : ℝ) ^ m / (Nat.factorial m : ℝ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 339,
    "problem_name": "stochastic_processes_countable_renewal_count_limit",
    "informal_statement": "Let (X_n) be an irreducible positive-recurrent Markov chain on a countable state space, and let N_{jj}(t) count returns to state j by time t, with mean return time E_j[T_{jj}].\n\nShow that lim_{t→∞} N_{jj}(t)/t = 1/E_j[T_{jj}] with probability 1.",
    "lean_statement": "theorem q339_return_count_slln (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (T : ℕ → Ω → ℝ) (mrt : ℝ) (hmrt : 0 < mrt)\n    (hpos : ∀ i ω, 0 < T i ω)\n    (hint : Integrable (T 0) μ) (hmean : ∫ ω, T 0 ω ∂μ = mrt)\n    (hindep : Pairwise (fun i j => IndepFun (T i) (T j) μ))\n    (hident : ∀ i, IdentDistrib (T i) (T 0) μ μ)\n    (Njj : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t →\n        {ω | n ≤ Njj t ω} = {ω | (∑ i ∈ Finset.range n, T i ω) ≤ t}) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (Njj t ω : ℝ) / t) atTop (𝓝 (1 / mrt)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 340,
    "problem_name": "stochastic_processes_zero_mean_walk_crossing_prob",
    "informal_statement": "Let (S_n) be a zero-mean simple random walk with steps of variance σ^2, stopped on first crossing of threshold α > 0 or β < 0 at trial J.\n\nShow that Pr[S_J ≥ α] = −β/(α − β) and E[J] = −βα/σ^2.",
    "lean_statement": "theorem q340_zero_mean_crossing (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ]\n    (S : ℕ → Ω → ℝ) (hSmart : Martingale S ℱ μ) (hS0 : ∀ ω, S 0 ω = 0)\n    (σ : ℝ) (hσ : 0 < σ)\n    (hsq : Martingale (fun n ω => (S n ω) ^ 2 - (n : ℝ) * σ ^ 2) ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (N : ℕ) (hJbdd : ∀ ω, J ω ≤ N)\n    (α β : ℝ) (hα : 0 < α) (hβ : β < 0)\n    (hhit : ∀ ω, S (J ω) ω = α ∨ S (J ω) ω = β) :\n    (μ {ω | α ≤ S (J ω) ω}).toReal = -β / (α - β) ∧\n      ∫ ω, (J ω : ℝ) ∂μ = -β * α / σ ^ 2 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 341,
    "problem_name": "stochastic_processes_branching_mean",
    "informal_statement": "Consider a branching process X_{n+1} = Σ_{k=1}^{X_n} Y_{k,n} where the offspring counts Y_{k,n} are i.i.d. with mean Ȳ.\n\nShow that E[X_n] = Ȳ^n E[X_0].",
    "lean_statement": "theorem q341_branching_mean (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℕ) (Y : ℕ → ℕ → Ω → ℕ) (ybar : ℝ)\n    (hXint : ∀ n, Integrable (fun ω => (X n ω : ℝ)) μ)\n    (hYint : ∀ k n, Integrable (fun ω => (Y k n ω : ℝ)) μ)\n    (hYmean : ∀ k n, ∫ ω, (Y k n ω : ℝ) ∂μ = ybar)\n    (hrec : ∀ n ω, X (n + 1) ω = ∑ k ∈ Finset.range (X n ω), Y k n ω)\n    (hstop : ∀ n k : ℕ, IndepFun (fun ω => if k < X n ω then (1 : ℝ) else 0)\n        (fun ω => (Y k n ω : ℝ)) μ) :\n    ∀ n, ∫ ω, (X n ω : ℝ) ∂μ = ybar ^ n * ∫ ω, (X 0 ω : ℝ) ∂μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 342,
    "problem_name": "stochastic_processes_exp_submartingale",
    "informal_statement": "Let (Z_n) be a martingale and r a constant such that E[exp(r Z_n)] < ∞ for all n.\n\nShow that (exp(r Z_n)) is a submartingale.",
    "lean_statement": "theorem q342_exp_martingale_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (r : ℝ)\n    (hint : ∀ n, Integrable (fun ω => Real.exp (r * Z n ω)) μ) :\n    Submartingale (fun n ω => Real.exp (r * Z n ω)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 343,
    "problem_name": "stochastic_processes_little_theorem",
    "informal_statement": "Consider a FCFS G/G/1 queue with finite mean interrenewal time between arrivals to an empty system. Let L be the time-average number of customers in the system, λ the arrival rate, and W the time-average time each customer spends in the system.\n\nShow that L = λ W with probability 1.",
    "lean_statement": "theorem q343_little_theorem (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (A L : ℝ → Ω → ℝ) (a W : ℕ → Ω → ℝ) (lam Wbar : ℝ) (hlam : 0 ≤ lam) (hAnn : ∀ t ω, 0 ≤ A t ω)\n    (hLnn : ∀ t ω, 0 ≤ L t ω) (hWnn : ∀ k ω, 0 ≤ W k ω)\n    (harea : ∀ (t : ℝ) (ω : Ω), ∫ τ in (0:ℝ)..t, L τ ω\n      = ∑ k ∈ Finset.range ⌊A t ω⌋₊, (min (a k ω + W k ω) t - a k ω))\n    (hArate : ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => A t ω / t) atTop (𝓝 lam))\n    (hWavg : ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ k ∈ Finset.range n, W k ω)\n      atTop (𝓝 Wbar)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, L τ ω)\n      atTop (𝓝 (lam * Wbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 344,
    "problem_name": "stochastic_processes_birth_death_stationary",
    "informal_statement": "Consider an irreducible birth-death Markov chain on {0,1,2,…} with up-probability p_i from state i, down-probability q_{i+1} from state i+1, and ρ_i = p_i/q_{i+1}.\n\nShow that a stationary distribution exists if and only if Σ_{i≥1} ∏_{j<i} ρ_j < ∞, in which case π_i = π_0 ∏_{j<i} ρ_j with π_0 = 1/(1 + Σ_{i≥1} ∏_{j<i} ρ_j).",
    "lean_statement": "theorem q344_birth_death_stationary\n    (p q : ℕ → ℝ) (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q (i + 1))\n    (ρ : ℕ → ℝ) (hρ : ∀ j, ρ j = p j / q (j + 1)) :\n    ((∃ π : ℕ → ℝ, (∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧\n        (∀ i, π i * p i = π (i + 1) * q (i + 1)))\n      ↔ Summable (fun i => ∏ j ∈ Finset.range i, ρ j))\n    ∧ (Summable (fun i => ∏ j ∈ Finset.range i, ρ j) →\n        ∀ π : ℕ → ℝ, (∀ i, 0 ≤ π i) → (∑' i, π i = 1) →\n          (∀ i, π i * p i = π (i + 1) * q (i + 1)) →\n          ∀ i, π i = (∏ j ∈ Finset.range i, ρ j) / (∑' k, ∏ j ∈ Finset.range k, ρ j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 345,
    "problem_name": "stochastic_processes_poisson_sum_independent_counts",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ and let 0 ≤ t_1 < t_2 < t_3.\n\nShow that N(t_2) − N(t_1) and N(t_3) − N(t_2) are independent Poisson random variables, and that their sum is Poisson with mean λ(t_3 − t_1).",
    "lean_statement": "theorem q345_poisson_increments_independent_sum (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (t1 t2 t3 : ℝ≥0)\n    (h12 : t1 ≤ t2) (h23 : t2 ≤ t3)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (lam * (b - a))) μ)\n    (hindep : IndepFun (fun ω => N t2 ω - N t1 ω) (fun ω => N t3 ω - N t2 ω) μ) :\n    HasLaw (fun ω => (N t2 ω - N t1 ω) + (N t3 ω - N t2 ω))\n        (poissonMeasure (lam * (t3 - t1))) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 346,
    "problem_name": "stochastic_processes_nonhomogeneous_time_change",
    "informal_statement": "Let N be a nonhomogeneous Poisson counting process on [0,∞), starting at zero, with continuous strictly increasing mean function m, m(0)=0, and m(t)→∞. In the rate formulation, m(t)=∫_0^t λ(u)du.\n\nShow that there exists a rate-one Poisson process N* on the same probability space such that N(t)=N*(m(t)) for all t≥0. The unbounded clock ensures its inverse is defined on the whole nonnegative half-line.",
    "lean_statement": "theorem q346_nonhomogeneous_time_change (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (N : ℝ≥0 → Ω → ℕ) (hNcount : IsCountingProcess μ N)\n    (hindep : HasIndepIncrements N μ)\n    (m : ℝ≥0 → ℝ≥0) (hm0 : m 0 = 0) (hmcont : Continuous m)\n    (hmmono : StrictMono m) (hmunbounded : Tendsto m atTop atTop)\n    (hincr : ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω) (poissonMeasure (m b - m a)) μ) :\n    ∃ Nstar : ℝ≥0 → Ω → ℕ,\n      IsPoissonProcess μ 1 Nstar ∧ ∀ t ω, N t ω = Nstar (m t) ω := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 347,
    "problem_name": "stochastic_processes_yule_process_birth",
    "informal_statement": "Consider a pure birth (Yule) process started with one individual in which the holding time in state i is exponential of rate iλ, independent across states.\n\nShow that the population X(t) is finite with probability 1 for each t and that E[X(t)] = e^{λt}.",
    "lean_statement": "theorem q347_yule_finite_mean (lam : ℝ) (hlam : 0 < lam)\n    (p : ℝ → ℕ → ℝ)\n    (hp0 : ∀ t n, 0 ≤ t → 0 ≤ p t n)\n    (hsum : ∀ t, Summable (fun n => p t n))\n    (hmsum : ∀ t, Summable (fun n : ℕ => (n : ℝ) * p t n))\n    (hzero : ∀ t, p t 0 = 0)\n    (hinit1 : p 0 1 = 1) (hinit0 : ∀ n, n ≠ 1 → p 0 n = 0)\n    (hfwd : ∀ (t : ℝ) (n : ℕ), 0 ≤ t → 1 ≤ n →\n      HasDerivAt (fun s => p s n)\n        (((n : ℝ) - 1) * lam * p t (n - 1) - (n : ℝ) * lam * p t n) t) :\n    (∀ t : ℝ, 0 ≤ t → ∑' n : ℕ, p t n = 1)\n      ∧ (∀ t : ℝ, 0 ≤ t → ∑' n : ℕ, (n : ℝ) * p t n = Real.exp (lam * t)) := by sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 348,
    "problem_name": "stochastic_processes_zero_mean_walk_expected_stop_time",
    "informal_statement": "Let (S_n) be a zero-mean simple random walk on the integers, stopped at the first trial J reaching threshold α > 0 or β < 0.\n\nShow that E[J] = −αβ.",
    "lean_statement": "theorem q348_zero_mean_walk_expected_stop_time (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℤ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hstep : ∀ i ω, X i ω = 1 ∨ X i ω = -1)\n    (hmean : ∫ ω, ((X 0 ω : ℤ) : ℝ) ∂μ = 0)\n    (S : ℕ → Ω → ℤ) (hS0 : ∀ ω, S 0 ω = 0)\n    (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α β : ℤ) (hα : 0 < α) (hβ : β < 0)\n    (J : Ω → ℕ) (hJ : ∀ ω, IsLeast {n | S n ω ≤ β ∨ α ≤ S n ω} (J ω))\n    (hJint : Integrable (fun ω => (J ω : ℝ)) μ) :\n    ∫ ω, (J ω : ℝ) ∂μ = -(α : ℝ) * (β : ℝ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 349,
    "problem_name": "stochastic_processes_kolmogorov_nonneg_martingale_inequality",
    "informal_statement": "Let (Z_n) be a nonnegative martingale.\n\nShow that for every a > 0, Pr[sup_{n ≥ 1} Z_n ≥ a] ≤ E[Z_1]/a.",
    "lean_statement": "theorem q349_kolmogorov_nonneg_martingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (hnn : ∀ n ω, 0 ≤ Z n ω) (a : ℝ) (ha : 0 < a) :\n    (μ {ω | ∃ n, a ≤ Z n ω}).toReal ≤ (∫ ω, Z 0 ω ∂μ) / a := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 350,
    "problem_name": "stochastic_processes_supermartingale_stopping_time_3",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a supermartingale, and let S ≤ T be bounded stopping times.\n\n        Show that 𝔼[X_T] ≤ 𝔼[X_S].",
    "lean_statement": "theorem q350_super_optional_eq (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (S T : Ω → ℕ)\n    (hS : IsStoppingTime ℱ (natStop S))\n    (hT : IsStoppingTime ℱ (natStop T))\n    (hST : ∀ ω, S ω ≤ T ω) (N : ℕ) (hTbdd : ∀ ω, T ω ≤ N) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ\n      ≤ ∫ ω, stoppedValue X (natStop S) ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 351,
    "problem_name": "stochastic_processes_time_reversal_1",
    "informal_statement": "Let (X_n) be an irreducible Markov chain with transition matrix P and stationary distribution π.\n        Define P' to be P'(x, y) = π(y)P(y, x) / π(x).\n        Let (X'_n) be a Markov chain with transition matrix P'.\n\n        Show that π is also stationary for P'.",
    "lean_statement": "theorem q351_time_reversal_stationary {Ω : Type*} [Fintype Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x)\n    (hπ : IsStationary P π) (P' : Matrix Ω Ω ℝ) (hP' : IsReversal P π P') :\n    IsStationary P' π := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 352,
    "problem_name": "stochastic_processes_convex_of_martingale_submartingale",
    "informal_statement": "Let (X_n) be a martingale and let φ be a convex function with E|φ(X_n)| < ∞ for all n.\n\nShow that (φ(X_n)) is a submartingale, and in particular that (|X_n|^p) is a submartingale for every p ≥ 1 for which it is integrable.",
    "lean_statement": "theorem q352_convex_of_martingale_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) :\n    (∀ φ : ℝ → ℝ, ConvexOn ℝ Set.univ φ → (∀ n, Integrable (fun ω => φ (X n ω)) μ) →\n        Submartingale (fun n ω => φ (X n ω)) ℱ μ) ∧\n      (∀ p : ℝ, 1 ≤ p → (∀ n, Integrable (fun ω => |X n ω| ^ p) μ) →\n        Submartingale (fun n ω => |X n ω| ^ p) ℱ μ) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 353,
    "problem_name": "stochastic_processes_poisson_process_superposition_2",
    "informal_statement": "Let (N^i)_{i ≥ 1} be a family of independent Poisson processes with respective\n        positive intensities (λ_i)_{i ≥ 1}. \n\n        Show that two distinct Poisson processes in this family have no points in common.",
    "lean_statement": "theorem q353_poisson_no_common (μ : Measure Ω) [IsProbabilityMeasure μ] (A B : ℕ → Ω → ℝ)\n    (hAmeas : ∀ i, Measurable (A i)) (hBmeas : ∀ j, Measurable (B j))\n    (hpair : ∀ i j, IndepFun (A i) (B j) μ) (hAcont : ∀ i x, μ {ω | A i ω = x} = 0)\n    (hBcont : ∀ j x, μ {ω | B j ω = x} = 0) :\n    μ {ω | ∃ i j, A i ω = B j ω} = 0 := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 354,
    "problem_name": "stochastic_processes_detailed_balance_stationary_countable",
    "informal_statement": "Let (X_n) be a Markov chain on a countable state space with transition matrix [P]. Suppose there is a set of positive numbers (π_i) with Σ_i π_i = 1 satisfying π_i P_{ij} = π_j P_{ji} for all i, j.\n\nShow that (π_i) is the unique stationary distribution and the chain is reversible.",
    "lean_statement": "theorem q354_detailed_balance_stationary {Ω : Type*} [Countable Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j)\n    (π : Ω → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hdb : ∀ i j, π i * P i j = π j * P j i) :\n    (∀ j, ∑' i, π i * P i j = π j) ∧\n      (∀ π' : Ω → ℝ, (∀ i, 0 ≤ π' i) → (∑' i, π' i = 1) →\n        (∀ j, ∑' i, π' i * P i j = π' j) → π' = π) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 355,
    "problem_name": "stochastic_processes_cramer_limit_exists",
    "informal_statement": "Let X_1,X_2,… be i.i.d. with moment generating function finite on ℝ and support equal to ℝ, and let S_n = n^{-1} Σ_{i=1}^n X_i.\n\nShow that for a > E[X_1] the limit lim_{n→∞} (1/n) log P(S_n ≥ a) exists and equals −I(a).",
    "lean_statement": "theorem q355_cramer_limit_exists (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hInt : ∀ θ : ℝ, Integrable (fun ω => Real.exp (θ * X 0 ω)) μ)\n    (hsupp : ∀ p q : ℝ, p < q → 0 < μ {ω | p < X 0 ω ∧ X 0 ω < q})\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = (n : ℝ)⁻¹ * ∑ i ∈ Finset.range n, X i ω)\n    (I : ℝ → ℝ)\n    (hI : ∀ x, I x = sSup (Set.range (fun θ : ℝ => θ * x - cgf (X 0) μ θ)))\n    (a : ℝ) (ha : ∫ ω, X 0 ω ∂μ < a) :\n    Filter.Tendsto (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) * ENNReal.log (μ {ω | a ≤ S n ω})) atTop\n      (nhds ((-(I a) : ℝ) : EReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 356,
    "problem_name": "stochastic_processes_ctmc_sampled_time_approximation",
    "informal_statement": "Let (X(t)) be a continuous-time Markov chain with bounded exit rates, and let δ satisfy δ ≤ 1/sup_i ν_i. Form the sampled-time chain with transition probabilities q_{ij} δ for i ≠ j and 1 − ν_i δ for i = j.\n\nShow that the sampled-time chain has the same steady-state distribution as the process.",
    "lean_statement": "theorem q356_ctmc_sampled_time_approximation {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (hPloop : ∀ i, P i i = 0)\n    (q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)\n    (νstar : ℝ) (hνstar0 : 0 < νstar) (hνstar : ∀ i, ν i ≤ νstar)\n    (δ : ℝ) (hδ0 : 0 < δ) (hδ : δ ≤ 1 / νstar)\n    (Pstar : S → S → ℝ)\n    (hPstarDiag : ∀ i, Pstar i i = 1 - ν i * δ)\n    (hPstarOff : ∀ i j, i ≠ j → Pstar i j = q i j * δ)\n    (p : S → ℝ) (hpnn : ∀ j, 0 ≤ p j) (hpsum : ∑' j, p j = 1)\n    (hbalance : ∀ j, p j * ν j = ∑' i, p i * q i j) :\n    ∀ j, ∑' i, p i * Pstar i j = p j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 357,
    "problem_name": "stochastic_processes_birth_death_chains",
    "informal_statement": "A birth-and-death chain has state space Ω = {0, 1, ..., N}.\n        The current state can be though of as the size of some population;\n        in a single step of the chain there can be at most one birth or death.\n        The transition probabilities can be specified by {(p_k, r_k, q_k)_{k=0}^N}\n        where p_k + r_k + q_k = 1 for each k and\n        * p_k is the probability of moving from k to k + 1 when 0 ≤ k < N; p_N = 0\n        * q_k is the probability of moving from k to k − 1 when 0 < k ≤ N; q_0 = 0\n        * r_k is the probability of remaining at k when 0 ≤ k ≤ N\n\n        Show that every birth-and-death chain is reversible.",
    "lean_statement": "theorem q357_birth_death_reversible {N : ℕ}\n    (P : Matrix (Fin (N + 1)) (Fin (N + 1)) ℝ) (hP : IsStochastic P)\n    (hbd : ∀ x y, P x y ≠ 0 → (y = x ∨ (x : ℕ) + 1 = (y : ℕ) ∨ (y : ℕ) + 1 = (x : ℕ))) :\n    ∃ π : Fin (N + 1) → ℝ,\n      (∀ x, 0 ≤ π x) ∧ (∑ x, π x = 1) ∧ DetailedBalance P π := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 358,
    "problem_name": "stochastic_processes_hewitt_savage_zero_one_law",
    "informal_statement": "Let ξ_1,ξ_2,… be i.i.d. random variables and let A be an exchangeable event, i.e. an event invariant under every finite permutation of the ξ_i.\n\nShow that P(A) ∈ {0,1}.",
    "lean_statement": "theorem q358_hewitt_savage_zero_one (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)\n    (hmeas : Measurable (fun ω => (fun i => ξ i ω)))\n    (B : Set (ℕ → ℝ)) (hB : MeasurableSet B)\n    (hexch : ∀ σ : Equiv.Perm ℕ, {n | σ n ≠ n}.Finite → (fun x => x ∘ σ) ⁻¹' B = B) :\n    (μ {ω | (fun i => ξ i ω) ∈ B}).toReal = 0 ∨ (μ {ω | (fun i => ξ i ω) ∈ B}).toReal = 1 := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 359,
    "problem_name": "stochastic_processes_long_run",
    "informal_statement": "Let X_n represent the presence of Jellyfishes on the nth day in Tom's favorite Aussie beach,\n        where we assume we have either jellyfishes present (1) or no jellyfishes found (2).\n        \n        The transition matrix is:\n            1   2\n        1 0.9 0.1\n        2 0.3 0.7\n        \n        Show that the long-run fraction of days where no jellyfishes were found is 0.25.",
    "lean_statement": "theorem q359_long_run\n    (P : Matrix (Fin 2) (Fin 2) ℝ) (hP : P = !![0.9, 0.1; 0.3, 0.7])\n    (π : Fin 2 → ℝ) (hπ : IsStationary P π) :\n    π 1 = 0.25 := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 360,
    "problem_name": "stochastic_processes_elementary_renewal_infinite_mean",
    "informal_statement": "Let (N(t)) be a renewal process whose i.i.d. interrenewal times have infinite mean, and let m(t) = E[N(t)].\n\nShow that lim_{t→∞} m(t)/t = 0.",
    "lean_statement": "theorem q360_elementary_renewal_infinite_mean (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hinf : ∫⁻ ω, ENNReal.ofReal (X 0 ω) ∂μ = ⊤)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (m : ℝ → ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ) :\n    Tendsto (fun t => m t / t) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 361,
    "problem_name": "stochastic_processes_hitting_time_3",
    "informal_statement": "Suppose that the chain is irreducible with stationary measure π.\n        Let τ_x be the hitting time: τ_x = min{n ≥ 0 : X_n = x}.\n        Let t_⊙ = sum_x (𝔼_a [τ_x]π(x)).\n        Let t_{hit} = max_{x,y} 𝔼_x [τ_y] ≥ t_⊙.\n\n        Show that t_{hit} ≤ 2 max_w 𝔼_π [τ_w].",
    "lean_statement": "theorem q361_hitting_bound {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    (⨆ p : Ω × Ω, g p.1 p.2) ≤ 2 * ⨆ w, ∑ x, π x * g x w := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 362,
    "problem_name": "stochastic_processes_simple_random_walk_threshold",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. ±1 steps, Pr[+1] = p ≤ 1/2, and let k ≥ 1 be an integer threshold.\n\nShow that Pr[∪_n {S_n ≥ k}] = (p/(1−p))^k.",
    "lean_statement": "theorem q362_srw_threshold (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (p : ℝ) (hp0 : 0 < p) (hp : p ≤ 1 / 2)\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ)\n    (hpm : ∀ i ω, X i ω = 1 ∨ X i ω = -1)\n    (hp1 : ∀ i, (μ {ω | X i ω = 1}).toReal = p)\n    (hm1 : ∀ i, (μ {ω | X i ω = -1}).toReal = 1 - p)\n    (k : ℕ) (hk : 1 ≤ k) :\n    (μ {ω | ∃ n, (k : ℝ) ≤ ∑ i ∈ Finset.range n, X i ω}).toReal\n      = (p / (1 - p)) ^ k := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 363,
    "problem_name": "stochastic_processes_poisson_pmf",
    "informal_statement": "Let (N(t))_{t≥0} be a Poisson process of rate λ > 0.\n\nShow that for each t > 0, N(t) has the Poisson PMF p_{N(t)}(n) = (λt)^n e^{−λt} / n!, n ≥ 0.",
    "lean_statement": "theorem q363_poisson_pmf (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam)\n    (S : ℕ → Ω → ℝ) (hSindep : iIndepFun S μ)\n    (hSexp : ∀ i, HasLaw (S i) (expMeasure (lam : ℝ)) μ)\n    (N : ℝ≥0 → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (τ : ℝ≥0),\n      {ω | n ≤ N τ ω} = {ω | (∑ i ∈ Finset.range n, S i ω) ≤ (τ : ℝ)}) :\n    ∀ t : ℝ≥0, 0 < t → HasLaw (N t) (poissonMeasure (lam * t)) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 364,
    "problem_name": "stochastic_processes_kolmogorov_cycle_criterion_ctmc",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain with transition rates q_{ij}.\n\nShow that the process is reversible if and only if for every cycle of distinct states i_1, i_2, …, i_m, i_1 the rate products around the cycle agree in both directions: q_{i_1 i_2} q_{i_2 i_3} ⋯ q_{i_m i_1} = q_{i_1 i_m} q_{i_m i_{m−1}} ⋯ q_{i_2 i_1}.",
    "lean_statement": "theorem q364_kolmogorov_cycle_criterion\n    {S : Type*} [Fintype S] [DecidableEq S] [Nonempty S]\n    (q : S → S → ℝ) (hqnn : ∀ i j, i ≠ j → 0 ≤ q i j)\n    (hirr : ∀ a b : S, ∃ (c : ℕ → S) (m : ℕ),\n        c 0 = a ∧ c m = b ∧ ∀ t < m, 0 < q (c t) (c (t + 1))) :\n    (∃ π : S → ℝ, (∀ i, 0 < π i) ∧ (∑ i, π i = 1) ∧ ∀ i j, π i * q i j = π j * q j i)\n      ↔ (∀ (m : ℕ) (c : ℕ → S), 0 < m → c m = c 0 →\n          (∏ t ∈ Finset.range m, q (c t) (c (t + 1)))\n            = ∏ t ∈ Finset.range m, q (c (t + 1)) (c t)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 365,
    "problem_name": "stochastic_processes_gamblers_ruin_5",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be Gambler’s ruin with state space Ω = {0, 1, 2, ..., N}:\n        X_0 = k, ℙ[X_{n + 1} = X_n + 1 | X_n] = 1/2, τ = min{n: X_n = 0 or N}.\n\n        Show that that Y = (Yn := X_n^2 − n)_{n ≥ 0} is a martingale.",
    "lean_statement": "theorem q365_gambler_square_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (fun ω => (X n ω) ^ 2) μ)\n    (hstep1 : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| = 1)\n    (hmean : IsConstDrift μ ℱ X 0) :\n    Martingale (fun n ω => (X n ω) ^ 2 - n) ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 366,
    "problem_name": "stochastic_processes_multidim_cramer_upper",
    "informal_statement": "Let X_1,X_2,… be i.i.d. random vectors in ℝ^d with M(θ)=E[e^{⟨θ,X_1⟩}] < ∞ for all θ ∈ ℝ^d, let S_n = Σ_{i=1}^n X_i, and let I(x)=sup_θ(⟨θ,x⟩ − log M(θ)).\n\nShow that for every closed F ⊆ ℝ^d, limsup_{n→∞} (1/n) log P(S_n/n ∈ F) ≤ − inf_{x∈F} I(x).",
    "lean_statement": "theorem q366_multidim_cramer_upper {d : ℕ} (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → EuclideanSpace ℝ (Fin d)) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hInt : ∀ θ : EuclideanSpace ℝ (Fin d), Integrable (fun ω => Real.exp (⟪θ, X 0 ω⟫)) μ)\n    (S : ℕ → Ω → EuclideanSpace ℝ (Fin d)) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (I : EuclideanSpace ℝ (Fin d) → EReal)\n    (hI : ∀ x, I x = ⨆ θ : EuclideanSpace ℝ (Fin d),\n      ((⟪θ, x⟫ - Real.log (∫ ω, Real.exp (⟪θ, X 0 ω⟫) ∂μ) : ℝ) : EReal))\n    (F : Set (EuclideanSpace ℝ (Fin d))) (hF : IsClosed F) :\n    Filter.limsup (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) *\n      ENNReal.log (μ {ω | (n : ℝ)⁻¹ • S n ω ∈ F})) atTop ≤ -(⨅ x ∈ F, I x) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 367,
    "problem_name": "stochastic_processes_ctmc_generator_eigenvalue",
    "informal_statement": "Let (X(t)) be a finite-state irreducible continuous-time Markov chain with generator matrix [Q].\n\nShow that 0 is an eigenvalue of [Q] with right eigenvector e and left eigenvector p (the steady-state vector), and that every other eigenvalue has strictly negative real part.",
    "lean_statement": "theorem q367_ctmc_generator_eigenvalue {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (ν : Ω → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : Matrix Ω Ω ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑ j, P i j = 1)\n    (Q : Matrix Ω Ω ℝ) (hQdiag : ∀ i, Q i i = -ν i)\n    (hQoff : ∀ i j, i ≠ j → Q i j = ν i * P i j)\n    (hirr : ∀ i j, ∃ n : ℕ, 0 < (P ^ n) i j) :\n    (Q *ᵥ (fun _ => (1 : ℝ)) = 0) ∧\n    (∃ p : Ω → ℝ, (∀ i, 0 < p i) ∧ (∑ i, p i = 1) ∧ p ᵥ* Q = 0) ∧\n    (∀ z : ℂ, z ∈ (Q.charpoly.map (algebraMap ℝ ℂ)).roots → z = 0 ∨ z.re < 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 368,
    "problem_name": "stochastic_processes_convex_distance_hull_characterization",
    "informal_statement": "Let D^c_A be the convex distance associated with a set A in a product space, and let V_A(x) be the convex hull of the sign vectors {(1{x_i ≠ y_i})_i : y ∈ A}.\n\nShow that D^c_A(x) = d(0, V_A(x)) = inf_{y ∈ V_A(x)} |y|.",
    "lean_statement": "theorem q368_convex_distance_eq_infdist\n    (n : ℕ) (α : Fin n → Type*)\n    (A : Set (∀ i, α i)) (hAne : A.Nonempty)\n    (x : ∀ i, α i)\n    (S : Set (EuclideanSpace ℝ (Fin n)))\n    (hS : S = {v | ∃ y ∈ A, ∀ i, v i = if x i = y i then (0 : ℝ) else 1}) :\n    (⨆ a : {a : EuclideanSpace ℝ (Fin n) // ‖a‖ = 1},\n        ⨅ y : A, ∑ i, a.val i * (if x i = y.val i then (0 : ℝ) else 1))\n      = Metric.infDist (0 : EuclideanSpace ℝ (Fin n)) (convexHull ℝ S) ∧\n    Metric.infDist (0 : EuclideanSpace ℝ (Fin n)) (convexHull ℝ S)\n      = ⨅ v : convexHull ℝ S, ‖v.val‖ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 369,
    "problem_name": "stochastic_processes_countable_minimal_solution",
    "informal_statement": "Let (X_n) be a Markov chain on a countable state space. Consider nonnegative solutions (a_i) to a_i = P_{ij} + Σ_{k≠j} P_{ik} a_k with a_i ≤ 1.\n\nShow that F_{ij}(∞), the probability of ever reaching j from i, is the minimal nonnegative solution.",
    "lean_statement": "theorem q369_hitting_prob_minimal {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (j : Ω)\n    (hp : ℕ → Ω → ℝ) (hhpnn : ∀ n i, 0 ≤ hp n i)\n    (hhp0 : ∀ i, hp 0 i = 0)\n    (hhp1 : ∀ i, hp 1 i = P i j)\n    (hrec : ∀ n i, 1 ≤ n → hp (n + 1) i = ∑' k, (if k = j then 0 else P i k * hp n k))\n    (F : Ω → ℝ) (hFdef : ∀ i, F i = ∑' n, hp n i)\n    (hFsummable : ∀ i, Summable (fun n => hp n i)) :\n    (∀ i, F i = P i j + ∑' k, (if k = j then 0 else P i k * F k))\n      ∧ (∀ i, 0 ≤ F i)\n      ∧ (∀ i, F i ≤ 1)\n      ∧ (∀ g : Ω → ℝ, (∀ i, 0 ≤ g i) →\n          (∀ i, g i = P i j + ∑' k, (if k = j then 0 else P i k * g k)) →\n          ∀ i, F i ≤ g i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 370,
    "problem_name": "stochastic_processes_reversed_chain_transition",
    "informal_statement": "Let (X_n) be an irreducible positive-recurrent Markov chain with stationary distribution π and transition matrix [P], and define P*_{ij} = π_j P_{ji}/π_i.\n\nShow that [P*] is a stochastic matrix and is the transition matrix of the time-reversed chain in steady state.",
    "lean_statement": "theorem q370_reversed_chain\n    {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)\n    (hπstat : ∀ j, ∑' i, π i * P i j = π j)\n    (Pstar : S → S → ℝ) (hPstar : ∀ i j, Pstar i j = π j * P j i / π i) :\n    (∀ i j, 0 ≤ Pstar i j) ∧ (∀ i, ∑' j, Pstar i j = 1) ∧\n      (∀ j, ∑' i, π i * Pstar i j = π j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 371,
    "problem_name": "stochastic_processes_mdp_dynamic_programming_recursion",
    "informal_statement": "Consider a Markov decision problem in which each state i has a finite set of decisions, decision k in state i giving reward r_i^{(k)} and transition probabilities P_{ij}^{(k)}. Let v*(n) be the vector of maximal expected aggregate rewards over n transitions.\n\nShow that v*(n) satisfies the dynamic programming recursion v*_i(n) = max_k [ r_i^{(k)} + Σ_j P_{ij}^{(k)} v*_j(n−1) ], with v*(0) = 0.",
    "lean_statement": "theorem q371_dp_recursion {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    {K : Type*} [Fintype K] [Nonempty K]\n    (r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))\n    (val : (ℕ → Ω → K) → ℕ → Ω → ℝ)\n    (hval0 : ∀ d i, val d 0 i = 0)\n    (hvalrec : ∀ d n i, val d (n + 1) i =\n      r (d 0 i) i + ∑ j, P (d 0 i) i j * val (fun m => d (m + 1)) n j)\n    (v : ℕ → Ω → ℝ)\n    (hvopt : ∀ n i, v n i = ⨆ d : ℕ → Ω → K, val d n i) :\n    (∀ i, v 0 i = 0) ∧\n      (∀ n i, v (n + 1) i = ⨆ k, (r k i + ∑ j, P k i j * v n j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 372,
    "problem_name": "stochastic_processes_martingale_5",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be a martingale in L^2.\n\n        Show that X is bounded in L^2 if and only if sum_{n ≥ 0} 𝔼[(X_{n + 1} − X_n)^2] < ∞.",
    "lean_statement": "theorem q372_l2_bounded (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (hL2 : ∀ n, MemLp (X n) 2 μ) :\n    (∃ C : ℝ, ∀ n, ∫ ω, (X n ω) ^ 2 ∂μ ≤ C) ↔\n      Summable (fun n => ∫ ω, (X (n + 1) ω - X n ω) ^ 2 ∂μ) := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 373,
    "problem_name": "stochastic_processes_generalized_quadratic_variation",
    "informal_statement": "Let a be a deterministic function in H^2 and let Π be partitions of [0,t] with mesh tending to 0.\n\nShow that Σ_j a(t_j)(B(t_{j+1}) − B(t_j))^2 → ∫_0^t a(s) ds in L^2.",
    "lean_statement": "theorem q373_generalized_quadratic_variation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (t : ℝ) (ht : 0 < t)\n    (a : ℝ → ℝ) (ha : Continuous a)\n    (τ : ℕ → ℕ → ℝ) (N : ℕ → ℕ) (δ : ℕ → ℝ)\n    (hposN : ∀ i, 0 < N i)\n    (hstart : ∀ i, τ i 0 = 0)\n    (hend : ∀ i, τ i (N i) = t)\n    (hmono : ∀ i, ∀ k, k < N i → τ i k < τ i (k + 1))\n    (hmesh : ∀ i, ∀ k, k < N i → τ i (k + 1) - τ i k ≤ δ i)\n    (hmesh0 : Tendsto δ atTop (𝓝 0))\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : ∀ s t u v : ℝ, 0 ≤ s → s ≤ t → t ≤ u → u ≤ v →\n      IndepFun (fun ω => B t ω - B s ω) (fun ω => B v ω - B u ω) μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    Tendsto\n      (fun i => ∫ ω,\n        ((∑ k ∈ Finset.range (N i), a (τ i k) * (B (τ i (k + 1)) ω - B (τ i k) ω) ^ 2)\n          - ∫ s in (0:ℝ)..t, a s) ^ 2 ∂μ)\n      atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 374,
    "problem_name": "stochastic_processes_supermartingale_stopping_time_4",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a supermartingale, and let T be a stopping time which is finite a.s.\n        Let there be an integrable random variable Y such that |Xn| ≤ Y for all n.\n\n        Show that 𝔼[X_T] ≤ 𝔼[X_0].",
    "lean_statement": "theorem q374_super_dominated (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) (Y : Ω → ℝ) (hY : Integrable Y μ)\n    (hdom : ∀ n, ∀ᵐ ω ∂μ, |X n ω| ≤ Y ω) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 375,
    "problem_name": "stochastic_processes_brownian_scaling_2",
    "informal_statement": "Let B be a standard Brownian motion and let c > 0.\n\nShow that cB(t) is a Brownian motion with variance parameter c^2, and that B(ct)/√c is again a standard Brownian motion.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 381 (l6): Brownian scaling. For a standard Brownian motion `B` and `c > 0`:\n* `t ↦ c · B(t)` is a Brownian motion with variance parameter `c²`;\n* `t ↦ B(c · t) / √c` is again a standard Brownian motion. -/\ntheorem q375_brownian_scaling (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (c : ℝ) (hc : 0 < c) :\n    IsBM μ (c ^ 2) (fun t ω => c * B t ω) ∧\n    IsBM μ 1 (fun t ω => B (c * t) ω / Real.sqrt c) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 376,
    "problem_name": "stochastic_processes_convergence_theorem_3",
    "informal_statement": "Suppose that (X_n)_n is a Markov chain with transition matrix P.\n        Assume that P is irreducible and aperiodic.\n\n        Show that there exists a unique stationary distribution π and\n        π(x) > 0 for all x ∈ Ω.",
    "lean_statement": "theorem q376_convergence_unique_positive {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P) :\n    ∃ π : Ω → ℝ, IsStationary P π ∧ (∀ x, 0 < π x) ∧ ∀ π', IsStationary P π' → π' = π := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 377,
    "problem_name": "stochastic_processes_ctmc_steady_state_equations",
    "informal_statement": "Let (X(t)) be an irreducible continuous-time Markov chain with transition rates q_{ij} = ν_i P_{ij} and ν_j = Σ_i q_{ji}.\n\nShow that any probability distribution (p_j) with Σ_j p_j ν_j < ∞ satisfying p_j ν_j = Σ_i p_i q_{ij} for all j is the unique steady-state distribution, and that the embedded chain is then positive-recurrent.",
    "lean_statement": "theorem q377_ctmc_steady_state_equations\n    {S : Type*} [Countable S]\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (hPloop : ∀ i, P i i = 0)\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)\n    (hνbal : ∀ j, ν j = ∑' i, q j i)\n    (hirr : ∀ a b : S, ∃ (c : ℕ → S) (m : ℕ),\n        c 0 = a ∧ c m = b ∧ ∀ t < m, 0 < P (c t) (c (t + 1)))\n    (p : S → ℝ) (hp0 : ∀ j, 0 ≤ p j) (hpsum : ∑' j, p j = 1)\n    (hpν : Summable (fun j => p j * ν j))\n    (hpbal : ∀ j, p j * ν j = ∑' i, p i * q i j) :\n    (∀ p' : S → ℝ, (∀ j, 0 ≤ p' j) → (∑' j, p' j = 1) →\n        Summable (fun j => p' j * ν j) →\n        (∀ j, p' j * ν j = ∑' i, p' i * q i j) → p' = p)\n    ∧ (∃ π : S → ℝ, (∀ j, 0 ≤ π j) ∧ (∑' j, π j = 1) ∧\n        (∀ j, ∑' i, π i * P i j = π j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 378,
    "problem_name": "stochastic_processes_longest_increasing_subsequence",
    "informal_statement": "Let L_n be the length of the longest increasing subsequence of a uniformly random permutation of {1,…,n}, and let m_n be a median of L_n.\n\nShow that P(L_n ≥ m_n + r) ≤ 2 e^{−r^2/(4(m_n+r))} and P(L_n ≤ m_n − r) ≤ 2 e^{−r^2/(4m_n)}.",
    "lean_statement": "theorem q378_lis_concentration (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (hn : 1 ≤ n)\n    (σ : Ω → Equiv.Perm (Fin n))\n    (hunif : ∀ p : Equiv.Perm (Fin n),\n      μ {ω | σ ω = p} = (Fintype.card (Equiv.Perm (Fin n)) : ℝ≥0∞)⁻¹)\n    (L : Ω → ℝ)\n    (hL : ∀ ω, L ω = (↑(sSup {k : ℕ | ∃ f : Fin k → Fin n,\n      StrictMono f ∧ StrictMono (fun j => σ ω (f j))}) : ℝ))\n    (mn : ℝ) (hmnpos : 0 < mn)\n    (hmed_le : (1 : ℝ≥0∞) / 2 ≤ μ {ω | L ω ≤ mn})\n    (hmed_ge : (1 : ℝ≥0∞) / 2 ≤ μ {ω | mn ≤ L ω})\n    (r : ℝ) (hr : 0 ≤ r) :\n    (μ {ω | mn + r ≤ L ω}).toReal ≤ 2 * Real.exp (-(r ^ 2) / (4 * (mn + r))) ∧\n    (μ {ω | L ω ≤ mn - r}).toReal ≤ 2 * Real.exp (-(r ^ 2) / (4 * mn)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 379,
    "problem_name": "stochastic_processes_time_reversal_2",
    "informal_statement": "Let (X_n) be an irreducible Markov chain with transition matrix P and stationary distribution π.\n        Define P' to be P'(x, y) = π(y)P(y, x) / π(x).\n        Let (X'_n) be a Markov chain with transition matrix P'.\n\n        Show that for any x_0, ..., x_n ∈ Ω, we have\n        ℙ_π [X_0 = x_0, ..., X_n = x_n] = ℙ_π [X'_0 = x_n, ..., X'_n = x_0].",
    "lean_statement": "theorem q379_time_reversal_path {Ω : Type*} [Fintype Ω]\n    (P : Matrix Ω Ω ℝ) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x) (hπ : IsStationary P π)\n    (P' : Matrix Ω Ω ℝ) (hP' : IsReversal P π P') (n : ℕ) (x : ℕ → Ω) :\n    π (x 0) * ∏ i ∈ Finset.range n, P (x i) (x (i + 1))\n      = π (x n) * ∏ i ∈ Finset.range n, P' (x (i + 1)) (x i) := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 380,
    "problem_name": "stochastic_processes_stopped_product_martingale_limit",
    "informal_statement": "Let (X_i) be i.i.d. with Pr[X = 2] = Pr[X = 0] = 1/2 and let Z_n = X_1 X_2 … X_n be the corresponding product-form martingale.\n\nShow that E[Z_n] = 1 for every n while Z_n → 0 with probability 1, so that expectation and almost-sure limit need not agree for martingales.",
    "lean_statement": "theorem q380_stopped_product_martingale_limit (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (hval : ∀ i ω, X i ω = 0 ∨ X i ω = 2)\n    (hlaw : (μ {ω | X 0 ω = 2}).toReal = 1 / 2)\n    (hint : ∀ n, Integrable (fun ω => ∏ i ∈ Finset.range (n + 1), X i ω) μ) :\n    (∀ n, ∫ ω, (∏ i ∈ Finset.range (n + 1), X i ω) ∂μ = 1) ∧\n      (∀ᵐ ω ∂μ, Tendsto (fun n => ∏ i ∈ Finset.range (n + 1), X i ω) atTop (𝓝 0)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 381,
    "problem_name": "stochastic_processes_markov_modulated_perron",
    "informal_statement": "Let [A(r)] be the matrix A_{ij}(r) = P_{ij} g_{ij}(r) for an irreducible Markov-modulated random walk with nonnegative entries.\n\nShow that [A(r)] has a largest real eigenvalue ρ(r) > 0 with positive left and right eigenvectors, and that ln ρ(r) plays the role of the semi-invariant generating function γ(r) of an ordinary random walk.",
    "lean_statement": "theorem q381_markov_modulated_perron {σ : Type*} [Fintype σ] [DecidableEq σ] [Nonempty σ]\n    (A : Matrix σ σ ℝ) (hnn : ∀ i j, 0 ≤ A i j) (hirr : IsIrreducible A) :\n    ∃ ρ : ℝ, 0 < ρ ∧\n      (∃ v : σ → ℝ, (∀ i, 0 < v i) ∧ A.mulVec v = fun i => ρ * v i) ∧\n      (∃ u : σ → ℝ, (∀ i, 0 < u i) ∧ A.vecMul u = fun i => ρ * u i) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 382,
    "problem_name": "stochastic_processes_ito_integration_by_parts_deterministic",
    "informal_statement": "Let B be standard Brownian motion relative to its filtration, and let f be a deterministic continuous function of locally bounded variation. Represent its Stieltjes differential by df=df₊−df₋ for continuous increasing functions f₊,f₋.\n\nShow that the Itô integral satisfies ∫_0^t f(s)dB_s=f(t)B_t−∫_(0,t] B_s df(s), and has a continuous martingale version.",
    "lean_statement": "theorem q382_ito_integration_by_parts_deterministic\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (hB : IsBrownianWith μ ℱ B)\n    (f : ℝ → ℝ) (fplus fminus : StieltjesFunction ℝ)\n    (hpcont : Continuous fplus) (hmcont : Continuous fminus)\n    (hf : ∀ t, f t = fplus t - fminus t) :\n    ∃ I : ℝ → Ω → ℝ,\n      IsItoIntegral μ ℱ B (fun t _ => f t) I ∧ Martingale I ℱ μ ∧\n      (∀ᵐ ω ∂μ, Continuous (fun t => I t ω)) ∧\n      (∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t →\n        I t ω = f t * B t ω - (∫ s in Set.Ioc 0 t, B s ω ∂fplus.measure)\n          + (∫ s in Set.Ioc 0 t, B s ω ∂fminus.measure)) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 383,
    "problem_name": "stochastic_processes_stationary_existance_2",
    "informal_statement": "Suppose that P is irreducible.\n        \n        Show that for any x,y ∈ Ω, we have 𝔼_x[τ_y^+] < ∞.",
    "lean_statement": "theorem q383_stationary_existence_finite {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :\n    ∃ g : Ω → Ω → ℝ, IsHittingSolution P g := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 384,
    "problem_name": "stochastic_processes_stationary",
    "informal_statement": "Suppose a family holds a content for their three children.\n        Let X_n represent the child that won the first place for the nth challenge,\n        where the children are named Aaron, Bella, and Chad.\n        After winning a challenge, the contestants are more confident in their abilities,\n        and hence the probabilities they retain their first place on the following challenge are\n        0.7 for Aaron, 0.8 for Bella, and 0.9 for Chad. For those who did not win the prior challenge,\n        the probability they win the next challenge is equal to the other contestants that did\n        not win the prior challenge.\n         \n        Show that the winning percentages of each child stabilize.",
    "lean_statement": "theorem q384_stationary\n    (P : Matrix (Fin 3) (Fin 3) ℝ)\n    (hP : P = !![0.7, 0.15, 0.15; 0.1, 0.8, 0.1; 0.05, 0.05, 0.9]) :\n    ∃ π : Fin 3 → ℝ, IsStationary P π := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 385,
    "problem_name": "stochastic_processes_renewal_count_epoch_duality",
    "informal_statement": "Let (N(t)) be a renewal process with arrival epochs S_n.\n\nShow that the events satisfy {N(t) < n} = {S_n > t}, {N(t) ≥ n} = {S_n ≤ t}, and {N(t) > n} = {S_{n+1} ≤ t}.",
    "lean_statement": "theorem q385_renewal_count_epoch_duality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ)\n    (hgreatest : ∀ (t : ℝ), 0 ≤ t → ∀ (ω : Ω), IsGreatest {n : ℕ | S n ω ≤ t} (N t ω)) :\n    (∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | N t ω < n} = {ω | t < S n ω}) ∧\n    (∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t}) ∧\n    (∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n < N t ω} = {ω | S (n + 1) ω ≤ t}) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 386,
    "problem_name": "stochastic_processes_absolute_value_submartingale",
    "informal_statement": "Let (Z_n) be a martingale.\n\nShow that (|Z_n|) is a submartingale.",
    "lean_statement": "theorem q386_abs_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (hint : ∀ n, Integrable (fun ω => |Z n ω|) μ) :\n    Submartingale (fun n ω => |Z n ω|) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 387,
    "problem_name": "stochastic_processes_gamblers_ruin_6",
    "informal_statement": "Let X = (X_n)_{n ≥ 0} be Gambler’s ruin with state space Ω = {0, 1, 2, ..., N}:\n        X_0 = k, ℙ[X_{n + 1} = X_n + 1 | X_n] = 1/2, τ = min{n: X_n = 0 or N}.\n\n        Show that 𝔼[τ] < ∞.",
    "lean_statement": "theorem q387_gambler_finite_expectation (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (N : ℕ) (hN : 2 ≤ N) (k : ℕ) (hk0 : 0 < k) (hkN : k < N)\n    (X : ℕ → Ω → ℤ) (hX0 : ∀ ω, X 0 ω = (k : ℤ))\n    (τ : Ω → ℕ)\n    (hτmeas : Measurable fun ω => (τ ω : ℝ))\n    (hτabs : ∀ ω, X (τ ω) ω = 0 ∨ X (τ ω) ω = (N : ℤ))\n    (hτfirst : ∀ ω m, m < τ ω → 0 < X m ω ∧ X m ω < (N : ℤ))\n    (hstep : ∀ (n : ℕ) (a : ℤ), 0 < a → a < (N : ℤ) →\n      (μ {ω | X n ω = a ∧ X (n + 1) ω = a + 1}).toReal = (μ {ω | X n ω = a}).toReal / 2 ∧\n      (μ {ω | X n ω = a ∧ X (n + 1) ω = a - 1}).toReal = (μ {ω | X n ω = a}).toReal / 2) :\n    Integrable (fun ω => (τ ω : ℝ)) μ := by sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 388,
    "problem_name": "stochastic_processes_doob_lp_maximal_inequality",
    "informal_statement": "Let (X_n) be a submartingale with E[(X_n^+)^p] < ∞ for some p > 1, and let q satisfy 1/p + 1/q = 1.\n\nShow that E[(max_{0≤k≤n} X_k^+)^p]^{1/p} ≤ q E[(X_n^+)^p]^{1/p}, and that for a martingale E[(max_{0≤k≤n} |X_k|)^p]^{1/p} ≤ q E[|X_n|^p]^{1/p}.",
    "lean_statement": "theorem q388_doob_lp_maximal_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ)\n    (p : ℝ) (hp : 1 < p) (q : ℝ) (hpq : 1 / p + 1 / q = 1) (n : ℕ)\n    (hintp : ∀ k, Integrable (fun ω => (max (X k ω) 0) ^ p) μ)\n    (hintM : ∀ k, Integrable (fun ω => |X k ω| ^ p) μ) :\n    (∫ ω, (runningMax (fun k ω => max (X k ω) 0) n ω) ^ p ∂μ) ^ p⁻¹\n        ≤ q * (∫ ω, (max (X n ω) 0) ^ p ∂μ) ^ p⁻¹ ∧\n      (Martingale X ℱ μ →\n        (∫ ω, (runningMax (fun k ω => |X k ω|) n ω) ^ p ∂μ) ^ p⁻¹\n          ≤ q * (∫ ω, |X n ω| ^ p ∂μ) ^ p⁻¹) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 389,
    "problem_name": "stochastic_processes_square_submartingale",
    "informal_statement": "Let (Z_n) be a martingale with E[Z_n^2] < ∞ for all n.\n\nShow that (Z_n^2) is a submartingale.",
    "lean_statement": "theorem q389_sq_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (hint : ∀ n, Integrable (fun ω => (Z n ω) ^ 2) μ) :\n    Submartingale (fun n ω => (Z n ω) ^ 2) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 390,
    "problem_name": "stochastic_processes_queue_overflow_large_deviations",
    "informal_statement": "Let A_1,A_2,… be i.i.d. non-negative random variables with E[A_1] < C, and suppose M(θ)=E[e^{θA}] < ∞ for some θ ∈ [0,θ_0). Consider the steady-state queue Q_∞ = max_{n≥1} Σ_{k=1}^n (A_k − C).\n\nShow that lim_{B→∞} (1/B) log P(max_{n≥1} Σ_{k=1}^n (A_k − C) ≥ B) = − sup{θ > 0 : M(θ) < e^{θC}}.",
    "lean_statement": "theorem q390_queue_overflow_large_deviations (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (A : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (A i)) (hnn : ∀ i ω, 0 ≤ A i ω)\n    (hindep : iIndepFun A μ) (hident : ∀ i, IdentDistrib (A i) (A 0) μ μ)\n    (C : ℝ) (hmean : ∫ ω, A 0 ω ∂μ < C)\n    (θ₀ : ℝ) (hθ₀ : 0 < θ₀)\n    (hInt : ∀ θ ∈ Set.Ico (0 : ℝ) θ₀, Integrable (fun ω => Real.exp (θ * A 0 ω)) μ)\n    (Q : Ω → ℝ) (hQ : ∀ ω, Q ω = ⨆ n : ℕ, ∑ k ∈ Finset.range (n + 1), (A k ω - C)) :\n    Filter.Tendsto (fun B : ℝ => (B⁻¹ : EReal) * ENNReal.log (μ {ω | B ≤ Q ω})) atTop\n      (nhds (- (⨆ θ ∈ {θ : ℝ | 0 < θ ∧ Integrable (fun ω => Real.exp (θ * A 0 ω)) μ ∧\n        mgf (A 0) μ θ < Real.exp (θ * C)}, (θ : EReal)))) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 391,
    "problem_name": "stochastic_processes_ctmc_chapman_kolmogorov",
    "informal_statement": "Let (X(t)) be a continuous-time Markov chain with transition functions P_{ij}(t).\n\nShow that for all s, t ≥ 0, P_{ij}(s+t) = Σ_k P_{ik}(s) P_{kj}(t).",
    "lean_statement": "theorem q391_ctmc_chapman_kolmogorov (μ : Measure Ω) [IsProbabilityMeasure μ]\n    {S : Type*} [Countable S]\n    (X : ℝ → Ω → S)\n    (Pt : ℝ → S → S → ℝ)\n    (hinit : ∀ i, 0 < (μ {ω | X 0 ω = i}).toReal)\n    (hdef : ∀ (u : ℝ) (i j : S), 0 ≤ u →\n        (μ {ω | X 0 ω = i ∧ X u ω = j}).toReal\n          = Pt u i j * (μ {ω | X 0 ω = i}).toReal)\n    (hmarkov : ∀ (s t : ℝ) (i k j : S), 0 ≤ s → 0 ≤ t →\n        (μ {ω | X 0 ω = i ∧ X s ω = k ∧ X (s + t) ω = j}).toReal\n          = Pt t k j * (μ {ω | X 0 ω = i ∧ X s ω = k}).toReal)\n    (hpartition : ∀ (s t : ℝ) (i j : S), 0 ≤ s → 0 ≤ t →\n        (μ {ω | X 0 ω = i ∧ X (s + t) ω = j}).toReal\n          = ∑' k, (μ {ω | X 0 ω = i ∧ X s ω = k ∧ X (s + t) ω = j}).toReal) :\n    ∀ (s t : ℝ) (i j : S), 0 ≤ s → 0 ≤ t →\n      Pt (s + t) i j = ∑' k, Pt s i k * Pt t k j := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 392,
    "problem_name": "stochastic_processes_countable_limit_recurrence_time",
    "informal_statement": "Let (X_n) be an irreducible positive-recurrent aperiodic Markov chain on a countable state space, and let T_{jj} be the first-return time to state j.\n\nShow that lim_{n→∞} Pr[X_n = j | X_0 = i] = 1/E_j[T_{jj}] for all states i, j.",
    "lean_statement": "theorem q392_limit_recurrence_time {Ω : Type*} [Countable Ω] [DecidableEq Ω]\n    (P : Ω → Ω → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)\n    (p : ℕ → Ω → Ω → ℝ) (hp0 : ∀ n i j, 0 ≤ p n i j) (hp1 : p 1 = P)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j)\n    (f : ℕ → Ω → Ω → ℝ) (hf0 : ∀ i j, f 0 i j = 0) (hfnn : ∀ n i j, 0 ≤ f n i j)\n    (hdecomp : ∀ n i j, 1 ≤ n → p n i j = ∑ m ∈ Finset.Icc 1 n, f m i j * p (n - m) j j)\n    (hirr : ∀ i j, ∃ n, 0 < p n i j)\n    (haper : ∀ j, ∀ d : ℕ, (∀ n, 0 < p n j j → d ∣ n) → d ≤ 1)\n    (μ : Ω → ℝ) (hμ : ∀ j, μ j = ∑' n : ℕ, (n : ℝ) * f n j j)\n    (hposrec : ∀ j, (∑' n, f n j j = 1) ∧ Summable (fun n : ℕ => (n : ℝ) * f n j j)) :\n    ∀ i j : Ω, Tendsto (fun n => p n i j) atTop (𝓝 (1 / μ j)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 393,
    "problem_name": "stochastic_processes_martingale_maximal_continuous_time",
    "informal_statement": "Let (X_t) be a martingale with almost surely continuous paths, and let p ≥ 1 and ε > 0.\n\nShow that P(sup_{0≤t≤T} |X_t| ≥ ε) ≤ E[|X_T|^p]/ε^p.",
    "lean_statement": "theorem q393_martingale_maximal_continuous_time (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ) (hX : Martingale X ℱ μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => X t ω)\n    (p : ℝ) (hp : 1 ≤ p) (ε : ℝ) (hε : 0 < ε) (T : ℝ) (hT : 0 ≤ T)\n    (hint : Integrable (fun ω => |X T ω| ^ p) μ)\n    (S : Ω → ℝ) (hS : ∀ ω, IsLUB ((fun t => |X t ω|) '' Set.Icc 0 T) (S ω)) :\n    (μ {ω | ε ≤ S ω}).toReal ≤ (∫ ω, |X T ω| ^ p ∂μ) / ε ^ p := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 394,
    "problem_name": "stochastic_processes_mdp_bellman_optimality",
    "informal_statement": "Consider a finite-state, finite-decision Markov decision problem in which every stationary policy yields an ergodic unichain. Suppose a scalar g and a vector w satisfy w_i + g = max_k [ r_i^{(k)} + Σ_j P_{ij}^{(k)} w_j ] for every state i.\n\nShow that g is the maximal long-run gain per transition, and that any policy attaining the maximum for every i is an optimal stationary policy.",
    "lean_statement": "theorem q394_bellman_optimality {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    {K : Type*} [Fintype K] [Nonempty K]\n    (r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))\n    (hunichain : ∀ d : Ω → K,\n        IsIrreducible (fun i j => P (d i) i j) ∧ IsAperiodic (fun i j => P (d i) i j))\n    (g : ℝ) (w : Ω → ℝ)\n    (hbellman : ∀ i, w i + g = ⨆ k, (r k i + ∑ j, P k i j * w j)) :\n    (∀ (d : Ω → K) (π : Ω → ℝ),\n        IsStationary (fun i j => P (d i) i j) π → (∑ i, π i * r (d i) i) ≤ g)\n    ∧ (∀ (d : Ω → K) (π : Ω → ℝ),\n        IsStationary (fun i j => P (d i) i j) π →\n        (∀ i, r (d i) i + ∑ j, P (d i) i j * w j = ⨆ k, (r k i + ∑ j, P k i j * w j)) →\n        (∑ i, π i * r (d i) i) = g) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 395,
    "problem_name": "stochastic_processes_poisson_erlang_sum_independence",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ with arrival epochs S_n.\n\nShow that S_m and S_n − S_m are independent for m < n, and that S_n − S_m is Erlang with parameters (n − m, λ).",
    "lean_statement": "theorem q395_poisson_erlang_sum_independence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ) (hlam : 0 < lam)\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ)\n    (hexp : ∀ i, HasLaw (X i) (expMeasure lam) μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (m n : ℕ) (hmn : m < n) :\n    IndepFun (S m) (fun ω => S n ω - S m ω) μ\n      ∧ HasLaw (fun ω => S n ω - S m ω) (gammaMeasure ((n : ℝ) - (m : ℝ)) lam) μ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 396,
    "problem_name": "stochastic_processes_quadratic_variation_fourth_power_vanishes",
    "informal_statement": "Let (X_t) be a continuous martingale and let Π_n be partitions with mesh tending to 0.\n\nShow that E[Σ_j (ΔX_j)^4] → 0 as n → ∞.",
    "lean_statement": "theorem q396_quartic_sum_to_zero (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ)\n    (hmart : Martingale X ℱ μ) (hcont : ∀ ω, Continuous (fun t => X t ω))\n    (M : ℝ) (hbdd : ∀ u ω, |X u ω| ≤ M)\n    (t : ℝ) (ht : 0 < t)\n    (s : ℕ → ℕ → ℝ) (N : ℕ → ℕ)\n    (hs0 : ∀ n, s n 0 = 0) (hsN : ∀ n, s n (N n) = t) (hNpos : ∀ n, 0 < N n)\n    (hmono : ∀ n j, j < N n → s n j ≤ s n (j + 1))\n    (mesh : ℕ → ℝ) (hmesh : ∀ n j, j < N n → s n (j + 1) - s n j ≤ mesh n)\n    (hmesh0 : Tendsto mesh atTop (𝓝 0)) :\n    Tendsto (fun n => ∫ ω, ∑ j ∈ Finset.range (N n),\n      (X (s n (j + 1)) ω - X (s n j) ω) ^ 4 ∂μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 397,
    "problem_name": "stochastic_processes_kolmogorov_martingale_inequality",
    "informal_statement": "Let (Z_n) be a martingale with E[Z_n^2] < ∞ for all n.\n\nShow that for every b > 0 and m ≥ 1, Pr[max_{1 ≤ n ≤ m} |Z_n| ≥ b] ≤ E[Z_m^2]/b^2.",
    "lean_statement": "theorem q397_kolmogorov_martingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (hL2 : ∀ n, MemLp (Z n) 2 μ) (b : ℝ) (hb : 0 < b) (m : ℕ) (hm : 1 ≤ m) :\n    (μ {ω | b ≤ runningMax (fun n ω => |Z n ω|) m ω}).toReal\n      ≤ (∫ ω, (Z m ω) ^ 2 ∂μ) / b ^ 2 := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 398,
    "problem_name": "stochastic_processes_residual_life_limit_distribution",
    "informal_statement": "Let (N(t)) be a renewal process with finite mean interrenewal time X̄ and non-arithmetic interrenewal distribution, and let Y(t) be the residual life at time t.\n\nShow that lim_{t→∞} Pr[Y(t) ≤ y] = (1/X̄) ∫_0^y Pr[X > τ] dτ.",
    "lean_statement": "theorem q398_residual_life_limit_distribution (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (hnonarith : ¬ ∃ d : ℝ, 0 < d ∧ ∀ᵐ ω ∂μ, ∃ k : ℕ, X 0 ω = (k : ℝ) * d)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (Y : ℝ → Ω → ℝ)\n    (hY : ∀ t ω, Y t ω = (∑ i ∈ Finset.range (N t ω + 1), X i ω) - t) :\n    ∀ y : ℝ, 0 ≤ y →\n      Tendsto (fun t => (μ {ω | Y t ω ≤ y}).toReal)\n        atTop (𝓝 ((1 / xbar) * ∫ τ in Set.Ioc (0 : ℝ) y, (μ {ω | τ < X 0 ω}).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 399,
    "problem_name": "stochastic_processes_overflow_exponent_identity",
    "informal_statement": "Let A be a non-negative random variable with moment generating function M, rate function I(a)=sup_θ(θa − log M(θ)), and let C > E[A].\n\nShow that sup({0} ∪ {θ > 0 : M(θ) is finite and M(θ) < e^{Cθ}}) = inf_{t>0} t · I(C + 1/t).",
    "lean_statement": "theorem q399_overflow_exponent_identity (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (A : Ω → ℝ) (hA : Measurable A) (hnn : ∀ ω, 0 ≤ A ω) (hint : Integrable A μ)\n    (C : ℝ) (hmean : ∫ ω, A ω ∂μ < C)\n    (I : ℝ → EReal)\n    (hI : ∀ a, I a = ⨆ θ ∈ {θ : ℝ | Integrable (fun ω => Real.exp (θ * A ω)) μ},\n      ((θ * a - cgf A μ θ : ℝ) : EReal)) :\n    (⨆ θ ∈ {θ : ℝ | θ = 0 ∨ (0 < θ ∧ Integrable (fun ω => Real.exp (θ * A ω)) μ ∧\n        mgf A μ θ < Real.exp (C * θ))}, (θ : EReal))\n      = ⨅ t ∈ {t : ℝ | 0 < t}, (t : EReal) * I (C + 1 / t) := by sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 400,
    "problem_name": "stochastic_processes_poisson_age_conditional",
    "informal_statement": "Let (N(t)) be a Poisson process of rate λ with residual life Y(t) and age Z(t) at time t.\n\nShow that Pr[Y(t) > x | Z(t) = s] = e^{−λx}, i.e. the residual life is exponential of rate λ and independent of the current age.\n\nMeasure age from the last arrival, using the origin if there has been no arrival: 0≤Z(t)≤t and Z(0)=0. Tail identities at deterministic times hold almost surely, allowing the null event of an arrival exactly at a boundary.",
    "lean_statement": "theorem q400_poisson_age_conditional (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (t : ℝ≥0)\n    (N : ℝ≥0 → Ω → ℕ) (hN : IsPoissonProcess μ lam N)\n    (Y Z : Ω → ℝ) (hYmeas : Measurable Y) (hZmeas : Measurable Z)\n    (hYdef : ∀ y : ℝ≥0, ∀ᵐ ω ∂μ,\n      ((y : ℝ) < Y ω ↔ N (t + y) ω - N t ω = 0))\n    (hZrange : ∀ᵐ ω ∂μ, Z ω ∈ Set.Icc (0 : ℝ) (t : ℝ))\n    (hZdef : ∀ s : ℝ≥0, s < t → ∀ᵐ ω ∂μ,\n      ((s : ℝ) < Z ω ↔ N t ω - N (t - s) ω = 0)) :\n    HasLaw Y (expMeasure (lam : ℝ)) μ ∧ IndepFun Y Z μ := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 401,
    "problem_name": "stochastic_processes_stationary_uniqueness_3",
    "informal_statement": "Suppose that P is irreducible.\n\n        Show that there exists a unique stationary distribution that satisfies π(x) = 1/(𝔼_x [τ_x^+]), ∀x ∈ Ω.",
    "lean_statement": "theorem q401_stationary_uniqueness_formula {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (g : Ω → Ω → ℝ) (hg : IsHittingSolution P g) :\n    ∃! π : Ω → ℝ, IsStationary P π ∧ ∀ x, π x = 1 / returnTime P g x := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 402,
    "problem_name": "stochastic_processes_prokhorov_theorem",
    "informal_statement": "Let (P_n) be a tight sequence of probability measures on a Polish space.\n\nShow that (P_n) has a weakly convergent subsequence.",
    "lean_statement": "theorem q402_prokhorov_theorem\n    {E : Type*} [MeasurableSpace E] [MetricSpace E] [PolishSpace E] [BorelSpace E]\n    (Ps : ℕ → ProbabilityMeasure E)\n    (htight : IsTightMeasureSet {μ : Measure E | ∃ n, μ = (Ps n : Measure E)}) :\n    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∃ P : ProbabilityMeasure E,\n      Tendsto (fun n => Ps (φ n)) atTop (𝓝 P) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 403,
    "problem_name": "stochastic_processes_ctmc_kolmogorov_forward",
    "informal_statement": "Let (X(t)) be a continuous-time Markov chain with transition functions P_{ij}(t) = Pr[X(t)=j | X(0)=i], transition rates q_{ij}, and exit rates ν_j.\n\nShow that the forward Kolmogorov equations hold: dP_{ij}(t)/dt = Σ_{k≠j} P_{ik}(t) q_{kj} − P_{ij}(t) ν_j.",
    "lean_statement": "theorem q403_ctmc_kolmogorov_forward {S : Type*} [Countable S]\n    (ν : S → ℝ) (hν : ∀ i, 0 < ν i)\n    (P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)\n    (hPstoch : ∀ i, ∑' j, P i j = 1)\n    (q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)\n    (Pt : ℝ → S → S → ℝ)\n    (hPt0diag : ∀ i, Pt 0 i i = 1) (hPt0off : ∀ i j, i ≠ j → Pt 0 i j = 0)\n    (hCK : ∀ (s t : ℝ), 0 ≤ s → 0 ≤ t → ∀ i j, Pt (s + t) i j = ∑' k, Pt s i k * Pt t k j)\n    (hgen_diag : ∀ i, HasDerivAt (fun t => Pt t i i) (-ν i) 0)\n    (hgen_off : ∀ i j, i ≠ j → HasDerivAt (fun t => Pt t i j) (q i j) 0)\n    (hfsum : ∀ (t : ℝ) (i j : S), Summable (fun k => Pt t i k * q k j)) :\n    ∀ (t : ℝ) (i j : S), 0 ≤ t →\n      HasDerivAt (fun t => Pt t i j)\n        ((∑' k, Pt t i k * q k j) - Pt t i j * ν j) t := by sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 404,
    "problem_name": "stochastic_processes_brownian_nowhere_differentiable",
    "informal_statement": "Let B be a standard Brownian motion.\n\nShow that almost surely, for every t ≥ 0, limsup_{h→0} |(B(t+h) − B(t))/h| = ∞, so that Brownian paths are nowhere differentiable.",
    "lean_statement": "theorem q404_brownian_nowhere_differentiable (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω) :\n    ∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t →\n      Filter.limsup (fun h : ℝ => ((|(B (t + h) ω - B t ω) / h| : ℝ) : EReal))\n        (𝓝[≠] (0 : ℝ)) = ⊤ := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 405,
    "problem_name": "stochastic_processes_time_average_duration",
    "informal_statement": "Let (N(t)) be a renewal process with i.i.d. interrenewal times X having finite E[X] and E[X^2], and let X̃(τ) be the duration of the interrenewal interval containing time τ.\n\nShow that lim_{t→∞} (1/t) ∫_0^t X̃(τ) dτ = E[X^2]/E[X] with probability 1.",
    "lean_statement": "theorem q405_time_average_duration (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (m1 m2 : ℝ) (hm1 : ∫ ω, X 0 ω ∂μ = m1) (hm2 : ∫ ω, (X 0 ω) ^ 2 ∂μ = m2) (hpm : 0 < m1)\n    (hint2 : Integrable (fun ω => (X 0 ω) ^ 2) μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (D : ℝ → Ω → ℝ) (hD : ∀ (t : ℝ) (ω : Ω), D t ω = S (N t ω + 1) ω - S (N t ω) ω) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, D τ ω)\n      atTop (𝓝 (m2 / m1)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 406,
    "problem_name": "stochastic_processes_gg1_delay_threshold",
    "informal_statement": "Consider a G/G/1 queue. Let U_i = Y_{i−1} − X_i where Y_{i−1} is a service time and X_i an interarrival time, and let W_n be the queueing delay of the nth arrival.\n\nShow that Pr[W_n ≥ α] equals the probability that the associated random walk Σ U_i crosses the threshold α by trial n, and that Pr[W ≥ α] = lim_{n→∞} Pr[W_n ≥ α].",
    "lean_statement": "theorem q406_gg1_delay_threshold (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (U : ℕ → Ω → ℝ) (hindep : iIndepFun U μ) (hid : ∀ i, IdentDistrib (U i) (U 0) μ μ)\n    (W : ℕ → Ω → ℝ) (hW0 : ∀ ω, W 0 ω = 0)\n    (hWrec : ∀ n ω, W (n + 1) ω = max 0 (W n ω + U (n + 1) ω))\n    (α : ℝ) (hα : 0 < α) :\n    (∀ n, (μ {ω | α ≤ W n ω}).toReal\n        = (μ {ω | ∃ i, i ≤ n ∧ α ≤ ∑ j ∈ Finset.range i, U j ω}).toReal)\n      ∧ Tendsto (fun n => (μ {ω | α ≤ W n ω}).toReal) atTop\n          (𝓝 ((μ {ω | ∃ i, α ≤ ∑ j ∈ Finset.range i, U j ω}).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 407,
    "problem_name": "stochastic_processes_martingale_convergence_theorem",
    "informal_statement": "Let (Z_n) be a martingale satisfying E[|Z_n|] ≤ M < ∞ for all n.\n\nShow that Z_n converges with probability 1 to a random variable Z with E[|Z|] < ∞.",
    "lean_statement": "theorem q407_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)\n    (M : ℝ) (hbdd : ∀ n, ∫ ω, |Z n ω| ∂μ ≤ M) :\n    ∃ Zinf : Ω → ℝ, Integrable Zinf μ ∧\n      ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 408,
    "problem_name": "stochastic_processes_delayed_renewal_equation_alt",
    "informal_statement": "Let (N(t)) be a delayed renewal process with first-epoch distribution G and subsequent interrenewal distribution F; let m(t) = E[N(t)] and let m̂(t) be the expected number of renewals by time t for the ordinary renewal process with interarrival distribution F.\n\nShow that m(t) = G(t) + ∫_[0,t] m̂(t−x) dG(x), including any atom of G at zero.",
    "lean_statement": "theorem q408_delayed_renewal_equation_alt (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos0 : ∀ ω, 0 ≤ X 0 ω) (hpos : ∀ i, 1 ≤ i → ∀ ω, 0 < X i ω)\n    (hindep : iIndepFun X μ)\n    (hident : ∀ i, 1 ≤ i → IdentDistrib (X i) (X 1) μ μ)\n    (N : ℝ → Ω → ℕ)\n    (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | (∑ i ∈ Finset.range n, X i ω) ≤ t})\n    (G : StieltjesFunction ℝ) (hG : ∀ x, G x = (μ {ω | X 0 ω ≤ x}).toReal)\n    (m : StieltjesFunction ℝ) (hm : ∀ t, m t = ∫ ω, (N t ω : ℝ) ∂μ)\n    (Y : ℕ → Ω → ℝ) (hYpos : ∀ i ω, 0 < Y i ω) (hYindep : iIndepFun Y μ)\n    (hYident : ∀ i, IdentDistrib (Y i) (X 1) μ μ)\n    (Nhat : ℝ → Ω → ℕ)\n    (hNhat : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ Nhat t ω} = {ω | (∑ i ∈ Finset.range n, Y i ω) ≤ t})\n    (mhat : StieltjesFunction ℝ) (hmhat : ∀ t, mhat t = ∫ ω, (Nhat t ω : ℝ) ∂μ) :\n    ∀ t : ℝ, 0 ≤ t → m t = G t + ∫ x in Set.Icc (0 : ℝ) t, mhat (t - x) ∂G.measure := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 409,
    "problem_name": "stochastic_processes_nonhomogeneous_poisson",
    "informal_statement": "Let N be a measurable nondecreasing right-continuous counting process on [0,∞), starting at zero, with jointly independent increments. Let λ≥0 be continuous. Assume P(N(s+δ)−N(s)=1)=λ(s)δ+o(δ) and P(N(s+δ)−N(s)≥2)=o(δ), with both errors uniform in s on every compact time interval.\n\nShow that N(b)−N(a) has Poisson law with mean ∫_a^b λ(u)du for 0≤a≤b.",
    "lean_statement": "theorem q409_nonhomogeneous_poisson (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (N : ℝ≥0 → Ω → ℕ) (hNcount : IsCountingProcess μ N)\n    (hindep : HasIndepIncrements N μ)\n    (lam : ℝ≥0 → ℝ≥0) (hlam : Continuous lam)\n    (hsmall : ∀ T : ℝ≥0, 0 < T → ∀ ε : ℝ, 0 < ε →\n      ∃ d : ℝ≥0, 0 < d ∧ ∀ s δ : ℝ≥0, 0 < δ → δ < d → s + δ ≤ T →\n        |(μ {ω | N (s + δ) ω - N s ω = 1}).toReal - (lam s : ℝ) * (δ : ℝ)|\n          ≤ ε * (δ : ℝ) ∧\n        (μ {ω | 2 ≤ N (s + δ) ω - N s ω}).toReal ≤ ε * (δ : ℝ)) :\n    ∀ a b : ℝ≥0, a ≤ b →\n      HasLaw (fun ω => N b ω - N a ω)\n        (poissonMeasure (Real.toNNReal (∫ u in (a:ℝ)..(b:ℝ), (lam u.toNNReal : ℝ)))) μ := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 410,
    "problem_name": "stochastic_processes_poisson_process_3",
    "informal_statement": "Customers arrive in a supermarket as a Poisson process with intensity N.\n        There are N aisles in the supermarket and each customer selects one of them\n        at random, independently of the other customers.\n        Let X_t^N denote the proportion of aisles which remain empty by time t.\n        \n        Show that X_t^N → e^{-t}, in probability as N → ∞.",
    "lean_statement": "theorem q410_poisson_process_empty_aisles\n    {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (t : ℝ) (ht : 0 < t)\n    (M : ℕ → Ω → ℕ)\n    (hM : ∀ N, HasLaw (M N) (poissonMeasure (Real.toNNReal ((N : ℝ) * t))) μ)\n    (A : ℕ → ℕ → Ω → ℕ)\n    (hA : ∀ N j a, a < N → (μ {ω | A N j ω = a}).toReal = 1 / (N : ℝ))\n    (hAindep : ∀ N, iIndepFun (fun j => A N j) μ)\n    (hMA : ∀ N, IndepFun (M N) (fun ω => (fun j => A N j ω)) μ)\n    (X : ℕ → Ω → ℝ)\n    (hX : ∀ N ω, X N ω =\n      (((Finset.range N).filter\n          (fun a => ∀ j ∈ Finset.range (M N ω), A N j ω ≠ a)).card : ℝ) / (N : ℝ)) :\n    TendstoInMeasure μ X atTop (fun _ => Real.exp (-t)) := by sorry",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 411,
    "problem_name": "stochastic_processes_brownian_two_sided_exit",
    "informal_statement": "Let B be a standard Brownian motion, let a < 0 < b, and let T_a, T_b be the hitting times of a and b with T_{ab} = min(T_a,T_b).\n\nShow that P(T_{ab} = T_a) = |b|/(|a|+|b|) and P(T_{ab} = T_b) = |a|/(|a|+|b|).",
    "lean_statement": "theorem q411_brownian_two_sided_exit (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ)\n    (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)\n    (hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →\n      HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ)\n    (hindep : HasIndepIncrements B μ)\n    (hcont : ∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n    (a b : ℝ) (ha : a < 0) (hb : 0 < b)\n    (τ : Ω → ℝ) (hτ0 : ∀ ω, 0 ≤ τ ω)\n    (hin : ∀ ω, ∀ t : ℝ, 0 ≤ t → t < τ ω → a < B t ω ∧ B t ω < b)\n    (hexit : ∀ ω, B (τ ω) ω = a ∨ B (τ ω) ω = b) :\n    (μ {ω | B (τ ω) ω = a}).toReal = |b| / (|a| + |b|) ∧\n    (μ {ω | B (τ ω) ω = b}).toReal = |a| / (|a| + |b|) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 412,
    "problem_name": "stochastic_processes_backward_martingale_limit_identification",
    "informal_statement": "Let (X_n)_{n≤0} be a backward martingale with respect to a decreasing filtration (F_n), and let F_{−∞} = ∩_n F_n.\n\nShow that the almost sure limit satisfies X_{−∞} = E[X_0 | F_{−∞}].",
    "lean_statement": "theorem q412_backward_martingale_limit_identification (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : ℕ → MeasurableSpace Ω) (hsub : ∀ n, ℱ n ≤ m0)\n    (hdec : ∀ n, ℱ (n + 1) ≤ ℱ n)\n    (X : ℕ → Ω → ℝ) (hadap : ∀ n, StronglyMeasurable[ℱ n] (X n))\n    (hint : ∀ n, Integrable (X n) μ)\n    (hmart : ∀ n, μ[X n | ℱ (n + 1)] =ᵐ[μ] X (n + 1)) :\n    ∃ Xinf : Ω → ℝ,\n      (∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧\n      Xinf =ᵐ[μ] μ[X 0 | ⨅ n, ℱ n] := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 413,
    "problem_name": "stochastic_processes_stationary_distribution_convergence_3",
    "informal_statement": "Given an irreducible Markov chain that is positive recurrent and aperiodic,\n\n        Show that lim_n ℙ_x [X_n = y] = π(y) > 0, for all x, y.",
    "lean_statement": "theorem q413_distribution_convergence {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)\n    (haper : IsAperiodic P)\n    (π : Ω → ℝ) (hπ : IsStationary P π) :\n    ∀ x y, Tendsto (fun n => (P ^ n) x y) atTop (𝓝 (π y)) ∧ 0 < π y := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 414,
    "problem_name": "stochastic_processes_supermartingale",
    "informal_statement": "Consider biased gambler’s ruin: at each step, the gambler gains one dollar\n        with probability p and losses one dollar with probability (1 − p).\n        Let X_n be the money in purse at time n.\n\n        Show that if p < 1/2, then (X_n) is a supermartingale.",
    "lean_statement": "theorem q414_gambler_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : p < 1 / 2)\n    (hstep : IsConstDrift μ ℱ X (2 * p - 1)) :\n    Supermartingale X ℱ μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 415,
    "problem_name": "stochastic_processes_supermartingale_stopping_time_5",
    "informal_statement": "Let (X_n)_{n ≥ 0} be a supermartingale, and let T be a stopping time with 𝔼[T] < ∞.\n        You are given that X has bounded increments, i.e. ∃M > 0 such that |X_{n+1} − X_n| ≤ M for all n.\n\n        Show that 𝔼[X_T] ≤ 𝔼[X_0].",
    "lean_statement": "theorem q415_super_bdd_incr (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (T : Ω → ℕ)\n    (hT : IsStoppingTime ℱ (natStop T)) (hET : Integrable (fun ω => (T ω : ℝ)) μ)\n    (M : ℝ) (hincr : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| ≤ M) :\n    ∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 416,
    "problem_name": "stochastic_processes_positive_recurrence",
    "informal_statement": "Suppose that P is irreducible.\n        \n        Show that the following two conditions are equivalent:\n        (i) 𝔼_x [τ_x^+] < ∞ for some x ∈ Ω.\n        (ii) 𝔼_x [τ_y^+] < ∞ for all x,y ∈ Ω.",
    "lean_statement": "theorem q416_positive_recurrence {Ω : Type*} [Countable Ω] [DecidableEq Ω] [Nonempty Ω]\n    (P : Ω → Ω → ℝ) (hPnn : ∀ x y, 0 ≤ P x y) (hPstoch : ∀ x, HasSum (P x) 1)\n    (hirr : ∀ x y, ∃ n : ℕ, 0 < nstep P n x y)\n    (m : Ω → Ω → ℝ≥0∞)\n    (hm : ∀ x y, m x y = if x = y then 0 else 1 + ∑' z, ENNReal.ofReal (P x z) * m z y)\n    (hmmin : ∀ M : Ω → Ω → ℝ≥0∞,\n        (∀ x y, M x y = if x = y then 0 else 1 + ∑' z, ENNReal.ofReal (P x z) * M z y) →\n        ∀ x y, m x y ≤ M x y) :\n    (∃ x, (1 + ∑' z, ENNReal.ofReal (P x z) * m z x) < ⊤) ↔ (∀ x y, m x y < ⊤) := by sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 417,
    "problem_name": "stochastic_processes_brownian_hitting_time_laplace",
    "informal_statement": "Let B be a standard Brownian motion, a > 0, and T_a = inf{t ≥ 0 : B(t) = a}.\n\nShow that for every λ > 0, E[e^{−λ T_a}] = e^{−√(2λ) a}.",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 388 (l6): Laplace transform of the first-passage time. Let `B` be a standard Brownian motion,\n`a > 0`, and `T_a = inf{t ≥ 0 : B(t) = a}` the first-passage time, here abstracted as `T : Ω → ℝ`\ncharacterised by: `T ≥ 0`, `B(T) = a` a.s. (the level is hit at `T`), and no earlier hit\n(`∀ t ∈ [0, T), B(t) ≠ a`, a.s.). Then for every `λ > 0`, `E[e^{−λ T_a}] = e^{−√(2λ)·a}`. -/\ntheorem q417_first_passage_laplace (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (a : ℝ) (ha : 0 < a)\n    (T : Ω → ℝ) (hTmeas : Measurable T)\n    (hTnn : ∀ ω, 0 ≤ T ω)\n    (hThit : ∀ᵐ ω ∂μ, B (T ω) ω = a)\n    (hTfirst : ∀ᵐ ω ∂μ, ∀ t : ℝ, 0 ≤ t → t < T ω → B t ω ≠ a)\n    (lam : ℝ) (hlam : 0 < lam) :\n    ∫ ω, Real.exp (-lam * T ω) ∂μ = Real.exp (-Real.sqrt (2 * lam) * a) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 418,
    "problem_name": "stochastic_processes_random_walk_max_tail_uniform",
    "informal_statement": "Let S_k be a random walk with i.i.d. mean-zero increments of variance σ^2.\n\nShow that lim_{λ→∞} limsup_n λ^2 P(max_{k≤n} |S_k| ≥ λσ√n) = 0.",
    "lean_statement": "theorem q418_random_walk_max_tail_uniform (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)\n    (hint : Integrable (ξ 0) μ) (hL2 : Integrable (fun ω => (ξ 0 ω) ^ 2) μ)\n    (σ : ℝ) (hσ : 0 < σ)\n    (hmean : ∫ ω, ξ 0 ω ∂μ = 0) (hvar : ∫ ω, (ξ 0 ω) ^ 2 ∂μ = σ ^ 2)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, ξ i ω) :\n    Tendsto\n      (fun lam : ℝ =>\n        limsup (fun n : ℕ =>\n          lam ^ 2 *\n            (μ {ω | ∃ k, 1 ≤ k ∧ k ≤ n ∧ lam * σ * Real.sqrt (n : ℝ) ≤ |S k ω|}).toReal) atTop)\n      atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 419,
    "problem_name": "stochastic_processes_martingale_l2_orthogonal_increments",
    "informal_statement": "Let (Z_n) be a martingale in L^2.\n\nShow that its increments are pairwise orthogonal: E[(Z_{n+1} − Z_n)(Z_{m+1} − Z_m)] = 0 for n ≠ m.",
    "lean_statement": "theorem q419_martingale_l2_orthogonal_increments (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (hL2 : ∀ n, MemLp (Z n) 2 μ) :\n    ∀ n m, n ≠ m → ∫ ω, (Z (n + 1) ω - Z n ω) * (Z (m + 1) ω - Z m ω) ∂μ = 0 := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 420,
    "problem_name": "stochastic_processes_time_reversal_3",
    "informal_statement": "Let (X_n) be an irreducible Markov chain with transition matrix P and stationary distribution π.\n        Define P' to be P'(x, y) = π(y)P(y, x) / π(x).\n\n        Show that P' is stochastic.",
    "lean_statement": "theorem q420_time_reversal_stochastic {Ω : Type*} [Fintype Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x)\n    (hπ : IsStationary P π) (P' : Matrix Ω Ω ℝ) (hP' : IsReversal P π P') :\n    IsStochastic P' := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 421,
    "problem_name": "stochastic_processes_backward_martingale_convergence",
    "informal_statement": "Let (X_n)_{n≤0} be a backward martingale, i.e. a martingale indexed by the non-positive integers with respect to a decreasing filtration.\n\nShow that X_n converges almost surely and in L^1 as n → −∞.",
    "lean_statement": "theorem q421_backward_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : ℕ → MeasurableSpace Ω) (hsub : ∀ n, ℱ n ≤ m0)\n    (hdec : ∀ n, ℱ (n + 1) ≤ ℱ n)\n    (X : ℕ → Ω → ℝ) (hadap : ∀ n, StronglyMeasurable[ℱ n] (X n))\n    (hint : ∀ n, Integrable (X n) μ)\n    (hmart : ∀ n, μ[X n | ℱ (n + 1)] =ᵐ[μ] X (n + 1)) :\n    ∃ Xinf : Ω → ℝ,\n      (∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧\n      Tendsto (fun n => ∫ ω, |X n ω - Xinf ω| ∂μ) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 422,
    "problem_name": "stochastic_processes_tightness_criterion_continuous_paths",
    "informal_statement": "Let (P_n) be probability measures on C[0,T] and let w_x(δ) denote the modulus of continuity of a path x. Suppose (i) lim_n P_n(|x(0)| ≥ a) = 0 for some a, and (ii) for every ε > 0, lim_{δ→0} limsup_n P_n(w_x(δ) > ε) = 0.\n\nShow that (P_n) is tight.",
    "lean_statement": "theorem q422_tightness_criterion_continuous_paths\n    (T : ℝ) (hT : 0 < T)\n    [MeasurableSpace C(↥(Set.Icc (0 : ℝ) T), ℝ)]\n    [BorelSpace C(↥(Set.Icc (0 : ℝ) T), ℝ)]\n    (P : ℕ → Measure C(↥(Set.Icc (0 : ℝ) T), ℝ))\n    (hP : ∀ n, IsProbabilityMeasure (P n))\n    (wmod : C(↥(Set.Icc (0 : ℝ) T), ℝ) → ℝ → ℝ)\n    (hwmod : ∀ x δ, 0 ≤ δ → wmod x δ = sSup {r : ℝ |\n      ∃ s t : ↥(Set.Icc (0 : ℝ) T), |(s : ℝ) - t| ≤ δ ∧ r = |x s - x t|})\n    (a : ℝ)\n    (hi : Tendsto (fun n => (P n) {x | a ≤ |x ⟨0, le_rfl, hT.le⟩|}) atTop (𝓝 0))\n    (hii : ∀ ε : ℝ, 0 < ε →\n      Tendsto (fun δ : ℝ => limsup (fun n => (P n) {x | ε < wmod x δ}) atTop)\n        (𝓝[>] (0 : ℝ)) (𝓝 0)) :\n    IsTightMeasureSet {μ : Measure C(↥(Set.Icc (0 : ℝ) T), ℝ) | ∃ n, μ = P n} := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 423,
    "problem_name": "stochastic_processes_quadratic_variation_continuous_martingale",
    "informal_statement": "Let (X_t) ∈ M^{2,c} be a continuous square-integrable martingale and let Π_n be partitions of [0,t] with mesh Δ(Π_n) → 0.\n\nShow that Σ_j (X_{t_{j+1}} − X_{t_j})^2 converges in probability to ⟨X_t⟩, the non-decreasing part in the Doob–Meyer decomposition of X_t^2.",
    "lean_statement": "theorem q423_quadratic_variation_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ)\n    (hmart : Martingale X ℱ μ) (hcont : ∀ ω, Continuous (fun t => X t ω))\n    (hL2 : ∀ t, MemLp (X t) 2 μ)\n    (t : ℝ) (ht : 0 < t)\n    (Q : ℝ → Ω → ℝ)\n    (hDM : Martingale (fun u ω => (X u ω) ^ 2 - Q u ω) ℱ μ)\n    (hQmono : ∀ᵐ ω ∂μ, Monotone (fun u => Q u ω))\n    (hQcont : ∀ ω, Continuous (fun u => Q u ω))\n    (hQ0 : ∀ᵐ ω ∂μ, Q 0 ω = 0)\n    (s : ℕ → ℕ → ℝ) (N : ℕ → ℕ)\n    (hs0 : ∀ n, s n 0 = 0) (hsN : ∀ n, s n (N n) = t) (hNpos : ∀ n, 0 < N n)\n    (hmono : ∀ n j, j < N n → s n j ≤ s n (j + 1))\n    (mesh : ℕ → ℝ) (hmesh : ∀ n j, j < N n → s n (j + 1) - s n j ≤ mesh n)\n    (hmesh0 : Tendsto mesh atTop (𝓝 0)) :\n    TendstoInMeasure μ\n      (fun n ω => ∑ j ∈ Finset.range (N n), (X (s n (j + 1)) ω - X (s n j) ω) ^ 2)\n      atTop (fun ω => Q t ω) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 424,
    "problem_name": "stochastic_processes_tilted_sum_relation",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X, semi-invariant generating function γ(r), and tilted PMF q_{X,r}(x) = p_X(x) exp(rx − γ(r)).\n\nShow that the n-fold tilted sum satisfies q_{S_n,r}(s) = p_{S_n}(s) exp(rs − n γ(r)).",
    "lean_statement": "theorem q424_tilted_sum_relation\n    {k : ℕ} (v : Fin k → ℝ) (p : Fin k → ℝ)\n    (hp0 : ∀ x, 0 ≤ p x) (hpsum : ∑ x, p x = 1)\n    (r : ℝ) (γ : ℝ) (hγ : γ = Real.log (∑ x, p x * Real.exp (r * v x)))\n    (q : Fin k → ℝ) (hq : ∀ x, q x = p x * Real.exp (r * v x - γ))\n    (n : ℕ) (s : ℝ) :\n    (∑ w ∈ Finset.univ.filter (fun w : Fin n → Fin k => (∑ i, v (w i)) = s), ∏ i, q (w i))\n      = (∑ w ∈ Finset.univ.filter (fun w : Fin n → Fin k => (∑ i, v (w i)) = s), ∏ i, p (w i))\n        * Real.exp (r * s - (n : ℝ) * γ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 425,
    "problem_name": "stochastic_processes_talagrand_median_concentration",
    "informal_statement": "Let F be a functional on a product space satisfying the hypotheses of Talagrand's convex-distance inequality, and let m_F be a median of F.\n\nShow that P(|F − m_F| ≥ r) ≤ 4 e^{−r^2/4}.",
    "lean_statement": "theorem q425_talagrand_median_concentration\n    (n : ℕ) (α : Fin n → Type*) [∀ i, MeasurableSpace (α i)]\n    (μs : ∀ i, Measure (α i)) [∀ i, IsProbabilityMeasure (μs i)]\n    (F : (∀ i, α i) → ℝ) (hFmeas : Measurable F)\n    (w : (∀ i, α i) → Fin n → ℝ) (hw : ∀ x i, 0 ≤ w x i)\n    (hLip : ∀ x y, |F x - F y| ≤ ∑ i, w x i * (if x i = y i then (0 : ℝ) else 1))\n    (hw2 : ∀ x, ∑ i, (w x i) ^ 2 ≤ 1)\n    (mF : ℝ)\n    (hmed_le : (1 : ℝ≥0∞) / 2 ≤ (Measure.pi μs) {x | F x ≤ mF})\n    (hmed_ge : (1 : ℝ≥0∞) / 2 ≤ (Measure.pi μs) {x | mF ≤ F x})\n    (r : ℝ) (hr : 0 ≤ r) :\n    ((Measure.pi μs) {x | r ≤ |F x - mF|}).toReal ≤ 4 * Real.exp (-(r ^ 2) / 4) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 426,
    "problem_name": "stochastic_processes_renewal_strong_law_count",
    "informal_statement": "Let (N(t)) be a renewal counting process whose i.i.d. interrenewal times have finite mean X̄, and let S_n be the nth renewal epoch.\n\nShow that lim_{n→∞} S_n/n = X̄ with probability 1 implies lim_{t→∞} N(t)/t = 1/X̄ with probability 1.",
    "lean_statement": "theorem q426_renewal_strong_law_count (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hint : Integrable (X 0) μ) (hindep : iIndepFun X μ)\n    (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (xbar : ℝ) (hxbar : 0 < xbar) (hmean : ∫ ω, X 0 ω ∂μ = xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ), 0 ≤ t → {ω | n ≤ N t ω} = {ω | S n ω ≤ t})\n    (hSLLN : ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => S n ω / n) atTop (𝓝 xbar)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun t => (N t ω : ℝ) / t) atTop (𝓝 (1 / xbar)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 427,
    "problem_name": "stochastic_processes_mm1_expected_queue_number",
    "informal_statement": "Consider an M/M/1 queue in steady state with ρ = λ/μ < 1.\n\nShow that the expected number of customers waiting in queue (excluding the one in service) is ρ^2/(1 − ρ).",
    "lean_statement": "theorem q427_mm1_expected_queue_number\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)\n    (p : ℕ → ℝ) (hp : ∀ i, p i = (1 - ρ) * ρ ^ i) :\n    ∑' k : ℕ, (k : ℝ) * p (k + 1) = ρ ^ 2 / (1 - ρ) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 428,
    "problem_name": "stochastic_processes_detailed_balance",
    "informal_statement": "Show that any distribution π satisfying the detailed balance equations is stationary for P.",
    "lean_statement": "theorem q428_detailed_balance {Ω : Type*} [Fintype Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ)\n    (hπnn : ∀ x, 0 ≤ π x) (hπ1 : ∑ x, π x = 1) (hdb : DetailedBalance P π) :\n    IsStationary P π := by sorry",
    "true_to_source": "literal",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 429,
    "problem_name": "stochastic_processes_rate_function_poisson",
    "informal_statement": "Let X be Poisson with parameter λ and let I(a)=sup_θ(θa − log M(θ)).\n\nShow that I(a) = a log(a/λ) − (a − λ) for a > λ.",
    "lean_statement": "theorem q429_rate_function_poisson (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam : ℝ≥0) (hlam : 0 < lam) (X : Ω → ℕ) (hlaw : HasLaw X (poissonMeasure lam) μ)\n    (a : ℝ) (ha : (lam : ℝ) < a) :\n    sSup ((fun θ : ℝ => θ * a - cgf (fun ω => (X ω : ℝ)) μ θ) ''\n        {θ : ℝ | Integrable (fun ω => Real.exp (θ * (X ω : ℝ))) μ})\n      = a * Real.log (a / (lam : ℝ)) - (a - (lam : ℝ)) := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 430,
    "problem_name": "stochastic_processes_poisson_superposition_2",
    "informal_statement": "Let (N^1(t)) and (N^2(t)) be independent Poisson processes of rates λ_1 and λ_2.\n\nShow that the superposition N(t) = N^1(t) + N^2(t) is a Poisson process of rate λ_1 + λ_2.",
    "lean_statement": "theorem q430_poisson_superposition (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam1 lam2 : ℝ≥0) (N1 N2 : ℝ≥0 → Ω → ℕ)\n    (hN1 : IsPoissonProcess μ lam1 N1) (hN2 : IsPoissonProcess μ lam2 N2)\n    (hindep : IndepFun (fun ω => (fun t => N1 t ω)) (fun ω => (fun t => N2 t ω)) μ) :\n    IsPoissonProcess μ (lam1 + lam2) (fun t ω => N1 t ω + N2 t ω) := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Poisson processes"
  },
  {
    "question_id": 431,
    "problem_name": "stochastic_processes_skorokhod_reflection_formula",
    "informal_statement": "Let x ∈ D[0,∞) with x(0) ≥ 0 and no downward jumps, and let (y,z) be the Skorokhod reflection pair.\n\nShow that y(t) = sup_{0≤s≤t}(−x(s))^+ and z(t) = x(t) + sup_{0≤s≤t}(−x(s))^+.",
    "lean_statement": "theorem q431_skorokhod_reflection_formula\n    (x : ℝ≥0 → ℝ) (hx : Continuous x) (hx0 : 0 ≤ x 0)\n    (y z : ℝ≥0 → ℝ)\n    (hycont : Continuous y) (hymono : Monotone y) (hy0 : y 0 = 0)\n    (hz : ∀ t, z t = x t + y t) (hznn : ∀ t, 0 ≤ z t)\n    (hcompl : ∀ s t : ℝ≥0, s ≤ t → (∀ u ∈ Set.Icc s t, 0 < z u) → y s = y t) :\n    (∀ t : ℝ≥0, y t = ⨆ s ∈ Set.Icc (0 : ℝ≥0) t, max (- x s) 0) ∧\n    (∀ t : ℝ≥0, z t = x t + ⨆ s ∈ Set.Icc (0 : ℝ≥0) t, max (- x s) 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 432,
    "problem_name": "stochastic_processes_perron_frobenius",
    "informal_statement": "Let B be a nonnegative primitive matrix, meaning B^m has all entries strictly positive for some positive integer m.\n\nShow that B has a real eigenvalue ρ > 0 with |λ| ≤ ρ for every eigenvalue λ of B, and that the corresponding left and right eigenvectors can be taken strictly positive and are unique up to scaling.",
    "lean_statement": "theorem q432_perron_frobenius {N : Type*} [Fintype N] [DecidableEq N] [Nonempty N]\n    (B : Matrix N N ℝ) (hnn : ∀ i j, 0 ≤ B i j)\n    (hprim : ∃ m : ℕ, 1 ≤ m ∧ ∀ i j, 0 < (B ^ m) i j) :\n    ∃ ρ : ℝ, 0 < ρ ∧\n      (∀ lam : ℂ, lam ∈ (B.charpoly.map (algebraMap ℝ ℂ)).roots → ‖lam‖ ≤ ρ) ∧\n      (∃ v : N → ℝ, (∀ i, 0 < v i) ∧ B *ᵥ v = ρ • v ∧\n        ∀ v' : N → ℝ, B *ᵥ v' = ρ • v' → ∃ c : ℝ, v' = c • v) ∧\n      (∃ w : N → ℝ, (∀ i, 0 < w i) ∧ w ᵥ* B = ρ • w ∧\n        ∀ w' : N → ℝ, w' ᵥ* B = ρ • w' → ∃ c : ℝ, w' = c • w) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 433,
    "problem_name": "stochastic_processes_doob_meyer_decomposition",
    "informal_statement": "Let (X_t) be a continuous non-negative submartingale.\n\nShow that X_t = A_t + M_t where (M_t) is a continuous martingale and (A_t) is almost surely non-decreasing, continuous, with A_0 = 0, and that this decomposition is almost surely unique.",
    "lean_statement": "theorem q433_doob_meyer_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℝ m0) (X : ℝ → Ω → ℝ)\n    (hsub : Submartingale X ℱ μ)\n    (hcont : ∀ ω, Continuous (fun t => X t ω))\n    (hnn : ∀ t ω, 0 ≤ X t ω) :\n    ∃ A M : ℝ → Ω → ℝ,\n      Martingale M ℱ μ ∧\n      (∀ ω, Continuous (fun t => M t ω)) ∧\n      (∀ᵐ ω ∂μ, Continuous (fun t => A t ω)) ∧\n      (∀ᵐ ω ∂μ, Monotone (fun t => A t ω)) ∧\n      (∀ᵐ ω ∂μ, A 0 ω = 0) ∧\n      (∀ t, X t =ᵐ[μ] fun ω => A t ω + M t ω) ∧\n      (∀ A' M' : ℝ → Ω → ℝ, Martingale M' ℱ μ → (∀ ω, Continuous (fun t => M' t ω)) →\n        (∀ᵐ ω ∂μ, Continuous (fun t => A' t ω)) → (∀ᵐ ω ∂μ, Monotone (fun t => A' t ω)) →\n        (∀ᵐ ω ∂μ, A' 0 ω = 0) → (∀ t, X t =ᵐ[μ] fun ω => A' t ω + M' t ω) →\n        ∀ t, A' t =ᵐ[μ] A t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 434,
    "problem_name": "stochastic_processes_jackson_network_outputs",
    "informal_statement": "Consider queue 1 of an M/M/1 network in equilibrium, with arrival rate 0<λ<μ₁. Use its standard uniformization: an independent Poisson clock of rate λ+μ₁ drives a reflected nearest-neighbor chain, with upward probability λ/(λ+μ₁), downward probability μ₁/(λ+μ₁) when nonempty, and holding at zero otherwise. The chain starts in its geometric stationary law. Downward moves are departures. Route each departure independently to queue 2 with probability Q∈(0,1), and to queue 3 otherwise, using marks independent of the queue and clock.\n\nShow that departures form a Poisson process of rate λ and that the two routed outputs are independent Poisson processes of rates Qλ and (1−Q)λ.",
    "lean_statement": "theorem q434_jackson_burke_split (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (lam mu1 : ℝ≥0) (hlam : 0 < lam) (hstab : lam < mu1)\n    (Q : ℝ) (hQ0 : 0 < Q) (hQ1 : Q < 1)\n    (K : ℕ → Ω → ℕ) (hKmeas : ∀ n, Measurable (K n))\n    (P : ℕ → ℕ → ℝ)\n    (hP : ∀ i j, P i j =\n      if j = i + 1 then (lam : ℝ) / ((lam : ℝ) + mu1)\n      else if i = j + 1 then (mu1 : ℝ) / ((lam : ℝ) + mu1)\n      else if i = 0 ∧ j = 0 then (mu1 : ℝ) / ((lam : ℝ) + mu1)\n      else 0)\n    (hKlaw : HasChainLaw μ K (fun i => (1 - (lam : ℝ) / mu1) * ((lam : ℝ) / mu1) ^ i) P)\n    (H : ℝ≥0 → Ω → ℕ) (hH : IsPoissonProcess μ (lam + mu1) H)\n    (hKH : IndepFun (fun ω => (fun n => K n ω)) (fun ω => (fun t => H t ω)) μ)\n    (J : ℕ → Ω → ℕ) (hJmeas : ∀ n, Measurable (J n))\n    (hJbin : ∀ n ω, J n ω ≤ 1) (hJlaw : ∀ n, (μ {ω | J n ω = 1}).toReal = Q)\n    (hJindep : iIndepFun J μ)\n    (hJqueue : IndepFun (fun ω => (fun n => J n ω))\n      (fun ω => ((fun n => K n ω), (fun t => H t ω))) μ)\n    (D N2 N3 : ℝ≥0 → Ω → ℕ)\n    (hD : ∀ t ω, D t ω = ∑ k ∈ Finset.range (H t ω),\n      if K (k + 1) ω + 1 = K k ω then 1 else 0)\n    (hN2 : ∀ t ω, N2 t ω = ∑ k ∈ Finset.range (D t ω), J k ω)\n    (hN3 : ∀ t ω, N3 t ω = D t ω - N2 t ω) :\n    IsPoissonProcess μ lam D ∧\n      IsPoissonProcess μ (Q.toNNReal * lam) N2 ∧\n      IsPoissonProcess μ ((1 - Q).toNNReal * lam) N3 ∧\n      IndepFun (fun ω => (fun t => N2 t ω)) (fun ω => (fun t => N3 t ω)) μ := by\n  sorry\n",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 435,
    "problem_name": "stochastic_processes_age_chain_stationary",
    "informal_statement": "Consider the age Markov chain associated with a renewal process having i.i.d. interrenewal times W on the positive integers, where the state is the current age and transitions either increment the age or reset to 0 at a renewal.\n\nShow that the stationary distribution is π_n = Pr[W > n] / E[W].",
    "lean_statement": "theorem q435_age_chain_stationary\n    (w : ℕ → ℝ) (hw0 : w 0 = 0) (hwnn : ∀ k, 0 ≤ w k) (hwsum : ∑' k, w k = 1)\n    (G : ℕ → ℝ) (hG : ∀ n, G n = ∑' k, if n < k then w k else 0)\n    (EW : ℝ) (hEW : EW = ∑' k : ℕ, (k : ℝ) * w k) (hEWpos : 0 < EW)\n    (P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j)\n    (hPup : ∀ n, P n (n + 1) = G (n + 1) / G n)\n    (hPreset : ∀ n, P n 0 = w (n + 1) / G n)\n    (hPother : ∀ n j, j ≠ 0 → j ≠ n + 1 → P n j = 0)\n    (π : ℕ → ℝ) (hπ : ∀ n, π n = G n / EW) :\n    (∀ n, 0 ≤ π n) ∧ (∑' n, π n = 1) ∧ (∀ j, ∑' i, π i * P i j = π j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 436,
    "problem_name": "stochastic_processes_convex_function_submartingale",
    "informal_statement": "Let (Z_n) be a martingale and let h be a convex function with E[|h(Z_n)|] < ∞ for all n.\n\nShow that (h(Z_n)) is a submartingale.",
    "lean_statement": "theorem q436_convex_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)\n    (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (h : ℝ → ℝ) (hconv : ConvexOn ℝ Set.univ h)\n    (hint : ∀ n, Integrable (fun ω => h (Z n ω)) μ) :\n    Submartingale (fun n ω => h (Z n ω)) ℱ μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 437,
    "problem_name": "stochastic_processes_skorokhod_reflection_existence",
    "informal_statement": "Let x ∈ D[0,∞) with x(0) ≥ 0 and no downward jumps.\n\nShow that there is a unique pair (y,z) with y ∈ C[0,∞) non-decreasing, y(0)=0, z = x + y ≥ 0, and ∫_0^∞ z dy = 0.",
    "lean_statement": "theorem q437_skorokhod_reflection_existence\n    (x : ℝ≥0 → ℝ) (hx : Continuous x) (hx0 : 0 ≤ x 0) :\n    ∃! yz : (ℝ≥0 → ℝ) × (ℝ≥0 → ℝ),\n      Continuous yz.1 ∧\n      Monotone yz.1 ∧\n      yz.1 0 = 0 ∧\n      (∀ t, yz.2 t = x t + yz.1 t) ∧\n      (∀ t, 0 ≤ yz.2 t) ∧\n      (∀ s t : ℝ≥0, s ≤ t → (∀ u ∈ Set.Icc s t, 0 < yz.2 u) → yz.1 s = yz.1 t) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Weak convergence & functional limits"
  },
  {
    "question_id": 438,
    "problem_name": "stochastic_processes_stopped_supermartingale_bounds",
    "informal_statement": "Let (Z_n) be a supermartingale and J a stopping trial with stopped process (Z_n*).\n\nShow that E[Z_1] ≥ E[Z_n*] ≥ E[Z_n] for all n.",
    "lean_statement": "theorem q438_stopped_supermartingale_bounds (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]\n    (Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)\n    (J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :\n    ∫ ω, Z n ω ∂μ ≤ ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧\n      ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ≤ ∫ ω, Z 0 ω ∂μ := by\n  sorry",
    "true_to_source": "literal",
    "topic": "Martingales & stopping"
  },
  {
    "question_id": 439,
    "problem_name": "stochastic_processes_joint_crossing_time_threshold",
    "informal_statement": "Let (S_n) be a random walk with i.i.d. steps X and semi-invariant generating function γ(r), let α > 0 be a threshold, and let n* = α/γ'(r*) where γ(r*) = 0.\n\nShow that for n < n*, Pr[J ≤ n, S_J ≥ α] ≤ exp(n γ(r_o) − r_o α) for an appropriate r_o > r*, and correspondingly for n > n* with r_o < r*.",
    "lean_statement": "theorem q439_joint_crossing_time_threshold (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (r_o : ℝ) (hr : 0 < r_o) (hint : Integrable (fun ω => Real.exp (r_o * X 0 ω)) μ)\n    (γ : ℝ) (hγ : γ = cgf (X 0) μ r_o) (hγnn : 0 ≤ γ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (α : ℝ) (hα : 0 < α) (J : Ω → ℕ)\n    (hJfp : ∀ ω, ∀ k, k < J ω → S k ω < α) (n : ℕ) :\n    (μ {ω | J ω ≤ n ∧ α ≤ S (J ω) ω}).toReal ≤ Real.exp ((n : ℝ) * γ - r_o * α) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 440,
    "problem_name": "stochastic_processes_yule_classification",
    "informal_statement": "Consider the pure-birth (Yule) process with holding-time rate iλ in state i started from one individual, viewed as a countable-state Markov process.\n\nShow that the process is transient (every state is visited at most finitely often with probability 1).",
    "lean_statement": "theorem q440_yule_transient\n    (P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j)\n    (hPup : ∀ i, P i (i + 1) = 1)\n    (hPoff : ∀ i j, j ≠ i + 1 → P i j = 0)\n    (p : ℕ → ℕ → ℕ → ℝ)\n    (hp0 : ∀ n i j, 0 ≤ p n i j)\n    (hpid : ∀ i j, p 0 i j = if i = j then 1 else 0)\n    (hp1 : p 1 = P)\n    (hCK : ∀ n i j, p (n + 1) i j = ∑' k, p n i k * p 1 k j) :\n    ∀ x : ℕ, (∀ n, 1 ≤ n → p n x x = 0) ∧ Summable (fun n => p n x x) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 441,
    "problem_name": "stochastic_processes_residual_life_distribution",
    "informal_statement": "Let (N(t)) be a renewal process with i.i.d. interrenewal times X of finite mean X̄, and let Y(τ) be the residual life at time τ.\n\nShow that the time-average distribution of residual life satisfies lim_{t→∞} (1/t) ∫_0^t 1{Y(τ) ≤ y} dτ = (1/X̄) ∫_0^y Pr[X > x] dx with probability 1.",
    "lean_statement": "theorem q441_residual_life_distribution (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hpos : ∀ i ω, 0 < X i ω)\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (Xbar : ℝ) (hmean : ∫ ω, X 0 ω ∂μ = Xbar) (hXpos : 0 < Xbar)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)\n    (N : ℝ → Ω → ℕ) (hN : ∀ (n : ℕ) (t : ℝ) (ω : Ω), 0 ≤ t → (n ≤ N t ω ↔ S n ω ≤ t))\n    (Y : ℝ → Ω → ℝ) (hY : ∀ (t : ℝ) (ω : Ω), Y t ω = S (N t ω + 1) ω - t) :\n    ∀ y : ℝ, 0 ≤ y → ∀ᵐ ω ∂μ, Tendsto\n      (fun t : ℝ => (1 / t) * ∫ τ in (0:ℝ)..t, (if Y τ ω ≤ y then (1:ℝ) else 0))\n      atTop (𝓝 ((1 / Xbar) * ∫ x in (0:ℝ)..y, (μ {ω | x < X 0 ω}).toReal)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Renewal processes"
  },
  {
    "question_id": 442,
    "problem_name": "stochastic_processes_empirical_deviation_martingale",
    "informal_statement": "Let X_1,…,X_n be independent and let g be an average-type functional with bounded differences d_i = 1/n for each i.\n\nShow that P(|g(X) − E[g(X)]| > t) ≤ 2 exp(−2nt^2).",
    "lean_statement": "theorem q442_empirical_deviation_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (n : ℕ) (hn : 1 ≤ n) (Z : Fin n → Ω → ℝ) (hZindep : iIndepFun Z μ) (hZmeas : ∀ i, Measurable (Z i))\n    (g : (Fin n → ℝ) → ℝ) (hgmeas : Measurable g)\n    (hbd : ∀ x y : Fin n → ℝ,\n      |g x - g y| ≤ ∑ i, (1 / (n : ℝ)) * (if x i = y i then 0 else 1))\n    (G : Ω → ℝ) (hG : ∀ ω, G ω = g (fun i => Z i ω))\n    (t : ℝ) (ht : 0 < t) :\n    (μ {ω | t < |G ω - ∫ ω, G ω ∂μ|}).toReal\n      ≤ 2 * Real.exp (-2 * (n : ℝ) * t ^ 2) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 443,
    "problem_name": "stochastic_processes_brownian_joint_max_endpoint",
    "informal_statement": "Let B be a standard Brownian motion and let M(t) = sup_{0≤s≤t} B(s).\n\nShow that for a > 0 and y ≥ 0, P(M(t) ≥ a, B(t) ≤ a − y) = P(B(t) > a + y).",
    "lean_statement": "/-- Brownian motion with variance parameter `σ²`, faithfully abstracted (Mathlib has no\nBrownian-motion object): `B : ℝ → Ω → ℝ` starts at `0` a.s., has independent Gaussian increments\n`B t − B s ∼ N(0, σ²·(t − s))` over `0 ≤ s ≤ t`, disjoint increments are independent, and paths are\na.s. continuous. Standard Brownian motion is the case `σ² = 1`. -/\ndef IsBM (μ : Measure Ω) (σ2 : ℝ) (B : ℝ → Ω → ℝ) : Prop :=\n  (∀ᵐ ω ∂μ, B 0 ω = 0) ∧\n  (∀ s t : ℝ, 0 ≤ s → s ≤ t →\n    HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (σ2 * (t - s)).toNNReal) μ) ∧\n  HasIndepIncrements B μ ∧\n  (∀ᵐ ω ∂μ, Continuous fun t => B t ω)\n\n/-- 387 (l6): the joint reflection identity underlying the reflection principle. For a standard\nBrownian motion `B`, `t > 0`, level `a > 0` and `y ≥ 0`, with `M(t) = sup_{0 ≤ s ≤ t} B(s)`\n(`sSup` of the image of `[0, t]`):\n`P(M(t) ≥ a, B(t) ≤ a − y) = P(B(t) > a + y)`. -/\ntheorem q443_reflection_joint (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (B : ℝ → Ω → ℝ) (hB : IsBM μ 1 B) (t : ℝ) (ht : 0 < t) (a : ℝ) (ha : 0 < a)\n    (y : ℝ) (hy : 0 ≤ y) :\n    (μ {ω | a ≤ sSup ((fun s => B s ω) '' Set.Icc 0 t) ∧ B t ω ≤ a - y}).toReal\n        = (μ {ω | a + y < B t ω}).toReal := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 444,
    "problem_name": "stochastic_processes_mm1_process_stationary",
    "informal_statement": "Consider an M/M/1 queue as a continuous-time birth-death process with arrival rate λ, service rate μ, and ρ = λ/μ < 1.\n\nShow that the steady-state distribution is p_i = (1 − ρ) ρ^i and that the expected number in the system is E[X(t)] = ρ/(1 − ρ).",
    "lean_statement": "theorem q444_mm1_stationary\n    (lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)\n    (ρ : ℝ) (hρ : ρ = lam / mu) (hρ1 : ρ < 1)\n    (p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)\n    (hbal0 : p 0 * lam = p 1 * mu)\n    (hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu) :\n    (∀ i, p i = (1 - ρ) * ρ ^ i) ∧ (∑' i : ℕ, (i : ℝ) * p i = ρ / (1 - ρ)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 445,
    "problem_name": "stochastic_processes_steady_state_average_independent_start",
    "informal_statement": "Let (X_n) be an ergodic finite-state Markov chain with steady-state vector π and let f be a function on the state space.\n\nShow that lim_{n→∞} (1/n) Σ_{m=1}^n f(X_m) = Σ_i π_i f(i) with probability 1, independent of the initial distribution.",
    "lean_statement": "theorem q445_steady_state_average {S : Type*} [Fintype S] [DecidableEq S]\n    (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (P : Matrix S S ℝ) (π f : S → ℝ)\n    (hP : IsStochastic P) (hirr : IsIrreducible P) (haper : IsAperiodic P)\n    (hπ : IsStationary P π)\n    (X : ℕ → Ω → S) (x0 : S)\n    (hchain : HasChainLaw μ X (fun s => if s = x0 then 1 else 0) (fun i j => P i j)) :\n    ∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * ∑ m ∈ Finset.range n, f (X m ω))\n      atTop (𝓝 (∑ i, π i * f i)) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 446,
    "problem_name": "stochastic_processes_cramer_upper_bound",
    "informal_statement": "Let X_1,X_2,… be i.i.d. real random variables with moment generating function M, let S_n = n^{-1} Σ_{i=1}^n X_i, and let I(x)=sup_θ(θx − log M(θ)).\n\nShow that for every closed set F ⊆ ℝ, limsup_{n→∞} (1/n) log P(S_n ∈ F) ≤ − inf_{x∈F} I(x).",
    "lean_statement": "theorem q446_cramer_upper_bound (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (X : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (X i))\n    (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)\n    (S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = (n : ℝ)⁻¹ * ∑ i ∈ Finset.range n, X i ω)\n    (I : ℝ → EReal)\n    (hI : ∀ x, I x = ⨆ θ ∈ {θ : ℝ | Integrable (fun ω => Real.exp (θ * X 0 ω)) μ},\n      ((θ * x - cgf (X 0) μ θ : ℝ) : EReal))\n    (F : Set ℝ) (hF : IsClosed F) :\n    Filter.limsup (fun n : ℕ => ((n : ℝ)⁻¹ : EReal) * ENNReal.log (μ {ω | S n ω ∈ F})) atTop\n      ≤ -(⨅ x ∈ F, I x) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Random walks & large deviations"
  },
  {
    "question_id": 447,
    "problem_name": "stochastic_processes_ito_integral_linearity_simple",
    "informal_statement": "Let X and Y be simple adapted processes in L^2 and let α,β be constants.\n\nShow that the Itô integral of simple processes is linear: I_t(αX + βY) = α I_t(X) + β I_t(Y).",
    "lean_statement": "theorem q447_ito_simple_linear (μ : Measure Ω)\n    (B : ℝ → Ω → ℝ) (s : ℕ → ℝ) (N : ℕ)\n    (ξ η : ℕ → Ω → ℝ) (a b : ℝ)\n    (I : (ℕ → Ω → ℝ) → Ω → ℝ)\n    (hI : ∀ (c : ℕ → Ω → ℝ) ω,\n      I c ω = ∑ j ∈ Finset.range N, c j ω * (B (s (j + 1)) ω - B (s j) ω)) :\n    ∀ ω, I (fun j ω => a * ξ j ω + b * η j ω) ω = a * I ξ ω + b * I η ω := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Brownian motion & stochastic calculus"
  },
  {
    "question_id": 448,
    "problem_name": "stochastic_processes_jackson_expected_number",
    "informal_statement": "Consider an open Jackson network in steady state with ρ_j = λ_j/μ_j < 1 for every queue j.\n\nShow that the expected number of customers at queue j is ρ_j/(1 − ρ_j) and that the expected total number in the network is Σ_j ρ_j/(1 − ρ_j).",
    "lean_statement": "theorem q448_jackson_expected_number (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (k : ℕ) (ρ : Fin k → ℝ) (hρ0 : ∀ j, 0 < ρ j) (hρ1 : ∀ j, ρ j < 1)\n    (M : Ω → Fin k → ℕ)\n    (hlaw : ∀ j n, (μ {ω | M ω j = n}).toReal = (1 - ρ j) * ρ j ^ n)\n    (hint : ∀ j, Integrable (fun ω => (M ω j : ℝ)) μ) :\n    (∀ j, ∫ ω, (M ω j : ℝ) ∂μ = ρ j / (1 - ρ j)) ∧\n      ∫ ω, (∑ j, (M ω j : ℝ)) ∂μ = ∑ j, ρ j / (1 - ρ j) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Continuous-time Markov & queues"
  },
  {
    "question_id": 449,
    "problem_name": "stochastic_processes_finite_chain_transient_finite_visits",
    "informal_statement": "Let (X_n) be a finite-state Markov chain and let i be a transient state.\n\nShow that the number of visits to i is finite with probability 1 and has finite expectation.",
    "lean_statement": "theorem q449_finite_chain_transient_finite_visits {Ω : Type*} [Fintype Ω] [DecidableEq Ω]\n    (P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (i : Ω)\n    (ρ : Ω → Ω → ℝ) (hρnn : ∀ x y, 0 ≤ ρ x y)\n    (hρ : ∀ x y, ρ x y = ∑ z, P x z * (if z = y then 1 else ρ z y))\n    (hρmin : ∀ σ : Ω → Ω → ℝ, (∀ x y, 0 ≤ σ x y) →\n        (∀ x y, σ x y = ∑ z, P x z * (if z = y then 1 else σ z y)) → ∀ x y, ρ x y ≤ σ x y)\n    (htrans : ρ i i < 1) :\n    ∀ x : Ω, Summable (fun n : ℕ => (P ^ n) x i)\n      ∧ Tendsto (fun n : ℕ => (P ^ n) x i) atTop (𝓝 0) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Markov chains (finite & countable)"
  },
  {
    "question_id": 450,
    "problem_name": "stochastic_processes_de_finetti_theorem",
    "informal_statement": "Let (ξ_n) be an exchangeable sequence of random variables.\n\nShow that conditionally on the exchangeable σ-field, the ξ_n are i.i.d., so that the law of the sequence is a mixture of i.i.d. laws.",
    "lean_statement": "theorem q450_de_finetti (μ : Measure Ω) [IsProbabilityMeasure μ]\n    (ξ : ℕ → Ω → ℝ) (hmeas : ∀ i, Measurable (ξ i))\n    (hexch : ∀ σ : Equiv.Perm ℕ, {n | σ n ≠ n}.Finite →\n      IdentDistrib (fun ω => (fun i => ξ i ω)) (fun ω => (fun i => ξ (σ i) ω)) μ μ) :\n    ∃ 𝓔 : MeasurableSpace Ω, 𝓔 ≤ m0 ∧\n      (∀ (k : ℕ) (f : Fin k → ℝ → ℝ), (∀ j, Measurable (f j)) →\n          (∀ j, ∃ C, ∀ x, |f j x| ≤ C) →\n        μ[fun ω => ∏ j, f j (ξ (j : ℕ) ω) | 𝓔]\n          =ᵐ[μ] fun ω => ∏ j, (μ[fun ω => f j (ξ (j : ℕ) ω) | 𝓔]) ω) ∧\n      (∀ (f : ℝ → ℝ), Measurable f → (∃ C, ∀ x, |f x| ≤ C) → ∀ i j : ℕ,\n        μ[fun ω => f (ξ i ω) | 𝓔] =ᵐ[μ] μ[fun ω => f (ξ j ω) | 𝓔]) := by\n  sorry",
    "true_to_source": "abstract",
    "topic": "Martingales & stopping"
  }
]