Documentation

LeanPool.BlockSpectralSensitivity.LLL.Prob

A finite product probability space #

The probabilistic input to the Lovász local lemma of Section 10 of bs_lambda.txt is a uniformly random assignment of a label to each of finitely many independent coordinates. We model this by plain counting over the finite product type Cfg β = ∀ a, β a; no measure theory is involved.

An event E : Finset (Cfg β) is determined by a coordinate set S when membership in E only depends on the restriction of a configuration to S. Two events determined by disjoint coordinate sets are independent (pr_inter_of_disjoint_support); this is the only probabilistic input the local lemma needs.

pr E is E.dens, the density of E in the space of all configurations, viewed as a real number; pr_eq_div is the corresponding quotient of cardinalities.

Besides independence the file provides finite additivity (pr_biUnion), the union bound (pr_biUnion_le) and the counting probabilities of the pinning events "coordinate a lands in s a for every a ∈ T" (pr_coord_mem, pr_pin_eq, pr_pin_le).

Adapted for Lean Pool from Timeroot/BS_Lam at commit 7bd39a8d41ee7910d3296d0477ad18f8fff9d870; ported to Lean Pool with proof and dependency cleanup.

@[reducible, inline]
abbrev BSLambda.LLL.Cfg {A : Type u_1} (β : A → Type u_3) :
Type (max u_1 u_3)

A configuration: an assignment of a value to every coordinate.

Equations
Instances For
    noncomputable def BSLambda.LLL.pr {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] (E : Finset (Cfg β)) :

    The uniform counting probability of an event: its density in the space of all configurations.

    Equations
    Instances For
      theorem BSLambda.LLL.pr_eq_div {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] (E : Finset (Cfg β)) :
      pr E = ↑E.card / ↑(Fintype.card (Cfg β))

      pr as a quotient of cardinalities.

      theorem BSLambda.LLL.pr_nonneg {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] (E : Finset (Cfg β)) :
      0 ≤ pr E

      Probabilities are nonnegative.

      @[simp]
      theorem BSLambda.LLL.pr_empty {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] :
      pr ∅ = 0

      The empty event has probability zero.

      theorem BSLambda.LLL.pr_pos_iff {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] {E : Finset (Cfg β)} :

      An event has positive probability exactly when it is nonempty.

      theorem BSLambda.LLL.pr_mono {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] {E F : Finset (Cfg β)} (h : E ⊆ F) :
      pr E ≤ pr F

      Probability is monotone in the event.

      theorem BSLambda.LLL.pr_le_one {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] (E : Finset (Cfg β)) :
      pr E ≤ 1

      Probabilities are at most one.

      theorem BSLambda.LLL.card_cfg_pos_real {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [∀ (a : A), Nonempty (β a)] :
      0 < ↑(Fintype.card (Cfg β))

      The number of configurations is positive, so the counting probability is well defined.

      @[simp]
      theorem BSLambda.LLL.pr_univ {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [∀ (a : A), Nonempty (β a)] :

      The whole space has probability one.

      theorem BSLambda.LLL.pr_biUnion {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] {κ : Type u_3} {T : Finset κ} {E : κ → Finset (Cfg β)} (hdisj : ∀ i ∈ T, ∀ j ∈ T, i ≠ j → Disjoint (E i) (E j)) :
      pr (T.biUnion E) = ∑ i ∈ T, pr (E i)

      Finite additivity. The probability of a union of pairwise disjoint events is the sum of the probabilities.

      theorem BSLambda.LLL.pr_inter_add_pr_compl_inter {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] (E F : Finset (Cfg β)) :
      pr (E ∩ F) + pr (Eᶜ ∩ F) = pr F

      Splitting an event according to whether E occurs.

      theorem BSLambda.LLL.pr_compl_inter {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] (E F : Finset (Cfg β)) :
      pr (Eᶜ ∩ F) = pr F - pr (E ∩ F)

      The complementary form of pr_inter_add_pr_compl_inter.

      theorem BSLambda.LLL.pr_biUnion_le {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] {κ : Type u_3} (T : Finset κ) (E : κ → Finset (Cfg β)) :
      pr (T.biUnion E) ≤ ∑ i ∈ T, pr (E i)

      The union bound. The probability of a finite union is at most the sum of the probabilities.

      theorem BSLambda.LLL.pr_le_of_subset_biUnion {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] {κ : Type u_3} {E : Finset (Cfg β)} (T : Finset κ) (f : κ → Finset (Cfg β)) (h : E ⊆ T.biUnion f) :
      pr E ≤ ∑ i ∈ T, pr (f i)

      The union bound in the form used to cover an event by an enumeration of cases.

      def BSLambda.LLL.Determined {A : Type u_1} {β : A → Type u_2} (S : Finset A) (E : Finset (Cfg β)) :

      E depends only on the coordinates in S.

      Equations
      Instances For
        theorem BSLambda.LLL.Determined.mono {A : Type u_1} {β : A → Type u_2} {S T : Finset A} {E : Finset (Cfg β)} (hST : S ⊆ T) (hE : Determined S E) :

        An event determined by S is determined by any larger coordinate set.

        theorem BSLambda.LLL.Determined.inter {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → DecidableEq (β a)] {S T : Finset A} {E F : Finset (Cfg β)} (hE : Determined S E) (hF : Determined T F) :
        Determined (S ∪ T) (E ∩ F)

        The intersection of two determined events is determined by the union of the supports.

        theorem BSLambda.LLL.Determined.compl {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] {S : Finset A} {E : Finset (Cfg β)} (hE : Determined S E) :

        The complement of a determined event is determined by the same coordinates.

        theorem BSLambda.LLL.determined_filter_univ {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] {S : Finset A} (p : Cfg β → Prop) [DecidablePred p] (hp : ∀ (ω ω' : Cfg β), (∀ a ∈ S, ω a = ω' a) → (p ω ↔ p ω')) :

        The standard way to exhibit a determined event: an event cut out of the whole space by a predicate that only reads the coordinates in S.

        theorem BSLambda.LLL.determined_coord {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] (a : A) (s : Finset (β a)) :
        Determined {a} {ω : Cfg β | ω a ∈ s}

        The event that one coordinate lands in a prescribed set is determined by that coordinate.

        theorem BSLambda.LLL.determined_pin {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] (T : Finset A) (s : (a : A) → Finset (β a)) :
        Determined T {ω : Cfg β | ∀ a ∈ T, ω a ∈ s a}

        A pinning event is determined by the coordinates it pins.

        def BSLambda.LLL.glue {A : Type u_1} [DecidableEq A] {β : A → Type u_2} (S : Finset A) (u v : Cfg β) :
        Cfg β

        glue S u v is the configuration following u on S and v off S.

        Equations
        Instances For
          @[simp]
          theorem BSLambda.LLL.glue_apply_of_mem {A : Type u_1} [DecidableEq A] {β : A → Type u_2} {S : Finset A} {u v : Cfg β} {a : A} (ha : a ∈ S) :
          glue S u v a = u a
          @[simp]
          theorem BSLambda.LLL.glue_apply_of_notMem {A : Type u_1} [DecidableEq A] {β : A → Type u_2} {S : Finset A} {u v : Cfg β} {a : A} (ha : a ∉ S) :
          glue S u v a = v a
          theorem BSLambda.LLL.Determined.mem_glue_iff_left {A : Type u_1} [DecidableEq A] {β : A → Type u_2} {S : Finset A} {E : Finset (Cfg β)} (hE : Determined S E) {u v : Cfg β} :
          glue S u v ∈ E ↔ u ∈ E

          An event determined by S only sees the S-half of a glued configuration.

          theorem BSLambda.LLL.Determined.mem_glue_iff_right {A : Type u_1} [DecidableEq A] {β : A → Type u_2} {S T : Finset A} {F : Finset (Cfg β)} (hF : Determined T F) (hST : Disjoint S T) {u v : Cfg β} :
          glue S u v ∈ F ↔ v ∈ F

          An event determined by a set disjoint from S only sees the off-S half of a glued configuration.

          def BSLambda.LLL.swapGlue {A : Type u_1} [DecidableEq A] {β : A → Type u_2} (S : Finset A) (p : Cfg β × Cfg β) :
          Cfg β × Cfg β

          The involution (u, v) ↦ (glue S u v, glue S v u) used to prove independence.

          Equations
          Instances For
            theorem BSLambda.LLL.swapGlue_swapGlue {A : Type u_1} [DecidableEq A] {β : A → Type u_2} (S : Finset A) (p : Cfg β × Cfg β) :
            swapGlue S (swapGlue S p) = p

            swapGlue S is an involution.

            theorem BSLambda.LLL.pr_inter_of_disjoint_support {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] {S T : Finset A} {E F : Finset (Cfg β)} (hE : Determined S E) (hF : Determined T F) (hST : Disjoint S T) :
            pr (E ∩ F) = pr E * pr F

            Independence. Two events determined by disjoint sets of coordinates are independent for the uniform counting probability. This is the probabilistic input to the local lemma of Section 10 of bs_lambda.txt.

            theorem BSLambda.LLL.card_filter_coord_mul_card {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] (a : A) (b : β a) :
            {ω : Cfg β | ω a = b}.card * Fintype.card (β a) = Fintype.card (Cfg β)

            Counting core. Pinning one coordinate to a prescribed value divides the number of configurations by the size of that coordinate's alphabet.

            theorem BSLambda.LLL.pr_coord_eq {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] (a : A) (b : β a) :
            pr {ω : Cfg β | ω a = b} = 1 / ↑(Fintype.card (β a))

            A single coordinate takes a prescribed value with probability 1 / |β a|.

            theorem BSLambda.LLL.pr_coord_mem {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] (a : A) (s : Finset (β a)) :
            pr {ω : Cfg β | ω a ∈ s} = ↑s.card / ↑(Fintype.card (β a))

            A single coordinate lands in a prescribed set with probability |s| / |β a|.

            theorem BSLambda.LLL.pr_pin_eq {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] (T : Finset A) (s : (a : A) → Finset (β a)) :
            pr {ω : Cfg β | ∀ a ∈ T, ω a ∈ s a} = ∏ a ∈ T, ↑(s a).card / ↑(Fintype.card (β a))

            Pinning several coordinates. Distinct coordinates are independent, so the probability that each of them lands in a prescribed set is the product of the individual probabilities.

            theorem BSLambda.LLL.pr_pin_le {A : Type u_1} [Fintype A] [DecidableEq A] {β : A → Type u_2} [(a : A) → Fintype (β a)] [(a : A) → DecidableEq (β a)] [∀ (a : A), Nonempty (β a)] (T : Finset A) (s : (a : A) → Finset (β a)) (m : ℕ) (hm : ∀ a ∈ T, (s a).card ≤ m) :
            pr {ω : Cfg β | ∀ a ∈ T, ω a ∈ s a} ≤ ∏ a ∈ T, ↑m / ↑(Fintype.card (β a))

            Pinning several coordinates into target sets of size at most m.