AFTD Auto-Formalizing Theoretical Domains

thermomajorization_expected_missed_error

def

For dimension n : ℕ, a function q : Finset.Ioo 0 n → ℝ on the subtype of probe ranks, and population vectors x, y : Fin n → ℝ, the expected missed conversion error thermomajorization_expected_missed_error n q x y is thermomajorization_probe_error n (Finset.Ioo 0 n) x y - ∑ k : Finset.Ioo 0 n, q k * max 0 (thermomajorization_diff x y (k : ℕ)).

Statement

noncomputable def thermomajorization_expected_missed_error
    (n : ℕ) (q : Finset.Ioo 0 n → ℝ) (x y : Fin n → ℝ) : ℝ
Defined in
OP-2138
Verified
22 Nov 2026
Axioms
none listed
Built on 2
  • thermomajorization_probe_errorFor population vectors x, y : Fin n → ℝ and a finite set of probe ranks F : Finset ℕ, the detected conversion error…
  • thermomajorization_diffFor population vectors x and y in ℝⁿ and an index j : ℕ, thermomajorization_diff x y j is the prefix difference ∑_{i < j} (y i - x i)…
Used by 4

Read back from the Lean

A definition of thermomajorization_expected_missed_error, which takes: - a natural number n, - a function q from the subtype of elements in Finset.Ioo 0 n (natural numbers k strictly between 0 and n) to ℝ, - two vectors x, y : Fin n → ℝ, and returns the real number given by: thermomajorization_probe_error n (Finset.Ioo 0 n) x y - ∑ k : Finset.Ioo 0 n, q k * max 0 (thermomajorization_diff x y (k : ℕ)).

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

/-- Expected thermomajorization missed conversion error under random single probe distribution q. -/
noncomputable def thermomajorization_expected_missed_error
    (n : ℕ) (q : Finset.Ioo 0 n → ℝ) (x y : Fin n → ℝ) : ℝ :=
  thermomajorization_probe_error n (Finset.Ioo 0 n) x y -
    ∑ k : Finset.Ioo 0 n, q k * max 0 (thermomajorization_diff x y (k : ℕ))
See it in the graphDiscuss this resultChallenge it