Alphabeta Math
Pipeline-generated
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.

✓ 3 results · all verified · 3 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs; all 3 also cleared it.

Rejection sampling

1 · Prerequisites

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 Zf/(cZg) and target density f~/Zf. 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

AlgorithmAlgorithm: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Rejection sampling

Definition

Let (S,S,μ) be a measure space. The nonnegative measurable functions f~,g~:S→[0,∞) are the target and proposal shapes, with Zf:=∫Sf~ dμ∈(0,∞),Zg:=∫Sg~ dμ∈(0,∞). The normalized densities fˉ:=f~/Zf and gˉ:=g~/Zg 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 f relative to μ and Probability measures and probability spaces: F(A):=Zf−1∫Af~ dμ,G(A):=Zg−1∫Ag~ dμ(A∈S). Assume a finite c>0 satisfies f~≤cg~ outside a common μ-null set. Use finite-valued representatives; values on that null set do not affect F or G.

The stochastic input is an ideal sequence of independent proposal draws Yi with common law G and independent auxiliary draws Ui with common law Λ, where Λ is the uniform probability law on (0,1): Λ(U≤t)=t for 0≤t≤1. The two sequences are independent, so the pairs (Yi,Ui) 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 a(y):={0,g~(y)=0,min⁡ ⁣{1,f~(y)cg~(y)},g~(y)>0. It is measurable. The reciprocal extension h:[0,∞)→[0,∞), h(t)=1/t for t>0 and h(0)=0, is Borel: for every real r, its strict upper level set is [0,∞) if r<0, (0,∞) if r=0, and (0,1/r) if r>0. These are Borel sets in the subspace [0,∞) 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, a(y)=min⁡{1,f~(y)h(g~(y))/c}. 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 g~(y)>0, this is exactly f~(y)/(cg~(y)); where g~(y)=0, a(y)=0. At an exceptional point with g~(y)>0 where the quotient exceeds 1, replacing it by 1 does not change the test Ui≤f~(y)/(cg~(y)), since Ui∈(0,1).

Procedure. For i=1,2,…, draw (Yi,Ui). If Ui≤a(Yi), return Yi and stop; otherwise continue to the next pair. When f~=f and g~=g are normalized densities, integrating f≤cg gives c≥1, and the rule is the usual threshold f(Yi)/(cg(Yi)).

TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Counting-measure integration is a nonnegative series

Statement

Let N={0,1,2,…} and let # be counting measure on (N,P(N)) (Counting measure on an arbitrary set, Counting measure is a measure). For every measurable f:N→[0,+∞], ∫Nf d#=∑n=0∞f(n), where the right side is the nonnegative extended series of Series in the nonnegative extended real line.

Facts & Assumptions

Given: A measurable function f:N→[0,+∞] and counting measure # on the power set of N.

[F1]

Counting measure on an arbitrary set and Counting measure is a measure: # is a measure on P(N) and every singleton has measure one.

[F2]

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.

[F3]

Monotone convergence for the integral: if nonnegative measurable functions increase pointwise to f, then their integrals increase to ∫f d#.

[F4]

Series in the nonnegative extended real line: the nonnegative series is the supremum of its finite partial sums Pr:=∑n<rf(n).

[F5]

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 x some canonical natural is greater than x.

Proof

Given: The function and counting measure in the Statement.

1.1F1F2F3F5givenconstruct

For each integer m≥1, define sm(n)=min⁡{f(n),m} when n<m and sm(n)=0 when n≥m. Every subset of N is measurable under [F1], so sm is measurable; its range is finite, hence it is simple by [F2]. For fixed n, the indicator 1n<m is eventually one; if f(n)<+∞, [F5] ensures the increasing canonical naturals eventually exceed f(n), while if f(n)=+∞ the capped values increase without bound. Thus sm(n)↑f(n) for every n. Monotone convergence [F3] gives ∫f d#=lim⁡m→∞∫sm d#.

2.1F1F2F4step 1.1algebra

By [F1] and [F2], for every m≥1, ∫sm d#=∑n<mmin⁡{f(n),m} #({n})=∑n<mmin⁡{f(n),m}=:Dm. For each n<m, min⁡{f(n),m}≤min⁡{f(n),m+1} and Dm+1 adds a nonnegative term, so Dm is nondecreasing. Termwise min⁡{f(n),m}≤f(n), so Dm≤Pm≤∑n=0∞f(n) by [F4].

3.1F4F5step 2.1algebrachoose

Fix r≥0. If Pr=+∞, some f(n)=+∞ with n<r, so for every m≥r with m>n, Dm≥m; the canonical naturals are unbounded by [F5], hence lim⁡mDm=+∞≥Pr. If Pr<+∞, then each f(n) for n<r is finite. Write rˉ=r⋅1R and apply [F5] to Pr+rˉ to choose an integer m with m⋅1R>Pr+rˉ. Then m≥r and m>f(n) for every n<r, since nonnegative summands give f(n)≤Pr. Thus Dm≥Pr, and monotonicity of Dm again gives lim⁡mDm≥Pr. Since this holds for every r, [F4] implies lim⁡mDm≥∑n=0∞f(n). Together with step 2.1's reverse bound, lim⁡mDm=∑n=0∞f(n).

4.1step 1.1step 2.1step 3.1∎

Steps 1.1 and 2.1 identify the integral with lim⁡mDm, and step 3.1 identifies that limit with the nonnegative extended series. This proves the stated identity, including infinite values.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

Rejection sampling has the target acceptance law

Statement

Let (S,S,μ) be a measure space and let f~,g~:S→[0,∞] be measurable with 0<Zf:=∫f~ dμ<∞ and 0<Zg:=∫g~ dμ<∞. Suppose c>0 is finite and f~≤cg~ μ-almost everywhere. Apply Rejection sampling with proposal law G(A)=Zg−1∫Ag~ dμ. If N is the first accepted proposal, then N<∞ almost surely, the per-proposal acceptance probability is p=ZfcZg, and for every A∈S, P(YN∈A)=1Zf∫Af~ dμ. Thus the accepted law has density f~/Zf. In the normalized case Zf=Zg=1, this gives acceptance probability 1/c and accepted density f; necessarily c≥1.

Facts & Assumptions

Given: The measure space, nonnegative measurable shapes, positive finite normalizers, a finite envelope constant, and the ideal independent draws in Rejection sampling.

[A1]

The common envelope holds outside a measurable μ-null set. The algorithm's ratio is defined to be zero where g~=0.

[F1]

Rejection sampling and Identical distribution and IID families: the proposal draws have law G, the auxiliary draws have the uniform law on (0,1), and the two IID sequences are independent.

[F2]

The measure with density f relative to μ and Probability measures and probability spaces: a nonnegative measurable density h defines the measure A↦∫Ah dμ; if its total mass is Z∈(0,∞), division by Z gives a probability measure.

[F3]

A nonnegative measurable function with finite integral is finite almost everywhere: finite nonnegative integral implies the function is finite almost everywhere.

[F4]

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.

[F5]

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.

[F6]

Independent random elements have product joint law: independent random elements have joint law equal to the product of their marginal laws.

[F7]

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.

[F8]

Integrating against a density agrees with integrating the product: if ν=h dμ, then ∫q dν=∫qh dμ for every nonnegative measurable q.

[F9]

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 S×(0,1) are measurable, and {(y,u):y∈A, u≤a(y)} is a measurable threshold set.

[F10]

Monotonicity and nonnegative homogeneity of the nonnegative integral: pointwise order of nonnegative functions implies the same order of their integrals.

[F11]

Measures on sigma-algebras: a measure is countably additive on disjoint measurable sequences.

[F13]

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.

1.1A1F3F4F9F11F13givenconstruct

By [F3], both shapes are finite outside null sets. Let E0 be the measurable null union of those sets and the envelope exception from [A1]. For any nonnegative measurable h supported on E0, every simple minorant has all its positive level sets contained in E0, so its simple integral is zero; hence ∫h dμ=0 by [F4]. For either shape h and any measurable A, the decomposition h1A=h1A∖E0+h1A∩E0 and additivity [F4] therefore give ∫Ah dμ=∫Ah1S∖E0 dμ. Products here use 0⋅∞=0, and are measurable by [F9]. Replace each shape by h1S∖E0; neither density measure nor any displayed integral changes. In particular G(E0)=0. By [F13] and countable additivity [F11], the probability that any proposal hits E0 is zero; changing the acceptance rule there leaves the output law unchanged. The new shapes are finite and satisfy f~≤cg~ everywhere, so g~=0 implies f~=0.

1.2F1F5F6F9F13given

Fix A∈S and let Q(A):=P(Y1∈A, U1≤a(Y1)). By [F9] the event is measurable. By [F1] and [F6] the joint law of (Y1,U1) is G⊗Λ. Hence [F5] and [F13] give Q(A)=∫S×(0,1)1A(y)1{u≤a(y)} (G⊗Λ)(d(y,u)).

2.1step 1.2F7F1

Tonelli [F7] evaluates the last integral as Q(A)=∫AΛ((0,a(y)]) G(dy)=∫Aa(y) G(dy), including a(y)=0 and a(y)=1, since Λ((0,t])=t on [0,1].

3.1step 2.1F2F8step 1.1algebra

Apply [F8] to the proposal density g~/Zg and the measurable function 1Aa. Where g~>0, the envelope makes a=f~/(cg~); where g~=0, [step 1.1] gives f~=0. Therefore Q(A)=1Zg∫Aag~ dμ=1cZg∫Af~ dμ.

4.1step 3.1F10A1algebra

Taking A=S in step 3.1 gives p=Q(S)=Zf/(cZg)>0. Integrating the pointwise envelope and using [F10] gives Zf≤cZg, so p≤1. For normalized densities, Zf=Zg=1, hence p=1/c and c≥1.

5.1step 4.1F1F12

Put q=1−p. Independence of the proposal-uniform pairs [F1] gives P(N>m)=qm for every m≥1. Since 0≤q<1, [F12] gives qm→0; the event {N=∞} is contained in every {N>m}, so P(N=∞)=0.

6.1step 2.1step 4.1step 5.1F1F11F12algebra∎

For each k≥1, independence across trials gives P(N=k, Yk∈A)=qk−1Q(A). These events are disjoint, so countable additivity [F11] and the geometric series [F12] yield P(the algorithm outputs a value in A)=∑k=1∞qk−1Q(A)=Q(A)p=1Zf∫Af~ dμ. The almost-sure termination in step 5.1 makes this the full output law.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (gpt-6-luna)Open item page →

Expected proposal count under a finite rejection envelope

Statement

In the setup of Rejection sampling has the target acceptance law, let N be the number of proposals through and including the first accepted proposal. With p=Zf/(cZg) and q=1−p, for every integer k≥1, P(N=k)=qk−1p,E[N]=1p=cZgZf. Thus N is geometric on {1,2,…}. For normalized target and proposal densities, E[N]=c.

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.

[F1]

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.

[F2]

Rejection sampling has the target acceptance law: each proposal is accepted with probability p=Zf/(cZg)∈(0,1].

[F3]

Expectation of a nonnegative or integrable random variable: the expectation of a nonnegative random variable is its extended integral.

[F4]

Additivity of the nonnegative Lebesgue integral: the integral of a finite sum of nonnegative measurable functions is the sum of their integrals.

[F5]

Monotone convergence for the integral: increasing nonnegative measurable truncations converge in integral to their pointwise limit.

[F6]

For ∣r∣<1, ∑k≥0rk=1/(1−r), and for ∣r∣≥1 the series diverges: for 0≤q<1, ∑j=0∞qj=1/(1−q), including q=0 with q0=1.

Proof

Given: The setup in the Statement.

1.1F1F2givenalgebra

Let Ai be the event that proposal i 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 Ai are IID. By [F2], P(Ai)=p for every i. Therefore P(N>m)=qm for m≥0, and P(N=k)=P(A1c∩⋯∩Ak−1c∩Ak)=qk−1p for each k≥1.

2.1F3F4step 1.1algebra

For each m≥1, the pointwise identity N∧m=∑j=1m1{N≥j} holds, including on the null event N=∞. By [F3], [F4], and step 1.1, E[N∧m]=∑j=1mP(N≥j)=∑j=0m−1qj.

3.1F5F6step 2.1algebra

The truncations N∧m increase pointwise to N. By [F5] and then [F6], E[N]=lim⁡m→∞E[N∧m]=∑j=0∞qj=11−q=1p. This is finite because p>0.

4.1F2step 3.1algebra∎

Substituting p=Zf/(cZg) from [F2] gives E[N]=cZg/Zf; when Zf=Zg=1, this is c.

5 · Examples, counterexamples and false statements

None yet.

Sources