Documentation

Exchangeability.Core

Exchangeability and Full Exchangeability #

This file proves that exchangeability (invariance under finite permutations) and full exchangeability (invariance under all permutations of ℕ) are equivalent for probability measures on sequence spaces.

Main results #

Technical approach #

The proof uses the π-system uniqueness theorem for finite measures rather than directly invoking Kolmogorov extension or Ionescu-Tulcea. While mathlib provides these powerful tools (Measure.infinitePi for Kolmogorov extension and ProbabilityTheory.Kernel.traj for Ionescu-Tulcea), applying them here would require first constructing the measure from exchangeability data, which is circular when proving that finite exchangeability implies full exchangeability.

Instead, we use a uniqueness-based approach:

  1. Cylinder sets determined by initial segments form a π-system that generates the product σ-algebra on ℕ → α.
  2. Two measures with matching finite marginals must be equal (by π-system uniqueness, Measure.ext_of_generate_finite).
  3. Any infinite permutation can be approximated by a finite permutation on a sufficiently large initial segment, allowing us to transfer exchangeability to full exchangeability via the uniqueness result.

This approach directly proves the equivalence without requiring measure construction machinery.

π-system of prefix cylinders #

A prefix cylinder is a measurable subset of ℕ → α determined by the first n coordinates. Formally, it is the preimage of a measurable set under the projection to Fin n → α.

Key properties:

def Exchangeability.prefixProj (α : Type u_3) (n : ) (x : α) :
Fin nα

Projection to the first n coordinates.

Equations
Instances For
    @[simp]
    theorem Exchangeability.prefixProj_apply {α : Type u_2} {n : } (x : α) (i : Fin n) :
    prefixProj α n x i = x i
    def Exchangeability.prefixCylinder {α : Type u_2} {n : } (S : Set (Fin nα)) :
    Set (α)

    Cylinder set determined by the first n coordinates.

    Given a set S ⊆ Fin n → α, the prefix cylinder prefixCylinder n S is the set of all sequences x : ℕ → α whose first n coordinates lie in S.

    Equations
    Instances For
      @[simp]
      theorem Exchangeability.mem_prefixCylinder {α : Type u_2} {n : } {S : Set (Fin nα)} {x : α} :

      The collection of all prefix cylinders.

      A set A ⊆ ℕ → α belongs to prefixCylinders if it is the preimage of some measurable set S ⊆ Fin n → α under projection to the first n coordinates, for some n.

      Key property: This forms a π-system that generates the product σ-algebra.

      Equations
      Instances For
        def Exchangeability.takePrefix {α : Type u_2} {m n : } (hmn : m n) (x : Fin nα) :
        Fin mα

        Restrict a finite tuple to its first m coordinates.

        Given a function x : Fin n → α and a proof that m ≤ n, returns the restriction to Fin m → α.

        Equations
        Instances For
          @[simp]
          theorem Exchangeability.takePrefix_apply {α : Type u_2} {m n : } {hmn : m n} (x : Fin nα) (i : Fin m) :
          takePrefix hmn x i = x (Fin.castLE hmn i)
          @[simp]
          theorem Exchangeability.takePrefix_prefixProj {α : Type u_2} {m n : } {hmn : m n} (x : α) :
          takePrefix hmn (prefixProj α n x) = prefixProj α m x
          @[simp]
          theorem Exchangeability.castLE_coe_nat {m n : } {hmn : m n} (i : Fin m) :
          (Fin.castLE hmn i) = i
          def Exchangeability.extendSet {α : Type u_2} {m n : } (hmn : m n) (S : Set (Fin mα)) :
          Set (Fin nα)

          Extend a set from Fin m → α to Fin n → α by ignoring extra coordinates.

          Given a set S ⊆ Fin m → α and m ≤ n, the extended set consists of all x : Fin n → α whose first m coordinates lie in S.

          Equations
          Instances For
            theorem Exchangeability.prefixCylinder_inter {α : Type u_2} {m n : } {S : Set (Fin mα)} {T : Set (Fin nα)} :
            theorem Exchangeability.extendSet_measurable {α : Type u_2} [MeasurableSpace α] [MeasurableSpace α] {m n : } {S : Set (Fin mα)} {hmn : m n} (hS : MeasurableSet S) :

            The prefix cylinders form a π-system.

            A π-system is a collection of sets closed under finite intersections. This property is crucial for applying the uniqueness theorem for finite measures.

            Helper: any cylinder determined by a finite set of coordinates belongs to the σ-algebra generated by prefix cylinders.

            The σ-algebra generated by prefix cylinders is the product σ-algebra.

            This shows that prefix cylinders generate the full product σ-algebra on ℕ → α, which means any measurable set can be approximated by prefix cylinders.

            Finite measures with matching finite-dimensional marginals are equal.

            If two finite measures on ℕ → α induce the same distribution on each finite-dimensional projection Fin n → α, then they are equal. This is a consequence of the π-system uniqueness theorem applied to prefix cylinders.

            Mathematical content: This is a Kolmogorov extension-type result showing that infinite-dimensional measures are determined by their finite marginals.

            Proof structure: The proof decomposes into three steps:

            1. Measures agree on total mass (via 1-dimensional marginal)
            2. Measures agree on all prefix cylinders (direct from marginals)
            3. Apply π-system uniqueness to extend agreement to all measurable sets

            Exchangeability versus full exchangeability #

            This section proves that exchangeability (invariance under finite permutations) implies full exchangeability (invariance under all permutations of ℕ) for probability measures.

            Strategy: Given an arbitrary permutation π of ℕ and a finite index n, we construct a finite permutation that agrees with π on the first n coordinates. Exchangeability ensures the finite marginals match, and by the previous uniqueness result, the full measures are equal.

            def Exchangeability.reindex {α : Type u_2} (π : Equiv.Perm ) (x : α) :
            α

            Reindex a sequence by applying a permutation to the indices.

            Given a permutation π of ℕ and a sequence x : ℕ → α, returns the sequence i ↦ x (π i).

            Equations
            Instances For
              @[simp]
              theorem Exchangeability.reindex_apply {α : Type u_2} [MeasurableSpace α] [MeasurableSpace α] {π : Equiv.Perm } (x : α) (i : ) :
              reindex π x i = x (π i)
              def Exchangeability.pathLaw {Ω : Type u_1} {α : Type u_2} [MeasurableSpace Ω] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (X : Ωα) :

              The path law (or joint distribution) of a stochastic process.

              Given a measure μ on Ω and a process X : ℕ → Ω → α, the path law is the pushforward measure on ℕ → α obtained by mapping each ω to its sample path i ↦ X i ω.

              Equations
              Instances For
                theorem Exchangeability.pathLaw_map_prefix {Ω : Type u_1} {α : Type u_2} [MeasurableSpace Ω] [MeasurableSpace α] [MeasurableSpace Ω] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (X : Ωα) (hX : ∀ (i : ), Measurable (X i)) (n : ) :
                MeasureTheory.Measure.map (prefixProj α n) (pathLaw μ X) = MeasureTheory.Measure.map (fun (ω : Ω) (i : Fin n) => X (↑i) ω) μ
                theorem Exchangeability.pathLaw_map_prefix_perm {Ω : Type u_1} {α : Type u_2} [MeasurableSpace Ω] [MeasurableSpace α] [MeasurableSpace Ω] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (X : Ωα) (hX : ∀ (i : ), Measurable (X i)) (π : Equiv.Perm ) (n : ) :
                MeasureTheory.Measure.map (prefixProj α n) (MeasureTheory.Measure.map (reindex π) (pathLaw μ X)) = MeasureTheory.Measure.map (fun (ω : Ω) (i : Fin n) => X (π i) ω) μ

                Full exchangeability is equivalent to invariance of the path law.

                A process is fully exchangeable if and only if its path law is invariant under all permutations of the index set ℕ. This provides a measure-theoretic characterization of full exchangeability.

                Auxiliary combinatorics: approximating infinite permutations #

                To prove that exchangeability implies full exchangeability, we need to show that any infinite permutation π of ℕ can be approximated by a finite permutation on a sufficiently large initial segment.

                The key construction: given π and n, we find a bound m = permBound π n such that both {0,...,n-1} and {π(0),...,π(n-1)} lie in {0,...,m-1}. Then we extend π to a permutation of Fin m by choosing an arbitrary permutation on the remaining indices.

                A finite bound containing both {0,...,n-1} and {π(0),...,π(n-1)}.

                This is the maximum of n and the supremum of π(i) + 1 for i < n.

                Equations
                Instances For
                  theorem Exchangeability.lt_permBound_of_lt (π : Equiv.Perm ) (n : ) {i : } (hi : i < n) :
                  π i < permBound π n
                  theorem Exchangeability.lt_permBound_fin (π : Equiv.Perm ) (n : ) {i : Fin n} :
                  π i < permBound π n
                  def Exchangeability.approxEquiv (π : Equiv.Perm ) (n : ) :
                  { x : Fin (permBound π n) // x < n } { x : Fin (permBound π n) // ∃ (j : Fin n), x = π j }

                  Equivalence between indices below n and indices in the image of a permutation. Used in the proof of exchangeability via permutation extension.

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

                    A finite permutation of Fin (permBound π n) that agrees with π on {0,...,n-1}.

                    This extends the restriction of π to an equivalence on the finite type Fin (permBound π n) by choosing an arbitrary permutation on the indices outside the range of π restricted to {0,...,n-1}.

                    Equations
                    Instances For
                      theorem Exchangeability.approxPerm_apply_cast (π : Equiv.Perm ) (n : ) {i : Fin n} :
                      (approxPerm π n) (Fin.castLE i) = π i,
                      @[simp]
                      theorem Exchangeability.approxPerm_apply_cast_coe (π : Equiv.Perm ) (n : ) {i : Fin n} :
                      ((approxPerm π n) (Fin.castLE i)) = π i
                      theorem Exchangeability.marginals_perm_eq {Ω : Type u_1} {α : Type u_2} [MeasurableSpace Ω] [MeasurableSpace α] [MeasurableSpace Ω] [MeasurableSpace α] {μ : MeasureTheory.Measure Ω} (X : Ωα) (hX : ∀ (i : ), Measurable (X i)) ( : Exchangeable μ X) (π : Equiv.Perm ) (n : ) :
                      MeasureTheory.Measure.map (fun (ω : Ω) (i : Fin n) => X (π i) ω) μ = MeasureTheory.Measure.map (fun (ω : Ω) (i : Fin n) => X (↑i) ω) μ

                      Exchangeability implies invariance of all finite marginals under arbitrary permutations.

                      If a process X is exchangeable (invariant under finite permutations), then each finite marginal is invariant under any permutation of ℕ, not just finite ones. This is the key step in proving exchangeability implies full exchangeability.

                      Proof idea: Given an arbitrary permutation π and dimension n, construct a finite permutation that agrees with π on the first n coordinates using approxPerm. Exchangeability ensures this finite permutation preserves the n-dimensional marginal, hence so does π.