math / data /lean /OAI /Probability /CriticalPercolation /Modular /DensityModular.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
1.23 kB
import Mathlib
import OAI.Probability.CriticalPercolation.ProductMeasure.Density
namespace OAI
section
section
open Set MeasureTheory ProbabilityTheory
open Set
open scoped BigOperators
namespace CriticalPercolation.FiniteProduct
open scoped Classical
variable {E : Type*} [Fintype E]
lemma density_modular (w : E β†’ Prop β†’ ℝ) (x y : E β†’ Prop) :
density w x * density w y = density w (x βŠ“ y) * density w (x βŠ” y) := by
unfold density
rw [← Finset.prod_mul_distrib, ← Finset.prod_mul_distrib]
apply Finset.prod_congr rfl
intro e _
simp only [Pi.inf_apply, Pi.sup_apply]
by_cases hx : x e <;> by_cases hy : y e <;> simp [hx, hy, mul_comm]
lemma expect_mul_ge (w : E β†’ Prop β†’ ℝ) (hw : βˆ€ e, βˆ‘ b, w e b = 1)
(hpos : βˆ€ e b, 0 ≀ w e b) (f g : (E β†’ Prop) β†’ ℝ)
(hf0 : βˆ€ Ο‰, 0 ≀ f Ο‰) (hg0 : βˆ€ Ο‰, 0 ≀ g Ο‰)
(hf : Monotone f) (hg : Monotone g) :
expect w f * expect w g ≀ expect w (fun Ο‰ => f Ο‰ * g Ο‰) := by
have h := fkg f g (density w) (fun Ο‰ => density_nonneg hpos Ο‰) hf0 hg0 hf hg
(fun x y => le_of_eq (density_modular w x y))
simpa only [expect, sum_density w hw, one_mul] using h
end CriticalPercolation.FiniteProduct
end
end
end OAI