theoremactual_zero_box_bound (f : FoldedProofA) (σ η : ℝ) (hm : 0 < m) {k : ℕ}
(Y : UnpointedBox (Fin m) (Fin n) k)
(J : Finset (Finset (Row m n) × (Point m n →ℕ))) {A₀ : ℝ} (hA : 0≤A₀)
(B : FaceArrayA m n) :
(∫ c, faceCorrelation (zeroProcessedOnBox f σ η YJA₀B c) ∂γpi (Point m n)) ≤2*A₀*((m:ℝ)/(k+1))^(((2^m:ℕ):ℝ)⁻¹) :=by
proof · 7
lines
havehx : 0≤∫ c, faceCorrelation (zeroProcessedOnBox f σ η YJA₀B c) ∂γpi (Point m n) :=
integral_nonneg (fun c => faceCorrelation_nonneg _)
havehd : 0≤(m:ℝ)/(k+1) :=by positivity
havehq : (2^m:ℕ)≠0:=by positivity
apply (pow_le_pow_iff_left₀ hx (by positivity) hq).mp
rw [mul_pow,Real.rpow_inv_natCast_pow hd hq]
exact actual_zero_box_power f σ η hm YJ hA B
theoremactual_zero_box_average (f : FoldedProofA) (σ η : ℝ) (hm : 0 < m) {k : ℕ}
(Y : UnpointedBox (Fin m) (Fin n) k)
(J : Finset (Finset (Row m n) × (Point m n →ℕ))) {A₀ : ℝ} (hA : 0≤A₀) :
(∫ c, (𝔼 B : FaceArrayA m n,
faceCorrelation (zeroProcessedOnBox f σ η YJA₀B c)) ∂γpi (Point m n)) ≤2*A₀*((m:ℝ)/(k+1))^(((2^m:ℕ):ℝ)⁻¹) :=by
proof · 9
lines
have hb (B : FaceArrayA m n) (c : Point m n →ℝ) :
|faceCorrelation (zeroProcessedOnBox f σ η YJA₀B c)|≤2*A₀:=by
rw [abs_of_nonneg (faceCorrelation_nonneg _)]
exact (faceCorrelation_le_l1 _).trans ((Finset.expect_le_expect (fun u _ =>
zeroProcessedOnBox_abs_le f σ η YJ hA B c u)).trans_eq (Fintype.expect_const _))
rw [Box.integral_expect _ (funB=>Box.bounded_integrable
(faceCorrelation_measurable_field _ (zeroProcessedOnBox_measurable f σ η YJA₀B)).aestronglyMeasurable (hb B))]
exact (Finset.expect_le_expect (funB _ => actual_zero_box_bound f σ η hm YJ hA B)).trans_eq
(Fintype.expect_const _)
lemmafirstFailure_eq (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ)
(c g : Point m n →ℝ) (l : Code m n →ℝ) :
firstFailure f B σ η c g l =
(1-bitSign (f.answer (pullQuery B c 0))*bitSign (f.answer (pullQuery B (c+σ•g) (η•l))))/2:=by
proof · 2
lines
unfold firstFailure
cases f.answer (pullQuery B c 0) <;> cases f.answer (pullQuery B (c+σ•g) (η•l)) <;> norm_num [bitSign]
lemmameasurable_smooth (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ) :
Measurable (smooth f B σ η) :=by
proof · 3
lines
havehh : Measurable (funp : (Point m n →ℝ) × (Point m n →ℝ) =>
tableSmooth f B η (p.1+σ•p.2)) := (measurable_tableSmooth f B η).comp (by fun_prop)
exact hh.stronglyMeasurable.integral_prod_right.measurable
lemmasmooth_abs_le (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ)
(c : Point m n →ℝ) : |smooth f B σ η c|≤1:=by
proof · 4
lines
change |∫ g, tableSmooth f B η (c+σ•g) ∂gauss (Point m n)|≤1
simpa only [Real.norm_eq_abs,MeasureTheory.probReal_univ,mul_one] using
norm_integral_le_of_norm_le_const (μ := gauss (Point m n)) (f :=fun g => tableSmooth f B η (c+σ•g)) (C:=1)
(ae_of_all _ (fun g =>by simpa only [Real.norm_eq_abs] using tableSmooth_abs_le f B η (c+σ•g)))
lemmafirstRejection_eq (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ)
(c : Point m n →ℝ) :
firstRejection f B σ η c = (1-bitSign (f.answer (pullQuery B c 0))*smooth f B σ η c)/2:=by
proof · 15
lines
have hi (g : Point m n →ℝ) : Integrable
(fun l => bitSign (f.answer (pullQuery B (c+σ•g) (η•l)))) (gauss (Code m n)) :=Box.bounded_integrable ((measurable_answer f B η).comp (measurable_const.prodMk measurable_id)).aestronglyMeasurable
(fun l => (bitSign_abs _).le)
haveht : Integrable (fun g => tableSmooth f B η (c+σ•g)) (gauss (Point m n)) :=Box.bounded_integrable ((measurable_tableSmooth f B η).comp (by fun_prop)).aestronglyMeasurable
(fun g => tableSmooth_abs_le f B η _)
unfold firstRejection
simp_rw [firstFailure_eq, integral_div]
simp_rw [integral_sub (integrable_const 1) ((hi _).const_mul _), integral_const_mul]
simp only [integral_const,MeasureTheory.probReal_univ,one_smul]
change (∫ g, (1-bitSign (f.answer (pullQuery B c 0))*tableSmooth f B η (c+σ•g)) ∂gauss (Point m n))/2=_
rw [integral_sub (integrable_const 1) (ht.const_mul _),integral_const_mul]
simp only [integral_const,MeasureTheory.probReal_univ,one_smul]
rfl
lemmameasurable_firstRejection (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ) :
Measurable (firstRejection f B σ η) :=by
proof · 7
lines
simp_rw [show firstRejection f B σ η = fun c =>
(1-bitSign (f.answer (pullQuery B c 0))*smooth f B σ η c)/2by
funext c; exact firstRejection_eq f B σ η c]
haveh0 : Measurable (func : Point m n →ℝ=> bitSign (f.answer (pullQuery B c 0))) :=
(measurable_of_finite bitSign).comp ((measurable_of_finite f.answer).comp
((measurable_pullQuery B).comp (measurable_id.prodMk measurable_const)))
exact (measurable_const.sub (h0.mul (measurable_smooth f B σ η))).div_const _
lemmafirstRejection_range (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ)
(c : Point m n →ℝ) : 0≤firstRejection f B σ η c ∧ firstRejection f B σ η c≤1:=by
proof · 3
lines
rw [firstRejection_eq]
have hb := abs_le.mp (smooth_abs_le f B σ η c)
cases f.answer (pullQuery B c 0) <;> norm_num [bitSign] <;> constructor <;> linarith
lemmasmooth_energy_first (f : FoldedProofA) (B : FaceArrayA m n) (σ η : ℝ)
(c : Point m n →ℝ) :
1-4*firstRejection f B σ η c≤(smooth f B σ η c)^2:=by
proof · 3
lines
rw [firstRejection_eq]
cases f.answer (pullQuery B c 0) <;> simp only [bitSign,Bool.false_eq_true,↓reduceIte] <;>
nlinarith [sq_nonneg (smooth f B σ η c-1),sq_nonneg (smooth f B σ η c+1)]
theoremgradient_energy_first (f : FoldedProofA) (B : FaceArrayA m n)
(hn : 0 < n) {σ η : ℝ} (hσ : σ≠0) (hη : η≠0) :
1-4*(∫ c, firstRejection f B σ η c ∂gauss (Point m n)) ≤∫ c, spatialEnergy (gradient f B σ η c) ∂gauss (Point m n) :=by
proof · 14
lines
havehr : Integrable (firstRejection f B σ η) (gauss (Point m n)) :=Box.bounded_integrable (measurable_firstRejection f B σ η).aestronglyMeasurable (fun c =>by
rw [abs_of_nonneg (firstRejection_range f B σ η c).1]
exact (firstRejection_range f B σ η c).2)
havehs : MemLp (smooth f B σ η) 2 (gauss (Point m n)) :=MemLp.of_bound (measurable_smooth f B σ η).aestronglyMeasurable 1
(ae_of_all _ (fun c =>by simpa only [Real.norm_eq_abs] using smooth_abs_le f B σ η c))
apply le_trans _ (smooth_energy_le_gradient f B hn hσ hη)
calc
_ = ∫ c, 1-4*firstRejection f B σ η c ∂gauss (Point m n) :=by
rw [integral_sub (integrable_const 1) (hr.const_mul 4),integral_const_mul]
simp
_ ≤ _ := integral_mono ((integrable_const 1).sub (hr.const_mul 4)) hs.integrable_sq
(smooth_energy_first f B σ η)