lean4-htt/src/Lean/Meta
JovanGerb c87205bc9b
fix: eta reduce mvar assignments in isDefEq (#4387)
I made a modification to the `mkLambdaFVars` function, adding a
`etaReduce : Bool` parameter that determines whether a new lambda of the
form `fun x => f x` should be replaced by `f`. I then set this option to
true at `isDefEq` when processing metavariable assignments.

This means that many unnecessary eta unreduced expression are now
reduced. This is beneficial for users, so that they do not have to deal
with such unreduced expressions. It is also beneficial for performance,
leading to a 0.6% improvement in build instructions. Most notably,
`Mathlib.Algebra.DirectLimit`, previously a top 50 slowest file, has
sped up by 40%.

Quite a number of proof in mathlib broke. Many of these involve removing
a now unnecessary `simp only`. In other cases, a simp or rewrite doesn't
work anymore, such as a `simp_rw [mul_comm]` that was used to rewrite
`fun x => 2*x`, but now this term has turned into `HMul.hMul 2`.

Closes #4386
2024-06-18 23:41:40 +00:00
..
ArgsPacker refactor: ArgsPacker (#3621) 2024-03-14 14:59:40 +00:00
Match fix: do not include internal match equational theorems at simp trace (#4274) 2024-05-25 17:16:19 +00:00
Tactic fix: simp support for OfNat instances that are functions (#4481) 2024-06-17 22:01:25 +00:00
AbstractMVars.lean fix: do not lift (<- ...) over pure if-then-else (#3820) 2024-04-01 21:33:59 +00:00
AbstractNestedProofs.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ACLt.lean fix: loose bound variables at ACLt (#3819) 2024-04-01 20:26:20 +00:00
AppBuilder.lean doc: fix docstring for Lean.Meta.mkEqOfHEq (#3921) 2024-04-16 16:33:12 +00:00
ArgsPacker.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Basic.lean fix: eta reduce mvar assignments in isDefEq (#4387) 2024-06-18 23:41:40 +00:00
Canonicalizer.lean feat: improve grind preprocessor (#4221) 2024-05-20 04:29:49 +00:00
Check.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
CheckTactic.lean chore: bool and prop lemmas for Mathlib compatibility and improved confluence (#3508) 2024-03-04 23:56:30 +00:00
Closure.lean feat: propagate maxHeartbeats to kernel (#4113) 2024-05-09 17:44:19 +00:00
Coe.lean refactor: Offset.lean and related files (#3614) 2024-03-05 19:40:15 -08:00
CoeAttr.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
CollectFVars.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
CollectMVars.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
CompletionName.lean fix: auto-completion bugs and performance (#3460) 2024-02-26 09:43:19 +00:00
CongrTheorems.lean fix: cleanup type annotations in congruence theorems (#4185) 2024-05-15 23:50:35 +00:00
Constructions.lean feat: propagate maxHeartbeats to kernel (#4113) 2024-05-09 17:44:19 +00:00
CtorRecognizer.lean feat: add grind.injection (#4243) 2024-05-21 17:57:02 +00:00
DecLevel.lean chore: missing registerTraceClass (#4369) 2024-06-06 00:53:16 +00:00
Diagnostics.lean fix: type class issues with maxSynthPendingDepth := 1 (#4119) 2024-05-14 03:03:32 +00:00
DiscrTree.lean feat: pretty print Array DiscrTree.Key (#4208) 2024-05-17 22:35:24 +00:00
DiscrTreeTypes.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Eqns.lean feat: propagate maxHeartbeats to kernel (#4113) 2024-05-09 17:44:19 +00:00
Eval.lean feat: propagate maxHeartbeats to kernel (#4113) 2024-05-09 17:44:19 +00:00
ExprDefEq.lean fix: eta reduce mvar assignments in isDefEq (#4387) 2024-06-18 23:41:40 +00:00
ExprLens.lean chore: code convention (#4009) 2024-04-28 15:49:55 +00:00
ExprTraverse.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ForEachExpr.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
FunInfo.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
GeneralizeTelescope.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
GeneralizeVars.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
GetUnfoldableConst.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
GlobalInstances.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
IndPredBelow.lean chore: remove the coercion from String to Name (#3589) 2024-03-21 23:46:03 +00:00
Inductive.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
InferType.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Injective.lean fix: revert "monadic generalization of FindExpr" (#4125) 2024-05-10 20:36:08 +00:00
Instances.lean feat: improve set_option diagnostics true (#4031) 2024-04-30 05:07:03 +00:00
Iterator.lean chore: address copyright inconsistencies (#3448) 2024-02-22 06:23:50 -08:00
KAbstract.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
KExprMap.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
LazyDiscrTree.lean chore: make Name.isInternalDetail public, to remove duplication downstream (#4454) 2024-06-14 01:55:52 +00:00
LevelDefEq.lean feat: universe constraint approximations (#3981) 2024-04-24 20:27:51 +00:00
LitValues.lean feat: getBitVecValue? understands BitVec.ofNatLt (#4391) 2024-06-07 17:43:08 +00:00
Match.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
MatchUtil.lean fix: regression on match expressions with builtin literals (#3521) 2024-02-27 18:49:44 +00:00
NatInstTesters.lean feat: shorten auto-generated instance names (#3089) 2024-04-13 18:08:50 +00:00
Offset.lean feat: shorten auto-generated instance names (#3089) 2024-04-13 18:08:50 +00:00
PPGoal.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
RecursorInfo.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Reduce.lean fix: fold raw Nat literals at dsimp (#3624) 2024-03-06 18:29:20 +00:00
ReduceEval.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
SizeOf.lean chore: missing registerTraceClass (#4369) 2024-06-06 00:53:16 +00:00
Structure.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
SynthInstance.lean fix: eta reduce mvar assignments in isDefEq (#4387) 2024-06-18 23:41:40 +00:00
Tactic.lean feat: add grind_norm simp attribute for grind tactic 2024-05-14 19:52:25 +02:00
Transform.lean chore: use builtin_dsimproc when appropriate 2024-03-05 14:42:05 -08:00
TransparencyMode.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
UnificationHint.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
WHNF.lean fix: typo in Meta.unfoldProjInstWhenInstances? (#4139) 2024-05-12 16:45:56 +00:00