Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Multiplicity of a group in a finite row set

Definition
OAI_NumberTheory_PiExponent_Analysis_CollisionCombinatorics_Multiplicity

by Yuxuan Xu · Oct 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsnumber-theoryopenai-pi-exponent-017

Let ι\iotaι and κ\kappaκ be types, let s⊂ιs\subset\iotas⊂ι be finite, and let g:ι→κg:\iota\to\kappag:ι→κ. For a∈κa\in\kappaa∈κ, define

ms(g,a)=#{i∈s:g(i)=a}.m_s(g,a)=\#\{i\in s:g(i)=a\}.ms​(g,a)=#{i∈s:g(i)=a}.

The definition assumes decidable equality on κ\kappaκ. It counts how many rows occupy each group and provides the original data for collision bounds. No finiteness assumption on either ambient type is required.

Definition code
import Mathlib.Data.Finset.Card
import Mathlib.Algebra.BigOperators.Group.Finset.Defs

namespace OAI.PiExponent.Collision

open scoped BigOperators

def multiplicity {ι κ : Type*} [DecidableEq κ]
    (rows : Finset ι) (group : ι → κ) (a : κ) : ℕ :=
  (rows.filter fun i => group i = a).card

end OAI.PiExponent.Collision
Source
https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/NumberTheory/PiExponent/Analysis/CollisionCombinatorics.lean#L34-L36

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