OAI/Computability/UniqueGames/Foundations/FiniteTrialsLemmas.lean
83 declarations, 0 contain sorry, 0 declared as axioms
Exact finite probability mass of a bounded rejection process.
Each trial independently draws from a finite mass function w. Its first
accepted proposal is represented by some proposal; exhaustion is none.
The recursive definition exposes the one-step probability transition. We prove
normalization, nonnegativity, the exact survival probability, and an exact
agreement-event formula with the finite-truncation error.
- def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMassline 31 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMass_nonnegline 34 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMass_complementline 40 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.geometricMassline 52 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.geometricMass_nonnegline 56 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.geometricMass_identityline 62 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeightline 76Source documentation
Probability transition for a finite first-acceptance process. A successful first trial contributes its own mass; a rejected first trial continues with one fewer trial.
def firstHitWeight (w : σ → ℝ) (accept : σ → Bool) : Nat → Option σ → ℝ | 0, none => 1 | 0, some _ => 0 | n + 1, none => eventMass w (fun s => !(accept s)) * firstHitWeight w accept n none | n + 1, some s => (if accept s then w s else 0) + eventMass w (fun s => !(accept s)) * firstHitWeight w accept n (some s)Mentions: OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMass
- theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeight_nonnegline 84 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeight_noneline 98 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeight_someline 104 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeight_normalizedline 114 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMassline 130Source documentation
Probability that the first accepted proposal satisfies an additional test. For two threshold samplers, take
accept = left || rightandgood = left && right.first_union_commongives deterministic agreement on this event.def goodFirstMass (w : σ → ℝ) (accept good : σ → Bool) (n : Nat) : ℝ := …
- theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass_eqline 133 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass_exactline 147Source documentation
Exact finite geometric law: the first accepted proposal lies in the good part with probability (good accepted mass / total accepted mass) times the probability of seeing any accepted proposal within the trial bound.
theorem goodFirstMass_exact (w : σ → ℝ) (accept good : σ → Bool) (hw : ∑ s, w s = 1) (ha : eventMass w accept ≠ 0) (n : Nat) : goodFirstMass w accept good n = eventMass w (fun s => accept s && good s) / eventMass w accept * (1 - eventMass w (fun s => !(accept s)) ^ n) := by …Mentions: OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMass, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass
- theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.commonMass_le_acceptMassline 163 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass_lower_boundline 173Source documentation
A finite truncation loses at most its exhaustion probability in addition to the conditional bad-first-proposal probability. All quantities are exact finite sums; the rightmost term is the explicit geometric tail.
theorem goodFirstMass_lower_bound (w : σ → ℝ) (accept good : σ → Bool) (hw : ∀ s, 0 ≤ w s) (hw_sum : ∑ s, w s = 1) (ha : 0 < eventMass w accept) (n : Nat) : eventMass w (fun s => accept s && good s) / eventMass w accept - eventMass w (fun s => !(accept s)) ^ n ≤ goodFirstMass w accept good n := by …Mentions: OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.eventMass, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass
- structure
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.ThresholdIntervalline 202 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitPointline 207 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitLeftline 209 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitRightline 212 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.cutAtline 215 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.intervalCDFline 217 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.split_cdfline 219 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.accepted_interval_massline 224 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitLeft_cutline 232 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitRight_cutline 237 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitLeft_preserves_cutline 245 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitRight_preserves_cutline 251 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitAllline 257 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.unitThresholdIntervalline 261 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.thresholdPartitionline 263 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.sumOnIntervalsline 267 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.sumOn_splitAllline 271 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.partition_sumline 281 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.partition_total_massline 290 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.partition_cdfline 296 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitAll_new_cutsline 301 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.splitAll_preserves_cutsline 313 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.partition_cutsline 327 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.sumOnIntervals_congrline 337 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.partition_acceptance_massline 347 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.sum_interval_getline 357 - def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverageline 387Source documentation
Expectation over a length-n list of independent proposals with mass
w. This is defined directly as a finite nested weighted sum.def traceAverage (w : σ → ℝ) : Nat → (List σ → ℝ) → ℝ | 0, observable => observable [] | n + 1, observable => ∑ s, w s * traceAverage w n (fun tail => observable (s :: tail))
- theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverage_constline 391 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverage_monoline 397 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverage_sumline 409 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstAccepted_lawline 423Source documentation
The recursively constructed first-hit distribution is the actual law of the finite shared-list rejection sampler.
theorem firstAccepted_law (w : σ → ℝ) (accept : σ → Bool) (hw : ∑ s, w s = 1) (n : Nat) (output : Option σ) : traceAverage w n (fun proposals => if firstAccepted accept proposals = output then 1 else 0) = firstHitWeight w accept n output := by …Mentions: OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverage, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstAccepted, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.firstHitWeight
- def
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstIndicatorline 470Source documentation
Indicator of the first accepted proposal passing a second test.
def goodFirstIndicator (accept good : σ → Bool) (proposals : List σ) : ℝ := …
- theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstIndicator_expansionline 475 - theorem
OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstIndicator_lawline 492Source documentation
Exact good-event probability of the actual bounded sampler.
theorem goodFirstIndicator_law (w : σ → ℝ) (accept good : σ → Bool) (hw : ∑ s, w s = 1) (n : Nat) : traceAverage w n (goodFirstIndicator accept good) = goodFirstMass w accept good n := by …Mentions: OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.traceAverage, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstIndicator, OAI.UniqueGamesTheorem.Foundations.CorrelatedSampling.goodFirstMass
- structure
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistributionline 529 - def
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.expectationline 538 - def
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probabilityline 541 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_nonnegativeline 544 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_le_oneline 552 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_trueline 561 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_falseline 565 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_monoline 569 - def
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.pushforwardline 582Source documentation
Pushforward counts all preimages, including collisions.
def pushforward (μ : FiniteDistribution Ω) (f : Ω → Γ) : FiniteDistribution Γ := by …
Mentions: OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution
- theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_pushforwardline 594 - def
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.transportline 606 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_transportline 611 - def
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.iidline 618Source documentation
Independent repeated sampling, including the single empty tuple at n=0.
def iid (μ : FiniteDistribution Ω) (n : Nat) : FiniteDistribution (Fin n → Ω) where …
Mentions: OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution
- theorem
OAI.UniqueGamesTheorem.Foundations.Games.FiniteDistribution.probability_iid_allline 623 - abbrev
OAI.UniqueGamesTheorem.Foundations.Games.Strategyline 642 - structure
OAI.UniqueGamesTheorem.Foundations.Games.Gameline 644 - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.winsline 654 - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.successline 658 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.success_nonnegativeline 661 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.success_le_oneline 665 - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.simulatedStrategyline 672Source documentation
Local question reconstruction and answer decoding never expose the other player's question to a strategy. Any fixed advice is an ordinary fixed parameter of these functions.
def simulatedStrategy {R₁ R₂ B₁ B₂ : Type*} (questionMap₁ : Q₁ → R₁) (questionMap₂ : Q₂ → R₂) (answerMap₁ : Q₁ → B₁ → A₁) (answerMap₂ : Q₂ → B₂ → A₂) (strategy : Strategy R₁ R₂ B₁ B₂) : Strategy Q₁ Q₂ A₁ A₂ := … - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.success_le_of_localSimulationline 681Source documentation
An acceptance implication under an exact question-law pushforward gives an actual success-probability comparison for every pair of local strategies.
theorem success_le_of_localSimulation {R₁ R₂ B₁ B₂ : Type*} [Fintype R₁] [Fintype R₂] [Fintype B₁] [Fintype B₂] (G : Game Q₁ Q₂ A₁ A₂) (H : Game R₁ R₂ B₁ B₂) (questionMap₁ : Q₁ → R₁) (questionMap₂ : Q₂ → R₂) (answerMap₁ : Q₁ → B₁ → A₁) (answerMap₂ : Q₂ → B₂ → A₂) (questionLaw : H.questions = G.questions.pushforward (fun q => (questionMap₁ q.1, questionMap₂ q.2))) (acceptance : ∀ x y a b, H.accepts (questionMap₁ x) (questionMap₂ y) a b = true → G.accepts x y (answerMap₁ x a) (answerMap₂ y b) = true) (strategy : Strategy R₁ R₂ B₁ B₂) : H.success strategy ≤ …Mentions: OAI.UniqueGamesTheorem.Foundations.Games.Game, OAI.UniqueGamesTheorem.Foundations.Games.Strategy
- def
OAI.UniqueGamesTheorem.Foundations.Games.Game.tupleQuestionEquivline 700 - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.repetitionline 708Source documentation
Parallel repetition retains arbitrary dependence on each full local tuple.
def repetition (G : Game Q₁ Q₂ A₁ A₂) (n : Nat) : Game (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂) := by … - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.repeatStrategyline 717Source documentation
Playing a fixed base strategy separately in each coordinate is one permitted repeated strategy, though repeated strategies are more general.
def repeatStrategy (strategy : Strategy Q₁ Q₂ A₁ A₂) (n : Nat) : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂) := … - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.success_repeatStrategyline 721 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.repetition_question_weightline 729 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.repetition_accepts_iffline 734 - def
OAI.UniqueGamesTheorem.Foundations.Games.Game.coordinateWinline 742Source documentation
One coordinate's success may depend on the entire local question tuples.
def coordinateWin (G : Game Q₁ Q₂ A₁ A₂) {n : Nat} (strategy : Strategy (Fin n → Q₁) (Fin n → Q₂) (Fin n → A₁) (Fin n → A₂)) (coordinate : Fin n) (questions : (Fin n → Q₁) × (Fin n → Q₂)) : Bool := …Mentions: OAI.UniqueGamesTheorem.Foundations.Games.Game, OAI.UniqueGamesTheorem.Foundations.Games.Strategy
- def
OAI.UniqueGamesTheorem.Foundations.Games.Game.selectedWinsline 748 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.selectedWins_monoline 754 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.selectedWins_emptyline 765 - theorem
OAI.UniqueGamesTheorem.Foundations.Games.Game.selectedWins_univline 771