@@ -104,8 +104,7 @@ lemma Fixed.neg_def (x : Fixed s) : -x = x.neg := rfl
104104/-- The contrapose of `-nan = nan` -/
105105@[simp] lemma Fixed.ne_nan_of_neg {x : Fixed s} (h : -x ≠ nan) : x ≠ nan := by
106106 contrapose h
107- simp only [ne_eq, not_not] at h
108- simp only [h, neg_nan, ne_eq, not_true_eq_false, not_false_eq_true]
107+ simp only [h, neg_nan]
109108
110109/-- `Fixed` addition saturates to `nan` -/
111110@[irreducible] def Fixed.add (x y : Fixed s) :=
@@ -201,15 +200,15 @@ lemma Fixed.add_comm (x y : Fixed s) : x + y = y + x := by
201200lemma Fixed.ne_nan_of_add {x y : Fixed s} (h : x + y ≠ nan) : x ≠ nan ∧ y ≠ nan := by
202201 contrapose h; simp only [not_and_or, not_not] at h
203202 cases' h with h h
204- · simp only [h, nan_add, ne_eq, not_true, not_false_eq_true ]
205- · simp only [h, add_nan, ne_eq, not_true, not_false_eq_true ]
203+ · simp only [h, nan_add]
204+ · simp only [h, add_nan]
206205
207206/-- If `x - y ≠ nan`, neither `x` or `y` are `nan` -/
208207lemma Fixed.ne_nan_of_sub {x y : Fixed s} (h : x - y ≠ nan) : x ≠ nan ∧ y ≠ nan := by
209208 contrapose h; simp only [not_and_or, not_not] at h
210209 cases' h with h h
211- · simp only [h, nan_sub, ne_eq, not_true, not_false_eq_true ]
212- · simp only [h, sub_nan, ne_eq, not_true, not_false_eq_true ]
210+ · simp only [h, nan_sub]
211+ · simp only [h, sub_nan]
213212
214213/-- `Fixed.val` commutes with negation, except at `nan` -/
215214lemma Fixed.val_neg {x : Fixed s} (xn : x ≠ nan) : (-x).val = -x.val := by
@@ -346,7 +345,6 @@ lemma Fixed.neg_add {x y : Fixed s} : -(x + y) = -y + -x := by
346345 · simp only [not_lt, xym, Int64.isNeg_min, iff_true, Int64.neg_min, ite_self]
347346 · have xy0 : x.n + y.n ≠ 0 := by
348347 contrapose xyn
349- simp only [not_not] at xyn
350348 simp only [eq_neg_iff_add_eq_zero.mpr xyn, Int64.isNeg_neg y0 yn, ← not_le, iff_not_self,
351349 not_false_eq_true]
352350 simp only [Int64.isNeg_neg xy0 xym, ite_not, ← not_iff]
@@ -559,7 +557,7 @@ lemma Fixed.val_nan : (nan : Fixed s).val = -(2:ℝ) ^ (s + 63 : ℤ) := by
559557
560558/-- Positive `Fixed`s are `≠ nan` -/
561559lemma Fixed.ne_nan_of_pos {x : Fixed s} (h : 0 < x.val) : x ≠ nan := by
562- contrapose h; rw [not_not] at h; simp only [not_lt, h, val_nan_neg.le]
560+ contrapose h; simp only [not_lt, h, val_nan_neg.le]
563561
564562/-!
565563### `Fixed` multiplication, rounding up or down
@@ -1109,8 +1107,7 @@ lemma Fixed.approx_two_pow (n : Fixed 0) (up : Bool) :
11091107@[simp] lemma Fixed.ne_nan_of_two_pow {n : Fixed 0 } {up : Bool}
11101108 (h : (two_pow n up : Fixed s) ≠ nan) : n ≠ nan := by
11111109 contrapose h
1112- simp only [ne_eq, not_not] at h
1113- simp only [h, two_pow_nan, ne_eq, not_true_eq_false, not_false_eq_true]
1110+ simp only [h, two_pow_nan]
11141111
11151112/-- `Fixed.approx_two_pow`, down version -/
11161113lemma Fixed.two_pow_le {n : Fixed 0 } (h : (.two_pow n false : Fixed s) ≠ nan) :
0 commit comments