Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Tight exponential analysis of universally composable privacy amplification and its applications

Definition
QAlgorithms_Papers_Independent_Advance50_P28

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Tight exponential analysis of universally composable privacy amplification and its applications (arXiv:1010.1358) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • IsSubLaw: PDF p.3: finite subprobability vectors, including the zero vector.
  • l1: PDF p.3, (1): full L1 distance.
  • finiteVectorMass: PDF p.3, (7): the finiteVectorMass of a finite vector.
  • hashFiberMass: PDF p.3: hash pushforward, summing the whole fiber.
  • extractionError: PDF p.3, (7): deviation from the finiteVectorMass-scaled uniform output.
  • HashEnsemble: PDF pp.3–4: the distribution of the random hash itself. Any seed induces this finite distribution; choosing it before the source keeps the seed independent.
  • Universal2: PDF p.3, Condition 1: only the collision constraint is imposed.
  • StronglyUniversal2: PDF p.4, Condition 3: a uniform hash value independent of the ENTIRE tuple of all other hash values, expressed by its joint cylinders.
  • expectedError: PDF p.3, (9): expected full L1 error with independent public seed.
  • renyiPowerSum: PDF p.3: the Renyi renyiPowerSum of order 1+s; it also handles zero subdistributions.
  • renyiNumerator: PDF pp.3–4: s H_(1+s); its continuous endpoint at s=0 is zero for a law.
  • peak: PDF p.6: largest atom; on finite nonempty alphabets this supremum is attained.
  • directExponent: PDF p.4, (18): direct universal2 exponent. The objective is continuous on [0,1].
  • intrinsicExponent: PDF p.9, (58): specialized direct exponent; denominator 1+s is absent.
  • smoothExponent: PDF p.7, (35)–(37): s is unbounded; a supremum need not have a finite optimizer.
  • compactSmoothObjective: PDF p.7, (36)–(37): compactified objective. At t=1 use H_infinity, at t=0 use 0.
  • iid: PDF p.4 onward: product law on n independently sampled letters.
  • negativeLogRate: PDF pp.4,7,9: extended negative logarithmic rate, used at positive blocklengths. The n=0 convention is irrelevant to every limit at infinity.
  • smoothingBenchmark: PDF p.7, (37): minimization over all subdistributions, including zero.
  • intrinsicExtractionError: PDF p.7: all extractors to floor(exp(nR)) outputs, no optimization surrogate.
  • counts: PDF p.5: a type is the empirical count vector of an actual word.
  • types: PDF pp.5,8: all realized n-types, with no artificial impossible count vectors.
  • typeAtom: PDF p.5, (22): the common probability of each word of a type, directly as a product, so zero-support types have probability zero without log(0).
  • typeMass: PDF p.5, (23): actual finiteVectorMass of a type class.
  • firstTypes: PDF p.8, T_n^1[M]: equivalent to D+H >= log M/n at n>0, including infinite cross-entropy when a positive count falls outside the support of P.
  • secondTypes: PDF p.8, T_n^2[M]: this set need not be disjoint from T_n^1[M].
  • rareTypePeak: PDF p.8, (48): empty maximum of nonnegative atom probabilities is zero.
  • IsConditionalLaw: PDF p.10: a measurable normalized conditional probability vector. Values on null fibers may be any probability vector; the definitions integrate them out.
  • conditionalLeakage: PDF p.10: full conditional L1 leakage against the uniform key and actual Eve marginal.
  • expectedConditionalLeakage: PDF p.10, (66): seed expectation; the seed is independent of (A,E).
  • publicSeedLeakage: PDF p.10, (66): actual joint (key,E,public seed) distance; the factors inside absolute values are the joint conditional densities relative to mu and counting.
  • conditionalPhi: PDF p.10: conditional phi; finite A bounds this integrand away from zero and infinity for t<1, so no nonintegrable Bochner default is used on the stated domain.
  • conditionalRenyiNumerator: PDF p.11: s times the source's (unoptimized) conditional Renyi entropy.
  • integratedFiberEntropyNats: PDF p.11: conditional Shannon entropy, natural logarithms; zero letters contribute 0.
  • fiberRenyi: PDF p.11: fiber Renyi entropy, on the s>0 domain of Lemma 7.
  • conditionalPhiExponent: PDF p.11: the new conditional source exponent.
  • conditionalHExponent: PDF p.11: the conditional entropy comparison exponent e_H.
  • conditionalTildeExponent: PDF p.11: the older comparison exponent e_tildeH, with denominator 2.
  • conditionalIid: PDF p.11: actual iid conditional vector, with the product Eve marginal.
  • IsENNRealDiscreteLaw: PDF p.12: a probability law on a countable discrete input alphabet. Nonnegative infinite sums never use the default of a nonsummable real tsum.
  • IsDensityChannel: PDF p.12: classical stochastic channel densities relative to a common output measure. Their nonnegative integral is one; continuous and discrete outputs are allowed.
  • classicalOutputDensity: PDF p.13, (76): actual channel mixture, including countably many inputs.
  • gallagerDensityMoment: PDF p.12: exp(phi), represented before the logarithm. This may be infinite for a countable input at positive t, and is NOT converted to a real integral.
  • psiMoment: PDF p.13, (76): exp(psi); outputs of zero mixture finiteVectorMass contribute zero before any negative power is evaluated.
  • wiretapPhiExponent: PDF p.13: secrecy exponent defined with extended logarithms so an infinite channel renyiPowerSum gives minus infinity, rather than Real.log of a default value.
  • wiretapPsiExponent: PDF p.14, (77): comparison exponent e_psi, with denominator 1+s.
  • wiretapTildeExponent: PDF p.14, (79): Pinsker comparison exponent with denominator 2.
  • WiretapCode: PDF p.12: stochastic encoder distributions and disjoint measurable decoding sets. Uniform messages are included in every performance definition below.
  • wiretapDecodingError: PDF p.12: average Bob error for this actual stochastic code.
  • codeEveAverage: PDF p.12: the actual average Eve output of a uniform message.
  • codeLeakage: PDF p.12: full L1 message–Eve dependence relative to the ACTUAL Eve marginal, not to an independently supplied comparison state. Probability densities are finite a.e.
  • blockDensity: PDF p.13: product channel densities, with no product restriction on code encoders.
  • discreteIid: PDF p.13: only the random-coding input law is tensorized.
  • negativeLogRateENN: PDF p.13: normalized negative log of an actual nonnegative error.
  • classicalMutualInformationNats: PDF p.13: mutual information in nats, via the nonnegative KL generator u log u-u+1. This equals D(p(x)W_x(y) || p(x)W_p(y)); no signed nonintegrable integral or infinity-minus-infinity is used.
  • finiteUniformMass: PDF p.15: uniform law on a finite nonempty alphabet.
  • additiveDensity: PDF pp.14–15: the actual additive noise channel, with z-x in this order.
  • generalAdditiveDensity: PDF p.15, (82): general additive channel, relative to counting on G times the actual marginal measure of side noise E. This includes continuous side noise.
  • subgroupUniform: PDF p.15: uniform law on C1, as a law on the ambient input alphabet.
  • SubcodeCondition: PDF p.15, Condition 4: fixed size L and the paper's L/|C1| collision bound. C1 and W are chosen independently of the seed.
  • cosetOutput: PDF p.15: the actual uniform-coset output for representative x.
  • cosetLeakage: PDF p.15: full L1 coset-key leakage. Averaging representatives with 1/|C1| counts each coset L times and is exactly uniform averaging over |C1|/L keys.
  • expectedCosetLeakage: PDF p.15: averaged leakage includes the public seed as side information.
  • CompatibleMarginals: PDF p.16, (95): two compatible source marginals; all Bob and Eve metrics, including the public mask, depend only on these marginals. Compatibility is exactly that they have the same A-law, and permits gluing them to a joint source.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P56

/-! Hayashi, arXiv:1010.1358v5. Natural logarithms and FULL L1 distance.
All new models are paper-local. Exact zero errors have infinite exponents.
Compilation is pending the explicitly requested batch handoff. -/

noncomputable section

open MeasureTheory Filter
open scoped BigOperators ENNReal Topology

namespace QAlgorithms.Papers.Independent.Advance50.P28

-- Exact frozen finite-law predicate; its full body matches PDF p.3.
open QAlgorithms.Papers.Independent.Information100.P56 (IsLaw)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF p.3: finite subprobability vectors, including the zero vector. -/
def IsSubLaw {A : Type*} [Fintype A] (P : A → ℝ) : Prop :=
  (∀ a, 0 ≤ P a) ∧ ∑ a, P a ≤ 1

/-- PDF p.3, (1): full L1 distance. -/
def l1 {A : Type*} [Fintype A] (P Q : A → ℝ) : ℝ :=
  ∑ a, |P a - Q a|

/-- PDF p.3, (7): the finiteVectorMass of a finite vector. -/
def finiteVectorMass {A : Type*} [Fintype A] (P : A → ℝ) : ℝ := ∑ a, P a

/-- PDF p.3: hash pushforward, summing the whole fiber. -/
def hashFiberMass {A : Type*} [Fintype A] {M : ℕ}
    (P : A → ℝ) (f : A → Fin M) (b : Fin M) : ℝ :=
  ∑ a, if f a = b then P a else 0

/-- PDF p.3, (7): deviation from the finiteVectorMass-scaled uniform output. -/
def extractionError {A : Type*} [Fintype A] {M : ℕ}
    (P : A → ℝ) (f : A → Fin M) : ℝ :=
  ∑ b, |hashFiberMass P f b - finiteVectorMass P / (M : ℝ)|

/-- PDF pp.3–4: the distribution of the random hash itself. Any seed induces this
finite distribution; choosing it before the source keeps the seed independent. -/
structure HashEnsemble (A : Type*) [Fintype A] (M : ℕ) where
  weight : (A → Fin M) → ℝ
  nonnegative : ∀ f, 0 ≤ weight f
  normalized : ∑ f, weight f = 1

/-- PDF p.3, Condition 1: only the collision constraint is imposed. -/
def Universal2 {A : Type*} [Fintype A] {M : ℕ}
    (h : HashEnsemble A M) : Prop :=
  ∀ a a', a ≠ a' →
    (∑ f, if f a = f a' then h.weight f else 0) ≤ 1 / (M : ℝ)

/-- PDF p.4, Condition 3: a uniform hash value independent of the ENTIRE tuple
of all other hash values, expressed by its joint cylinders. -/
def StronglyUniversal2 {A : Type*} [Fintype A] {M : ℕ}
    (h : HashEnsemble A M) : Prop :=
  (∀ a b, (∑ f, if f a = b then h.weight f else 0) = 1 / (M : ℝ)) ∧
  ∀ a b (g : A → Fin M),
    (∑ f, if f a = b ∧ (∀ a', a' ≠ a → f a' = g a') then h.weight f else 0) =
      (1 / (M : ℝ)) *
        ∑ f, if (∀ a', a' ≠ a → f a' = g a') then h.weight f else 0

/-- PDF p.3, (9): expected full L1 error with independent public seed. -/
def expectedError {A : Type*} [Fintype A] {M : ℕ}
    (h : HashEnsemble A M) (P : A → ℝ) : ℝ :=
  ∑ f, h.weight f * extractionError P f

/-- PDF p.3: the Renyi renyiPowerSum of order 1+s; it also handles zero subdistributions. -/
def renyiPowerSum {A : Type*} [Fintype A] (P : A → ℝ) (s : ℝ) : ℝ :=
  ∑ a, (P a) ^ (1 + s)

/-- PDF pp.3–4: s H_(1+s); its continuous endpoint at s=0 is zero for a law. -/
def renyiNumerator {A : Type*} [Fintype A] (P : A → ℝ) (s : ℝ) : ℝ :=
  if s = 0 then 0 else -Real.log (renyiPowerSum P s)

/-- PDF p.6: largest atom; on finite nonempty alphabets this supremum is attained. -/
def peak {A : Type*} [Fintype A] (P : A → ℝ) : ℝ := sSup (Set.range P)

/-- PDF p.4, (18): direct universal2 exponent. The objective is continuous on [0,1]. -/
def directExponent {A : Type*} [Fintype A] (P : A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun s : ℝ => (renyiNumerator P s - s * R) / (1 + s)) '' Set.Icc 0 1)

/-- PDF p.9, (58): specialized direct exponent; denominator 1+s is absent. -/
def intrinsicExponent {A : Type*} [Fintype A] (P : A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun s : ℝ => renyiNumerator P s - s * R) '' Set.Icc 0 1)

/-- PDF p.7, (35)–(37): s is unbounded; a supremum need not have a finite optimizer. -/
def smoothExponent {A : Type*} [Fintype A] (P : A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun s : ℝ => (renyiNumerator P s - s * R) / (1 + 2 * s)) '' Set.Ici 0)

/-- PDF p.7, (36)–(37): compactified objective. At t=1 use H_infinity, at t=0 use 0. -/
def compactSmoothObjective {A : Type*} [Fintype A]
    (P : A → ℝ) (R t : ℝ) : ℝ :=
  if t = 0 then 0 else if t = 1 then (-Real.log (peak P) - R) / 2
  else ((1 - t) * renyiNumerator P (t / (1 - t)) - t * R) / (1 + t)

/-- PDF p.4 onward: product law on n independently sampled letters. -/
def iid {A : Type*} (P : A → ℝ) (n : ℕ) (x : Fin n → A) : ℝ :=
  ∏ i, P (x i)

/-- PDF pp.4,7,9: extended negative logarithmic rate, used at positive blocklengths.
The n=0 convention is irrelevant to every limit at infinity. -/
def negativeLogRate (error : ℝ) (n : ℕ) : EReal :=
  if error = 0 then ⊤ else ((-Real.log error / (n : ℝ) : ℝ) : EReal)

/-- PDF p.7, (37): minimization over all subdistributions, including zero. -/
def smoothingBenchmark {A : Type*} [Fintype A]
    (P : A → ℝ) (R : ℝ) (n : ℕ) : ℝ :=
  sInf {v | ∃ Q : (Fin n → A) → ℝ, IsSubLaw Q ∧
    v = Real.exp ((n : ℝ) * R / 2) * Real.sqrt (peak Q) + 2 * l1 (iid P n) Q}

/-- PDF p.7: all extractors to floor(exp(nR)) outputs, no optimization surrogate. -/
def intrinsicExtractionError {A : Type*} [Fintype A]
    (P : A → ℝ) (R : ℝ) (n : ℕ) : ℝ :=
  sInf (Set.range (fun f : (Fin n → A) → Fin (Nat.floor (Real.exp ((n : ℝ) * R))) =>
    extractionError (iid P n) f))

/-- PDF p.5: a type is the empirical count vector of an actual word. -/
def counts {A : Type*} [DecidableEq A] {n : ℕ} (x : Fin n → A) (a : A) : ℕ :=
  (Finset.univ.filter (fun i => x i = a)).card

/-- PDF pp.5,8: all realized n-types, with no artificial impossible count vectors. -/
def types (A : Type*) [Fintype A] [DecidableEq A] (n : ℕ) : Finset (A → ℕ) :=
  Finset.univ.image (fun x : Fin n → A => counts x)

/-- PDF p.5, (22): the common probability of each word of a type, directly as a
product, so zero-support types have probability zero without log(0). -/
def typeAtom {A : Type*} [Fintype A] (P : A → ℝ) (q : A → ℕ) : ℝ :=
  ∏ a, P a ^ (q a)

/-- PDF p.5, (23): actual finiteVectorMass of a type class. -/
def typeMass {A : Type*} [Fintype A] [DecidableEq A]
    (P : A → ℝ) (n : ℕ) (q : A → ℕ) : ℝ :=
  ∑ x : Fin n → A, if counts x = q then iid P n x else 0

/-- PDF p.8, T_n^1[M]: equivalent to D+H >= log M/n at n>0, including
infinite cross-entropy when a positive count falls outside the support of P. -/
def firstTypes {A : Type*} [Fintype A] [DecidableEq A]
    (P : A → ℝ) (n M : ℕ) : Finset (A → ℕ) :=
  (types A n).filter (fun q => typeAtom P q ≤ 1 / (M : ℝ))

/-- PDF p.8, T_n^2[M]: this set need not be disjoint from T_n^1[M]. -/
def secondTypes {A : Type*} [Fintype A] [DecidableEq A]
    (P : A → ℝ) (n M : ℕ) : Finset (A → ℕ) :=
  (types A n).filter (fun q => typeMass P n q < 1 / (M : ℝ))

/-- PDF p.8, (48): empty maximum of nonnegative atom probabilities is zero. -/
def rareTypePeak {A : Type*} [Fintype A] [DecidableEq A]
    (P : A → ℝ) (n M : ℕ) : ℝ :=
  sSup (insert 0 ((fun q => typeAtom P q) '' (↑(secondTypes P n M) : Set (A → ℕ))))

/-- Sanity: the empty-word product is one. -/
example {A : Type*} (P : A → ℝ) (x : Fin 0 → A) : iid P 0 x = 1 := by
  simp [iid]

/-- Sanity: exact extraction has infinite exponent even at positive n. -/
example (n : ℕ) : negativeLogRate 0 n = ⊤ := by simp [negativeLogRate]

/-- Sanity: finiteVectorMass is the unweighted sum, including for a subdistribution. -/
example {A : Type*} [Fintype A] (P : A → ℝ) : finiteVectorMass P = ∑ a, P a := rfl

/-- PDF p.10: a measurable normalized conditional probability vector. Values on
null fibers may be any probability vector; the definitions integrate them out. -/
def IsConditionalLaw {A E : Type*} [Fintype A] [MeasurableSpace E]
    (p : E → A → ℝ) : Prop :=
  (∀ e, IsLaw (p e)) ∧ ∀ a, Measurable (fun e => p e a)

/-- PDF p.10: full conditional L1 leakage against the uniform key and actual Eve marginal. -/
def conditionalLeakage {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) {M : ℕ} (f : A → Fin M) : ℝ :=
  ∫ e, extractionError (p e) f ∂mu

/-- PDF p.10, (66): seed expectation; the seed is independent of (A,E). -/
def expectedConditionalLeakage {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) {M : ℕ} (h : HashEnsemble A M) : ℝ :=
  ∑ f, h.weight f * conditionalLeakage mu p f

/-- PDF p.10, (66): actual joint (key,E,public seed) distance; the factors inside
absolute values are the joint conditional densities relative to mu and counting. -/
def publicSeedLeakage {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) {M : ℕ} (h : HashEnsemble A M) : ℝ :=
  ∫ e, ∑ f, ∑ b : Fin M,
    |h.weight f * hashFiberMass (p e) f b - h.weight f / (M : ℝ)| ∂mu

/-- PDF p.10: conditional phi; finite A bounds this integrand away from zero and infinity
for t<1, so no nonintegrable Bochner default is used on the stated domain. -/
def conditionalPhi {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) (t : ℝ) : ℝ :=
  Real.log (∫ e, (∑ a, (p e a) ^ (1 / (1 - t))) ^ (1 - t) ∂mu)

/-- PDF p.11: s times the source's (unoptimized) conditional Renyi entropy. -/
def conditionalRenyiNumerator {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) (s : ℝ) : ℝ :=
  if s = 0 then 0 else -Real.log (∫ e, renyiPowerSum (p e) s ∂mu)

/-- PDF p.11: conditional Shannon entropy, natural logarithms; zero letters contribute 0. -/
def integratedFiberEntropyNats {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) : ℝ :=
  ∫ e, -(∑ a, p e a * Real.log (p e a)) ∂mu

/-- PDF p.11: fiber Renyi entropy, on the s>0 domain of Lemma 7. -/
def fiberRenyi {A : Type*} [Fintype A] (P : A → ℝ) (s : ℝ) : ℝ :=
  -Real.log (renyiPowerSum P s) / s

/-- PDF p.11: the new conditional source exponent. -/
def conditionalPhiExponent {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun t : ℝ => -conditionalPhi mu p t - t * R) '' Set.Icc 0 (1 / 2))

/-- PDF p.11: the conditional entropy comparison exponent e_H. -/
def conditionalHExponent {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun s : ℝ => (conditionalRenyiNumerator mu p s - s * R) / (1 + s)) '' Set.Icc 0 1)

/-- PDF p.11: the older comparison exponent e_tildeH, with denominator 2. -/
def conditionalTildeExponent {A E : Type*} [Fintype A] [MeasurableSpace E]
    (mu : Measure E) (p : E → A → ℝ) (R : ℝ) : ℝ :=
  sSup ((fun s : ℝ => (conditionalRenyiNumerator mu p s - s * R) / 2) '' Set.Icc 0 1)

/-- PDF p.11: actual iid conditional vector, with the product Eve marginal. -/
def conditionalIid {A E : Type*} (p : E → A → ℝ) (n : ℕ)
    (es : Fin n → E) (x : Fin n → A) : ℝ := ∏ i, p (es i) (x i)

/-- Sanity: tensoring zero copies has one empty-word atom. -/
example {A E : Type*} (p : E → A → ℝ) (es : Fin 0 → E) (x : Fin 0 → A) :
    conditionalIid p 0 es x = 1 := by simp [conditionalIid]

/-- PDF p.12: a probability law on a countable discrete input alphabet.
Nonnegative infinite sums never use the default of a nonsummable real tsum. -/
def IsENNRealDiscreteLaw {X : Type*} (p : X → ℝ≥0∞) : Prop := (∑' x, p x) = 1

/-- PDF p.12: classical stochastic channel densities relative to a common output
measure. Their nonnegative integral is one; continuous and discrete outputs are allowed. -/
def IsDensityChannel {X Y : Type*} [MeasurableSpace Y]
    (mu : Measure Y) (W : X → Y → ℝ≥0∞) : Prop :=
  ∀ x, Measurable (W x) ∧ (∫⁻ y, W x y ∂mu) = 1

/-- PDF p.13, (76): actual channel mixture, including countably many inputs. -/
def classicalOutputDensity {X Y : Type*} (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞)
    (y : Y) : ℝ≥0∞ := ∑' x, p x * W x y

/-- PDF p.12: exp(phi), represented before the logarithm. This may be infinite
for a countable input at positive t, and is NOT converted to a real integral. -/
def gallagerDensityMoment {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) (t : ℝ) : ℝ≥0∞ :=
  ∫⁻ y, (∑' x, p x * (W x y) ^ (1 / (1 - t))) ^ (1 - t) ∂mu

/-- PDF p.13, (76): exp(psi); outputs of zero mixture finiteVectorMass contribute zero before
any negative power is evaluated. -/
def psiMoment {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) (s : ℝ) : ℝ≥0∞ :=
  ∫⁻ y, if classicalOutputDensity W p y = 0 then 0 else
    (∑' x, p x * (W x y) ^ (1 + s)) * (classicalOutputDensity W p y) ^ (-s) ∂mu

/-- PDF p.13: secrecy exponent defined with extended logarithms so an infinite
channel renyiPowerSum gives minus infinity, rather than Real.log of a default value. -/
def wiretapPhiExponent {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) (R : ℝ) : EReal :=
  sSup ((fun t : ℝ => (t * R : ℝ) - ENNReal.log (gallagerDensityMoment mu W p t)) ''
    Set.Icc 0 (1 / 2))

/-- PDF p.14, (77): comparison exponent e_psi, with denominator 1+s. -/
def wiretapPsiExponent {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) (R : ℝ) : EReal :=
  sSup ((fun s : ℝ => ((s * R : ℝ) - ENNReal.log (psiMoment mu W p s)) /
    ((1 + s : ℝ) : EReal)) '' Set.Icc 0 1)

/-- PDF p.14, (79): Pinsker comparison exponent with denominator 2. -/
def wiretapTildeExponent {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) (R : ℝ) : EReal :=
  sSup ((fun s : ℝ => ((s * R : ℝ) - ENNReal.log (psiMoment mu W p s)) /
    (2 : EReal)) '' Set.Icc 0 1)

/-- PDF p.12: stochastic encoder distributions and disjoint measurable decoding
sets. Uniform messages are included in every performance definition below. -/
structure WiretapCode (X Y : Type*) [MeasurableSpace Y] (M : ℕ) where
  encoder : Fin M → X → ℝ≥0∞
  encoderLaw : ∀ i, IsENNRealDiscreteLaw (encoder i)
  decoding : Fin M → Set Y
  decodingMeasurable : ∀ i, MeasurableSet (decoding i)
  decodingDisjoint : Pairwise (fun i j => Disjoint (decoding i) (decoding j))

/-- PDF p.12: average Bob error for this actual stochastic code. -/
def wiretapDecodingError {X Y : Type*} [MeasurableSpace Y] {M : ℕ}
    (mu : Measure Y) (W : X → Y → ℝ≥0∞) (C : WiretapCode X Y M) : ℝ≥0∞ :=
  (M : ℝ≥0∞)⁻¹ * ∑ i, ∫⁻ y,
    if y ∈ C.decoding i then 0 else classicalOutputDensity W (C.encoder i) y ∂mu

/-- PDF p.12: the actual average Eve output of a uniform message. -/
def codeEveAverage {X Y E : Type*} [MeasurableSpace Y] {M : ℕ}
    (W : X → E → ℝ≥0∞) (C : WiretapCode X Y M) (e : E) : ℝ≥0∞ :=
  (M : ℝ≥0∞)⁻¹ * ∑ i, classicalOutputDensity W (C.encoder i) e

/-- PDF p.12: full L1 message–Eve dependence relative to the ACTUAL Eve marginal,
not to an independently supplied comparison state. Probability densities are finite a.e. -/
def codeLeakage {X Y E : Type*} [MeasurableSpace Y] [MeasurableSpace E] {M : ℕ}
    (mu : Measure E) (W : X → E → ℝ≥0∞) (C : WiretapCode X Y M) : ℝ≥0∞ :=
  (M : ℝ≥0∞)⁻¹ * ∑ i, ∫⁻ e,
    ((classicalOutputDensity W (C.encoder i) e - codeEveAverage W C e) +
      (codeEveAverage W C e - classicalOutputDensity W (C.encoder i) e)) ∂mu

/-- PDF p.13: product channel densities, with no product restriction on code encoders. -/
def blockDensity {X Y : Type*} (W : X → Y → ℝ≥0∞) (n : ℕ)
    (x : Fin n → X) (y : Fin n → Y) : ℝ≥0∞ := ∏ i, W (x i) (y i)

/-- PDF p.13: only the random-coding input law is tensorized. -/
def discreteIid {X : Type*} (p : X → ℝ≥0∞) (n : ℕ) (x : Fin n → X) : ℝ≥0∞ :=
  ∏ i, p (x i)

/-- PDF p.13: normalized negative log of an actual nonnegative error. -/
def negativeLogRateENN (error : ℝ≥0∞) (n : ℕ) : EReal :=
  -ENNReal.log error / (n : EReal)

/-- PDF p.13: mutual information in nats, via the nonnegative KL generator
u log u-u+1. This equals D(p(x)W_x(y) || p(x)W_p(y)); no signed
nonintegrable integral or infinity-minus-infinity is used. -/
def classicalMutualInformationNats {X Y : Type*} [MeasurableSpace Y] (mu : Measure Y)
    (W : X → Y → ℝ≥0∞) (p : X → ℝ≥0∞) : ℝ≥0∞ :=
  ∑' x, p x * ∫⁻ y,
    let q := classicalOutputDensity W p y
    let u := (W x y / q).toReal
    q * ENNReal.ofReal (u * Real.log u - u + 1) ∂mu

/-- Sanity: tensoring one channel use does not mix different channel inputs. -/
example {X Y : Type*} (W : X → Y → ℝ≥0∞) (x : Fin 1 → X) (y : Fin 1 → Y) :
    blockDensity W 1 x y = W (x 0) (y 0) := by simp [blockDensity]

/-- PDF p.15: uniform law on a finite nonempty alphabet. -/
def finiteUniformMass (X : Type*) [Fintype X] : X → ℝ≥0∞ :=
  fun _ => (Fintype.card X : ℝ≥0∞)⁻¹

/-- PDF pp.14–15: the actual additive noise channel, with z-x in this order. -/
def additiveDensity {G : Type*} [AddGroup G] (P : G → ℝ) (x z : G) : ℝ≥0∞ :=
  ENNReal.ofReal (P (z - x))

/-- PDF p.15, (82): general additive channel, relative to counting on G times the
actual marginal measure of side noise E. This includes continuous side noise. -/
def generalAdditiveDensity {G E : Type*} [AddGroup G]
    (p : E → G → ℝ) (x : G) (ze : G × E) : ℝ≥0∞ :=
  ENNReal.ofReal (p ze.2 (ze.1 - x))

/-- PDF p.15: uniform law on C1, as a law on the ambient input alphabet. -/
def subgroupUniform {G : Type*} [AddGroup G] [Fintype G]
    (C1 : AddSubgroup G) (x : G) : ℝ≥0∞ :=
  if x ∈ C1 then (Fintype.card C1 : ℝ≥0∞)⁻¹ else 0

/-- PDF p.15, Condition 4: fixed size L and the paper's L/|C1| collision bound.
C1 and W are chosen independently of the seed. -/
def SubcodeCondition {G S : Type*} [AddCommGroup G] [Fintype G] [Fintype S]
    (C1 : AddSubgroup G) (H : S → AddSubgroup C1) (w : S → ℝ) (L : ℕ) : Prop :=
  IsLaw w ∧ (∀ seed, Fintype.card (H seed) = L) ∧
    ∀ x : C1, x ≠ 0 → (∑ seed, if x ∈ H seed then w seed else 0) ≤
      (L : ℝ) / (Fintype.card C1 : ℝ)

/-- PDF p.15: the actual uniform-coset output for representative x. -/
def cosetOutput {G E : Type*} [AddCommGroup G] [Fintype G]
    (W : G → E → ℝ≥0∞) (C1 : AddSubgroup G) (H : AddSubgroup C1)
    (x : C1) (e : E) : ℝ≥0∞ :=
  (Fintype.card H : ℝ≥0∞)⁻¹ * ∑ h : H, W ((x + h.1 : C1) : G) e

/-- PDF p.15: full L1 coset-key leakage. Averaging representatives with 1/|C1|
counts each coset L times and is exactly uniform averaging over |C1|/L keys. -/
def cosetLeakage {G E : Type*} [AddCommGroup G] [Fintype G] [MeasurableSpace E]
    (mu : Measure E) (W : G → E → ℝ≥0∞) (C1 : AddSubgroup G)
    (H : AddSubgroup C1) : ℝ≥0∞ :=
  (Fintype.card C1 : ℝ≥0∞)⁻¹ * ∑ x : C1, ∫⁻ e,
    ((cosetOutput W C1 H x e - classicalOutputDensity W (subgroupUniform C1) e) +
      (classicalOutputDensity W (subgroupUniform C1) e - cosetOutput W C1 H x e)) ∂mu

/-- PDF p.15: averaged leakage includes the public seed as side information. -/
def expectedCosetLeakage {G E S : Type*} [AddCommGroup G] [Fintype G]
    [Fintype S] [MeasurableSpace E] (mu : Measure E) (W : G → E → ℝ≥0∞)
    (C1 : AddSubgroup G) (H : S → AddSubgroup C1) (w : S → ℝ) : ℝ≥0∞ :=
  ∑ seed, ENNReal.ofReal (w seed) * cosetLeakage mu W C1 (H seed)

/-- Sanity: the additive channel uses noise at zero when input equals output. -/
example {G : Type*} [AddGroup G] (P : G → ℝ) (x : G) :
    additiveDensity P x x = ENNReal.ofReal (P 0) := by simp [additiveDensity]

/-- PDF p.16, (95): two compatible source marginals; all Bob and Eve metrics,
including the public mask, depend only on these marginals. Compatibility is exactly
that they have the same A-law, and permits gluing them to a joint source. -/
def CompatibleMarginals {A B E : Type*} [Fintype A]
    [MeasurableSpace B] [MeasurableSpace E]
    (muB : Measure B) (pB : B → A → ℝ) (muE : Measure E) (pE : E → A → ℝ) : Prop :=
  IsConditionalLaw pB ∧ IsConditionalLaw pE ∧
    ∀ a, (∫ b, pB b a ∂muB) = ∫ e, pE e a ∂muE

/-- Sanity: zero subdistributions have zero finiteVectorMass-scaled uniformity error. -/
example {A : Type*} [Fintype A] {M : ℕ} (f : A → Fin M) :
    extractionError (fun _ : A => 0) f = 0 := by
  simp [extractionError, hashFiberMass, finiteVectorMass]

/-- Sanity: full L1 distance vanishes at identical vectors. -/
example {A : Type*} [Fintype A] (P : A → ℝ) : l1 P P = 0 := by simp [l1]

/-- Sanity: a singleton discrete input has its full probability finiteVectorMass at its one letter. -/
example : IsENNRealDiscreteLaw (fun _ : Unit => (1 : ℝ≥0∞)) := by simp [IsENNRealDiscreteLaw]

/-- Sanity: a zero count contributes a factor one, even on a zero-probability letter. -/
example {A : Type*} [Fintype A] (P : A → ℝ) : typeAtom P (fun _ => 0) = 1 := by
  simp [typeAtom]

/-- Sanity: trivial side information and a deterministic source give phi(0)=0. -/
example : conditionalPhi (Measure.dirac ()) (fun _ : Unit => fun _ : Unit => (1 : ℝ)) 0 = 0 := by
  simp [conditionalPhi]

/-- Sanity: the one-point classical channel has renyiPowerSum one at t=0. -/
example : gallagerDensityMoment (Measure.dirac ()) (fun _ : Unit => fun _ : Unit => (1 : ℝ≥0∞))
    (fun _ : Unit => (1 : ℝ≥0∞)) 0 = 1 := by
  simp [gallagerDensityMoment]

/-- Sanity: a one-message code has no message--Eve dependence. -/
example {X Y E : Type*} [MeasurableSpace Y] [MeasurableSpace E]
    (mu : Measure E) (W : X → E → ℝ≥0∞) (C : WiretapCode X Y 1) :
    codeLeakage mu W C = 0 := by
  simp [codeLeakage, codeEveAverage]

end QAlgorithms.Papers.Independent.Advance50.P28
Source
Tight exponential analysis of universally composable privacy amplification and its applications, arXiv:1010.1358v5, https://arxiv.org/abs/1010.1358v5
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Advance50.P28.CompatibleMarginals

For any finite set AAA, measurable spaces B,EB,EB,E, measures μB,μE\mu_B,\mu_EμB​,μE​, and functions pB:B×A→Rp_B:B\times A\to\mathbb RpB​:B×A→R and pE:E×A→Rp_E:E\times A\to\mathbb RpE​:E×A→R, this predicate means that, for every b∈Bb\in Bb∈B, the numbers pB(b,a)p_B(b,a)pB​(b,a) are nonnegative and sum to 111 over a∈Aa\in Aa∈A; for every e∈Ee\in Ee∈E, the numbers pE(e,a)p_E(e,a)pE​(e,a) are nonnegative and sum to 111; every coordinate function b↦pB(b,a)b\mapsto p_B(b,a)b↦pB​(b,a) and e↦pE(e,a)e\mapsto p_E(e,a)e↦pE​(e,a) is measurable; and

∀a∈A,∫BpB(b,a) dμB(b)=∫EpE(e,a) dμE(e).\forall a\in A,\qquad \int_B p_B(b,a)\,d\mu_B(b)=\int_E p_E(e,a)\,d\mu_E(e).∀a∈A,∫B​pB​(b,a)dμB​(b)=∫E​pE​(e,a)dμE​(e).

These are pointwise normalization requirements, including at points of measure zero. Neither measure is required to be a probability measure, and integrability is not separately assumed; the integrals are the total real-valued integrals, which return zero for nonintegrable functions. Empty sets are permitted: if AAA is empty, the normalization conditions can hold only when both BBB and EEE are empty.

QAlgorithms.Papers.Independent.Advance50.P28.HashEnsemble

For a finite type AAA and a natural number MMM, this structure consists of a real weight w(f)w(f)w(f) for every map f:A→[M]f:A\to[M]f:A→[M], where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, together with the requirements w(f)≥0w(f)\ge0w(f)≥0 for every such map and ∑f:A→[M]w(f)=1\sum_{f:A\to[M]}w(f)=1∑f:A→[M]​w(f)=1. If AAA is empty, there is exactly one such map for every MMM, including M=0M=0M=0, and its weight must be one. If AAA is nonempty and M=0M=0M=0, there are no such maps, so the normalization requirement cannot be satisfied.

QAlgorithms.Papers.Independent.Advance50.P28.IsConditionalLaw

For any finite type AAA, any measurable space EEE, and any function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, this predicate requires that, for every e∈Ee\in Ee∈E, all numbers p(e,a)p(e,a)p(e,a) are nonnegative and ∑a∈Ap(e,a)=1\sum_{a\in A}p(e,a)=1∑a∈A​p(e,a)=1, and that, for each a∈Aa\in Aa∈A, the function e↦p(e,a)e\mapsto p(e,a)e↦p(e,a) is measurable. No measure on EEE is specified. If EEE is empty, these conditions hold vacuously; if AAA is empty and EEE is nonempty, the normalization condition is impossible.

QAlgorithms.Papers.Independent.Advance50.P28.IsDensityChannel

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, a measure μ\muμ on YYY, and a function W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞], this predicate means that, for every x∈Xx\in Xx∈X, the function y↦W(x,y)y\mapsto W(x,y)y↦W(x,y) is measurable and

∫YW(x,y) dμ(y)=1,\int_Y W(x,y)\,d\mu(y)=1,∫Y​W(x,y)dμ(y)=1,

using the nonnegative extended integral. No probability-measure assumption on μ\muμ, countability assumption on XXX, or joint measurability assumption is imposed. If XXX is empty, the predicate holds vacuously.

QAlgorithms.Papers.Independent.Advance50.P28.IsENNRealDiscreteLaw

For any type XXX, with no finiteness, countability, or nonemptiness assumption, and any function p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], this predicate means exactly

∑x∈Xp(x)=1,\sum_{x\in X}p(x)=1,x∈X∑​p(x)=1,

where the sum is the possibly infinite sum of extended nonnegative real numbers. For empty XXX, the sum is 000, so the predicate cannot hold.

QAlgorithms.Papers.Independent.Advance50.P28.IsSubLaw

For any finite type AAA and any function P:A→RP:A\to\mathbb RP:A→R, this predicate means that P(a)≥0P(a)\ge 0P(a)≥0 for every a∈Aa\in Aa∈A and ∑a∈AP(a)≤1\sum_{a\in A}P(a)\le 1∑a∈A​P(a)≤1. The total mass may be zero. If AAA is empty, both requirements hold.

QAlgorithms.Papers.Independent.Advance50.P28.StronglyUniversal2

For any finite type AAA, any natural number MMM, and any ensemble hhh assigning nonnegative real weights w(f)w(f)w(f) to maps f:A→[M]f:A\to[M]f:A→[M] with ∑fw(f)=1\sum_f w(f)=1∑f​w(f)=1, where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, this predicate requires both that ∑f: f(a)=bw(f)=1/M\sum_{f:\,f(a)=b}w(f)=1/M∑f:f(a)=b​w(f)=1/M for every a∈Aa\in Aa∈A and b∈[M]b\in[M]b∈[M], and that for every a∈Aa\in Aa∈A, b∈[M]b\in[M]b∈[M], and map g:A→[M]g:A\to[M]g:A→[M],

∑f:A→[M]f(a)=b∀a′≠a, f(a′)=g(a′)w(f)=1M∑f:A→[M]∀a′≠a, f(a′)=g(a′)w(f).\sum_{\substack{f:A\to[M]\\f(a)=b\\ \forall a'\ne a,\ f(a')=g(a')}}w(f) = \frac1M \sum_{\substack{f:A\to[M]\\ \forall a'\ne a,\ f(a')=g(a')}}w(f).f:A→[M]f(a)=b∀a′=a, f(a′)=g(a′)​∑​w(f)=M1​f:A→[M]∀a′=a, f(a′)=g(a′)​∑​w(f).

The second equality is required even when the total weight of maps agreeing with ggg away from aaa is zero. If AAA is empty, both requirements are vacuous. Real division by zero is interpreted as zero; an ensemble with M=0M=0M=0 can exist only when AAA is empty.

QAlgorithms.Papers.Independent.Advance50.P28.SubcodeCondition

For a finite commutative additive group GGG, a finite type SSS, an additive subgroup C1≤GC_1\le GC1​≤G, a family of additive subgroups Hs≤C1H_s\le C_1Hs​≤C1​ indexed by s∈Ss\in Ss∈S, a real-valued function w:S→Rw:S\to\mathbb Rw:S→R, and a natural number LLL, this predicate means that all three of the following conditions hold:

ws≥0 for every s,∑s∈Sws=1;∣Hs∣=L for every s;∀ x∈C1∖{0},∑s∈Sx∈Hsws≤L∣C1∣.w_s\ge0\ \text{for every }s,\qquad \sum_{s\in S}w_s=1; \qquad |H_s|=L\ \text{for every }s; \qquad \forall\,x\in C_1\setminus\{0\},\quad \sum_{\substack{s\in S\\x\in H_s}}w_s\le\frac{L}{|C_1|}.ws​≥0 for every s,s∈S∑​ws​=1;∣Hs​∣=L for every s;∀x∈C1​∖{0},s∈Sx∈Hs​​∑​ws​≤∣C1​∣L​.

The last condition excludes x=0x=0x=0 and is vacuous when C1={0}C_1=\{0\}C1​={0}. Although no separate nonemptiness or positivity assumptions are supplied, the predicate cannot hold when SSS is empty, and whenever it holds, L≥1L\ge1L≥1, because every HsH_sHs​ contains 000.

QAlgorithms.Papers.Independent.Advance50.P28.Universal2

For any finite type AAA, any natural number MMM, and any ensemble hhh assigning nonnegative real weights w(f)w(f)w(f) to maps f:A→[M]f:A\to[M]f:A→[M] with ∑fw(f)=1\sum_f w(f)=1∑f​w(f)=1, where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, this predicate requires that for every pair of distinct elements a,a′∈Aa,a'\in Aa,a′∈A,

∑f:A→[M]f(a)=f(a′)w(f)≤1M.\sum_{\substack{f:A\to[M]\\f(a)=f(a')}}w(f)\le\frac1M.f:A→[M]f(a)=f(a′)​∑​w(f)≤M1​.

If AAA has at most one element, the requirement is vacuous. Real division by zero is interpreted as zero; an ensemble with M=0M=0M=0 can exist only when AAA is empty.

QAlgorithms.Papers.Independent.Advance50.P28.WiretapCode

For arbitrary types X,YX,YX,Y, a specified measurable space on YYY, and any natural number MMM, a code consists of functions pi:X→[0,∞]p_i:X\to[0,\infty]pi​:X→[0,∞] and measurable sets Di⊆YD_i\subseteq YDi​⊆Y, indexed by i=0,…,M−1i=0,\ldots,M-1i=0,…,M−1, such that ∑x′pi(x)=1\sum_x' p_i(x)=1∑x′​pi​(x)=1 for every iii, and Di∩Dj=∅D_i\cap D_j=\varnothingDi​∩Dj​=∅ whenever i≠ji\ne ji=j. The sets need not cover YYY; no measurable structure or finiteness assumption is imposed on XXX. The value M=0M=0M=0 is permitted, in which case all these conditions are vacuous; if M>0M>0M>0, the normalization conditions cannot hold when XXX is empty.

QAlgorithms.Papers.Independent.Advance50.P28.additiveDensity

For any additive group GGG, any function P:G→RP:G\to\mathbb RP:G→R, and any x,z∈Gx,z\in Gx,z∈G, this defines

WP(x,z)=ofReal⁡ ⁣(P(z−x))∈[0,∞],W_P(x,z)=\operatorname{ofReal}\!\bigl(P(z-x)\bigr)\in[0,\infty],WP​(x,z)=ofReal(P(z−x))∈[0,∞],

where ofReal⁡(r)\operatorname{ofReal}(r)ofReal(r) is the nonnegative real max⁡(r,0)\max(r,0)max(r,0), viewed in [0,∞][0,\infty][0,∞], and z−x=z+(−x)z-x=z+(-x)z−x=z+(−x). The group need not be commutative, and no nonnegativity, normalization, or measurability assumption is imposed on PPP; in particular, negative values of P(z−x)P(z-x)P(z−x) produce 000.

QAlgorithms.Papers.Independent.Advance50.P28.blockDensity

For arbitrary types X,YX,YX,Y, any function W:X×Y→[0,∞]W:X\times Y\to[0,\infty]W:X×Y→[0,∞], any natural number nnn, and tuples x∈Xnx\in X^nx∈Xn, y∈Yny\in Y^ny∈Yn, the defined block function is

W(n)(x,y)=∏i=0n−1W(xi,yi).W^{(n)}(x,y)=\prod_{i=0}^{n-1}W(x_i,y_i).W(n)(x,y)=i=0∏n−1​W(xi​,yi​).

There are no measurability or normalization assumptions. For n=0n=0n=0, the empty product is 111, including when either underlying type is empty.

QAlgorithms.Papers.Independent.Advance50.P28.classicalMutualInformationNats

For arbitrary types X,YX,YX,Y, a measurable space on YYY, any measure μ\muμ on YYY, and arbitrary functions W:X×Y→[0,∞]W:X\times Y\to[0,\infty]W:X×Y→[0,∞] and p:X→[0,∞]p:X\to[0,\infty]p:X→[0,∞], set q(y)=∑x′p(x)W(x,y)q(y)=\sum_x'p(x)W(x,y)q(y)=∑x′​p(x)W(x,y) and u(x,y)=toReal⁡(W(x,y)/q(y))u(x,y)=\operatorname{toReal}(W(x,y)/q(y))u(x,y)=toReal(W(x,y)/q(y)). The defined quantity is

∑x′p(x)∫Y−q(y) ofReal⁡ ⁣(u(x,y)log⁡u(x,y)−u(x,y)+1) dμ(y).\sum_x'p(x)\int_Y^- q(y)\,\operatorname{ofReal}\!\left(u(x,y)\log u(x,y)-u(x,y)+1\right)\,d\mu(y).x∑′​p(x)∫Y−​q(y)ofReal(u(x,y)logu(x,y)−u(x,y)+1)dμ(y).

Here toReal⁡\operatorname{toReal}toReal sends finite nonnegative extended reals to their real values and sends +∞+\infty+∞ to 000; ofReal⁡(a)=max⁡(a,0)\operatorname{ofReal}(a)=\max(a,0)ofReal(a)=max(a,0), embedded in [0,∞][0,\infty][0,∞]; and the real logarithm has its total value log⁡0=0\log0=0log0=0. Division, products, sums, and the lower integral use their total extended nonnegative conventions, including at q(y)=0q(y)=0q(y)=0 or +∞+\infty+∞. No countability, measurability, channel normalization, or normalization of ppp is assumed.

QAlgorithms.Papers.Independent.Advance50.P28.classicalOutputDensity

For arbitrary types X,YX,YX,Y, any function W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞], any function p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any y∈Yy\in Yy∈Y, the defined value is

q(y)=∑x∈Xp(x)W(x,y),q(y)=\sum_{x\in X}p(x)W(x,y),q(y)=x∈X∑​p(x)W(x,y),

where the sum and products are taken in the extended nonnegative reals. No normalization, measurability, finiteness, or countability assumptions are imposed. The value may be +∞+\infty+∞; if XXX is empty it is 000, and the product convention includes 0⋅(+∞)=00\cdot(+\infty)=00⋅(+∞)=0.

QAlgorithms.Papers.Independent.Advance50.P28.codeEveAverage

For arbitrary types X,Y,EX,Y,EX,Y,E, a measurable space on YYY, any natural number MMM, any function W:X×E→[0,∞]W:X\times E\to[0,\infty]W:X×E→[0,∞], a code CCC with encoder masses pi:X→[0,∞]p_i:X\to[0,\infty]pi​:X→[0,∞] satisfying ∑x′pi(x)=1\sum_x'p_i(x)=1∑x′​pi​(x)=1 and pairwise disjoint measurable decoding sets in YYY, and any e∈Ee\in Ee∈E, the defined average is

q‾(e)=1M∑i=0M−1∑x′pi(x)W(x,e).\overline q(e)=\frac{1}{M}\sum_{i=0}^{M-1}\sum_x'p_i(x)W(x,e).q​(e)=M1​i=0∑M−1​x∑′​pi​(x)W(x,e).

This definition uses no measure or measurable structure on EEE, imposes no conditions on WWW, and does not use the decoding sets. Its value is 000 when M=0M=0M=0, using arithmetic in [0,∞][0,\infty][0,∞].

QAlgorithms.Papers.Independent.Advance50.P28.codeLeakage

For arbitrary types X,Y,EX,Y,EX,Y,E, measurable spaces on Y,EY,EY,E, any natural number MMM, any measure μ\muμ on EEE, any function W:X×E→[0,∞]W:X\times E\to[0,\infty]W:X×E→[0,∞], and a code with normalized encoder masses pip_ipi​ and pairwise disjoint measurable decoding sets in YYY, put qi(e)=∑x′pi(x)W(x,e)q_i(e)=\sum_x'p_i(x)W(x,e)qi​(e)=∑x′​pi​(x)W(x,e) and q‾(e)=M−1∑iqi(e)\overline q(e)=M^{-1}\sum_iq_i(e)q​(e)=M−1∑i​qi​(e). The defined leakage is

1M∑i=0M−1∫E−[(qi(e)\dotminusq‾(e))+(q‾(e)\dotminusqi(e))] dμ(e),\frac{1}{M}\sum_{i=0}^{M-1}\int_E^- \bigl[(q_i(e)\mathbin{\dotminus}\overline q(e)) +(\overline q(e)\mathbin{\dotminus}q_i(e))\bigr]\,d\mu(e),M1​i=0∑M−1​∫E−​[(qi​(e)\dotminusq​(e))+(q​(e)\dotminusqi​(e))]dμ(e),

where each pip_ipi​ satisfies ∑x′pi(x)=1\sum_x'p_i(x)=1∑x′​pi​(x)=1, and \dotminus\dotminus\dotminus is truncated subtraction in [0,∞][0,\infty][0,∞], including ∞\dotminus∞=0\infty\mathbin{\dotminus}\infty=0∞\dotminus∞=0. For finite arguments the bracket is the absolute difference. No conditions are imposed on WWW; the decoding sets do not enter this expression. For M=0M=0M=0, the value is 000.

QAlgorithms.Papers.Independent.Advance50.P28.compactSmoothObjective

For any finite type AAA, possibly empty, any P:A→RP:A\to\mathbb RP:A→R, and any real numbers R,tR,tR,t, let p∗=sup⁡{P(a):a∈A}p_*=\sup\{P(a):a\in A\}p∗​=sup{P(a):a∈A}, with p∗=0p_*=0p∗​=0 when AAA is empty, and let HP(0)=0H_P(0)=0HP​(0)=0 and HP(s)=−log⁡(∑a∈AP(a)1+s)H_P(s)=-\log(\sum_{a\in A}P(a)^{1+s})HP​(s)=−log(∑a∈A​P(a)1+s) for s≠0s\ne0s=0. The objective is

{0,t=0,−log⁡p∗−R2,t=1,(1−t)HP ⁣(t1−t)−tR1+t,t≠0, t≠1.\begin{cases} 0,&t=0,\\[2pt] \dfrac{-\log p_*-R}{2},&t=1,\\[6pt] \dfrac{(1-t)H_P\!\left(\frac{t}{1-t}\right)-tR}{1+t},&t\ne0,\ t\ne1. \end{cases}⎩⎨⎧​0,2−logp∗​−R​,1+t(1−t)HP​(1−tt​)−tR​,​t=0,t=1,t=0, t=1.​

Neither t∈[0,1]t\in[0,1]t∈[0,1] nor any probability-law condition on PPP is required. Powers and logarithms are total real operations, with log⁡0=0\log0=0log0=0; division by zero is zero, so the last branch also assigns a value at t=−1t=-1t=−1, namely zero.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalHExponent

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, and real number RRR, define N(0)=0N(0)=0N(0)=0 and, for s≠0s\ne0s=0,

N(s)=−log⁡ ⁣(∫E∑a∈Ap(e,a)1+s dμ(e)).N(s)=-\log\!\left(\int_E\sum_{a\in A}p(e,a)^{1+s}\,d\mu(e)\right).N(s)=−log(∫E​a∈A∑​p(e,a)1+sdμ(e)).

The declaration defines the real number

sup⁡0≤s≤1N(s)−sR1+s.\sup_{0\le s\le1}\frac{N(s)-sR}{1+s}.0≤s≤1sup​1+sN(s)−sR​.

Both endpoints are included, and the objective at s=0s=0s=0 is zero. No nonnegativity, normalization, measurability, or integrability condition on ppp, or probability condition on μ\muμ, is required. Powers are total real powers; the natural logarithm satisfies log⁡0=0\log0=0log0=0 and uses log⁡∣u∣\log|u|log∣u∣ for negative uuu; a nonintegrable integrand has integral zero. The total real supremum is zero if the objective values are unbounded above, and no maximizing sss is asserted to exist.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalIid

For arbitrary types AAA and EEE, any function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, any natural number nnn, and sequences (ei)i=0n−1(e_i)_{i=0}^{n-1}(ei​)i=0n−1​ in EEE and (xi)i=0n−1(x_i)_{i=0}^{n-1}(xi​)i=0n−1​ in AAA, this defines the real number ∏i=0n−1p(ei,xi)\prod_{i=0}^{n-1}p(e_i,x_i)∏i=0n−1​p(ei​,xi​). Neither type is required to be finite or measurable, and no nonnegativity or normalization condition on ppp is imposed. For n=0n=0n=0, the empty product is one.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalLeakage

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, natural number MMM, and function f:A→{0,…,M−1}f:A\to\{0,\ldots,M-1\}f:A→{0,…,M−1}, this defines the real number

∫E∑b=0M−1∣∑a∈Af(a)=bp(e,a)−∑a∈Ap(e,a)M∣ dμ(e).\int_E\sum_{b=0}^{M-1} \left|\sum_{\substack{a\in A\\f(a)=b}}p(e,a) -\frac{\sum_{a\in A}p(e,a)}{M}\right|\,d\mu(e).∫E​b=0∑M−1​​a∈Af(a)=b​∑​p(e,a)−M∑a∈A​p(e,a)​​dμ(e).

There is no assumption that ppp is measurable, nonnegative, or normalized, or that μ\muμ is a probability measure. The real integral is defined to be zero when its integrand is not integrable. The case M=0M=0M=0 is included: existence of fff then forces AAA to be empty, and the value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalPhi

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, and real number ttt, this defines

log⁡ ⁣(∫E(∑a∈Ap(e,a) 1/(1−t))1−t dμ(e)).\log\!\left(\int_E \left(\sum_{a\in A}p(e,a)^{\,1/(1-t)}\right)^{1-t}\,d\mu(e)\right).log​∫E​(a∈A∑​p(e,a)1/(1−t))1−tdμ(e)​.

The powers are the total real power operation, and log⁡\loglog is the total real natural logarithm, with log⁡0=0\log 0=0log0=0 and log⁡u=log⁡∣u∣\log u=\log|u|logu=log∣u∣ for u<0u<0u<0. No restriction on ttt, nonnegativity or normalization of ppp, measurability, integrability, or probability normalization of μ\muμ is required. A nonintegrable integrand gives integral zero and hence value zero. At t=1t=1t=1, division by zero is interpreted as zero and a zeroth power is one, so the expression becomes log⁡(∫E1 dμ)\log(\int_E1\,d\mu)log(∫E​1dμ) under these same integral conventions.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalPhiExponent

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, and real number RRR, this defines the real supremum

sup⁡0≤t≤1/2{−log⁡ ⁣(∫E(∑a∈Ap(e,a) 1/(1−t))1−t dμ(e))−tR}.\sup_{0\le t\le1/2} \left\{ -\log\!\left(\int_E \left(\sum_{a\in A}p(e,a)^{\,1/(1-t)}\right)^{1-t}\,d\mu(e)\right)-tR \right\}.0≤t≤1/2sup​⎩⎨⎧​−log​∫E​(a∈A∑​p(e,a)1/(1−t))1−tdμ(e)​−tR⎭⎬⎫​.

Both endpoints are included. No nonnegativity, normalization, measurability, or integrability of ppp, or probability normalization of μ\muμ, is assumed. Powers are total real powers, and the natural logarithm has log⁡0=0\log0=0log0=0 and equals log⁡∣u∣\log|u|log∣u∣ for negative uuu; a nonintegrable integrand has integral zero. This uses the total real supremum operation, whose value is zero if the displayed set is unbounded above; attainment is not part of the definition.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalRenyiNumerator

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, and real number sss, this defines

{0,s=0,−log⁡ ⁣(∫E∑a∈Ap(e,a)1+s dμ(e)),s≠0.\begin{cases} 0,&s=0,\\[2pt] -\log\!\left(\displaystyle\int_E\sum_{a\in A}p(e,a)^{1+s}\,d\mu(e)\right),&s\ne0. \end{cases}⎩⎨⎧​0,−log(∫E​a∈A∑​p(e,a)1+sdμ(e)),​s=0,s=0.​

The powers are total real powers, and the natural logarithm satisfies log⁡0=0\log0=0log0=0 and uses log⁡∣u∣\log|u|log∣u∣ for negative uuu. No positivity, normalization, measurability, or integrability condition on ppp, and no probability condition on μ\muμ, is assumed. In the second branch, a nonintegrable integrand gives integral zero and therefore value zero; an empty AAA also gives value zero for every sss.

QAlgorithms.Papers.Independent.Advance50.P28.conditionalTildeExponent

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, and real number RRR, define N(0)=0N(0)=0N(0)=0 and, for s≠0s\ne0s=0,

N(s)=−log⁡ ⁣(∫E∑a∈Ap(e,a)1+s dμ(e)).N(s)=-\log\!\left(\int_E\sum_{a\in A}p(e,a)^{1+s}\,d\mu(e)\right).N(s)=−log(∫E​a∈A∑​p(e,a)1+sdμ(e)).

The declaration defines

sup⁡0≤s≤1N(s)−sR2.\sup_{0\le s\le1}\frac{N(s)-sR}{2}.0≤s≤1sup​2N(s)−sR​.

Both endpoints are included, and the objective at s=0s=0s=0 is zero. No nonnegativity, normalization, measurability, or integrability of ppp, or probability normalization of μ\muμ, is assumed. Powers are total real powers; the natural logarithm has log⁡0=0\log0=0log0=0 and equals log⁡∣u∣\log|u|log∣u∣ for negative uuu; a nonintegrable integrand has integral zero. The total real supremum is zero if the objective values are unbounded above, and attainment is not asserted.

QAlgorithms.Papers.Independent.Advance50.P28.cosetLeakage

For a finite commutative additive group GGG, a measurable space EEE, an arbitrary measure μ\muμ on EEE, a function W:G→E→[0,∞]W:G\to E\to[0,\infty]W:G→E→[0,∞], an additive subgroup C1≤GC_1\le GC1​≤G, and an additive subgroup H≤C1H\le C_1H≤C1​, put

AH(x,e)=∣H∣−1∑h∈HW(x+h,e),B(e)=∑g∈GuC1(g)W(g,e),uC1(g)={∣C1∣−1,g∈C1,0,g∉C1.A_H(x,e)=|H|^{-1}\sum_{h\in H}W(x+h,e), \qquad B(e)=\sum_{g\in G}u_{C_1}(g)W(g,e), \qquad u_{C_1}(g)= \begin{cases}|C_1|^{-1},&g\in C_1,\\0,&g\notin C_1.\end{cases}AH​(x,e)=∣H∣−1h∈H∑​W(x+h,e),B(e)=g∈G∑​uC1​​(g)W(g,e),uC1​​(g)={∣C1​∣−1,0,​g∈C1​,g∈/C1​.​

This defines the extended nonnegative number

Λμ(W,C1,H)=∣C1∣−1∑x∈C1∫E−((AH(x,e)−B(e))+(B(e)−AH(x,e))) dμ(e).\Lambda_\mu(W,C_1,H) =|C_1|^{-1}\sum_{x\in C_1} \int_E^{-}\bigl((A_H(x,e)-B(e))+(B(e)-A_H(x,e))\bigr)\,d\mu(e).Λμ​(W,C1​,H)=∣C1​∣−1x∈C1​∑​∫E−​((AH​(x,e)−B(e))+(B(e)−AH​(x,e)))dμ(e).

Every reciprocal, sum, product, and subtraction in these formulas is taken in [0,∞][0,\infty][0,∞]; subtraction is truncated at 000, including ∞−∞=0\infty-\infty=0∞−∞=0, and the integral is the extended nonnegative integral. Thus, for finite AH(x,e)A_H(x,e)AH​(x,e) and B(e)B(e)B(e), the integrand is their absolute difference; it is also defined when one or both are infinite. No channel normalization, measurability of WWW, or probability assumption on μ\muμ is required.

QAlgorithms.Papers.Independent.Advance50.P28.cosetOutput

For any finite commutative additive group GGG, any type EEE, any function W:G→E→[0,∞]W:G\to E\to[0,\infty]W:G→E→[0,∞], any additive subgroup C1≤GC_1\le GC1​≤G, any additive subgroup H≤C1H\le C_1H≤C1​, any x∈C1x\in C_1x∈C1​, and any e∈Ee\in Ee∈E, this defines

AH(x,e)=1∣H∣∑h∈HW(x+h,e),A_H(x,e)=\frac1{|H|}\sum_{h\in H}W(x+h,e),AH​(x,e)=∣H∣1​h∈H∑​W(x+h,e),

where x+hx+hx+h is first formed in C1C_1C1​ and then regarded as an element of GGG, and the sum, reciprocal, and multiplication are taken in [0,∞][0,\infty][0,∞]. The subgroup HHH is nonempty, so its cardinality is positive. No measurability or normalization assumption is imposed on WWW, and its values may be infinite.

QAlgorithms.Papers.Independent.Advance50.P28.counts

For any type AAA with decidable equality, any natural number nnn, any word x:{0,…,n−1}→Ax:\{0,\ldots,n-1\}\to Ax:{0,…,n−1}→A, and any a∈Aa\in Aa∈A, this defines the natural number

#{i∈{0,…,n−1}:xi=a}.\#\{i\in\{0,\ldots,n-1\}:x_i=a\}.#{i∈{0,…,n−1}:xi​=a}.

The type AAA need not be finite. When n=0n=0n=0, the count is zero for every aaa.

QAlgorithms.Papers.Independent.Advance50.P28.directExponent

For any finite type AAA, possibly empty, any function P:A→RP:A\to\mathbb RP:A→R, and any real number RRR, define

HP(s)={0,s=0,−log⁡ ⁣(∑a∈AP(a)1+s),s≠0.H_P(s)= \begin{cases} 0,&s=0,\\ -\log\!\left(\sum_{a\in A}P(a)^{1+s}\right),&s\ne0. \end{cases}HP​(s)={0,−log(∑a∈A​P(a)1+s),​s=0,s=0.​

The direct exponent is

sup⁡0≤s≤1HP(s)−sR1+s.\sup_{0\le s\le1}\frac{H_P(s)-sR}{1+s}.0≤s≤1sup​1+sHP​(s)−sR​.

No nonnegativity or normalization assumption is imposed on PPP. The powers use total real exponentiation, and the logarithm is total, with log⁡0=0\log0=0log0=0. In particular, an empty AAA makes the sum zero and HPH_PHP​ identically zero. The supremum is taken in R\mathbb RR, whose total supremum operation returns zero for a set unbounded above.

QAlgorithms.Papers.Independent.Advance50.P28.discreteIid

For any type XXX, any function p:X→[0,∞]p:X\to[0,\infty]p:X→[0,∞], any natural number nnn, and any tuple x∈Xnx\in X^nx∈Xn, the defined function is

p(n)(x)=∏i=0n−1p(xi).p^{(n)}(x)=\prod_{i=0}^{n-1}p(x_i).p(n)(x)=i=0∏n−1​p(xi​).

No normalization is assumed for ppp. When n=0n=0n=0, there is one empty tuple and its value is 111, even if XXX is empty.

QAlgorithms.Papers.Independent.Advance50.P28.expectedConditionalLeakage

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, natural number MMM, and ensemble hhh assigning a nonnegative real weight wfw_fwf​ to every function f:A→{0,…,M−1}f:A\to\{0,\ldots,M-1\}f:A→{0,…,M−1} with ∑fwf=1\sum_f w_f=1∑f​wf​=1, this defines

∑fwf∫E∑b=0M−1∣∑a∈Af(a)=bp(e,a)−∑a∈Ap(e,a)M∣ dμ(e).\sum_f w_f\int_E\sum_{b=0}^{M-1} \left|\sum_{\substack{a\in A\\f(a)=b}}p(e,a) -\frac{\sum_{a\in A}p(e,a)}{M}\right|\,d\mu(e).f∑​wf​∫E​b=0∑M−1​​a∈Af(a)=b​∑​p(e,a)−M∑a∈A​p(e,a)​​dμ(e).

No collision or independence property of the ensemble is required, and no measurability, nonnegativity, or normalization condition is imposed on ppp, nor any probability condition on μ\muμ. Each real integral is zero if its integrand is not integrable. If M=0M=0M=0 and AAA is nonempty, such an ensemble cannot exist; if M=0M=0M=0 and AAA is empty, the displayed value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.expectedCosetLeakage

For a finite commutative additive group GGG, a finite type SSS, a measurable space EEE, a measure μ\muμ on EEE, a function W:G→E→[0,∞]W:G\to E\to[0,\infty]W:G→E→[0,∞], an additive subgroup C1≤GC_1\le GC1​≤G, subgroups Hs≤C1H_s\le C_1Hs​≤C1​ for s∈Ss\in Ss∈S, and arbitrary real weights wsw_sws​, define

As(x,e)=∣Hs∣−1∑h∈HsW(x+h,e),B(e)=∑g∈G{∣C1∣−1W(g,e),g∈C1,0,g∉C1.A_s(x,e)=|H_s|^{-1}\sum_{h\in H_s}W(x+h,e), \qquad B(e)=\sum_{g\in G} \begin{cases}|C_1|^{-1}W(g,e),&g\in C_1,\\0,&g\notin C_1.\end{cases}As​(x,e)=∣Hs​∣−1h∈Hs​∑​W(x+h,e),B(e)=g∈G∑​{∣C1​∣−1W(g,e),0,​g∈C1​,g∈/C1​.​

The defined value is

∑s∈SofReal⁡(ws) ∣C1∣−1∑x∈C1∫E−((As(x,e)−B(e))+(B(e)−As(x,e))) dμ(e).\sum_{s\in S}\operatorname{ofReal}(w_s)\, |C_1|^{-1}\sum_{x\in C_1} \int_E^{-}\bigl((A_s(x,e)-B(e))+(B(e)-A_s(x,e))\bigr)\,d\mu(e).s∈S∑​ofReal(ws​)∣C1​∣−1x∈C1​∑​∫E−​((As​(x,e)−B(e))+(B(e)−As​(x,e)))dμ(e).

Here ofReal⁡(ws)=max⁡(ws,0)\operatorname{ofReal}(w_s)=\max(w_s,0)ofReal(ws​)=max(ws​,0) viewed in [0,∞][0,\infty][0,∞], and all remaining arithmetic is also in [0,∞][0,\infty][0,∞], with truncated subtraction and ∞−∞=0\infty-\infty=0∞−∞=0. There is no assumption that the weights sum to 111, that WWW consists of normalized measurable densities, or that μ\muμ is a probability measure. An empty seed type gives the empty sum 000.

QAlgorithms.Papers.Independent.Advance50.P28.expectedError

For any finite type AAA, any natural number MMM, any ensemble hhh assigning nonnegative real weights w(f)w(f)w(f) to maps f:A→[M]f:A\to[M]f:A→[M] with ∑fw(f)=1\sum_f w(f)=1∑f​w(f)=1, and any function P:A→RP:A\to\mathbb RP:A→R, where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, this defines

∑f:A→[M]w(f)∑b∈[M]∣∑a∈Af(a)=bP(a)−∑a∈AP(a)M∣.\sum_{f:A\to[M]}w(f) \sum_{b\in[M]} \left| \sum_{\substack{a\in A\\f(a)=b}}P(a) -\frac{\sum_{a\in A}P(a)}{M} \right|.f:A→[M]∑​w(f)b∈[M]∑​​a∈Af(a)=b​∑​P(a)−M∑a∈A​P(a)​​.

No nonnegativity or normalization is required of PPP, and no universality condition is required of hhh. If AAA is empty, the value is zero. The case M=0M=0M=0 is allowed only with empty AAA if such an ensemble is supplied; real division by zero is interpreted as zero.

QAlgorithms.Papers.Independent.Advance50.P28.extractionError

For any finite type AAA, any natural number MMM, any function P:A→RP:A\to\mathbb RP:A→R, and any map f:A→[M]f:A\to[M]f:A→[M], where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, this defines

∑b∈[M]∣∑a∈Af(a)=bP(a)−∑a∈AP(a)M∣.\sum_{b\in[M]} \left| \sum_{\substack{a\in A\\f(a)=b}}P(a) -\frac{\sum_{a\in A}P(a)}{M} \right|.b∈[M]∑​​a∈Af(a)=b​∑​P(a)−M∑a∈A​P(a)​​.

There is no nonnegativity or normalization requirement on PPP, and there is no factor of 1/21/21/2. Empty sums are zero. The definition allows M=0M=0M=0, with real division by zero interpreted as zero; a map f:A→[0]f:A\to[0]f:A→[0] exists only when AAA is empty, and the resulting value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.fiberRenyi

For any finite type AAA, arbitrary function P:A→RP:A\to\mathbb RP:A→R, and real number sss, this defines

−log⁡ ⁣(∑a∈AP(a)1+s)s.-\frac{\log\!\left(\sum_{a\in A}P(a)^{1+s}\right)}{s}.−slog(∑a∈A​P(a)1+s)​.

The powers are total real powers; the natural logarithm has log⁡0=0\log0=0log0=0 and log⁡u=log⁡∣u∣\log u=\log|u|logu=log∣u∣ for negative uuu; division by zero is zero. No nonnegativity or normalization of PPP, or restriction on sss, is assumed. In particular, the value at s=0s=0s=0 is zero, and if AAA is empty the value is zero for every sss.

QAlgorithms.Papers.Independent.Advance50.P28.finiteUniformMass

For any type XXX equipped with a finite enumeration, this defines the function uX:X→[0,∞]u_X:X\to[0,\infty]uX​:X→[0,∞] by uX(x)=∣X∣−1u_X(x)=|X|^{-1}uX​(x)=∣X∣−1, with the cardinality and inverse taken in the extended nonnegative reals. If XXX is nonempty, every element has mass 1/∣X∣1/|X|1/∣X∣. The definition also allows X=∅X=\varnothingX=∅; in that case the function has no values and its total mass is 000, although the expression 0−10^{-1}0−1 in [0,∞][0,\infty][0,∞] equals ∞\infty∞.

QAlgorithms.Papers.Independent.Advance50.P28.finiteVectorMass

For any finite type AAA and any function P:A→RP:A\to\mathbb RP:A→R, this defines its total sum ∑a∈AP(a)\sum_{a\in A}P(a)∑a∈A​P(a). There is no nonnegativity or normalization requirement, so this sum can be negative. If AAA is empty, the value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.firstTypes

For any finite type AAA with decidable equality, any function P:A→RP:A\to\mathbb RP:A→R, and any natural numbers n,Mn,Mn,M, this defines the finite set of functions q:A→Nq:A\to\mathbb Nq:A→N that occur as symbol counts of some string x:{0,…,n−1}→Ax:\{0,\ldots,n-1\}\to Ax:{0,…,n−1}→A and satisfy

∏a∈AP(a)q(a)≤1M.\prod_{a\in A}P(a)^{q(a)}\le \frac1M.a∈A∏​P(a)q(a)≤M1​.

Here “occur as symbol counts” means q(a)=∣{i:x(i)=a}∣q(a)=|\{i:x(i)=a\}|q(a)=∣{i:x(i)=a}∣ for every aaa. No nonnegativity or normalization assumption is imposed on PPP. The inequality is non-strict. When M=0M=0M=0, its right-hand side is defined to be 000. When n=0n=0n=0, the only count function is identically zero and its product is 111, including when AAA is empty; when AAA is empty and n>0n>0n>0, there are no count functions arising from strings.

QAlgorithms.Papers.Independent.Advance50.P28.gallagerDensityMoment

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, any measure μ\muμ on YYY, functions W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞] and p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any real ttt, the defined extended nonnegative real value is

∫Y(∑x∈Xp(x) W(x,y)1/(1−t))1−t dμ(y).\int_Y \left(\sum_{x\in X}p(x)\,W(x,y)^{1/(1-t)}\right)^{1-t} \,d\mu(y).∫Y​(x∈X∑​p(x)W(x,y)1/(1−t))1−tdμ(y).

The integral is the nonnegative extended integral, and the powers are real powers of extended nonnegative reals. There are no normalization, measurability, countability, or parameter-range hypotheses. In particular, t=1t=1t=1 is included: real division by zero gives 1/(1−t)=01/(1-t)=01/(1−t)=0, and the outer exponent is also 000, so the integrand is 111 and the value is μ(Y)\mu(Y)μ(Y).

QAlgorithms.Papers.Independent.Advance50.P28.generalAdditiveDensity

For any additive group GGG, any type EEE, any function p:E→G→Rp:E\to G\to\mathbb Rp:E→G→R, any x∈Gx\in Gx∈G, and any pair (z,e)∈G×E(z,e)\in G\times E(z,e)∈G×E, this defines

Wp(x,(z,e))=ofReal⁡ ⁣(p(e,z−x))∈[0,∞],W_p(x,(z,e))=\operatorname{ofReal}\!\bigl(p(e,z-x)\bigr)\in[0,\infty],Wp​(x,(z,e))=ofReal(p(e,z−x))∈[0,∞],

where z−x=z+(−x)z-x=z+(-x)z−x=z+(−x) and ofReal⁡(r)=max⁡(r,0)\operatorname{ofReal}(r)=\max(r,0)ofReal(r)=max(r,0), embedded in the extended nonnegative reals. Commutativity of GGG, finiteness or measurability of EEE, and nonnegativity or normalization of the functions p(e,⋅)p(e,\cdot)p(e,⋅) are not assumed.

QAlgorithms.Papers.Independent.Advance50.P28.hashFiberMass

For any finite type AAA, any natural number MMM, any function P:A→RP:A\to\mathbb RP:A→R, any map f:A→[M]f:A\to[M]f:A→[M], and any b∈[M]b\in[M]b∈[M], where [M]={j∈N:j<M}[M]=\{j\in\mathbb N:j<M\}[M]={j∈N:j<M}, this defines ∑a∈A: f(a)=bP(a)\sum_{a\in A:\,f(a)=b}P(a)∑a∈A:f(a)=b​P(a). The function PPP need not be nonnegative or normalized; an empty fiber has sum zero. When M=0M=0M=0, there is no possible choice of bbb.

QAlgorithms.Papers.Independent.Advance50.P28.iid

For any type AAA, any function P:A→RP:A\to\mathbb RP:A→R, any natural number nnn, and any word x:{0,…,n−1}→Ax:\{0,\ldots,n-1\}\to Ax:{0,…,n−1}→A, this defines the real number

∏i=0n−1P(xi).\prod_{i=0}^{n-1}P(x_i).i=0∏n−1​P(xi​).

There is no finiteness assumption on AAA and no probability-law assumption on PPP. When n=0n=0n=0, the empty product is one. If AAA is empty and n>0n>0n>0, there is no such word xxx.

QAlgorithms.Papers.Independent.Advance50.P28.integratedFiberEntropyNats

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, and arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, this defines

∫E−∑a∈Ap(e,a)log⁡p(e,a) dμ(e).\int_E-\sum_{a\in A}p(e,a)\log p(e,a)\,d\mu(e).∫E​−a∈A∑​p(e,a)logp(e,a)dμ(e).

Here log⁡\loglog is the natural logarithm, extended by log⁡0=0\log0=0log0=0 and log⁡u=log⁡∣u∣\log u=\log|u|logu=log∣u∣ for u<0u<0u<0, so a zero entry contributes zero. No nonnegativity, normalization, or measurability of ppp, and no probability normalization of μ\muμ, is required. The value is zero if the integrand is not integrable, and it is also zero when AAA is empty.

QAlgorithms.Papers.Independent.Advance50.P28.intrinsicExponent

For any finite type AAA, possibly empty, any function P:A→RP:A\to\mathbb RP:A→R, and any R∈RR\in\mathbb RR∈R, the intrinsic exponent is

sup⁡0≤s≤1(HP(s)−sR),HP(s)={0,s=0,−log⁡ ⁣(∑a∈AP(a)1+s),s≠0.\sup_{0\le s\le1}\bigl(H_P(s)-sR\bigr), \qquad H_P(s)= \begin{cases} 0,&s=0,\\ -\log\!\left(\sum_{a\in A}P(a)^{1+s}\right),&s\ne0. \end{cases}0≤s≤1sup​(HP​(s)−sR),HP​(s)={0,−log(∑a∈A​P(a)1+s),​s=0,s=0.​

The function PPP need not be nonnegative or sum to one. Powers use total real exponentiation, and log⁡0=0\log0=0log0=0; thus HPH_PHP​ is identically zero when AAA is empty. This is a real supremum, with value zero under the total supremum convention if the set is unbounded above.

QAlgorithms.Papers.Independent.Advance50.P28.intrinsicExtractionError

For any finite type AAA, possibly empty, any P:A→RP:A\to\mathbb RP:A→R, any R∈RR\in\mathbb RR∈R, and any natural number nnn, let Xn={0,…,n−1}→AX_n=\{0,\ldots,n-1\}\to AXn​={0,…,n−1}→A, M=⌊enR⌋M=\lfloor e^{nR}\rfloorM=⌊enR⌋, and pn(x)=∏i=0n−1P(xi)p_n(x)=\prod_{i=0}^{n-1}P(x_i)pn​(x)=∏i=0n−1​P(xi​). This defines

inf⁡f:Xn→{0,…,M−1}∑b=0M−1∣∑x∈Xnf(x)=bpn(x)−∑x∈Xnpn(x)M∣.\inf_{f:X_n\to\{0,\ldots,M-1\}} \sum_{b=0}^{M-1} \left| \sum_{\substack{x\in X_n\\f(x)=b}}p_n(x) -\frac{\sum_{x\in X_n}p_n(x)}{M} \right|.f:Xn​→{0,…,M−1}inf​b=0∑M−1​​x∈Xn​f(x)=b​∑​pn​(x)−M∑x∈Xn​​pn​(x)​​.

No probability-law condition on PPP is required. The floor is a natural number and may be zero. If M=0M=0M=0 and XnX_nXn​ is nonempty, there are no functions fff, and the total real infimum of the empty set is zero; if XnX_nXn​ is empty, the displayed sum is zero. Thus M=0M=0M=0 yields value zero. When n=0n=0n=0, M=1M=1M=1 and the value is also zero.

QAlgorithms.Papers.Independent.Advance50.P28.l1

For any finite type AAA and any functions P,Q:A→RP,Q:A\to\mathbb RP,Q:A→R, this defines the real number ∑a∈A∣P(a)−Q(a)∣\sum_{a\in A}|P(a)-Q(a)|∑a∈A​∣P(a)−Q(a)∣. Neither function is required to be nonnegative or normalized. If AAA is empty, the value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.negativeLogRate

For any real number eee, called the error argument, and any natural number nnn, this defines an extended real number by

{+∞,e=0,−log⁡en,e≠0,\begin{cases} +\infty,&e=0,\\[2pt] -\dfrac{\log e}{n},&e\ne0, \end{cases}⎩⎨⎧​+∞,−nloge​,​e=0,e=0,​

where the second branch is a real number embedded into the extended reals. No positivity assumption on eee or nnn is required. The total real logarithm satisfies log⁡e=log⁡∣e∣\log e=\log|e|loge=log∣e∣ for negative eee, and division by zero is zero; consequently, when n=0n=0n=0, the value is zero for e≠0e\ne0e=0 and +∞+\infty+∞ for e=0e=0e=0.

QAlgorithms.Papers.Independent.Advance50.P28.negativeLogRateENN

For every e∈[0,∞]e\in[0,\infty]e∈[0,∞] and natural number nnn, the defined value in the extended real line [−∞,∞][-\infty,\infty][−∞,∞] is

−log⁡en,-\frac{\log e}{n},−nloge​,

using the extended nonnegative logarithm, with log⁡0=−∞\log0=-\inftylog0=−∞ and log⁡∞=+∞\log\infty=+\inftylog∞=+∞, and total extended real division. Thus for n>0n>0n>0, the value is +∞+\infty+∞ when e=0e=0e=0 and −∞-\infty−∞ when e=∞e=\inftye=∞; for n=0n=0n=0, total division gives 000.

QAlgorithms.Papers.Independent.Advance50.P28.peak

For any finite type AAA and any function P:A→RP:A\to\mathbb RP:A→R, this defines sup⁡{P(a):a∈A}\sup\{P(a):a\in A\}sup{P(a):a∈A} using the real supremum operation. If AAA is nonempty, this is the largest value of PPP, which may be negative because no nonnegativity or normalization is assumed. If AAA is empty, the real supremum convention gives zero.

QAlgorithms.Papers.Independent.Advance50.P28.psiMoment

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, any measure μ\muμ on YYY, functions W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞] and p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any real sss, put q(y)=∑xp(x)W(x,y)q(y)=\sum_x p(x)W(x,y)q(y)=∑x​p(x)W(x,y). The defined value is

∫Y{0,q(y)=0,(∑xp(x)W(x,y)1+s)q(y)−s,q(y)≠0 dμ(y),\int_Y \begin{cases} 0,&q(y)=0,\\ \left(\sum_x p(x)W(x,y)^{1+s}\right)q(y)^{-s},&q(y)\ne0 \end{cases} \,d\mu(y),∫Y​{0,(∑x​p(x)W(x,y)1+s)q(y)−s,​q(y)=0,q(y)=0​dμ(y),

using extended nonnegative sums, products, real powers, and the nonnegative extended integral. No normalization, measurability, countability, or restriction on sss is assumed. The second branch includes q(y)=+∞q(y)=+\inftyq(y)=+∞; if XXX is empty, the value is 000.

QAlgorithms.Papers.Independent.Advance50.P28.publicSeedLeakage

For any finite type AAA, measurable space EEE, measure μ\muμ on EEE, arbitrary function p:E→A→Rp:E\to A\to\mathbb Rp:E→A→R, natural number MMM, and ensemble of all functions f:A→{0,…,M−1}f:A\to\{0,\ldots,M-1\}f:A→{0,…,M−1} with nonnegative weights wfw_fwf​ summing to one, this defines

∫E∑f∑b=0M−1∣wf∑a∈Af(a)=bp(e,a)−wfM∣ dμ(e).\int_E\sum_f\sum_{b=0}^{M-1} \left|w_f\sum_{\substack{a\in A\\f(a)=b}}p(e,a)-\frac{w_f}{M}\right|\,d\mu(e).∫E​f∑​b=0∑M−1​​wf​a∈Af(a)=b​∑​p(e,a)−Mwf​​​dμ(e).

No further condition on the ensemble, on ppp, or on μ\muμ is assumed. In particular, the subtracted term is wf/Mw_f/Mwf​/M regardless of the total mass ∑ap(e,a)\sum_a p(e,a)∑a​p(e,a). The real integral is zero when the integrand is not integrable. For M=0M=0M=0, an ensemble exists only if AAA is empty, and the value is then zero.

QAlgorithms.Papers.Independent.Advance50.P28.rareTypePeak

For any finite type AAA with decidable equality, any function P:A→RP:A\to\mathbb RP:A→R, and any natural numbers n,Mn,Mn,M, let Tn\mathcal T_nTn​ be the set of count functions q(a)=∣{i:x(i)=a}∣q(a)=|\{i:x(i)=a\}|q(a)=∣{i:x(i)=a}∣ arising from length-nnn strings xxx over AAA, and set

aP(q)=∏a∈AP(a)q(a),mP,n(q)=∑x:{0,…,n−1}→Acount function of x=q∏i=0n−1P(x(i)).a_P(q)=\prod_{a\in A}P(a)^{q(a)},\qquad m_{P,n}(q)=\sum_{\substack{x:\{0,\ldots,n-1\}\to A\\ \text{count function of }x=q}}\prod_{i=0}^{n-1}P(x(i)).aP​(q)=a∈A∏​P(a)q(a),mP,n​(q)=x:{0,…,n−1}→Acount function of x=q​∑​i=0∏n−1​P(x(i)).

This defines the real number

max⁡({0}∪{aP(q):q∈Tn, mP,n(q)<1/M}).\max\Bigl(\{0\}\cup \{a_P(q):q\in\mathcal T_n,\ m_{P,n}(q)<1/M\}\Bigr).max({0}∪{aP​(q):q∈Tn​, mP,n​(q)<1/M}).

Thus the value is 000 if no qualifying count function exists or all qualifying products are nonpositive. No probability-law assumption is imposed on PPP. Division by 000 gives 000, and empty products give 111; in particular the definition includes M=0M=0M=0, n=0n=0n=0, and empty AAA.

QAlgorithms.Papers.Independent.Advance50.P28.renyiNumerator

For any finite type AAA, any function P:A→RP:A\to\mathbb RP:A→R, and any real number sss, this defines

{0,s=0,−log⁡ ⁣(∑a∈AP(a)1+s),s≠0.\begin{cases} 0,&s=0,\\ -\log\!\left(\displaystyle\sum_{a\in A}P(a)^{1+s}\right),&s\ne0. \end{cases}⎩⎨⎧​0,−log(a∈A∑​P(a)1+s),​s=0,s=0.​

The powers use the total real-power operation, and log⁡\loglog is the total real natural logarithm, with log⁡0=0\log 0=0log0=0 and log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣ for negative xxx. Neither nonnegativity nor normalization of PPP, nor positivity of the sum inside the logarithm, is assumed. In particular, the value is zero when AAA is empty, for every sss.

QAlgorithms.Papers.Independent.Advance50.P28.renyiPowerSum

For any finite type AAA, any function P:A→RP:A\to\mathbb RP:A→R, and any real number sss, this defines ∑a∈AP(a)1+s\sum_{a\in A}P(a)^{1+s}∑a∈A​P(a)1+s using the total real-power operation. There is no nonnegativity or normalization requirement on PPP and no restriction on sss, so negative bases and nonpositive exponents are included. For a zero base, the conventions are 00=10^0=100=1 and 0r=00^r=00r=0 for r≠0r\ne0r=0. If AAA is empty, the value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.secondTypes

For any finite type AAA with decidable equality, any function P:A→RP:A\to\mathbb RP:A→R, and any natural numbers n,Mn,Mn,M, this defines the finite set of functions q:A→Nq:A\to\mathbb Nq:A→N that occur as symbol counts of a length-nnn string over AAA and satisfy

∑x:{0,…,n−1}→A∣{i:x(i)=a}∣=q(a) for every a∏i=0n−1P(x(i))<1M.\sum_{\substack{x:\{0,\ldots,n-1\}\to A\\ |\{i:x(i)=a\}|=q(a)\ \text{for every }a}} \prod_{i=0}^{n-1}P(x(i)) <\frac1M.x:{0,…,n−1}→A∣{i:x(i)=a}∣=q(a) for every a​∑​i=0∏n−1​P(x(i))<M1​.

No nonnegativity or normalization assumption is imposed on PPP. The inequality is strict. When M=0M=0M=0, its right-hand side is 000. When n=0n=0n=0, the only realized count function is identically zero and the displayed sum is 111, including when AAA is empty; when AAA is empty and n>0n>0n>0, there are no realized count functions.

QAlgorithms.Papers.Independent.Advance50.P28.smoothExponent

For any finite type AAA, possibly empty, any function P:A→RP:A\to\mathbb RP:A→R, and any R∈RR\in\mathbb RR∈R, the smooth exponent is

sup⁡s≥0HP(s)−sR1+2s,HP(s)={0,s=0,−log⁡ ⁣(∑a∈AP(a)1+s),s≠0.\sup_{s\ge0}\frac{H_P(s)-sR}{1+2s}, \qquad H_P(s)= \begin{cases} 0,&s=0,\\ -\log\!\left(\sum_{a\in A}P(a)^{1+s}\right),&s\ne0. \end{cases}s≥0sup​1+2sHP​(s)−sR​,HP​(s)={0,−log(∑a∈A​P(a)1+s),​s=0,s=0.​

There is no upper bound on sss, and no nonnegativity or normalization assumption on PPP. Powers use total real exponentiation and log⁡0=0\log0=0log0=0, so an empty AAA makes HPH_PHP​ identically zero. The supremum is the total real supremum, which returns zero if the set is unbounded above.

QAlgorithms.Papers.Independent.Advance50.P28.smoothingBenchmark

For any finite type AAA, possibly empty, any function P:A→RP:A\to\mathbb RP:A→R, any R∈RR\in\mathbb RR∈R, and any natural number nnn, write Xn={0,…,n−1}→AX_n=\{0,\ldots,n-1\}\to AXn​={0,…,n−1}→A. The smoothing benchmark is

inf⁡Q:Xn→RQ(x)≥0 ∀x, ∑x∈XnQ(x)≤1[enR/2sup⁡x∈XnQ(x)+2∑x∈Xn∣∏i=0n−1P(xi)−Q(x)∣].\inf_{\substack{Q:X_n\to\mathbb R\\Q(x)\ge0\ \forall x,\ \sum_{x\in X_n}Q(x)\le1}} \left[ e^{nR/2}\sqrt{\sup_{x\in X_n}Q(x)} +2\sum_{x\in X_n}\left|\prod_{i=0}^{n-1}P(x_i)-Q(x)\right| \right].Q:Xn​→RQ(x)≥0 ∀x, ∑x∈Xn​​Q(x)≤1​inf​[enR/2x∈Xn​sup​Q(x)​+2x∈Xn​∑​​i=0∏n−1​P(xi​)−Q(x)​].

The infimum is taken in R\mathbb RR; PPP itself need not be nonnegative or normalized. The zero function is always an admissible QQQ. An empty range has real supremum zero, and empty sums are zero, so the benchmark is zero if AAA is empty and n>0n>0n>0. When n=0n=0n=0, XnX_nXn​ consists of the unique empty word, whose product is one.

QAlgorithms.Papers.Independent.Advance50.P28.subgroupUniform

For any finite additive group GGG, any additive subgroup C1≤GC_1\le GC1​≤G, and any x∈Gx\in Gx∈G, this defines

uC1(x)={(∣C1∣:[0,∞])−1,x∈C1,0,x∉C1.u_{C_1}(x)= \begin{cases} (|C_1|:[0,\infty])^{-1},&x\in C_1,\\ 0,&x\notin C_1. \end{cases}uC1​​(x)={(∣C1​∣:[0,∞])−1,0,​x∈C1​,x∈/C1​.​

The group need not be commutative. Since C1C_1C1​ contains 000, its cardinality is positive, so the reciprocal in this definition is finite and the function assigns equal mass 1/∣C1∣1/|C_1|1/∣C1​∣ to every element of C1C_1C1​.

QAlgorithms.Papers.Independent.Advance50.P28.typeAtom

For any finite type AAA, possibly empty, any function P:A→RP:A\to\mathbb RP:A→R, and any function q:A→Nq:A\to\mathbb Nq:A→N, this defines

∏a∈AP(a)q(a).\prod_{a\in A}P(a)^{q(a)}.a∈A∏​P(a)q(a).

No nonnegativity or normalization condition is imposed on PPP, and qqq need not be the count function of any word. These are natural-number powers, so a zero exponent contributes one, including 00=10^0=100=1. If AAA is empty, the product is one.

QAlgorithms.Papers.Independent.Advance50.P28.typeMass

For any finite type AAA with decidable equality, any function P:A→RP:A\to\mathbb RP:A→R, any natural number nnn, and any q:A→Nq:A\to\mathbb Nq:A→N, this defines

∑x:{0,…,n−1}→A∀a∈A, #{i:xi=a}=q(a)∏i=0n−1P(xi).\sum_{\substack{x:\{0,\ldots,n-1\}\to A\\ \forall a\in A,\ \#\{i:x_i=a\}=q(a)}} \prod_{i=0}^{n-1}P(x_i).x:{0,…,n−1}→A∀a∈A, #{i:xi​=a}=q(a)​∑​i=0∏n−1​P(xi​).

The function PPP need not be a probability law, and qqq need not be realizable as a count function; if it is not realizable, the sum is zero. When n=0n=0n=0, the value is one if qqq is identically zero and zero otherwise. If AAA is empty and n>0n>0n>0, the value is zero.

QAlgorithms.Papers.Independent.Advance50.P28.types

For any finite type AAA with decidable equality and any natural number nnn, this defines the finite set

{q:A→N:∃x:{0,…,n−1}→A, ∀a∈A, q(a)=#{i:xi=a}}.\left\{ q:A\to\mathbb N: \exists x:\{0,\ldots,n-1\}\to A,\ \forall a\in A,\ q(a)=\#\{i:x_i=a\} \right\}.{q:A→N:∃x:{0,…,n−1}→A, ∀a∈A, q(a)=#{i:xi​=a}}.

Repeated count functions obtained from different words occur only once in this set. When n=0n=0n=0, the set consists of the identically zero function. If AAA is empty and n>0n>0n>0, the set is empty.

QAlgorithms.Papers.Independent.Advance50.P28.wiretapDecodingError

For arbitrary types X,YX,YX,Y, a measurable space on YYY, a natural number MMM, any measure μ\muμ on YYY, any function W:X×Y→[0,∞]W:X\times Y\to[0,\infty]W:X×Y→[0,∞], and a code CCC consisting of normalized encoder masses pi:X→[0,∞]p_i:X\to[0,\infty]pi​:X→[0,∞] and pairwise disjoint measurable decoding sets Di⊆YD_i\subseteq YDi​⊆Y, the defined decoding error is

1M∑i=0M−1∫Y−{0,y∈Di,∑x′pi(x)W(x,y),y∉Di dμ(y).\frac{1}{M}\sum_{i=0}^{M-1}\int_Y^- \begin{cases} 0,&y\in D_i,\\ \displaystyle\sum_x' p_i(x)W(x,y),&y\notin D_i \end{cases} \,d\mu(y).M1​i=0∑M−1​∫Y−​⎩⎨⎧​0,x∑′​pi​(x)W(x,y),​y∈Di​,y∈/Di​​dμ(y).

Here each encoder satisfies ∑x′pi(x)=1\sum_x'p_i(x)=1∑x′​pi​(x)=1, the integral is the nonnegative lower integral, and all arithmetic takes place in [0,∞][0,\infty][0,∞]. No measurability or normalization condition is imposed on WWW. When M=0M=0M=0, the empty sum and extended nonnegative arithmetic give value 000.

QAlgorithms.Papers.Independent.Advance50.P28.wiretapPhiExponent

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, any measure μ\muμ on YYY, functions W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞] and p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any real RRR, the defined extended real value is

sup⁡0≤t≤1/2{tR−log⁡[∫Y(∑x∈Xp(x)W(x,y)1/(1−t))1−t dμ(y)]}.\sup_{0\le t\le1/2} \left\{ tR-\log\left[ \int_Y \left(\sum_{x\in X}p(x)W(x,y)^{1/(1-t)}\right)^{1-t} \,d\mu(y) \right] \right\}.0≤t≤1/2sup​⎩⎨⎧​tR−log​∫Y​(x∈X∑​p(x)W(x,y)1/(1−t))1−tdμ(y)​⎭⎬⎫​.

The integral is the nonnegative extended integral, the sum is an extended nonnegative sum, and the logarithm is the extended logarithm, with log⁡0=−∞\log0=-\inftylog0=−∞ and log⁡(+∞)=+∞\log(+\infty)=+\inftylog(+∞)=+∞. Both parameter endpoints are included. No normalization, measurability, countability, or sign restriction on RRR is imposed; a zero moment gives objective +∞+\infty+∞, and an infinite moment gives objective −∞-\infty−∞.

QAlgorithms.Papers.Independent.Advance50.P28.wiretapPsiExponent

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, any measure μ\muμ on YYY, functions W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞] and p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any real RRR, define

q(y)=∑xp(x)W(x,y),Ψ(s)=∫Y{0,q(y)=0,(∑xp(x)W(x,y)1+s)q(y)−s,q(y)≠0 dμ(y).q(y)=\sum_x p(x)W(x,y), \qquad \Psi(s)=\int_Y \begin{cases} 0,&q(y)=0,\\ \left(\sum_x p(x)W(x,y)^{1+s}\right)q(y)^{-s},&q(y)\ne0 \end{cases} \,d\mu(y).q(y)=x∑​p(x)W(x,y),Ψ(s)=∫Y​{0,(∑x​p(x)W(x,y)1+s)q(y)−s,​q(y)=0,q(y)=0​dμ(y).

The defined value is the extended real supremum

sup⁡0≤s≤1sR−log⁡Ψ(s)1+s.\sup_{0\le s\le1}\frac{sR-\log\Psi(s)}{1+s}.0≤s≤1sup​1+ssR−logΨ(s)​.

All sums, products, and powers inside the nonnegative extended integral use extended nonnegative arithmetic; the logarithm satisfies log⁡0=−∞\log0=-\inftylog0=−∞ and log⁡(+∞)=+∞\log(+\infty)=+\inftylog(+∞)=+∞. Both endpoints are included, and 1+s>01+s>01+s>0 throughout the supremum. No normalization, measurability, countability, or sign restriction on RRR is assumed.

QAlgorithms.Papers.Independent.Advance50.P28.wiretapTildeExponent

For arbitrary types X,YX,YX,Y, a measurable-space structure on YYY, any measure μ\muμ on YYY, functions W:X×Y→[0,+∞]W:X\times Y\to[0,+\infty]W:X×Y→[0,+∞] and p:X→[0,+∞]p:X\to[0,+\infty]p:X→[0,+∞], and any real RRR, define

q(y)=∑xp(x)W(x,y),Ψ(s)=∫Y{0,q(y)=0,(∑xp(x)W(x,y)1+s)q(y)−s,q(y)≠0 dμ(y).q(y)=\sum_x p(x)W(x,y), \qquad \Psi(s)=\int_Y \begin{cases} 0,&q(y)=0,\\ \left(\sum_x p(x)W(x,y)^{1+s}\right)q(y)^{-s},&q(y)\ne0 \end{cases} \,d\mu(y).q(y)=x∑​p(x)W(x,y),Ψ(s)=∫Y​{0,(∑x​p(x)W(x,y)1+s)q(y)−s,​q(y)=0,q(y)=0​dμ(y).

The defined value is the extended real supremum

sup⁡0≤s≤1sR−log⁡Ψ(s)2.\sup_{0\le s\le1}\frac{sR-\log\Psi(s)}2.0≤s≤1sup​2sR−logΨ(s)​.

The integral is the nonnegative extended integral, with extended nonnegative sums, products, and real powers, and the logarithm satisfies log⁡0=−∞\log0=-\inftylog0=−∞ and log⁡(+∞)=+∞\log(+\infty)=+\inftylog(+∞)=+∞. Both endpoints are included. No normalization, measurability, countability, or sign restriction on RRR is assumed.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

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