IsRiskNeutral.isAffine
theoremverifiedformalizationimported Lean
Risk neutrality implies affine utility. [MSZ 2.27, hard direction] Requires |I| ≥ 2 so that non-trivial distributions exist.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] in set_option linter.unusedSectionVars false in theorem IsRiskNeutral.isAffine {I : Type*} [Fintype I] [Nontrivial I] {u : 𝕜 → 𝕜} (h : IsRiskNeutral (I := I) u) : IsAffineUtility u
- Formalizes
- EconCSLib, `IsRiskNeutral.isAffine`
- Lean proof
- By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at
1a88f809b538(Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.IsRiskNeutral.isAffine← IsRiskNeutral.isAffine (EconCSLib/Foundation/Utility/Basic.lean:66): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 15
- LotteryA lottery over outcomes
O: a probability distribution. JuststdSimplex 𝕜 Owith a game-theoretic name. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - wsumWeighted sum of
fwith weights from a simplex elementx. Thinabbrevover Mathlib's finite dot product⬝ᵥ: definitionally equal,… - Lottery.expectedValue_mixLinearity of expected value under convex combination.
E[mix α L₁ L₂] = α · E[L₁] + (1-α) · E[L₂]This is the key property… - stdSimplex.purePoint-mass simplex element at
i₀. - IsRiskNeutralRisk neutrality for lotteries over a finite index set
I:u(∑ pᵢ·xᵢ) = ∑ pᵢ·u(xᵢ). Equivalent toubeing affine. [MSZ 2.27] - Lottery.expectedValue_pureExpected value of a pure lottery equals the outcome value.
- wsum_pure_applyWeighted sum at a point mass evaluates the chosen coordinate.
- Lottery.pureA pure (degenerate) lottery: outcome
o₀with probability 1. Alias ofstdSimplex.pure. - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - stdSimplex.pure_applystdSimplex.pure_apply
- IsAffineUtilityA utility function is affine (linear + constant):
u(x) = a·x + b. An agent with an affine utility function is risk neutral. [MSZ 2.24] - Lottery.mixConvex combination of two lotteries: the compound lottery
[α(L₁), (1-α)(L₂)]after simplification. [MSZ Axiom 2.16] Alias of… - stdSimplex.mix_applystdSimplex.mix_apply
- Lottery.expectedValueExpected value of
funder lotteryL:E_L[f] = ∑ o, L(o) · f(o). Alias ofwsumfromMath.Simplex.
- LotteryA lottery over outcomes
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] inset_option linter.unusedSectionVars false in/-- Risk neutrality implies affine utility. [MSZ 2.27, hard direction] Requires `|I| ≥ 2` so that non-trivial distributions exist. -/theorem IsRiskNeutral.isAffine {I : Type*} [Fintype I] [Nontrivial I] {u : 𝕜 → 𝕜} (h : IsRiskNeutral (I := I) u) : IsAffineUtility u := by classical obtain ⟨i₀, i₁, hne⟩ := exists_pair_ne I -- Step 1: derive convex combination property from risk neutrality -- u(t·a + (1-t)·b) = t·u(a) + (1-t)·u(b) for t ∈ [0,1] have conv : ∀ (t : 𝕜) (_ : 0 ≤ t) (_ : t ≤ 1) (a b : 𝕜), u (t * a + (1 - t) * b) = t * u a + (1 - t) * u b := by intro t ht₀ ht₁ a b let p := Lottery.mix t ht₀ ht₁ (Lottery.pure (𝕜 := 𝕜) i₀) (Lottery.pure i₁) let f : I → 𝕜 := fun i => if i = i₀ then a else b have hL : wsum p f = t * a + (1 - t) * b := by change Lottery.expectedValue p f = _ rw [Lottery.expectedValue_mix] simp [Lottery.expectedValue_pure, f, hne.symm] have hR : wsum p (u ∘ f) = t * u a + (1 - t) * u b := by change Lottery.expectedValue p (u ∘ f) = _ rw [Lottery.expectedValue_mix] simp [Lottery.expectedValue_pure, Function.comp, f, hne.symm] rw [← hL, h p f, hR] -- Step 2: u(x) = (u 1 - u 0) · x + u 0 for all x refine ⟨u 1 - u 0, u 0, fun x => ?_⟩ -- Case x ∈ [0,1]: u(x·1 + (1-x)·0) = x·u(1) + (1-x)·u(0) -- Case x > 1: u((1/x)·x + (1-1/x)·0) = (1/x)·u(x) + (1-1/x)·u(0), solve for u(x) -- Case x < 0: u(0) = (1/2)·u(x) + (1/2)·u(-x), with u(-x) known since -x > 0 suffices ∀ y : 𝕜, 0 ≤ y → u y = (u 1 - u 0) * y + u 0 by by_cases hx : 0 ≤ x · exact this x hx · push_neg at hx have hmx := this (-x) (le_of_lt (neg_pos.mpr hx)) have h_mid := conv (1 / 2) (by norm_num) (by norm_num) x (-x) have : (1 : 𝕜) / 2 * x + (1 - 1 / 2) * -x = 0 := by ring rw [this] at h_mid linarith intro y hy rcases eq_or_lt_of_le hy with rfl | hy_pos · simp rcases le_or_gt y 1 with hy1 | hy1 · -- y ∈ (0, 1] have := conv y hy hy1 1 0 simp at this; linarith · -- y > 1 have h_inv := conv (1 / y) (le_of_lt (div_pos one_pos hy_pos)) ((div_le_one hy_pos).mpr (le_of_lt hy1)) y 0 simp at h_inv have hyne : y ≠ 0 := ne_of_gt hy_pos field_simp at h_inv ⊢; linarith