Documentation

LeanPool.AiyagariEquilibrium.DynamicProgramming.Extended

Dynamic programs with extended-real rewards #

The reward may take the value -∞, as log c does at zero consumption. The value function stays real-valued and bounded, so the contraction theory applies unchanged.

What this is for #

Every model in this library that handles utility unbounded below does it with a floor: replace u by max floor u, which is bounded, and then prove separately that the floor never binds at an optimum. That argument has to be redone per model, and it fails outright once the state space is unbounded, because the bound on the value function that it needs is itself inflated by the floor. Admitting -∞ removes the device rather than working around it.

Why the value function is still bounded #

Two hypotheses do it, and both are economically ordinary:

Between them the supremum sits in [rewardMin - β‖v‖, rewardMax + β‖v‖], so it is finite, and EReal.toReal turns it back into a bounded continuous real function.

Main results #

structure LeanEconomics.ExtendedProgram (S : Type u_3) (A : Type u_4) [TopologicalSpace S] [TopologicalSpace A] :
Type (max u_3 u_4)

A dynamic program whose reward may be -∞.

Instances For

    Extending a utility by -∞ #

    Retrofitting a model that uses a floor means turning its real-valued u, which is only sensible on positive consumption, into a continuous EReal-valued reward. That is this lemma, and it is the only shared cost of the retrofit: supply u falling to -∞ at zero and the extension is continuous.

    noncomputable def LeanEconomics.extendBot (u : ℝ → ℝ) :

    A function on the positives, extended by -∞ to the whole line.

    Equations
    Instances For
      @[simp]
      theorem LeanEconomics.extendBot_of_pos {u : ℝ → ℝ} {c : ℝ} (hc : 0 < c) :
      extendBot u c = ↑(u c)
      @[simp]
      theorem LeanEconomics.extendBot_of_nonpos {u : ℝ → ℝ} {c : ℝ} (hc : c ≤ 0) :

      The extension is monotone when u is monotone on the positives.

      The extension is continuous exactly when u falls to -∞ at zero consumption -- which is what makes a floor necessary in the first place, so nothing extra is being assumed.

      noncomputable def LeanEconomics.ExtendedProgram.objectiveE {S : Type u_1} {A : Type u_2} [TopologicalSpace S] [TopologicalSpace A] (D : ExtendedProgram S A) (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, coming from the feasible selection.

            Equations
            Instances For

              The Bellman operator as a bare real-valued function.

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

                The Bellman operator on bounded continuous functions, with an extended-real reward.

                Equations
                Instances For

                  Blackwell's conditions hold. The extended-real reward is a common summand on both sides of each inequality, so it plays no part: monotonicity and discounting are facts about the continuation term alone.

                  theorem LeanEconomics.ExtendedProgram.exists_optimal_action {S : Type u_1} {A : Type u_2} [TopologicalSpace S] [TopologicalSpace A] (D : ExtendedProgram S A) (v : BoundedContinuousFunction S ℝ) (s : S) :
                  ∃ a ∈ D.feasible s, D.objectiveE v s a = ↑(D.bellmanFn v s)

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

                  The maximiser correspondence is upper hemicontinuous, by the argmax half of Berge for extended-real objectives.

                  theorem LeanEconomics.ExtendedProgram.monotone_bellman {S : Type u_1} {A : Type u_2} [TopologicalSpace S] [TopologicalSpace A] (D : ExtendedProgram S A) [Preorder S] (hfeas : ∀ (s s' : S), s ≤ s' → D.feasible s ⊆ D.feasible s') (hreward : ∀ (a : A), Monotone fun (s : S) => D.reward (s, a)) (htrans : ∀ (a : A), Monotone fun (s : S) => D.transition (s, a)) (v : BoundedContinuousFunction S ℝ) (hv : Monotone ⇑v) :
                  Monotone ⇑(D.bellman v)

                  The operator preserves monotonicity under the same conditions as in the real case.

                  The value function of the program.

                  Equations
                  Instances For
                    theorem LeanEconomics.ExtendedProgram.exists_optimal_policy {S : Type u_1} {A : Type u_2} [TopologicalSpace S] [TopologicalSpace A] (D : ExtendedProgram S A) (s : S) :
                    ∃ a ∈ D.feasible s, ↑(D.valueFunction s) = D.reward (s, a) + ↑(↑D.discount * D.valueFunction (D.transition (s, a)))

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

                    theorem LeanEconomics.ExtendedProgram.monotone_valueFunction {S : Type u_1} {A : Type u_2} [TopologicalSpace S] [TopologicalSpace A] (D : ExtendedProgram S A) [Preorder S] (hfeas : ∀ (s s' : S), s ≤ s' → D.feasible s ⊆ D.feasible s') (hreward : ∀ (a : A), Monotone fun (s : S) => D.reward (s, a)) (htrans : ∀ (a : A), Monotone fun (s : S) => D.transition (s, a)) :

                    The value function is monotone under the same conditions as in the real case.