lean4-htt/src/Lean
Leonardo de Moura f1c903ca65
feat: simplify lambdas in Sym.simp (#11898)
This PR adds support for simplifying lambda expressions in `Sym.simp`.
It is much more efficient than standard simp for very large lambda
expressions with many binders. The key idea is to generate a custom
function extensionality theorem for the type of the lambda being
simplified.

This technique is compatible with the standard `simp` tactic, and will
be ported in a separate PR.

<img width="581" height="455" alt="image"
src="https://github.com/user-attachments/assets/5911dc6c-03f0-48ed-843b-b8cb4f67ee61"
/>

### `lambda` benchmark summary

| Lambda size | MetaM (ms) | SymM (ms) | Speedup |
|-------------|------------|-----------|---------|
| 50          | 22.7       | 0.74      | ~31×    |
| 100         | 120.5      | 1.75      | ~69×    |
| 150         | 359.6      | 2.90      | ~124×   |
| 200         | 809.5      | 4.51      | ~180×   |
2026-01-05 01:00:30 +00:00
..
Compiler refactor: DiscrTree (#11875) 2026-01-02 19:53:45 +00:00
Data feat: add optional start position to PersistentArray.forM (#11784) 2025-12-23 22:12:02 +00:00
DocString chore: minor String API improvements (#11439) 2025-12-01 11:44:14 +00:00
Elab feat: add insertPattern for discrimination tree insertion in Sym (#11884) 2026-01-03 19:27:43 +00:00
Language feat: module system is no longer experimental (#11637) 2025-12-12 21:20:26 +00:00
LibrarySuggestions fix: improve "no library suggestions engine registered" error message (#11464) 2025-12-02 00:55:46 +00:00
Linter feat: lint coercions that are deprecated or banned in core (#11511) 2025-12-12 15:09:13 +00:00
Meta feat: simplify lambdas in Sym.simp (#11898) 2026-01-05 01:00:30 +00:00
Parser refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
ParserCompiler
PrettyPrinter refactor: move Std.Range to Std.Legacy.Range (#11438) 2025-12-18 02:07:33 +00:00
Server refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
Util perf: ensure withTraceNodeBefore message is created lazily (#11893) 2026-01-04 20:38:39 +00:00
Widget
AddDecl.lean chore: use backticks for sorry in diagnostic messages (#11608) 2025-12-15 14:30:21 +00:00
Attributes.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
AuxRecursor.lean perf: handle per-constructor noConfusion in toLCNF (#11566) 2025-12-10 09:03:55 +00:00
BuiltinDocAttr.lean
Class.lean
Compiler.lean
CoreM.lean perf: remove obsolete old codegen workaround (#9311) 2025-12-12 20:51:34 +00:00
Data.lean
Declaration.lean
DeclarationRange.lean
DefEqAttrib.lean
DocString.lean
Elab.lean feat: add #import_path, assert_not_exists, assert_not_imported commands (#11726) 2025-12-19 04:09:33 +00:00
EnvExtension.lean fix: avoid panic in TagDeclarationExtension.tag on partial elaboration (#11882) 2026-01-05 00:36:58 +00:00
Environment.lean perf: avoid kernel env block in realizeConst (#11617) 2025-12-12 11:20:20 +00:00
ErrorExplanation.lean refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
Exception.lean refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
Expr.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
ExtraModUses.lean feat: shake: make Mathlib-ready (#11496) 2025-12-05 09:37:58 +00:00
HeadIndex.lean
Hygiene.lean chore: do not set unused Option.Decl.group (#11307) 2025-11-21 16:44:38 +00:00
IdentifierSuggestion.lean chore: remove NameMapExtension abbreviation (#11632) 2025-12-12 12:34:53 +00:00
ImportingFlag.lean
InternalExceptionId.lean
KeyedDeclsAttribute.lean
LabelAttribute.lean
Level.lean fix: move the monad argument for ForIn, ForIn', and ForM (#10204) 2025-11-25 12:20:37 +00:00
LibrarySuggestions.lean fix: make library suggestions available in module files (#11373) 2025-11-26 05:39:27 +00:00
Linter.lean feat: lint coercions that are deprecated or banned in core (#11511) 2025-12-12 15:09:13 +00:00
LoadDynlib.lean refactor: use String.Slice in String.take and variants (#11180) 2025-11-18 16:13:48 +00:00
LocalContext.lean feat: support for incrementally processing hypotheses in grind (#11787) 2025-12-24 02:50:22 +00:00
Log.lean refactor: move error explanation text to the manual (#11688) 2025-12-26 17:14:58 +00:00
Message.lean fix: teach Exception.isRuntime to detect nested errors (#11490) 2025-12-10 10:19:33 +00:00
Meta.lean feat: add SymM monad (#11788) 2025-12-24 04:05:14 +00:00
MetavarContext.lean
Modifiers.lean
MonadEnv.lean feat: grind support for .ctorIdx (#11652) 2025-12-13 13:32:19 +00:00
Namespace.lean
Parser.lean
ParserCompiler.lean doc: correct typos in documentation and comments (#11465) 2025-12-02 06:38:05 +00:00
PrettyPrinter.lean chore: do not set unused Option.Decl.group (#11307) 2025-11-21 16:44:38 +00:00
PrivateName.lean
ProjFns.lean chore: delete obsolete C++ file (#11561) 2025-12-09 15:47:54 +00:00
ReducibilityAttrs.lean feat: allow setting reducibilityCoreExt in async contexts (#11301) 2025-11-21 09:23:14 +00:00
Replay.lean
ReservedNameAction.lean
ResolveName.lean
Runtime.lean
ScopedEnvExtension.lean
Server.lean
Setup.lean fix: symbol clashes between packages (#11082) 2025-11-19 02:24:44 +00:00
Shell.lean refactor: port shell option processing to Lean (v2) (#11434) 2025-12-02 17:41:51 +00:00
Structure.lean
SubExpr.lean refactor: use String.split instead of String.splitOn or String.splitToList (#11250) 2025-11-19 09:35:19 +00:00
Syntax.lean fix: move the monad argument for ForIn, ForIn', and ForM (#10204) 2025-11-25 12:20:37 +00:00
ToExpr.lean
ToLevel.lean
Util.lean
Widget.lean