Commit graph

6312 commits

Author SHA1 Message Date
Leonardo de Moura
b2d26380f2 fix: remove auxiliary discriminant let-declarations 2022-01-07 15:03:19 -08:00
Leonardo de Moura
1cf8467847 feat: add unfold conv tactic 2022-01-07 13:51:45 -08:00
Leonardo de Moura
49d0f3af52 test: unfold tactic 2022-01-07 13:51:45 -08:00
Leonardo de Moura
b797c982fc feat: add mkUnfoldProof 2022-01-07 13:51:45 -08:00
Gabriel Ebner
f146d456ce fix: only enable InsertReplaceEdit if supported 2022-01-07 20:28:10 +01:00
larsk21
8c2d7a35d3 fix: make set_option completion replace typed partial name 2022-01-07 17:06:26 +01:00
Mario Carneiro
dcaf3c615f fix: induction generalizing precedence 2022-01-07 10:45:45 +01:00
Leonardo de Moura
bef161caf7 feat: add better support for discharging equation theorem hypotheses 2022-01-06 14:42:23 -08:00
Leonardo de Moura
90b179bea9 fix: add equation theorems even if definition supports smart unfolding
See new test.
2022-01-06 13:53:03 -08:00
Leonardo de Moura
d8d7d63830 fix: registers eqns info before adding definition
Otherwise `[simp]` at definition will fail to generate equational theorems.
2022-01-06 12:24:40 -08:00
Leonardo de Moura
7acbbb4fbb fix: auxiliary whnfAux used at mkEqns 2022-01-06 09:57:41 -08:00
Leonardo de Moura
60934bf1d5 feat: add support for removing [simp] attribute from definitions with equational theorems 2022-01-05 16:57:59 -08:00
Leonardo de Moura
c2e52bd577 feat: use getEqnsFor? when applying [simp] at definitions 2022-01-05 15:59:39 -08:00
Leonardo de Moura
030e932db8 feat: use getEqnsFor? at simp 2022-01-05 11:28:24 -08:00
Leonardo de Moura
4d1343d670 chore: use _eq instead of eq to name auto generated equational theorems 2022-01-04 17:23:34 -08:00
Leonardo de Moura
b2918e0c76 test: add tests for WF.mkEqns 2022-01-04 17:18:51 -08:00
Leonardo de Moura
d782a97f5c feat: add WF.mkProof for WF.mkEqns 2022-01-04 17:00:54 -08:00
Sebastian Ullrich
64971a1e3c fix: term macro errors should be fatal 2022-01-04 11:20:18 +01:00
Leonardo de Moura
b9f7d1defb fix: constant folding after erasure
closes #909
2022-01-03 10:33:07 -08:00
Leonardo de Moura
52b6a04088 test: for #916 2022-01-03 07:57:16 -08:00
Gabriel Ebner
e605c541d0 fix: do not infer type in erase_irrelevant
At the time erase_irrelevant is called, we have already eliminated the
`cast`-applications.  Therefore non-atomic expressions may no longer
be well-typed (and `infer_type` can fail).
2022-01-03 07:13:55 -08:00
Sebastian Ullrich
555584375a fix: compare fields top-down in deriving Ord 2022-01-03 07:02:13 -08:00
Henrik Böving
2d85c9ba2f chore: fix notation test
The ppNotationCode.lean test failed because the output of the notation
elaborator changed (purposely), adapt it to the new output.
2022-01-03 13:47:11 +01:00
Gabriel Ebner
70ef4e529c feat: allow attributes on structures and inductives 2021-12-23 08:04:36 -08:00
Sebastian Ullrich
c62c8bd64b chore: reenable servertest_edit 2021-12-21 18:11:28 +01:00
Sebastian Ullrich
5b653197db chore: use --run for servertests
/cc @Garmelon
2021-12-21 16:04:21 +01:00
Leonardo de Moura
b278a20ac2 feat: ensure #eval converts unassigned universe metavars into parameters
see #898
2021-12-20 06:11:36 -08:00
Sebastian Ullrich
51dc32957b feat: show universe args on hover
We might also want to replace them with fresh vars to make the hover
completely independent of the context, but this change at least avoids
any hidden information.
2021-12-20 10:51:44 +01:00
Sebastian Ullrich
5f96a9fc4d fix: do not show type of sort in hover
Fixes #896
2021-12-19 11:03:15 +01:00
Leonardo de Moura
92a511be29 chore: fix test 2021-12-18 11:05:37 -08:00
Leonardo de Moura
be6bc67eb0 fix: ensure match-expressions compiled using if-then-else can be reduced with TransparencyMode.reducible
closes #891
2021-12-18 10:55:42 -08:00
Leonardo de Moura
c954fc9ec7 fix: bug at simpLoop 2021-12-18 06:48:08 -08:00
Sebastian Ullrich
cd94ec20b0 fix: aux_def: avoid creating unparseable names 2021-12-17 14:21:35 -08:00
Leonardo de Moura
6b82e15069 feat: preserve variable names when packing domain 2021-12-17 07:10:26 -08:00
Leonardo de Moura
8b7411bdd8 feat: improve error location at well-founded recursion 2021-12-17 06:50:20 -08:00
Sebastian Ullrich
ca740f5687 chore: fix copy-produced 2021-12-17 12:22:53 +01:00
Leonardo de Moura
2d4d5ae96f feat: save syntax around recursive applications
Motivation: better error messages at structural and well-founded recursion.
2021-12-16 17:13:55 -08:00
Leonardo de Moura
0a81093db5 fix: bug at simpProj
This bug was reported at https://github.com/dwrensha/lean4-maze/issues/1
2021-12-15 17:07:00 -08:00
Leonardo de Moura
9a24db4e86 fix: check generated motives at notation
This commit also improves the `▸` notation a bit.
It now tries `subst` (if applicable) before failing.
2021-12-15 16:16:42 -08:00
Leonardo de Moura
89edc184fb feat: compleation at #print command 2021-12-15 13:13:39 -08:00
Leonardo de Moura
653b684651 feat: improve getCompletionKindForDecl 2021-12-15 12:57:09 -08:00
Leonardo de Moura
7d7c6d8be5 feat: add CompletionItemKind 2021-12-15 11:24:11 -08:00
Leonardo de Moura
31f845c5ed feat: keyword completion 2021-12-15 11:24:11 -08:00
Gabriel Ebner
230d6d2cf5 fix: use group for if-then-else 2021-12-15 11:42:38 +00:00
Gabriel Ebner
b905824024 chore: fix tests 2021-12-15 11:42:38 +00:00
Gabriel Ebner
7e483d3a0a feat: support syntax abbreviations in dynamic quotations 2021-12-15 11:17:58 +00:00
Leonardo de Moura
5b14caf329 fix: missing addTermInfo at elabAtomicDiscr
closes #820
2021-12-14 17:20:46 -08:00
Leonardo de Moura
136fab0723 feat: improve error message for let ... ← ... outside of a do 2021-12-14 08:56:22 -08:00
Leonardo de Moura
1c83ea9e40 fix: typo at hasUnusedArguments
See comment at #815
2021-12-14 06:50:34 -08:00
tydeu
26a225e230 chore: fix tests 2021-12-14 09:33:52 +01:00