math / data /lean /OAI /Probability /LogConcave /Complexity /ProbabilityRmsBudget.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.18 kB
import Mathlib
import OAI.Probability.LogConcave.Numerics.NodesContinuous
import OAI.Probability.LogConcave.Sampling.CenteringJointLaw
namespace OAI
section
section
noncomputable section
namespace LogConcaveSampling
open Set MeasureTheory ProbabilityTheory
open scoped NNReal
def probabilityRmsBudget {d : β„•} (F : Point d β†’ ℝ) (x : Point d)
(lam A : ℝβ‰₯0) (r h C : ℝ) (k n N : β„•) : ℝ :=
4*C*((lam:ℝ)*r^2)*Real.sqrt d*(1+Real.log ((d:ℝ)+1))^k*(2*h)^(n+1)+
(A*probabilityMeanLipschitz lam r:ℝβ‰₯0)^N*(2*probabilityInitialRms F x lam r)
theorem kernel_probability_errors (n : β„•) (hn : 0<n) :
βˆƒA : ℝβ‰₯0,βˆƒC : ℝ,0≀C ∧ βˆƒk : β„•,βˆ€{d : β„•} {F : Point d β†’ ℝ} {lam : ℝβ‰₯0},
βˆ€hF : Primitive F lam,βˆ€(x : Point d) {r : ℝ},βˆ€hr : 0<r,
0<lam β†’ βˆ€hl : (lam:ℝ)*r^2≀1/2,1≀d β†’
βˆ€{T h : ℝ},βˆ€hT0 : 0<T,βˆ€hT1 : T<1,βˆ€hh : 0<h,h≀Real.log 2 β†’
A*probabilityMeanLipschitz lam r≀1/2 β†’ βˆ€N : β„•,βˆ€s e : ProbabilityNode T h n,
let S : Icc (0:ℝ) T := ⟨probabilityNodeTime T h n s,probabilityNodeTime_mem hT0 hT1 hh hn s⟩
let E : Icc (0:ℝ) T := ⟨probabilityNodeTime T h n e,probabilityNodeTime_mem hT0 hT1 hh hn e⟩
let ΞΌ := gibbs (centeringPotential F x r S)
let forward := probabilityTransport hF x hr.le hl hT0.le hT1 S E
let pos := fun y : Point (d+d) => (productPointEquiv d d y).1
(Integrable (fun y => β€–probabilityAnchoredPicard F x r T h n N e (forward (pos y)) s-pos yβ€–^2) ΞΌ ∧
(∫y,β€–probabilityAnchoredPicard F x r T h n N e (forward (pos y)) s-pos yβ€–^2 βˆ‚ΞΌ)≀
(probabilityRmsBudget F x lam A r h C k n N)^2) ∧
βˆ€Ξ¨ : Point (d+d) β†’ Point (d+d),Measurable Ξ¨ β†’ ΞΌ.map Ξ¨=ΞΌ β†’
Integrable (fun y => β€–probabilityAnchoredPicard F x r T h n (N+1) s (pos (Ξ¨ y)) e-
forward (pos (Ξ¨ y))β€–^2) ΞΌ ∧
(∫y,β€–probabilityAnchoredPicard F x r T h n (N+1) s (pos (Ξ¨ y)) e-
forward (pos (Ξ¨ y))β€–^2 βˆ‚ΞΌ)≀(probabilityRmsBudget F x lam A r h C k n (N+1))^2 := by
obtain ⟨A,C,hC,k,hErr⟩ := probabilityAnchored_marginal_rms n hn
refine ⟨A,C,hC,k,?_⟩
intro d F lam hF x r hr hlam hl hd T h hT0 hT1 hh hsmall hq N s e
dsimp only
let S : Icc (0:ℝ) T := ⟨probabilityNodeTime T h n s,probabilityNodeTime_mem hT0 hT1 hh hn s⟩
let E : Icc (0:ℝ) T := ⟨probabilityNodeTime T h n e,probabilityNodeTime_mem hT0 hT1 hh hn e⟩
let ΞΌ := gibbs (centeringPotential F x r S)
let fw := probabilityTransport hF x hr.le hl hT0.le hT1 S E
let bw := probabilityTransport hF x hr.le hl hT0.le hT1 E S
let pos := fun y : Point (d+d) => (productPointEquiv d d y).1
have hpos : Measurable pos := (productPointEquiv d d).continuous.measurable.fst
have hfw : Continuous fw := probabilityTransport_continuous hF x hr.le hl hT0.le hT1 S E
have hbw : Continuous bw := probabilityTransport_continuous hF x hr.le hl hT0.le hT1 E S
have hp : ΞΌ.map pos=interpolationLaw F x r S :=
centering_position_law hF x hr.le hl S.2.1 (S.2.2.trans_lt hT1)
have hfp : ΞΌ.map (fun y => fw (pos y))=interpolationLaw F x r E := by
change μ.map (fw ∘ pos)=_
rw [←Measure.map_map hfw.measurable hpos,hp]
exact probabilityTransport_pushforward hF x hr.le hl hT0.le hT1 S E
constructor
Β· have he := hErr hF x hr hlam hl hd hT0 hT1 hh hsmall hq N e s
have hm := ((probabilityAnchored_continuous hF x hr.le hl hT0 hT1 hh n hn N e s).sub hbw).measurable
have h := rms_bound_pullback (hfw.measurable.comp hpos) hfp hm he.1 he.2
have hc (y : Point d) : bw (fw y)=y := by
dsimp [bw,fw]
rw [probabilityTransport_cocycle,probabilityTransport_initial]
simpa only [Pi.sub_apply,Function.comp_def,hc,probabilityRmsBudget] using h
Β· intro Ξ¨ hm hlaw
have he := hErr hF x hr hlam hl hd hT0 hT1 hh hsmall hq (N+1) s e
have hΨ := harmonic_position_law hF x hr.le hl S.2.1 (S.2.2.trans_lt hT1) hm hlaw
exact rms_bound_pullback (hpos.comp hm) hΨ
((probabilityAnchored_continuous hF x hr.le hl hT0 hT1 hh n hn (N+1) s e).sub hfw).measurable
he.1 he.2
end LogConcaveSampling
end
end
end
end OAI