File size: 3,911 Bytes
4a56cd6 | 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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | import Mathlib
import OAI.Probability.LogConcave.Sampling.QuadraticExpectation
namespace OAI
section
section
noncomputable section
namespace LogConcaveSampling
open MeasureTheory ProbabilityTheory Filter
open scoped Topology Classical BigOperators NNReal RealInnerProductSpace
namespace Appell
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E]
variable {ΞΉ : Type*} [DecidableEq ΞΉ]
lemma inverseMoment_contDiffAt {m : E β Finset ΞΉ β β} {p : E}
(hm : βs,ContDiffAt β (β€:ββ) (fun x => m x s) p) (s : Finset ΞΉ) :
ContDiffAt β (β€:ββ) (fun x => inverseMoment (m x) s) p := by
induction s using Finset.strongInductionOn with
| _ s ih =>
by_cases hs : s=β
Β· subst s
simp only [inverseMoment_empty]
exact contDiffAt_const
simp_rw [inverseMoment_nonempty _ hs]
apply ContDiffAt.neg
apply ContDiffAt.sum
intro t ht
exact (hm (s\t)).mul (ih t (Finset.ssubset_iff_subset_ne.mpr
β¨Finset.mem_powerset.mp (Finset.mem_erase.mp ht).2,(Finset.mem_erase.mp ht).1β©))
end Appell
lemma conditionalMeanScalar_joint_smooth {d : β} {F : Point d β β} {lam : ββ₯0}
(hF : Primitive F lam) (x : Point d) {r : β} (hr : 0β€r)
(hl : (lam:β)*r^2<1) {h : Point d β β} (hc : Continuous h)
(hg : Appell.HasGrowth h) (p : β Γ Point d) (hp : p.1^2<1) :
ContDiffAt β (β€:ββ) (fun q : β Γ Point d => conditionalMeanScalar F x r q.1 h q.2) p := by
obtain β¨m,hm,C,htβ© := hF.hasGaussianLowerTail x hr hl
have hp' : 0 < m +(conditionalParameter p).2 := by dsimp [conditionalParameter]; positivity
have hh := (contDiffAt_quadraticExpectation (hF.continuous_potential x r)
hc ht hg (conditionalParameter p) hp').comp p (conditionalParameter_smooth hp)
apply hh.congr_of_eventuallyEq
filter_upwards [(isOpen_lt (continuous_fst.pow 2) continuous_const).mem_nhds hp] with q hq
exact conditional_integral_quadratic hF x hr hl hq q.2 h
def conditionalPositionMoment {d : β} {ΞΉ : Type*} [DecidableEq ΞΉ]
(F : Point d β β) (x : Point d) (r : β) (v : ΞΉ β Point d) (s : Finset ΞΉ)
(p : β Γ Point d) : β :=
conditionalMeanScalar F x r p.1 (fun z => βiβs,inner β (v i) z) p.2
def conditionalMixedMoment {d : β} {ΞΉ : Type*} [DecidableEq ΞΉ]
(F : Point d β β) (x : Point d) (r : β) (u : Point d)
(v : ΞΉ β Point d) (s : Finset ΞΉ) (p : β Γ Point d) : β :=
conditionalMeanScalar F x r p.1
(fun z => (βiβs,inner β (v i) z)*inner β u (primitiveField F x r z)) p.2
lemma conditionalPositionMoment_smooth {d : β} {F : Point d β β} {lam : ββ₯0}
(hF : Primitive F lam) (x : Point d) {r : β} (hr : 0β€r)
(hl : (lam:β)*r^2<1) {ΞΉ : Type*} [DecidableEq ΞΉ]
(v : ΞΉ β Point d) (s : Finset ΞΉ) (p : β Γ Point d) (hp : p.1^2<1) :
ContDiffAt β (β€:ββ) (conditionalPositionMoment F x r v s) p :=
conditionalMeanScalar_joint_smooth hF x hr hl
(continuous_finsetProd _ (fun _ _ => continuous_const.inner continuous_id))
(Appell.HasGrowth.prod s (fun i _ => Appell.HasGrowth.linear (innerSL β (v i)))) p hp
lemma conditionalMixedMoment_smooth {d : β} {F : Point d β β} {lam : ββ₯0}
(hF : Primitive F lam) (x : Point d) {r : β} (hr : 0β€r)
(hl : (lam:β)*r^2<1) {ΞΉ : Type*} [DecidableEq ΞΉ]
(u : Point d) (v : ΞΉ β Point d) (s : Finset ΞΉ) (p : β Γ Point d) (hp : p.1^2<1) :
ContDiffAt β (β€:ββ) (conditionalMixedMoment F x r u v s) p :=
conditionalMeanScalar_joint_smooth hF x hr hl
((continuous_finsetProd _ (fun _ _ => continuous_const.inner continuous_id)).mul
(continuous_const.inner (primitiveField_contDiff hF x r).continuous))
((Appell.HasGrowth.prod s (fun i _ => Appell.HasGrowth.linear (innerSL β (v i)))).mul
(primitiveField_inner_growth hF x u hr)) p hp
end LogConcaveSampling
end
end
end
end OAI
|