internlm/Lean-Github huggingface dataset:
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hfty : trunc n (y - t) = y - t := by
  rw [ht', tsub_tsub_cancel_of_le hzy', trunc_round npos hfaithful₁]
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hst : s = t := by
  rewrite [← round_eq_of_trunc_eq npos hfaithful₀ hft]
  cases Nat.lt_or_ge x t with
  | inl hxt => have hfxt : round (t - x) = t - x := by
      apply round_eq_of_trunc_eq npos hfaithful₀
      apply hfut le_rfl hxt hfx
      rewrite [hfx']
      exact Nat.le_trans hxt.le htx'
    rw [hs₁ hxt, hfxt, add_tsub_cancel_of_le hxt.le]
  | inr htx => have hftx : round (x - t) = x - t := by
      apply round_eq_of_trunc_eq npos hfaithful₀
      rewrite [ht] at htx hfty ⊢
      exact s₁ npos htx hxy (trunc_round npos hfaithful₁ _) hfy hfx hfty
    rw [hs₂ htx, hftx, tsub_tsub_cancel_of_le htx]
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
hst : s = t
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
hst : s = t
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
rewrite [hst]
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
hst : s = t
⊢ trunc n (w - t) = w - t ∧ trunc n (t - w) = t - w
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
hfut : ∀ {u : ℕ}, x ≤ u → u < t → trunc n u = u → u ≤ round (y - round (y - x)) → trunc n (t - u) = t - u
hfty : trunc n (y - t) = y - t
hst : s = t
⊢ trunc n (w - t) = w - t ∧ trunc n (t - w) = t - w
Tactic:
cases Nat.lt_or_ge w t with
| inl hwt => constructor
  . rw [tsub_eq_zero_of_le hwt.le, trunc_zero]
  . apply hfut hxw hwt hfw
    rewrite [hfx']
    trans t
    . exact hwt.le
    . exact htx'
| inr htw => constructor
  . exact s₁ npos htw hwy hft hfy hfw hfty
  . rw [tsub_eq_zero_of_le htw, trunc_zero]
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
⊢ t = y - round (y - z)
Tactic:
rewrite [ht]
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
⊢ round (y - round (y - z)) = y - round (y - z)
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
⊢ round (y - round (y - z)) = y - round (y - z)
Tactic:
apply round_eq_of_trunc_eq npos hfaithful₀
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
⊢ trunc n (y - round (y - z)) = y - round (y - z)
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
⊢ trunc n (y - round (y - z)) = y - round (y - z)
Tactic:
exact s₂ npos hfaithful₀ hfaithful₁ hfy hfz hzy
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - z) ≤ y
Tactic:
trans round (y - 0)
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - z) ≤ round (y - 0)

round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - 0) ≤ y
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - z) ≤ round (y - 0)

round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - 0) ≤ y
Tactic:
. exact hml (trunc_zero n) hfz hfy (Nat.zero_le _)
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - 0) ≤ y
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - 0) ≤ y
Tactic:
. rw [tsub_zero, round_eq_of_trunc_eq npos hfaithful₀ hfy]
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - z) ≤ round (y - 0)
Tactic:
exact hml (trunc_zero n) hfz hfy (Nat.zero_le _)
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
⊢ round (y - 0) ≤ y
Tactic:
rw [tsub_zero, round_eq_of_trunc_eq npos hfaithful₀ hfy]
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
⊢ round (y - round (y - x)) = y - round (y - x)
Tactic:
apply round_eq_of_trunc_eq npos hfaithful₀
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
⊢ trunc n (y - round (y - x)) = y - round (y - x)
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
⊢ trunc n (y - round (y - x)) = y - round (y - x)
Tactic:
exact s₂ npos hfaithful₀ hfaithful₁ hfy hfx hxy
Proof state after:
no goals
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
u : ℕ
hxu : x ≤ u
hut : u < t
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
⊢ trunc n (t - u) = t - u
Tactic:
have hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u := by
  have hxyx : x < round (y - round (y - x)) := calc
    x ≤ u                         := hxu
    _ < t                         := hut
    _ ≤ y - round (y - x)         := htx'
    _ = round (y - round (y - x)) := hfx'.symm
  rewrite [← hfx']
  exact s₃ npos hfaithful₀ hfaithful₁ hfy hfx hfu hxy hxu hyxulp hxyx hux'
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
u : ℕ
hxu : x ≤ u
hut : u < t
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
⊢ trunc n (t - u) = t - u
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : t ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
u : ℕ
hxu : x ≤ u
hut : u < t
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
⊢ trunc n (t - u) = t - u
Tactic:
rewrite [ht] at hut htx' ⊢
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : round (y - round (y - z)) ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
u : ℕ
hxu : x ≤ u
hut : u < round (y - round (y - z))
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
⊢ trunc n (round (y - round (y - z)) - u) = round (y - round (y - z)) - u
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : round (y - round (y - z)) ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
hfx' : round (y - round (y - x)) = y - round (y - x)
u : ℕ
hxu : x ≤ u
hut : u < round (y - round (y - z))
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
⊢ trunc n (round (y - round (y - z)) - u) = round (y - round (y - z)) - u
Tactic:
replace hfx' := trunc_eq_of_round_eq npos hfaithful₁ hfx'
Proof state after:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : round (y - round (y - z)) ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
u : ℕ
hxu : x ≤ u
hut : u < round (y - round (y - z))
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
hfx' : trunc n (y - round (y - x)) = y - round (y - x)
⊢ trunc n (round (y - round (y - z)) - u) = round (y - round (y - z)) - u
Theorem: interval_shift₁
Proof state before:
round : ℕ → ℕ
x y z w s t n : ℕ
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
hyxulp : ulp n y ≤ 2 * x
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
hxy : x ≤ y
ht' : t = y - round (y - z)
htx' : round (y - round (y - z)) ≤ y - round (y - x)
hzy' : round (y - z) ≤ y
hft : trunc n t = t
u : ℕ
hxu : x ≤ u
hut : u < round (y - round (y - z))
hfu : trunc n u = u
hux' : u ≤ round (y - round (y - x))
hfuxy : trunc n (y - round (y - x) - u) = y - round (y - x) - u
hfx' : trunc n (y - round (y - x)) = y - round (y - x)
⊢ trunc n (round (y - round (y - z)) - u) = round (y - round (y - z)) - u
Tactic:
exact s₁ npos hut.le htx' hfu hfx' (trunc_round npos hfaithful₁ _) hfuxy
Proof state after:
no goals