Provedcertified-residual-attentionrejectionsnapshotexceptional-set
Exact exceptional-set rejection: normalized envelope, accepted law, and geometric expected trials
For all , , and , if , , and (given , and ), then
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - Fintype
- Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fintype) - f(x)Function application
- Fintype applied to J. Lean writes f x; papers write f(x). (
Fintype J) - Nonempty
- Nonempty: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Nonempty) - DecidableEq
- DecidableEq: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
DecidableEq) - ⟹Implies
- If J, then ℝ. (Between types, A → B is the type of functions from A to B.) (
J → ℝ) - x : TVariables
- a, b range over J → ℝ: the statement must hold for every choice. (
(a b : J → ℝ)) - Finset
- Finset: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 < a j) - (x : T)Type ascription
- let(m) read as a J → ℝ. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(let m : J → ℝ) - let
- let: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
let) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - <Less than
- 0 is strictly smaller than a(j). (
0 < a j) - ∉Not an element of
- j is not a member of O. (
j ∉ O) - ≤At most
- b(j) is less than or equal to B · a(j). (
b j ≤ B * a j) - ·Multiplication
- B times a(j). (
B * a j)
theorem cra-exceptional-set-rejection-sampler {J : Type} [Fintype J] [Nonempty J] [DecidableEq J] (a b : J → ℝ) (O : Finset J) (B : ℝ) (ha : ∀ j, 0 < a j) (hb : ∀ j, 0 < b j) (hB : 0 < B) (hdom : ∀ j, j ∉ O → b j ≤ B * a j) :
(let m : J → ℝ := fun j => if j ∈ O then b j else B * a j
let M : ℝ := ∑ j, m j
let Z : ℝ := ∑ j, b j
let p : ℝ := Z / M
(∀ j, 0 < m j ∧ b j ≤ m j) ∧ (0 < M) ∧ (0 < Z) ∧
(M = B * ((∑ j, a j) - ∑ j ∈ O, a j) + ∑ j ∈ O, b j) ∧
(∑ j, m j / M = 1) ∧
(∀ j, 0 < b j / m j ∧ b j / m j ≤ 1) ∧
(∑ j, (m j / M) * (b j / m j) = p) ∧ (0 < p ∧ p ≤ 1) ∧
(∀ j, ((m j / M) * (b j / m j)) / p = b j / Z) ∧
(∑' k : ℕ, ((k : ℝ) + 1) * p * (1 - p) ^ k = M / Z))Construct m_j=b_j on an explicit exceptional set O and m_j=Ba_j elsewhere, assuming only b_j≤Ba_j outside O. Prove the envelope total, valid proposal and acceptance probabilities, exact accepted target b/sum b, and expected geometric trial count sum(k+1)p(1-p)^k=M/Z. Unlike an additive overflow read allowance with a global drift assumption, O participates in the sampler itself. Discovering O, maintaining the tree, and vector/transfer costs are not part of this probability theorem.
How it was proved
- Proved
- 5 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 81 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.