AFTD Auto-Formalizing Theoretical Domains

thermomajorization_witness_x

def

For 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} where d₁ = (b - j) / (j * (b - a)) and d₂ = (j - a) / (j * (b - a)).

Statement

noncomputable def thermomajorization_witness_x (n : ℕ) (a j b : ℕ) : Fin n → ℝ
Defined in
OP-2138
Verified
22 Nov 2026
Axioms
none listed
Used by 4

Read back from the Lean

A definition of a function thermomajorization_witness_x, parameterized by natural numbers n, a, j, and b, which returns a vector/function of type Fin n → ℝ. For each index i : Fin n, the value is given by: (if (i : ℕ) < a then d₁ else 0) + (if (i : ℕ) < b then d₂ else 0), where d₁ = ((b : ℝ) - (j : ℝ)) / ((j : ℝ) * ((b : ℝ) - (a : ℝ))) and d₂ = ((j : ℝ) - (a : ℝ)) / ((j : ℝ) * ((b : ℝ) - (a : ℝ))).

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

/-- Thermomajorization candidate witness vector x for parameters a < j < b <= n. -/
noncomputable def thermomajorization_witness_x (n : ℕ) (a j b : ℕ) : Fin n → ℝ :=
  let d₁ : ℝ := ((b : ℝ) - (j : ℝ)) / ((j : ℝ) * ((b : ℝ) - (a : ℝ)))
  let d₂ : ℝ := ((j : ℝ) - (a : ℝ)) / ((j : ℝ) * ((b : ℝ) - (a : ℝ)))
  fun i => (if (i : ℕ) < a then d₁ else 0) + (if (i : ℕ) < b then d₂ else 0)
See it in the graphDiscuss this resultChallenge it