. rewrite [round_eq_trunc_of_le npos hfaithful₁ round_le]
  rewrite [Nat.two_mul]
  rewrite [← tsub_le_iff_left]
  rewrite [tsub_right_comm]
  trans ulp n (a - b) / 2
  . rewrite [tsub_le_iff_left]
    apply le_midpoint_of_round_eq_trunc npos hcorrect₀
    exact round_eq_trunc_of_le npos hfaithful₁ round_le
  . refine Nat.le_of_mul_le_mul_left ?_ two_pos
    rewrite [Nat.mul_comm, Nat.div_mul_cancel ulp_even]
    exact ulp_le'
case hab
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₀ : correct₀ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
round_le : round (a - b) ≤ a - b
no_uflow : a - b ≥ 2 ^ n
ulp_le' : ulp n (a - b) ≤ 2 * b
hca : round (a - b) ≤ a
ulp_even : 2 ∣ ulp n (a - b)
⊢ a - round (a - b) ≤ 2 * b
no goals