Theorem: b₁_lo_of_round_le_of_two_mul_le_of_ulp_le (Fl.lean)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ trunc n (a - b - round (a - b)) = a - b - round (a - b)
Tactic:
have hba : b ≤ a := by
  trans 2 * b
  . exact Nat.le_mul_of_pos_left two_pos
  . exact two_mul_le
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ trunc n (a - b - round (a - b)) = a - b - round (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ trunc n (a - b - round (a - b)) = a - b - round (a - b)
Tactic:
have hab : b ≤ a - b := by
  rewrite [le_tsub_iff_right hba]
  rewrite [← Nat.two_mul]
  exact two_mul_le
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - round (a - b)) = a - b - round (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - round (a - b)) = a - b - round (a - b)
Tactic:
rewrite [round_eq_trunc_of_le npos hfaithful₁ round_le]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - trunc n (a - b)) = a - b - trunc n (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - trunc n (a - b)) = a - b - trunc n (a - b)
Tactic:
rewrite [trunc_eq_sub_mod n (a - b)]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - (a - b - (a - b) % ulp n (a - b))) = a - b - (a - b - (a - b) % ulp n (a - b))

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n (a - b - (a - b - (a - b) % ulp n (a - b))) = a - b - (a - b - (a - b) % ulp n (a - b))
Tactic:
rewrite [tsub_tsub_cancel_of_le (Nat.mod_le _ _)]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n ((a - b) % ulp n (a - b)) = (a - b) % ulp n (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ trunc n ((a - b) % ulp n (a - b)) = (a - b) % ulp n (a - b)
Tactic:
apply trunc_eq_of_le_of_ulp_dvd b
State after:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ b

case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ (a - b) % ulp n (a - b)

State before:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ b

case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ (a - b) % ulp n (a - b)
Tactic:
. trans ulp n (a - b)
  . exact Nat.le_of_lt $ Nat.mod_lt _ (ulp_pos _ _)
  . exact ulp_le
State after:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ (a - b) % ulp n (a - b)

State before:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ (a - b) % ulp n (a - b)
Tactic:
. rewrite [Nat.dvd_mod_iff (ulp_dvd_ulp n hab)]
  apply Nat.dvd_sub hba
  . trans ulp n a
    . exact ulp_dvd_ulp n hba
    . exact ulp_dvd_of_trunc_eq hfa
  . exact ulp_dvd_of_trunc_eq hfb
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ b ≤ a
Tactic:
trans 2 * b
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ b ≤ 2 * b

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ 2 * b ≤ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ b ≤ 2 * b

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ 2 * b ≤ a
Tactic:
. exact Nat.le_mul_of_pos_left two_pos
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ 2 * b ≤ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ 2 * b ≤ a
Tactic:
. exact two_mul_le
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ b ≤ 2 * b
Tactic:
exact Nat.le_mul_of_pos_left two_pos
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
⊢ 2 * b ≤ a
Tactic:
exact two_mul_le
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ b ≤ a - b
Tactic:
rewrite [le_tsub_iff_right hba]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ b + b ≤ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ b + b ≤ a
Tactic:
rewrite [← Nat.two_mul]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ 2 * b ≤ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
⊢ 2 * b ≤ a
Tactic:
exact two_mul_le
State after:
no goals

State before:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ b
Tactic:
trans ulp n (a - b)
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ ulp n (a - b)

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n (a - b) ≤ b

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ ulp n (a - b)

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n (a - b) ≤ b
Tactic:
. exact Nat.le_of_lt $ Nat.mod_lt _ (ulp_pos _ _)
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n (a - b) ≤ b

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n (a - b) ≤ b
Tactic:
. exact ulp_le
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ (a - b) % ulp n (a - b) ≤ ulp n (a - b)
Tactic:
exact Nat.le_of_lt $ Nat.mod_lt _ (ulp_pos _ _)
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n (a - b) ≤ b
Tactic:
exact ulp_le
State after:
no goals

State before:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ (a - b) % ulp n (a - b)
Tactic:
rewrite [Nat.dvd_mod_iff (ulp_dvd_ulp n hab)]
State after:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ a - b

State before:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ a - b
Tactic:
apply Nat.dvd_sub hba
State after:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ a

case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ b

State before:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ a

case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ b
Tactic:
. trans ulp n a
  . exact ulp_dvd_ulp n hba
  . exact ulp_dvd_of_trunc_eq hfa
State after:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ b

State before:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ b
Tactic:
. exact ulp_dvd_of_trunc_eq hfb
State after:
no goals

State before:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ a
Tactic:
trans ulp n a
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ ulp n a

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n a ∣ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ ulp n a

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n a ∣ a
Tactic:
. exact ulp_dvd_ulp n hba
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n a ∣ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n a ∣ a
Tactic:
. exact ulp_dvd_of_trunc_eq hfa
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ ulp n a
Tactic:
exact ulp_dvd_ulp n hba
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n a ∣ a
Tactic:
exact ulp_dvd_of_trunc_eq hfa
State after:
no goals

State before:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
round_le : round (a - b) ≤ a - b
two_mul_le : 2 * b ≤ a
ulp_le : ulp n (a - b) ≤ b
hba : b ≤ a
hab : b ≤ a - b
⊢ ulp n b ∣ b
Tactic:
exact ulp_dvd_of_trunc_eq hfb
State after:
no goals