theorembounded_mem_nonprincipalCoefficientSlots
(e : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d)) :
e ∈ nonprincipalCoefficientSlots Subtype.val (canonicalPrincipalExponent h d) ↔
e ≠ constantCoefficientSlot _ _ ∧ e ∉ principalCoefficientSlots h d :=by
proof · 19
lines
classical
rw [mem_nonprincipalCoefficientSlots, mem_fixedNonprincipalExponents]
havehz : e.val = 0↔ e = constantCoefficientSlot _ _ :=by
constructor
· intro he
exact Subtype.ext he
· intro he
exact congrArg Subtype.val he
havehp : (∃ b, canonicalPrincipalExponent h d b = e.val) ↔
e ∈ principalCoefficientSlots h d :=by
rw [mem_principalCoefficientSlots]
constructor <;> rintro ⟨b, hb⟩
· exact ⟨b, Subtype.ext hb⟩
· exact ⟨b, congrArg Subtype.val hb⟩
havehm : e.val ∈ monomialExponentSet
(Subtype.val : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d) → _) :=
(mem_monomialExponentSet _ _).mpr ⟨e, rfl⟩
simp only [hm, true_and, ← not_exists, hp]
exact and_congr (not_congr hz) Iff.rfl
theoremboundedProfileCenter_dilation (γ t : ℝ)
(e : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d)) :
coefficientProfileCenter (principalCoefficientSlots h d) γ e =
nonprincipalDilation Subtype.val (canonicalPrincipalExponent h d) t e *
coefficientProfileCenter (principalCoefficientSlots h d) γ e :=by
proof · 6
lines
classical
by_cases hp : e ∈ principalCoefficientSlots h d
· obtain ⟨b, hb⟩ := (mem_principalCoefficientSlots h d e).mp hp
rw [nonprincipalDilation_principal Subtype.val (canonicalPrincipalExponent h d)
t e b (congrArg Subtype.val hb.symm), one_mul]
· simp only [coefficientProfileCenter, hp, ite_false, mul_zero]
theoremboundedProfileWidth_dilation (ρ γ ε t : ℝ)
(e : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d)) :
coefficientProfileWidth (principalCoefficientSlots h d) (constantCoefficientSlot _ _)
ρ γ (t * ε) e =
nonprincipalDilation Subtype.val (canonicalPrincipalExponent h d) t e *
coefficientProfileWidth (principalCoefficientSlots h d) (constantCoefficientSlot _ _)
ρ γ ε e :=by
proof · 13
lines
classical
by_cases hz : e = constantCoefficientSlot _ _
· rw [nonprincipalDilation_zero Subtype.val (canonicalPrincipalExponent h d)
t e (congrArg Subtype.val hz)]
simp only [coefficientProfileWidth, hz, ite_true, one_mul]
· by_cases hp : e ∈ principalCoefficientSlots h d
· obtain ⟨b, hb⟩ := (mem_principalCoefficientSlots h d e).mp hp
rw [nonprincipalDilation_principal Subtype.val (canonicalPrincipalExponent h d)
t e b (congrArg Subtype.val hb.symm), one_mul]
simp only [coefficientProfileWidth, hz, hp, ite_false, ite_true]
· rw [nonprincipalDilation_mem Subtype.val (canonicalPrincipalExponent h d) t e
((bounded_mem_nonprincipalCoefficientSlots h d e).mpr ⟨hz, hp⟩)]
simp only [coefficientProfileWidth, hz, hp, ite_false]
theoremboundedProfile_polynomial_split (hd : 0 < h d) (ρ γ ε t : ℝ)
(r : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d) →ℝ) :
monomialArrayPolynomial Subtype.val (fun e =>
coefficientProfileCenter (principalCoefficientSlots h d) γ e +
coefficientProfileWidth (principalCoefficientSlots h d) (constantCoefficientSlot _ _)
ρ γ (t * ε) e * r e) =
MvPolynomial.C (ρ * r (constantCoefficientSlot _ _)) +
(∑ b, MvPolynomial.monomial (canonicalPrincipalExponent h d b)
(3 * γ / 2 + γ / 2 * r (principalCoefficientSlot h d b))) +
∑ e ∈ nonprincipalCoefficientSlots
(Subtype.val : BoundedCoefficientExponent (SamplerTupleIndexGB h) (h d) → _)
(canonicalPrincipalExponent h d),
MvPolynomial.monomial e.val (t * (ε * r e)) :=by
proof · 37
lines
classical
let c := coefficientProfileCenter (principalCoefficientSlots (G:=G) (B:=B) h d) γ
let w := coefficientProfileWidth (principalCoefficientSlots (G:=G) (B:=B) h d)
(constantCoefficientSlot _ _) ρ γ ε
haveheq : (fun e => c e + coefficientProfileWidth (principalCoefficientSlots h d)
(constantCoefficientSlot _ _) ρ γ (t * ε) e * r e) =
(fun e => nonprincipalDilation Subtype.val (canonicalPrincipalExponent h d) t e * c e +
(nonprincipalDilation Subtype.val (canonicalPrincipalExponent h d) t e * w e) * r e) :=by
funext e
rw [boundedProfileWidth_dilation]
congr 1
exact boundedProfileCenter_dilation h d γ t e
rw [heq, monomialArrayPolynomial_affine_dilated_split Subtype.val Subtype.val_injective
(canonicalPrincipalExponent h d) (canonicalPrincipalExponent_injective h d hd)
(canonicalPrincipalExponent_ne_zero h d hd) (principalCoefficientSlot h d) (fun _ => rfl)]
havehc : (monomialArrayPolynomial Subtype.val (fun e => c e + w e * r e)).coeff 0 =
ρ * r (constantCoefficientSlot _ _) :=by
rw [show (0 : SamplerTupleIndexGB h →₀ ℕ) =
(constantCoefficientSlot (SamplerTupleIndexGB h) (h d)).val from rfl,
monomialArrayPolynomial_coeff Subtype.val Subtype.val_injective]
simp only [c, w, coefficientProfileCenter, coefficientProfileWidth,
constantCoefficientSlot_not_principal h d hd, ite_false, ite_true, zero_add]
rw [hc]
congr 1
· congr 1
apply Finset.sum_congr rfl
intro b _
havehp : principalCoefficientSlot h d b ∈ principalCoefficientSlots (G:=G) h d :=
(mem_principalCoefficientSlots h d _).mpr ⟨b, rfl⟩
havehz : principalCoefficientSlot (G:=G) h d b ≠ constantCoefficientSlot _ _ :=by
intro hz
exact constantCoefficientSlot_not_principal h d hd (hz ▸ hp)
simp only [c, w, coefficientProfileCenter, coefficientProfileWidth, hp, hz, ite_true, ite_false]
· apply Finset.sum_congr rfl
intro e he
obtain ⟨hz, hp⟩ := (bounded_mem_nonprincipalCoefficientSlots h d e).mp he
simp only [c, w, coefficientProfileCenter, coefficientProfileWidth, hz, hp, ite_false, zero_add]
theorempartitionedProfileJet_eq (hh : ∀ d, 0 < h d) (ρ γ ε : D→ℝ) (t : ℝ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
partitionedProfileJet h P extra sets ρ γ ε t y x =
booleanConstantJet sets (partitionedProfileConstant h P ρ y) +
coefficientArraySampler (fund : {d // ¬P d} => h d.val)
(partitionedProfilePrincipal h P γ y) sets (partitionedProfileTerms (G:=G) h P)
(fun d _ => ε d.val) (fun _ e => e.val) (fun d e => .inr ⟨d.val, e⟩)
(partitionedProfileInput P extra) t y x :=by
proof · 42
lines
classical
funext o
letV:= normalizedCubeTuple (partitionedProfileInput P extra) y x
have hv (s : Finset α) : MvPolynomial.eval (V s)
(monomialArrayPolynomial Subtype.val (fune : SamplerCoefficientSlotGB h o.1.val =>
coefficientProfileCenter (principalCoefficientSlots h o.1.val) (γ o.1.val) e +
coefficientProfileWidth (principalCoefficientSlots h o.1.val) (constantCoefficientSlot _ _)
(ρ o.1.val) (γ o.1.val) (t * ε o.1.val) e * y (.inr ⟨o.1.val, e⟩))) =
partitionedProfileConstant h P ρ y o.1 +
(∑ b, partitionedProfilePrincipal h P γ y o.1 b *
∏ v, V s (.inr ⟨o.1.val, b, v⟩)) +
t * ∑ e ∈ partitionedProfileTerms (G:=G) h P o.1,
(ε o.1.val * y (.inr ⟨o.1.val, e⟩)) * ∏ k ∈ e.val.support, V s k ^ e.val k :=by
rw [boundedProfile_polynomial_split h o.1.val (hh o.1.val)]
simp only [map_add, map_sum, MvPolynomial.eval_C]
congr 1
· congr 1
apply Finset.sum_congr rfl
intro b _
simp only [canonicalPrincipalExponent, productBlockExponent_monomial,
map_mul, MvPolynomial.eval_C, map_prod, MvPolynomial.eval_X,
partitionedProfilePrincipal]
ring
· rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro e _
simp only [MvPolynomial.eval_monomial, Finsupp.prod]
ring
havehe : partitionedProfileJet h P extra sets ρ γ ε t y x o = _ :=
congrArg (funf : Finset α →ℝ=> booleanCoefficient f (sets o.1 o.2)) (funext hv)
rw [he]
rw [booleanCoefficient_add, booleanCoefficient_add, booleanCoefficient_const,
booleanCoefficient_const_mul]
havehp : booleanCoefficient (fun s =>∑ b, partitionedProfilePrincipal h P γ y o.1 b *
∏ v, V s (.inr ⟨o.1.val, b, v⟩)) (sets o.1 o.2) =
jointBooleanSampler (fund : {d // ¬P d} => h d.val)
(partitionedProfilePrincipal h P γ y) sets x o :=by
rw [jointBooleanSampler_formula]
simp only [V, normalizedCubeTuple, partitionedProfileInput_principal, Sum.elim_inr]
rw [hp]
change _ + _ + t * normalizedCoefficientTailValue _ _ _ _ _ y x _ = _
simp only [Pi.add_apply, booleanConstantJet, coefficientArraySampler, add_assoc]
noncomputabledefpartitionedAllocatedProfileJet (R : D→ℝ) (t : ℝ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
(Σ d, O d) →ℝ:=
body · 3
lines
partitionedProfileJet h P extra sets (fun d =>R d / 4)
(fun d => principalProfileSize (R d) (Fintype.card (B d)))
(fun d => tailProfileSize (R d) 1 (Fintype.card (SamplerCoefficientSlotGB h d))) t y x
theorempartitionedProfileJet_mul (Rρ γ ε : D→ℝ) (t : ℝ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
partitionedProfileJet h P extra sets (fun d =>R d * ρ d) (fun d =>R d * γ d)
(fun d =>R d * ε d) t y x =
fun o =>R o.1.val * partitionedProfileJet h P extra sets ρ γ ε t y x o :=by
proof · 13
lines
classical
funext o
unfold partitionedProfileJet
havehscale : t * (R o.1.val * ε o.1.val) = R o.1.val * (t * ε o.1.val) :=by ring
simp_rw [hscale, coefficientProfileCenter_mul, coefficientProfileWidth_mul,
monomialArrayPolynomial_eval]
rw [← booleanCoefficient_const_mul]
congr 1
funext s
rw [Finset.mul_sum]
apply Finset.sum_congr rfl
intro e _
ring
theorempartitionedAllocatedProfileJet_scale (R : D→ℝ) (t : ℝ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
partitionedAllocatedProfileJet h P extra sets R t y x =
fun o =>R o.1.val * partitionedAllocatedProfileJet h P extra sets (fun _ =>1) t y x o :=by
proof · 9
lines
have hp (d : D) : principalProfileSize (R d) (Fintype.card (B d)) =
R d * principalProfileSize 1 (Fintype.card (B d)) :=by
simpa only [mul_one] using principalProfileSize_mul (R d) 1 (Fintype.card (B d))
have ht (d : D) : tailProfileSize (R d) 1 (Fintype.card (SamplerCoefficientSlotGB h d)) =
R d * tailProfileSize 11 (Fintype.card (SamplerCoefficientSlotGB h d)) :=by
simpa only [mul_one] using tailProfileSize_mul (R d) 11 (Fintype.card (SamplerCoefficientSlotGB h d))
unfold partitionedAllocatedProfileJet
simp_rw [hp, ht, div_eq_mul_inv, one_mul]
exact partitionedProfileJet_mul h P extra sets R (fun _ =>4⁻¹) _ _ t y x
theorempartitionedProfilePrincipal_unit_bounds
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ) (hy : ∀ j, |y j| ≤1)
(d : {d // ¬P d}) (b : B d.val) :
unitProfilePrincipalSize (B:=B) d.val ≤
|partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) y d b| ∧
|partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) y d b| ≤2 * unitProfilePrincipalSize (B:=B) d.val :=by
proof · 10
lines
have hγ := unitProfilePrincipalSize_pos (B:=B) d.val
obtain ⟨hl, hu⟩ := abs_le.mp (hy (.inr ⟨d.val, principalCoefficientSlot h d.val b⟩))
havehlo : unitProfilePrincipalSize (B:=B) d.val ≤
partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) y d b :=by
unfold partitionedProfilePrincipal
nlinarith
rw [abs_of_nonneg (hγ.le.trans hlo)]
refine ⟨hlo, ?_⟩
unfold partitionedProfilePrincipal
nlinarith
theorempartitioned_profile_comparison
{Ω DGZα : Type*} [MeasurableSpace Ω]
[FintypeD] [FintypeG] [FintypeZ] [Fintype α] [DecidableEq α]
{B : D→Type*} [∀ d, Fintype (B d)]
(h : D→ℕ) (hh : ∀ d, 0 < h d) (P : D→Prop) [DecidablePredP]
(extra : G→Option α →Z)
{O : {d // ¬P d} →Type*} [∀ d, Fintype (O d)] [∀ d, Nonempty (O d)]
(sets : ∀ d, O d →Finset α) (hsets : ∀ d, Function.Injective (sets d))
(hcard : ∀ d o, (sets d o).card ≤ h d.val)
(block : ∀ d, O d →B d.val) (hblock : ∀ d, Function.Injective (block d))
(ψ : ℝ→ℝ) (hψ : ContDiffℝ∞ ψ) (hrange : ∀ t, ψ t ∈Set.Icc (0 : ℝ) 1)
(hzero : ∀ t, |t| ≤1→ ψ t = 0) (hone : ∀ t, 2≤ |t| → ψ t = 1)
(AT : ℝ≥0) (hLip : LipschitzWithA ψ) (hTransition : LipschitzWithTReal.smoothTransition)
{degree : ℕ} (hdegree : ∀ d, h d ≤ degree)
(z : Ω →PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(hz : ∀ j, Measurable (fun a => z a j)) {ε : ℝ} (hε : 0 < ε) :
let t := booleanPerturbationScale (B:=fund : {d // ¬P d} =>B d.val) (O:=O) (α := α)
proof · 75
lines
(PartitionedProfileNoiseIndexGZ α B h P) (fund : {d // ¬P d} => h d.val)
(fun d => unitProfilePrincipalSize (B:=B) d.val)
(fun d =>2 * unitProfilePrincipalSize (B:=B) d.val) AT degree 11 ε
0 < t ∧ t ≤1∧∀μ : Measure Ω, IsProbabilityMeasure μ → (∀ᵐ a ∂μ, ∀ j, |z a j| ≤1) →∀R : D→ℝ, ∀f : Ω × ((Σ d, O d) →ℝ) →ℝ,
Measurable f → (∀ p, ‖f p‖ ≤1) →
|(∫ p, f (p.1, partitionedAllocatedProfileJet h P extra sets R0 (z p.1) p.2)
∂μ.prod (jointBooleanSource (fund : {d // ¬P d} => h d.val))) -
∫ p, f (p.1, partitionedAllocatedProfileJet h P extra sets R t (z p.1) p.2)
∂μ.prod (jointBooleanSource (fund : {d // ¬P d} => h d.val))| ≤ ε :=by
classical
let c :=fun a => partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) (z a)
have hc (d : {d // ¬P d}) (b : B d.val) : Measurable (fun a => c a d b) :=by
dsimp [c, partitionedProfilePrincipal]
exact measurable_const.add (measurable_const.mul (hz _))
obtain ⟨t, ht, ht1, hteq, hcomp⟩ := exists_random_coefficient_array_tolerance_with_scale
(Y:= Ω × ((Σ d, O d) →ℝ)) c hc z hz sets hsets (fund : {d // ¬P d} => h d.val)
(fun d => hh d.val) hcard block hblock
(fun d => unitProfilePrincipalSize (B:=B) d.val)
(fun d =>2 * unitProfilePrincipalSize (B:=B) d.val)
(fun d => unitProfilePrincipalSize_pos (B:=B) d.val)
(fun d => mul_nonneg (by norm_num) (unitProfilePrincipalSize_pos (B:=B) d.val).le)
ψ hψ hrange hzero hone AT hLip hTransition
(partitionedProfileTerms (G:=G) (B:=B) h P)
(fun d _ => unitProfileTailSize (G:=G) (B:=B) h d.val)
(fun _ e => e.val) (fun d e => .inr ⟨d.val, e⟩) (partitionedProfileInput P extra)
(fun d => hdegree d.val) (fun d e _ => e.property.trans (hdegree d.val))
(Csum:=1) (Wsum:=1) zero_le_one zero_le_one (partitionedProfileTail_unit_sum h P) hε
dsimp only
rw [← hteq]
refine ⟨ht, ht1, ?_⟩
intro μ hμ hbox R f hf hfb
havehclow : ∀ᵐ a ∂μ, ∀ d o, unitProfilePrincipalSize (B:=B) d.val ≤ |c a d (block d o)| :=by
filter_upwards [hbox] with a ha
intro d o
exact (partitionedProfilePrincipal_unit_bounds h P (z a) ha d (block d o)).1havehcup : ∀ᵐ a ∂μ, ∀ d o, |c a d (block d o)| ≤2 * unitProfilePrincipalSize (B:=B) d.val :=by
filter_upwards [hbox] with a ha
intro d o
exact (partitionedProfilePrincipal_unit_bounds h P (z a) ha d (block d o)).2havehcsum : ∀ᵐ a ∂μ, ∀ d, (∑ b, |c a d b|) ≤1:=by
filter_upwards [hbox] with a ha
exact partitionedProfilePrincipal_unit_sum h P (z a) ha
letF : Ω × ((Σ d, O d) →ℝ) → Ω × ((Σ d, O d) →ℝ) :=fun p =>
(p.1, fun o =>R o.1.val *
(booleanConstantJet sets (partitionedProfileConstant h P (fun _ =>1 / 4) (z p.1)) o + p.2 o))
havehF : MeasurableF:=by
apply measurable_fst.prodMk
apply Measurable.of_eval
intro o
have hzj := (hz (.inr ⟨o.1.val, constantCoefficientSlot _ _⟩)).comp
(measurable_fst : Measurable (Prod.fst : Ω × ((Σ d, O d) →ℝ) → Ω))
dsimp [F, booleanConstantJet, partitionedProfileConstant]
split_ifs <;> fun_prop
have hFactual (s : ℝ) (a : Ω)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
F (a, coefficientArraySampler (fund : {d // ¬P d} => h d.val) (c a) sets
(partitionedProfileTerms (G:=G) (B:=B) h P)
(fun d _ => unitProfileTailSize (G:=G) (B:=B) h d.val)
(fun _ e => e.val) (fun d e => .inr ⟨d.val, e⟩) (partitionedProfileInput P extra) s (z a) x) =
(a, partitionedAllocatedProfileJet h P extra sets R s (z a) x) :=by
apply Prod.ext
· rfl
dsimp only [F]
rw [partitionedAllocatedProfileJet_scale]
unfold partitionedAllocatedProfileJet
rw [partitionedProfileJet_eq h P extra sets hh]
rfl
have hFzero (a : Ω)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
F (a, jointBooleanSampler (fund : {d // ¬P d} => h d.val) (c a) sets x) =
(a, partitionedAllocatedProfileJet h P extra sets R0 (z a) x) :=by
simpa only [coefficientArraySampler_zero] using hFactual 0 a x
simpa only [hFzero, hFactual] using hcomp μ hμ hbox hclow hcup hcsum F hF f hf hfb
noncomputabledefpartitionedIdealMap
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
(Σ d, O d) →ℝ:=
body · 3
lines
booleanConstantJet sets (partitionedProfileConstant h P (fun _ =>1 / 4) y) +
jointBooleanSampler (fund : {d // ¬P d} => h d.val)
(partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) y) sets x
theorempartitionedIdealMap_measurable {Ω : Type*} [MeasurableSpace Ω]
(z : Ω →PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(hz : ∀ j, Measurable (fun a => z a j)) :
Measurable (funp : Ω ×
(PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) =>
partitionedIdealMap h P sets (z p.1) p.2) :=by
proof · 15
lines
have hc (d : {d // ¬P d}) (b : B d.val) : Measurable (fun a =>
partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) (z a) d b) :=by
dsimp [partitionedProfilePrincipal]
exact measurable_const.add (measurable_const.mul (hz _))
havehb : Measurable (fun a => booleanConstantJet sets
(partitionedProfileConstant h P (fun _ =>1 / 4) (z a))) :=by
apply booleanConstantJet_measurable_comp sets
(fun a => partitionedProfileConstant h P (fun _ =>1 / 4) (z a))
intro d
dsimp [partitionedProfileConstant]
exact measurable_const.mul (hz _)
unfold partitionedIdealMap
exact (hb.comp measurable_fst).add
(jointBooleanSampler_measurable_frozen (fund : {d // ¬P d} => h d.val) sets
(fun a => partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) (z a)) hc)
theorempartitionedAllocatedProfileJet_zero (hh : ∀ d, 0 < h d)
(extra : G→Option α →Z) (R : D→ℝ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
partitionedAllocatedProfileJet h P extra sets R0 y x =
fun o =>R o.1.val * partitionedIdealMap h P sets y x o :=by
proof · 4
lines
rw [partitionedAllocatedProfileJet_scale]
unfold partitionedAllocatedProfileJet
rw [partitionedProfileJet_eq h P extra sets hh, coefficientArraySampler_zero]
rfl
theorempartitionedRegularizedIdeal_measurable {Ω : Type*} [MeasurableSpace Ω]
(δ : ℝ≥0) (z : Ω →PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(hz : ∀ j, Measurable (fun a => z a j)) :
Measurable (funp : Ω × ((Σ d, O d) →ℝ) =>
partitionedRegularizedIdeal h P sets δ (z p.1) p.2) :=
proof · 1
line
conditionalRegularizedDensity_measurable _ _ (partitionedIdealMap_measurable h P sets z hz) δ
theorempartitionedRegularizedIdeal_probability (δ : ℝ≥0) (hδ : 0 < δ)
(y : PartitionedProfileNoiseIndexGZ α B h P→ℝ) :
(∀ x, 0≤ partitionedRegularizedIdeal h P sets δ y x) ∧Integrable (partitionedRegularizedIdeal h P sets δ y) ∧
(∫ x, partitionedRegularizedIdeal h P sets δ y x) = 1:=by
theorempartitioned_profile_comparison_below
{Ω DGZα : Type*} [MeasurableSpace Ω]
[FintypeD] [FintypeG] [FintypeZ] [Fintype α] [DecidableEq α]
{B : D→Type*} [∀ d, Fintype (B d)]
(h : D→ℕ) (hh : ∀ d, 0 < h d) (P : D→Prop) [DecidablePredP]
(extra : G→Option α →Z)
{O : {d // ¬P d} →Type*} [∀ d, Fintype (O d)] [∀ d, Nonempty (O d)]
(sets : ∀ d, O d →Finset α) (hsets : ∀ d, Function.Injective (sets d))
(hcard : ∀ d o, (sets d o).card ≤ h d.val)
(block : ∀ d, O d →B d.val) (hblock : ∀ d, Function.Injective (block d))
(ψ : ℝ→ℝ) (hψ : ContDiffℝ∞ ψ) (hrange : ∀ t, ψ t ∈Set.Icc (0 : ℝ) 1)
(hzero : ∀ t, |t| ≤1→ ψ t = 0) (hone : ∀ t, 2≤ |t| → ψ t = 1)
(AT : ℝ≥0) (hLip : LipschitzWithA ψ) (hTransition : LipschitzWithTReal.smoothTransition)
{degree : ℕ} (hdegree : ∀ d, h d ≤ degree)
(z : Ω →PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(hz : ∀ j, Measurable (fun a => z a j)) {ε : ℝ} (hε : 0 < ε) :
let t := booleanPerturbationScale (B:=fund : {d // ¬P d} =>B d.val) (O:=O) (α := α)
proof · 76
lines
(PartitionedProfileNoiseIndexGZ α B h P) (fund : {d // ¬P d} => h d.val)
(fun d => unitProfilePrincipalSize (B:=B) d.val)
(fun d =>2 * unitProfilePrincipalSize (B:=B) d.val) AT degree 11 ε
0 < t ∧ t ≤1∧∀s : ℝ, |s| ≤ t →∀μ : Measure Ω, IsProbabilityMeasure μ → (∀ᵐ a ∂μ, ∀ j, |z a j| ≤1) →∀R : D→ℝ, ∀f : Ω × ((Σ d, O d) →ℝ) →ℝ,
Measurable f → (∀ p, ‖f p‖ ≤1) →
|(∫ p, f (p.1, partitionedAllocatedProfileJet h P extra sets R0 (z p.1) p.2)
∂μ.prod (jointBooleanSource (fund : {d // ¬P d} => h d.val))) -
∫ p, f (p.1, partitionedAllocatedProfileJet h P extra sets R s (z p.1) p.2)
∂μ.prod (jointBooleanSource (fund : {d // ¬P d} => h d.val))| ≤ ε :=by
classical
let c :=fun a => partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B)) (z a)
have hc (d : {d // ¬P d}) (b : B d.val) : Measurable (fun a => c a d b) :=by
dsimp [c, partitionedProfilePrincipal]
exact measurable_const.add (measurable_const.mul (hz _))
obtain ⟨t, ht, ht1, hteq, hcomp⟩ := exists_random_coefficient_smaller_tolerance_with_scale
(Y:= Ω × ((Σ d, O d) →ℝ)) c hc z hz sets hsets (fund : {d // ¬P d} => h d.val)
(fun d => hh d.val) hcard block hblock
(fun d => unitProfilePrincipalSize (B:=B) d.val)
(fun d =>2 * unitProfilePrincipalSize (B:=B) d.val)
(fun d => unitProfilePrincipalSize_pos (B:=B) d.val)
(fun d => mul_nonneg (by norm_num) (unitProfilePrincipalSize_pos (B:=B) d.val).le)
ψ hψ hrange hzero hone AT hLip hTransition
(partitionedProfileTerms (G:=G) (B:=B) h P)
(fun d _ => unitProfileTailSize (G:=G) (B:=B) h d.val)
(fun _ e => e.val) (fun d e => .inr ⟨d.val, e⟩) (partitionedProfileInput P extra)
(fun d => hdegree d.val) (fun d e _ => e.property.trans (hdegree d.val))
(Csum:=1) (Wsum:=1) zero_le_one zero_le_one (partitionedProfileTail_unit_sum h P) hε
dsimp only
rw [← hteq]
refine ⟨ht, ht1, ?_⟩
intro s hs μ hμ hbox R f hf hfb
havehclow : ∀ᵐ a ∂μ, ∀ d o, unitProfilePrincipalSize (B:=B) d.val ≤ |c a d (block d o)| :=by
filter_upwards [hbox] with a ha
intro d o
exact (partitionedProfilePrincipal_unit_bounds h P (z a) ha d (block d o)).1havehcup : ∀ᵐ a ∂μ, ∀ d o, |c a d (block d o)| ≤2 * unitProfilePrincipalSize (B:=B) d.val :=by
filter_upwards [hbox] with a ha
intro d o
exact (partitionedProfilePrincipal_unit_bounds h P (z a) ha d (block d o)).2havehcsum : ∀ᵐ a ∂μ, ∀ d, (∑ b, |c a d b|) ≤1:=by
filter_upwards [hbox] with a ha
exact partitionedProfilePrincipal_unit_sum h P (z a) ha
letF : Ω × ((Σ d, O d) →ℝ) → Ω × ((Σ d, O d) →ℝ) :=fun p =>
(p.1, fun o =>R o.1.val *
(booleanConstantJet sets (partitionedProfileConstant h P (fun _ =>1 / 4) (z p.1)) o + p.2 o))
havehF : MeasurableF:=by
apply measurable_fst.prodMk
apply Measurable.of_eval
intro o
have hzj := (hz (.inr ⟨o.1.val, constantCoefficientSlot _ _⟩)).comp
(measurable_fst : Measurable (Prod.fst : Ω × ((Σ d, O d) →ℝ) → Ω))
dsimp [F, booleanConstantJet, partitionedProfileConstant]
split_ifs <;> fun_prop
have hFactual (s : ℝ) (a : Ω)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
F (a, coefficientArraySampler (fund : {d // ¬P d} => h d.val) (c a) sets
(partitionedProfileTerms (G:=G) (B:=B) h P)
(fun d _ => unitProfileTailSize (G:=G) (B:=B) h d.val)
(fun _ e => e.val) (fun d e => .inr ⟨d.val, e⟩) (partitionedProfileInput P extra) s (z a) x) =
(a, partitionedAllocatedProfileJet h P extra sets R s (z a) x) :=by
apply Prod.ext
· rfl
dsimp only [F]
rw [partitionedAllocatedProfileJet_scale]
unfold partitionedAllocatedProfileJet
rw [partitionedProfileJet_eq h P extra sets hh]
rfl
have hFzero (a : Ω)
(x : PrincipalAxisParameter (B:=B) (h := h) (α := α) (fun d =>¬P d) →ℝ) :
F (a, jointBooleanSampler (fund : {d // ¬P d} => h d.val) (c a) sets x) =
(a, partitionedAllocatedProfileJet h P extra sets R0 (z a) x) :=by
simpa only [coefficientArraySampler_zero] using hFactual 0 a x
simpa only [hFzero, hFactual] using hcomp s hs μ hμ hbox hclow hcup hcsum F hF f hf hfb
theoremprofileNoiseWithActive_active {DGZα : Type*} {B : D→Type*}
(h : D→ℕ) (P : D→Prop) [DecidablePredP]
(z : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(r : ActiveProfileCoefficientIndexGB h P→ℝ)
(d : {d // ¬P d}) (e : SamplerCoefficientSlotGB h d.val) :
profileNoiseWithActive h P z r (.inr ⟨d.val, e⟩) = r ⟨d, e⟩ :=by
proof · 1
line
simp only [profileNoiseWithActive, dite_eq_right d.property]
theoremprofileNoiseWithActive_measurable {Ω DGZα : Type*} [MeasurableSpace Ω]
{B : D→Type*} (h : D→ℕ) (P : D→Prop) [DecidablePredP]
(z : Ω →PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(r : Ω →ActiveProfileCoefficientIndexGB h P→ℝ)
(hz : ∀ j, Measurable (fun a => z a j)) (hr : ∀ j, Measurable (fun a => r a j))
(j : PartitionedProfileNoiseIndexGZ α B h P) :
Measurable (fun a => profileNoiseWithActive h P (z a) (r a) j) :=by
proof · 5
lines
rcases j with j | ⟨d, e⟩
· exact hz _
· by_cases hp : P d
· simpa only [profileNoiseWithActive, dite_eq_left hp] using hz (.inr ⟨d, e⟩)
· simpa only [profileNoiseWithActive, dite_eq_right hp] using hr ⟨⟨d, hp⟩, e⟩
theorempartitionedIdealMap_withActive_eq {DGZα : Type*} [Fintype α] [DecidableEq α]
{B : D→Type*} [∀ d, Fintype (B d)] (h : D→ℕ)
(P : D→Prop) [DecidablePredP] {O : {d // ¬P d} →Type*}
(sets : ∀ d, O d →Finset α)
(z : PartitionedProfileNoiseIndexGZ α B h P→ℝ)
(r : ActiveProfileCoefficientIndexGB h P→ℝ) :
partitionedIdealMap h P sets (profileNoiseWithActive h P z r) =
partitionedIdealMap h P sets (profileNoiseWithActive (Z:=Z) (α := α) h P (fun _ =>0) r) :=by
proof · 12
lines
havehc : partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B))
(profileNoiseWithActive h P z r) =
partitionedProfilePrincipal h P (unitProfilePrincipalSize (B:=B))
(profileNoiseWithActive (Z:=Z) (α := α) h P (fun _ =>0) r) :=by
funext d b
simp only [partitionedProfilePrincipal, profileNoiseWithActive_active]
havehb : partitionedProfileConstant h P (fun _ =>1 / 4) (profileNoiseWithActive h P z r) =
partitionedProfileConstant h P (fun _ =>1 / 4) (profileNoiseWithActive (Z:=Z) (α := α) h P (fun _ =>0) r) :=by
funext d
simp only [partitionedProfileConstant, profileNoiseWithActive_active]
unfold partitionedIdealMap
rw [hc, hb]