Skip to content

Commit 43697dc

Browse files
fix
1 parent fa12096 commit 43697dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Archive/Wiedijk100Theorems/BuffonsNeedle.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ vertical line if its projection onto the x-axis contains `0`.
2929
3030
We define a random variable `N : Ω → ℝ` that is `1` if the needle crosses a vertical line, and `0`
3131
otherwise. This is defined as `fun ω => Set.indicator (needleProjX l (B ω).1 (B ω).2) 1 0`.
32-
f
32+
3333
As in many references, the problem is split into two cases, `l ≤ d` (`buffon_short`), and `d ≤ l`
3434
(`buffon_long`). For both cases, we show that
3535
```
@@ -225,7 +225,7 @@ lemma buffon_integral :
225225
simp_rw [MeasureTheory.IntegrableOn, Measure.volume_eq_prod, ← Measure.prod_restrict,
226226
integrable_needleCrossesIndicator d l hd]
227227

228-
rw [Measure.volume_eq_prod, MeasureTheory.set_integral_prod _ this,
228+
rw [Measure.volume_eq_prod, MeasureTheory.setIntegral_prod _ this,
229229
MeasureTheory.integral_integral_swap ?integrable]
230230

231231
case integrable => simp_rw [Function.uncurry_def, Prod.mk.eta,
@@ -247,7 +247,7 @@ lemma buffon_integral :
247247
· rw [if_pos h, if_pos (this.mp h)]
248248
· rw [if_neg h, if_neg (this.not.mp h)]
249249

250-
simp_rw [indicator_eq, MeasureTheory.set_integral_indicator measurableSet_Icc, Pi.one_apply]
250+
simp_rw [indicator_eq, MeasureTheory.setIntegral_indicator measurableSet_Icc, Pi.one_apply]
251251

252252
/--
253253
From `buffon_integral`, in both the short and the long case, we have
@@ -273,7 +273,7 @@ lemma short_needle_inter_eq (h : l ≤ d) (θ : ℝ) :
273273
-/
274274
theorem buffon_short (h : l ≤ d) : ℙ[N l B] = (2 * l) * (d * π)⁻¹ := by
275275
simp_rw [buffon_integral d l hd B hBₘ hB, short_needle_inter_eq d l hl h _,
276-
MeasureTheory.set_integral_const, Real.volume_Icc, smul_eq_mul, mul_one, mul_comm (d * π)⁻¹ _,
276+
MeasureTheory.setIntegral_const, Real.volume_Icc, smul_eq_mul, mul_one, mul_comm (d * π)⁻¹ _,
277277
mul_eq_mul_right_iff]
278278

279279
apply Or.inl
@@ -284,7 +284,7 @@ theorem buffon_short (h : l ≤ d) : ℙ[N l B] = (2 * l) * (d * π)⁻¹ := by
284284
mul_nonneg (Real.sin_nonneg_of_mem_Icc hθ) hl.le
285285
simp_rw [ENNReal.toReal_ofReal_eq_iff, MeasureTheory.ae_of_all _ this]
286286

287-
simp_rw [MeasureTheory.set_integral_congr_ae measurableSet_Icc this,
287+
simp_rw [MeasureTheory.setIntegral_congr_ae measurableSet_Icc this,
288288
← smul_eq_mul, integral_smul_const, smul_eq_mul, mul_comm, mul_eq_mul_left_iff,
289289
MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le Real.pi_pos.le,
290290
integral_sin, Real.cos_zero, Real.cos_pi, sub_neg_eq_add, one_add_one_eq_two, true_or]
@@ -377,7 +377,7 @@ theorem buffon_long (h : d ≤ l) :
377377
· rw [min_eq_right (not_le.mp h).le]; exact mul_nonneg (Real.sin_nonneg_of_mem_Icc hθ) hl.le
378378
simp_rw [ENNReal.toReal_ofReal_eq_iff, MeasureTheory.ae_of_all _ this]
379379

380-
rw [MeasureTheory.set_integral_congr_ae measurableSet_Icc this,
380+
rw [MeasureTheory.setIntegral_congr_ae measurableSet_Icc this,
381381
MeasureTheory.integral_Icc_eq_integral_Ioc,
382382
← intervalIntegral.integral_of_le Real.pi_pos.le, integral_min_eq_two_mul,
383383
← intervalIntegral.integral_add_adjacent_intervals

0 commit comments

Comments
 (0)