Documentation

LeanPool.AiyagariEquilibrium.DynamicProgramming.ExtendedStochastic

Stochastic dynamic programs with extended-real rewards #

LeanEconomics.DynamicProgramming.Extended allows a reward of -∞ but has a deterministic law of motion; LeanEconomics.DynamicProgramming.Stochastic has finitely many shocks but a real-valued reward. This file is the combination, and it is what a stochastic model with log or CRRA utility needs if it is not to carry a floor.

Why the combination is routine #

The expectation ∑ z, p z * v (g z) is a sum of real numbers, since value functions stay real-valued. So the objective is again reward + ↑(real): an extended real plus a finite coercion, exactly the shape Extended already handles. Neither half has to be redone -- the reward's -∞ never meets the expectation's arithmetic, and ⊥ + ⊤ never arises.

Accordingly the two facts about the expectation are the same two as in the real stochastic file: prob_nonneg gives monotonicity, prob_sum gives discounting.

Main results #

structure LeanEconomics.ExtendedStochasticProgram (S : Type u_4) (A : Type u_5) (Z : Type u_6) [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] :
Type (max (max u_4 u_5) u_6)

A stochastic dynamic program whose reward may be -∞.

Instances For

    The expected continuation value: a sum of reals, so it never meets the reward's -∞.

    Equations
    Instances For
      noncomputable def LeanEconomics.ExtendedStochasticProgram.objectiveE {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D : ExtendedStochasticProgram S A Z) (v : BoundedContinuousFunction S ℝ) (s : S) (a : A) :

      The objective, in the extended reals.

      Equations
      Instances For

        The value of the one-period problem, in the extended reals.

        Equations
        Instances For

          The upper bound on the one-period value.

          Equations
          Instances For

            The lower bound on the one-period value.

            Equations
            Instances For

              An average of values of v is no larger than the size of v.

              The Bellman operator as a bare real-valued function.

              Equations
              Instances For
                theorem LeanEconomics.ExtendedStochasticProgram.le_bellmanFn {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D : ExtendedStochasticProgram S A Z) (v : BoundedContinuousFunction S ℝ) {s : S} {a : A} (ha : a ∈ D.feasible s) :
                D.objectiveE v s a ≤ ↑(D.bellmanFn v s)
                theorem LeanEconomics.ExtendedStochasticProgram.bellmanFn_le {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D : ExtendedStochasticProgram S A Z) (v : BoundedContinuousFunction S ℝ) {s : S} {c : ℝ} (h : ∀ a ∈ D.feasible s, D.objectiveE v s a ≤ ↑c) :
                D.bellmanFn v s ≤ c

                The stochastic Bellman operator with an extended-real reward.

                Equations
                Instances For

                  Adding a constant to the continuation value adds exactly that constant to the expectation: this is prob_sum.

                  Blackwell's conditions hold.

                  The supremum is attained: an optimal action exists at every state.

                  The maximiser correspondence is upper hemicontinuous.

                  The value function of the program.

                  Equations
                  Instances For

                    An explicit bound on the value function, in terms of the reward bounds alone.

                    The right-hand side mentions no state and no fixed point, which is exactly what is needed to make bounds derived from ‖valueFunction‖ uniform across a FAMILY of programs: the reward bounds of a family are typically easy to control, whereas its value functions are not.

                    The constant plan is not improved on by the operator, so value function iteration started there stays below it.

                    The value function never exceeds the best constant plan. Unlike norm_valueFunction_le this is one-sided, and the pair of bounds caps the OSCILLATION of the value function by (rewardMax - rewardMin) / (1 - β) -- a quantity that does not move when a constant is added to the reward, which the sup norm does. That matters for CES: c ^ (1-γ) / (1-γ) differs from log by the constant 1 / (1-γ), so any bound built from ‖V‖ blows up as γ → 1 while the model it describes does not.

                    theorem LeanEconomics.ExtendedStochasticProgram.valueFunction_le_of_bellman_le_on {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D₁ D₂ : ExtendedStochasticProgram S A Z) (C : BoundedContinuousFunction S ℝ → Prop) (hC0 : C 0) (hC : ∀ (v : BoundedContinuousFunction S ℝ), C v → C (D₁.bellman v)) (hle : ∀ (v : BoundedContinuousFunction S ℝ), C v → ⇑(D₁.bellman v) ≤ ⇑(D₂.bellman v)) (s : S) :

                    A dominated operator has a dominated value function, on an invariant class. The domination need only hold on a class of continuation values that contains 0 and that the dominated operator preserves, since value function iteration from 0 never leaves it. That is what lets the discount factor be compared: a more patient agent's operator dominates only on NONNEGATIVE continuation values, which is exactly the class the iteration stays in when the reward is nonnegative.

                    theorem LeanEconomics.ExtendedStochasticProgram.zero_le_bellman {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D : ExtendedStochasticProgram S A Z) (hmin : 0 ≤ D.rewardMin) {v : BoundedContinuousFunction S ℝ} (hv : 0 ≤ ⇑v) :
                    0 ≤ ⇑(D.bellman v)

                    Nonnegative rewards give a nonnegative value.

                    theorem LeanEconomics.ExtendedStochasticProgram.valueFunction_le_of_bellman_le {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D₁ D₂ : ExtendedStochasticProgram S A Z) (hle : ∀ (v : BoundedContinuousFunction S ℝ), ⇑(D₁.bellman v) ≤ ⇑(D₂.bellman v)) (s : S) :

                    A dominated operator has a dominated value function. The comparative-statics workhorse, at the level the models use: comparing two economies reduces to comparing their Bellman operators at a common continuation value.

                    theorem LeanEconomics.ExtendedStochasticProgram.exists_optimal_policy {S : Type u_1} {A : Type u_2} {Z : Type u_3} [TopologicalSpace S] [TopologicalSpace A] [Fintype Z] (D : ExtendedStochasticProgram S A Z) (s : S) :
                    ∃ a ∈ D.feasible s, ↑(D.valueFunction s) = D.reward (s, a) + ↑(↑D.discount * ∑ z : Z, (D.prob z) (s, a) * D.valueFunction ((D.transition z) (s, a)))

                    The stochastic Bellman equation, with the reward an extended real and no floor.