Skip to content
4 changes: 4 additions & 0 deletions src/Init/Data/Nat/Div/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ theorem mod_eq_of_lt {a b : Nat} (h : a < b) : a % b = a :=
if_neg h'
(mod_eq a b).symm ▸ this

grind_pattern mod_eq_of_lt => a % b where
not_value b
guard a < b

@[simp] theorem one_mod_eq_zero_iff {n : Nat} : 1 % n = 0 ↔ n = 1 := by
match n with
| 0 => simp
Expand Down
Loading