finset_sup_zero
def
The maximum value of a function x on a finite subset s of Fin n, defined to be 0 when s is empty.
Statement
open Finset in def finset_sup_zero {n : ℕ} (s : Finset (Fin n)) (x : 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
Given a natural number $n$, a finite set of indices $s \subseteq \mathrm{Fin}(n)$, and a function $x : \mathrm{Fin}(n) \to \mathbb{R}$, finset_sup_zero s x is defined as:
- $\sup_{i \in s} x(i)$ (the maximum value of $x$ on $s$) if $s$ is nonempty, and
- $0$ if $s$ is empty.
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 /-- Maximum of a real-valued function over a finite set, defined as 0 on the empty set. -/ def finset_sup_zero {n : ℕ} (s : Finset (Fin n)) (x : Fin n → ℝ) : ℝ := if h : s.Nonempty then s.sup' h x else 0