internlm/Lean-Github huggingface dataset:
Theorem: interval_shift
Proof state before:
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxwy : x ≤ w ∧ w ≤ y ∨ y ≤ w ∧ w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
rcases hxwy with ⟨hxw, hwy⟩ | ⟨hyw, hwx⟩
Proof state after:
case inl.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxw : x ≤ w
hwy : w ≤ y
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w

case inr.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift
Proof state before:
case inl.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxw : x ≤ w
hwy : w ≤ y
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w

case inr.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
. exact interval_shift₁ npos hfaithful₀ hfaithful₁ hml hfx hfy hfz hfw hzx hzy hyx ht hs₁ hs₂ hxw hwy
Proof state after:
case inr.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift
Proof state before:
case inr.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
. exact interval_shift₂ npos hfaithful₀ hfaithful₁ hml hfx hfy hfw hxy ht hs₂ hyw hwx
Proof state after:
no goals
Theorem: interval_shift
Proof state before:
case inl.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxw : x ≤ w
hwy : w ≤ y
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
exact interval_shift₁ npos hfaithful₀ hfaithful₁ hml hfx hfy hfz hfw hzx hzy hyx ht hs₁ hs₂ hxw hwy
Proof state after:
no goals
Theorem: interval_shift
Proof state before:
case inr.intro
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hml : sub_left_monotonic n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
exact interval_shift₂ npos hfaithful₀ hfaithful₁ hml hfx hfy hfw hxy ht hs₂ hyw hwx
Proof state after:
no goals
Theorem: interval_shift'
Proof state before:
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₀ : correct₀ n round
hcorrect₁ : correct₁ n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxwy : x ≤ w ∧ w ≤ y ∨ y ≤ w ∧ w ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hml : sub_left_monotonic n round := (monotonic npos hfaithful₁ hcorrect₀ hcorrect₁).left
Proof state after:
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₀ : correct₀ n round
hcorrect₁ : correct₁ n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxwy : x ≤ w ∧ w ≤ y ∨ y ≤ w ∧ w ≤ x
hml : sub_left_monotonic n round
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift'
Proof state before:
n : ℕ
round : ℕ → ℕ
x y z w s t : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
hfaithful₁ : faithful₁ n round
hcorrect₀ : correct₀ n round
hcorrect₁ : correct₁ n round
hfx : trunc n x = x
hfy : trunc n y = y
hfz : trunc n z = z
hfw : trunc n w = w
hzx : z ≤ x
hzy : z ≤ y
hyx : ulp n y ≤ 2 * x
hxy : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₁ : x < t → s = round (x + round (t - x))
hs₂ : t ≤ x → s = round (x - round (x - t))
hxwy : x ≤ w ∧ w ≤ y ∨ y ≤ w ∧ w ≤ x
hml : sub_left_monotonic n round
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
exact interval_shift npos hfaithful₀ hfaithful₁ hml hfx hfy hfz hfw hzx hzy hyx hxy ht hs₁ hs₂ hxwy
Proof state after:
no goals
Theorem: a₁_of_uflow
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
have k : trunc n (a + b) = a + b := trunc_eq_self_of_uflow uflow
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Theorem: a₁_of_uflow
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
have l : round (a + b) = a + b := round_eq_of_trunc_eq npos hfaithful₀ k
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
l : round (a + b) = a + b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Theorem: a₁_of_uflow
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
l : round (a + b) = a + b
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b) ∧ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
rewrite [l, tsub_self]
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
l : round (a + b) = a + b
⊢ trunc n 0 = 0 ∧ trunc n 0 = 0
Theorem: a₁_of_uflow
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₀ : faithful₀ n round
uflow : a + b < 2 ^ n
k : trunc n (a + b) = a + b
l : round (a + b) = a + b
⊢ trunc n 0 = 0 ∧ trunc n 0 = 0
Tactic:
exact ⟨trunc_zero n, trunc_zero n⟩
Proof state after:
no goals
Theorem: a₁_lo_of_lt_round
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
lt_round : a + b < round (a + b)
⊢ trunc n (a + b - round (a + b)) = a + b - round (a + b)
Tactic:
rewrite [round_eq_next_trunc_of_gt hfaithful₁ lt_round]
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
lt_round : a + b < round (a + b)
⊢ trunc n (a + b - next n (trunc n (a + b))) = a + b - next n (trunc n (a + b))
Theorem: a₁_lo_of_lt_round
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
lt_round : a + b < round (a + b)
⊢ trunc n (a + b - next n (trunc n (a + b))) = a + b - next n (trunc n (a + b))
Tactic:
rewrite [tsub_eq_zero_of_le (Nat.le_of_lt (lt_next_trunc npos _))]
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
lt_round : a + b < round (a + b)
⊢ trunc n 0 = 0
Theorem: a₁_lo_of_lt_round
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
lt_round : a + b < round (a + b)
⊢ trunc n 0 = 0
Tactic:
exact trunc_zero n
Proof state after:
no goals
Theorem: a₁_hi_of_round_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
round_le : round (a + b) ≤ a + b
⊢ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
rewrite [round_eq_trunc_of_le npos hfaithful₁ round_le,
    tsub_eq_zero_of_le (trunc_le n (a + b))]
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
round_le : round (a + b) ≤ a + b
⊢ trunc n 0 = 0
Theorem: a₁_hi_of_round_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
round_le : round (a + b) ≤ a + b
⊢ trunc n 0 = 0
Tactic:
exact trunc_zero n
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ trunc n (round (a + b) - (a + b)) = round (a + b) - (a + b)
Tactic:
rewrite [round_eq_next_trunc_of_gt hfaithful₁ lt_round]
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
      . exact ulp_dvd_trunc n _
    . exact ulp_dvd_ulp n (Nat.le_add_left _ _)
  . apply Nat.dvd_add
    . trans ulp n a
      . exact ulp_dvd_ulp n hba
      . exact ulp_dvd_of_trunc_eq hfa
    . exact ulp_dvd_of_trunc_eq hfb
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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]
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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'
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n b ∣ a + b
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
    . exact ulp_dvd_trunc n _
  . exact ulp_dvd_ulp n (Nat.le_add_left _ _)
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n b ∣ a + b
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n b ∣ a + b
Tactic:
. apply Nat.dvd_add
  . trans ulp n a
    . exact ulp_dvd_ulp n hba
    . exact ulp_dvd_of_trunc_eq hfa
  . exact ulp_dvd_of_trunc_eq hfb
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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]
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof 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
hba : b ≤ a
lt_round : a + b < round (a + b)
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
Proof state after:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n b ∣ ulp n (a + b)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
  . exact ulp_dvd_trunc n _
Proof state after:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n b ∣ ulp n (a + b)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
case hdvd.h₁.h₁
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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)
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n (a + b) ∣ trunc n (a + b)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
Proof state after:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
ulp_sub_le : ulp n (a + b) - (a + b) % ulp n (a + b) ≤ b
⊢ ulp n (a + b) ∣ trunc n (a + b)
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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 _
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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 _
Proof state after:
no goals
Theorem: a₁_hi_of_lt_round_of_ulp_sub_le
Proof state before:
case hdvd.h₁.h₂
round : ℕ → ℕ
n a b : ℕ
npos : 0 < n
hfaithful₁ : faithful₁ n round
hfa : trunc n a = a
hfb : trunc n b = b
hba : b ≤ a
lt_round : a + b < round (a + b)
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_ulp n (Nat.le_add_left _ _)
Proof state after:
no goals