lean4-htt/tests/lean/grind
Leonardo de Moura 7531d16112
feat: (commutative) semiring support in grind (#8921)
This PR implements support for (commutative) semirings in `grind`. It
uses the Grothendieck completion to construct a (commutative) ring
`Lean.Grind.Ring.OfSemiring.Q α` from a (commutative) semiring `α`. This
construction is mostly useful for semirings that implement
`AddRightCancel α`. Otherwise, the function `toQ` is not injective.
Examples:
```lean
example (x y : Nat) : x^2*y = 1 → x*y^2 = y → y*x = 1 := by
  grind 

example [CommSemiring α] [AddRightCancel α] (x y : α) : x^2*y = 1 → x*y^2 = y → y*x = 1 := by
  grind

example (a b : Nat) : 3 * a * b = a * b * 3 := by grind

example (k z : Nat) : k * (z * 2 * (z * 2 + 1)) = z * (k * (2 * (z * 2 + 1))) := by grind

example [CommSemiring α] [AddRightCancel α] [IsCharP α 0] (x y : α) 
    : x^2*y = 1 → x*y^2 = y → x + y = 1 → False := by
  grind
```
2025-06-21 23:00:16 +00:00
..
algebra feat: eliminate equations in grind linarith (#8810) 2025-06-16 09:31:13 +00:00
experiments feat: grind annotations for Nat.Bitwise (#8852) 2025-06-18 02:42:43 +00:00
grind_palindrome.lean chore: remove set_option grind.warning false (#8714) 2025-06-11 05:09:19 +00:00
nat_repeat.lean chore: add a failing grind test (#8858) 2025-06-18 07:14:56 +00:00
README.md
sublist.lean chore: remove set_option grind.warning false (#8714) 2025-06-11 05:09:19 +00:00

Aspirational test cases for grind

These are not expected to work yet; we're collecting examples that we'd like to make work!