import OAI.MeasureTheory.Falconer.Recursion.CriticalScalarPotential import OAI.MeasureTheory.Falconer.Recursion.TruncatedScalarPotential namespace OAI /-! # Critical maximum-truncated potentials with logarithmic scale loss -/ namespace Falconer open Set MeasureTheory open scoped ENNReal variable {X : Type*} [MeasurableSpace X] theorem truncated_scalar_potential_critical (μ : Measure X) (a : X → ℝ) (ha : Measurable a) (ha0 : ∀ x, 0 ≤ a x) {K q : ℝ} (hq : 0 ≤ q) (g k : ℕ) (hsmall : ∀ j : ℕ, j ≤ g+k → μ {x | a x < 1/(2:ℝ)^j} ≤ ENNReal.ofReal (K*(1/(2:ℝ)^j)^q)) : (∫⁻ x in {x | a x < 1/(2:ℝ)^g}, ENNReal.ofReal ((1/max (a x) (1/(2:ℝ)^(g+k)))^q) ∂μ) ≤ ENNReal.ofReal ((2:ℝ)^q)* (ENNReal.ofReal K+(k:ℝ≥0∞)*ENNReal.ofReal (K*(2:ℝ)^q)) := by have hp (x : X) : (1/max (a x) (1/(2:ℝ)^(g+k)))^q ≤ (2:ℝ)^q*(1/(a x+1/(2:ℝ)^(g+k)))^q := by have hax := ha0 x calc _ ≤ (2/(a x+1/(2:ℝ)^(g+k)))^q := Real.rpow_le_rpow (by positivity) (inverse_max_le_two_inverse_add (ha0 x) (by positivity)) hq _ = _ := by rw [show 2/(a x+1/(2:ℝ)^(g+k)) = 2*(1/(a x+1/(2:ℝ)^(g+k))) by ring, Real.mul_rpow (by norm_num) (by positivity)] calc _ ≤ ∫⁻ x in {x | a x < 1/(2:ℝ)^g}, ENNReal.ofReal ((2:ℝ)^q)*ENNReal.ofReal ((1/(a x+1/(2:ℝ)^(g+k)))^q) ∂μ := by apply lintegral_mono intro x dsimp only rw [← ENNReal.ofReal_mul (by positivity)] exact ENNReal.ofReal_le_ofReal (hp x) _ = ENNReal.ofReal ((2:ℝ)^q)*(∫⁻ x in {x | a x < 1/(2:ℝ)^g}, ENNReal.ofReal ((1/(a x+1/(2:ℝ)^(g+k)))^q) ∂μ) := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top _ ≤ _ := mul_le_mul' le_rfl (regularized_scalar_potential_critical μ a ha ha0 hq g k hsmall) end Falconer end OAI