internlm/Lean-Github huggingface dataset:
Theorem: interval_shift₁
Proof state before:
case inr.right
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
htw : w ≥ t
⊢ trunc n (t - w) = t - w
Tactic:
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
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:
have hty : t ≤ y := ht ▸ round_sub_le npos hfaithful₀ hfaithful₁ _ hfy
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
⊢ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hyx : y ≤ x := Nat.le_trans hyw hwx
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
⊢ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have htx : t ≤ x := Nat.le_trans hty hyx
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
⊢ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hs : s = round (x - round (x - t)) := hs₂ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hfs : trunc n s = s := hs.symm ▸ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
⊢ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hft : trunc n t = t := ht.symm ▸ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
have hsy' : s ≤ round (x - round (x - y)) := by
  have hfy' : round (x - round (x - y)) = x - round (x - y) := by
    apply round_eq_of_trunc_eq npos hfaithful₀
    exact s₂ npos hfaithful₀ hfaithful₁ hfx hfy hyx
  have hft' : round (x - round (x - t)) = x - round (x - t) := by
    apply round_eq_of_trunc_eq npos hfaithful₀
    exact s₂ npos hfaithful₀ hfaithful₁ hfx hft htx
  rewrite [hs, hft', hfy']
  apply tsub_le_tsub_left
  exact hml hft hfy hfx hty
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
⊢ 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
obtain hsw | ⟨hws, hys⟩ : s ≤ w ∨ (w ≤ s ∧ y < s) := by
  cases Nat.le_total s w with
  | inl hsw => exact Or.inl hsw
  | inr hws =>
    cases Nat.lt_or_ge y s with
    | inl hys => exact Or.inr ⟨hws, hys⟩
    | inr hsy => exact Or.inl (Nat.le_trans hsy hyw)
Proof state after:
case inl
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hsw : s ≤ w
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w

case inr.intro
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hws : w ≤ s
hys : y < s
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift₂
Proof state before:
case inl
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hsw : s ≤ w
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w

case inr.intro
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hws : w ≤ s
hys : y < s
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
. constructor
  . have hfr : trunc n (round (x - t)) = round (x - t) := trunc_round npos hfaithful₁ (x - t)
    have hrx : round (x - t) ≤ x := round_sub_le npos hfaithful₀ hfaithful₁ t hfx
    apply s₁ npos hsw hwx hfs hfx hfw
    rewrite [hs]
    exact s₂ npos hfaithful₀ hfaithful₁ hfx hfr hrx
  . rw [tsub_eq_zero_of_le hsw, trunc_zero]
Proof state after:
case inr.intro
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hws : w ≤ s
hys : y < s
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Theorem: interval_shift₂
Proof state before:
case inr.intro
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hws : w ≤ s
hys : y < s
⊢ trunc n (w - s) = w - s ∧ trunc n (s - w) = s - w
Tactic:
. constructor
  . rw [tsub_eq_zero_of_le hws, trunc_zero]
  . have hyy' : y < round (x - round (x - y)) := Nat.lt_of_lt_of_le hys hsy'
    have hwy' : w ≤ round (x - round (x - y)) := Nat.le_trans hws hsy'
    apply s₁ npos hws hsy' hfw (trunc_round npos hfaithful₁ _) hfs
    exact s₃ npos hfaithful₀ hfaithful₁ hfx hfy hfw hyx hyw hxyulp hyy' hwy'
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
⊢ s ≤ round (x - round (x - y))
Tactic:
have hfy' : round (x - round (x - y)) = x - round (x - y) := by
  apply round_eq_of_trunc_eq npos hfaithful₀
  exact s₂ npos hfaithful₀ hfaithful₁ hfx hfy hyx
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
⊢ s ≤ round (x - round (x - 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
⊢ s ≤ round (x - round (x - y))
Tactic:
have hft' : round (x - round (x - t)) = x - round (x - t) := by
  apply round_eq_of_trunc_eq npos hfaithful₀
  exact s₂ npos hfaithful₀ hfaithful₁ hfx hft 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ s ≤ round (x - round (x - 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ s ≤ round (x - round (x - y))
Tactic:
rewrite [hs, hft', hfy']
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ x - round (x - t) ≤ x - round (x - 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ x - round (x - t) ≤ x - round (x - y)
Tactic:
apply tsub_le_tsub_left
Proof state after:
case h
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ round (x - y) ≤ round (x - t)
Theorem: interval_shift₂
Proof state before:
case h
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
hft' : round (x - round (x - t)) = x - round (x - t)
⊢ round (x - y) ≤ round (x - t)
Tactic:
exact hml hft hfy hfx hty
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
⊢ round (x - round (x - y)) = x - round (x - y)
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
⊢ trunc n (x - round (x - y)) = x - round (x - 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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
⊢ trunc n (x - round (x - y)) = x - round (x - y)
Tactic:
exact s₂ npos hfaithful₀ hfaithful₁ hfx hfy hyx
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
⊢ round (x - round (x - t)) = x - round (x - t)
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
⊢ trunc n (x - round (x - t)) = x - round (x - t)
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hfy' : round (x - round (x - y)) = x - round (x - y)
⊢ trunc n (x - round (x - t)) = x - round (x - t)
Tactic:
exact s₂ npos hfaithful₀ hfaithful₁ hfx hft htx
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
⊢ s ≤ w ∨ w ≤ s ∧ y < s
Tactic:
cases Nat.le_total s w with
| inl hsw => exact Or.inl hsw
| inr hws =>
  cases Nat.lt_or_ge y s with
  | inl hys => exact Or.inr ⟨hws, hys⟩
  | inr hsy => exact Or.inl (Nat.le_trans hsy hyw)
Proof state after:
no goals
Theorem: interval_shift₂
Proof state before:
case inl
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
hfw : trunc n w = w
hxyulp : ulp n x ≤ 2 * y
ht : t = round (y - round (y - z))
hs₂ : t ≤ x → s = round (x - round (x - t))
hyw : y ≤ w
hwx : w ≤ x
hty : t ≤ y
hyx : y ≤ x
htx : t ≤ x
hs : s = round (x - round (x - t))
hfs : trunc n s = s
hft : trunc n t = t
hsy' : s ≤ round (x - round (x - y))
hsw : s ≤ w
⊢ s ≤ w ∨ w ≤ s ∧ y < s
Tactic:
exact Or.inl hsw
Proof state after:
no goals