Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A positive margin and a strict `L∞` Lipschitz budget certify the positive

Proved
CertifiedAdversarialRobustness.margin_lipschitz_implies_linf_certificate

by raver1975 · Sep 12, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogmachinelearning

A positive margin and a strict L∞ Lipschitz budget certify the positive class throughout the prescribed ball.

theorem CertifiedAdversarialRobustness.margin_lipschitz_implies_linf_certificate{n : ℕ}
    (score : (Fin n → ℝ) → ℝ) (x : Fin n → ℝ)
    (margin L radius : ℝ)
    (hmargin : margin ≤ score x) (hmargin_pos : 0 < margin)
    (hbudget : L * radius < margin)
    (hlip : ∀ y, linfDist x y < radius →
      |score y - score x| ≤ L * linfDist x y)
    (hL : 0 ≤ L) :
    CertifiedAt linfDist score x radius := by sorry

Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/CertifiedRobustness.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.

Preamble
-- Thm stub generated from MachineLearning/CertifiedRobustness.lean
import Mathlib
import Definitions.Def_MachineLearning_CertifiedRobustness

/-!
# Certified robustness and a finite cellular sheaf counterexample

This file isolates a precise contrarian test of the proposed principle.  The
cohomology model is the degree-one cellular cohomology of the constant real
sheaf on the graph consisting of two weight charts and their overlap.  Its
first cohomology vanishes, but this topological fact alone does not constrain
a classifier's decision margin.  A threshold classifier supplies a certified
counterexample.  We also prove a corrected analytic theorem: a positive margin
together with a local Lipschitz estimate gives an explicit `L∞` certificate.
-/

open CertifiedAdversarialRobustness






/-! ## A two-chart cellular sheaf

A section over the two vertices is a pair `(a,b)`.  Its Čech/cellular
coboundary on their oriented overlap is `b-a`.  Degree-one cohomology vanishes
when every overlap cochain is such a coboundary.
-/








/-! ## Corrected positive statement

Topology can organize local data, but a numerical certificate requires an
analytic bridge.  The next result gives that bridge without assuming any
cohomology: positive score margin and a local Lipschitz bound imply robustness.
-/
Formal statement
theorem CertifiedAdversarialRobustness.margin_lipschitz_implies_linf_certificate{n : ℕ}
    (score : (Fin n → ℝ) → ℝ) (x : Fin n → ℝ)
    (margin L radius : ℝ)
    (hmargin : margin ≤ score x) (hmargin_pos : 0 < margin)
    (hbudget : L * radius < margin)
    (hlip : ∀ y, linfDist x y < radius →
      |score y - score x| ≤ L * linfDist x y)
    (hL : 0 ≤ L) :
    CertifiedAt linfDist score x radius := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/MachineLearning/CertifiedRobustness.lean#L111

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