This PR reverts #12000, which introduced a regression where `simp` incorrectly rejects valid rewrites for perm lemmas. The issue is that `NameGenerator.mkChild` creates names that don't maintain the ordering assumption used by `acLt` for perm lemma decisions. For example, after the change: - Child generator creates names like `_uniq.102.2` - Parent continues with `_uniq.7` - But `Name.lt (.num (.num `_uniq 102) 2) (.num `_uniq 7)` is true This causes fvars created later (in async tasks) to compare as smaller than fvars created earlier, breaking the assumption that later fvars compare greater according to `Name.lt`. Fixes #12136. 🤖 Prepared with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
598 B
Text
31 lines
598 B
Text
import Lean.Elab.Tactic.Basic
|
|
|
|
/-!
|
|
Kernel errors should not lead to follow-up errors but should be detectable using `#print axioms`.
|
|
-/
|
|
|
|
/-- error: (kernel) declaration has metavariables 'bad' -/
|
|
#guard_msgs in
|
|
def bad : Empty := by
|
|
run_tac do Lean.Elab.Tactic.popMainGoal
|
|
|
|
theorem zero_eq_one : 0 = 1 := bad.elim
|
|
|
|
/--
|
|
info: def bad : Empty :=
|
|
?_uniq.3
|
|
-/
|
|
#guard_msgs in
|
|
set_option pp.raw true in
|
|
#print bad
|
|
|
|
/--
|
|
info: theorem zero_eq_one : 0 = 1 :=
|
|
Empty.elim bad
|
|
-/
|
|
#guard_msgs in
|
|
#print zero_eq_one
|
|
|
|
/-- info: 'zero_eq_one' depends on axioms: [bad] -/
|
|
#guard_msgs in
|
|
#print axioms zero_eq_one
|