lean4-htt/src/Lean/Elab
Kyle Miller 130b465aaf
feat: generalize elab_as_elim to allow arbitrary motive applications (#5510)
Now the elab-as-elim procedure allows eliminators whose result is an
arbitrary application of the motive. For example, the following is now
accepted. It will generalize `Int.natAbs _` from the expected type.
```lean
@[elab_as_elim]
theorem natAbs_elim {motive : Nat → Prop} (i : Int)
  (hpos : ∀ (n : Nat), i = n → motive n)
  (hneg : ∀ (n : Nat), i = -↑n → motive n) :
  motive (Int.natAbs i) := by sorry
```

This change simplifies the elaborator, since it no longer needs to keep
track of discriminants (which can easily be read off from the return
type of the eliminator) or the difference between "targets" and "extra
arguments" (which are now both "major arguments" that should be eagerly
elaborated).

Closes #4086
2024-09-28 22:30:14 +00:00
..
Deriving fix: make Repr deriving instance handle explicit type parameters (#5432) 2024-09-24 05:37:36 +00:00
InfoTree fix: unused variable false positive when combining alias and non-lexical use (#5335) 2024-09-19 10:51:14 +00:00
PreDefinition feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
Quotation feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
Tactic feat: have autoparams report parameter/field on failure (#5474) 2024-09-27 19:00:59 +00:00
App.lean feat: generalize elab_as_elim to allow arbitrary motive applications (#5510) 2024-09-28 22:30:14 +00:00
Arg.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Attributes.lean chore: fix linter errors (#4502) 2024-06-19 18:24:08 +00:00
AutoBound.lean doc: fix option name (#5150) 2024-08-25 07:16:44 +00:00
AuxDef.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
BinderPredicates.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Binders.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
BindersUtil.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
BuiltinCommand.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
BuiltinNotation.lean fix: make cdot anonymous function notation handle ambiguous notation (#4833) 2024-08-09 21:16:51 +00:00
BuiltinTerm.lean feat: have autoparams report parameter/field on failure (#5474) 2024-09-27 19:00:59 +00:00
Calc.lean fix: make "use `set_option diagnostics true" message conditional on current setting (#4781) 2024-07-31 03:53:09 +00:00
CheckTactic.lean chore: missing withSynthesize in #check_tactic (#4489) 2024-06-18 05:24:45 +00:00
Command.lean fix: worker: make sure to always report some recent range as progress when waiting (#5428) 2024-09-23 15:52:52 +00:00
ComputedFields.lean refactor: Split Constructions module (#4656) 2024-07-05 08:25:44 +00:00
Config.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Declaration.lean fix: [implemented_by] at functions defined by well-founded recursion (#4508) 2024-06-20 00:06:38 +00:00
DeclarationRange.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
DeclModifiers.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
DeclNameGen.lean feat: make anonymous instance names not include proofs (#3934) 2024-04-17 19:41:34 +00:00
DeclUtil.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
DefView.lean fix: [implemented_by] at functions defined by well-founded recursion (#4508) 2024-06-20 00:06:38 +00:00
Deriving.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Do.lean fix: correct typo in invalid reassignment error (#5080) 2024-08-18 08:10:07 +00:00
ElabRules.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Eval.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Exception.lean feat: incremental elaboration of definition headers, bodies, and tactics (#3940) 2024-05-22 13:23:30 +00:00
Extra.lean chore: remove repeated words (#5438) 2024-09-24 03:40:11 +00:00
Frontend.lean chore: clean up cmdline snapshots logic (#5043) 2024-08-14 15:10:37 +00:00
GenInjective.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
GuardMsgs.lean chore: use emoji variant of ️,️,💥️ (#5173) 2024-08-26 19:46:37 +00:00
Import.lean chore: revert "fix: make import resolution case-sensitive on all platforms" (#4896) 2024-08-01 13:55:37 +00:00
Inductive.lean fix: instantiate mvars of indices before instantiating fvars (#4717) 2024-08-16 15:19:48 +00:00
InfoTree.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
InheritDoc.lean feat: @[builtin_doc] attribute (part 2) (#3918) 2024-09-13 08:05:10 +00:00
LetRec.lean feat: termination_by structural (#4542) 2024-07-01 16:51:30 +00:00
Level.lean fix: mutual inductives with instance parameters (#4342) 2024-06-04 17:35:41 +00:00
Macro.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
MacroArgUtil.lean feat: quotations for parser aliases (#4307) 2024-05-30 09:22:22 +00:00
MacroRules.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Match.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
MatchAltView.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
MatchExpr.lean perf: match_expr join points (#3580) 2024-03-03 18:15:49 +00:00
Mixfix.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
MutualDef.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
Notation.lean feat: apply app unexpanders for all prefixes of an application (#3375) 2024-02-27 07:04:17 +00:00
Open.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
ParseImportsFast.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
PatternVar.lean chore: make Array functions either semireducible or use structural recursion (#5420) 2024-09-23 02:41:41 +00:00
PreDefinition.lean feat: generate f.eq_unfold lemmas (#5141) 2024-08-29 16:47:40 +00:00
Print.lean feat: fine-grained equational lemmas for non-recursive functions (#4154) 2024-08-22 13:26:58 +00:00
Quotation.lean chore: remove repeated words (#5438) 2024-09-24 03:40:11 +00:00
RecAppSyntax.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
SetOption.lean fix: don't use info nodes before cursor for completion (#3778) 2024-04-02 08:49:24 +00:00
StructInst.lean feat: have autoparams report parameter/field on failure (#5474) 2024-09-27 19:00:59 +00:00
Structure.lean chore: fix spelling mistakes in error messages/exceptions (#5425) 2024-09-23 13:19:05 +00:00
Syntax.lean chore: missing registerTraceClass (#4369) 2024-06-06 00:53:16 +00:00
SyntheticMVars.lean feat: have autoparams report parameter/field on failure (#5474) 2024-09-27 19:00:59 +00:00
Tactic.lean feat: add BitVec.intMin 2024-08-27 11:26:16 +10:00
Term.lean feat: have autoparams report parameter/field on failure (#5474) 2024-09-27 19:00:59 +00:00
Time.lean chore: upstream #time command (#5044) 2024-08-15 00:17:48 +00:00
Util.lean feat: simp to still work even if one simp arg does not work (#4177) 2024-06-03 14:21:31 +00:00