Zulip Chat Archive

Stream: Is there code for X?

Topic: Simple theorem of + and ≤


Iván Renison (Oct 09 2025 at 15:24):

Hi, do you know if is there a simple way to probe this lemma?

example (a b c d : ) : 0  a + b + c + d  -b - c  a + d := by
  sorry

Ideally a way that can easily be used inline in a rewrite. The only way I was able to probe it is with a lot of rewrites, but it is not nice

Anthony Wang (Oct 09 2025 at 15:24):

This works:

import Mathlib

example (a b c d : ) : 0  a + b + c + d  -b - c  a + d := by
  grind

Anthony Wang (Oct 09 2025 at 15:26):

Or

import Mathlib

example (a b c d : ) : 0  a + b + c + d  -b - c  a + d := by
  constructor <;> intro _; linarith

Iván Renison (Oct 09 2025 at 15:27):

Okay, and for doing it inline I should do rw [show 0 ≤ a + b + c + d ↔ -b - c ≤ a + d by grind]?

Snir Broshi (Oct 09 2025 at 19:56):

Iván Renison said:

Okay, and for doing it inline I should do rw [show 0 ≤ a + b + c + d ↔ -b - c ≤ a + d by grind]?

You can also suffices -b - c ≤ a + d by grind if your goal is the LHS

Iván Renison (Oct 10 2025 at 08:36):

Thank you


Last updated: Dec 20 2025 at 21:32 UTC