Canonical triangular parameters and continuation formulas
DefinitionMinBuying_CanonicalAlgebraA canonical parameter system has a terminal cap and additional caps with positive parameters . Defines strict rejection for triangular laws, the continuation update , its finite iteration from , and the product formula for uniform revenue at every nonnegative price. Exact normalization means all such revenues are at most one and one price attains one.
import Definitions.Def_MinBuying_Analytic
open Set
open scoped BigOperators
noncomputable section
namespace MinBuying
/-- Canonical triangular parameters from Section 4.2.2. Item zero is the
terminal `Tri(1,P)` item; the `count` additional caps decrease with the index.
The empty collection of additional items is explicitly allowed. -/
structure CanonicalInstance where
count : ℕ
terminalCap : ℝ
a : Fin count → ℝ
cap : Fin count → ℝ
terminal_one_lt : 1 < terminalCap
a_pos : ∀ i, 0 < a i
cap_one_lt : ∀ i, 1 < cap i
cap_lt_terminal : ∀ i, cap i < terminalCap
caps_decreasing : StrictAnti cap
/-- Probability of strict rejection `V < p` for `V ~ Tri(a,v)`.
In particular, at the cap `p=v`, the atom is accepted and the rejection
probability is `v/(v+a)`, not one. Used for positive `a` and `v`. -/
def triangularReject (a v p : ℝ) : ℝ :=
if p ≤ 0 then 0 else if p ≤ v then p / (p + a) else 1
/-- Equation (13), adding a cheaper cap-priced triangular item. -/
def continuationStep (a v C : ℝ) : ℝ :=
(a + C) / (1 + a / v)
/-- Continuation revenue after adding the first `k` additional items in
strictly decreasing cap order. For `k=0`, this is `P/(P+1)`. Statements about
an intermediate stage restrict `k ≤ count`; the final stage is `count`. -/
def canonicalContinuation (I : CanonicalInstance) (k : ℕ) : ℝ :=
((List.finRange I.count).take k).foldl
(fun C i => continuationStep (I.a i) (I.cap i) C)
(I.terminalCap / (I.terminalCap + 1))
/-- The final scalar continuation value of the designated cap pricing. -/
def canonicalCapRevenue (I : CanonicalInstance) : ℝ :=
canonicalContinuation I I.count
/-- Actual common-price revenue, including all price regimes and cap atoms.
The nonnegative feasible-price restriction is in the revenue statements. -/
def canonicalUniformRevenueAt (I : CanonicalInstance) (p : ℝ) : ℝ :=
p * (1 - triangularReject 1 I.terminalCap p *
∏ i : Fin I.count, triangularReject (I.a i) (I.cap i) p)
/-- Exact normalization: all feasible common prices earn at most one, and
some feasible common price attains one. -/
def CanonicalNormalized (I : CanonicalInstance) : Prop :=
(∀ p : ℝ, 0 ≤ p → canonicalUniformRevenueAt I p ≤ 1) ∧
∃ p : ℝ, 0 ≤ p ∧ canonicalUniformRevenueAt I p = 1
end MinBuying
Read-back
What the Lean code literally says, in plain math · gpt-6-astra
A canonical instance consists of a natural number , a real terminal cap , and real families and on , together with the conditions , and for every , and whenever . The number may be zero, in which case all indexed conditions are vacuous. Independently of those instance conditions, define for all real the scalar function to equal zero when , to equal when , and to equal one when and ; the ordering of these branches means that always selects zero. At a positive cap , the middle branch applies. Division is total real division, so the middle value is zero if . Also define, for all real , the continuation step , with the same division-by-zero convention, including when . For a canonical instance initialize and, in increasing index order, set for . Its continuation at any natural number is , because only the first entries of the list are folded into the initial value. Its cap revenue is . Its uniform revenue at any real is the algebraic value . A canonical instance is normalized exactly when for every real and there exists a real with ; normalization is an additional predicate, not a condition of the instance structure. The product over an empty family is one. Consequently, for every continuation value and the cap revenue equal , while ; normalization is then impossible, since for nonnegative prices the uniform value is when and is zero when . For every canonical instance the formula for also includes negative prices, with for , although normalization only tests nonnegative prices. The functions and predicates here are algebraic definitions; no measure or equality with a measure-theoretic revenue is included in them.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.