Documentation

CslibFrontier.Probability.MoserTardos.Witness

Witness structures for the Moser–Tardos algorithm #

Moser and Tardos [MT10] analyse the resampling algorithm for the variable version of the Lovász Local Lemma. There are finitely many events A i, and each A i is determined by the variables in a finite set vbl i. The randomness is a table T: the sample T (v, n) is the value variable v takes after its n-th resampling. A run of the algorithm is recorded by a log w (latest step first), and current vbl T w is the assignment after the steps of w. IsLog vbl A T w says that each step of w resamples an event that occurs at that point; it does not constrain which occurring event is chosen.

To the step i :: w of a log the paper attaches a witness tree, built by scanning the history backwards and attaching each earlier step below the deepest vertex whose label shares a variable with it [MoserTardos2010, Section 2]. The check of a tree only reads the label and depth of each vertex. So we record a tree as its finite set of (label, depth) pairs, the witness structure witness vbl i w, and the tree check becomes Check vbl A S T: for every vertex p of S, the assignment that reads the next sample of each variable of vbl p.1 after the samples consumed by the deeper vertices lies in A p.1.

Main definitions #

Main results #

The paper bounds this sum by comparing a Galton–Watson process with the witness trees. We prove it by induction on the depth: the factor ∏ B ∈ Γ⁺ C, (1 - x B)⁻¹ charged to each label C on the deepest level pays for every choice of children of that level.

References #

def Cslib.Probability.MoserTardos.uses {V : Type u_1} {ι : Type u_2} [DecidableEq V] (vbl : ι → Finset V) (w : List ι) (v : V) :

The number of entries of w whose variable set contains v: how often v has been resampled by the steps of w.

def Cslib.Probability.MoserTardos.current {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) (T : (p : V × ℕ) → α p.1) (w : List ι) (v : V) :
α v

The assignment after the resamplings recorded in the log w (latest first): variable v holds its sample number uses vbl w v of the table T.

def Cslib.Probability.MoserTardos.IsLog {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) (A : ι → Set ((v : V) → α v)) (T : (p : V × ℕ) → α p.1) :
List ι → Prop

w (latest first) is a valid log on the table T: every step resamples an event that occurs in the assignment produced by the earlier steps.

theorem Cslib.Probability.MoserTardos.current_apply {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) (T : (p : V × ℕ) → α p.1) (w : List ι) (v : V) :
current vbl T w v = T (v, uses vbl w v)
theorem Cslib.Probability.MoserTardos.uses_nil {V : Type u_1} {ι : Type u_2} [DecidableEq V] (vbl : ι → Finset V) (v : V) :
uses vbl [] v = 0
theorem Cslib.Probability.MoserTardos.uses_cons {V : Type u_1} {ι : Type u_2} [DecidableEq V] (vbl : ι → Finset V) (i : ι) (w : List ι) (v : V) :
uses vbl (i :: w) v = uses vbl w v + if v ∈ vbl i then 1 else 0
theorem Cslib.Probability.MoserTardos.isLog_nil {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) (A : ι → Set ((v : V) → α v)) (T : (p : V × ℕ) → α p.1) :
IsLog vbl A T []
theorem Cslib.Probability.MoserTardos.isLog_cons {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) {A : ι → Set ((v : V) → α v)} {T : (p : V × ℕ) → α p.1} {i : ι} {w : List ι} :
IsLog vbl A T (i :: w) ↔ current vbl T w ∈ A i ∧ IsLog vbl A T w
def Cslib.Probability.MoserTardos.Adj {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) (i j : ι) :

Labels i and j are equal or share a variable.

Instances For
    @[instance_reducible]
    instance Cslib.Probability.MoserTardos.instDecidableAdjOfDecidableEq {V : Type u_1} {ι : Type u_2} [DecidableEq ι] [DecidableEq V] (vbl : ι → Finset V) (i j : ι) :
    Decidable (Adj vbl i j)
    theorem Cslib.Probability.MoserTardos.adj_comm {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) {i j : ι} :
    Adj vbl i j ↔ Adj vbl j i
    theorem Cslib.Probability.MoserTardos.adj_refl {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) (i : ι) :
    Adj vbl i i
    theorem Cslib.Probability.MoserTardos.adj_of_mem {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) {i j : ι} {v : V} (hi : v ∈ vbl i) (hj : v ∈ vbl j) :
    Adj vbl i j
    theorem Cslib.Probability.MoserTardos.adj_iff {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) {i j : ι} :
    Adj vbl i j ↔ i = j ∨ ¬Disjoint (vbl i) (vbl j)
    def Cslib.Probability.MoserTardos.levelRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] (j : ι) (S : Finset (ι × ℕ)) :

    One more than the deepest depth of a vertex of S related to j under R, or 0 if there is none.

    def Cslib.Probability.MoserTardos.pushRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (j : ι) (S : Finset (ι × ℕ)) :

    Attach j one level below the deepest vertex of S related to j under R, if there is one.

    def Cslib.Probability.MoserTardos.witnessRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (i : ι) (w : List ι) :

    The witness structure of the step labelled i with earlier history w (latest first) with respect to dependency relation R [MoserTardos2010, Section 2, Section 6].

    def Cslib.Probability.MoserTardos.ProperRel {ι : Type u_2} (R : ι → ι → Prop) (S : Finset (ι × ℕ)) :

    A structure is R-proper if distinct vertices on one level are not R-related.

    def Cslib.Probability.MoserTardos.witness {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] (vbl : ι → Finset V) (i : ι) (w : List ι) :

    The witness structure of the step labelled i with earlier history w (latest first): the (label, depth) pairs of the witness tree of [MoserTardos2010, Section 2].

    def Cslib.Probability.MoserTardos.Proper {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) (S : Finset (ι × ℕ)) :

    A structure is proper if distinct vertices on one level are not adjacent. This is the level independence established in the proof of [MoserTardos2010, Lemma 2.1(i)]; it implies the paper's properness (distinct children of a vertex receive distinct labels).

    theorem Cslib.Probability.MoserTardos.witness_eq_witnessRel {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] (vbl : ι → Finset V) (i : ι) (w : List ι) :
    witness vbl i w = witnessRel (Adj vbl) i w
    theorem Cslib.Probability.MoserTardos.proper_iff_properRel {V : Type u_1} {ι : Type u_2} (vbl : ι → Finset V) (S : Finset (ι × ℕ)) :
    Proper vbl S ↔ ProperRel (Adj vbl) S
    theorem Cslib.Probability.MoserTardos.witnessRel_nil {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (i : ι) :
    theorem Cslib.Probability.MoserTardos.witnessRel_append_singleton {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (i : ι) (w : List ι) (j : ι) :
    witnessRel R i (w ++ [j]) = pushRel R j (witnessRel R i w)
    theorem Cslib.Probability.MoserTardos.witnessRel_cons_of_not_rel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] {i j : ι} (hij : ¬R i j) (w : List ι) :
    witnessRel R i (j :: w) = witnessRel R i w
    theorem Cslib.Probability.MoserTardos.lt_levelRel {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] {j : ι} {S : Finset (ι × ℕ)} {q : ι × ℕ} (hq : q ∈ S) (h : R q.1 j) :
    q.2 < levelRel R j S
    theorem Cslib.Probability.MoserTardos.levelRel_eq_zero {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] {j : ι} {S : Finset (ι × ℕ)} (h : levelRel R j S = 0) {q : ι × ℕ} (hq : q ∈ S) :
    ¬R q.1 j
    theorem Cslib.Probability.MoserTardos.levelRel_eq_zero_iff {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] {j : ι} {S : Finset (ι × ℕ)} :
    levelRel R j S = 0 ↔ ∀ q ∈ S, ¬R q.1 j
    theorem Cslib.Probability.MoserTardos.levelRel_notMem {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] (hRr : ∀ (i : ι), R i i) (j : ι) (S : Finset (ι × ℕ)) :
    (j, levelRel R j S) ∉ S
    theorem Cslib.Probability.MoserTardos.pushRel_of_eq_zero {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] [DecidableEq ι] {j : ι} {S : Finset (ι × ℕ)} (h : levelRel R j S = 0) :
    pushRel R j S = S
    theorem Cslib.Probability.MoserTardos.pushRel_of_ne_zero {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] [DecidableEq ι] {j : ι} {S : Finset (ι × ℕ)} (h : levelRel R j S ≠ 0) :
    pushRel R j S = insert (j, levelRel R j S) S
    theorem Cslib.Probability.MoserTardos.levelRel_insert_of_not_rel {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] [DecidableEq ι] {a b : ι} (hab : ¬R a b) (l : ℕ) (S : Finset (ι × ℕ)) :
    levelRel R b (insert (a, l) S) = levelRel R b S
    theorem Cslib.Probability.MoserTardos.pushRel_comm_of_not_rel {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] [DecidableEq ι] {a b : ι} (hab : ¬R a b) (hba : ¬R b a) (S : Finset (ι × ℕ)) :
    pushRel R a (pushRel R b S) = pushRel R b (pushRel R a S)
    def Cslib.Probability.MoserTardos.depthUses {V : Type u_1} {ι : Type u_2} [DecidableEq V] (vbl : ι → Finset V) (S : Finset (ι × ℕ)) (p : ι × ℕ) (v : V) :

    The number of vertices of S strictly deeper than p whose label contains v: the samples of v consumed before vertex p in the check of S.

    def Cslib.Probability.MoserTardos.Check {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) (A : ι → Set ((v : V) → α v)) (S : Finset (ι × ℕ)) (T : (p : V × ℕ) → α p.1) :

    The check of the structure S passes on the table T: processing the vertices from the deepest level up, each vertex p finds A p.1 occurring on the next samples of its variables.

    theorem Cslib.Probability.MoserTardos.check_iff {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] (vbl : ι → Finset V) {A : ι → Set ((v : V) → α v)} {S : Finset (ι × ℕ)} {T : (p : V × ℕ) → α p.1} :
    Check vbl A S T ↔ ∀ p ∈ S, (fun (v : V) => T (v, depthUses vbl S p v)) ∈ A p.1
    theorem Cslib.Probability.MoserTardos.check_witness {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] [DecidableEq ι] (vbl : ι → Finset V) (A : ι → Set ((v : V) → α v)) (hA : ∀ (i : ι), DependsOn (fun (x : (i : V) → α i) => x ∈ A i) ↑(vbl i)) (i : ι) (w : List ι) (T : (p : V × ℕ) → α p.1) :
    IsLog vbl A T (i :: w) → Check vbl A (witness vbl i w) T

    Coupling [MoserTardos2010, Lemma 2.1]: if i :: w is a valid log on T, the witness structure of its latest step passes its check on T.

    theorem Cslib.Probability.MoserTardos.proper_witnessRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (hRs : ∀ {i j : ι}, R i j → R j i) (i : ι) (w : List ι) :

    Witness structures for a symmetric relation R are R-proper.

    theorem Cslib.Probability.MoserTardos.proper_witness {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] (vbl : ι → Finset V) (i : ι) (w : List ι) :
    Proper vbl (witness vbl i w)

    Witness structures are proper, in the level-independence sense of Proper [MoserTardos2010, Lemma 2.1(i)].

    theorem Cslib.Probability.MoserTardos.depthUses_ne {V : Type u_1} {ι : Type u_2} [DecidableEq V] (vbl : ι → Finset V) {S : Finset (ι × ℕ)} (hS : Proper vbl S) {p q : ι × ℕ} (hp : p ∈ S) (hq : q ∈ S) (hpq : p ≠ q) {v : V} (hvp : v ∈ vbl p.1) (hvq : v ∈ vbl q.1) :
    depthUses vbl S p v ≠ depthUses vbl S q v

    On a proper structure, distinct vertices whose labels both contain v read different samples of v.

    def Cslib.Probability.MoserTardos.shapesRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] [Fintype ι] (i : ι) :
    ℕ → Finset (Finset (ι × ℕ))

    The structures rooted at i of depth at most H in which every label on level l + 1 is R-related to some label on level l.

    def Cslib.Probability.MoserTardos.shapes {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) (i : ι) (H : ℕ) :

    The structures rooted at i of depth at most H in which every label on level l + 1 is adjacent to some label on level l. They include all witness structures rooted at i of depth at most H.

    theorem Cslib.Probability.MoserTardos.shapes_eq_shapesRel {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) (i : ι) (H : ℕ) :
    shapes vbl i H = shapesRel (Adj vbl) i H
    theorem Cslib.Probability.MoserTardos.shapesRel_mono {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] [Fintype ι] (i : ι) (H : ℕ) :
    shapesRel R i H ⊆ shapesRel R i (H + 1)
    theorem Cslib.Probability.MoserTardos.shapes_mono {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) (i : ι) (H : ℕ) :
    shapes vbl i H ⊆ shapes vbl i (H + 1)
    theorem Cslib.Probability.MoserTardos.le_of_mem_shapesRel {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] [DecidableEq ι] [Fintype ι] {i : ι} {H : ℕ} {S : Finset (ι × ℕ)} :
    S ∈ shapesRel R i H → ∀ p ∈ S, p.2 ≤ H

    The members of shapesRel R i H have depth at most H.

    theorem Cslib.Probability.MoserTardos.le_of_mem_shapes {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) {i : ι} {H : ℕ} {S : Finset (ι × ℕ)} (hS : S ∈ shapes vbl i H) (p : ι × ℕ) :
    p ∈ S → p.2 ≤ H

    The members of shapes vbl i H have depth at most H.

    structure Cslib.Probability.MoserTardos.RootedRel {ι : Type u_2} (R : ι → ι → Prop) (i : ι) (S : Finset (ι × ℕ)) :

    A structure rooted at i in which every vertex below the root has an R-related parent one level up.

    theorem Cslib.Probability.MoserTardos.exists_of_levelRel_ne_zero {ι : Type u_2} {R : ι → ι → Prop} [DecidableRel R] {j : ι} {S : Finset (ι × ℕ)} (h : levelRel R j S ≠ 0) :
    ∃ q ∈ S, q.2 + 1 = levelRel R j S ∧ R q.1 j
    theorem Cslib.Probability.MoserTardos.rooted_witnessRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (i : ι) (w : List ι) :
    RootedRel R i (witnessRel R i w)
    theorem Cslib.Probability.MoserTardos.witnessRel_le {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] (i : ι) (w : List ι) (p : ι × ℕ) :
    p ∈ witnessRel R i w → p.2 ≤ w.length
    theorem Cslib.Probability.MoserTardos.mem_shapesRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] [Fintype ι] {i : ι} (H : ℕ) {S : Finset (ι × ℕ)} :
    RootedRel R i S → (∀ p ∈ S, p.2 ≤ H) → S ∈ shapesRel R i H
    theorem Cslib.Probability.MoserTardos.exists_witnessesRel {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] [Fintype ι] (hRr : ∀ (i : ι), R i i) (hRs : ∀ {i j : ι}, R i j → R j i) (i : ι) (H : ℕ) (w : List ι) (hl : w.length ≤ H) (P : List ι → Prop) (hP_tail : ∀ (a : ι) (u : List ι), P (a :: u) → P u) (hw : P w) :
    ∃ (W : Finset (Finset (ι × ℕ))), W.card = List.count i w ∧ ∀ S ∈ W, S ∈ shapesRel R i H ∧ ProperRel R S ∧ ∃ (u : List ι), S = witnessRel R i u ∧ P (i :: u)

    Given a reflexive, symmetric relation R and any tail-closed predicate P on logs, the steps labelled i of a log w of length at most H yield w.count i distinct R-proper structures in shapesRel R i H, each witnessed by a tail i :: u of w.

    theorem Cslib.Probability.MoserTardos.exists_witnesses {V : Type u_1} {ι : Type u_2} {α : V → Type u_3} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) (A : ι → Set ((v : V) → α v)) (hA : ∀ (i : ι), DependsOn (fun (x : (i : V) → α i) => x ∈ A i) ↑(vbl i)) (T : (p : V × ℕ) → α p.1) (i : ι) (H : ℕ) (w : List ι) (hw : IsLog vbl A T w) (hl : w.length ≤ H) :
    ∃ (W : Finset (Finset (ι × ℕ))), W.card = List.count i w ∧ ∀ S ∈ W, S ∈ shapes vbl i H ∧ Proper vbl S ∧ Check vbl A S T

    Witness structures of a log. If w is a valid log on T of length at most H, there are w.count i distinct structures in shapes vbl i H, all proper and passing their checks on T: the witness structures of the steps labelled i [MoserTardos2010, Section 2].

    theorem Cslib.Probability.MoserTardos.sum_prod_shapesRel_le {ι : Type u_2} (R : ι → ι → Prop) [DecidableRel R] [DecidableEq ι] [Fintype ι] (hRr : ∀ (i : ι), R i i) (Γ : ι → Finset ι) (hΓ : ∀ (i j : ι), j ≠ i → R i j → j ∈ Γ i) {x y : ι → ℝ} (hx : ∀ (i : ι), x i ∈ Set.Ico 0 1) (hy0 : ∀ (i : ι), 0 ≤ y i) (hy : ∀ (i : ι), y i ≤ x i * ∏ j ∈ Γ i, (1 - x j)) (i : ι) (H : ℕ) :
    ∑ S ∈ shapesRel R i H, ∏ p ∈ S, y p.1 ≤ x i / (1 - x i)

    The generalized counting bound [MoserTardos2010, Section 3, Section 6]. For any reflexive dependency relation R, under y i ≤ x i ∏ j ∈ Γ i, (1 - x j) where Γ i contains every other j with R i j, the products ∏ p ∈ S, y p.1 over S ∈ shapesRel R i H sum to at most x i / (1 - x i).

    theorem Cslib.Probability.MoserTardos.sum_prod_shapes_le {V : Type u_1} {ι : Type u_2} [DecidableEq V] [DecidableEq ι] [Fintype ι] (vbl : ι → Finset V) (Γ : ι → Finset ι) (hΓ : ∀ (i j : ι), j ≠ i → ¬Disjoint (vbl i) (vbl j) → j ∈ Γ i) {x y : ι → ℝ} (hx : ∀ (i : ι), x i ∈ Set.Ico 0 1) (hy0 : ∀ (i : ι), 0 ≤ y i) (hy : ∀ (i : ι), y i ≤ x i * ∏ j ∈ Γ i, (1 - x j)) (i : ι) (H : ℕ) :
    ∑ S ∈ shapes vbl i H, ∏ p ∈ S, y p.1 ≤ x i / (1 - x i)

    The counting bound [MoserTardos2010, Section 3]. Under the local-lemma hypothesis y i ≤ x i ∏ j ∈ Γ i, (1 - x j), where Γ i contains every other event sharing a variable with A i, the products ∏ p ∈ S, y p.1 over the structures S ∈ shapes vbl i H sum to at most x i / (1 - x i), for every depth H.