Commit graph

1676 commits

Author SHA1 Message Date
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
Lean stage0 autoupdater
104c92d4f3 chore: update stage0 2023-12-11 18:37:33 +00:00
Joachim Breitner
5cd90f5826
feat: drop support for termination_by' (#3033)
until around 7fe6881 the way to define well-founded recursions was to
specify a `WellFoundedRelation` on the argument explicitly. This was
rather low-level, for example one had to predict the packing of multiple
arguments into `PProd`s, the packing of mutual functions into `PSum`s,
and the cliques that were calculated.

Then the current `termination_by` syntax was introduced, where you
specify the termination argument at a higher level (one clause per
functions, unpacked arguments), and the `WellFoundedRelation` is found
using type class resolution.

The old syntax was kept around as `termination_by'`. This is not used
anywhere in the lean, std, mathlib or the theorem-proving-in-lean
repositories,
and three occurrences I found in the wild can do without

In particular, it should be possible to express anything that the old
syntax
supported also with the new one, possibly requiring a helper type with a
suitable instance, or the following generic wrapper that now lives in
std
```
def wrap {α : Sort u} {r : α → α → Prop} (h : WellFounded r) (x : α) : {x : α // Acc r x}
```

Since the old syntax is unused, has an unhelpful name and relies on
internals, this removes the support. Now is a good time before the
refactoring that's planned in #2921.

The test suite was updated without particular surprises.

The parametric `terminationHint` parser is gone, which means we can
match on syntax more easily now, in `expandDecreasingBy?`.
2023-12-11 17:33:17 +00:00
Joachim Breitner
00359a0347
chore: update stage0 (#3041) 2023-12-08 12:14:47 +00:00
Joachim Breitner
6d23450642
refactor: rewrite TerminationHint elaborators (#2958)
In order to familiarize myself with this code, and so that the next
person has an easier time, I

* added docstrings explaining what I found out these things to
* rewrote the syntax expansion functions using syntax pattern matches,
  to the extend possible
2023-12-02 10:08:07 +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
Sebastian Ullrich
79251f5fa2
feat: embed and check githash in .olean (#2766)
This is an additional safety net on top of #2749: it protects users that
circumvent the build system (e.g. with `lake env`) as well as obviates
the need for TOCTOU-like race condition checks in the build system.

The check is activated by `CHECK_OLEAN_VERSION=ON`, which now defaults
to `OFF` as the sensible default for local development. When activated,
`USE_GITHASH=ON` is also force-enabled for stage 0 in order to make sure
that stage 1 can load its own core library.
2023-11-27 10:24:43 +00:00
Joachim Breitner
0adca630cc chore: update stage0 2023-11-21 18:59:22 +01:00
Joachim Breitner
37362658ab fix: eq_refl tactic’s name is eqRefl
Previously, it has `name := refl`, which looked confusing in
[the
docs](https://leanprover-community.github.io/mathlib4_docs/Init/Tactics.html#Lean.Parser.Tactic.refl),
as there is no `refl` tactic,
2023-11-21 18:59:22 +01:00
Henrik Böving
59d3b3d85a chore: update stage0 2023-11-02 23:21:47 +01:00
Sebastian Ullrich
6c5f79c0df chore: update stage0 2023-10-26 10:47:14 +02:00
SADIK KUZU
e0802d2dea
fix: typos in specialize.cpp (#2702) 2023-10-17 00:58:10 +00:00
Alexander Bentkamp
7dc1618ca5
feat: Web Assembly Build (#2599)
Co-authored-by: Rujia Liu <rujialiu@user.noreply.github.com>
2023-10-04 09:04:20 +02:00
Sebastian Ullrich
dc60150b5a chore: update domain 2023-09-20 15:13:27 -07:00
Sebastian Ullrich
4114ffa273 chore: update stage0 2023-09-20 13:58:13 +02:00
Joachim Breitner
b2d668c340
perf: Use flat ByteArrays in Trie (#2529) 2023-09-20 13:22:37 +02:00
Sebastian Ullrich
c2a5730bc9 chore: update stage0 2023-09-13 17:45:54 +02:00
Sebastian Ullrich
6c0baf4aed feat: support reporting range for parser errors, report ranges for expected token errors 2023-09-12 11:42:24 +02:00
Tobias Grosser
beddf011d7 chore: update stage0 2023-08-14 13:33:46 +02:00
Leonardo de Moura
fac9e64cdf chore: update stage0 2023-08-13 09:56:29 -07:00
Tobias Grosser
d90176af71 chore: remove trailing whitespaces in CMakeLists.txt 2023-08-13 16:18:23 +02:00
tydeu
8de1c0786c chore: make Lean build shell configurable 2023-08-07 23:05:37 +02:00
Siddharth Bhat
96c59ccced chore: update stage0 2023-07-25 11:03:16 +02:00
Mario Carneiro
0c624d8023 chore: update stage0 2023-06-02 16:19:02 +02:00
Mario Carneiro
43f6d0a761 feat: implement have this (part 1) 2023-06-02 16:19:02 +02:00
Gabriel Ebner
d58f552b84 chore: update stage0 2023-04-10 13:00:04 -07:00
Sebastian Ullrich
97b4143e14 chore: update stage0 2023-03-15 10:55:42 +01:00
Sebastian Ullrich
9d013ba3f5 chore: update stage0 2023-02-08 12:11:41 +01:00
Tobias Grosser
d74d4230b7 fix: avoid warning by dropping '#pragma once'
Before this change, we would see the warning:

	"#pragma once in main file"
2023-01-04 09:42:40 +01:00
Leonardo de Moura
5424386c0d chore: update stage0 2023-01-03 14:14:50 -08:00
Gabriel Ebner
b83e185c79 chore: parse quotations with current stage 2023-01-03 13:59:53 -08:00
Gabriel Ebner
4e02c55766 chore: update stage0 2022-12-21 04:24:39 +01:00
Sebastian Ullrich
4fa8d003d8 chore: update stage0 2022-12-13 22:15:05 +01:00
Gabriel Ebner
c83e33b06a chore: update stage0 2022-12-01 20:18:14 -08:00
Leonardo de Moura
95467dfab7 chore: update stage0 2022-11-30 17:05:38 -08:00
Leonardo de Moura
2a36cf42d2 chore: update stage0 2022-11-30 06:43:57 -08:00
Leonardo de Moura
6bc919742e chore: update stage0 2022-11-28 07:51:42 -08:00
Leonardo de Moura
17855b6e90 chore: update stage0 2022-11-24 12:57:43 -08:00
Leonardo de Moura
027bf6e140 chore: update stage0 2022-11-20 10:48:22 -08:00
Leonardo de Moura
9056824be5 chore: update stage0 2022-11-19 19:24:10 -08:00
Leonardo de Moura
14d37739c7 chore: update stage0 2022-11-19 07:55:34 -08:00
Leonardo de Moura
6f5bd3ccb6 chore: update stage0 2022-11-16 13:32:08 -08:00
Leonardo de Moura
8a012c83d3 chore: update stage0 2022-11-15 16:49:07 -08:00
Sebastian Ullrich
fea819bf3c chore: update stage0 2022-11-14 12:56:03 +01:00
Sebastian Ullrich
d44b70c24b chore: update stage0 2022-11-11 13:45:41 +01:00
Sebastian Ullrich
c370256870 chore: update stage0 2022-11-11 13:45:41 +01:00
Sebastian Ullrich
791fc70dd9 refactor: split paren parser 2022-11-11 13:45:41 +01:00
Sebastian Ullrich
64ec4106c3 chore: update stage0 2022-11-11 13:45:41 +01:00
Sebastian Ullrich
da6efe1bca fix: make parser caching sound (I hope?) 2022-11-11 09:13:02 +01:00
Sebastian Ullrich
260387d626 chore: update stage0 2022-11-11 09:13:02 +01:00