Skip to content

Commit 8c0c154

Browse files
authored
chore: remove Int simp lemmas that can't fire (#5253)
``` #lint only simpNF in all ``` reports (amongst others): ``` -- Init.Data.Int.Order #check @Int.toNat_of_nonneg /- Left-hand side simplifies from ↑a.toNat to max a 0 using simp only [Int.ofNat_toNat] Try to change the left-hand side to the simplified term! -/ #check Int.toNat_sub_toNat_neg /- Left-hand side simplifies from ↑n.toNat - ↑(-n).toNat to max n 0 - max (-n) 0 using simp only [Int.ofNat_toNat] Try to change the left-hand side to the simplified term! -/ ```
1 parent 52bc8dc commit 8c0c154

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Init/Data/Int/Order.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ theorem toNat_eq_max : ∀ a : Int, (toNat a : Int) = max a 0
480480

481481
@[simp] theorem toNat_one : (1 : Int).toNat = 1 := rfl
482482

483-
@[simp] theorem toNat_of_nonneg {a : Int} (h : 0 ≤ a) : (toNat a : Int) = a := by
483+
theorem toNat_of_nonneg {a : Int} (h : 0 ≤ a) : (toNat a : Int) = a := by
484484
rw [toNat_eq_max, Int.max_eq_left h]
485485

486486
@[simp] theorem toNat_ofNat (n : Nat) : toNat ↑n = n := rfl
@@ -515,7 +515,7 @@ theorem toNat_add_nat {a : Int} (ha : 0 ≤ a) (n : Nat) : (a + n).toNat = a.toN
515515
| (n+1:Nat) => by simp [ofNat_add]
516516
| -[n+1] => rfl
517517

518-
@[simp] theorem toNat_sub_toNat_neg : ∀ n : Int, ↑n.toNat - ↑(-n).toNat = n
518+
theorem toNat_sub_toNat_neg : ∀ n : Int, ↑n.toNat - ↑(-n).toNat = n
519519
| 0 => rfl
520520
| (_+1:Nat) => Int.sub_zero _
521521
| -[_+1] => Int.zero_sub _

0 commit comments

Comments
 (0)