Documentation

LeanPool.FullyDynamicMatching.FD1D.V5.ContinuousProcess

Continuous Process #

The continuous-coordinate matching process #

This module constructs the policy on one probability space. A state records the live supply coordinates together with the current independent demand and replenishment coordinates. The reward and the inventory update therefore use the same demand sample.

@[reducible, inline]

One period's independent demand and replenishment coordinates.

Equations
Instances For

    The law of an independent uniform demand/replenishment pair.

    Equations
    Instances For

      Coercing the canonical unit-interval law gives restricted Lebesgue measure.

      A continuous uniform coordinate has the finite selected-index law.

      The two leaf labels extracted from one noise pair have the product law.

      Iid continuous coordinates for the refreshed live inventory.

      Equations
      Instances For

        The leaf assignment obtained from iid continuous coordinates is uniform.

        The refreshed continuous inventory projects to the existing refreshed count law.

        One-step lumping to the finite count kernel #

        noncomputable def FD1D.V5.ContinuousProcess.leafPairLaw {L m : ℕ} (a : ℝ) (ha : 0 < a) (hm : 0 < m) (s : SpatialState m) :

        The finite deleted/arrived leaf pair generated at a fixed spatial state.

        Equations
        Instances For
          theorem FD1D.V5.ContinuousProcess.leafPairLaw_map_move {L m : ℕ} (a : ℝ) (ha : 0 < a) (hm : 0 < m) (s : SpatialState m) :
          FiniteLaw.map (fun (p : DyadicNode L × DyadicNode L) => (spatialCount L s).move p.1 p.2) (leafPairLaw a ha hm s) = (Dynamics.kernel a ha hm).rowLaw (spatialCount L s)

          Forgetting the leaf pair after its move gives exactly one finite-kernel row.

          The zero demand endpoint is null under the continuous noise law.

          The continuous noise pair, mapped to deleted/arrived leaves, has leafPairLaw.

          The count projection of one continuous-coordinate update is exactly the measure-valued row of the finite count kernel.

          The spatial Markov kernel and its count marginals #

          One Markov step: sample fresh continuous noise and apply spatialStep.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem FD1D.V5.ContinuousProcess.spatialKernel_apply {L m : ℕ} (a : ℝ) (fallback : Fin m) (s : SpatialState m) :

            The row of spatialKernel is the pushforward of one independent noise pair.

            theorem FD1D.V5.ContinuousProcess.spatialKernel_map_count {L m : ℕ} (a : ℝ) (ha : 0 < a) (hm : 0 < m) (fallback : Fin m) :

            Mapping every spatial-kernel row through counts gives the finite row.

            @[simp]
            theorem FD1D.V5.ContinuousProcess.spatialLaw_zero {L m : ℕ} (a : ℝ) (fallback : Fin m) :
            @[simp]
            theorem FD1D.V5.ContinuousProcess.spatialLaw_succ {L m : ℕ} (a : ℝ) (fallback : Fin m) (t : ℕ) :
            spatialLaw a fallback (t + 1) = (spatialLaw a fallback t).bind ⇑(spatialKernel a fallback)
            theorem FD1D.V5.ContinuousProcess.map_spatialCount_spatialLaw {L m : ℕ} (a : ℝ) (ha : 0 < a) (hm : 0 < m) (fallback : Fin m) (t : ℕ) :

            Every continuous spatial marginal has exactly the finite count-chain law.

            A single joint continuous trajectory #

            @[reducible, inline]

            At a policy time, the joint state contains the pre-match inventory and the current independent demand/replenishment pair.

            Equations
            Instances For
              noncomputable def FD1D.V5.ContinuousProcess.processAdvance {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (p : ProcessState m × Noise) :

              Apply the current noise pair to the inventory, then attach the freshly sampled noise pair for the following period.

              Equations
              Instances For
                theorem FD1D.V5.ContinuousProcess.processAdvance_measurable {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) :
                Measurable (processAdvance L a fallback)

                The homogeneous transition kernel of the joint process.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem FD1D.V5.ContinuousProcess.spatialKernel_comp {L m : ℕ} (a : ℝ) (fallback : Fin m) (μ : MeasureTheory.Measure (SpatialState m)) [MeasureTheory.SFinite μ] :
                  μ.bind ⇑(spatialKernel a fallback) = MeasureTheory.Measure.map (fun (p : SpatialState m × Noise) => spatialStep L a fallback p.1 p.2) (μ.prod noiseLaw)

                  Spatial-kernel composition is the pushforward of state/noise product law.

                  Starting from an independent state/noise pair preserves that factorization.

                  noncomputable def FD1D.V5.ContinuousProcess.processLaw {L m : ℕ} (a : ℝ) (fallback : Fin m) (t : ℕ) :

                  The recursively iterated joint-state law.

                  Equations
                  Instances For
                    theorem FD1D.V5.ContinuousProcess.processLaw_eq_product {L m : ℕ} (a : ℝ) (fallback : Fin m) (t : ℕ) :
                    processLaw a fallback t = (spatialLaw a fallback t).prod noiseLaw

                    At every time, current noise remains independent of the live inventory.

                    noncomputable def FD1D.V5.ContinuousProcess.trajectoryLaw {L m : ℕ} (a : ℝ) (fallback : Fin m) :

                    One path-space law carrying the entire joint continuous process.

                    Equations
                    Instances For
                      theorem FD1D.V5.ContinuousProcess.trajectoryLaw_marginal {L m : ℕ} (a : ℝ) (fallback : Fin m) (t : ℕ) :
                      MeasureTheory.Measure.map (fun (path : ℕ → ProcessState m) => path t) (trajectoryLaw a fallback) = processLaw a fallback t

                      Each coordinate of the single path law is the corresponding joint-state law.

                      theorem FD1D.V5.ContinuousProcess.trajectoryLaw_count_marginal {L m : ℕ} (a : ℝ) (ha : 0 < a) (hm : 0 < m) (fallback : Fin m) (t : ℕ) :
                      MeasureTheory.Measure.map (fun (path : ℕ → ProcessState m) => spatialCount L (path t).1) (trajectoryLaw a fallback) = ((Dynamics.kernel a ha hm).iterate t (refreshedLaw L m)).toMeasure

                      The count at every path coordinate has the existing finite-chain law.

                      Reward from the same demand coordinate used by the update #

                      Evaluation at a measurably selected finite label is measurable.

                      noncomputable def FD1D.V5.ContinuousProcess.processCost {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :

                      The actual matching cost paid at one joint process state.

                      Equations
                      Instances For
                        theorem FD1D.V5.ContinuousProcess.processCost_measurable {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) :
                        Measurable (processCost L a fallback)
                        theorem FD1D.V5.ContinuousProcess.processCost_nonneg {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :
                        0 ≤ processCost L a fallback z
                        theorem FD1D.V5.ContinuousProcess.processCost_le_one {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :
                        processCost L a fallback z ≤ 1

                        The process cost is integrable under every finite measure.

                        noncomputable def FD1D.V5.ContinuousProcess.processSquaredCost {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :

                        The squared matching cost paid at one joint process state.

                        Equations
                        Instances For
                          @[simp]
                          theorem FD1D.V5.ContinuousProcess.processSquaredCost_eq_sq {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :
                          processSquaredCost L a fallback z = processCost L a fallback z ^ 2
                          theorem FD1D.V5.ContinuousProcess.processSquaredCost_nonneg {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :
                          0 ≤ processSquaredCost L a fallback z
                          theorem FD1D.V5.ContinuousProcess.processSquaredCost_le_one {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) :
                          processSquaredCost L a fallback z ≤ 1

                          The squared process cost is integrable under every finite measure.

                          theorem FD1D.V5.ContinuousProcess.processAdvance_configuration {m : ℕ} (L : ℕ) (a : ℝ) (fallback : Fin m) (z : ProcessState m) (fresh : Noise) :
                          toConfiguration L (processAdvance L a fallback (z, fresh)).1 = Dynamics.actualStep a (toConfiguration L z.1) fallback ↑z.2.1 ↑z.2.2 ⋯

                          The reward and next inventory use the same current demand and replenishment coordinates, pathwise.

                          Integrating a fixed inventory over its current noise gives its actual configured cost.

                          With the canonical fallback, the conditional reward is actualConfigurationCost.

                          Integrating the squared cost over current noise gives the configured conditional second moment.

                          With the canonical fallback, the conditional squared reward is actualConfigurationSquaredCost.

                          The configured-cost observable is integrable under every spatial marginal.

                          Expected joint-state reward equals expected configured inventory cost.

                          noncomputable def FD1D.V5.ContinuousProcess.trajectoryExpectedCost {L m : ℕ} (a : ℝ) (hm : 0 < m) (fallback : Fin m) (t : ℕ) :

                          One-period reward, integrated on the single infinite trajectory law.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem FD1D.V5.ContinuousProcess.trajectoryExpectedCost_eq_spatial {L m : ℕ} (a : ℝ) (hm : 0 < m) (fallback : Fin m) (t : ℕ) :

                            The path-coordinate reward is the corresponding spatial marginal cost.

                            The configured squared-cost observable is integrable under every spatial marginal.

                            Expected joint-state squared reward equals expected configured squared inventory cost.

                            noncomputable def FD1D.V5.ContinuousProcess.trajectoryExpectedSquaredCost {L m : ℕ} (a : ℝ) (hm : 0 < m) (fallback : Fin m) (t : ℕ) :

                            One-period squared reward, integrated on the single infinite trajectory law.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              The path-coordinate squared reward is the corresponding spatial marginal cost.