AFTD Auto-Formalizing Theoretical Domains

cos_sin_comb_at_most_one_root

theoremverified

If a linear combination c * cos t + d * sin t has two distinct roots in an open interval (a, b) of length less than π, then both coefficients c and d must be zero.

Statement

theorem cos_sin_comb_at_most_one_root (c d a b : ℝ) (hab : b - a < Real.pi)
    (t₁ t₂ : ℝ) (h₁ : t₁ ∈ Set.Ioo a b) (h₂ : t₂ ∈ Set.Ioo a b)
    (heq₁ : c * Real.cos t₁ + d * Real.sin t₁ = 0)
    (heq₂ : c * Real.cos t₂ + d * Real.sin t₂ = 0)
    (hlt : t₁ < t₂) : c = 0 ∧ d = 0
Source
arXiv:2610.38368, Lemma 2.1
Verified
08 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

Read back from the Lean

For all real numbers $c, d, a, b$, if $b - a < \pi$, and if there exist real numbers $t_1, t_2$ such that $t_1 \in (a, b)$, $t_2 \in (a, b)$, $c \cos(t_1) + d \sin(t_1) = 0$, $c \cos(t_2) + d \sin(t_2) = 0$, and $t_1 < t_2$, then $c = 0$ and $d = 0$.

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

Viewing the two root conditions as a 2 × 2 linear system for the coefficients c and d, elimination yields c * sin(t₂ - t₁) = 0 and d * sin(t₂ - t₁) = 0 via the sine subtraction identity. Because both roots lie in an open interval of length less than π, their difference t₂ - t₁ lies strictly between 0 and π, where sine is strictly positive and therefore nonzero. Dividing out this nonzero factor forces both c and d to be zero.

  1. t₂ - t₁ lies in the open interval (0, π).

    Unfolding membership in an open interval (`Set.mem_Ioo`), the goal is 0 < t₂ - t₁ and t₂ - t₁ < π. These bounds follow by linear arithmetic (`linarith`) from the assumptions that t₁ and t₂ lie in (a, b), t₁ < t₂, and the interval length satisfies b - a < π.

    lines 7–9

    uses Set.mem_Ioo

      have h_mem : t₂ - t₁ ∈ Set.Ioo 0 Real.pi := by
        rw [Set.mem_Ioo] at h₁ h₂ ⊢
        exact ⟨by linarith, by linarith⟩
  2. sin(t₂ - t₁) is strictly positive, and in particular nonzero.

    Because t₂ - t₁ ∈ (0, π), its sine is strictly positive by `Real.sin_pos_of_mem_Ioo`. Since it is strictly greater than 0, it is nonzero (`ne_of_gt`).

    lines 10–11

    uses Real.sin_pos_of_mem_Ioo, ne_of_gt

      have h_sin_pos : 0 < Real.sin (t₂ - t₁) := Real.sin_pos_of_mem_Ioo h_mem
      have h_sin_ne : Real.sin (t₂ - t₁) ≠ 0 := ne_of_gt h_sin_pos
  3. c * sin(t₂ - t₁) = 0

    Using the sine difference formula `Real.sin_sub`, algebra shows that c * sin(t₂ - t₁) can be rewritten as sin t₂ * (c * cos t₁ + d * sin t₁) - sin t₁ * (c * cos t₂ + d * sin t₂). Because t₁ and t₂ are roots (hypotheses `heq₁` and `heq₂`), both bracketed terms vanish, making the entire expression 0.

    lines 12–17

    uses Real.sin_sub

      have hc : c * Real.sin (t₂ - t₁) = 0 := by
        calc
          c * Real.sin (t₂ - t₁) = Real.sin t₂ * (c * Real.cos t₁ + d * Real.sin t₁) - Real.sin t₁ * (c * Real.cos t₂ + d * Real.sin t₂) := by
            rw [Real.sin_sub]; ring
          _ = Real.sin t₂ * 0 - Real.sin t₁ * 0 := by rw [heq₁, heq₂]
          _ = 0 := by ring
  4. d * sin(t₂ - t₁) = 0

    Similarly, expanding sin(t₂ - t₁) with `Real.sin_sub` allows rewriting d * sin(t₂ - t₁) as cos t₁ * (c * cos t₂ + d * sin t₂) - cos t₂ * (c * cos t₁ + d * sin t₁). Substituting 0 for the two root expressions leaves cos t₁ * 0 - cos t₂ * 0 = 0.

    lines 18–23

    uses Real.sin_sub

      have hd : d * Real.sin (t₂ - t₁) = 0 := by
        calc
          d * Real.sin (t₂ - t₁) = Real.cos t₁ * (c * Real.cos t₂ + d * Real.sin t₂) - Real.cos t₂ * (c * Real.cos t₁ + d * Real.sin t₁) := by
            rw [Real.sin_sub]; ring
          _ = Real.cos t₁ * 0 - Real.cos t₂ * 0 := by rw [heq₁, heq₂]
          _ = 0 := by ring
  5. c = 0 and d = 0

    Since the product of two numbers is zero only if one factor is zero (`mul_eq_zero.mp`), each of c * sin(t₂ - t₁) = 0 and d * sin(t₂ - t₁) = 0 gives a disjunction. Because sin(t₂ - t₁) ≠ 0, ruling out the right-hand factor (`resolve_right`) yields c = 0 and d = 0.

    lines 24–25

    uses mul_eq_zero.mp, resolve_right

      exact ⟨(mul_eq_zero.mp hc).resolve_right h_sin_ne,
             (mul_eq_zero.mp hd).resolve_right h_sin_ne⟩
Set.mem_Ioo
A point x belongs to the open interval (a, b) if and only if a < x and x < b.
Real.sin_pos_of_mem_Ioo
The sine of any real number in the open interval (0, π) is strictly positive.
ne_of_gt
If a > b, then a ≠ b.
Real.sin_sub
The angle difference formula for sine: sin(x - y) = sin x * cos y - cos x * sin y.
mul_eq_zero.mp
If the product of two real numbers is zero, at least one of them must be zero.
resolve_right
If P ∨ Q holds and Q is false, then P 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

/-- A nonzero linear combination of cosine and sine has at most one zero in any interval of length less than π. -/theorem cos_sin_comb_at_most_one_root (c d a b : ℝ) (hab : b - a < Real.pi)    (t₁ t₂ : ℝ) (h₁ : t₁ ∈ Set.Ioo a b) (h₂ : t₂ ∈ Set.Ioo a b)    (heq₁ : c * Real.cos t₁ + d * Real.sin t₁ = 0)    (heq₂ : c * Real.cos t₂ + d * Real.sin t₂ = 0)    (hlt : t₁ < t₂) : c = 0 ∧ d = 0 := by  have h_mem : t₂ - t₁ ∈ Set.Ioo 0 Real.pi := by    rw [Set.mem_Ioo] at h₁ h₂ ⊢    exact ⟨by linarith, by linarith⟩  have h_sin_pos : 0 < Real.sin (t₂ - t₁) := Real.sin_pos_of_mem_Ioo h_mem  have h_sin_ne : Real.sin (t₂ - t₁) ≠ 0 := ne_of_gt h_sin_pos  have hc : c * Real.sin (t₂ - t₁) = 0 := by    calc      c * Real.sin (t₂ - t₁) = Real.sin t₂ * (c * Real.cos t₁ + d * Real.sin t₁) - Real.sin t₁ * (c * Real.cos t₂ + d * Real.sin t₂) := by        rw [Real.sin_sub]; ring      _ = Real.sin t₂ * 0 - Real.sin t₁ * 0 := by rw [heq₁, heq₂]      _ = 0 := by ring  have hd : d * Real.sin (t₂ - t₁) = 0 := by    calc      d * Real.sin (t₂ - t₁) = Real.cos t₁ * (c * Real.cos t₂ + d * Real.sin t₂) - Real.cos t₂ * (c * Real.cos t₁ + d * Real.sin t₁) := by        rw [Real.sin_sub]; ring      _ = Real.cos t₁ * 0 - Real.cos t₂ * 0 := by rw [heq₁, heq₂]      _ = 0 := by ring  exact ⟨(mul_eq_zero.mp hc).resolve_right h_sin_ne,         (mul_eq_zero.mp hd).resolve_right h_sin_ne⟩
See it in the graphDiscuss this resultChallenge it