Commit graph

15001 commits

Author SHA1 Message Date
Sebastian Ullrich
564d2be3b3 feat: KVMap.forIn 2020-11-03 12:36:33 +01:00
Sebastian Ullrich
95910108dc fix: delaborator: share mdata tree position with child 2020-11-03 12:36:33 +01:00
Leonardo de Moura
60c0e7b3d4 chore: avoid ..
@Kha The parenthesizer generates an error when `..` is used in terms
2020-11-02 19:32:32 -08:00
Leonardo de Moura
5854b5b9fe feat: disallow alternatives of the form | _ ids => ...
@Kha We are still accepting wildcard alternatives of the form
     `| _ => ...`
It is useful when we can discharge many alternatives using the same
tactic, and it looks like the wildcard alternative used in "match"-expressions.
2020-11-02 19:23:30 -08:00
Leonardo de Moura
bb99fc400a chore: remove old crap 2020-11-02 19:16:23 -08:00
Leonardo de Moura
68ef8655bb feat: improve getElimInfo 2020-11-02 18:45:52 -08:00
Leonardo de Moura
8d47e8be3b feat: add basic cases ... using ... methods 2020-11-02 18:28:26 -08:00
Leonardo de Moura
9686515d83 chore: minor 2020-11-02 18:17:10 -08:00
Leonardo de Moura
7d752353a1 feat: add getElimInfo 2020-11-02 17:51:18 -08:00
Leonardo de Moura
1bec9ac3e0 feat: add generalizeTargets and more general unifyEqs 2020-11-02 17:43:43 -08:00
Leonardo de Moura
9932c79127 chore: cleanup 2020-11-02 17:27:34 -08:00
Leonardo de Moura
a6fd611db0 chore: use generalizing 2020-11-02 17:01:10 -08:00
Leonardo de Moura
7c44d4632b fix: induction ... generalizing 2020-11-02 16:58:14 -08:00
Leonardo de Moura
73903267a5 feat: extend cases tactic syntax 2020-11-02 16:46:33 -08:00
Leonardo de Moura
a0ab1b9eb4 chore: remove with 2020-11-02 13:35:26 -08:00
Leonardo de Moura
f64bd9e1e3 chore: remove unnecessary with at induction/cases tactics 2020-11-02 13:30:54 -08:00
Leonardo de Moura
dfc346e76f chore: remove obsolete attribute 2020-11-02 06:47:20 -08:00
Leonardo de Moura
83fb51f601 chore: remove StrategyAttrs 2020-11-02 06:39:21 -08:00
Leonardo de Moura
438494ae3f chore: fix assertion 2020-11-02 06:22:46 -08:00
Leonardo de Moura
7b5f283507 chore: remove Expr.localE constructor
It was used by the old frontend
2020-11-01 09:37:48 -08:00
Leonardo de Moura
806e8784e7 chore: cleanup Quot/Quotient 2020-11-01 09:12:24 -08:00
Leonardo de Moura
eb2b1d56eb chore: argument name 2020-11-01 08:03:37 -08:00
Leonardo de Moura
0d6a3080ad chore: remove broken expandWhere 2020-10-31 19:19:18 -07:00
Leonardo de Moura
de8f8f0e28 feat: improve local context reduction approximation 2020-10-31 19:19:18 -07:00
Leonardo de Moura
bcae20381f chore: naming convention 2020-10-31 19:19:18 -07:00
Leonardo de Moura
5d20cd1f46 chore: move CDot code to BuiltinNotation 2020-10-31 19:19:18 -07:00
Leonardo de Moura
85a3810b10 fix: where is not a term
See #191

TODO: add proper support for it in key places
2020-10-31 19:19:18 -07:00
Leonardo de Moura
665c3ed2f7 chore: cleanup 2020-10-31 19:19:18 -07:00
Leonardo de Moura
8c9f148e2f chore: use new termFor, termReturn, termTry, and tryUnless 2020-10-31 19:19:18 -07:00
Leonardo de Moura
eacca1342f fix: expandLiftMethod
We should not visit the new `termFor`, `termTry`, etc.
2020-10-31 19:19:18 -07:00
Leonardo de Moura
34a6125ae2 feat: add coercion from String to IO.Error 2020-10-31 19:19:17 -07:00
Leonardo de Moura
87bf97bdc1 feat: expand term try, for, unless, and return 2020-10-31 19:19:17 -07:00
Leonardo de Moura
d20081c548 feat: add term version of unless, for, try, and return notations 2020-10-31 19:19:17 -07:00
Leonardo de Moura
77b160a5a8 chore: use mkFreshUserName at generalizeTelescope 2020-10-31 19:19:17 -07:00
Leonardo de Moura
3101b83f98 fix: missing do 2020-10-30 18:15:37 -07:00
Leonardo de Moura
870f9a6215 fix: use robust matchEq? 2020-10-30 17:28:08 -07:00
Leonardo de Moura
f2530e069a feat: do not create subgoals for auxiliary let-rec metavariables 2020-10-30 14:58:17 -07:00
Leonardo de Moura
0af30273c5 feat: hide auxiliary metavariables used to compile let-rec 2020-10-30 14:58:17 -07:00
Leonardo de Moura
4f3e932b3e feat: expand "let rec" tactic notation 2020-10-30 14:58:17 -07:00
Leonardo de Moura
b880181cee feat: add let rec tactic parser 2020-10-30 14:58:17 -07:00
Leonardo de Moura
0a56057db1 feat: better error message for "unknown" tactic
@Kha The hack I posted at Zulip didn't really work
```
macro x:ident : tactic => throw $ Lean.Macro.Exception.error x s!"unknown tactic '{x.getId}'"
```

For example, we would still get a weird error message at
```
theorem ex3 (x : Nat) : x = x → x = x :=
  have x = x by foo (aaa bbb) -- The error would be at `bbb`
  fun h => h
```
There were other minor issues that could be fixed, but this one was bad.
2020-10-30 14:58:17 -07:00
Sebastian Ullrich
0731d3f080 fix: double indentation inside parentheses
Ideally we would skip the indentation after any leading token without trailing
whitespace, but it's not quite clear how to do that in general
2020-10-30 19:10:08 +01:00
Sebastian Ullrich
bc8cb5edda feat: pretty printer: adapt new indentation style 2020-10-30 19:08:39 +01:00
Leonardo de Moura
0032578d5b feat: add have <ident> := <term> tactic macro 2020-10-29 20:39:40 -07:00
Leonardo de Moura
672436bc5f feat: allow user to assign parsing priorities in the macro and elab commands 2020-10-29 20:33:51 -07:00
Leonardo de Moura
956a646a9c chore: admit as a macro 2020-10-29 18:58:29 -07:00
Leonardo de Moura
6670378907 fix: withIds parser 2020-10-29 18:50:08 -07:00
Leonardo de Moura
0f3bd8abb4 feat: add rfl and decide! tactic macros 2020-10-29 16:42:22 -07:00
Leonardo de Moura
278883a5d6 feat: improve tryLiftAndCoe 2020-10-29 12:46:04 -07:00
Leonardo de Moura
6858cb5fb6 chore: cleanup 2020-10-29 10:24:16 -07:00