Documentation

FormalSLT.StochasticDynamics.TrajectoryRisk

Prequential risk for history-dependent trajectory kernels #

This file extends the finite-state trajectory-risk layer from time-homogeneous Markov transitions to arbitrary prefix-dependent kernels. At time n, the kernel may inspect the entire prefix indexed by Finset.Iic n, and the score may depend on that prefix and the next state. For any score taking values in [0, 1], the observed score minus its kernel-conditional risk is an adapted, conditionally centered innovation with conditional second moment at most 1 / 4.

The existing Markov API remains unchanged. The final bridge lemmas identify its path law, squared loss, conditional risk, and innovation as special cases of the prefix-dependent definitions.

@[reducible, inline]

A one-step score which may inspect the complete trajectory prefix before scoring the next state.

Equations
Instances For
    noncomputable def FormalSLT.StochasticDynamics.trajectoryMeasure {Z : Type u_1} [MeasurableSpace Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (x0 : Z) :

    The Ionescu--Tulcea path law generated by a deterministic initial state and an arbitrary family of prefix-dependent Markov kernels.

    Equations
    Instances For

      The score observed after extending a path prefix by its next state.

      Equations
      Instances For
        noncomputable def FormalSLT.StochasticDynamics.conditionalTrajectoryRisk {Z : Type u_1} [MeasurableSpace Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) (score : TrajectoryScore Z) (n : ) (x : Z) :

        The one-step score averaged against the kernel selected by the observed prefix.

        Equations
        Instances For

          The observed score at step n is measurable with respect to the path through coordinate n + 1.

          theorem FormalSLT.StochasticDynamics.observedTrajectoryScore_mem_Icc {Z : Type u_1} {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) (x : Z) :
          theorem FormalSLT.StochasticDynamics.integrable_observedTrajectoryScore {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] {κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z} [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] {x0 : Z} {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :
          theorem FormalSLT.StochasticDynamics.map_trajectory_next {Z : Type u_1} [MeasurableSpace Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (n : ) (u : (Finset.Iic n)Z) :
          MeasureTheory.Measure.map (fun (x : Z) => x (n + 1)) ((ProbabilityTheory.Kernel.traj κ n) u) = (κ n) u

          Under a trajectory continuation from prefix u, coordinate n + 1 has exactly the law selected by the prefix-dependent kernel κ n u.

          theorem FormalSLT.StochasticDynamics.integral_observedTrajectoryScore_traj {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (score : TrajectoryScore Z) (n : ) (u : (Finset.Iic n)Z) :
          (x : Z), observedTrajectoryScore score n x (ProbabilityTheory.Kernel.traj κ n) u = (y : Z), score n u y (κ n) u

          Integrating the observed score against a trajectory continuation is the kernel-conditional risk associated with its supplied prefix.

          theorem FormalSLT.StochasticDynamics.observedTrajectoryScore_condExp {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (x0 : Z) (score : TrajectoryScore Z) (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :

          The trajectory construction determines the exact conditional expectation of the next score from the whole observed prefix.

          theorem FormalSLT.StochasticDynamics.conditionalTrajectoryRisk_mem_Icc {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) (x : Z) :
          theorem FormalSLT.StochasticDynamics.integrable_conditionalTrajectoryRisk {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] {κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z} [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] {x0 : Z} {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :
          noncomputable def FormalSLT.StochasticDynamics.trajectoryRiskInnovation {Z : Type u_1} [MeasurableSpace Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) (score : TrajectoryScore Z) (n : ) (x : Z) :

          Observed score minus its exact prefix-conditional risk.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem FormalSLT.StochasticDynamics.abs_trajectoryRiskInnovation_le_one {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) (x : Z) :
            theorem FormalSLT.StochasticDynamics.integrable_trajectoryRiskInnovation {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] {κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z} [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] {x0 : Z} {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :
            theorem FormalSLT.StochasticDynamics.trajectoryRiskInnovation_condExp_eq_zero {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (x0 : Z) {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :

            The prefix-dependent trajectory innovation is conditionally centered under the path law generated by the same kernels.

            theorem FormalSLT.StochasticDynamics.trajectoryRiskInnovation_condSecondMoment_le_one_fourth {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (κ : (n : ) → ProbabilityTheory.Kernel ((Finset.Iic n)Z) Z) [∀ (n : ), ProbabilityTheory.IsMarkovKernel (κ n)] (x0 : Z) {score : TrajectoryScore Z} (hscore : ∀ (n : ) (u : (Finset.Iic n)Z) (y : Z), score n u y Set.Icc 0 1) (n : ) :
            (trajectoryMeasure κ x0)[fun (x : Z) => trajectoryRiskInnovation κ score n x ^ 2 | MeasureTheory.Filtration.piLE n] ≤ᵐ[trajectoryMeasure κ x0] fun (x : Z) => 1 / 4

            A [0,1] prefix-dependent score has conditional centered second moment at most 1 / 4, with no stationarity or finite-memory assumption on the kernels.

            The Markov path measure is the specialization of trajectoryMeasure to the current-state prefixKernel.

            Squared Markov loss as a prefix-dependent trajectory score.

            Equations
            Instances For
              theorem FormalSLT.StochasticDynamics.pathSquaredLoss_condExp_via_trajectory {Z : Type u_1} [Fintype Z] [MeasurableSpace Z] [MeasurableSingletonClass Z] (P : ZPMF Z) (x0 : Z) (f q : Z) (hf : ∀ (z : Z), f z Set.Icc 0 1) (hq : ∀ (z : Z), q z Set.Icc 0 1) (n : ) :

              The original homogeneous-Markov squared-loss conditional-expectation theorem is an instance of the prefix-dependent trajectory theorem.