AFTD Auto-Formalizing Theoretical Domains

complete_coloring_quantum_sync_fraction_diff

theoremverified

For all real numbers $n$, $m$, $q$, and $r$ with $n \ne 0$, $n - 1 \ne 0$, $m \ne 0$, and $n = qm + r$, the difference of fractions $\frac{(q - 1)n + (q + 1)r}{n(n - 1)} - \frac{n - m}{m(n - 1)}$ equals $\frac{r(m - r)}{mn(n - 1)}$.

Statement

theorem complete_coloring_quantum_sync_fraction_diff (n m q r : ℝ) (hn : n ≠ 0) (hn1 : n - 1 ≠ 0) (hm : m ≠ 0) (hdiv : n = q * m + r) :
    ((q - 1) * n + (q + 1) * r) / (n * (n - 1)) - (n - m) / (m * (n - 1)) =
      (r * (m - r)) / (m * n * (n - 1))
Source
arXiv:2611.19002 Theorem 4.6.1 -- Quantum Coloring Games on Complete Graphs
Verified
22 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

Read back from the Lean

For all real numbers $n$, $m$, $q$, and $r$, assuming $n \neq 0$, $n - 1 \neq 0$, $m \neq 0$, and $n = q \cdot m + r$, it holds that $$\frac{(q - 1)n + (q + 1)r}{n(n - 1)} - \frac{n - m}{m(n - 1)} = \frac{r(m - r)}{m \cdot n \cdot (n - 1)}$$

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 proof brings the two fractions to the common denominator $mn(n - 1)$, which is nonzero because $n \ne 0$, $n - 1 \ne 0$, and $m \ne 0$. Clearing denominators reduces the identity to the polynomial relation $m((q - 1)n + (q + 1)r) - n(n - m) = r(m - r)$, which is supplied by the helper lemma `complete_coloring_quantum_sync_numerator_identity`.

  1. $m((q - 1)n + (q + 1)r) - n(n - m) = r(m - r)$

    Applying the lemma `complete_coloring_quantum_sync_numerator_identity` to $n$, $m$, $q$, and $r$ with the division relation $n = qm + r$ provides this polynomial identity for the numerators.

    line 5

    uses complete_coloring_quantum_sync_numerator_identity

      have hnum := complete_coloring_quantum_sync_numerator_identity n m q r hdiv
  2. $\frac{(q - 1)n + (q + 1)r}{n(n - 1)} - \frac{n - m}{m(n - 1)} = \frac{r(m - r)}{mn(n - 1)}$

    Because $n \ne 0$, $n - 1 \ne 0$, and $m \ne 0$, clearing fractions across the common denominator $mn(n - 1)$ reduces the target equation to $((q - 1)n + (q + 1)r)m - n(n - m) = r(m - r)$. This matches the numerator identity from the previous step up to commutativity of multiplication, closing the goal.

    lines 6–7

      field_simp
      linarith [hnum]
complete_coloring_quantum_sync_numerator_identity
For real numbers $n, m, q, r$ satisfying $n = qm + r$, the numerator identity $m((q - 1)n + (q + 1)r) - n(n - m) = r(m - r)$ holds.

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

/-- The difference of fractions over common denominator mn(n-1) reduces to r(m-r)/(mn(n-1)) when n = qm + r. -/theorem complete_coloring_quantum_sync_fraction_diff (n m q r : ℝ) (hn : n ≠ 0) (hn1 : n - 1 ≠ 0) (hm : m ≠ 0) (hdiv : n = q * m + r) :    ((q - 1) * n + (q + 1) * r) / (n * (n - 1)) - (n - m) / (m * (n - 1)) =      (r * (m - r)) / (m * n * (n - 1)) := by  have hnum := complete_coloring_quantum_sync_numerator_identity n m q r hdiv  field_simp  linarith [hnum]
See it in the graphDiscuss this resultChallenge it