Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Merge-count monotonicity: |S| + |g(S')| <= |S'| + |g(S)| for S a subset of S' (the functional |S| - |g(S)| is monotone)

Proved
PersistClust.Count.merge_count_mono

by fabianroll · Oct 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

countencardgenericimageinduced-matchingmergemonotonepersistclustsupport-tool

Let g : U -> W be any map and S a subset of S' subsets of U. Then encard S + encard (g '' S') <= encard S' + encard (g '' S). Equivalently (for finite sets) the merge-count functional f(S) = |S| - |g(S)| -- the number of elements of S collapsed by g -- is monotone under inclusion: each added element raises |S| by one and |g(S)| by at most one. Stated additively in extended naturals, so no finiteness is needed.

Preamble
import Mathlib
Formal statement
namespace PersistClust.Count

theorem merge_count_mono {U W : Type*} (g : U → W) {S S' : Set U} (h : S ⊆ S') :
    S.encard + (g '' S').encard ≤ S'.encard + (g '' S).encard
    := by sorry
Source
Support tool of the persistence-clustering deliverable (RR-6968, Theorem 4.5 / 4.8 cluster): the counting core of the Bauer-Lesnick induced-matching route for 0-dimensional persistence, where g is a structure (merge) map between component sets and f(S_L) - f(S_R) counts the bars born in a window that die across the merge level. Pure Mathlib.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me