op2046_extreme_pair_counterexample
There are two positive equal-sum four-vectors whose largest and smallest entries strictly satisfy the necessary majorization inequalities, but whose two-largest-entry inequality fails for every two-element subset of the first vector.
Statement
theorem op2046_extreme_pair_counterexample : let x : Fin 4 → ℚ := ![100, 38, 34, 28] let y : Fin 4 → ℚ := ![80, 60, 31, 29] (∑ i, x i) = (∑ i, y i) ∧ 0 < (∑ i, x i) ∧ (∀ i, x i ≤ x 0 ∧ y i ≤ y 0 ∧ x 3 ≤ x i ∧ y 3 ≤ y i) ∧ y 0 < x 0 ∧ x 3 < y 3 ∧ (∀ S : Finset (Fin 4), S.card = 2 → (∑ i ∈ S, x i) < y 0 + y 1)
- Source
- OP-2046, experiment 34901; finite counterexample to reducing majorization to the two extreme inequalities.
- Verified
- 20 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The theorem is proved by exhibiting an explicit pair of rational four-vectors, x = (100, 38, 34, 28) and y = (80, 60, 31, 29), and verifying all conditions by direct computation. After unfolding the definitions and splitting the conjunction into six subgoals, numerical normalization evaluates the coordinate sums and verifies that both sum to the positive value 200. Exhaustive case analysis on the four indices confirms that both vectors are sorted in non-increasing order, so that index 0 is maximal and index 3 is minimal, with strict inequalities between their extreme entries (80 < 100 and 28 < 29). Finally, exhaustive case analysis over all subsets of indices checks that every two-element subset of x sums to strictly less than y_0 + y_1 = 140, as the largest such sum is only 100 + 38 = 138.
The theorem is decomposed into six independent verification subgoals for the vectors x = (100, 38, 34, 28) and y = (80, 60, 31, 29).
The definitions of x and y are substituted into the goal. The index 3 is explicitly rewritten as Fin.succ (Fin.succ (Fin.succ 0)) to facilitate vector indexing, and the conjunction of the six required conditions is split into six separate subgoals.
dsimp only have h3 : (3 : Fin 4) = Fin.succ (Fin.succ (Fin.succ 0)) := rfl refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩
The two vectors have equal sums: ∑ x_i = ∑ y_i = 200.
Using Fin.sum_univ_succ to unroll the summation over Fin 4, direct rational arithmetic computes 100 + 38 + 34 + 28 = 200 and 80 + 60 + 31 + 29 = 200, which are equal.
uses
Fin.sum_univ_succ· norm_num [Fin.sum_univ_succ, Fin.isValue, Matrix.cons_val, h3]The total sum of x is strictly positive: 200 > 0.
Evaluating the sum of the entries of x yields 200, and numerical evaluation verifies 200 > 0.
uses
Fin.sum_univ_succ· norm_num [Fin.sum_univ_succ, Fin.isValue, Matrix.cons_val, h3]For each vector, the maximum is attained at index 0 and the minimum at index 3.
Let i ∈ {0, 1, 2, 3}. Case exhaustion over the four values of i reduces the claim to verifying that x_3 ≤ x_i ≤ x_0 and y_3 ≤ y_i ≤ y_0 for each coordinate. The coordinates of x are (100, 38, 34, 28) which all lie in [28, 100], and those of y are (80, 60, 31, 29) which all lie in [29, 80].
· intro i fin_cases i <;> norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) ≤ _ ∧ (29 : ℚ) ≤ _ <;> norm_num
The extreme entries satisfy the strict inequalities y_0 < x_0 (80 < 100) and x_3 < y_3 (28 < 29).
Directly evaluating the components at index 0 gives 80 < 100, and at index 3 gives 28 < 29, both of which hold by rational arithmetic.
· norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) < 29 <;> norm_num · norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) < 29 <;> norm_num
For every two-element subset S of indices, the sum ∑_{i ∈ S} x_i is strictly less than y_0 + y_1 = 140.
Let S be a subset of {0, 1, 2, 3} with |S| = 2. Case analysis enumerates all 16 subsets of Fin 4. For subsets with cardinality not equal to 2, the hypothesis |S| = 2 is false. For each of the six 2-element subsets, the sum of the entries of x is computed and verified to be strictly less than y_0 + y_1 = 80 + 60 = 140; in particular, the maximum two-element sum is x_0 + x_1 = 100 + 38 = 138 < 140.
· intro S hS fin_cases S <;> norm_num [Fin.isValue, Matrix.cons_val, h3] at *
Fin.sum_univ_succ- Decomposes a sum over Fin (n + 1) into its first term at index 0 plus the sum of the remaining terms over Fin n via Fin.succ.
- The auxiliary equality h3 expresses the index 3 as the third successor of 0, enabling Lean's matrix lookup mechanisms to evaluate vector entries at index 3.
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.
open scoped BigOperators Matrix Topologyopen MeasureTheory ProbabilityTheory Filternoncomputable sectiontheorem op2046_extreme_pair_counterexample : let x : Fin 4 → ℚ := ![100, 38, 34, 28] let y : Fin 4 → ℚ := ![80, 60, 31, 29] (∑ i, x i) = (∑ i, y i) ∧ 0 < (∑ i, x i) ∧ (∀ i, x i ≤ x 0 ∧ y i ≤ y 0 ∧ x 3 ≤ x i ∧ y 3 ≤ y i) ∧ y 0 < x 0 ∧ x 3 < y 3 ∧ (∀ S : Finset (Fin 4), S.card = 2 → (∑ i ∈ S, x i) < y 0 + y 1) := by dsimp only have h3 : (3 : Fin 4) = Fin.succ (Fin.succ (Fin.succ 0)) := rfl refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ · norm_num [Fin.sum_univ_succ, Fin.isValue, Matrix.cons_val, h3] · norm_num [Fin.sum_univ_succ, Fin.isValue, Matrix.cons_val, h3] · intro i fin_cases i <;> norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) ≤ _ ∧ (29 : ℚ) ≤ _ <;> norm_num · norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) < 29 <;> norm_num · norm_num [Fin.isValue, Matrix.cons_val] <;> change (28 : ℚ) < 29 <;> norm_num · intro S hS fin_cases S <;> norm_num [Fin.isValue, Matrix.cons_val, h3] at *