Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Concrete triangular probability laws and canonical markets

Definition
MinBuying_Triangular

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

min-buyingoperations-researchpricingprobability

Defines Tri⁡(a,v)\operatorname{Tri}(a,v)Tri(a,v) concretely as the image of uniform measure on (0,1)(0,1)(0,1) under u↦min⁡{v,au/(1−u)}u\mapsto\min\{v,au/(1-u)\}u↦min{v,au/(1−u)}. Positive parameters give the source's cap atom and triangular revenue curve. Defines finite independent triangular families, the continuation recursion from zero, the rejection product, and the canonical joint product law and designated cap-price vector. Distributional and revenue identities are separate theorem obligations.

Definition code
import Definitions.Def_MinBuying_Model
import Definitions.Def_MinBuying_CanonicalAlgebra

/-! Concrete triangular-revenue probability laws and their canonical market.
The measure is an explicit pushforward; none of its distributional or pricing
properties is inserted as an assumption in the definitions. -/
noncomputable section
open MeasureTheory Set
open scoped BigOperators

namespace MinBuying

/-- Uniform probability measure on the open unit interval. -/
def unitIntervalLaw : Measure ℝ := volume.restrict (Ioo (0 : ℝ) 1)

/-- `Tri(a,v)` from equation (11), for positive `a` and `v`.
An equal-revenue quantile transform is capped at `v`, leaving the stated atom
at the cap. Inclusive affordability accepts that atom at price `v`. -/
def triangularLaw (a v : ℝ) : Measure ℝ :=
  Measure.map (fun u : ℝ => min v (a * u / (1 - u))) unitIntervalLaw

/-- Right CDF of the triangular law. This differs from strict rejection
at the cap: the right CDF is one there, whereas rejection is `v/(v+a)`. -/
def triangularCDF (a v p : ℝ) : ℝ :=
  if p < 0 then 0 else if p < v then p / (p + a) else 1

/-- A finite family of genuine positive-parameter triangular laws.
Empty families are allowed for the rejection-product base case; pricing
theorems require a positive number of items explicitly. -/
structure TriangularInstance (n : ℕ) where
  a : Fin n → ℝ
  cap : Fin n → ℝ
  a_pos : ∀ i, 0 < a i
  cap_pos : ∀ i, 0 < cap i

def triangularMarginals {n : ℕ} (I : TriangularInstance n) : Fin n → Measure ℝ :=
  fun i => triangularLaw (I.a i) (I.cap i)

def triangularJoint {n : ℕ} (I : TriangularInstance n) : JointLaw n :=
  productLaw (triangularMarginals I)

/-- Continuation recursion from zero, when the cap vector is in decreasing
order. The final stage is `k=n`; intermediate stages restrict `k ≤ n`. -/
def triangularContinuation {n : ℕ} (I : TriangularInstance n) (k : ℕ) : ℝ :=
  ((List.finRange n).take k).foldl
    (fun C i => continuationStep (I.a i) (I.cap i) C) 0

/-- Product appearing in Lemma EC.1; it equals actual joint rejection
when the positive common price is at most every cap. -/
def triangularRejectionProduct {n : ℕ} (I : TriangularInstance n) (t : ℝ) : ℝ :=
  ∏ i : Fin n, t / (t + I.a i)

/-- Insert the terminal `Tri(1,P)` item before the additional canonical items.
The ordering here is decreasing cap order, not buyer inspection order. -/
def canonicalParameters (I : CanonicalInstance) : TriangularInstance (I.count + 1) where
  a := Fin.cons 1 I.a
  cap := Fin.cons I.terminalCap I.cap
  a_pos := by
    intro i
    refine Fin.cases ?_ ?_ i
    · exact zero_lt_one
    · intro j
      exact I.a_pos j
  cap_pos := by
    intro i
    refine Fin.cases ?_ ?_ i
    · exact lt_trans zero_lt_one I.terminal_one_lt
    · intro j
      exact lt_trans zero_lt_one (I.cap_one_lt j)

def canonicalLaw (I : CanonicalInstance) : JointLaw (I.count + 1) :=
  triangularJoint (canonicalParameters I)

def canonicalPrices (I : CanonicalInstance) : Prices (I.count + 1) :=
  Fin.cons I.terminalCap I.cap

end MinBuying
Source
Titing Cui, Michael L. Hamilton, Jourdain Lamperski, and Kasra Ganjizadeh Tari, Unit-Demand Pricing for Min-Buying Customers, September 27, 2026 manuscript, 47 PDF pages (main pp.1–27; companion ec1–ec20). https://doi.org/10.2139/ssrn.5178133 . Section 4.2 pp.18–20, Eqs.(11)–(13); Lemma EC.1 PDF p.45/ec18.
Read-back

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

The unit-interval measure is Lebesgue measure restricted to the open interval (0,1)(0,1)(0,1). For every pair of real numbers a,ca,ca,c, with no positivity hypotheses in this definition, La,cL_{a,c}La,c​ is its image under the function u↦min⁡{c,au/(1−u)}u\mapsto\min\{c,au/(1-u)\}u↦min{c,au/(1−u)}. A separately defined scalar function is Ha,c(p)=0H_{a,c}(p)=0Ha,c​(p)=0 if p<0p<0p<0, Ha,c(p)=p/(p+a)H_{a,c}(p)=p/(p+a)Ha,c​(p)=p/(p+a) if 0≤p<c0\le p<c0≤p<c, and Ha,c(p)=1H_{a,c}(p)=1Ha,c​(p)=1 if p≥0p\ge0p≥0 and p≥cp\ge cp≥c. Real division is total, with division by zero equal to zero; in particular the image-map value at u=1u=1u=1 is defined, although the source measure gives that point zero mass, and unrestricted choices of a,c,pa,c,pa,c,p can also make the denominator in HHH zero. For every natural number nnn, a triangular instance consists of arrays (ai,ci)0≤i<n(a_i,c_i)_{0\le i<n}(ai​,ci​)0≤i<n​ with ai>0a_i>0ai​>0 and ci>0c_i>0ci​>0 for each index. Its marginal family is (Lai,ci)i(L_{a_i,c_i})_i(Lai​,ci​​)i​ and its joint measure is the finite product ⨂i<nLai,ci\bigotimes_{i<n}L_{a_i,c_i}⨂i<n​Lai​,ci​​. Its continuation after k∈Nk\in\mathbb Nk∈N steps is Cmin⁡(k,n)C_{\min(k,n)}Cmin(k,n)​, where C0=0C_0=0C0​=0 and Cj+1=(aj+Cj)/(1+aj/cj)C_{j+1}=(a_j+C_j)/(1+a_j/c_j)Cj+1​=(aj​+Cj​)/(1+aj​/cj​) for 0≤j<n0\le j<n0≤j<n, so the coordinates are processed in increasing index order and taking more than nnn steps has no further effect. Its rejection-product expression at an arbitrary real ttt is ∏i<nt/(t+ai)\prod_{i<n}t/(t+a_i)∏i<n​t/(t+ai​), regardless of the caps cic_ici​; no positivity assumption on ttt appears in this definition, and a zero denominator is evaluated by the same real-division convention. If n=0n=0n=0, the parameter requirements are vacuous, every continuation is 000, and this product is 111. A canonical instance used by the remaining definitions consists of a count m∈Nm\in\mathbb Nm∈N, a terminal cap T>1T>1T>1, arrays aj>0a_j>0aj​>0 and 1<cj<T1<c_j<T1<cj​<T for j<mj<mj<m, and the strict ordering cj<cic_j<c_icj​<ci​ whenever i<ji<ji<j. Its associated triangular instance has m+1m+1m+1 coordinates: coordinate 000 has parameters (1,T)(1,T)(1,T) and coordinate j+1j+1j+1 has parameters (aj,cj)(a_j,c_j)(aj​,cj​). Its canonical law is the product of those m+1m+1m+1 triangular marginal measures, and its canonical price vector is (T,c0,…,cm−1)(T,c_0,\ldots,c_{m-1})(T,c0​,…,cm−1​). The case m=0m=0m=0 is included and gives one coordinate with parameters (1,T)(1,T)(1,T) and price TTT.

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

    Confirmed by the moderator at approval.

  • Endorsed by mikeh · Oct 31, 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