While this submission is a draft, it cannot be used by other submissions.

Collision bound for finite random keys

Lax235315.RandomKeyCollisions · concepts/Lax235315/RandomKeyCollisions.lean · lax-235315

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    Give each of a vertices an independent uniform key from M possibilities. The number of assignments with any repeated key is at most a² M^(a-1). For M>0, division by M^a gives the probability bound a²/M.

    Concept map
    1 concept
    100%
    Proven claimThis concept
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Mathlib.Data.Fintype.Card
    2import Mathlib.Data.Set.Card
    3
    4/-!
    5---
    6title: Collision bound for finite random keys
    7type: lemma
    8---
    9Give each of a vertices an independent uniform key from M possibilities.
    10The number of assignments with any repeated key is at most a² M^(a-1).
    11For M>0, division by M^a gives the probability bound a²/M.
    12
    13# Formalization notes
    14
    15Assignments are functions from Fin a to Fin M. Noninjectivity is exactly
    16the collision event, so no sampling implementation is built into the
    17statement. The counting form covers empty vertex or key sets as well;
    18the stated probability interpretation only uses M>0.
    19-/
    20
    21namespace Lax235315.RandomKeyCollisions
    22
    23/-- A union bound over distinct coordinate pairs bounds colliding key assignments. -/
    24axiom count_noninjective_le (a M : ℕ) :
    25 {f : Fin a → Fin M | ¬ Function.Injective f}.ncard ≤
    26 a ^ 2 * M ^ (a - 1)
    27
    28end Lax235315.RandomKeyCollisions
    29
    Show Proof
    Formalization notes

    Assignments are functions from Fin a to Fin M. Noninjectivity is exactly the collision event, so no sampling implementation is built into the statement. The counting form covers empty vertex or key sets as well; the stated probability interpretation only uses M>0.

    Builds on

    none

    Used by

    none

    From Mathlib

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…