thermomajorization_expected_missed_error_le_worst_error
For any dimension n, function q : Finset.Ioo 0 n → ℝ, and candidate parameters a < j < b ≤ n, the expected missed error thermomajorization_expected_missed_error n q (thermomajorization_witness_x n a j b) (thermomajorization_witness_y n j) is less than or equal to thermomajorization_random_probe_worst_error n q.
Statement
theorem thermomajorization_expected_missed_error_le_worst_error (n : ℕ)
(q : Finset.Ioo 0 n → ℝ) (a j b : ℕ)
(ha : a < j) (hj : j < b) (hb : b ≤ n) :
thermomajorization_expected_missed_error n q
(thermomajorization_witness_x n a j b) (thermomajorization_witness_y n j) ≤
thermomajorization_random_probe_worst_error n q- Source
- OP-2138
- Verified
- 22 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 10
- thermomajorization_witness_xFor dimension n and integers a < j < b ≤ n, the thermomajorization witness vector x is defined by x_i = d₁ * 1_{i < a} + d₂ * 1_{i < b}…
- thermomajorization_witness_yFor dimension n and rank j, the thermomajorization witness vector y is the uniform distribution on the prefix of length j: y_i = 1 / j for…
- thermomajorization_expected_missed_errorFor dimension n : ℕ, a function q : Finset.Ioo 0 n → ℝ on the subtype of probe ranks, and population vectors x, y : Fin n → ℝ, the…
- thermomajorization_random_probe_worst_errorFor dimension n : ℕ and a function q : Finset.Ioo 0 n → ℝ on the subtype of probe ranks, the worst-case expected missed conversion error…
- thermomajorization_probe_errorFor population vectors x, y : Fin n → ℝ and a finite set of probe ranks F : Finset ℕ, the detected conversion error…
- thermomajorization_witness_x_mem_antitone_stdSimplexFor any dimension n and integers a < j < b ≤ n, the thermomajorization candidate vector witness_x n a j b is a nonincreasing probability…
- thermomajorization_witness_y_mem_antitone_stdSimplexFor any dimension n and rank 0 < j ≤ n, the thermomajorization candidate vector witness_y n j is a nonincreasing probability vector in the…
- TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - 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)…
Read back from the Lean
For any natural number $n$, any function $q : \{k \in \mathbb{N} \mid 0 < k < n\} \to \mathbb{R}$, and any natural numbers $a, j, b$ such that $a < j$, $j < b$, and $b \le n$, the expected missed error of $q$ evaluated at the witness pair $(x, y) = (\text{thermomajorization\_witness\_x}(n, a, j, b), \text{thermomajorization\_witness\_y}(n, j))$ is less than or equal to the worst-case random probe error of $q$, $\text{thermomajorization\_random\_probe\_worst\_error}(n, q)$ (which is the supremum of the expected missed error over all antitone probability vectors $x, y$ in the standard simplex on $\mathrm{Fin}(n)$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The theorem bounds the expected missed error at a candidate witness pair (x, y) by the worst-case error, which is defined as the supremum of the expected missed error over all antitone probability vectors. To justify this bound in Lean's conditionally complete lattice ℝ, the proof constructs an explicit uniform bound M = 1 + ∑_{k=1}^{n-1} |q(k)| ≥ 0. It verifies that for any probability vectors, the probe error is at most 1 and each penalty term is bounded by |q(k)|, ensuring that the expected missed error is uniformly bounded by M. Finally, an auxiliary lemma for double suprema bounds the pointwise evaluation at (x, y) by the worst-case supremum.
For any function f bounded by M ≥ 0 on S × T, evaluation at (x, y) ∈ S × T is bounded by the double indexed supremum ⨆ a ∈ S, ⨆ b ∈ T, f a b.
A chain of four inequalities is constructed: f(x, y) is bounded by the supremum over y ∈ T, then by the supremum over all b ∈ T, then over x ∈ S, and finally over all a ∈ S. At each step, the set of values is shown to be bounded above by M using Real.iSup_le and the non-negativity of M, allowing the application of le_ciSup. Transitivity of ≤ connects the chain.
uses
le_ciSup,Real.iSup_lehave h4 : f x y ≤ ⨆ (_ : y ∈ T), f x y := by have hbdd : BddAbove (Set.range (fun (_ : y ∈ T) => f x y)) := by refine ⟨M, ?_⟩ rintro z ⟨hy', rfl⟩ exact hM x hx y hy' exact le_ciSup hbdd hy have h3 : (⨆ (_ : y ∈ T), f x y) ≤ ⨆ b, ⨆ (_ : b ∈ T), f x b := by have hbdd : BddAbove (Set.range (fun b => ⨆ (_ : b ∈ T), f x b)) := by refine ⟨M, ?_⟩ rintro z ⟨b, rfl⟩ refine Real.iSup_le (fun hb => hM x hx b hb) hM0 exact le_ciSup hbdd y have h2 : (⨆ b, ⨆ (_ : b ∈ T), f x b) ≤ ⨆ (_ : x ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f x b := by have hbdd : BddAbove (Set.range (fun (_ : x ∈ S) => ⨆ b, ⨆ (_ : b ∈ T), f x b)) := by refine ⟨M, ?_⟩ rintro z ⟨hx', rfl⟩ refine Real.iSup_le (fun b => ?_) hM0 refine Real.iSup_le (fun hb => hM x hx b hb) hM0 exact le_ciSup hbdd hx have h1 : (⨆ (_ : x ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f x b) ≤ ⨆ a, ⨆ (_ : a ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f a b := by have hbdd : BddAbove (Set.range (fun a => ⨆ (_ : a ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f a b)) := by refine ⟨M, ?_⟩ rintro z ⟨a, rfl⟩ refine Real.iSup_le (fun ha => ?_) hM0 refine Real.iSup_le (fun b => ?_) hM0 refine Real.iSup_le (fun hb => hM a ha b hb) hM0 exact le_ciSup hbdd x exact h4.trans (h3.trans (h2.trans h1))
The candidate witness vectors x and y both belong to the standard probability simplex and are antitone.
Using the ordering hypotheses a < j < b ≤ n, the bounds 0 < j and j ≤ n are established (with Nat.zero_le showing 0 ≤ a < j). Applying thermomajorization_witness_x_mem_antitone_stdSimplex and thermomajorization_witness_y_mem_antitone_stdSimplex shows that the constructed vectors x and y are probability vectors in the standard simplex that are antitone.
uses
Nat.zero_le,thermomajorization_witness_x_mem_antitone_stdSimplex,thermomajorization_witness_y_mem_antitone_stdSimplexhave hj0 : 0 < j := (Nat.zero_le a).trans_lt ha have hjn : j ≤ n := hj.le.trans hb have hx_mem : thermomajorization_witness_x n a j b ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} := thermomajorization_witness_x_mem_antitone_stdSimplex n a j b ha hj hb have hy_mem : thermomajorization_witness_y n j ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} := thermomajorization_witness_y_mem_antitone_stdSimplex n j hj0 hjn
The constant M := 1 + ∑_{k=1}^{n-1} |q(k)| is non-negative. automation
The positivity tactic automatically verifies that M ≥ 0 since 1 > 0 and each absolute value term |q(k)| ≥ 0.
let M : ℝ := 1 + ∑ k : Finset.Ioo 0 n, |q k| have hM0 : 0 ≤ M := by positivity
For any probability vectors u and v and any index k, the thermomajorization partial sum difference is at most 1.
Unfolding thermomajorization_diff, the difference is ∑_{i < k} (v_i - u_i). Since u lies in the standard simplex, u_i ≥ 0, so v_i - u_i ≤ v_i and by Finset.sum_le_sum the sum of differences is at most ∑_{i < k} v_i. Because v_i ≥ 0, this partial sum is bounded by the full sum over all indices by Finset.sum_le_univ_sum_of_nonneg, which equals 1.
uses
Finset.sum_le_sum,Finset.sum_le_univ_sum_of_nonneghave hM : ∀ u ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v}, ∀ v ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v}, thermomajorization_expected_missed_error n q u v ≤ M := by rintro u ⟨hu, -⟩ v ⟨hv, -⟩ have h_diff : ∀ k : ℕ, thermomajorization_diff u v k ≤ 1 := by intro k unfold thermomajorization_diff have h1 : (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i - u i) ≤ (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i) := by apply Finset.sum_le_sum intro i _ have : 0 ≤ u i := hu.1 i linarith have h2 : (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i) ≤ Finset.univ.sum (fun i => v i) := by apply Finset.sum_le_univ_sum_of_nonneg intro i exact hv.1 i have h3 : Finset.univ.sum (fun i => v i) = 1 := hv.2 linarith
The probe error thermomajorization_probe_error between u and v is at most 1.
The probe error is the maximum of {0} ∪ {thermomajorization_diff u v k | k ∈ (0, n)}. By Finset.max'_le_iff together with membership simplification via Finset.mem_insert and Finset.mem_image, the maximum is at most 1 because 0 ≤ 1 and every difference diff(u, v, k) was shown to be at most 1.
uses
Finset.max'_le_iff,Finset.mem_insert,Finset.mem_imagehave h_probe : thermomajorization_probe_error n (Finset.Ioo 0 n) u v ≤ 1 := by dsimp [thermomajorization_probe_error] rw [Finset.max'_le_iff] intro z hz simp only [Finset.mem_insert, Finset.mem_image] at hz rcases hz with rfl | ⟨k, hk, rfl⟩ · linarith · exact h_diff k
For every k ∈ (0, n), the penalty term -(q(k) * max(0, diff(u, v, k))) is bounded above by |q(k)|.
Since diff(u, v, k) ≤ 1 and 0 ≤ max(0, diff) by le_max_left, max_le_iff and zero_le_one show that max(0, diff) ∈ [0, 1]. Any real number is bounded by its absolute value via le_abs_self, and |-q(k) * max(0, diff)| simplifies to |q(k)| * max(0, diff) by abs_neg, abs_mul, and abs_of_nonneg. Multiplying max(0, diff) ≤ 1 by |q(k)| ≥ 0 using mul_le_mul_of_nonneg_left, abs_nonneg, and mul_one gives the bound |q(k)|.
uses
le_max_left,max_le_iff,zero_le_one,le_abs_self,abs_neg,abs_mul,abs_of_nonneg,mul_le_mul_of_nonneg_left,abs_nonneg,mul_onehave h_term : ∀ k : Finset.Ioo 0 n, - (q k * max 0 (thermomajorization_diff u v (k : ℕ))) ≤ |q k| := by intro k have hd := h_diff (k : ℕ) have h1 : 0 ≤ max 0 (thermomajorization_diff u v (k : ℕ)) := le_max_left 0 _ have h2 : max 0 (thermomajorization_diff u v (k : ℕ)) ≤ 1 := by rw [max_le_iff] exact ⟨zero_le_one, hd⟩ have h3 : - (q k * max 0 (thermomajorization_diff u v (k : ℕ))) ≤ |- (q k * max 0 (thermomajorization_diff u v (k : ℕ)))| := le_abs_self _ rw [abs_neg, abs_mul, abs_of_nonneg h1] at h3 have h4 : |q k| * max 0 (thermomajorization_diff u v (k : ℕ)) ≤ |q k| * 1 := mul_le_mul_of_nonneg_left h2 (abs_nonneg (q k)) rw [mul_one] at h4 linarith
For all antitone probability vectors u and v, the expected missed error is uniformly bounded by M.
Pushing the negation inside the sum using Finset.sum_neg_distrib and applying Finset.sum_le_sum with the termwise bound shows that -∑_k q(k) * max(0, diff_k) ≤ ∑_k |q(k)|. Unfolding thermomajorization_expected_missed_error as the probe error minus this sum, combining it with probe error ≤ 1 bounds the expected missed error by 1 + ∑_k |q(k)| = M.
uses
Finset.sum_neg_distrib,Finset.sum_le_sumhave h_sum : - ∑ k : Finset.Ioo 0 n, q k * max 0 (thermomajorization_diff u v (k : ℕ)) ≤ ∑ k : Finset.Ioo 0 n, |q k| := by rw [← Finset.sum_neg_distrib] apply Finset.sum_le_sum intro k _ exact h_term k unfold thermomajorization_expected_missed_error linarith
The expected missed error at the candidate witness pair is bounded by the worst-case error.
Applying the helper lemma thermomajorization_expected_missed_error_le_worst_error_le_iSup_2 with the non-negative uniform bound M, the universal bound on the expected missed error, and the membership of the candidate witnesses in the antitone probability simplex shows that the candidate evaluation is bounded by the double supremum, which is by definition the worst-case error.
uses
thermomajorization_expected_missed_error_le_worst_error_le_iSup_2exact thermomajorization_expected_missed_error_le_worst_error_le_iSup_2 (thermomajorization_expected_missed_error n q) {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} M hM0 hM hx_mem hy_mem
le_ciSup- In a conditionally complete lattice, any value in an indexed family bounded above is less than or equal to the supremum of the family.
Real.iSup_le- For real numbers, if every element of a family is bounded by a constant a and a ≥ 0, then the supremum of the family is also bounded by a.
Nat.zero_le- Zero is less than or equal to any natural number.
thermomajorization_witness_x_mem_antitone_stdSimplex- For valid parameters a < j < b ≤ n, the candidate witness vector x belongs to the standard simplex on ℝ^n and is antitone (monotonically non-increasing).
thermomajorization_witness_y_mem_antitone_stdSimplex- For valid parameters 0 < j ≤ n, the candidate witness vector y belongs to the standard simplex on ℝ^n and is antitone (monotonically non-increasing).
Finset.sum_le_sum- If each term of a finite sum is bounded by the corresponding term of another, then the sum is bounded by the other sum.
Finset.sum_le_univ_sum_of_nonneg- The sum of a non-negative function over a subset of a finite type is bounded by its sum over all elements of the type.
Finset.max'_le_iff- The maximum of a non-empty finite set is at most x if and only if every element in the set is at most x.
Finset.mem_insert- An element belongs to insert b s if and only if it equals b or belongs to s.
Finset.mem_image- An element belongs to the image f(s) if and only if it is the image of some element in s.
le_max_left- Any element is less than or equal to the maximum of itself and another element.
max_le_iff- The maximum of two elements is at most c if and only if both elements are at most c.
zero_le_one- Zero is less than or equal to one.
le_abs_self- Any real number is bounded above by its absolute value.
abs_neg- The absolute value of the negation of a number equals its absolute value.
abs_mul- The absolute value of a product is the product of the absolute values.
abs_of_nonneg- The absolute value of a non-negative number is the number itself.
mul_le_mul_of_nonneg_left- Multiplying an inequality by a non-negative number on the left preserves the inequality.
abs_nonneg- The absolute value of any number is non-negative.
mul_one- Multiplying any number by one leaves it unchanged.
Finset.sum_neg_distrib- The sum of negated terms equals the negation of the sum.
thermomajorization_expected_missed_error_le_worst_error_le_iSup_2- For any function f bounded above by M ≥ 0 on S × T, evaluating f at any point (x, y) ∈ S × T is bounded by the double supremum of f over S × T.
- In Lean's conditionally complete lattice on ℝ, an indexed supremum (iSup) over an empty index type defaults to 0. Handling this edge case requires proving that the uniform upper bound M satisfies 0 ≤ M so that Real.iSup_le applies.
- Because worst-case error is formalized using conditionally complete lattice suprema over sets rather than maxima over compact sets, the proof must explicitly establish that the sets of values are bounded above (BddAbove) at each stage of the supremum.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
lemma thermomajorization_expected_missed_error_le_worst_error_le_iSup_2 {α β : Type*} (f : α → β → ℝ) (S : Set α) (T : Set β) (M : ℝ) (hM0 : 0 ≤ M) (hM : ∀ a ∈ S, ∀ b ∈ T, f a b ≤ M) {x : α} (hx : x ∈ S) {y : β} (hy : y ∈ T) : f x y ≤ ⨆ a ∈ S, ⨆ b ∈ T, f a b := by have h4 : f x y ≤ ⨆ (_ : y ∈ T), f x y := by have hbdd : BddAbove (Set.range (fun (_ : y ∈ T) => f x y)) := by refine ⟨M, ?_⟩ rintro z ⟨hy', rfl⟩ exact hM x hx y hy' exact le_ciSup hbdd hy have h3 : (⨆ (_ : y ∈ T), f x y) ≤ ⨆ b, ⨆ (_ : b ∈ T), f x b := by have hbdd : BddAbove (Set.range (fun b => ⨆ (_ : b ∈ T), f x b)) := by refine ⟨M, ?_⟩ rintro z ⟨b, rfl⟩ refine Real.iSup_le (fun hb => hM x hx b hb) hM0 exact le_ciSup hbdd y have h2 : (⨆ b, ⨆ (_ : b ∈ T), f x b) ≤ ⨆ (_ : x ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f x b := by have hbdd : BddAbove (Set.range (fun (_ : x ∈ S) => ⨆ b, ⨆ (_ : b ∈ T), f x b)) := by refine ⟨M, ?_⟩ rintro z ⟨hx', rfl⟩ refine Real.iSup_le (fun b => ?_) hM0 refine Real.iSup_le (fun hb => hM x hx b hb) hM0 exact le_ciSup hbdd hx have h1 : (⨆ (_ : x ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f x b) ≤ ⨆ a, ⨆ (_ : a ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f a b := by have hbdd : BddAbove (Set.range (fun a => ⨆ (_ : a ∈ S), ⨆ b, ⨆ (_ : b ∈ T), f a b)) := by refine ⟨M, ?_⟩ rintro z ⟨a, rfl⟩ refine Real.iSup_le (fun ha => ?_) hM0 refine Real.iSup_le (fun b => ?_) hM0 refine Real.iSup_le (fun hb => hM a ha b hb) hM0 exact le_ciSup hbdd x exact h4.trans (h3.trans (h2.trans h1))/-- Expected missed error at any candidate witness pair is bounded by the worst-case error. -/theorem thermomajorization_expected_missed_error_le_worst_error (n : ℕ) (q : Finset.Ioo 0 n → ℝ) (a j b : ℕ) (ha : a < j) (hj : j < b) (hb : b ≤ n) : thermomajorization_expected_missed_error n q (thermomajorization_witness_x n a j b) (thermomajorization_witness_y n j) ≤ thermomajorization_random_probe_worst_error n q := by have hj0 : 0 < j := (Nat.zero_le a).trans_lt ha have hjn : j ≤ n := hj.le.trans hb have hx_mem : thermomajorization_witness_x n a j b ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} := thermomajorization_witness_x_mem_antitone_stdSimplex n a j b ha hj hb have hy_mem : thermomajorization_witness_y n j ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} := thermomajorization_witness_y_mem_antitone_stdSimplex n j hj0 hjn let M : ℝ := 1 + ∑ k : Finset.Ioo 0 n, |q k| have hM0 : 0 ≤ M := by positivity have hM : ∀ u ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v}, ∀ v ∈ {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v}, thermomajorization_expected_missed_error n q u v ≤ M := by rintro u ⟨hu, -⟩ v ⟨hv, -⟩ have h_diff : ∀ k : ℕ, thermomajorization_diff u v k ≤ 1 := by intro k unfold thermomajorization_diff have h1 : (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i - u i) ≤ (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i) := by apply Finset.sum_le_sum intro i _ have : 0 ≤ u i := hu.1 i linarith have h2 : (Finset.filter (fun (i : Fin n) => (i.val < k)) Finset.univ).sum (fun i => v i) ≤ Finset.univ.sum (fun i => v i) := by apply Finset.sum_le_univ_sum_of_nonneg intro i exact hv.1 i have h3 : Finset.univ.sum (fun i => v i) = 1 := hv.2 linarith have h_probe : thermomajorization_probe_error n (Finset.Ioo 0 n) u v ≤ 1 := by dsimp [thermomajorization_probe_error] rw [Finset.max'_le_iff] intro z hz simp only [Finset.mem_insert, Finset.mem_image] at hz rcases hz with rfl | ⟨k, hk, rfl⟩ · linarith · exact h_diff k have h_term : ∀ k : Finset.Ioo 0 n, - (q k * max 0 (thermomajorization_diff u v (k : ℕ))) ≤ |q k| := by intro k have hd := h_diff (k : ℕ) have h1 : 0 ≤ max 0 (thermomajorization_diff u v (k : ℕ)) := le_max_left 0 _ have h2 : max 0 (thermomajorization_diff u v (k : ℕ)) ≤ 1 := by rw [max_le_iff] exact ⟨zero_le_one, hd⟩ have h3 : - (q k * max 0 (thermomajorization_diff u v (k : ℕ))) ≤ |- (q k * max 0 (thermomajorization_diff u v (k : ℕ)))| := le_abs_self _ rw [abs_neg, abs_mul, abs_of_nonneg h1] at h3 have h4 : |q k| * max 0 (thermomajorization_diff u v (k : ℕ)) ≤ |q k| * 1 := mul_le_mul_of_nonneg_left h2 (abs_nonneg (q k)) rw [mul_one] at h4 linarith have h_sum : - ∑ k : Finset.Ioo 0 n, q k * max 0 (thermomajorization_diff u v (k : ℕ)) ≤ ∑ k : Finset.Ioo 0 n, |q k| := by rw [← Finset.sum_neg_distrib] apply Finset.sum_le_sum intro k _ exact h_term k unfold thermomajorization_expected_missed_error linarith exact thermomajorization_expected_missed_error_le_worst_error_le_iSup_2 (thermomajorization_expected_missed_error n q) {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} {v | v ∈ stdSimplex ℝ (Fin n) ∧ Antitone v} M hM0 hM hx_mem hy_mem