Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2, p. 8 — Q_i is continuous in u, all partials exist and are continuous, and equal (4)

Open
HetExponomial.ChoiceProb.Supplement.theorem_2

by mikedeng1 · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

differentiabilitydiscrete-choiceexponomial-choicep2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1

Throughout, N={1,…,n}N=\{1,\dots,n\}N={1,…,n} with n≥2n\ge 2n≥2, the ideal utilities uiu_iui​ are real, and the errors z1,…,znz_1,\dots,z_nz1​,…,zn​ are independent with zj∼Exp(λj)z_j\sim\mathrm{Exp}(\lambda_j)zj​∼Exp(λj​), λj>0\lambda_j>0λj​>0; Qi(u,λ)=P{ui−zi≥uj−zj ∀j≠i}Q_i(\mathbf u,\boldsymbol\lambda)=P\{u_i-z_i\ge u_j-z_j\ \forall j\ne i\}Qi​(u,λ)=P{ui​−zi​≥uj​−zj​ ∀j=i} is the HEC choice probability. Fix the error rates λ\boldsymbol\lambdaλ and a choice iii. Then

  1. u↦Qi(u)\mathbf u\mapsto Q_i(\mathbf u)u↦Qi​(u) is continuous on Rn\mathbb R^nRn;
  2. every partial derivative ∂Qi/∂uj\partial Q_i/\partial u_j∂Qi​/∂uj​ exists at every u∈Rn\mathbf u\in\mathbb R^nu∈Rn and is a continuous function of u\mathbf uu;
  3. the partial derivatives are given by (4):
∂Qi(u)∂uj={−λjQi(u)j≠i, uj≥ui,LiGi(u)−λiQi(u)j=i,−λiQj(u)j≠i, uj≤ui.\frac{\partial Q_i(\mathbf u)}{\partial u_j}=\begin{cases}-\lambda_jQ_i(\mathbf u) & j\ne i,\ u_j\ge u_i,\\ L_iG_i(\mathbf u)-\lambda_iQ_i(\mathbf u) & j=i,\\ -\lambda_iQ_j(\mathbf u) & j\ne i,\ u_j\le u_i.\end{cases}∂uj​∂Qi​(u)​=⎩⎨⎧​−λj​Qi​(u)Li​Gi​(u)−λi​Qi​(u)−λi​Qj​(u)​j=i, uj​≥ui​,j=i,j=i, uj​≤ui​.​

When j≠ij\ne ij=i and uj=uiu_j=u_iuj​=ui​ both cross-partial formulas hold. Although the closed form of Theorem 1 is built from terms GkG_kGk​ that jump when ideal utilities cross, the choice probabilities are continuously differentiable; this underlies the demand elasticities (7), the consumer surplus of Theorem 3 and the first-order conditions (12) of the pricing game.

Formalization Note The partial derivative in uju_juj​ is the derivative at t=ujt=u_jt=uj​ of t↦Qi(u with uj replaced by t)t\mapsto Q_i(\mathbf u\text{ with }u_j\text{ replaced by }t)t↦Qi​(u with uj​ replaced by t) (HasDerivAt); its continuity is stated for partialU, the deriv of that restriction, as a function on Rn\mathbb R^nRn.

Differences from the source:

  • encoding: partial derivative ∂Q_i/∂u_j → HasDerivAt of the coordinate restriction t ↦ Q_i(u with u_j := t) at u_j; continuity of its deriv as a function of u; reason: the standard definition of a partial derivative; the same claim
Preamble
import Mathlib
import Definitions.Def_HetExponomial_ChoiceProb_Model
import Definitions.Def_HetExponomial_ChoiceProb_Supplement_Model
Formal statement
namespace HetExponomial.ChoiceProb.Supplement

open MeasureTheory ProbabilityTheory HetExponomial.ChoiceProb

theorem theorem_2 {n : ℕ} (hn : 2 ≤ n) (lam : Fin n → ℝ) (hlam : ∀ j, 0 < lam j)
    (i : Fin n) :
    Continuous (fun u => choiceProb u lam i) ∧
      (∀ j, Continuous (partialU (fun v => choiceProb v lam i) j)) ∧
      ∀ (u : Fin n → ℝ) (j : Fin n),
        (j ≠ i → u i ≤ u j →
            HasDerivAt (fun t => choiceProb (Function.update u j t) lam i)
              (-(lam j * choiceProb u lam i)) (u j)) ∧
          (j = i →
            HasDerivAt (fun t => choiceProb (Function.update u j t) lam i)
              (Lsum u lam i * G u lam i - lam i * choiceProb u lam i) (u j)) ∧
          (j ≠ i → u j ≤ u i →
            HasDerivAt (fun t => choiceProb (Function.update u j t) lam i)
              (-(lam i * choiceProb u lam j)) (u j)) := by sorry

end HetExponomial.ChoiceProb.Supplement
Source
Alptekinoğlu & Semple, Heteroscedastic Exponomial Choice, SSRN 3232788 (version of August 8, 2020; forthcoming in Operations Research), p. 8, Theorem 2, (4); proof pp. 44–46

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