Skip to content

Commit 5bc2048

Browse files
authored
Update to 4.30.0 (#114)
2 parents e4af5f2 + 1ef7119 commit 5bc2048

29 files changed

Lines changed: 139 additions & 63 deletions

‎.github/workflows/blueprint.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
uses: leanprover/lean-action@38fbc41a8c28c4cbaec22d7f7de508ec2e7c0dd9 # v1.5.0
4949
with:
5050
build: true
51-
lint: false
52-
mk_all-check: false
51+
lint: true
52+
mk_all-check: true
5353

5454
- name: Build Verso Documentation
5555
run: |

‎LeanMachineLearning/Online/Bandit/Algorithms/UCB.lean‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ lemma expectation_pullCount_le' [Nonempty (Fin K)]
513513
simp only [id_eq, Nat.cast_sum]
514514
rw [lintegral_add_left (by fun_prop), lintegral_add_left (by fun_prop)]
515515
simp only [lintegral_const, measure_univ, mul_one]
516-
rw [lintegral_finset_sum _ (by fun_prop), lintegral_finset_sum _ (by fun_prop)]
516+
rw [lintegral_finsetSum _ (by fun_prop), lintegral_finsetSum _ (by fun_prop)]
517517
gcongr with k hk k hk
518518
· rw [← lintegral_indicator_one]
519519
swap; · exact h_set_2 _

‎LeanMachineLearning/Online/Bandit/ArrayProbSpace.lean‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ lemma indepFun_fst_add_one_aux (ν : Kernel 𝓐 R) [IsMarkovKernel ν] (n : ℕ
628628
simp only [X, Y, Set.preimage_inter, Set.preimage_preimage]
629629
by_cases h : ω₁ (n + 1) ∈ s
630630
· simp [h]
631-
grind
631+
congr
632632
· simp [h]
633633
simp_rw [hY_fst, hX_fst, hXY]
634634
-- Factor the integral using independence
@@ -1191,8 +1191,8 @@ lemma hasCondDistrib_reward' (alg : Algorithm 𝓐 R) (ν : Kernel 𝓐 R) [IsMa
11911191
let e : ((𝓐 × ℕ) × (Iic n → 𝓐 × R)) ≃ᵐ ((𝓐 × (Iic n → 𝓐 × R)) × ℕ) :=
11921192
{ toFun := fun x ↦ ((x.1.1, x.2), x.1.2)
11931193
invFun := fun x ↦ ((x.1.1, x.2), x.1.2)
1194-
measurable_toFun := by fun_prop
1195-
measurable_invFun := by fun_prop }
1194+
measurable_toFun := by simp only [Equiv.coe_fn_mk]; fun_prop
1195+
measurable_invFun := by simp only [Equiv.symm_mk, Equiv.coe_fn_mk]; fun_prop }
11961196
exact this.comp_right e
11971197
suffices HasCondDistrib R' (fun ω ↦ (A ω, P ω)) (ν.prodMkRight _) (arrayMeasure ν) by
11981198
have h_indep : H ⟂ᵢ[(fun ω ↦ (A ω, P ω)), (by fun_prop); arrayMeasure ν] R' :=

‎LeanMachineLearning/Online/Bandit/Regret.lean‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ lemma integral_regret_eq_sum_gap_mul_integral_pullCount
7575
(hA : ∀ n, Measurable (A n)) :
7676
P[regret ν A n] = ∑ a, gap ν a * P[fun ω ↦ (pullCount A a n ω : ℝ)] := by
7777
simp_rw [regret_eq_sum_pullCount_mul_gap]
78-
rw [integral_finset_sum]
78+
rw [integral_finsetSum]
7979
swap; · exact fun i _ ↦ (integrable_pullCount hA i n).mul_const _
8080
congr with a
8181
rw [integral_mul_const, mul_comm]

‎LeanMachineLearning/Online/Bandit/SumRewards.lean‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ lemma prob_pullCount_mem_and_sumRewards_mem_le (a : 𝓐) (n : ℕ)
7575
classical
7676
rcases Set.eq_empty_or_nonempty B with h_empty | h_nonempty
7777
· simp [h_empty]
78-
convert prob_pullCount_prod_sumRewards_mem_le a n (hs.prod hB) (ν := ν) (alg := alg) with _ _ k hk
78+
convert prob_pullCount_prod_sumRewards_mem_le a n (hs.prod hB) (ν := ν) (alg := alg)
79+
with _ _ _ k hk
7980
· ext n
8081
have : ∃ x, x ∈ B := h_nonempty
8182
simp [this]
@@ -274,7 +275,7 @@ lemma prob_pullCount_mem_and_sumRewards_mem_le [Countable 𝓐]
274275
classical
275276
rcases Set.eq_empty_or_nonempty B with h_empty | h_nonempty
276277
· simp [h_empty]
277-
convert prob_pullCount_prod_sumRewards_mem_le h (hs.prod hB) (ν := ν) (alg := alg) with _ _ k hk
278+
convert prob_pullCount_prod_sumRewards_mem_le h (hs.prod hB) (ν := ν) (alg := alg) with _ _ _ k hk
278279
· ext n
279280
have : ∃ x, x ∈ B := h_nonempty
280281
simp [this]

‎LeanMachineLearning/Probability/Independence/CondDistrib.lean‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ public import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
1010
public import Mathlib.Probability.Independence.Basic
1111
public import Mathlib.Probability.Independence.Conditional
1212

13+
/-!
14+
# Lemmas about conditional distributions
15+
16+
-/
17+
1318
@[expose] public section
1419

1520
open MeasureTheory ProbabilityTheory Finset
@@ -472,7 +477,7 @@ lemma condDistrib_prod_of_forall_condDistrib_cond [Countable Ω'] [IsFiniteMeasu
472477
· simp only [hZ, Set.setOf_true, Set.mem_setOf_eq, Set.indicator_of_mem]
473478
exact κ.measure_le_bound _ _
474479
· simp [hZ]
475-
refine le_antisymm (h_le.trans ?_) (zero_le _)
480+
refine le_antisymm (h_le.trans ?_) zero_le
476481
rw [lintegral_indicator]
477482
swap; · exact (measurableSet_singleton _).preimage (by fun_prop)
478483
simp only [lintegral_const, MeasurableSet.univ, Measure.restrict_apply, Set.univ_inter,

‎LeanMachineLearning/Probability/Independence/CondIndepFun.lean‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ public import Mathlib.MeasureTheory.Function.FactorsThrough
99
public import Mathlib.Probability.Independence.Basic
1010
public import Mathlib.Probability.Independence.Conditional
1111

12-
@[expose] public section
13-
1412
/-! # Laws of `stepsUntil` and `rewardByCount`
1513
-/
1614

15+
@[expose] public section
16+
1717
open MeasureTheory ProbabilityTheory Finset
1818
open scoped ENNReal NNReal
1919

‎LeanMachineLearning/Probability/Independence/IndepFun.lean‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module
88
public import Mathlib.Probability.IdentDistrib
99
public import Mathlib.Probability.Independence.InfinitePi
1010

11+
/-! # Lemmas about independence
12+
-/
13+
1114
@[expose] public section
1215

1316
open MeasureTheory Finset

‎LeanMachineLearning/Probability/Independence/IndepInfinitePi.lean‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module
77

88
public import Mathlib.Probability.Independence.InfinitePi
99

10+
/-! # Lemmas about independence and infinite products
11+
-/
12+
1013
@[expose] public section
1114

1215
open MeasureTheory Measure ProbabilityTheory Set Function

‎LeanMachineLearning/Probability/Integrable.lean‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module
77

88
public import Mathlib.Probability.IdentDistrib
99

10+
/-! # Lemmas about integrable functions
11+
-/
12+
1013
@[expose] public section
1114

1215
open ProbabilityTheory

0 commit comments

Comments
 (0)