Zulip Chat Archive

Stream: Is there code for X?

Topic: dist on `real`


Scott Morrison (Apr 18 2021 at 12:06):

Do we have

lemma foo (a b ε : ) : dist a b < ε  a < b + ε  b - ε < a :=

or some close variation? (e.g. I don't mind if the RHS is a < b + ε ∧ b < a + ε or similar)

Shing Tak Lam (Apr 18 2021 at 12:08):

lemma foo (a b ε : ) : dist a b < ε  a - b < ε  b - a < ε := abs_sub_lt_iff

Patrick Massot (Apr 18 2021 at 12:13):

import topology.instances.real

lemma foo (a b ε : ) : dist a b < ε  b - ε < a  a < b + ε :=
by simp [ metric.mem_ball, real.ball_eq_Ioo]

Last updated: Dec 20 2023 at 11:08 UTC