Documentation

FLT_Proofs.PureMath.Exchangeability

Exchangeability and Double-Sample Infrastructure #

Pure mathematical infrastructure for double-sample constructions, merged samples, valid splits, and split measures. No learning-theory types.

Main definitions #

References #

structure ExchangeableSample {X : Type u_1} [MeasurableSpace X] :
Type u_1

Bundle for an exchangeable sample: sample size, measure, and probability measure proof.

Instances For
    noncomputable def DoubleSampleMeasure {X : Type u} [MeasurableSpace X] (D : MeasureTheory.Measure X) (m : ) :
    MeasureTheory.Measure ((Fin mX) × (Fin mX))

    The double sample measure: D^m ⊗ D^m, the product of two independent m-fold product measures. This is the joint distribution of the training sample S and the ghost sample S'.

    Construction: Measure.pi gives D^m on Fin m → X. The .prod gives the product of two such measures on (Fin m → X) × (Fin m → X).

    Measurability: both factors are probability measures (by Measure.pi preserving IsProbabilityMeasure), so the product is also a probability measure.

    Equations
    Instances For
      @[reducible, inline]
      abbrev MergedSample (X : Type u) (m : ) :

      Type alias for a merged sample of 2m points from X. A merged sample arises from concatenating the training sample S and ghost sample S' into a single sequence of 2m points. The key property is that under D^{2m}, all 2m points are iid, so the joint distribution is invariant under permutations.

      Equations
      Instances For
        noncomputable def mergeSamples {X : Type u} {m : } (p : (Fin mX) × (Fin mX)) :

        Merge two samples of size m into a single sample of size 2m. Uses Fin.append via the canonical Fin mFin mFin (m + m) isomorphism, composed with the m + m = 2 * m cast.

        This is the structural bridge between (Fin m → X) × (Fin m → X) and Fin (2*m) → X. The inverse is splitMergedSample.

        Equations
        Instances For
          noncomputable def splitMergedSample {X : Type u} {m : } (z : MergedSample X m) :
          (Fin mX) × (Fin mX)

          Split a merged sample of 2m points back into two samples of size m. Inverse of mergeSamples.

          Equations
          Instances For
            structure ValidSplit (m : ) :

            A split of a 2m-element set into two groups of m. Represented as a function Fin (2*m) → Bool where true = first group, false = second. A valid split has exactly m elements in each group.

            The set of all valid splits has cardinality Nat.choose (2*m) m.

            • assign : Fin (2 * m)Bool

              Assignment of each of 2m indices to one of two groups

            • card_true : {i : Fin (2 * m) | self.assign i = true}.card = m

              Exactly m indices are assigned to the first group

            Instances For
              def instDecidableEqValidSplit.decEq {m✝ : } (x✝ x✝¹ : ValidSplit m✝) :
              Decidable (x✝ = x✝¹)
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[implicit_reducible]
                noncomputable instance instFintypeValidSplit (m : ) :

                ValidSplit m is finite: it is a subtype of the finite type Fin (2*m) → Bool.

                Equations
                @[implicit_reducible]

                Discrete measurable space on ValidSplit (all sets measurable).

                Equations
                noncomputable def SplitMeasure (m : ) :

                The uniform measure over all valid splits of 2m elements into two groups of m. This is the key construction for the exchangeability argument (Approach A).

                Under D^{2m}, conditioning on the merged sample z and averaging over all valid splits gives the same distribution as D^m ⊗ D^m. This is because D^{2m} is invariant under permutations of coordinates.

                The measure assigns weight 1/C(2m,m) to each valid split.

                MEASURABILITY NOTE: ValidSplit m is a finite type (subtype of Fin (2*m) → Bool), so all sets are measurable under the discrete σ-algebra.

                Equations
                Instances For
                  def splitFirst {X : Type u} {m : } (z : MergedSample X m) (_vs : ValidSplit m) :
                  Fin mX

                  Given a merged sample z and a valid split, extract the first group (training sample).

                  Equations
                  Instances For
                    def splitSecond {X : Type u} {m : } (z : MergedSample X m) (_vs : ValidSplit m) :
                    Fin mX

                    Given a merged sample z and a valid split, extract the second group (ghost sample).

                    Equations
                    Instances For