lean4-htt/src/Lean/Elab
Joachim Breitner 3d1d8fc1de
feat: unfolding functional induction principles (#8088)
This PR adds the “unfolding” variant of the functional induction and
functional cases principles, under the name `foo.induct_unfolding` resp.
`foo.fun_cases_unfolding`. These theorems combine induction over the
structure of a recursive function with the unfolding of that function,
and should be more reliable, easier to use and more efficient than just
case-splitting and then rewriting with equational theorems.

For example  instead of
```
ackermann.induct
  (motive : Nat → Nat → Prop)
  (case1 : ∀ (m : Nat), motive 0 m)
  (case2 : ∀ (n : Nat), motive n 1 → motive (Nat.succ n) 0)
  (case3 : ∀ (n m : Nat), motive (n + 1) m → motive n (ackermann (n + 1) m) → motive (Nat.succ n) (Nat.succ m))
  (x x : Nat) : motive x x
```
one gets
```
ackermann.fun_cases_unfolding
  (motive : Nat → Nat → Nat → Prop)
  (case1 : ∀ (m : Nat), motive 0 m (m + 1))
  (case2 : ∀ (n : Nat), motive n.succ 0 (ackermann n 1))
  (case3 : ∀ (n m : Nat), motive n.succ m.succ (ackermann n (ackermann (n + 1) m)))
  (x✝ x✝¹ : Nat) : motive x✝ x✝¹ (ackermann x✝ x✝¹)
```
2025-04-29 16:43:06 +00:00
..
Deriving feat: allow cond to be used in proofs (#7141) 2025-03-04 12:10:29 +00:00
InfoTree feat: allow async elab tasks to contribute to info trees reported to linters and request handlers (#7457) 2025-03-13 15:09:00 +00:00
PreDefinition feat: unfolding functional induction principles (#8088) 2025-04-29 16:43:06 +00:00
Quotation
Tactic fix: grind.debug true when using grind +ring (#8134) 2025-04-27 20:28:08 +00:00
App.lean fix: have nested field notation use consistent rules (#7816) 2025-04-04 22:35:34 +00:00
Arg.lean chore: rename Array.back to back! (#5897) 2024-10-31 09:18:18 +00:00
Attributes.lean
AutoBound.lean
AuxDef.lean
BinderPredicates.lean
Binders.lean feat: structure autoParam inheritance (#7640) 2025-03-23 06:04:00 +00:00
BindersUtil.lean
BuiltinCommand.lean feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00
BuiltinEvalCommand.lean chore: remove unused deriving handler argument syntax (#5265) 2024-11-01 22:41:38 +00:00
BuiltinNotation.lean feat: debug_assert! (#7256) 2025-03-03 16:34:44 +00:00
BuiltinTerm.lean feat: use new structInstFields parser to tag structure instance fields 2024-11-19 09:26:58 +01:00
Calc.lean chore: add missing diff-exposing in type/value mismatch errors (#6484) 2024-12-31 17:47:12 +00:00
CheckTactic.lean chore: add missing diff-exposing in type/value mismatch errors (#6484) 2024-12-31 17:47:12 +00:00
Command.lean fix: linter should have access to all messages, really (#8117) 2025-04-26 15:23:07 +00:00
ComputedFields.lean feat: deprecate Array.mkArray in favour of Array.replicate 2025-03-24 08:25:00 +01:00
Config.lean
Declaration.lean feat: environment constant data can be split into .olean.private (#8079) 2025-04-24 13:04:31 +00:00
DeclarationRange.lean feat: inlay hints for auto-implicits (#6768) 2025-02-04 17:36:49 +00:00
DeclModifiers.lean feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00
DeclNameGen.lean
DeclUtil.lean
DefView.lean fix: cancel computations within command elaboration as soon as reuse is ruled out (#7241) 2025-03-03 10:37:10 +00:00
Deriving.lean feat: upstream ToExpr deriving handler from Mathlib (#6473) 2024-12-31 15:11:53 +00:00
Do.lean feat: debug_assert! (#7256) 2025-03-03 16:34:44 +00:00
ElabRules.lean
Eval.lean
Exception.lean
Extra.lean refactor: elaborate forIn notation without extra let (#6977) 2025-02-08 10:32:34 +00:00
Frontend.lean chore: fix enabling module system (#8057) 2025-04-23 09:31:08 +00:00
GenInjective.lean
GuardMsgs.lean feat: 'unsolved goals' & 'goals accomplished' diagnostics (#7366) 2025-03-07 13:50:56 +00:00
Import.lean feat: import private 2025-04-27 07:41:07 +02:00
Inductive.lean feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00
InfoTree.lean
InfoTrees.lean feat: allow async elab tasks to contribute to info trees reported to linters and request handlers (#7457) 2025-03-13 15:09:00 +00:00
InheritDoc.lean feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00
LetRec.lean feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00
Level.lean chore: rename Array.back to back! (#5897) 2024-10-31 09:18:18 +00:00
Macro.lean
MacroArgUtil.lean
MacroRules.lean
Match.lean feat: allow anonymous equality proofs in match expressions (#6853) 2025-02-04 16:09:21 +00:00
MatchAltView.lean
MatchExpr.lean
Mixfix.lean
MutualDef.lean feat: do not export theorem bodies (#8090) 2025-04-25 20:22:32 +00:00
MutualInductive.lean fix: eliminate panic when inductive has autoparam parameter with underdetermined type (#7905) 2025-04-11 00:19:53 +00:00
Notation.lean chore: use Array.findFinIdx? where it is better than findIdx? (#6184) 2024-11-23 07:22:31 +00:00
Open.lean chore: avoid runtime array bounds checks (#6134) 2024-11-21 05:04:52 +00:00
ParseImportsFast.lean feat: import private 2025-04-27 07:41:07 +02:00
PatternVar.lean fix: propagate Simp.Config when reducing terms and checking definitional equality in simp (#6123) 2024-12-14 00:59:40 +00:00
PreDefinition.lean
Print.lean feat: do not export theorem bodies (#8090) 2025-04-25 20:22:32 +00:00
Quotation.lean feat: deprecate Array.mkArray in favour of Array.replicate 2025-03-24 08:25:00 +01:00
RecAppSyntax.lean
RecommendedSpelling.lean feat: recommended_spelling command (#6869) 2025-02-03 11:15:52 +00:00
SetOption.lean chore: generalize some type classes (#7611) 2025-04-07 01:10:19 +00:00
StructInst.lean chore: fix spelling mistakes (#7328) 2025-04-07 01:15:48 +00:00
Structure.lean fix: eliminate panic when inductive has autoparam parameter with underdetermined type (#7905) 2025-04-11 00:19:53 +00:00
Syntax.lean chore: avoid runtime array bounds checks (#6134) 2024-11-21 05:04:52 +00:00
SyntheticMVars.lean chore: fix typos (#7743) 2025-03-31 01:30:25 +00:00
Tactic.lean feat: extract_lets and lift_lets tactics (#6432) 2025-04-21 08:57:01 +00:00
Term.lean doc: add docstrings to mkFreshUserName etc (#7947) 2025-04-14 04:17:45 +00:00
Time.lean
Util.lean fix: convert kernel interrupt into elab interrupt (#6988) 2025-02-07 15:55:32 +00:00