import Mathlib import OAI.Probability.SKBarriers.Parisi.CDFEndpoint import OAI.Probability.SKBarriers.Parisi.CDFPotential namespace OAI section noncomputable section open scoped NNReal Topology BigOperators open MeasureTheory ProbabilityTheory Filter Set namespace SK.Analytic theorem derivative_nonpos_at_right_minimum {f : ℝ → ℝ} {d : ℝ} (hd : HasDerivAt f d 1) (hm : ∀ r∈Icc (0:ℝ) 1, f 1≤f r) : d≤0 := by have H := (hasDerivAt_iff_tendsto_slope_left_right.mp hd).1 apply le_of_tendsto H have HP : ∀ᶠ r : ℝ in 𝓝[<] (1:ℝ), 0 scalarCDFParisi_overlap_on_support hβ μ hμ hmin hq) theorem supported_cdf_area (μ : ProbabilityMeasure ℝ) (hμ : (μ : Measure ℝ) (Icc (0:ℝ) 1)=1) : (∫ s in Icc (0:ℝ) 1, cdf (μ : Measure ℝ) s)=1-∫ q, q ∂(μ : Measure ℝ) := by have H := supported_cdf_integral_duality μ hμ (g:=fun _ => (1:ℝ)) (integrable_const 1) simp only [mul_one,intervalIntegral.integral_const,smul_eq_mul] at H have HI : Integrable (fun q : ℝ => q) (μ : Measure ℝ) := supported_continuous_integrable μ hμ continuousOn_id rw [H,integral_sub (integrable_const 1) HI] simp only [integral_const,probReal_univ,one_smul] end SK.Analytic end end end OAI