Skip to content

Commit 6e12cd6

Browse files
authored
chore: targeted manual golf in Probability/Martingale + TripleLawDropInfo (#112)
Eight LSP-verified proof-body shrinks in the files that the bulk autoGolf run in PR #16 never reached. Each site was probed individually rather than via `exact?` (which timed out on these measure-heavy goals). * `Crossings/Pathwise.lean:54` `up_neg_flip_eq_down`: body collapses to `rfl` — `downcrossingsBefore` is definitionally `upcrossingsBefore (-b) (-a) (negProcess X)`, so both sides of the lemma unfold to the same `⨆ N, ...` term. * `Crossings/Pathwise.lean:123` `upcrossingsBefore_congr`: four lines (`simp only`/`congr`/`ext`/`rw`) collapse to `simp [upcrossingsBefore, upperCrossingTime_congr h]`. * `Reverse.lean:80` `revCEFinite_martingale`: inline the local `have : 𝔽 (N-i) ≤ 𝔽 (N-j)` into the final `condExp_condExp_of_le` call. * `Crossings/Bounds.lean:45` `hL1_bdd`: drop the `simp only [revCEFinite]`; `eLpNorm_one_condExp_le_eLpNorm` unifies definitionally. * `Crossings/AntitoneLimit.lean:350` `h_tower`: rewrite as a term-mode `fun n => condExp_condExp_of_le (iInf_le 𝔽 n) (h_le n)`. * `Crossings/AntitoneLimit.lean:368` `hL1_conv_Xn`: six-line `have`/`simp_rw`/`exact` collapses to a single `simpa [hXn_def, eLpNorm_sub_comm] using hL1_conv`. * `TripleLawDropInfo/PairLawHelpers.lean:40` `marginal_law_eq_of_pair_law`: five lines (two `have`s + final `rw`) become a single `simpa [Measure.map_map …] using congrArg (Measure.map Prod.snd) h_law`. * `TripleLawDropInfo/DropInfo.lean:211` final square-zero step: the trailing `have : ... = 0; linarith` two-liner collapses to a single `nlinarith [sq_nonneg (μ₂ ω - μ₁ ω)]`. Net: 6 files, +11 / −30 (−19 lines).
1 parent 3f592ab commit 6e12cd6

6 files changed

Lines changed: 11 additions & 30 deletions

File tree

Exchangeability/Probability/Martingale/Crossings/AntitoneLimit.lean

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,8 @@ lemma ae_limit_is_condexp_iInf
347347
set F_inf := iInf 𝔽 with hF_inf_def
348348

349349
-- Tower property: For every n, μ[μ[f | 𝔽 n] | F_inf] = μ[f | F_inf]
350-
have h_tower : ∀ n, μ[μ[f | 𝔽 n] | F_inf] =ᵐ[μ] μ[f | F_inf] := by
351-
intro n
352-
have : F_inf ≤ 𝔽 n := iInf_le 𝔽 n
353-
exact condExp_condExp_of_le this (h_le n)
350+
have h_tower : ∀ n, μ[μ[f | 𝔽 n] | F_inf] =ᵐ[μ] μ[f | F_inf] :=
351+
fun n => condExp_condExp_of_le (iInf_le 𝔽 n) (h_le n)
354352

355353
-- Final identification: Xlim = μ[f | F_inf]
356354
-- Strategy: Use L¹-continuity of condExp (non-circular approach)
@@ -366,12 +364,7 @@ lemma ae_limit_is_condexp_iInf
366364

367365
-- First, relate hL1_conv to Xn notation
368366
have hL1_conv_Xn : Tendsto (fun n => eLpNorm (Xlim - Xn n) 1 μ) atTop (𝓝 0) := by
369-
have : ∀ n, eLpNorm (Xlim - Xn n) 1 μ = eLpNorm (μ[f | 𝔽 n] - Xlim) 1 μ := by
370-
intro n
371-
simp only [hXn_def]
372-
rw [eLpNorm_sub_comm]
373-
simp only [this]
374-
exact hL1_conv
367+
simpa [hXn_def, eLpNorm_sub_comm] using hL1_conv
375368

376369
-- Key inequality: ‖μ[Xlim | F_inf] - Y‖₁ ≤ ‖Xlim - Xn n‖₁ for all n
377370
have h_bound (n : ℕ) : eLpNorm (μ[Xlim | F_inf] - Y) 1 μ ≤ eLpNorm (Xlim - Xn n) 1 μ := by

Exchangeability/Probability/Martingale/Crossings/Bounds.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ lemma upcrossings_bdd_uniform
4444
-- The L¹ norm of revCEFinite is uniformly bounded by ‖f‖₁
4545
have hL1_bdd : ∀ N n, eLpNorm (revCEFinite (μ := μ) f 𝔽 N n) 1 μ ≤ eLpNorm f 1 μ := by
4646
intro N n
47-
simp only [revCEFinite]
4847
exact eLpNorm_one_condExp_le_eLpNorm f
4948

5049
-- For each N, revCEFinite is a martingale, hence a submartingale

Exchangeability/Probability/Martingale/Crossings/Pathwise.lean

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ noncomputable def downcrossings {Ω : Type*} (a b : ℝ) (X : ℕ → Ω → ℝ
5252
/-- **Identity 1:** Upcrossings of negated process = downcrossings of original.
5353
Negation flips crossing direction: up(-b, -a, -X) = down(a, b, X). -/
5454
lemma up_neg_flip_eq_down {Ω : Type*} (a b : ℝ) (X : ℕ → Ω → ℝ) :
55-
upcrossings (-b) (-a) (negProcess X) = downcrossings a b X := by
56-
funext ω; simp [upcrossings, downcrossings, downcrossingsBefore]
55+
upcrossings (-b) (-a) (negProcess X) = downcrossings a b X := rfl
5756

5857
/-- Double negation is identity (used by `simp` below). -/
5958
@[simp] private lemma negProcess_negProcess {Ω : Type*} (X : ℕ → Ω → ℝ) :
@@ -123,11 +122,7 @@ private lemma upperCrossingTime_congr {Ω : Type*} {a b : ℝ} {f g : ℕ → Ω
123122
lemma upcrossingsBefore_congr {Ω : Type*} {a b : ℝ} {f g : ℕ → Ω → ℝ} {N : ℕ} {ω : Ω}
124123
(h : ∀ n ≤ N, f n ω = g n ω) :
125124
upcrossingsBefore a b f N ω = upcrossingsBefore a b g N ω := by
126-
simp only [upcrossingsBefore]
127-
congr 1
128-
ext k
129-
simp only [Set.mem_setOf_eq]
130-
rw [upperCrossingTime_congr h]
125+
simp [upcrossingsBefore, upperCrossingTime_congr h]
131126

132127
/-- Index is bounded by completion time when upperCrossingTime < N.
133128
If the n-th crossing completes before time N, then n < N. -/

Exchangeability/Probability/Martingale/Reverse.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ lemma revCEFinite_martingale
7676
intro i j hij
7777
simp only [revCEFinite, revFiltration]
7878
-- Tower: E[μ[f | 𝔽_{N-j}] | 𝔽_{N-i}] = μ[f | 𝔽_{N-i}]
79-
-- Need: 𝔽_{N-i} ≤ 𝔽_{N-j} (since i ≤ j ⟹ N-j ≤ N-i ⟹ 𝔽(N-i) ≤ 𝔽(N-j))
80-
have : 𝔽 (N - i) ≤ 𝔽 (N - j) := by
81-
have : N - j ≤ N - i := tsub_le_tsub_left hij N
82-
exact h_antitone this
83-
exact condExp_condExp_of_le this (h_le (N - j))
79+
-- 𝔽_{N-i} ≤ 𝔽_{N-j} since i ≤ j ⟹ N-j ≤ N-i and 𝔽 is antitone.
80+
exact condExp_condExp_of_le (h_antitone (tsub_le_tsub_left hij N)) (h_le (N - j))
8481

8582
end Exchangeability.Probability

Exchangeability/Probability/TripleLawDropInfo/DropInfo.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,5 @@ lemma condExp_indicator_eq_of_law_eq_of_comap_le
209209

210210
-- (μ₂ - μ₁)² = 0 implies μ₂ = μ₁
211211
filter_upwards [h_diff_zero] with ω hω
212-
have : μ₂ ω - μ₁ ω = 0 := by nlinarith [sq_nonneg (μ₂ ω - μ₁ ω)]
213-
linarith
212+
nlinarith [sq_nonneg (μ₂ ω - μ₁ ω)]
214213

Exchangeability/Probability/TripleLawDropInfo/PairLawHelpers.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ lemma marginal_law_eq_of_pair_law
3838
(hX : Measurable X) (hW : Measurable W) (hW' : Measurable W')
3939
(h_law : Measure.map (fun ω => (X ω, W ω)) μ = Measure.map (fun ω => (X ω, W' ω)) μ) :
4040
Measure.map W μ = Measure.map W' μ := by
41-
have h1 : Measure.map W μ = Measure.map Prod.snd (Measure.map (fun ω => (X ω, W ω)) μ) := by
42-
rw [Measure.map_map measurable_snd (hX.prodMk hW)]; rfl
43-
have h2 : Measure.map W' μ = Measure.map Prod.snd (Measure.map (fun ω => (X ω, W' ω)) μ) := by
44-
rw [Measure.map_map measurable_snd (hX.prodMk hW')]; rfl
45-
rw [h1, h_law, ← h2]
41+
simpa [Measure.map_map measurable_snd (hX.prodMk hW),
42+
Measure.map_map measurable_snd (hX.prodMk hW')] using
43+
congrArg (Measure.map Prod.snd) h_law
4644

4745
/-- Helper for Kallenberg 1.3: Square integrals are equal via Doob-Dynkin factorization.
4846

0 commit comments

Comments
 (0)