AFTD Auto-Formalizing Theoretical Domains

op_1693_noon_witness_loss_monotonicity_one

theoremverifiedformalization

For N = 1 and any balance parameter q in the open interval (0, 1) and transmissivities x, y in the open interval (0, 1), if noon_realign_witness 1 q x y > 1, then the partial derivatives of noon_realign_witness 1 q at x and y are non-negative (0 ≤ deriv (fun u => noon_realign_witness 1 q u y) x and 0 ≤ deriv (fun v => noon_realign_witness 1 q x v) y), and the detection region is upward closed: for 0 < x ≤ x' < 1 and 0 < y ≤ y' < 1, noon_realign_witness 1 q x y > 1 implies noon_realign_witness 1 q x' y' > 1.

Statement

theorem op_1693_noon_witness_loss_monotonicity_one :
    (∀ (q x y : ℝ)
      (hq : q ∈ Set.Ioo 0 1) (hx : x ∈ Set.Ioo 0 1) (hy : y ∈ Set.Ioo 0 1),
      noon_realign_witness 1 q x y > 1 →
        0 ≤ deriv (fun u => noon_realign_witness 1 q u y) x ∧
        0 ≤ deriv (fun v => noon_realign_witness 1 q x v) y) ∧
    (∀ (q x y x' y' : ℝ)
      (hq : q ∈ Set.Ioo 0 1)
      (hx : 0 < x ∧ x ≤ x' ∧ x' < 1) (hy : 0 < y ∧ y ≤ y' ∧ y' < 1),
      noon_realign_witness 1 q x y > 1 →
        noon_realign_witness 1 q x' y' > 1)
Formalizes
arXiv:2611.17021
Verified
15 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • noon_realign_witnessFor any natural number N, real balance parameter q, and real transmissivities x, y, the second-moment realignment witness W_N(q, x, y) is…
  • Cslib.SKI.Polynomial.evalSubstitute terms for the free variables of a polynomial

Read back from the Lean

The declaration asserts a conjunction of two statements about noon_realign_witness with parameter $N = 1$: 1. For all real numbers $q, x, y$, if $q \in (0, 1)$, $x \in (0, 1)$, and $y \in (0, 1)$, and if $\text{noon\_realign\_witness}(1, q, x, y) > 1$, then: - the derivative of $u \mapsto \text{noon\_realign\_witness}(1, q, u, y)$ at $x$ is non-negative ($\ge 0$), and - the derivative of $v \mapsto \text{noon\_realign\_witness}(1, q, x, v)$ at $y$ is non-negative ($\ge 0$). 2. For all real numbers $q, x, y, x', y'$, if $q \in (0, 1)$, $0 < x \le x' < 1$, and $0 < y \le y' < 1$, and if $\text{noon\_realign\_witness}(1, q, x, y) > 1$, then $\text{noon\_realign\_witness}(1, q, x', y') > 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

For photon number N = 1, the realignment witness deficit W_1(q, x, y) - 1 is algebraically proportional to the quadratic form G(s, r) = s^2 + r^2 + 4sr - s - r with s = qx and r = (1-q)y. When W_1 > 1, G(s, r) > 0 forces the linear lower bounds 2s + 4r ≥ 1 and 4s + 2r ≥ 1, which in turn guarantee that the partial derivatives of W_1 with respect to x and y are non-negative. Furthermore, these lower bounds ensure that G(s+ds, r+dr) remains strictly positive under any non-negative increments ds, dr ≥ 0, proving that the detection region is upward closed.

  1. The derivative of any quadratic function u ↦ a*u^2 + b*u + c is 2*a*x + b.

    We represent the quadratic function as the evaluation of the polynomial a*X^2 + b*X + c. Differentiating this polynomial expression yields the linear polynomial 2*a*X + b, whose evaluation at x is 2*a*x + b.

    lines 1–9

    uses Polynomial.deriv

    private lemma op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic (a b c x : ℝ) :
        deriv (fun u => a*u^2 + b*u + c) x = 2*a*x + b := by
      have h : (fun u => a*u^2 + b*u + c) =
          fun u => (Polynomial.C a * Polynomial.X^2 + Polynomial.C b * Polynomial.X + Polynomial.C c).eval u := by
        funext u; simp
      rw [h]
      simp only [Polynomial.deriv]
      simp
      ring
  2. For N = 1, the witness deficit W_1(q, x, y) - 1 equals 2*((q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y)).

    Unfolding the definition of noon_realign_witness for N = 1, the sum over range(2) expands into the k=0 and k=1 terms. Simplifying algebraically yields the stated quadratic expression in q*x and (1-q)*y.

    lines 11–16

    uses Finset.sum_range_succ

    private lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one (q x y : ℝ) :
        noon_realign_witness 1 q x y - 1 =
          2*((q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y)) := by
      unfold noon_realign_witness
      simp [Finset.sum_range_succ, Nat.choose]
      ring
  3. The partial derivative of the witness with respect to x is 2*q*(2*(q*x) + 4*((1-q)*y) - 1).

    Viewing the witness as a quadratic function of the first variable u with coefficients depending on q and y, we apply the quadratic derivative lemma and simplify algebraically.

    lines 18–30

    uses Finset.sum_range_succ, op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic

    private lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv (q y x : ℝ) :
        deriv (fun u => noon_realign_witness 1 q u y) x =
          2*q*(2*(q*x) + 4*((1-q)*y) - 1) := by
      have hfun : (fun u => noon_realign_witness 1 q u y) =
          fun u => (2*q^2)*u^2 + (-2*q + 8*q*(1-q)*y)*u + (1 - 2*((1-q)*y) + 2*((1-q)*y)^2) := by
        funext u
        unfold noon_realign_witness
        simp [Finset.sum_range_succ, Nat.choose]
        ring
      rw [hfun]
      rw [op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic]
      ring
    
  4. The partial derivative of the witness with respect to y is 2*(1-q)*(4*(q*x) + 2*((1-q)*y) - 1).

    Symmetrically, viewing the witness as a quadratic function of the second variable v, applying the quadratic derivative lemma and factoring yields the result.

    lines 31–43

    uses Finset.sum_range_succ, op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic

    private lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv (q x y : ℝ) :
        deriv (fun v => noon_realign_witness 1 q x v) y =
          2*(1-q)*(4*(q*x) + 2*((1-q)*y) - 1) := by
      have hfun : (fun v => noon_realign_witness 1 q x v) =
          fun v => (2*(1-q)^2)*v^2 + (-2*(1-q) + 8*(1-q)*q*x)*v + (1 - 2*(q*x) + 2*(q*x)^2) := by
        funext v
        unfold noon_realign_witness
        simp [Finset.sum_range_succ, Nat.choose]
        ring
      rw [hfun]
      rw [op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic]
      ring
    
  5. For positive s and r, if s^2 + r^2 + 4*s*r - s - r > 0, then 1 ≤ 2*s + 4*r. automation

    Assuming for contradiction that 2*s + 4*r < 1, the expression s^2 + r^2 + 4*s*r - s - r can be rewritten as a sum of squares and non-negative products that is non-positive, contradicting strict positivity.

    lines 44–51

    uses sq_nonneg, mul_nonneg

    private lemma op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound
        (s r : ℝ) (hs : 0 < s) (hr : 0 < r)
        (hG : 0 < s^2 + r^2 + 4*s*r - s - r) : 1 ≤ 2*s + 4*r := by
      by_contra h
      push Not at h
      nlinarith [sq_nonneg s, sq_nonneg (r - 1), mul_nonneg hs.le (show (0:ℝ) ≤ 1 - 2*s - 4*r by linarith),
        mul_nonneg hr.le (show (0:ℝ) ≤ 1 - r by linarith)]
    
  6. For positive s and r, if s^2 + r^2 + 4*s*r - s - r > 0, then 1 ≤ 4*s + 2*r. automation

    Symmetrically, assuming 4*s + 2*r < 1 contradicts positivity of the quadratic form via non-linear arithmetic.

    lines 52–59

    uses sq_nonneg, mul_nonneg

    private lemma op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound
        (s r : ℝ) (hs : 0 < s) (hr : 0 < r)
        (hG : 0 < s^2 + r^2 + 4*s*r - s - r) : 1 ≤ 4*s + 2*r := by
      by_contra h
      push Not at h
      nlinarith [sq_nonneg r, sq_nonneg (s - 1), mul_nonneg hr.le (show (0:ℝ) ≤ 1 - 4*s - 2*r by linarith),
        mul_nonneg hs.le (show (0:ℝ) ≤ 1 - s by linarith)]
    
  7. The quadratic form G(s, r) = s^2 + r^2 + 4*s*r - s - r is strictly positive under non-negative shifts ds, dr ≥ 0 when G(s, r) > 0 and s, r > 0.

    The bounds 2*s + 4*r - 1 ≥ 0 and 4*s + 2*r - 1 ≥ 0 mean that the first-order variation (2*s + 4*r - 1)*ds + (4*s + 2*r - 1)*dr is non-negative, and the remaining terms ds^2 + dr^2 + 4*ds*dr are also non-negative, so G(s+ds, r+dr) remains strictly positive.

    lines 60–70

    uses op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound, op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound, mul_nonneg, sq_nonneg

    private lemma op_1693_noon_witness_loss_monotonicity_one_G_mono
        (s r ds dr : ℝ) (hs : 0 < s) (hr : 0 < r)
        (hds : 0 ≤ ds) (hdr : 0 ≤ dr)
        (hG : 0 < s^2 + r^2 + 4*s*r - s - r) :
        0 < (s+ds)^2 + (r+dr)^2 + 4*(s+ds)*(r+dr) - (s+ds) - (r+dr) := by
      have hA : 0 ≤ 2*s + 4*r - 1 := by
        have := op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound s r hs hr hG; linarith
      have hB : 0 ≤ 4*s + 2*r - 1 := by
        have := op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound s r hs hr hG; linarith
      nlinarith [mul_nonneg hA hds, mul_nonneg hB hdr, mul_nonneg hds hdr, sq_nonneg ds, sq_nonneg dr]
    
  8. The theorem splits into two conjuncts: non-negativity of the partial derivatives and monotonicity (upward closure) of the detection region.

    We split the conjunction into its two goals.

    lines 72–83

    theorem op_1693_noon_witness_loss_monotonicity_one :
        (∀ (q x y : ℝ)
          (hq : q ∈ Set.Ioo 0 1) (hx : x ∈ Set.Ioo 0 1) (hy : y ∈ Set.Ioo 0 1),
          noon_realign_witness 1 q x y > 1 →
            0 ≤ deriv (fun u => noon_realign_witness 1 q u y) x ∧
            0 ≤ deriv (fun v => noon_realign_witness 1 q x v) y) ∧
        (∀ (q x y x' y' : ℝ)
          (hq : q ∈ Set.Ioo 0 1)
          (hx : 0 < x ∧ x ≤ x' ∧ x' < 1) (hy : 0 < y ∧ y ≤ y' ∧ y' < 1),
          noon_realign_witness 1 q x y > 1 →
            noon_realign_witness 1 q x' y' > 1) := by
      constructor
  9. Under W_1 > 1, the quadratic G(q*x, (1-q)*y) is strictly positive, yielding linear lower bounds on the transmissivity combinations.

    Setting s = q*x > 0 and r = (1-q)*y > 0, the witness deficit identity shows G(s, r) > 0, which implies 1 ≤ 2*s + 4*r and 1 ≤ 4*s + 2*r.

    lines 84–93

    uses mul_pos, op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one, op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound, op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound

      · intro q x y hq hx hy hW
        have hqx : 0 < q*x := mul_pos hq.1 hx.1
        have hry : 0 < (1-q)*y := mul_pos (by linarith [hq.2]) hy.1
        have hG : 0 < (q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y) := by
          have h := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x y
          linarith [h, hW]
        have hineq : 1 ≤ 2*(q*x) + 4*((1-q)*y) :=
          op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound (q*x) ((1-q)*y) hqx hry hG
        have hineq2 : 1 ≤ 4*(q*x) + 2*((1-q)*y) :=
          op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound (q*x) ((1-q)*y) hqx hry hG
  10. The partial derivative of the witness with respect to x is non-negative.

    Substituting the derivative formula 2*q*(2*(q*x) + 4*((1-q)*y) - 1), non-negativity follows since q > 0 and 2*(q*x) + 4*((1-q)*y) - 1 ≥ 0.

    lines 94–97

    uses op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv

        constructor
        · have hd := op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv q y x
          rw [hd]
          nlinarith [hineq, hq.1]
  11. The partial derivative of the witness with respect to y is non-negative.

    Substituting the derivative formula 2*(1-q)*(4*(q*x) + 2*((1-q)*y) - 1), non-negativity follows since 1-q > 0 and 4*(q*x) + 2*((1-q)*y) - 1 ≥ 0.

    lines 98–101

    uses op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv

        · have hd := op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv q x y
          rw [hd]
          have hq1 : (0:ℝ) < 1 - q := by linarith [hq.2]
          nlinarith [hineq2, hq1]
  12. For the second conjunct, assuming W_1(q, x, y) > 1, the quadratic G(q*x, (1-q)*y) is strictly positive.

    We introduce the parameters and use the deficit identity to deduce G(q*x, (1-q)*y) > 0.

    lines 102–107

    uses mul_pos, op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one

      · intro q x y x' y' hq hx hy hW
        have hqx : 0 < q*x := mul_pos hq.1 hx.1
        have hry : 0 < (1-q)*y := mul_pos (by linarith [hq.2]) hy.1
        have hG : 0 < (q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y) := by
          have h := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x y
          linarith [h, hW]
  13. The witness condition is preserved at increased transmissivities: W_1(q, x', y') > 1.

    Setting non-negative increments ds = q*(x'-x) ≥ 0 and dr = (1-q)*(y'-y) ≥ 0, monotonicity of G gives G(q*x', (1-q)*y') > 0, which by the deficit formula implies W_1(q, x', y') > 1.

    lines 108–116

    uses mul_nonneg, op_1693_noon_witness_loss_monotonicity_one_G_mono, op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one

        have hds : 0 ≤ q*(x'-x) := mul_nonneg hq.1.le (by linarith [hx.2.1])
        have hdr : 0 ≤ (1-q)*(y'-y) := mul_nonneg (by linarith [hq.2]) (by linarith [hy.2.1])
        have hmono := op_1693_noon_witness_loss_monotonicity_one_G_mono (q*x) ((1-q)*y)
          (q*(x'-x)) ((1-q)*(y'-y)) hqx hry hds hdr hG
        have hx' : q*x + q*(x'-x) = q*x' := by ring
        have hy' : (1-q)*y + (1-q)*(y'-y) = (1-q)*y' := by ring
        rw [hx', hy'] at hmono
        have hW' := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x' y'
        linarith [hW', hmono]
Polynomial.deriv
The derivative of the polynomial evaluation function at x equals the evaluation of the formal polynomial derivative at x.
Finset.sum_range_succ
A sum over a range of length n + 1 equals the sum over range n plus the term at index n.
op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic
The derivative of a quadratic function a u^2 + b u + c with respect to u at x is 2 a x + b.
sq_nonneg
The square of any real number is non-negative.
mul_nonneg
The product of two non-negative numbers is non-negative.
mul_pos
The product of two strictly positive numbers is strictly positive.
op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound
For positive s and r, if s^2 + r^2 + 4sr - s - r > 0, then 1 ≤ 2s + 4r.
op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound
For positive s and r, if s^2 + r^2 + 4sr - s - r > 0, then 1 ≤ 4s + 2r.
op_1693_noon_witness_loss_monotonicity_one_G_mono
If G(s, r) > 0 for positive s, r, then G(s + ds, r + dr) > 0 for any non-negative increments ds, dr.
op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one
The witness deficit W_1(q, x, y) - 1 equals 2((qx)^2 + ((1-q)y)^2 + 4(qx)((1-q)y) - qx - (1-q)y).
op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv
The partial derivative of W_1 with respect to x is 2q(2(qx) + 4((1-q)y) - 1).
op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv
The partial derivative of W_1 with respect to y is 2(1-q)(4(qx) + 2((1-q)y) - 1).

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

private lemma op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic (a b c x : ℝ) :    deriv (fun u => a*u^2 + b*u + c) x = 2*a*x + b := by  have h : (fun u => a*u^2 + b*u + c) =      fun u => (Polynomial.C a * Polynomial.X^2 + Polynomial.C b * Polynomial.X + Polynomial.C c).eval u := by    funext u; simp  rw [h]  simp only [Polynomial.deriv]  simp  ringprivate lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one (q x y : ℝ) :    noon_realign_witness 1 q x y - 1 =      2*((q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y)) := by  unfold noon_realign_witness  simp [Finset.sum_range_succ, Nat.choose]  ringprivate lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv (q y x : ℝ) :    deriv (fun u => noon_realign_witness 1 q u y) x =      2*q*(2*(q*x) + 4*((1-q)*y) - 1) := by  have hfun : (fun u => noon_realign_witness 1 q u y) =      fun u => (2*q^2)*u^2 + (-2*q + 8*q*(1-q)*y)*u + (1 - 2*((1-q)*y) + 2*((1-q)*y)^2) := by    funext u    unfold noon_realign_witness    simp [Finset.sum_range_succ, Nat.choose]    ring  rw [hfun]  rw [op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic]  ringprivate lemma op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv (q x y : ℝ) :    deriv (fun v => noon_realign_witness 1 q x v) y =      2*(1-q)*(4*(q*x) + 2*((1-q)*y) - 1) := by  have hfun : (fun v => noon_realign_witness 1 q x v) =      fun v => (2*(1-q)^2)*v^2 + (-2*(1-q) + 8*(1-q)*q*x)*v + (1 - 2*(q*x) + 2*(q*x)^2) := by    funext v    unfold noon_realign_witness    simp [Finset.sum_range_succ, Nat.choose]    ring  rw [hfun]  rw [op_1693_noon_witness_loss_monotonicity_one_deriv_quadratic]  ringprivate lemma op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound    (s r : ℝ) (hs : 0 < s) (hr : 0 < r)    (hG : 0 < s^2 + r^2 + 4*s*r - s - r) : 1 ≤ 2*s + 4*r := by  by_contra h  push Not at h  nlinarith [sq_nonneg s, sq_nonneg (r - 1), mul_nonneg hs.le (show (0:ℝ) ≤ 1 - 2*s - 4*r by linarith),    mul_nonneg hr.le (show (0:ℝ) ≤ 1 - r by linarith)]private lemma op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound    (s r : ℝ) (hs : 0 < s) (hr : 0 < r)    (hG : 0 < s^2 + r^2 + 4*s*r - s - r) : 1 ≤ 4*s + 2*r := by  by_contra h  push Not at h  nlinarith [sq_nonneg r, sq_nonneg (s - 1), mul_nonneg hr.le (show (0:ℝ) ≤ 1 - 4*s - 2*r by linarith),    mul_nonneg hs.le (show (0:ℝ) ≤ 1 - s by linarith)]private lemma op_1693_noon_witness_loss_monotonicity_one_G_mono    (s r ds dr : ℝ) (hs : 0 < s) (hr : 0 < r)    (hds : 0 ≤ ds) (hdr : 0 ≤ dr)    (hG : 0 < s^2 + r^2 + 4*s*r - s - r) :    0 < (s+ds)^2 + (r+dr)^2 + 4*(s+ds)*(r+dr) - (s+ds) - (r+dr) := by  have hA : 0 ≤ 2*s + 4*r - 1 := by    have := op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound s r hs hr hG; linarith  have hB : 0 ≤ 4*s + 2*r - 1 := by    have := op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound s r hs hr hG; linarith  nlinarith [mul_nonneg hA hds, mul_nonneg hB hdr, mul_nonneg hds hdr, sq_nonneg ds, sq_nonneg dr]/-- For photon number N = 1, whenever W_1 > 1 the partial derivatives are non-negative and the detected region is upward closed. -/theorem op_1693_noon_witness_loss_monotonicity_one :    (∀ (q x y : ℝ)      (hq : q ∈ Set.Ioo 0 1) (hx : x ∈ Set.Ioo 0 1) (hy : y ∈ Set.Ioo 0 1),      noon_realign_witness 1 q x y > 1 →        0 ≤ deriv (fun u => noon_realign_witness 1 q u y) x ∧        0 ≤ deriv (fun v => noon_realign_witness 1 q x v) y) ∧    (∀ (q x y x' y' : ℝ)      (hq : q ∈ Set.Ioo 0 1)      (hx : 0 < x ∧ x ≤ x' ∧ x' < 1) (hy : 0 < y ∧ y ≤ y' ∧ y' < 1),      noon_realign_witness 1 q x y > 1 →        noon_realign_witness 1 q x' y' > 1) := by  constructor  · intro q x y hq hx hy hW    have hqx : 0 < q*x := mul_pos hq.1 hx.1    have hry : 0 < (1-q)*y := mul_pos (by linarith [hq.2]) hy.1    have hG : 0 < (q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y) := by      have h := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x y      linarith [h, hW]    have hineq : 1 ≤ 2*(q*x) + 4*((1-q)*y) :=      op_1693_noon_witness_loss_monotonicity_one_G_pos_x_bound (q*x) ((1-q)*y) hqx hry hG    have hineq2 : 1 ≤ 4*(q*x) + 2*((1-q)*y) :=      op_1693_noon_witness_loss_monotonicity_one_G_pos_y_bound (q*x) ((1-q)*y) hqx hry hG    constructor    · have hd := op_1693_noon_witness_loss_monotonicity_one_witness_one_x_deriv q y x      rw [hd]      nlinarith [hineq, hq.1]    · have hd := op_1693_noon_witness_loss_monotonicity_one_witness_one_y_deriv q x y      rw [hd]      have hq1 : (0:ℝ) < 1 - q := by linarith [hq.2]      nlinarith [hineq2, hq1]  · intro q x y x' y' hq hx hy hW    have hqx : 0 < q*x := mul_pos hq.1 hx.1    have hry : 0 < (1-q)*y := mul_pos (by linarith [hq.2]) hy.1    have hG : 0 < (q*x)^2 + ((1-q)*y)^2 + 4*(q*x)*((1-q)*y) - (q*x) - ((1-q)*y) := by      have h := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x y      linarith [h, hW]    have hds : 0 ≤ q*(x'-x) := mul_nonneg hq.1.le (by linarith [hx.2.1])    have hdr : 0 ≤ (1-q)*(y'-y) := mul_nonneg (by linarith [hq.2]) (by linarith [hy.2.1])    have hmono := op_1693_noon_witness_loss_monotonicity_one_G_mono (q*x) ((1-q)*y)      (q*(x'-x)) ((1-q)*(y'-y)) hqx hry hds hdr hG    have hx' : q*x + q*(x'-x) = q*x' := by ring    have hy' : (1-q)*y + (1-q)*(y'-y) = (1-q)*y' := by ring    rw [hx', hy'] at hmono    have hW' := op_1693_noon_witness_loss_monotonicity_one_witness_one_minus_one q x' y'    linarith [hW', hmono]
See it in the graphDiscuss this resultChallenge it