How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Rejection sampling
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Independence Borel Cantelli and Zero One Laws
- limsup, liminf, and Subsequential Limits
- Measurable Functions and Simple Approximation
- Measures and Their Basic Properties
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Order, Zorn's Lemma, and the Axiom of Choice
- Pointwise Extended-Real Function Products
- Polynomial Rings, the Division Algorithm and Roots
- Probability Spaces Random Variables and Expectation
- Product Measures and the Fubini Tonelli Theorems
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Series: Convergence and the Nonnegative Tests
- Sigma Algebras and Borel Sets
- Simple Field Extensions and the Construction of the Complex Numbers
- Suprema and Infima
- The Lebesgue Integral and the Convergence Theorems
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Weak Laws and Series of Independent Random Variables
2 · Summary
Scope
Rejection sampling draws proposals from a normalized proposal law and accepts each proposal according to a target-to-proposal density ratio bounded by a finite envelope. The algorithm takes ideal independent proposal and uniform draws as inputs. The local results compute the accepted subdensity, normalize it to obtain the target law, and determine both the acceptance probability and expected number of proposals.
The same calculation covers nonnegative unnormalized target and proposal shapes with positive finite normalizers. A local counting-measure result identifies the discrete integral with the nonnegative series, supporting the tail-mismatch example. Rejection sampling gives acceptance probability and target density . A finite envelope is essential: a proposal with lighter tails can fail to dominate the target by every finite constant. The declared prerequisite page iid-monte-carlo-integration-and-error remains an ordering dependency; the algorithm's exact IID draw interface is stated locally.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Rejection sampling
Definition
Let be a measure space. The nonnegative measurable functions are the target and proposal shapes, with The normalized densities and are measurable by closure under scalar multiplication (Arithmetic and lattice operations preserve measurability whenever they are defined). Their integrals are one by homogeneity of the nonnegative integral (Monotonicity and nonnegative homogeneity of the nonnegative integral). Thus their density measures are probability laws by The measure with density relative to and Probability measures and probability spaces: Assume a finite satisfies outside a common -null set. Use finite-valued representatives; values on that null set do not affect or .
The stochastic input is an ideal sequence of independent proposal draws with common law and independent auxiliary draws with common law , where is the uniform probability law on : for . The two sequences are independent, so the pairs are IID in the sense of Identical distribution and IID families. This contract assumes exact draws; it makes no claim about a finite-precision pseudorandom generator.
Define the measurable acceptance function It is measurable. The reciprocal extension , for and , is Borel: for every real , its strict upper level set is if , if , and if . These are Borel sets in the subspace by The Borel sigma-algebra of a topological space, so the threshold characterization Threshold characterisations of real-valued and extended-real-valued measurability applies. Equivalently, . Arithmetic operations and Borel composition preserve measurability by Arithmetic and lattice operations preserve measurability whenever they are defined and Composition with a Borel measurable outer map preserves measurability. Where the envelope holds and , this is exactly ; where , . At an exceptional point with where the quotient exceeds , replacing it by does not change the test , since .
Procedure. For , draw . If , return and stop; otherwise continue to the next pair. When and are normalized densities, integrating gives , and the rule is the usual threshold .
Counting-measure integration is a nonnegative series
Statement
Let and let be counting measure on (Counting measure on an arbitrary set, Counting measure is a measure). For every measurable , where the right side is the nonnegative extended series of Series in the nonnegative extended real line.
Facts & Assumptions
Given: A measurable function and counting measure on the power set of .
Counting measure on an arbitrary set and Counting measure is a measure: is a measure on and every singleton has measure one.
Nonnegative simple measurable functions, The integral of a nonnegative simple function, and The nonnegative integral agrees with the simple integral on simple functions: a finite-range nonnegative measurable function is simple, its simple integral is the sum of its coefficients times the measures of the level sets, and this equals its nonnegative integral.
Monotone convergence for the integral: if nonnegative measurable functions increase pointwise to , then their integrals increase to
Series in the nonnegative extended real line: the nonnegative series is the supremum of its finite partial sums .
The Cauchy-sequence reals have the least-upper-bound property, The reals form a totally ordered field, Every complete ordered field is Archimedean, and Canonical naturals are positive and strictly increasing: the real numbers are a complete ordered field, their canonical naturals are strictly increasing, and for every finite real some canonical natural is greater than .
Proof
Given: The function and counting measure in the Statement.
For each integer , define when and when . Every subset of is measurable under [F1], so is measurable; its range is finite, hence it is simple by [F2]. For fixed , the indicator is eventually one; if , [F5] ensures the increasing canonical naturals eventually exceed , while if the capped values increase without bound. Thus for every . Monotone convergence [F3] gives .
By [F1] and [F2], for every , For each , and adds a nonnegative term, so is nondecreasing. Termwise , so by [F4].
Fix . If , some with , so for every with , ; the canonical naturals are unbounded by [F5], hence . If , then each for is finite. Write and apply [F5] to to choose an integer with . Then and for every , since nonnegative summands give . Thus , and monotonicity of again gives . Since this holds for every , [F4] implies . Together with step 2.1's reverse bound, .
Steps 1.1 and 2.1 identify the integral with , and step 3.1 identifies that limit with the nonnegative extended series. This proves the stated identity, including infinite values.
Rejection sampling has the target acceptance law
Statement
Let be a measure space and let be measurable with and . Suppose is finite and -almost everywhere. Apply Rejection sampling with proposal law . If is the first accepted proposal, then almost surely, the per-proposal acceptance probability is and for every , Thus the accepted law has density . In the normalized case , this gives acceptance probability and accepted density ; necessarily .
Facts & Assumptions
Given: The measure space, nonnegative measurable shapes, positive finite normalizers, a finite envelope constant, and the ideal independent draws in Rejection sampling.
The common envelope holds outside a measurable -null set. The algorithm's ratio is defined to be zero where .
Rejection sampling and Identical distribution and IID families: the proposal draws have law , the auxiliary draws have the uniform law on , and the two IID sequences are independent.
The measure with density relative to and Probability measures and probability spaces: a nonnegative measurable density defines the measure ; if its total mass is , division by gives a probability measure.
A nonnegative measurable function with finite integral is finite almost everywhere: finite nonnegative integral implies the function is finite almost everywhere.
The nonnegative Lebesgue integral and The integral of a nonnegative simple function define the nonnegative integral by simple minorants and the simple integral by level-set measures; Additivity of the nonnegative Lebesgue integral gives additivity for extended nonnegative measurable functions.
Expectation of a nonnegative or integrable random variable and Change of variables for expectation: the expectation of a nonnegative measurable indicator is its probability, and expectations of nonnegative measurable functions equal their integrals against the random element's law.
Independent random elements have product joint law: independent random elements have joint law equal to the product of their marginal laws.
Tonelli's theorem for nonnegative measurable functions on a sigma-finite product: a nonnegative product-measurable function on a product of probability spaces can be integrated in either order.
Integrating against a density agrees with integrating the product: if , then for every nonnegative measurable .
Rejection sampling, The product sigma-algebra and its finite iterates, Arithmetic and lattice operations preserve measurability whenever they are defined, Composition with a Borel measurable outer map preserves measurability, and Threshold characterisations of real-valued and extended-real-valued measurability: the algorithm proves its reciprocal extension Borel and its acceptance function measurable; the coordinate projections on are measurable, and is a measurable threshold set.
Monotonicity and nonnegative homogeneity of the nonnegative integral: pointwise order of nonnegative functions implies the same order of their integrals.
Measures on sigma-algebras: a measure is countably additive on disjoint measurable sequences.
For , , and for the series diverges gives for ; For the sequence is null, and for the sequence diverges to , claim 1, gives because , including .
Law or distribution of a random element: the law of a random element assigns to each measurable set the probability of its inverse image.
Proof
Given: The objects and hypotheses in the Statement.
By [F3], both shapes are finite outside null sets. Let be the measurable null union of those sets and the envelope exception from [A1]. For any nonnegative measurable supported on , every simple minorant has all its positive level sets contained in , so its simple integral is zero; hence by [F4]. For either shape and any measurable , the decomposition and additivity [F4] therefore give . Products here use , and are measurable by [F9]. Replace each shape by ; neither density measure nor any displayed integral changes. In particular . By [F13] and countable additivity [F11], the probability that any proposal hits is zero; changing the acceptance rule there leaves the output law unchanged. The new shapes are finite and satisfy everywhere, so implies .
Fix and let . By [F9] the event is measurable. By [F1] and [F6] the joint law of is . Hence [F5] and [F13] give
Tonelli [F7] evaluates the last integral as including and , since on .
Apply [F8] to the proposal density and the measurable function . Where , the envelope makes ; where , [step 1.1] gives . Therefore
Taking in step 3.1 gives . Integrating the pointwise envelope and using [F10] gives , so . For normalized densities, , hence and .
Put . Independence of the proposal-uniform pairs [F1] gives for every . Since , [F12] gives ; the event is contained in every , so .
For each , independence across trials gives These events are disjoint, so countable additivity [F11] and the geometric series [F12] yield The almost-sure termination in step 5.1 makes this the full output law.
Expected proposal count under a finite rejection envelope
Statement
In the setup of Rejection sampling has the target acceptance law, let be the number of proposals through and including the first accepted proposal. With and , for every integer , Thus is geometric on . For normalized target and proposal densities, .
Facts & Assumptions
Given: The envelope, normalizers, and ideal IID draw stream in Rejection sampling, with the acceptance probability established by Rejection sampling has the target acceptance law.
Rejection sampling and Identical distribution and IID families: the proposal and auxiliary draws are independent across trials and share their respective laws, so the acceptance events are IID.
Rejection sampling has the target acceptance law: each proposal is accepted with probability .
Expectation of a nonnegative or integrable random variable: the expectation of a nonnegative random variable is its extended integral.
Additivity of the nonnegative Lebesgue integral: the integral of a finite sum of nonnegative measurable functions is the sum of their integrals.
Monotone convergence for the integral: increasing nonnegative measurable truncations converge in integral to their pointwise limit.
For , , and for the series diverges: for , , including with .
Proof
Given: The setup in the Statement.
Let be the event that proposal is accepted. The algorithm uses the same measurable acceptance region for each IID proposal-uniform pair, so mutual independence and common distribution in [F1] imply that the events are IID. By [F2], for every . Therefore for , and for each .
For each , the pointwise identity holds, including on the null event . By [F3], [F4], and step 1.1,
The truncations increase pointwise to . By [F5] and then [F6], This is finite because .
Substituting from [F2] gives ; when , this is .
5 · Examples, counterexamples and false statements
None yet.