Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Sheaf per chart lipschitz radius

Proved
sheaf_per_chart_lipschitz_radius

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

aether-catalogmachinelearning

Formal statement of sheaf_per_chart_lipschitz_radius from the Aether Catalog (MachineLearning). The mathematical content is given by the Lean statement below; a human-readable write-up is pending.

theorem sheaf_per_chart_lipschitz_radius    {ι : Type*} [Fintype ι] [Nonempty ι]
    {X : Type*} [PseudoMetricSpace X]
    (scoreGap : X → ℝ) (S : Set X)
    (cover : ι → Set X)
    (D : LocalLipschitzData ι)
    (hcover : S ⊆ ⋃ i, cover i)
    (hmargin : ∀ i, ∀ x ∈ cover i, D.margin i ≤ scoreGap x)
    (hlip : ∀ i, ∀ x ∈ cover i, ∀ y : X,
      |scoreGap x - scoreGap y| ≤ D.lipschitz i * dist x y)
    (_hH1 : VanishingH1OnCover ι) :
    ∃ r : ℝ, 0 < r ∧
      Finset.inf' Finset.univ Finset.univ_nonempty D.localRadius ≤ r ∧
      CertifiedRobustRadiusLinf scoreGap S r := by sorry

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

Preamble
-- Thm stub generated from MachineLearning/NeuralCoding/CechDecisionBoundaryObstructions.lean
import Mathlib
import Definitions.Def_MachineLearning_NeuralCoding_CechDecisionBoundaryObstructions
/-
Copyright (c) 2025. All rights reserved.
Released under Apache 2.0 license.

# Čech Obstruction Theory for Adversarial Robustness

This module formalizes an explicit **cohomological obstruction calculus** for
certified adversarial robustness of piecewise-linear (ReLU) classifiers.

## Mathematical Framework

A ReLU network partitions input space into finitely many linear activation regions.
On each region, the classifier is affine-linear, so local robustness margins are
computable. The key question: when do local certificates **glue** to a global one?

We model this via finite Čech cohomology:
- **1-cocycles** capture pairwise discrepancies between local margin assignments.
- **1-coboundaries** are discrepancies that can be "gauged away."
- **Vanishing H¹** means every cocycle is a coboundary — local data glues globally.
- **Nontrivial H¹** produces explicit incompatibility witnesses.

## Main Results

### Theorem A: `finite_cover_vanishing_H1_implies_global_radius`
Local-to-global sheaf robustness certificate.

### Theorem B: `nontrivial_cocycle_yields_incompatible_local_sections`
Obstruction yields vulnerability witness.

### Theorem C: `sheaf_per_chart_lipschitz_radius`
Comparison with Lipschitz certification.

## Cross-Domain Connections

- **Distributed Consensus**: Cocycles = inconsistency fields; coboundaries = gauge fixes.
- **Gauge Theory**: Coboundary potential = gauge transformation; non-coboundary = curvature.
- **Error-Correcting Codes**: Nontrivial cocycle = syndrome.
-/


open Finset BigOperators Set

noncomputable section

/-! ## §1. Čech Cocycle and Coboundary Definitions -/




/-! ## §2. Cocycle Algebra -/









/-! ## §3. H¹ Vanishes for Finite Types (Nerve Lemma) -/


/-! ## §4. Robustness Predicates -/





/-! ## §5. Discrepancy Cocycle -/




/-! ## §6. Minimum Margin Lemmas -/



/-! ## §7. Theorem A: Local-to-Global Sheaf Robustness Certificate -/

/-
**Theorem A (Local-to-Global Sheaf Robustness Certificate).**

For a finite cover with positive local margins, if the first Čech cohomology
vanishes and the score-gap is `L`-Lipschitz with margin at least `m(i)` on each
region, then local margins glue to a global certified L∞ radius
`r = min_i(m_i/L) > 0`.
-/


/-! ## §8. Theorem B: Obstruction Yields Vulnerability Witness -/






/-! ## §9. Theorem C: Comparison with Lipschitz Certification -/


/-
**Theorem C (Per-chart Lipschitz version).**

With per-chart Lipschitz constants `L_i`, the sheaf radius is `min_i(m_i / L_i)`.
-/
Formal statement
theorem sheaf_per_chart_lipschitz_radius    {ι : Type*} [Fintype ι] [Nonempty ι]
    {X : Type*} [PseudoMetricSpace X]
    (scoreGap : X → ℝ) (S : Set X)
    (cover : ι → Set X)
    (D : LocalLipschitzData ι)
    (hcover : S ⊆ ⋃ i, cover i)
    (hmargin : ∀ i, ∀ x ∈ cover i, D.margin i ≤ scoreGap x)
    (hlip : ∀ i, ∀ x ∈ cover i, ∀ y : X,
      |scoreGap x - scoreGap y| ≤ D.lipschitz i * dist x y)
    (_hH1 : VanishingH1OnCover ι) :
    ∃ r : ℝ, 0 < r ∧
      Finset.inf' Finset.univ Finset.univ_nonempty D.localRadius ≤ r ∧
      CertifiedRobustRadiusLinf scoreGap S r := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/MachineLearning/NeuralCoding/CechDecisionBoundaryObstructions.lean#L306

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