lean4-htt/src/Lean
Matthew Robert Ballard 03f344a35f
feat: use supplied structure fields left to right and eta reduce terms in structure instance elaboration (#2478)
Modifies the structure instance elaborator to
1. Fill in missing fields from sources in strict left-to-right order. In
`{a, b with}`, sometimes the elaborator
would ignore `a` even if both `a` and `b` provided the same field,
depending on what subobject fields they had.
2. Use the sources, or subobjects of the sources, to fill in entire
subobjects of the target structure as much as possible.
Currently, a field cannot be filled directly by a source itself
resulting in the term being eta expanded.
This change avoids this unnecessary and surprisingly costly extra eta
expansion.

Adds two new tests to illustrate the performance benefit (one courtesy
@semorrison). These are currently failing on master and succeed on this
branch.

There is one additional test to exercise the changes to the elaboration
of structure instances.

Changes to make mathlib build are in leanprover-community/mathlib4#9843

Closes #2451
2024-02-01 03:42:39 +00:00
..
Compiler refactor: termination_by changes in stdlib 2024-01-10 17:27:35 +01:00
Data doc: add doc for FileMap (#3221) 2024-01-31 21:51:37 +00:00
Elab feat: use supplied structure fields left to right and eta reduce terms in structure instance elaboration (#2478) 2024-02-01 03:42:39 +00:00
Linter feat: @[unused_variables_ignore_fn] attribute (#3184) 2024-01-31 19:27:32 +00:00
Meta refactor: forallAltTelescope to take altNumParams (#3230) 2024-01-31 11:03:03 +00:00
Parser feat: per-function termination hints 2024-01-10 17:27:35 +01:00
ParserCompiler feat: hovers & name resolution in registerCombinatorAttribute 2022-10-23 09:30:38 +02:00
PrettyPrinter feat: elidible subterms (#3201) 2024-01-31 17:28:29 +00:00
Server feat: elidible subterms (#3201) 2024-01-31 17:28:29 +00:00
Util fix: do not strip dotted components from lean module names (#2994) 2024-01-10 14:24:26 +00:00
Widget feat: partial context info (#3159) 2024-01-22 12:34:20 +00:00
Attributes.lean feat: bundle of widget improvements (#2964) 2023-12-21 06:24:33 +00:00
AuxRecursor.lean
Class.lean fix: fixes #1901 2022-12-01 08:39:06 -08:00
Compiler.lean
CoreM.lean chore: default compiler.enableNew to false until development restarts (#3034) 2023-12-21 07:48:25 +00:00
Data.lean feat: allow configuring occs in rw 2023-09-13 12:03:18 -07:00
Declaration.lean feat: replay constants into an Environment (#2617) 2023-10-11 14:08:03 +11:00
DeclarationRange.lean
DocString.lean refactor: termination_by changes in stdlib 2024-01-10 17:27:35 +01:00
Elab.lean perf: add parseImports' 2022-11-09 14:50:11 -08:00
Environment.lean perf: leak environments not freed before process exit 2023-11-14 17:33:04 +01:00
Eval.lean
Exception.lean fix: spacing and indentation fixes 2023-05-28 18:48:36 -07:00
Expr.lean feat: make mkApp, mkApp2, ..., mkApp10 have @[match_pattern] attribute (#2900) 2024-01-23 08:56:15 +00:00
HeadIndex.lean
Hygiene.lean chore: fix typos in comments 2023-10-08 10:46:05 +02:00
ImportingFlag.lean doc: fix docstring typos (#2605) 2023-09-30 07:51:35 -04:00
InternalExceptionId.lean
KeyedDeclsAttribute.lean chore: use deriving Nonempty 2022-12-22 03:48:15 +01:00
LazyInitExtension.lean
Level.lean refactor: termination_by changes in stdlib 2024-01-10 17:27:35 +01:00
Linter.lean feat: add linter.deprecated option to silence deprecation warnings 2022-10-23 21:11:57 +02:00
LoadDynlib.lean
LocalContext.lean fix: FFI signature mismatches 2023-08-18 19:34:21 +02:00
Log.lean refactor: consolidate MessageData constructors into lazy formatting with infos 2022-12-07 19:16:25 +01:00
Message.lean feat: translate interrupted kernel exception 2023-10-26 08:33:09 +02:00
Meta.lean
MetavarContext.lean doc: fix MetavarContext markdown (#3026) 2023-12-06 08:15:45 +00:00
Modifiers.lean
MonadEnv.lean
Parser.lean feat: hygieneInfo parser (aka this 2.0) 2023-06-02 16:19:02 +02:00
ParserCompiler.lean chore: generalize parser kind detection 2022-11-14 12:53:18 +01:00
PrettyPrinter.lean feat: signature pretty printer for hovers 2022-12-21 21:59:05 +01:00
ProjFns.lean
ReducibilityAttrs.lean
Replay.lean feat: replay constants into an Environment (#2617) 2023-10-11 14:08:03 +11:00
ResolveName.lean chore: fix typos in comments 2023-10-08 10:46:05 +02:00
Runtime.lean
ScopedEnvExtension.lean chore: snake-case attributes (part 2) 2022-10-19 09:28:08 -07:00
Server.lean feat: CodeActionProvider 2022-10-20 11:20:42 -07:00
Structure.lean
SubExpr.lean doc: fix typos/indentation (#3085) 2023-12-17 18:41:46 +00:00
Syntax.lean fix: basic ident fallback in identComponents 2023-06-22 09:50:24 +01:00
ToExpr.lean feat: add builtin simproc support 2024-01-09 12:57:15 +01:00
Util.lean feat: test_extern command (#2970) 2023-12-12 23:33:05 +00:00
Widget.lean