Lax41.HaeuplerSahaSrinivasanDefinitions
Definitions for the Haeupler–Saha–Srinivasan distributional theorem
concepts/Lax41/HaeuplerSahaSrinivasanDefinitions.lean · lax-41
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
Fix a finite collection of mutually independent random variables and a finite set of bad events determined by them. The Moser–Tardos algorithm repeatedly resamples a currently true bad event. Besides the bad events, we may observe any other event determined by the same variables. This file defines the bad-event restriction of the event family, the dependency neighborhood , the event that is true at some stage of the algorithm, and the event that is true in its final output.
Lean source view on GitHub
| 1 | import Mathlib |
| 2 | import Lax41.MoserTardosDefinitions |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Definitions for the Haeupler–Saha–Srinivasan distributional theorem |
| 7 | type: definition |
| 8 | --- |
| 9 | Fix a finite collection of mutually independent random variables and a finite |
| 10 | set of bad events determined by them. The Moser--Tardos algorithm repeatedly |
| 11 | resamples a currently true bad event. Besides the bad events, we may observe |
| 12 | any other event determined by the same variables. This file defines the |
| 13 | bad-event restriction of the event family, the dependency neighborhood |
| 14 | , the event that is true at some stage of the algorithm, and |
| 15 | the event that is true in its final output. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped ENNReal |
| 21 | |
| 22 | namespace Lax41.HaeuplerSahaSrinivasanDefinitions |
| 23 | |
| 24 | open Lax41.MoserTardosDefinitions |
| 25 | |
| 26 | variable {Event : Type} [Fintype Event] [DecidableEq Event] |
| 27 | variable {Variable : Type} [Fintype Variable] [DecidableEq Variable] |
| 28 | variable (Value : Variable → Type) [∀ i, MeasurableSpace (Value i)] |
| 29 | |
| 30 | /-- An event belonging to the finite family on which the algorithm runs. -/ |
| 31 | abbrev BadEventIndex (badEvents : Finset Event) := {A // A ∈ badEvents} |
| 32 | |
| 33 | /-- The variables determining a bad event. -/ |
| 34 | def badEventVariables (badEvents : Finset Event) |
| 35 | (variablesOf : Event → Finset Variable) : |
| 36 | BadEventIndex badEvents → Finset Variable := |
| 37 | fun A ↦ variablesOf A.1 |
| 38 | |
| 39 | /-- The local set defining a bad event. -/ |
| 40 | def badEventSet (badEvents : Finset Event) |
| 41 | (variablesOf : Event → Finset Variable) |
| 42 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) : |
| 43 | ∀ A, Set (LocalAssignment Value (badEventVariables badEvents variablesOf A)) := |
| 44 | fun A ↦ event A.1 |
| 45 | |
| 46 | /-- |
| 47 | The bad events other than `B` that share at least one determining variable |
| 48 | with `B`. |
| 49 | -/ |
| 50 | def dependencyNeighborhood (badEvents : Finset Event) |
| 51 | (variablesOf : Event → Finset Variable) (B : Event) : |
| 52 | Finset (BadEventIndex badEvents) := |
| 53 | Finset.univ.filter fun A ↦ |
| 54 | A.1 ≠ B ∧ ¬Disjoint (variablesOf A.1) (variablesOf B) |
| 55 | |
| 56 | /-- The observed event `B` is true in the assignment at stage `n`. -/ |
| 57 | def eventOccursAt (badEvents : Finset Event) |
| 58 | (variablesOf : Event → Finset Variable) |
| 59 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 60 | (selectionRule : ResamplingRule Value |
| 61 | (badEventVariables badEvents variablesOf) |
| 62 | (badEventSet Value badEvents variablesOf event)) |
| 63 | (table : ResamplingTable Value) (B : Event) (n : Nat) : Prop := |
| 64 | violates Value variablesOf event |
| 65 | (currentAssignment Value table |
| 66 | (runCounts Value (badEventVariables badEvents variablesOf) |
| 67 | (badEventSet Value badEvents variablesOf event) selectionRule table n)) B |
| 68 | |
| 69 | /-- The set of sample tables on which `B` is true at least once. -/ |
| 70 | def eventEverOccurs (badEvents : Finset Event) |
| 71 | (variablesOf : Event → Finset Variable) |
| 72 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 73 | (selectionRule : ResamplingRule Value |
| 74 | (badEventVariables badEvents variablesOf) |
| 75 | (badEventSet Value badEvents variablesOf event)) |
| 76 | (B : Event) : Set (ResamplingTable Value) := |
| 77 | {table | ∃ n, eventOccursAt Value badEvents variablesOf event selectionRule table B n} |
| 78 | |
| 79 | /-- |
| 80 | The first stage at which the algorithm has terminated. On a nonterminating |
| 81 | table it is set to zero; under the local-lemma hypotheses that exceptional set |
| 82 | has probability zero. |
| 83 | -/ |
| 84 | noncomputable def outputTime (badEvents : Finset Event) |
| 85 | (variablesOf : Event → Finset Variable) |
| 86 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 87 | (selectionRule : ResamplingRule Value |
| 88 | (badEventVariables badEvents variablesOf) |
| 89 | (badEventSet Value badEvents variablesOf event)) |
| 90 | (table : ResamplingTable Value) : Nat := by |
| 91 | classical |
| 92 | exact if h : ∃ n, resamplingLog Value (badEventVariables badEvents variablesOf) |
| 93 | (badEventSet Value badEvents variablesOf event) selectionRule table n = none |
| 94 | then Nat.find h |
| 95 | else 0 |
| 96 | |
| 97 | /-- The assignment returned when the resampling algorithm terminates. -/ |
| 98 | noncomputable def outputAssignment (badEvents : Finset Event) |
| 99 | (variablesOf : Event → Finset Variable) |
| 100 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 101 | (selectionRule : ResamplingRule Value |
| 102 | (badEventVariables badEvents variablesOf) |
| 103 | (badEventSet Value badEvents variablesOf event)) |
| 104 | (table : ResamplingTable Value) : Assignment Value := |
| 105 | currentAssignment Value table |
| 106 | (runCounts Value (badEventVariables badEvents variablesOf) |
| 107 | (badEventSet Value badEvents variablesOf event) selectionRule table |
| 108 | (outputTime Value badEvents variablesOf event selectionRule table)) |
| 109 | |
| 110 | /-- The set of sample tables whose output assignment makes `B` true. -/ |
| 111 | noncomputable def eventOccursInOutput (badEvents : Finset Event) |
| 112 | (variablesOf : Event → Finset Variable) |
| 113 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 114 | (selectionRule : ResamplingRule Value |
| 115 | (badEventVariables badEvents variablesOf) |
| 116 | (badEventSet Value badEvents variablesOf event)) |
| 117 | (B : Event) : Set (ResamplingTable Value) := |
| 118 | {table | violates Value variablesOf event |
| 119 | (outputAssignment Value badEvents variablesOf event selectionRule table) B} |
| 120 | |
| 121 | /-- The probability that `B` is true at least once during the algorithm. -/ |
| 122 | noncomputable def probabilityEventEverOccurs |
| 123 | (distribution : ∀ i, MeasureTheory.Measure (Value i)) |
| 124 | (badEvents : Finset Event) (variablesOf : Event → Finset Variable) |
| 125 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 126 | (selectionRule : ResamplingRule Value |
| 127 | (badEventVariables badEvents variablesOf) |
| 128 | (badEventSet Value badEvents variablesOf event)) |
| 129 | (B : Event) : ℝ≥0∞ := |
| 130 | tableMeasure Value distribution |
| 131 | (eventEverOccurs Value badEvents variablesOf event selectionRule B) |
| 132 | |
| 133 | /-- The probability that `B` is true in the algorithm's output. -/ |
| 134 | noncomputable def probabilityEventInOutput |
| 135 | (distribution : ∀ i, MeasureTheory.Measure (Value i)) |
| 136 | (badEvents : Finset Event) (variablesOf : Event → Finset Variable) |
| 137 | (event : ∀ A, Set (LocalAssignment Value (variablesOf A))) |
| 138 | (selectionRule : ResamplingRule Value |
| 139 | (badEventVariables badEvents variablesOf) |
| 140 | (badEventSet Value badEvents variablesOf event)) |
| 141 | (B : Event) : ℝ≥0∞ := |
| 142 | tableMeasure Value distribution |
| 143 | (eventOccursInOutput Value badEvents variablesOf event selectionRule B) |
| 144 | |
| 145 | end Lax41.HaeuplerSahaSrinivasanDefinitions |
| 146 |
Builds on
From Mathlib
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments