Commit graph

3271 commits

Author SHA1 Message Date
Sebastian Ullrich
cd4cd581be feat: make infix non-associative 2021-03-22 16:33:37 +01:00
Leonardo de Moura
3749213e08 fix: missing whnf at Unify.unify 2021-03-21 22:38:46 -07:00
Leonardo de Moura
2fd0b8c663 feat: contradiction catches empty inductive types 2021-03-21 21:48:43 -07:00
Leonardo de Moura
d9273786c7 chore: remove when and «unless»
They are obsolete.

cc @Kha
2021-03-20 18:52:18 -07:00
Leonardo de Moura
9a5f239513 refactor: remove Monad Option and Alternative Option
We should use `OptionM` instead.
`Option` still implements `Functor` and `OrElse`.

cc @Kha
2021-03-20 18:25:25 -07:00
Sebastian Ullrich
83ecff44c6 test: make infoTree an output test 2021-03-20 08:28:18 -07:00
Sebastian Ullrich
c0af90022e feat: term info at #print 2021-03-20 08:28:18 -07:00
Sebastian Ullrich
62891a1b0c feat: trace.Elab.info 2021-03-20 08:28:18 -07:00
Leonardo de Moura
86a204d8a1 feat: add simp_all tactic
cc @Kha
2021-03-19 22:34:35 -07:00
Leonardo de Moura
d70740fef2 fix: location notation and simp 2021-03-19 19:54:22 -07:00
Sebastian Ullrich
54405c4543 fix: automatically wrap many/sepBy items in null nodes where necessary 2021-03-19 15:15:55 +01:00
Leonardo de Moura
1af02dcaca feat: allow users to mark definitions with [simp]
cc @JasonGross @Kha
2021-03-17 19:11:55 -07:00
Leonardo de Moura
205b42a397 feat: proper syntax for configuring simp 2021-03-17 16:37:04 -07:00
Leonardo de Moura
5eda786f6e feat: use False.elim when simplifying local declarations that rewrite to False 2021-03-17 15:30:54 -07:00
Leonardo de Moura
7dc6721fea fix: missing pushScope and popScope 2021-03-16 16:42:45 -07:00
Leonardo de Moura
8227d3afcd feat: support for simplifying match discriminants 2021-03-16 15:51:36 -07:00
Leonardo de Moura
ea91317f1a fix: avoid nontermination due to respecialization 2021-03-15 19:12:57 -07:00
Leonardo de Moura
cc0712fc82 feat: add support for offset terms at DiscrTree 2021-03-14 08:23:44 -07:00
Leonardo de Moura
e04e9ff87e feat: extend anonymous ctor notation 2021-03-13 17:11:37 -08:00
Leonardo de Moura
50fd39db89 fix: bug at allGoals 2021-03-12 17:48:33 -08:00
Leonardo de Moura
7627458aac chore: fix tests
We are not using the `!` suffix anymore for keywords.
2021-03-12 15:10:50 -08:00
Leonardo de Moura
be841a7cad chore: throwError! => throwError, throwErrorAt! => throwErrorAt
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
d46cb80362 chore: fix tests 2021-03-11 11:35:51 -08:00
Leonardo de Moura
656b7a8d87 chore: fix tests 2021-03-11 10:51:11 -08:00
Leonardo de Moura
8188789cf4 chore: fix test 2021-03-11 10:16:37 -08:00
Leonardo de Moura
35b2f596f1 test: use decide and nativeDecide
They are not active yet.
2021-03-11 07:46:33 -08:00
Leonardo de Moura
48b855bfe5 chore: fix tests 2021-03-10 18:45:22 -08:00
Leonardo de Moura
1ea4bdb9cd fix: add "band-aid" for #341
closes #341

This is another instance of a compiler bug.
It is in the code that is still written in C/C++.
We need to infer types in the compiler, and we reused the kernel type
checker for this.
However, the compiler performs transformations that may produce type
incorrect terms.
This happens in code that makes heavy use of dependent types (like the
new test).
This is just a workaround for this particular instance of the problem.
The definitive solution will only happen when we replace
this part of the compiler with Lean code, and implement a custom
`inferType` method for the compiler.
2021-03-10 08:11:41 -08:00
Leonardo de Moura
0ea267e4de feat: add simp lemma preprocessor 2021-03-09 19:16:14 -08:00
Leonardo de Moura
0c29987a82 chore: clenaup test 2021-03-08 18:19:15 -08:00
Leonardo de Moura
ef4ab9c1d1 fix: report error if too many variable names have been provided at induction/cases alternative 2021-03-08 16:26:53 -08:00
Leonardo de Moura
4bbcd305b5 fix: disable implicit-lambdas when elaborating patterns
@Kha, Jason's example on issue #337 suggests that injecting
implicit-lambdas while elaborating patterns is problematic.
The elaborator was injecting `fun {Γ} =>` before the
pattern variable `ftm`.
So, I disabled the implicit-lambda during pattern elaboration. I
didn't find an example where it would be useful.

see #337

cc @JasonGross
2021-03-08 15:45:30 -08:00
Leonardo de Moura
0e3aa2c29b fix: scope of forallTelescopeReducing
Nested constructors were being processed using an extended local context.
Fix issue reported by @JasonGross at Zulip.

closes #338
2021-03-08 08:29:48 -08:00
Leonardo de Moura
4bbf498004 chore: fix tests 2021-03-07 18:52:46 -08:00
Leonardo de Moura
0a881315ba feat: optional preprocessing tactic at induction and cases
cc @Kha
2021-03-07 14:50:49 -08:00
Leonardo de Moura
19899d087e refactor: induction 2021-03-07 12:04:36 -08:00
Leonardo de Moura
061b9bf60f feat: set_option in terms and tactics
closes #330
2021-03-06 16:43:10 -08:00
Leonardo de Moura
0ed3f08c1b feat: open in terms and tatics
See #330
2021-03-06 15:33:00 -08:00
Leonardo de Moura
9b02a80416 fix: fixes #335 2021-03-05 18:16:49 -08:00
Leonardo de Moura
5e9ccf19d7 fix: fixes #329 2021-03-05 13:42:54 -08:00
Leonardo de Moura
e228ca38b8 test: add set example 2021-03-04 19:16:12 -08:00
Leonardo de Moura
30287836b0 test: OfNatSound 2021-03-04 13:48:01 -08:00
Leonardo de Moura
1fedbfb9a3 feat: simp only 2021-03-04 11:58:34 -08:00
Leonardo de Moura
130a087ecf feat: Lean 3 french single quote notation 2021-03-04 09:43:59 -08:00
Leonardo de Moura
3107473c9f feat: add rename tactic
cc @Kha
2021-03-03 18:32:25 -08:00
Leonardo de Moura
1ecc50f809 test: contradiction 2021-03-03 17:13:25 -08:00
Leonardo de Moura
6cdc6cb1d0 feat: add contradiction 2021-03-03 17:00:54 -08:00
Leonardo de Moura
4aec7579db test: add do equivalence examples 2021-03-03 13:44:30 -08:00
Leonardo de Moura
f1245f9dc7 fix: bug at isDefEqOffset
fixes #326
2021-03-02 17:28:40 -08:00
Leonardo de Moura
5626b537c7 chore: move nondet to Std/Control/Nondet.lean 2021-03-02 07:57:25 -08:00