Skip to content

Commit abc7c1d

Browse files
leodemouraalgebraic-dev
authored andcommitted
chore: use not_value at Nat.pow_pos (#11523)
and remove `TODO` from `grind_lint_bitvec.lean`
1 parent 5217709 commit abc7c1d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/Init/Data/Nat/Lemmas.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ grind_pattern div_pow_of_pos => a ^ n where
10951095
guard n > 0
10961096

10971097
grind_pattern Nat.pow_pos => a ^ n where
1098+
not_value n
10981099
guard a > 0
10991100

11001101
protected theorem pow_add' (a m n : Nat) : a ^ (m + n) = a ^ n * a ^ m := by

tests/lean/run/grind_lint_bitvec.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import Lean.Elab.Tactic.Grind.LintExceptions
77
#guard_msgs in
88
#grind_lint inspect (min := 30) BitVec.msb_replicate
99

10-
-- TODO: Reduce limit after we add support for `no_value` constraint
11-
-- `BitVec.msb_signExtend` is reasonable at 22.
10+
-- `BitVec.msb_signExtend` is reasonable at 26.
1211
#guard_msgs in
1312
#grind_lint inspect (min := 26) BitVec.msb_signExtend
1413

1514
/-! Check BitVec namespace: -/
1615

17-
-- TODO: Reduce limit after we add support for `no_value` constraint. It was `20`
1816
#guard_msgs in
1917
#grind_lint check (min := 23) in BitVec

tests/lean/run/grind_match_cond_issue.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ example {n m a : Nat} (ih : ∀ {a : Nat}, a ^ 2 = 4 ^ m * n → False)
1515
example {n m a : Nat} (ih : ∀ {a : Nat}, a ^ 2 = 4 ^ m * n → False)
1616
(h : a ^ 2 = 4 ^ m * n) : False := by
1717
grind
18+
19+
example {m a n : Nat} (ih : ∀ {a : Nat}, a ^ 2 = 4 ^ m * 4 * n → False)
20+
(h : a ^ 2 = 4 ^ (m + 1) * n) : False := by
21+
grind

0 commit comments

Comments
 (0)