Theorem 2: conformal p-values are PRDS
ProvedConformalOutlierTesting.conformal_pvalues_prdsLet the scores be continuously distributed with law . Let calibration scores be i.i.d. with law , and let test points have independent scores, independent of the calibration data. The scores of the inliers have law , and the scores of the outliers have arbitrary laws. Then the marginal conformal p-values
are PRDS on the set of inliers. That is, for every inlier and every increasing set , is nondecreasing in .
Together with Benjamini and Yekutieli (2001), this shows that the BH procedure applied to conformal p-values controls the FDR.
Formalization Note The paper's wording asks only that "the inliers are jointly independent of each other and of the data in ". The proof (Lemma 4, general case) assumes that all test points are mutually independent and independent of , as stated in Section 1.1, and the formal statement assumes the same. This is more than is needed. The outliers may depend on one another, as the paper notes in Section 6, but they must be independent of the inliers and of . Without that the conclusion can fail (see the mission report). Increasing sets are taken measurable. Since the p-values take finitely many values, this loses nothing. The conditional probability is a conditional expectation given , and PRDS asks for a nondecreasing version of it.
import Mathlib import Definitions.Def_ConformalOutlierTesting_Basic open MeasureTheory ProbabilityTheory Filter Topology Set BoundedContinuousFunction
namespace ConformalOutlierTesting
theorem conformal_pvalues_prds {n m : ℕ} (μ : Measure ℝ) [IsProbabilityMeasure μ] [NullSingletonClass μ]
(ν : Fin m → Measure ℝ) [∀ j, IsProbabilityMeasure (ν j)] (I : Finset (Fin m))
(hI : ∀ j ∈ I, ν j = μ) :
IsPRDS (scoreLaw (n := n) μ ν) margPvals I := by sorry
end ConformalOutlierTestingRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be natural numbers. Write and ; either may be empty.
Hypotheses.
- is a probability measure on with no atoms: for every .
- are probability measures on . Nothing else is assumed about them; in particular they may have atoms.
- is a set of indices such that for every . Indices outside have arbitrary laws .
The probability space. The sample space is , with points , where are the calibration scores and are the test scores. It carries the product measure
So the are i.i.d. with law , the are independent with , and all scores are mutually independent.
The random vector. On this space, define for each
Each takes values in . All the are built from the same calibration vector . When , every is identically .
Conclusion. The vector is "PRDS on " in the following precise sense. For every index , and every measurable set that is an upper set, there exists a nondecreasing function with
Here:
- An upper set means: if and satisfies for all , then .
- is the -algebra on generated by the single coordinate .
- is not required to be measurable or bounded. It is only required to be monotone nondecreasing and to give a version of the conditional probability of given .
Edge cases.
- If or , there is no index to check, and the statement holds vacuously.
- When , each is constant. The conditional expectation is then a.e. the constant , which is either or , and a constant suffices.
- The atomlessness hypothesis applies only to , the common law of the calibration scores and of the test scores indexed by . It does not apply to the laws with .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.