Finite-mean natural-number laws, discrete convexity and extended expectations
DefinitionSampleCRS_AlmostGreedy_Supplement_discreteOrderFor , define and . Discrete convexity means all second differences are nonnegative; discrete concavity means they are nonpositive. A natural-number law is an arbitrary probability measure on with finite first moment. Its stop loss at is , with subtraction in the reals.
For two such laws , define . The order tests every discrete convex real function integrable under both laws. Signed extended expectations use
On convex tests the negative part is finite under finite-mean laws; on concave tests the positive part is finite. Thus B.1 can retain infinite expectations. The summability predicate for B.2 is exactly the convergence of the nonnegative series . There is no restriction to finite support, equal means or a common underlying probability space.
import Mathlib
open MeasureTheory
namespace SampleCRS.AlmostGreedy.Supplement
def delta (f : ℕ → ℝ) (j : ℕ) : ℝ := f (j + 1) - f j
def delta2 (f : ℕ → ℝ) (j : ℕ) : ℝ := delta f (j + 1) - delta f j
def DiscreteConvex (f : ℕ → ℝ) : Prop := ∀ j, 0 ≤ delta2 f j
def DiscreteConcave (f : ℕ → ℝ) : Prop := ∀ j, delta2 f j ≤ 0
/-- Arbitrary N-supported laws, using their pushforward distributions. There is
no common-space, independence, finite-support or higher-moment assumption. -/
structure NatLaw where
law : Measure ℕ
probability : IsProbabilityMeasure law
finiteMean : Integrable (fun j : ℕ => (j : ℝ)) law
attribute [instance] NatLaw.probability
noncomputable def mean (P : NatLaw) : ℝ := ∫ j, (j : ℝ) ∂P.law
/-- Real subtraction after casting counts, followed by the positive part. -/
noncomputable def stopLoss (P : NatLaw) (j : ℕ) : ℝ :=
∫ x, max ((x : ℝ) - (j : ℝ) - 1) 0 ∂P.law
noncomputable def stopDifference (P Q : NatLaw) (j : ℕ) : ℝ := stopLoss P j - stopLoss Q j
def ConvexDominates (P Q : NatLaw) : Prop :=
∀ f : ℕ → ℝ, DiscreteConvex f → Integrable f P.law → Integrable f Q.law →
(∫ j, f j ∂Q.law) ≤ ∫ j, f j ∂P.law
/-- Signed extended expectation. Convex tests under finite-mean laws have a
finite negative part, and concave tests have a finite positive part. Thus on
the domains used in B.1 there is no infinity-minus-infinity ambiguity. -/
noncomputable def extendedE (P : Measure ℕ) (f : ℕ → ℝ) : EReal :=
(∫⁻ j, ENNReal.ofReal (f j) ∂P).toEReal - (∫⁻ j, ENNReal.ofReal (-f j) ∂P).toEReal
def SecondDifferenceSummable (P Q : NatLaw) (f : ℕ → ℝ) : Prop :=
Summable (fun j => (stopLoss P j + stopLoss Q j) * |delta2 f j|)
end SampleCRS.AlmostGreedy.Supplement