lean4-htt/tests/lean/grind
Leonardo de Moura 8165ecc1db
fix: bug in the equality resolution procedure in grind (#8621)
This PR fixes a bug in the equality-resolution procedure used by
`grind`.
The procedure now performs a topological sort so that every simplified
theorem declaration is emitted **before** any place where it is
referenced.
Previously, applying equality resolution to
```lean
h : ∀ x, p x a → ∀ y, p y b → x ≠ y
```
in the example
```lean
example
  (p : Nat → Nat → Prop)
  (a b c : Nat)
  (h  : ∀ x, p x a → ∀ y, p y b → x ≠ y)
  (h₁ : p c a)
  (h₂ : p c b) :
  False := by
  grind
```
caused `grind` to produce the incorrect term
```lean
p ?y a → ∀ y, p y b → False
```
The patch eliminates this error, and the following correct simplified
theorem is generated
```lean
∀ y, p y a → p y b → False
```
2025-06-04 00:34:47 +00:00
..
experiments feat: initial @[grind] annotations for List.count (#8527) 2025-05-29 11:46:44 +00:00
field_normalization.lean feat: draft typeclasses/tests for grind handling fields (#8417) 2025-05-20 13:44:11 +00:00
grind_local_namespace.lean chore: add failing grind test (#8599) 2025-06-03 01:49:36 +00:00
grind_lrat_internal_error.lean fix: term internalization issue in grind (#8619) 2025-06-04 00:13:51 +00:00
grind_palindrome.lean chore: cleanup grind palindrome test (#8428) 2025-05-21 03:31:56 +00:00
lrat_mvar.lean fix: bug in the equality resolution procedure in grind (#8621) 2025-06-04 00:34:47 +00:00
module_normalization.lean chore: deduplicate Grind.RatModule and Grind.NoNatZeroDivisors (#8416) 2025-05-20 07:49:42 +00:00
module_relations.lean chore: deduplicate Grind.RatModule and Grind.NoNatZeroDivisors (#8416) 2025-05-20 07:49:42 +00:00
ordered_modules.lean chore: deduplicate Grind.RatModule and Grind.NoNatZeroDivisors (#8416) 2025-05-20 07:49:42 +00:00
README.md
ring_normalization.lean chore: add failing grind tests for noncommutative/non-negation rings (#8396) 2025-05-19 00:26:16 +00:00
sublist.lean feat: grind annotations for List.Sublist/IsInfix/IsPrefix/IsSuffix (#8497) 2025-05-27 12:56:43 +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!