lean4-htt/src/Lean/Meta
Leonardo de Moura 1e99ff1dba
feat: optimized abstractFVars and abstractFVarsRange (#11820)
This PR adds optimized `abstractFVars` and `abstractFVarsRange` for
converting free variables to de Bruijn indices during pattern
matching/unification.

**Optimizations:**
- Metavariables are skipped (their contexts must not include abstracted
fvars)
- Subterms whose `maxFVar` is below the minimal abstracted fvar are
skipped via early cutoff
- Results are maximally shared via `AlphaShareBuilderM`

These optimizations are sound for Miller pattern matching where
metavariables are created before entering binders.
2025-12-28 23:12:21 +00:00
..
ArgsPacker
Constructions feat: sparse sparse casesOn splitting in match equations (#11666) 2025-12-14 14:59:45 +00:00
Match fix: grind using congr equation of private imported matcher (#11756) 2025-12-21 17:59:52 +00:00
Sym feat: optimized abstractFVars and abstractFVarsRange (#11820) 2025-12-28 23:12:21 +00:00
Tactic feat: add TransparencyMode.none (#11810) 2025-12-27 03:10:17 +00:00
AbstractMVars.lean fix: instantiate mvars in types of mvars in abstractMVars (#10612) 2025-09-29 16:33:10 +00:00
AbstractNestedProofs.lean chore: more module system fixes and improvements from Mathlib porting (#10655) 2025-10-08 11:30:09 +00:00
ACLt.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
AppBuilder.lean perf: avoid locally nameless overhead in congruence functions (#11721) 2025-12-18 08:29:08 +00:00
ArgsPacker.lean
Basic.lean feat: add TransparencyMode.none (#11810) 2025-12-27 03:10:17 +00:00
BinderNameHint.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Canonicalizer.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
CasesInfo.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
Check.lean fix: deep recursion type checking grind proof (#11061) 2025-11-02 19:43:48 +00:00
CheckTactic.lean
Closure.lean chore: add an assertion about mkValueTypeClosure (#10954) 2025-10-25 12:59:17 +00:00
Coe.lean feat: lint coercions that are deprecated or banned in core (#11511) 2025-12-12 15:09:13 +00:00
CoeAttr.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
CollectFVars.lean
CollectMVars.lean
CompletionName.lean refactor: move operations on String.Pos.Raw to the String.Pos.Raw namespace (#10735) 2025-10-18 12:12:55 +00:00
CongrTheorems.lean refactor: use withImplicitBinderInfos and mkArrowN in more places (#11492) 2025-12-03 08:42:16 +00:00
Constructions.lean feat: sparse sparse casesOn splitting in match equations (#11666) 2025-12-14 14:59:45 +00:00
CtorIdxHInj.lean feat: grind support for .ctorIdx (#11652) 2025-12-13 13:32:19 +00:00
CtorRecognizer.lean
DecLevel.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Diagnostics.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
DiscrTree.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
DiscrTreeTypes.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Eqns.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
Eval.lean
ExprDefEq.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
ExprLens.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
ExprTraverse.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
ForEachExpr.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
FunInfo.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
GeneralizeTelescope.lean
GeneralizeVars.lean
GetUnfoldableConst.lean feat: add TransparencyMode.none (#11810) 2025-12-27 03:10:17 +00:00
GlobalInstances.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
HasNotBit.lean perf: use Nat-based bitmask in sparse cases construction (#11200) 2025-11-17 10:05:18 +00:00
Hint.lean chore: rename Substring to Substring.Raw (#11154) 2025-11-16 09:30:04 +00:00
IndPredBelow.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
Inductive.lean
InferType.lean feat: don't count symbols in instances and proofs 2025-10-26 10:29:47 +11:00
Injective.lean feat: make noConfusion even more heterogeneous 2025-12-10 17:28:06 +01:00
Instances.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
IntInstTesters.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
Iterator.lean
KAbstract.lean
KExprMap.lean
LazyDiscrTree.lean fix: allow exact? to suggest local private declarations (part 2) (#11759) 2025-12-21 20:03:10 +00:00
LetToHave.lean
LevelDefEq.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
LitValues.lean feat: support for Rat scientific literals (#10961) 2025-10-26 02:05:26 +00:00
Match.lean
MatchUtil.lean refactor: make MatchEqs a leaf module (#11493) 2025-12-03 09:15:36 +00:00
MethodSpecs.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
MkIffOfInductiveProp.lean chore: minor optimizations on the critical path (#10900) 2025-10-22 19:32:26 +00:00
NatInstTesters.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
NatTable.lean
Offset.lean fix: nonstandard instances in grind and simp +arith (#11758) 2025-12-21 17:56:49 +00:00
Order.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
PPGoal.lean chore: do not set unused Option.Decl.group (#11307) 2025-11-21 16:44:38 +00:00
PProdN.lean
ProdN.lean feat: new do elaborator, part 1: doElem_elab attribute (#11150) 2025-11-12 14:25:28 +00:00
RecursorInfo.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Reduce.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
ReduceEval.lean
SameCtorUtils.lean
SizeOf.lean feat: mark sizeOf theorems as grind theorems (#11265) 2025-11-19 18:38:35 +00:00
Sorry.lean
SplitSparseCasesOn.lean feat: sparse sparse casesOn splitting in match equations (#11666) 2025-12-14 14:59:45 +00:00
Structure.lean perf: more environment blocking avoidance (#11616) 2025-12-12 13:44:58 +00:00
Sym.lean feat: optimized abstractFVars and abstractFVarsRange (#11820) 2025-12-28 23:12:21 +00:00
SynthInstance.lean feat: remove the group field of an option description (#11305) 2025-11-24 11:40:58 +00:00
Tactic.lean chore: remove public section from end of files (#10684) 2025-10-06 13:30:48 +00:00
Transform.lean chore: fix spelling (#11531) 2025-12-06 13:54:27 +00:00
TransparencyMode.lean feat: add TransparencyMode.none (#11810) 2025-12-27 03:10:17 +00:00
TryThis.lean chore: rename String.ValidPos to String.Pos (#11240) 2025-11-24 16:40:21 +00:00
UnificationHint.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
WHNF.lean perf: do not consult isNoConfusion in whnf (#11571) 2025-12-09 23:36:46 +00:00