AFTD Auto-Formalizing Theoretical Domains

subsample_prob

def

The probability of obtaining subset s of Fin n under independent subsampling where each of the n items is included independently with probability r.

Statement

open Finset in
def subsample_prob (n : ℕ) (r : ℝ) (s : Finset (Fin n)) : ℝ
Defined in
arXiv:2611.15711, Section 2.1
Verified
14 Nov 2026
Axioms
none listed
Used by 1
  • subsampled_prophet_optGiven a measurable space Ω, a measure P on Ω, a natural number n, random variables X : Fin n → Ω → ℝ, and a subsampling rate r : ℝ,…

Read back from the Lean

The function subsample_prob takes a natural number $n$, a real number $r$, and a finite subset $s$ of Fin n (the set of natural numbers strictly less than $n$), and produces the real number $r^{|s|} \cdot (1 - r)^{n - |s|}$, where $|s|$ is the cardinality of $s$ (s.card) and $n - |s|$ is natural number subtraction.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

open Finset in
/-- Probability of retaining a given subset under independent rate-r subsampling. -/
def subsample_prob (n : ℕ) (r : ℝ) (s : Finset (Fin n)) : ℝ := r ^ s.card * (1 - r) ^ (n - s.card)
See it in the graphDiscuss this resultChallenge it