Download lean/OAI/Analysis/IrrationalRotation/Couplings/ConditionalCrossingAvoidance.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
havehall : ∀ᵐ y ∂ν, ∀s : Finset ι,
κ y (⋂ i ∈ s, events i) = ∏ i ∈ s, κ y (events i) :=
ae_all_iff.mpr (fun s => hind.meas_biInter s)
filter_upwards [hall] with y hy
exact (iIndepSet_iff_meas_biInter hmeas).mpr hy
theoremkernel_avoid_le_exp (κ : KernelY Ω) (ν : MeasureY)
(events : ι →Set Ω) (hmeas : ∀ i, MeasurableSet (events i))
(hind : Kernel.iIndepSet events κ ν) (selected : Y→Finset ι) (p : Y→ℝ)
(hp : ∀ᵐ y ∂ν, ∀ i ∈ selected y, p y ≤ (κ y).real (events i)) :
∀ᵐ y ∂ν, (κ y).real (⋂ i ∈ selected y, (events i)ᶜ) ≤Real.exp (-((selected y).card : ℝ) * p y) :=by
proof · 3
lines
filter_upwards [kernel_iIndepSet_ae κ ν events hmeas hind, hp] with y hy hp
let : IsProbabilityMeasure (κ y) := hy.isProbabilityMeasure
exact measureReal_avoid_le_exp (κ y) events hy hmeas (selected y) (p y) hp
haveheq : ∀ᵐ x ∂μ, ∀ i, (condExpKernel μ m' x).real (events i) =
(μ[(events i).indicator (fun _ => (1 : ℝ)) | m']) x :=
ae_all_iff.mpr (fun i => condExpKernel_ae_eq_condExp hm' (hmeas i))
havehpKernel : ∀ᵐ x ∂μ, active (endpoint x) →∀ i ∈ selected (endpoint x),
ρ / 10≤ (condExpKernel μ m' x).real (events i) :=by
filter_upwards [hp, heq] with x hx heq
intro ha i hi
rw [heq i]
exact hx ha i hi
have hfixed := condExpKernel_ae_eq_of_measurable m' hm' μ endpoint hendpoint
have hlift := ae_ae_condExpKernel_of_ae m' hm' μ hbad
havehsupport : ∀ᵐ x ∂μ, ∀ᵐ ω ∂condExpKernel μ m' x,
ω ∈ bad → active (endpoint x) ∧∀ i ∈ selected (endpoint x), ω ∉ events i :=by
filter_upwards [hfixed, hlift] with x hfixed hlift
filter_upwards [hfixed, hlift] with ω hfixed hlift
intro hb
simpa only [hfixed] using hlift hb
havehzero : ∀ᵐ x ∂μ, ¬ active (endpoint x) → condExpKernel μ m' x bad = 0:=by
filter_upwards [hsupport] with x hx
intro ha
havehn : ∀ᵐ ω ∂condExpKernel μ m' x, ω ∉ bad :=by
filter_upwards [hx] with ω hω
exact fun hb => ha (hω hb).1
simpa only [not_not, Set.ofPred_mem_eq] using (ae_iff.mp hn)
havehavoid : ∀ᵐ x ∂μ, ∀ᵐ ω ∂condExpKernel μ m' x,
ω ∈ bad →∀ i ∈ selected (endpoint x), ω ∉ events i :=by
filter_upwards [hsupport] with x hx
filter_upwards [hx] with ω hω
exact fun hb => (hω hb).2
exact conditional_bad_le_exp_intensity m' hm' μ events hmeas hind
(fun x => selected (endpoint x)) m ρ L hρ hL (fun x => active (endpoint x))
(Filter.Eventually.of_forall (fun x => hcard (endpoint x))) hpKernel
bad hbadmeas hzero havoid