Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Independent-error pricing model and revenue objectives

Definition
FBMSP_Model

by mikeh · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

market-segmentationoperations-researchpricing

This bundle defines inclusive survival S(t)=Pr⁡(E≥t)S(t)=\Pr(E\ge t)S(t)=Pr(E≥t), integrable mean-zero error, nonnegative integrable prediction laws, and density-bearing MHR through log-concave survival. It defines customer revenue, the least optimal price, price menus, unrestricted kkk-menu revenue, personalized revenue, model-market revenue, mean, variance, and segmentation loss. General prediction distributions remain available. A separate predicate records nonnegative realized valuations and is explicitly used by Theorem 3 and Corollary 2.

The finite layer specifies sorted distinct prediction values, positive normalized weights, arbitrary assignments and nonnegative prices, index-block revenues, an attaining block-price oracle, cuts, and the assignment that realizes them. The final definitions specify submodularity, finite-candidate greedy chains, and their optimization benchmark. These objects are built from the economic primitives; none assumes interval optimality or the desired approximation/concavity conclusions.

Definition code
import Mathlib

/-! Independent location-family pricing. Prediction values and errors are
sampled from separate probability laws. All suprema optimize over prices,
not over a set defined in terms of the desired theorem. -/
noncomputable section
open MeasureTheory Set
open scoped BigOperators ENNReal

namespace FBMSP

/-- Inclusive survival, including atoms at a posted price. -/
def survival (η : Measure ℝ) (t : ℝ) : ℝ := (η (Ici t)).toReal

def ValidNoise (η : Measure ℝ) : Prop :=
  IsProbabilityMeasure η ∧ Integrable (fun e : ℝ => e) η ∧
    (∫ e, e ∂η) = 0

def ValidPredictions (ν : Measure ℝ) : Prop :=
  IsProbabilityMeasure ν ∧ Integrable (fun x : ℝ => x) ν ∧
    ∀ᵐ x ∂ν, 0 ≤ x

/-- A density-bearing MHR law, using the log-concave-survival formulation
used in the proof of Lemma 2(b). Zeros outside the support are allowed. -/
def HasMHR (η : Measure ℝ) : Prop :=
  η ≪ volume ∧
    ConcaveOn ℝ {t : ℝ | 0 < survival η t}
      (fun t => Real.log (survival η t))

def NonnegativeValuations (ν η : Measure ℝ) : Prop :=
  ∀ᵐ x ∂ν, ∀ᵐ e ∂η, 0 ≤ x + e

def postedRevenue (η : Measure ℝ) (x p : ℝ) : ℝ :=
  p * survival η (p - x)

def singleRevenue (η : Measure ℝ) (x : ℝ) : ℝ :=
  sSup {r : ℝ | ∃ p : ℝ, 0 ≤ p ∧ r = postedRevenue η x p}

def IsOptimalPrice (η : Measure ℝ) (x p : ℝ) : Prop :=
  0 ≤ p ∧ ∀ q : ℝ, 0 ≤ q → postedRevenue η x q ≤ postedRevenue η x p

def IsLeastOptimalPrice (η : Measure ℝ) (x p : ℝ) : Prop :=
  IsOptimalPrice η x p ∧ ∀ q, IsOptimalPrice η x q → p ≤ q

def singlePrice (η : Measure ℝ) (x : ℝ) : ℝ :=
  sInf {p : ℝ | IsOptimalPrice η x p}

def margin (η : Measure ℝ) (x : ℝ) : ℝ := singlePrice η x - x

/-- Price zero is always available as the zero-revenue outside option. -/
def menuAt (η : Measure ℝ) (x : ℝ) (P : Finset ℝ) : ℝ :=
  if h : P.Nonempty then max 0 (P.sup' h (fun p => postedRevenue η x p)) else 0

def FeasibleMenu (P : Finset ℝ) (k : ℕ) : Prop :=
  P.card ≤ k ∧ ∀ p ∈ P, 0 ≤ p

def menuRevenue (ν η : Measure ℝ) (P : Finset ℝ) : ℝ :=
  ∫ x, menuAt η x P ∂ν

/-- At most k prices; ties and unused/duplicate price slots do not change revenue. -/
def optimalRevenue (ν η : Measure ℝ) (k : ℕ) : ℝ :=
  sSup {r : ℝ | ∃ P : Finset ℝ, FeasibleMenu P k ∧ r = menuRevenue ν η P}

def personalizedRevenue (ν η : Measure ℝ) : ℝ :=
  ∫ x, singleRevenue η x ∂ν

def predictionMean (ν : Measure ℝ) : ℝ := ∫ x, x ∂ν

def predictionVariance (ν : Measure ℝ) : ℝ :=
  ∫ x, (x - predictionMean ν) ^ 2 ∂ν

def modelRevenue (ν : Measure ℝ) (k : ℕ) : ℝ :=
  optimalRevenue ν (Measure.dirac 0) k

def segmentationLoss (ν η : Measure ℝ) (k : ℕ) : ℝ :=
  personalizedRevenue ν η - optimalRevenue ν η k

def finitePolicyRevenue {n k : ℕ} (η : Measure ℝ)
    (μ w : Fin n → ℝ) (a : Fin n → Fin k) (p : Fin k → ℝ) : ℝ :=
  ∑ i, w i * postedRevenue η (μ i) (p (a i))

def finiteMenuRevenue {n : ℕ} (η : Measure ℝ)
    (μ w : Fin n → ℝ) (P : Finset ℝ) : ℝ :=
  ∑ i, w i * menuAt η (μ i) P

def ValidFiniteMarket {n : ℕ} (μ w : Fin n → ℝ) : Prop :=
  0 < n ∧ StrictMono μ ∧ (∀ i, 0 ≤ μ i) ∧ (∀ i, 0 < w i) ∧ (∑ i, w i) = 1

/-- The score of an index interval [a,b), so the largest type is included
when b=n. Empty intervals have score zero. -/
def blockRevenue {n : ℕ} (η : Measure ℝ) (μ w : Fin n → ℝ)
    (a b : ℕ) (p : ℝ) : ℝ :=
  ∑ i ∈ Finset.univ.filter (fun i : Fin n => a ≤ i.val ∧ i.val < b),
    w i * postedRevenue η (μ i) p

/-- The oracle returns an attaining price. Its charged cost includes
evaluation of the attained block revenue. -/
def BlockOracle {n : ℕ} (η : Measure ℝ) (μ w : Fin n → ℝ)
    (o : ℕ → ℕ → ℝ) : Prop :=
  ∀ a b, a ≤ b → b ≤ n →
    0 ≤ o a b ∧ ∀ p : ℝ, 0 ≤ p →
      blockRevenue η μ w a b p ≤ blockRevenue η μ w a b (o a b)

def oracleScore {n : ℕ} (η : Measure ℝ) (μ w : Fin n → ℝ)
    (o : ℕ → ℕ → ℝ) (a b : ℕ) : ℝ :=
  blockRevenue η μ w a b (o a b)

def ValidCuts (n k : ℕ) (c : Fin (k + 1) → ℕ) : Prop :=
  Monotone c ∧ c 0 = 0 ∧ c (Fin.last k) = n

def RealizesCuts {n k : ℕ} (a : Fin n → Fin k) (c : Fin (k + 1) → ℕ) : Prop :=
  ∀ i, c (a i).castSucc ≤ i.val ∧ i.val < c (a i).succ

def cutsRevenue {n k : ℕ} (η : Measure ℝ) (μ w : Fin n → ℝ)
    (o : ℕ → ℕ → ℝ) (c : Fin (k + 1) → ℕ) : ℝ :=
  ∑ j : Fin k, oracleScore η μ w o (c j.castSucc) (c j.succ)

def IsSubmodular (F : Finset ℝ → ℝ) : Prop :=
  ∀ A B, F (A ∩ B) + F (A ∪ B) ≤ F A + F B

def IsGreedyChain (F : Finset ℝ → ℝ) (P : Finset ℝ)
    (k : ℕ) (A : ℕ → Finset ℝ) : Prop :=
  A 0 = ∅ ∧ ∀ t, t < k → A t ⊆ P ∧
    ∃ p ∈ P \ A t, A (t + 1) = insert p (A t) ∧
      ∀ q ∈ P \ A t, F (insert q (A t)) - F (A t) ≤
        F (insert p (A t)) - F (A t)

def candidateOptimum (F : Finset ℝ → ℝ) (P : Finset ℝ) (k : ℕ) : ℝ :=
  sSup {r : ℝ | ∃ A : Finset ℝ, A ⊆ P ∧ A.card ≤ k ∧ r = F A}

end FBMSP
Source
Titing Cui and Michael L. Hamilton, Optimal Feature-Based Market Segmentation and Pricing, October 22, 2025 manuscript (60 PDF pages); Operations Research 74(3), 1354–1370 (2026). https://doi.org/10.1287/opre.2022.0490 ; https://ssrn.com/abstract=4151103 . Sections 2–4, pp.7–24; definitions supporting Theorems 2–5.
Read-back

What the Lean code literally says, in plain math · gpt-6-astra

For arbitrary Borel measures ν,η\nu,\etaν,η on R\mathbb RR, define Sη(t)S_\eta(t)Sη​(t) to be the real conversion of η([t,∞))\eta([t,\infty))η([t,∞)), so a finite measure value is retained and the extended value ∞\infty∞ converts to 000. Valid noise means that η\etaη is a probability measure, the identity function is integrable with respect to η\etaη, and ∫e dη(e)=0\int e\,d\eta(e)=0∫edη(e)=0; valid predictions mean that ν\nuν is a probability measure, the identity is integrable with respect to ν\nuν, and x≥0x\geq0x≥0 for ν\nuν-almost every xxx. The predicate called MHR means that η\etaη is absolutely continuous with respect to Lebesgue measure and that D={t:Sη(t)>0}D=\{t:S_\eta(t)>0\}D={t:Sη​(t)>0} is convex and t↦log⁡Sη(t)t\mapsto\log S_\eta(t)t↦logSη​(t) is concave on DDD: for s,t∈Ds,t\in Ds,t∈D and 0≤λ≤10\leq\lambda\leq10≤λ≤1, its value at λs+(1−λ)t\lambda s+(1-\lambda)tλs+(1−λ)t is at least λlog⁡Sη(s)+(1−λ)log⁡Sη(t)\lambda\log S_\eta(s)+(1-\lambda)\log S_\eta(t)λlogSη​(s)+(1−λ)logSη​(t). This predicate alone does not assert probability normalization, an integrable first moment, or nonemptiness of DDD; concavity on an empty DDD is vacuous. Nonnegative valuations mean that for ν\nuν-almost every xxx, one has x+e≥0x+e\geq0x+e≥0 for η\etaη-almost every eee. The posted revenue at arbitrary real x,px,px,p is rη(x,p)=pSη(p−x)r_\eta(x,p)=pS_\eta(p-x)rη​(x,p)=pSη​(p−x); purchase uses the inclusive inequality x+e≥px+e\geq px+e≥p. Define rη∗(x)=sup⁡p≥0rη(x,p)r_\eta^*(x)=\sup_{p\geq0}r_\eta(x,p)rη∗​(x)=supp≥0​rη​(x,p). A price is optimal precisely when it is nonnegative and its posted revenue is at least that of every nonnegative real price; it is least optimal when it is optimal and no greater than every optimal price. The quantity called the single price is the infimum of the set of optimal prices, and the margin is that infimum minus xxx; these definitions do not assert that an optimal price exists or that this infimum is itself optimal. For a finite set of real prices PPP, set Mη(x,P)=max⁡({0}∪{rη(x,p):p∈P})M_\eta(x,P)=\max(\{0\}\cup\{r_\eta(x,p):p\in P\})Mη​(x,P)=max({0}∪{rη​(x,p):p∈P}), including Mη(x,∅)=0M_\eta(x,\varnothing)=0Mη​(x,∅)=0. A feasible menu for a natural number kkk is a finite P⊆[0,∞)P\subseteq[0,\infty)P⊆[0,∞) with ∣P∣≤k|P|\leq k∣P∣≤k. Its revenue is ∫Mη(x,P) dν(x)\int M_\eta(x,P)\,d\nu(x)∫Mη​(x,P)dν(x), the optimal kkk-menu revenue is Rk(ν,η)=sup⁡P⊆[0,∞), P finite, ∣P∣≤k∫Mη(x,P) dν(x)R_k(\nu,\eta)=\sup_{P\subseteq[0,\infty),\,P\ {\rm finite},\,|P|\leq k}\int M_\eta(x,P)\,d\nu(x)Rk​(ν,η)=supP⊆[0,∞),P finite,∣P∣≤k​∫Mη​(x,P)dν(x), and personalized revenue is ∫rη∗(x) dν(x)\int r_\eta^*(x)\,d\nu(x)∫rη∗​(x)dν(x). The prediction mean is xˉ=∫x dν(x)\bar x=\int x\,d\nu(x)xˉ=∫xdν(x), and prediction variance is ∫(x−xˉ)2 dν(x)\int(x-\bar x)^2\,d\nu(x)∫(x−xˉ)2dν(x), without an integrability hypothesis built into the variance definition. Model revenue replaces η\etaη by the point mass at 000 in RkR_kRk​, and segmentation loss is personalized revenue minus RkR_kRk​. These are real-valued operations: a real supremum of an empty or unbounded-above set, or an infimum of an empty or unbounded-below set, is 000, and a nonintegrable real-valued Bochner integral is defined to be 000. In particular the single price is 000 if its optimizer set is empty, and R0(ν,η)=0R_0(\nu,\eta)=0R0​(ν,η)=0 because only the empty menu is feasible. For natural n,kn,kn,k, real arrays (μi,wi)0≤i<n(\mu_i,w_i)_{0\leq i<n}(μi​,wi​)0≤i<n​, an assignment a:{0,…,n−1}→{0,…,k−1}a:\{0,\ldots,n-1\}\to\{0,\ldots,k-1\}a:{0,…,n−1}→{0,…,k−1}, and prices (pj)0≤j<k(p_j)_{0\leq j<k}(pj​)0≤j<k​, finite policy revenue is ∑i=0n−1wirη(μi,pa(i))\sum_{i=0}^{n-1}w_i r_\eta(\mu_i,p_{a(i)})∑i=0n−1​wi​rη​(μi​,pa(i)​); finite menu revenue is ∑i=0n−1wiMη(μi,P)\sum_{i=0}^{n-1}w_i M_\eta(\mu_i,P)∑i=0n−1​wi​Mη​(μi​,P). These formulas alone impose no sign, normalization, or ordering conditions. A valid finite market requires n>0n>0n>0, strictly increasing μi\mu_iμi​, all μi≥0\mu_i\geq0μi​≥0, all wi>0w_i>0wi​>0, and ∑iwi=1\sum_iw_i=1∑i​wi​=1. For arbitrary natural endpoints a,ba,ba,b and real ppp, block revenue is B(a,b,p)=∑0≤i<n, a≤i<bwirη(μi,p)B(a,b,p)=\sum_{0\leq i<n,\,a\leq i<b}w_i r_\eta(\mu_i,p)B(a,b,p)=∑0≤i<n,a≤i<b​wi​rη​(μi​,p), with an empty index set giving 000; endpoints beyond nnn simply leave only indices below nnn. A block oracle is a function o:N2→Ro:\mathbb N^2\to\mathbb Ro:N2→R such that whenever a≤b≤na\leq b\leq na≤b≤n, o(a,b)≥0o(a,b)\geq0o(a,b)≥0 and B(a,b,p)≤B(a,b,o(a,b))B(a,b,p)\leq B(a,b,o(a,b))B(a,b,p)≤B(a,b,o(a,b)) for every p≥0p\geq0p≥0; its values outside these endpoint conditions are unrestricted. The oracle score is W(a,b)=B(a,b,o(a,b))W(a,b)=B(a,b,o(a,b))W(a,b)=B(a,b,o(a,b)). For a natural kkk, valid cuts are natural numbers c0,…,ckc_0,\ldots,c_kc0​,…,ck​ that are nondecreasing with c0=0c_0=0c0​=0 and ck=nc_k=nck​=n. An assignment realizes cuts when ca(i)≤i<ca(i)+1c_{a(i)}\leq i<c_{a(i)+1}ca(i)​≤i<ca(i)+1​ for every i<ni<ni<n; the predicate itself does not additionally impose validity of the cuts. Cuts revenue is ∑j=0k−1W(cj,cj+1)\sum_{j=0}^{k-1}W(c_j,c_{j+1})∑j=0k−1​W(cj​,cj+1​), whether or not the cuts are valid. Repeated cuts, and thus empty blocks, are allowed; valid cuts with k=0k=0k=0 force n=0n=0n=0, and no assignment from a nonempty index set to zero slots exists. Finally, for any real-valued function FFF on finite real sets, submodularity means F(A∩B)+F(A∪B)≤F(A)+F(B)F(A\cap B)+F(A\cup B)\leq F(A)+F(B)F(A∩B)+F(A∪B)≤F(A)+F(B) for all finite A,BA,BA,B. A greedy chain of length kkk from a finite candidate set PPP is a sequence AtA_tAt​ with A0=∅A_0=\varnothingA0​=∅ such that for each t<kt<kt<k, At⊆PA_t\subseteq PAt​⊆P and some p∈P∖Atp\in P\setminus A_tp∈P∖At​ satisfies At+1=At∪{p}A_{t+1}=A_t\cup\{p\}At+1​=At​∪{p} and F(At∪{q})−F(At)≤F(At∪{p})−F(At)F(A_t\cup\{q\})-F(A_t)\leq F(A_t\cup\{p\})-F(A_t)F(At​∪{q})−F(At​)≤F(At​∪{p})−F(At​) for every q∈P∖Atq\in P\setminus A_tq∈P∖At​. There are no restrictions on AtA_tAt​ for t>kt>kt>k; for k=0k=0k=0 only A0=∅A_0=\varnothingA0​=∅ is required, and a chain cannot exist when k>∣P∣k>|P|k>∣P∣. The candidate optimum is sup⁡{F(A):A⊆P, ∣A∣≤k}\sup\{F(A):A\subseteq P,\ |A|\leq k\}sup{F(A):A⊆P, ∣A∣≤k}, a maximum of a nonempty finite collection that includes F(∅)F(\varnothing)F(∅); for k=0k=0k=0 it equals F(∅)F(\varnothing)F(∅), with no general nonnegativity or monotonicity requirement on FFF.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikeh · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me