Theorem: b₁_hi_of_two_mul_le_of_lt_round (Fl.lean)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ trunc n (round (a - b) - (a - b)) = round (a - b) - (a - b)
Tactic:
rewrite [round_eq_next_trunc_of_gt hfaithful₁ lt_round]
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)
Tactic:
have ulp_dvd : ulp n b ∣ ulp n (a - b) := by
  apply ulp_dvd_ulp
  apply le_tsub_of_add_le_left
  rewrite [← Nat.two_mul]
  exact hba
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)
Tactic:
have hba' : b ≤ a := Nat.le_trans (Nat.le_mul_of_pos_left two_pos) hba
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)
Tactic:
have ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b :=
  ulp_sub_le_of_two_mul_le_of_lt_round npos hfaithful₀ hfaithful₁ hfa hba lt_round
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ trunc n (next n (trunc n (a - b)) - (a - b)) = next n (trunc n (a - b)) - (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
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ next n (trunc n (a - b)) - (a - b) ≤ b

case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b)) - (a - b)

State before:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ next n (trunc n (a - b)) - (a - b) ≤ b

case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b)) - (a - b)
Tactic:
. rewrite [next_trunc_sub_eq_ulp_sub_mod npos]
  exact ulp_sub_le
State after:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b)) - (a - b)

State before:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b)) - (a - b)
Tactic:
. apply Nat.dvd_sub'
  . rewrite [next, ulp_trunc npos]
    apply Nat.dvd_add
    . trans ulp n (a - b)
      . exact ulp_dvd
      . exact ulp_dvd_trunc n _
    . exact ulp_dvd
  . 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
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ ulp n b ∣ ulp n (a - b)
Tactic:
apply ulp_dvd_ulp
State after:
case h
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ b ≤ a - b

State before:
case h
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ b ≤ a - b
Tactic:
apply le_tsub_of_add_le_left
State after:
case h.h
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ b + b ≤ a

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

State before:
case h.h
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
⊢ 2 * b ≤ a
Tactic:
exact hba
State after:
no goals

State before:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ next n (trunc n (a - b)) - (a - b) ≤ b
Tactic:
rewrite [next_trunc_sub_eq_ulp_sub_mod npos]
State after:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b

State before:
case hle
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
Tactic:
exact ulp_sub_le
State after:
no goals

State before:
case hdvd
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b)) - (a - b)
Tactic:
apply Nat.dvd_sub'
State after:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b))

case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a - b

State before:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b))

case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a - b
Tactic:
. rewrite [next, ulp_trunc npos]
  apply Nat.dvd_add
  . trans ulp n (a - b)
    . exact ulp_dvd
    . exact ulp_dvd_trunc n _
  . exact ulp_dvd
State after:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a - b

State before:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a - b
Tactic:
. 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:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ next n (trunc n (a - b))
Tactic:
rewrite [next, ulp_trunc npos]
State after:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ trunc n (a - b) + ulp n (a - b)

State before:
case hdvd.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ trunc n (a - b) + ulp n (a - b)
Tactic:
apply Nat.dvd_add
State after:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ trunc n (a - b)

case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)

State before:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ trunc n (a - b)

case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)
Tactic:
. trans ulp n (a - b)
  . exact ulp_dvd
  . exact ulp_dvd_trunc n _
State after:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)

State before:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)
Tactic:
. exact ulp_dvd
State after:
no goals

State before:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ trunc n (a - b)
Tactic:
trans ulp n (a - b)
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) ∣ trunc n (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) ∣ trunc n (a - b)
Tactic:
. exact ulp_dvd
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) ∣ trunc n (a - b)

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) ∣ trunc n (a - b)
Tactic:
. exact ulp_dvd_trunc n _
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)
Tactic:
exact ulp_dvd
State after:
no goals

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n (a - b) ∣ trunc n (a - b)
Tactic:
exact ulp_dvd_trunc n _
State after:
no goals

State before:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n (a - b)
Tactic:
exact ulp_dvd
State after:
no goals

State before:
case hdvd.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a - b
Tactic:
apply Nat.dvd_sub hba'
State after:
case hdvd.h₂.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a

case hdvd.h₂.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ b

State before:
case hdvd.h₂.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a

case hdvd.h₂.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ 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₂.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ b

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

State before:
case hdvd.h₂.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ a
Tactic:
trans ulp n a
State after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n a

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n a ∣ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n b ∣ ulp n a

round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ 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
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n a ∣ a

State before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ 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
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ 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
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : 2 * b ≤ a
lt_round : a - b < round (a - b)
ulp_dvd : ulp n b ∣ ulp n (a - b)
hba' : b ≤ a
ulp_sub_le : ulp n (a - b) - (a - b) % ulp n (a - b) ≤ b
⊢ ulp n a ∣ a
Tactic:
exact ulp_dvd_of_trunc_eq hfa
State after:
no goals

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