sign_add_eq_of_abs_lt
lemmaverifiedformalization
For any real numbers x and y, if |y| < |x|, then the sign of x + y equals the sign of x.
Statement
lemma sign_add_eq_of_abs_lt {x y : ℝ} (h : |y| < |x|) :
SignType.sign (x + y) = SignType.sign x- Formalizes
- scout/2610-16830-the-communication-complexity-of-the-coin-problem.md:306 Fact 2.1
- Verified
- 24 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext
Read back from the Lean
For all real numbers $x$ and $y$, if $|y| < |x|$, then the sign of $x + y$ is equal to the sign of $x$ (as values in SignType).
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
/-- If |y| < |x|, then sign(x + y) = sign(x). -/ lemma sign_add_eq_of_abs_lt {x y : ℝ} (h : |y| < |x|) : SignType.sign (x + y) = SignType.sign x := by rcases lt_trichotomy x 0 with hx | hx | hx · rw [abs_of_neg hx] at h rw [sign_neg hx, sign_neg] linarith [(abs_lt.mp h).1, (abs_lt.mp h).2] · subst hx have hnon := abs_nonneg y simp at h linarith · rw [abs_of_pos hx] at h rw [sign_pos hx, sign_pos] linarith [(abs_lt.mp h).1, (abs_lt.mp h).2]