Theorem: interval_shift' (Fl.lean)

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
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

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
State after:
no goals