lean4-htt/stage0/stdlib/Init
Kyle Miller 45fccc5906
feat: custom eliminators for induction and cases tactics, and beautiful eliminators for Nat (#3629)
Replaces `@[eliminator]` with two attributes `@[induction_eliminator]`
and `@[cases_eliminator]` for defining custom eliminators for the
`induction` and `cases` tactics, respectively.

Adds `Nat.recAux` and `Nat.casesAuxOn`, which are eliminators that are
defeq to `Nat.rec` and `Nat.casesOn`, but these use `0` and `n + 1`
rather than `Nat.zero` and `Nat.succ n`.

For example, using `induction` to prove that the factorial function is
positive now has the following goal states (thanks also to #3616 for the
goal state after unfolding).
```lean
example : 0 < fact x := by
  induction x with
  | zero => decide
  | succ x ih =>
    /-
    x : Nat
    ih : 0 < fact x
    ⊢ 0 < fact (x + 1)
    -/
    unfold fact
    /-
    ...
    ⊢ 0 < (x + 1) * fact x
    -/
    simpa using ih
```

Thanks to @adamtopaz for initial work on splitting the `@[eliminator]`
attribute.
2024-03-09 15:31:51 +00:00
..
Control chore: update stage0 2024-03-06 15:29:04 -08:00
Data feat: custom eliminators for induction and cases tactics, and beautiful eliminators for Nat (#3629) 2024-03-09 15:31:51 +00:00
Omega chore: update stage0 2024-03-06 15:29:04 -08:00
System chore: update stage0 2024-03-05 14:42:05 -08:00
BinderPredicates.c chore: update stage0 2024-02-15 13:26:01 +01:00
ByCases.c chore: update stage0 2024-02-15 14:33:36 +11:00
Classical.c chore: update stage0 2024-02-15 14:33:36 +11:00
Coe.c chore: update stage0 2024-02-09 18:23:46 +11:00
Control.c
Conv.c chore: update stage0 2024-02-25 11:44:42 -08:00
Core.c chore: update stage0 2024-02-27 10:00:46 +00:00
Data.c chore: update stage0 2024-02-21 15:19:07 +00:00
Dynamic.c chore: update stage0 2022-12-13 22:15:05 +01:00
Ext.c chore: update stage0 2024-02-15 13:26:01 +01:00
Guard.c chore: upstream Std.Util.ExtendedBinders (#3320) 2024-02-14 11:36:00 +00:00
Hints.c
Meta.c chore: update stage0 2024-02-29 17:34:15 +11:00
MetaTypes.c chore: update stage0 2024-02-18 14:14:55 -08:00
Notation.c chore: update stage0 2024-02-29 17:34:15 +11:00
NotationExtra.c chore: update stage0 2024-02-28 11:50:07 +00:00
Omega.c chore: update stage0 2024-02-19 12:37:19 +01:00
Prelude.c feat: encode let_fun using a letFun function (#2973) 2023-12-18 09:01:42 +00:00
PropLemmas.c chore: update stage0 2024-02-15 14:33:36 +11:00
RCases.c chore: upstream Std.Util.ExtendedBinders (#3320) 2024-02-14 11:36:00 +00:00
ShareCommon.c chore: update stage0 2022-12-13 22:15:05 +01:00
SimpLemmas.c
Simproc.c chore: update stage0 2024-03-05 14:42:05 -08:00
SizeOf.c chore: update stage0 2022-12-13 22:15:05 +01:00
SizeOfLemmas.c
System.c chore: update stage0 2022-09-07 13:24:19 -07:00
Tactics.c chore: update stage0 2024-03-01 22:33:14 -08:00
TacticsExtra.c chore: upstream norm_cast tactic (#3322) 2024-02-19 17:49:17 -08:00
Util.c chore: update stage0 2023-11-21 18:59:22 +01:00
WF.c chore: update stage0 2024-02-15 13:26:01 +01:00
WFTactics.c chore: update stage0 2024-02-28 11:50:07 +00:00