Documentation

Dynamics.Kernel

Finite transition kernels and expectations at finite times #

A kernel K is also its row-stochastic transition matrix K.toMatrix (a member of Mathlib's Matrix.rowStochastic), and K.iterate n f = K.toMatrix ^ n *ᵥ f.

@[reducible, inline]
abbrev Dynamics.Kernel (α : Type u_1) [Fintype α] :
Type u_1

A stochastic transition matrix, with its row normalization built in.

Equations
Instances For
    noncomputable def Dynamics.Kernel.apply {α : Type u_1} [Fintype α] (K : Kernel α) (f : α → ℝ) (a : α) :

    The transition operator on real observables.

    Equations
    Instances For
      noncomputable def Dynamics.Kernel.iterate {α : Type u_1} [Fintype α] (K : Kernel α) :
      ℕ → (α → ℝ) → α → ℝ

      Expected observable after n steps, starting at a.

      Equations
      Instances For
        @[simp]
        theorem Dynamics.Kernel.iterate_zero {α : Type u_1} [Fintype α] (K : Kernel α) (f : α → ℝ) :
        K.iterate 0 f = f
        @[simp]
        theorem Dynamics.Kernel.iterate_succ {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) (f : α → ℝ) :
        K.iterate (n + 1) f = K.apply (K.iterate n f)
        theorem Dynamics.Kernel.iterate_const {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) (c : ℝ) :
        (K.iterate n fun (x : α) => c) = fun (x : α) => c
        theorem Dynamics.Kernel.iterate_mono {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) {f g : α → ℝ} (h : ∀ (a : α), f a ≤ g a) (a : α) :
        K.iterate n f a ≤ K.iterate n g a
        theorem Dynamics.Kernel.iterate_nonneg {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) {f : α → ℝ} (h : ∀ (a : α), 0 ≤ f a) (a : α) :
        0 ≤ K.iterate n f a
        theorem Dynamics.Kernel.iterate_le_one {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) {f : α → ℝ} (h : ∀ (a : α), f a ≤ 1) (a : α) :
        K.iterate n f a ≤ 1
        theorem Dynamics.Kernel.iterate_mul {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) (c : ℝ) (f : α → ℝ) :
        (K.iterate n fun (a : α) => c * f a) = fun (a : α) => c * K.iterate n f a
        theorem Dynamics.Kernel.iterate_add {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) (f g : α → ℝ) :
        (K.iterate n fun (a : α) => f a + g a) = fun (a : α) => K.iterate n f a + K.iterate n g a
        theorem Dynamics.Kernel.iterate_const_sub {α : Type u_1} [Fintype α] (K : Kernel α) (n : ℕ) (c : ℝ) (F : α → ℝ) (x : α) :
        K.iterate n (fun (y : α) => c - F y) x = c - K.iterate n F x

        𝔼[c - F] = c - 𝔼[F] at every finite time (for c = 1, the complement of an event).

        theorem Dynamics.Kernel.iterate_add_time {α : Type u_1} [Fintype α] (K : Kernel α) (m n : ℕ) (f : α → ℝ) :
        K.iterate (m + n) f = K.iterate m (K.iterate n f)
        theorem Dynamics.Kernel.iterate_invariant {α : Type u_1} [Fintype α] (K : Kernel α) {f : α → ℝ} (h : K.apply f = f) (n : ℕ) :
        K.iterate n f = f

        A harmonic observable has constant expectation at every finite time.

        theorem Dynamics.Kernel.harmonic_affine {α : Type u_1} [Fintype α] (K : Kernel α) {φ : α → ℝ} (h : K.apply φ = φ) (u v : ℝ) :
        (K.apply fun (a : α) => u * φ a + v) = fun (a : α) => u * φ a + v

        An affine image u φ + v of a harmonic observable φ is harmonic. This normalizes an invariant potential into a candidate absorption probability, 1 on one target and 0 on the other (for instance (1 - q^k) / (1 - q^n) from q^k).

        noncomputable def Dynamics.Kernel.event {α : Type u_1} [Fintype α] (K : Kernel α) (s : α → Prop) (n : ℕ) (a : α) :

        Probability of occupying an event at a finite time.

        Equations
        Instances For
          theorem Dynamics.Kernel.event_nonneg {α : Type u_1} [Fintype α] (K : Kernel α) (s : α → Prop) (n : ℕ) (a : α) :
          0 ≤ K.event s n a
          theorem Dynamics.Kernel.event_le_one {α : Type u_1} [Fintype α] (K : Kernel α) (s : α → Prop) (n : ℕ) (a : α) :
          K.event s n a ≤ 1
          theorem Dynamics.Kernel.event_eq_iterate {α : Type u_1} [Fintype α] (K : Kernel α) (s : α → Prop) [DecidablePred s] (n : ℕ) (a : α) :
          K.event s n a = K.iterate n (fun (b : α) => if s b then 1 else 0) a

          event computed with any decidability instance for the event.

          def Dynamics.Kernel.Stationary {α : Type u_1} [Fintype α] (K : Kernel α) (p : Distribution α) :

          Stationarity of a distribution for a finite transition kernel.

          Equations
          Instances For
            theorem Dynamics.Kernel.stationary_expect {α : Type u_1} [Fintype α] (K : Kernel α) (p : Distribution α) (h : K.Stationary p) (f : α → ℝ) :
            p.expect (K.apply f) = p.expect f

            The transition matrix #

            noncomputable def Dynamics.Kernel.toMatrix {α : Type u_1} [Fintype α] (K : Kernel α) :
            Matrix α α ℝ

            The row-stochastic transition matrix P a b = (K a).weight b of the kernel K.

            Equations
            Instances For
              @[simp]
              theorem Dynamics.Kernel.toMatrix_apply {α : Type u_1} [Fintype α] (K : Kernel α) (a b : α) :
              K.toMatrix a b = (K a).weight b
              theorem Dynamics.Kernel.apply_eq_toMatrix_mulVec {α : Type u_1} [Fintype α] (K : Kernel α) (f : α → ℝ) :

              The transition operator is multiplication by the transition matrix: K f = P f.

              theorem Dynamics.Kernel.iterate_eq_toMatrix_pow_mulVec {α : Type u_1} [Fintype α] [DecidableEq α] (K : Kernel α) (n : ℕ) (f : α → ℝ) :
              K.iterate n f = (K.toMatrix ^ n).mulVec f

              Expectations after n steps are given by the n-th power of the transition matrix: Kⁿ f = Pⁿ f.

              The transition matrix is row stochastic, in the sense of Mathlib's Matrix.rowStochastic.