Documentation

Complexitylib.Classes.AverageCase.FiniteEnsemble.Defs

Finite uniform-seed distribution ensembles -- definitions #

FiniteEnsemble α allows each parameter slice to use any nonempty finite uniform seed type. This strictly generalizes fixed-length Boolean seeds and, crucially, supports exact choices such as a uniform element of Fin m when m is not a power of two.

The distribution remembers sampler multiplicity: probability is the fraction of seeds whose samples satisfy an event, not the fraction of distinct outputs.

def Complexity.uniformProbability {Ω : Type u} [Fintype Ω] (event : Finset Ω) :

Uniform probability of an event in an arbitrary finite sample space.

Equations
Instances For
    def Complexity.uniformMean {Ω : Type u} [Fintype Ω] (value : Ω) :

    Mean of a rational-valued statistic on a finite uniform sample space.

    Equations
    Instances For
      def Complexity.uniformAtLeastOneEvent {Ω : Type u} [Fintype Ω] [DecidableEq Ω] (event : Finset Ω) (trials : ) :
      Finset (Fin trialsΩ)

      Samples in which at least one of trials independent uniform draws lands in event.

      Equations
      Instances For
        def Complexity.uniformAtLeastOneProbability {Ω : Type u} [Fintype Ω] [DecidableEq Ω] (event : Finset Ω) (trials : ) :

        Probability that at least one of trials independent uniform draws lands in event.

        Equations
        Instances For
          structure Complexity.FiniteEnsemble (α : Type u) :
          Type (max u (v + 1))

          A parameterized distribution represented by a nonempty finite uniform seed space and deterministic sampler at every slice.

          • Seed : Type v

            Seed type used at each parameter.

          • seedFintype (n : ) : Fintype (self.Seed n)

            Every seed type is finite.

          • seedDecidableEq (n : ) : DecidableEq (self.Seed n)

            Seed equality is decidable, so events can be enumerated exactly.

          • seedNonempty (n : ) : Nonempty (self.Seed n)

            No slice has an empty sample space.

          • sample (n : ) : self.Seed nα

            Deterministic output associated to each seed.

          Instances For
            def Complexity.FiniteEnsemble.event {α : Type u} (D : FiniteEnsemble α) (n : ) (P : αProp) [DecidablePred P] :
            Finset (D.Seed n)

            The seed event whose samples satisfy P.

            Equations
            Instances For
              def Complexity.FiniteEnsemble.probability {α : Type u} (D : FiniteEnsemble α) (n : ) (P : αProp) [DecidablePred P] :

              Exact uniform-seed probability of P in the nth slice.

              Equations
              Instances For
                def Complexity.FiniteEnsemble.mass {α : Type u} [DecidableEq α] (D : FiniteEnsemble α) (n : ) (x : α) :

                Probability mass of one output in the nth slice.

                Equations
                Instances For

                  Finite support of the nth slice.

                  Equations
                  Instances For
                    def Complexity.FiniteEnsemble.map {α : Type u} {β : Type w} (D : FiniteEnsemble α) (f : αβ) :

                    Push an ensemble forward through a deterministic map.

                    Equations
                    Instances For

                      Independently sample two ensembles from the product of their seed spaces.

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

                        Point-mass ensemble. Its seed type is a singleton at every slice.

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

                          Regard a Boolean-seed ensemble as a general finite uniform-seed ensemble.

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