Skip to content

Commit 2143f85

Browse files
kim-emclaude
andcommitted
feat: add grind attribute to Nat.cast_id and Int.cast_id
🤖 Prepared with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent 19e1fe5 commit 2143f85

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Init/Data/Int/LemmasAux.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ theorem natCast_succ_pos (n : Nat) : 0 < (n.succ : Int) := natCast_pos.2 n.succ_
6262

6363
@[simp high] theorem natCast_nonpos_iff {n : Nat} : (n : Int) ≤ 0 ↔ n = 0 := by omega
6464

65-
@[simp, norm_cast] theorem cast_id {n : Int} : Int.cast n = n := rfl
65+
@[simp, norm_cast, grind =] theorem cast_id {n : Int} : Int.cast n = n := rfl
66+
67+
end Int
68+
69+
namespace Nat
70+
71+
@[simp, norm_cast, grind =] theorem cast_id (n : Nat) : Nat.cast n = n := rfl
72+
73+
end Nat
74+
75+
namespace Int
6676

6777
@[simp] theorem ble'_eq_true (a b : Int) : (Int.ble' a b = true) = (a ≤ b) := by
6878
cases a <;> cases b <;> simp [Int.ble'] <;> omega

0 commit comments

Comments
 (0)