math / data /lean /OAI /Combinatorics /BalancedRyser /Probability /FiniteExposureTower.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.2 kB
import OAI.Combinatorics.BalancedRyser.Probability.FiniteFixedLaw
import OAI.Combinatorics.BalancedRyser.Probability.PatternMomentModel
namespace OAI
namespace Balanced.ConditionalRestriction
noncomputable section
open scoped Classical
open MeasureTheory
universe u
variable {D A : Type u} [Fintype D] [Fintype A] [DecidableEq D] [Nonempty A]
[MeasurableSpace A] [MeasurableSingletonClass A]
private def uniformArrayModel : PatternModel.{u} where
Color := D
Value := fun _ => A
law := fun _ => (PMF.uniformOfFintype A).toMeasure
Label := PUnit
support := fun _ => βˆ…
event := fun _ => βˆ…
eventMeasurable := fun _ => MeasurableSet.empty
dependsOn := by intros; rfl
theorem filtered_integral_mul_le (old extra : Finset D) (a : D β†’ A)
(f z : (D β†’ A) β†’ ℝ) (C Bf Bz : ℝ) (hC : 0 ≀ C)
(hfn : βˆ€ Ο‰, 0 ≀ f Ο‰) (hzn : βˆ€ Ο‰, 0 ≀ z Ο‰)
(hfb : βˆ€ Ο‰, f Ο‰ ≀ Bf) (hzb : βˆ€ Ο‰, z Ο‰ ≀ Bz)
(hdepends : βˆ€ Ο‰ Ο‰', (βˆ€ d ∈ old βˆͺ extra, Ο‰ d = Ο‰' d) β†’ f Ο‰ = f Ο‰')
(hbound : βˆ€ y : D β†’ A,
(∫ Ο‰, z Ο‰ βˆ‚((PMF.uniformOfFintype (D β†’ A)).filter
{Ο‰ | βˆ€ d, d ∈ old βˆͺ extra β†’ Ο‰ d = y d}
(fixed_supported (fun d => d ∈ old βˆͺ extra) y)).toMeasure) ≀ C) :
(∫ Ο‰, f Ο‰ * z Ο‰ βˆ‚((PMF.uniformOfFintype (D β†’ A)).filter
{Ο‰ | βˆ€ d, d ∈ old β†’ Ο‰ d = a d}
(fixed_supported (fun d => d ∈ old) a)).toMeasure) ≀
C * ∫ Ο‰, f Ο‰ βˆ‚((PMF.uniformOfFintype (D β†’ A)).filter
{Ο‰ | βˆ€ d, d ∈ old β†’ Ο‰ d = a d}
(fixed_supported (fun d => d ∈ old) a)).toMeasure := by
let P : PatternModel := uniformArrayModel (D := D) (A := A)
have hconvert (J : Finset D) (y : D β†’ A) (G : (D β†’ A) β†’ ℝ) :
P.fixedExpectation J y G =
∫ Ο‰, G Ο‰ βˆ‚((PMF.uniformOfFintype (D β†’ A)).filter
{Ο‰ | βˆ€ d, d ∈ J β†’ Ο‰ d = y d}
(fixed_supported (fun d => d ∈ J) y)).toMeasure := by
rw [← integral_fixArray_eq_filtered (fun d => d ∈ J) y G]
apply integral_congr_ae
filter_upwards [] with Ο‰
congr 1
funext d
dsimp [P, uniformArrayModel, PatternModel.fixCoordinates, fixArray]
exact @ite_cond_congr A (d ∈ J) (d ∈ J)
(Finset.decidableMem d J) (Classical.propDecidable _) (y d) (Ο‰ d) rfl
rw [← hconvert old a (fun Ο‰ => f Ο‰ * z Ο‰), ← hconvert old a f]
apply P.fixedExpectation_mul_le_of_fixedBounds old extra a f z C Bf Bz hC
(show Measurable f from measurable_of_countable f)
(show Measurable z from measurable_of_countable z) hfn hzn hfb hzb hdepends
intro y
exact (hconvert (old βˆͺ extra) y z).trans_le (hbound y)
theorem integral_eq_of_eq_on_support {Ξ© : Type*} [Fintype Ξ©]
[MeasurableSpace Ξ©] [MeasurableSingletonClass Ξ©]
(p : PMF Ξ©) (f g : Ξ© β†’ ℝ) (h : βˆ€ Ο‰ ∈ p.support, f Ο‰ = g Ο‰) :
(∫ Ο‰, f Ο‰ βˆ‚p.toMeasure) = ∫ Ο‰, g Ο‰ βˆ‚p.toMeasure := by
simp only [PMF.integral_eq_sum, smul_eq_mul]
apply Finset.sum_congr rfl
intro Ο‰ _
by_cases hΟ‰ : Ο‰ ∈ p.support
· rw [h ω hω]
· have hp : p ω = 0 := by simpa [PMF.mem_support_iff] using hω
simp [hp]
end
end Balanced.ConditionalRestriction
end OAI