@@ -122,7 +122,6 @@ lemma expect_univ [Fintype ι] : 𝔼 i, f i = (∑ i, f i) /ℚ Fintype.card ι
122122
123123@[simp] lemma expect_empty (f : ι → M) : 𝔼 i ∈ ∅, f i = 0 := by simp [expect]
124124
125- set_option backward.isDefEq.respectTransparency false in
126125@[simp] lemma expect_singleton (f : ι → M) (i : ι) : 𝔼 j ∈ {i}, f j = f i := by simp [expect]
127126
128127@[simp] lemma expect_const_zero (s : Finset ι) : 𝔼 _i ∈ s, (0 : M) = 0 := by simp [expect]
@@ -169,7 +168,6 @@ lemma expect_ite_zero (s : Finset ι) (p : ι → Prop) [DecidablePred p]
169168section DecidableEq
170169variable [DecidableEq ι]
171170
172- set_option backward.isDefEq.respectTransparency false in
173171lemma expect_ite_mem (s t : Finset ι) (f : ι → M) :
174172 𝔼 i ∈ s, (if i ∈ t then f i else 0 ) = (#(s ∩ t) / #s : ℚ≥0 ) • 𝔼 i ∈ s ∩ t, f i := by
175173 obtain hst | hst := (s ∩ t).eq_empty_or_nonempty
@@ -255,15 +253,13 @@ most arguments. -/
255253lemma expect_equiv (e : ι ≃ κ) (hst : ∀ i, i ∈ s ↔ e i ∈ t) (hfg : ∀ i ∈ s, f i = g (e i)) :
256254 𝔼 i ∈ s, f i = 𝔼 i ∈ t, g i := by simp_rw [expect, card_equiv e hst, sum_equiv e hst hfg]
257255
258- set_option backward.isDefEq.respectTransparency false in
259256/-- Expectation over a product set equals the expectation of the fiberwise expectations.
260257
261258For rewriting in the reverse direction, use `Finset.expect_product'`. -/
262259lemma expect_product (s : Finset ι) (t : Finset κ) (f : ι × κ → M) :
263260 𝔼 x ∈ s ×ˢ t, f x = 𝔼 i ∈ s, 𝔼 j ∈ t, f (i, j) := by
264261 simp only [expect, card_product, sum_product, smul_sum, mul_inv, mul_smul, Nat.cast_mul]
265262
266- set_option backward.isDefEq.respectTransparency false in
267263/-- Expectation over a product set equals the expectation of the fiberwise expectations.
268264
269265For rewriting in the reverse direction, use `Finset.expect_product`. -/
@@ -346,7 +342,6 @@ end Semiring
346342section CommSemiring
347343variable [CommSemiring M] [Module ℚ≥0 M] [IsScalarTower ℚ≥0 M M] [SMulCommClass ℚ≥0 M M]
348344
349- set_option backward.isDefEq.respectTransparency false in
350345lemma expect_pow (s : Finset ι) (f : ι → M) (n : ℕ) :
351346 (𝔼 i ∈ s, f i) ^ n = 𝔼 p ∈ Fintype.piFinset fun _ : Fin n ↦ s, ∏ i, f (p i) := by
352347 classical
0 commit comments