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 · 2 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. The 1 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Bagging and random forests

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

AlgorithmAlgorithm: AI-adaptedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Bagged random-forest construction on a fixed finite sample

Definition

Fix training data D=((xi,yi))i=1n with n≥1, features xi∈Rp with p≥1, and one response mode: regression with yi∈R, or classification with labels in a fixed ordered finite set C={c1<⋯<cJ}, J≥1. Choose a finite integer depth cap dmax⁡≥0, an integer tree count B≥1, and a feature count m∈{1,…,p}. Choosing m=p disables feature randomization.

For every tree index b∈{1,…,B}, draw n independent uniform indices Ib1,…,Ibn from {1,…,n} and put Nbi=∣{r:Ibr=i}∣. For every possible binary node address ν of depth less than dmax⁡, draw a subset Mb,ν uniformly from the m-element subsets of {1,…,p}. All bootstrap-index and feature-subset draws are mutually independent across trees, index positions, and node addresses. Write Θb=(Nb1,…,Nbn,(Mb,ν)ν); thus the Θb are independent with a common law conditional on the fixed data and chosen settings.

At a node with bootstrap position set I, define yˉI=∣I∣−1∑r∈IyIbr in regression. In classification define qIk=∣I∣−1∣{r∈I:yIbr=ck}∣ and choose one fixed impurity, either misclassification 1−max⁡kqIk, Gini 1−∑kqIk2, or entropy −∑kqIklog⁡qIk, with 0log⁡0=0.

For tree b, write the resampled rows as Db∗=((xIbr,yIbr))r=1n, so bootstrap positions remain distinct even when they contain the same original row. Build Tb from Db∗, starting at the root with position set I={1,…,n}. At a node of depth d<dmax⁡, form the candidate midpoint thresholds between consecutive distinct observed values using the coordinates in that node's set Mb,ν. A candidate at coordinate j and threshold t partitions the current bootstrap positions into IL={r∈I:xIbr,j≤t} and IR={r∈I:xIbr,j>t}; only candidates with both children nonempty are used. Score each candidate by ∑r∈IL(yIbr−yˉIL)2+∑r∈IR(yIbr−yˉIR)2 in regression or by ∣IL∣QIL+∣IR∣QIR in classification, where Q is the chosen impurity. Select a candidate of least score, breaking ties by coordinate index and then cut index, and recurse on its two children. If d=dmax⁡ or there is no candidate, make the node a leaf. When m=p, this is the greedy CART growth procedure on the bootstrap sample; when m<p, the same procedure restricts each node's candidate coordinates to its sampled subset. Each regression leaf predicts its sample mean; each classification leaf predicts its most frequent class, choosing the least class index in a tie. Define h(x,Θb) by following the unique tree path for x.

For regression, the finite-forest prediction is B−1∑b=1Bh(x,Θb). For classification, it is the class receiving the largest number of votes, with the least class index breaking ties. For a training observation i, let Oi={b:Nbi=0}. Its out-of-bag prediction is formed using only trees indexed by Oi, with the same regression average or classification vote rule; if Oi=∅, no out-of-bag prediction is returned. An out-of-bag prediction is a diagnostic computed from this finite forest, not an exact identity for its full-forest prediction or risk.

The data flow is shown below. The arrows mean that the same fixed D and the independent randomization vector determine each tree, and the stated aggregation combines the resulting predictions; the diagram records the procedure and is not a proof of a performance claim.

diagram failed to render:
\begin{tikzpicture}[>=stealth]
  \node[draw,rounded corners] (data) at (0,0) {fixed data $D$};
  \node[draw,rounded corners] (random) at (0,-1.2) {IID $\Theta_b$};
  \node[draw,rounded corners] (tree) at (3,-0.6) {$T_b(x)=h(x,\Theta_b)$};
  \node[draw,rounded corners] (aggregate) at (6,-0.6) {vote or average over $b=1,\ldots,B$};
  \draw[->] (data) -- (tree);
  \draw[->] (random) -- (tree);
  \draw[->] (tree) -- (aggregate);
\end{tikzpicture}
TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

Almost-sure limiting risk of an infinite random-forest classifier

Statement

Fix a finite training dataset and a classifier h(x,θ) taking values in an ordered finite class set C={c1<⋯<cJ} with J≥2. Let Θ1,Θ2,… be IID random elements of a measurable space (T,T) with common law Q. Regard the sequence as a random element of (TN,T⊗N) and assume it is independent of a test pair (X,Y) with law P on X×C. Assume h is jointly measurable in (x,θ). For j∈{1,…,J} define pj(x)=Q{θ:h(x,θ)=cj}, and let

m(x,y)=pk(x)−max⁡j≠kpj(x),y=ck.

For each B≥1, let GB(x) be the class with the largest number of votes among h(x,Θ1),…,h(x,ΘB), choosing the least class index in a tie. Define the finite-forest conditional risk by

PEB(Θ1:B)=∫X×C1{GB(x)≠y} dP(x,y).

If P{(x,y):m(x,y)=0}=0, then, almost surely with respect to the IID tree-randomization sequence,

PEB(Θ1:B)⟶P{(x,y):m(x,y)<0}.

Facts & Assumptions

Given: The fixed training data, measurable classifier and IID tree-randomization sequence, independent test pair, finite ordered class set, and zero-margin hypothesis in the Statement.

[F1]

Bagged random-forest construction on a fixed finite sample: Classification uses the class with the largest number of tree votes and the least class index for a tie.

[F2]

Identical distribution and IID families: IID means mutual independence together with identical laws; it includes no moment assumption.

[F3]

Measurable coordinatewise functions preserve independence: Applying the same measurable map to each member of an independent family preserves independence.

[F4]

Kolmogorov iid l1 strong law: For IID real random variables with finite first absolute moment, their sample averages converge almost surely to their common mean.

[F5]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

[F6]

Fubini's theorem for L^1 functions on a sigma-finite product: For an integrable function on a product of sigma-finite measure spaces, either order of iterated integration gives the product integral.

[F7]

Dominated convergence: Almost-everywhere convergence under a common integrable majorant implies convergence of the integrals.

[F8]

Expectation of a nonnegative or integrable random variable: Expectation on a probability space is integration against its probability measure.

Proof

1.1givenF2F3F4

Fix a test pair (x,y) outside the zero-margin set. For each class cj, the variables 1{h(x,Θb)=cj} are identically distributed because they use the same measurable map on randomizations with common law, independent by [F3], and integrable because they are bounded by 1. Applying [F4] to each of the finitely many classes shows that every vote proportion converges almost surely to pj(x).

2.1givenF1step 1.1algebra

On a sequence where those proportions converge, if m(x,y)>0, the true class has a strictly larger limiting vote proportion than each wrong class, so the finite forest eventually predicts y. If m(x,y)<0, a wrong class attaining the finite maximum in the definition of m has a strictly larger limiting proportion than y, so the finite forest eventually predicts a wrong class. Thus the finite-forest error indicator converges almost surely in the randomizations to 1{m(x,y)<0} for P-almost every test pair.

3.1givenF5F6step 2.1

The functions pj(x) are measurable by [F6] applied to the bounded jointly measurable indicators 1{h(x,θ)=cj}. Hence the error indicators and the limiting margin indicator are jointly measurable and bounded. Independence of the sequence-valued randomization and test pair lets [F5] give their product joint law. Applying [F6] to the indicator of the nonconvergence set and using step 2.1 shows that for almost every randomization sequence the error indicators converge for P-almost every test pair.

4.1F7F8step 3.1algebra∎

For each such sequence, the error indicators are dominated by the integrable constant 1 on the probability space (X×C,P). By [F7] their integrals converge to the integral of 1{m<0}, which by [F8] is P{m<0}. These integrals are exactly PEB(Θ1:B), proving the claimed limit.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

Breiman's random-forest strength–correlation error bound

Statement

Fix a finite training dataset and a classifier h(x,θ) taking values in an ordered finite class set C={c1<⋯<cJ} with J≥2. Assume h is jointly measurable on the product of the test-feature space and the randomization space. Let Z=(X,Y) be a test pair with Y∈C and test law P. Let Θ,Θ′ be independent randomizations with common law Q, and assume the pair (Θ,Θ′) is independent of Z. For j∈{1,…,J} define pj(x)=Q{θ:h(x,θ)=cj}. For y=ck, let j^(x,y) be the least index attaining max⁡j≠kpj(x), and define the limiting margin

m(x,y)=pk(x)−pj^(x,y)(x),s=EP[m(Z)].

Assume s>0. For a tree randomization θ, define the raw margin rθ(x,y)=1{h(x,θ)=y}−1{h(x,θ)=cj^(x,y)} and sd(θ)=Var⁡P(rθ(Z)). Put d=EQ[sd(Θ)]. If d=0, then P{m(Z)<0}=0. If d>0, define

ρ=EQ×Q[Cov⁡P(rΘ(Z),rΘ′(Z))]d2.

Then ρ≥0 and

P{m(Z)<0}≤ρ1−s2s2.

The covariance formula for ρ is Breiman's weighted mean raw-margin correlation written without undefined zero-standard-deviation correlation terms.

Facts & Assumptions

Given: The fixed data, classifier jointly measurable on the product of the test-feature and randomization spaces, finite ordered class set, class-valued test response, independent randomizations and test pair, and positive-strength condition in the Statement.

[F1]

Bagged random-forest construction on a fixed finite sample: The tree law is fixed conditional on the training data, and each tree takes one class value at an input.

[F2]

Expectation of a nonnegative or integrable random variable: Expectation on a probability space is integration against its probability measure.

[F3]

Moments, variance, and covariance on a probability space: For square-integrable real random variables, variance is the mean squared centered value and covariance is the mean product of centered values.

[F4]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

[F5]

Fubini's theorem for L^1 functions on a sigma-finite product: For an integrable function on a product of sigma-finite measure spaces, either order of iterated integration gives the product integral.

[F6]

Cauchy-Schwarz for random variables: If U,V∈L2(Q), then EQ∣UV∣≤(EQU2)1/2(EQV2)1/2.

[F7]

Chebyshev's inequality for random variables: For square-integrable W and a>0, P(∣W−EW∣≥a)≤Var⁡(W)/a2.

Proof

1.1givenF1F2algebra

For each fixed z=(x,y), the definition of j^ gives EQ[rΘ(z)]=pk(x)−pj^(x,y)(x)=m(z). Also ∣rθ(z)∣≤1, so all displayed means and covariances are finite.

2.1F3F4F5step 1.1algebra

The bounded jointly measurable class indicators and [F5] make pj and the finite maximizer j^ measurable. By [F4] the pair (Θ,Θ′,Z) has product law, and [F5] permits exchanging the integrals of these bounded functions. Thus EQ×Q[Cov⁡P(rΘ,rΘ′)]=EP[m(Z)2]−s2=Var⁡P(m(Z)). Indeed, the product of the two conditional raw-margin means is m(z)2, while the product of their P-means integrates to (EPm)2=s2. If both standard deviations are positive, covariance equals correlation times their product; if either is zero, both the covariance and the weighted correlation term are zero. Thus the covariance expression for ρ is exactly Breiman's weighted mean raw-margin correlation.

3.1F2F3F5F6step 1.1step 2.1algebra

Suppose d>0. From step 2.1, ρ=Var⁡P(m)/d2≥0. Since rθ2≤1, EQ[sd(Θ)2]=EQ×P[rΘ2]−EQ[(EPrΘ)2]≤1−s2. The final inequality uses EQ[(EPrΘ)2]≥(EQEPrΘ)2=s2, by [F6] with one factor equal to 1; [F5] and step 1.1 give EQEPrΘ=s. The same inequality gives d2≤EQ[sd(Θ)2]. Therefore Var⁡P(m)=ρd2≤ρ(1−s2).

4.1F7step 3.1algebra

Since s>0, the event {m(Z)<0} is contained in {∣m(Z)−s∣≥s}. Applying [F7] and then step 3.1 gives P{m(Z)<0}≤Var⁡P(m(Z))/s2≤ρ(1−s2)/s2.

5.1F2F3F5step 1.1algebra∎

If d=0, then sd≥0 and EQsd=0. For each n≥1, Q{sd≥1/n}=0, since otherwise EQsd>0; taking the countable union gives sd=0 Q-almost everywhere. For each such θ, EP(rθ−EPrθ)2=0, so the same nonnegative-integral argument makes rθ(Z)=EPrθ P-almost surely. By [F5], m(Z)=EQrΘ(Z) is therefore the constant EPm(Z)=s>0 for P-almost every Z. Hence P{m(Z)<0}=0, as claimed in this case.

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

Unbiased randomized-tree residual correlation bounds forest risk

Statement

Fix a finite training dataset and a jointly measurable real-valued tree predictor h(x,θ). Let Z=(X,Y) have test law P. Let Θ,Θ′ be independent randomizations with common law Q, assume the pair (Θ,Θ′) is independent of Z, and assume EPY2<∞ and h(X,Θ)∈L2(P×Q). For every allowed tree randomization θ, assume h(X,θ)∈L2(P) and EPY=EPh(X,θ). Put eθ(Z)=Y−h(X,θ) and sd(θ)=Var⁡P(eθ(Z)). Define

PE∗(forest)=EP(Y−EQh(X,Θ))2

PE∗(tree)=EQEPeΘ(Z)2

d=EQ[sd(Θ)]

If d=0, then both risks are zero. If d>0, define

ρ=EQ×Q[Cov⁡P(eΘ(Z),eΘ′(Z))]d2.

Then ρ≥0 and

PE∗(forest)≤ρ PE∗(tree).

The covariance formula for ρ is Breiman's weighted mean residual correlation written without undefined zero-standard-deviation correlation terms.

Facts & Assumptions

Given: The fixed data, jointly measurable square-integrable predictor, unbiasedness condition for every allowed tree randomization, and independent randomizations and test pair in the Statement.

[F1]

Bagged random-forest construction on a fixed finite sample: For regression, each tree predicts its leaf sample mean and the forest prediction is the average of its tree predictions.

[F2]

Expectation of a nonnegative or integrable random variable: Expectation on a probability space is integration against its probability measure.

[F3]

Moments, variance, and covariance on a probability space: For square-integrable real random variables, variance is the mean squared centered value and covariance is the mean product of centered values.

[F4]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

[F5]

Fubini's theorem for L^1 functions on a sigma-finite product: For an integrable function on a product of sigma-finite measure spaces, either order of iterated integration gives the product integral.

[F6]

Cauchy-Schwarz for random variables: If U,V∈L2(Q), then EQ∣UV∣≤(EQU2)1/2(EQV2)1/2.

Proof

1.1givenF2F3F6algebra

For every allowed θ, the mean condition gives EPeθ(Z)=0. Hence [F3] gives Cov⁡P(eθ,eθ′)=EP[eθeθ′]. If both residual standard deviations are positive, define their correlation as this covariance divided by their product; if either is zero, the covariance is zero. Thus the covariance expression for ρ agrees with Breiman's weighted mean residual correlation, including zero-standard-deviation pairs. The products are integrable by [F6] and square-integrability. Also EP×QeΘ2<∞, since (a−b)2≤2a2+2b2 and both Y and h(X,Θ) are square-integrable.

2.1F1F2F4F5F6step 1.1algebra

By [F4] the pair (Θ,Θ′,Z) has product law. For P-almost every z, [F6] gives (EQ∣eΘ(z)∣)2≤EQeΘ(z)2; integrating and using step 1.1 shows eθ(z)eθ′(z) is integrable on P×Q×Q. Thus [F5] permits the following integrations. The Q-average is the infinite-forest prediction obtained from the same regression tree predictions that the algorithm averages at finite B [F1]. Also EQeΘ(Z)=Y−EQh(X,Θ) for P-almost every Z. Consequently PE∗(forest)=EP[(EQeΘ(Z))2]=EQ×Q[EP(eΘ(Z)eΘ′(Z))]=EQ×Q[Cov⁡P(eΘ(Z),eΘ′(Z))]. Thus when d>0, PE∗(forest)=ρd2 and ρ≥0.

3.1F2F3F6step 2.1algebra

The zero-mean condition and [F3] give PE∗(tree)=EQ[sd(Θ)2]. By [F6] with one factor equal to 1, d2=(EQsd(Θ))2≤EQ[sd(Θ)2]. For d>0, combining with step 2.1 and ρ≥0 yields PE∗(forest)≤ρ PE∗(tree).

4.1F2F3F5step 1.1∎

If d=0, then the nonnegative function sd vanishes Q-almost everywhere: each set {sd≥1/n} has measure zero since otherwise EQsd>0. For Q-almost every θ, the mean-zero residual has variance zero, so the same argument applied to (eθ−EPeθ)2 gives eθ=0 P-almost surely. Fubini then gives eΘ(Z)=0 for P×Q-almost every (Z,Θ); both displayed risks are zero.

4 · Examples, counterexamples and false statements

None yet.

Sources