Commit graph

986 commits

Author SHA1 Message Date
Leonardo de Moura
0f19332618 chore: update stage0 2024-03-13 12:37:58 -07:00
Lean stage0 autoupdater
1388f6bc83 chore: update stage0 2024-03-11 17:22:37 +00:00
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
Leonardo de Moura
4208c44939 chore: update stage0 2024-03-06 15:29:04 -08:00
Leonardo de Moura
1da65558d0 chore: update stage0 2024-03-05 14:42:05 -08:00
Leonardo de Moura
ea9a417371 chore: update stage0 2024-03-01 22:33:14 -08:00
Scott Morrison
b762567174 chore: update stage0 2024-02-29 17:34:15 +11:00
Lean stage0 autoupdater
17b8880983 chore: update stage0 2024-02-28 11:50:07 +00:00
Kyle Miller
37fd128f9f chore: update stage0 2024-02-28 09:23:17 +01:00
Lean stage0 autoupdater
7d5b6cf097 chore: update stage0 2024-02-27 10:00:46 +00:00
Leonardo de Moura
bfb981d465 chore: update stage0 2024-02-25 11:44:42 -08:00
Leonardo de Moura
02e4fe0b1c chore: update stage0 2024-02-25 11:44:42 -08:00
Scott Morrison
46df6142a6 chore: update stage0 2024-02-22 06:23:26 -08:00
Joe Hendrix
6e821de11a chore: update stage0 2024-02-21 21:58:54 +01:00
Lean stage0 autoupdater
71cfbb26de chore: update stage0 2024-02-21 15:19:07 +00:00
Leonardo de Moura
855a762bcb chore: update stage0 2024-02-20 07:00:47 -08:00
Sebastian Ullrich
79a9f6759a chore: update stage0 2024-02-20 12:48:19 +01:00
Scott Morrison
35e374350c
chore: upstream norm_cast tactic (#3322)
This is a quite substantial tactic.

It also includes the infamour `NatCast` typeclass (which I've equipped
with a module-doc). I wasn't at all sure where that should live, so it
is currently randomly in `Lean/Elan/Tactic/NatCast.lean`: presumably if
we're doing this it will go somewhere in `Init`.

---------

Co-authored-by: Leonardo de Moura <leomoura@amazon.com>
2024-02-19 17:49:17 -08:00
Leonardo de Moura
f64d14ea54 chore: update stage0 2024-02-19 12:47:04 -08:00
Lean stage0 autoupdater
7545b85512 chore: update stage0 2024-02-19 15:51:18 +00:00
Sebastian Ullrich
59bf220934 chore: update stage0 2024-02-19 12:37:19 +01:00
Leonardo de Moura
58ed6b9630 chore: update stage0 2024-02-18 14:14:55 -08:00
Leonardo de Moura
834b515592 chore: update stage0 2024-02-18 14:14:55 -08:00
Leonardo de Moura
b882ebcf4a chore: update stage0 2024-02-18 14:14:55 -08:00
Leonardo de Moura
6383af0595 chore: update stage0 2024-02-17 17:51:24 -08:00
Lean stage0 autoupdater
271ae5b8e5 chore: update stage0 2024-02-15 12:32:00 +00:00
Scott Morrison
5a95f91fae chore: update stage0 2024-02-15 13:26:01 +01:00
Scott Morrison
144c1bbbaf chore: update stage0 2024-02-15 14:33:36 +11:00
Scott Morrison
329e00661a
chore: upstream Std.Util.ExtendedBinders (#3320)
This is not a complete upstreaming of that file (it also supports `∀ᵉ (x
< 2) (y < 3), p x y` as shorthand for `∀ x < 2, ∀ y < 3, p x y`, but I
don't think we need this; it is used in Mathlib).

Syntaxes still need to be made built-in.

---------

Co-authored-by: Leonardo de Moura <leomoura@amazon.com>
2024-02-14 11:36:00 +00:00
Lean stage0 autoupdater
488bfe2128 chore: update stage0 2024-02-09 12:46:12 +00:00
Scott Morrison
b1944b662c chore: update stage0 2024-02-09 18:23:46 +11:00
Scott Morrison
3a63b72eea chore: update stage0 2024-02-09 15:56:57 +11:00
Leonardo de Moura
1f547225d1
feat: nary nomatch (#3285)
Base for https://github.com/leanprover/lean4/pull/3279

---------

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
2024-02-09 00:28:34 +00:00
Leonardo de Moura
819848a0db chore: update stage0 2024-02-09 09:57:57 +11:00
Scott Morrison
8037a8733d chore: update stage0 2024-02-01 16:58:54 +11:00
Scott Morrison
8db28ac32f chore: update stage0 2024-02-01 16:58:54 +11:00
Lean stage0 autoupdater
578a2308b1 chore: update stage0 2024-01-31 15:48:29 +00:00
Joachim Breitner
7c10415cd8 chore: update stage0 2024-01-10 17:27:35 +01:00
Leonardo de Moura
4e5ce6b65d chore: update stage0 2024-01-09 12:57:15 +01:00
Leonardo de Moura
88801166b6 chore: update stage0 2024-01-09 12:57:15 +01:00
Leonardo de Moura
6fd7350c7b chore: update stage0 2024-01-09 12:57:15 +01:00
Leonardo de Moura
23f2314da7 chore: update stage0
`Origin.decl` constructor has an extra field.
2024-01-09 12:57:15 +01:00
Lean stage0 autoupdater
fdc52e0ea9 chore: update stage0 2023-12-21 12:02:01 +00:00
Sebastian Ullrich
bddb2152e5
chore: default compiler.enableNew to false until development restarts (#3034) 2023-12-21 07:48:25 +00:00
Kyle Miller
a2226a43ac
feat: encode let_fun using a letFun function (#2973)
Switches from encoding `let_fun` using an annotated `(fun x : t => b) v`
expression to a function application `letFun v (fun x : t => b)`.

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2023-12-18 09:01:42 +00:00
Joachim Breitner
00359a0347
chore: update stage0 (#3041) 2023-12-08 12:14:47 +00:00
Marc Huisinga
3025a4a9a1
chore: update stage0 (#2992)
Updates stage-0 so that we can use import auto-completion ourselves.
2023-11-29 15:26:12 +00:00
Joachim Breitner
0adca630cc chore: update stage0 2023-11-21 18:59:22 +01:00
Kyle Miller
4bd0525a99 chore: update stage0 2023-11-12 16:57:51 +11:00
Henrik Böving
59d3b3d85a chore: update stage0 2023-11-02 23:21:47 +01:00