OAI/Computability/MaxCut/Games/Basic2.lean
81 declarations, 0 contain sorry, 0 declared as axioms
Finite prerequisites for Holenstein's consistent sampling argument (Lemma 5.2).
firstAccepted is an actual bounded rejection sampler on a shared finite list
of proposals. first_union_common proves its synchronization property.
The remaining theorems establish the exact overlap/union mass formulas and the
agreement lower bound used to analyze a first accepted shared proposal.
No infinite random process or locally computable embedding is asserted here.
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstAcceptedline 24Source documentation
Return the first proposal accepted by the given test, or report exhaustion.
def firstAccepted {σ : Type*} (accept : σ → Bool) : List σ → Option σ | [] => none | proposal :: rest => if accept proposal then some proposal else firstAccepted accept rest /-- If the first proposal accepted by either sampler is accepted by both, the two samplers return exactly that same proposal. -/ - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.first_union_commonline 31Source documentation
If the first proposal accepted by either sampler is accepted by both, the two samplers return exactly that same proposal.
theorem first_union_common {σ : Type*} (left right : σ → Bool) (proposals : List σ) (proposal : σ) (hfirst : firstAccepted (fun s => left s || right s) proposals = some proposal) (hleft : left proposal = true) (hright : right proposal = true) : firstAccepted left proposals = some proposal ∧ firstAccepted right proposals = some proposal := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.firstAccepted
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.thresholdSampleline 56Source documentation
Finite integer-threshold rejection sampling. A mass table can be sampled using shared proposals
(label, height)drawn from a finite rectangle.def thresholdSample {α : Type*} (mass : α → Nat) (proposals : List (α × Nat)) : Option α := … - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.thresholdSample_agreementline 60 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariationline 79Source documentation
Total variation for real-valued finite mass functions. Distribution normalization is supplied explicitly in theorems that need it.
def totalVariation (p q : α → ℝ) : ℝ := (∑ a, |p a - q a|) / 2
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMassline 81 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMassline 83 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation_nonnegline 85 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass_nonnegline 89 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.min_abs_identity_inline_Basicline 93 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.max_abs_identity_inline_Basicline 100 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass_eqline 108Source documentation
The overlap of two probability masses is exactly one minus their TV.
theorem overlapMass_eq (p q : α → ℝ) (hp : ∑ a, p a = 1) (hq : ∑ a, q a = 1) : overlapMass p q = 1 - totalVariation p q := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMass_eqline 117Source documentation
The union of two probability masses is exactly one plus their TV.
theorem unionMass_eq (p q : α → ℝ) (hp : ∑ a, p a = 1) (hq : ∑ a, q a = 1) : unionMass p q = 1 + totalVariation p q := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation_le_oneline 125 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.overlap_union_ratioline 133Source documentation
The first-union-point agreement ratio appearing in Holenstein Lemma 5.2.
theorem overlap_union_ratio (p q : α → ℝ) (hp : ∑ a, p a = 1) (hq : ∑ a, q a = 1) : overlapMass p q / unionMass p q = (1 - totalVariation p q) / (1 + totalVariation p q) := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.overlap_union_ratio_lower_boundline 141Source documentation
Exact algebra behind the linear agreement estimate. This is a proved bound on the overlap/union ratio, not an assumed sampler law.
theorem overlap_union_ratio_lower_bound (p q : α → ℝ) (hp : ∑ a, p a = 1) (hq : ∑ a, q a = 1) : 1 - 2 * totalVariation p q ≤ overlapMass p q / unionMass p q := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation, OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMass
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.first_union_disagreement_upper_boundline 152Source documentation
Equivalent upper bound on the probability of the first union point belonging to just one density.
theorem first_union_disagreement_upper_bound (p q : α → ℝ) (hp : ∑ a, p a = 1) (hq : ∑ a, q a = 1) : 1 - overlapMass p q / unionMass p q ≤ 2 * totalVariation p q := by …Mentions: OAI.MaxCutGames.Foundations.CorrelatedSampling.overlapMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.unionMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.totalVariation
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.eventMassline 173 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.eventMass_nonnegline 176 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.eventMass_complementline 182 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.geometricMassline 194 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.geometricMass_nonnegline 198 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.geometricMass_identityline 204 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeightline 218Source 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.MaxCutGames.Foundations.CorrelatedSampling.eventMass
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeight_nonnegline 226 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeight_noneline 240 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeight_someline 246 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeight_normalizedline 256 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMassline 272Source 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.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass_eqline 275 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass_exactline 289Source 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.MaxCutGames.Foundations.CorrelatedSampling.eventMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.commonMass_le_acceptMassline 305 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass_lower_boundline 315Source 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.MaxCutGames.Foundations.CorrelatedSampling.eventMass, OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.traceAverageline 337Source 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.MaxCutGames.Foundations.CorrelatedSampling.traceAverage_constline 341 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.traceAverage_monoline 347 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.traceAverage_sumline 359 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.firstAccepted_lawline 373Source 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.MaxCutGames.Foundations.CorrelatedSampling.traceAverage, OAI.MaxCutGames.Foundations.CorrelatedSampling.firstAccepted, OAI.MaxCutGames.Foundations.CorrelatedSampling.firstHitWeight
- def
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstIndicatorline 420Source documentation
Indicator of the first accepted proposal passing a second test.
def goodFirstIndicator (accept good : σ → Bool) (proposals : List σ) : ℝ := …
- theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstIndicator_expansionline 425 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstIndicator_lawline 442Source 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.MaxCutGames.Foundations.CorrelatedSampling.traceAverage, OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstIndicator, OAI.MaxCutGames.Foundations.CorrelatedSampling.goodFirstMass
- structure
OAI.MaxCutGames.Foundations.CorrelatedSampling.ThresholdIntervalline 462 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitPointline 467 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitLeftline 469 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitRightline 472 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.cutAtline 475 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.intervalCDFline 477 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.split_cdfline 479 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.accepted_interval_massline 484 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitLeft_cutline 492 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitRight_cutline 497 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitLeft_preserves_cutline 505 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitRight_preserves_cutline 511 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitAllline 517 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.unitThresholdIntervalline 521 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.thresholdPartitionline 523 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.sumOnIntervalsline 527 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.sumOn_splitAllline 531 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.partition_sumline 541 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.partition_total_massline 550 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.partition_cdfline 556 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitAll_new_cutsline 561 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.splitAll_preserves_cutsline 573 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.partition_cutsline 587 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.sumOnIntervals_congrline 597 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.partition_acceptance_massline 607 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.sum_interval_getline 617 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.sum_div_const_inline_Rectangleline 630 - abbrev
OAI.MaxCutGames.Foundations.CorrelatedSampling.RectangleSeedline 634 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangleWeightline 637 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangleAcceptline 641 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangleWeight_nonnegativeline 645 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangleWeight_normalizedline 649 - def
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangleDistributionline 660 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangle_row_massline 666 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangle_acceptance_massline 683 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangle_label_massline 693 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.min_mem_thresholdsline 722 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.max_mem_thresholdsline 726 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangle_union_massline 730 - theorem
OAI.MaxCutGames.Foundations.CorrelatedSampling.rectangle_common_label_massline 742