lemma
proved
tactic proof
abs_sub_le_width_of_memI
show as:
view Lean formalization →
formal statement (Lean)
21lemma abs_sub_le_width_of_memI {I : Interval} {x y : ℝ}
22 (hx : memI I x) (hy : memI I y) : |x - y| ≤ width I := by
proof body
Tactic-mode proof.
23 have : I.lo ≤ x ∧ x ≤ I.hi := hx
24 have : I.lo ≤ y ∧ y ≤ I.hi := hy
25 have : x - y ≤ I.hi - I.lo := by linarith
26 have : y - x ≤ I.hi - I.lo := by linarith
27 have : -(I.hi - I.lo) ≤ x - y ∧ x - y ≤ I.hi - I.lo := by
28 constructor
29 · linarith
30 · linarith
31 simpa [width, abs_le] using this
32
33/-! ## Certificate schema -/
34
35/-- Anchor certificate: per-species residue intervals plus charge-wise gap intervals. -/