lean4-htt/src/Lean/Meta/Tactic
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
..
AC fix: grind.debug true when using grind +ring (#8134) 2025-04-27 20:28:08 +00:00
Grind fix: bug in the equality resolution procedure in grind (#8621) 2025-06-04 00:34:47 +00:00
Simp feat: create private aux decls in private contexts 2025-06-03 15:53:05 +02:00
Try feat: ematch generalized patterns (#8569) 2025-05-31 19:08:33 -07:00
AC.lean
Acyclic.lean
Apply.lean fix: Make split work with metavariables in the target (#8437) 2025-05-23 12:46:27 +00:00
Assert.lean
Assumption.lean
AuxLemma.lean feat: revamp aux decl name generation (#8363) 2025-05-16 14:57:18 +00:00
Backtrack.lean
Cases.lean feat: induction: allow complex arguments to motive in conclusion of eliminator (#8096) 2025-04-30 08:56:17 +00:00
Cleanup.lean
Clear.lean
Congr.lean
Constructor.lean
Contradiction.lean
Delta.lean
ElimInfo.lean fix: cases tactic to handle non-atomic eliminator well (#8361) 2025-05-15 16:59:11 +00:00
ExposeNames.lean fix: prevent exact? and apply? from suggesting invalid tactics (#7192) 2025-02-25 15:24:09 +00:00
Ext.lean feat: add [grind ext] attribute (#7949) 2025-04-13 22:08:36 +00:00
FunInd.lean fix: mapError to store message data context (#8375) 2025-05-16 14:46:23 +00:00
FunIndCollect.lean feat: fun_induction to unfold function application in the goal (#8104) 2025-05-13 09:37:39 +00:00
FunIndInfo.lean feat: fun_induction to unfold function application in the goal (#8104) 2025-05-13 09:37:39 +00:00
FVarSubst.lean
Generalize.lean
Grind.lean feat: improve E-matching pattern inference in grind (#8196) 2025-05-01 23:48:32 +00:00
IndependentOf.lean
Induction.lean
Injection.lean
Intro.lean doc: add docstrings to mkFreshUserName etc (#7947) 2025-04-14 04:17:45 +00:00
Lets.lean feat: extract_lets and lift_lets tactics (#6432) 2025-04-21 08:57:01 +00:00
LibrarySearch.lean
NormCast.lean
Refl.lean
Rename.lean
Repeat.lean
Replace.lean feat: clear_value tactic (#8449) 2025-05-27 01:52:08 +00:00
Revert.lean
Rewrite.lean
Rewrites.lean feat: validate, expose names, and add hovers for all suggestion tactics (#7474) 2025-04-07 01:11:39 +00:00
Rfl.lean feat: improve 'apply' unification error message (#8261) 2025-05-08 16:00:42 +00:00
Simp.lean
SolveByElim.lean
Split.lean fix: Make split work with metavariables in the target (#8437) 2025-05-23 12:46:27 +00:00
SplitIf.lean
Subst.lean
Symm.lean
Try.lean
TryThis.lean feat: add labeled subcomponents and helper functions for error messages (#8225) 2025-05-07 21:15:27 +00:00
Unfold.lean chore: revert "feat: make isRfl lazy" 2025-03-27 11:55:14 +01:00
UnifyEq.lean
Util.lean feat: add debug.terminalTacticsAsSorry (#8012) 2025-04-18 00:10:59 +00:00