CommunicationComplexity.Internal.invCdf
defimported Lean
Given a PMF $p$ on $\mathrm{Fin}\,m$ (with $m \ge 1$) and a value $x \in \mathbb{R}_{\ge 0}^\infty$, $\mathrm{invCdf}(p, x)$ is the largest index $i \in \mathrm{Fin}\,m$ satisfying $\mathrm{cdf}(p, i) \le x$, i.e.\ the generalized inverse (quantile) of the CDF.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in open MeasureTheory in open scoped ENNReal in noncomputable def CommunicationComplexity.Internal.invCdf {m : ℕ} [NeZero m] (p : PMF (Fin m)) (x : ℝ≥0∞) : Fin m
- Defined in
- TCSlib, `CommunicationComplexity.Internal.invCdf`
- Lean proof
- By Lucy Horowitz, Timothe Kasriel, Mihir Singhal, from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Copyright (c) 2026 Lucy Horowitz, Timothe Kasriel, and Mihir Singhal. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.CommunicationComplexity.Internal.invCdf← CommunicationComplexity.Internal.invCdf (TCSlib/CommunicationComplexity/NewmanTheorem/PrivateCoinApproximation.lean:113): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 2
- CommunicationComplexity.Internal.cdfGiven a probability mass function $p$ on $\mathrm{Fin}\,m$ and a natural number $n$, $\mathrm{cdf}(p, n)$ is the cumulative probability…
- CommunicationComplexity.Internal.cdf_zeroCumulative distribution function vanishes at zero. Let $p$ be a probability mass function on $\mathrm{Fin}\,m$. Then the cumulative…
- Used by 3
- CommunicationComplexity.Internal.uniformApprox_approxUniform approximation error bound. Let $p$ be a probability mass function on $\mathrm{Fin}\,m$ with $m \ge 1$, and let $n \ge 1$ be an…
- CommunicationComplexity.Internal.invCdf_eq_iffCharacterization of the inverse CDF. Let $p$ be a probability mass function on $\mathrm{Fin}\,m = \{0, 1, \dots, m-1\}$ with $m \ge 1$,…
- CommunicationComplexity.Internal.uniformApproxGiven a PMF $p$ on $\mathrm{Fin}\,m$ and a positive integer $n$, the map…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in open MeasureTheory in open scoped ENNReal in /-- The generalised inverse of the cumulative distribution function: `invCdf p x` is the largest index `i` with `cdf p i ≤ x` (always defined, since `cdf p 0 = 0 ≤ x`). -/ noncomputable def CommunicationComplexity.Internal.invCdf {m : ℕ} [NeZero m] (p : PMF (Fin m)) (x : ℝ≥0∞) : Fin m := (Finset.univ.filter (fun (i : Fin m) => cdf p i ≤ x)).max' (by unfold Finset.Nonempty refine ⟨(⟨0, Nat.pos_of_neZero m⟩ : Fin m), ?_⟩ simp )