lean4-htt/tests
Kim Morrison 7b1fb7ac9e
feat: add simp +locals to include local definitions (#11947)
This PR adds a `+locals` configuration option to the `simp`, `simp_all`,
and `dsimp` tactics that automatically adds all definitions from the
current file to unfold.

Example usage:
```lean
def foo (n : Nat) : Nat := n + 1

-- Without +locals, simp doesn't know about foo
example (n : Nat) : foo n = n + 1 := by simp  -- fails

-- With +locals, simp can unfold foo
example (n : Nat) : foo n = n + 1 := by simp +locals  -- succeeds
```

The implementation iterates over `env.constants.map₂` (which contains
constants defined in the current module) and adds definitions to unfold.
Instance definitions and internal details are filtered out.

**Note:** For local theorems, use `+suggestions` instead, which will
include relevant local theorems via the library suggestion engine.

🤖 Prepared with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 07:19:40 +00:00
..
bench feat: simpForall and simpArrow in Sym.simp (#11950) 2026-01-09 06:20:04 +00:00
bench-radar chore: measure dynamic symbols in benchmarks (#11568) 2025-12-11 16:10:27 +00:00
compiler
elabissues
ir
lake fix: lake: meta import transitivity (#11683) 2025-12-16 08:28:52 +00:00
lean feat: add simp +locals to include local definitions (#11947) 2026-01-09 07:19:40 +00:00
pkg feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
playground
plugin
simpperf
.gitignore
common.sh feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
lakefile.toml feat: module system is no longer experimental (#11637) 2025-12-12 21:20:26 +00:00
lean-toolchain