File size: 2,550 Bytes
e320e82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Combinatorics.ExpectationThreshold.ProbabilityProduct

namespace OAI

/-!
# Moments of products on a subset of coordinates

Under the actual product law, observables supported on a finite subset
factor into their coordinate expectations. Extending the factors by one
outside the subset reduces this to the full product moment identity.
-/

open scoped BigOperators
noncomputable section

namespace TalagrandThreshold.FiniteLaw

variable {I : Type*} [Fintype I] [DecidableEq I]
  {A : I → Type*} [∀ i, Fintype (A i)]

/-- A product on a subset has the product of its actual coordinate means. -/
theorem expectation_pi_subset_product (μ : ∀ i, FiniteLaw (A i))
    (S : Finset I) (f : ∀ i, A i → ℝ) :
    (pi μ).expectation (fun ω => ∏ i ∈ S, f i (ω i)) =
      ∏ i ∈ S, (μ i).expectation (f i) := by
  classical
  let g : ∀ i, A i → ℝ := fun i a => if i ∈ S then f i a else 1
  have hg (ω : ∀ i, A i) : (∏ i, g i (ω i)) = ∏ i ∈ S, f i (ω i) := by
    simpa only [g] using Fintype.prod_ite_mem S (fun i => f i (ω i))
  have he (i : I) : (μ i).expectation (g i) =
      if i ∈ S then (μ i).expectation (f i) else 1 := by
    by_cases hi : i ∈ S
    · simp only [g, ite_eq_left hi]
    · simp only [g, ite_eq_right hi, expectation_const]
  calc
    _ = (pi μ).expectation (fun ω => ∏ i, g i (ω i)) := by
      congr 1
      funext ω
      exact (hg ω).symm
    _ = ∏ i, (μ i).expectation (g i) := expectation_pi_product μ g
    _ = ∏ i ∈ S, (μ i).expectation (f i) := by
      simp only [he, Finset.prod_ite_mem_eq]

/-- Equal coordinate means give the corresponding power of the subset size. -/
theorem expectation_pi_subset_product_of_mean (μ : ∀ i, FiniteLaw (A i))
    (S : Finset I) (f : ∀ i, A i → ℝ) (a : ℝ)
    (hmean : ∀ i ∈ S, (μ i).expectation (f i) = a) :
    (pi μ).expectation (fun ω => ∏ i ∈ S, f i (ω i)) = a ^ S.card := by
  rw [expectation_pi_subset_product]
  calc
    (∏ i ∈ S, (μ i).expectation (f i)) = ∏ _i ∈ S, a :=
      Finset.prod_congr rfl hmean
    _ = a ^ S.card := Finset.prod_const a

/-- Identically distributed coordinates give a power of their common mean. -/
theorem expectation_pi_subset_product_const {Ω : Type*} [Fintype Ω]
    (μ : FiniteLaw Ω) (S : Finset I) (f : Ω → ℝ) :
    (pi (fun _ : I => μ)).expectation (fun ω => ∏ i ∈ S, f (ω i)) =
      (μ.expectation f) ^ S.card := by
  rw [expectation_pi_subset_product, Finset.prod_const]

end TalagrandThreshold.FiniteLaw

end

end OAI