AFTD Auto-Formalizing Theoretical Domains

qutrit_ppt_line_distance_exact

theoremverified

If three real coefficients are at most one third and the total with an outside mass is one, their total distance from the uniform line plus outside mass is twice that outside mass.

Statement

theorem qutrit_ppt_line_distance_exact (p0 p1 p2 q : ℝ)
    (h0 : p0 ≤ 1/3) (h1 : p1 ≤ 1/3) (h2 : p2 ≤ 1/3)
    (hs : p0+p1+p2+q=1) :
    |p0-1/3| + |p1-1/3| + |p2-1/3| + q = 2*q
Source
OP-2299, finite bound for perturbations vanishing on a Bell line.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

Because each $p_i \le 1/3$, the differences $p_i - 1/3$ are non-positive, so their absolute values simplify to $1/3 - p_i$. Summing these three terms yields $1 - (p_0 + p_1 + p_2)$, which equals $q$ by the total mass condition $p_0 + p_1 + p_2 + q = 1$. Adding the outside mass $q$ directly produces $2q$.

  1. Each absolute value $|p_i - 1/3|$ is rewritten as $-(p_i - 1/3)$.

    By hypotheses $h0$, $h1$, and $h2$, each $p_i \le 1/3$. By `sub_nonpos.mpr`, this implies $p_i - 1/3 \le 0$. Applying `abs_of_nonpos`, the absolute value of a non-positive quantity is its negation, so $|p_i - 1/3| = -(p_i - 1/3)$ for each $i \in \{0, 1, 2\}$.

    lines 5–6

    uses abs_of_nonpos, sub_nonpos.mpr

      rw [abs_of_nonpos (sub_nonpos.mpr h0), abs_of_nonpos (sub_nonpos.mpr h1),
          abs_of_nonpos (sub_nonpos.mpr h2)]
  2. The total expression simplifies to $2q$. automation

    Expanding $-(p_0 - 1/3) - (p_1 - 1/3) - (p_2 - 1/3) + q$ gives $1 - (p_0 + p_1 + p_2) + q$. Combined with the normalization condition $p_0 + p_1 + p_2 + q = 1$, which gives $1 - (p_0 + p_1 + p_2) = q$, the sum simplifies to $q + q = 2q$. This linear arithmetic deduction is closed by `linarith`.

    line 7

      linarith
abs_of_nonpos
If a real number (or element of an ordered additive group) is at most zero, its absolute value equals its negation: if $a \le 0$, then $|a| = -a$.
sub_nonpos.mpr
If $a \le b$, then their difference is non-positive: $a - b \le 0$.

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

theorem qutrit_ppt_line_distance_exact (p0 p1 p2 q : ℝ)    (h0 : p0 ≤ 1/3) (h1 : p1 ≤ 1/3) (h2 : p2 ≤ 1/3)    (hs : p0+p1+p2+q=1) :    |p0-1/3| + |p1-1/3| + |p2-1/3| + q = 2*q := by  rw [abs_of_nonpos (sub_nonpos.mpr h0), abs_of_nonpos (sub_nonpos.mpr h1),      abs_of_nonpos (sub_nonpos.mpr h2)]  linarith
See it in the graphDiscuss this resultChallenge it