Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 1, p. 346 — on a region where F is constant, the average of e^{−y_i c} is minimized at c = ½ log(n₊/n₋), matching the sample proportions

Proved
AddLogReg.ExpCrit.corollary_1

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

boostingdecision-treesexponential-lossp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1sample-version

Let y1,…,yn∈{−1,1}y_1, \dots, y_n \in \{-1, 1\}y1​,…,yn​∈{−1,1} be the labels of the observations in a region of feature space on which FFF takes a constant value ccc (for example a terminal node of a decision tree), and suppose both labels occur. Let n+n_+n+​ and n−n_-n−​ be the numbers of labels equal to 111 and −1-1−1, and put

c⋆=12log⁡n+n−.c^\star = \tfrac12 \log \frac{n_+}{n_-}.c⋆=21​logn−​n+​​.

Then

  1. c⋆c^\starc⋆ minimizes the average exponential criterion over the region: for every real ccc,
1n∑i=1ne−yic⋆≤1n∑i=1ne−yic;\frac1n \sum_{i=1}^n e^{-y_i c^\star} \le \frac1n \sum_{i=1}^n e^{-y_i c};n1​i=1∑n​e−yi​c⋆≤n1​i=1∑n​e−yi​c;
  1. the sample proportions are given by the symmetric logistic transform of c⋆c^\starc⋆:
n+n=ec⋆e−c⋆+ec⋆,n−n=e−c⋆e−c⋆+ec⋆.\frac{n_+}{n} = \frac{e^{c^\star}}{e^{-c^\star} + e^{c^\star}}, \qquad \frac{n_-}{n} = \frac{e^{-c^\star}}{e^{-c^\star} + e^{c^\star}}.nn+​​=e−c⋆+ec⋆ec⋆​,nn−​​=e−c⋆+ec⋆e−c⋆​.

This is the sample version of Lemma 1: replacing the expectation by averages over a region gives the same minimizer with sample proportions in place of conditional probabilities. It is what the data versions of the boosting algorithms compute in each terminal node.

Formalization Note The averages are written with the factor 1/n1/n1/n, as in the corollary's "averages". The requirement that both labels occur is the sample counterpart of 0<P(y=1∣x)<10 < P(y = 1 \mid x) < 10<P(y=1∣x)<1: without it the logarithm is of 000 or a division by 000, and no minimizer exists.

Preamble
import Mathlib
import Definitions.Def_AddLogReg_ExpCrit_Setting

open MeasureTheory ProbabilityTheory
Formal statement
namespace AddLogReg.ExpCrit

/-- Corollary 1 (p. 346): with `E` replaced by the average over a region where `F` is a
constant `c` (labels `y_1, …, y_n`, both classes present), the average of `e^{−y_i c}` is
minimized at `c = ½ log(n₊/n₋)`, and the sample proportions of `y = 1` and `y = −1` are
`e^{c}/(e^{−c} + e^{c})` and `e^{−c}/(e^{−c} + e^{c})`. -/
theorem corollary_1 (n : ℕ) (y : Fin n → Bool) (hpos : ∃ i, y i = true)
    (hneg : ∃ i, y i = false) :
    let npos : ℕ := (Finset.univ.filter (fun i => y i = true)).card
    let nneg : ℕ := (Finset.univ.filter (fun i => y i = false)).card
    let c : ℝ := (1 / 2) * Real.log ((npos : ℝ) / nneg)
    (∀ c' : ℝ, (1 / (n : ℝ)) * ∑ i, Real.exp (-(sgn (y i) * c)) ≤
        (1 / (n : ℝ)) * ∑ i, Real.exp (-(sgn (y i) * c'))) ∧
    (npos : ℝ) / n = Real.exp c / (Real.exp (-c) + Real.exp c) ∧
    (nneg : ℝ) / n = Real.exp (-c) / (Real.exp (-c) + Real.exp c) := by sorry

end AddLogReg.ExpCrit
Source
Friedman, Hastie and Tibshirani, Additive logistic regression: a statistical view of boosting, Ann. Statist. 28 (2000), p. 346, Corollary 1
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me