Commit graph

1036 commits

Author SHA1 Message Date
Leonardo de Moura
40fb66bf07 feat(frontends/lean): change default precedence to 1 2014-10-20 18:40:55 -07:00
Leonardo de Moura
e2fa981e89 fix(frontends/lean/pp): avoid parentheses around atomic notation 2014-10-20 18:08:13 -07:00
Leonardo de Moura
53a64ac767 refactor(library/tactic): move intros_tactic initialization to intros_tactic module 2014-10-20 17:47:52 -07:00
Leonardo de Moura
3c4419ff23 refactor(library/tactic): move rename_tactic to separate module 2014-10-20 17:41:40 -07:00
Leonardo de Moura
e68007a727 fix(frontends/lean/builtin_tactics): adjust tactics precedence 2014-10-20 17:10:16 -07:00
Leonardo de Moura
9b8f60b739 feat(frontends/lean/builtin_exprs): tolerate dangling ',' in begin-end block
This is useful when debugging proofs.
2014-10-20 15:59:49 -07:00
Leonardo de Moura
a3aca96cb9 fix(frontends/lean/builtin_exprs): error position 2014-10-20 15:56:58 -07:00
Leonardo de Moura
fd40999909 feat(frontends/lean): uniform unsolved goals "error" position 2014-10-20 15:52:06 -07:00
Leonardo de Moura
7d0100a340 feat(library/tactic): add 'intros' tactic 2014-10-20 15:26:16 -07:00
Leonardo de Moura
33c4715f4c fix(frontends/lean/pp): suppress unnecessary '[annotation]' marks 2014-10-20 11:16:21 -07:00
Leonardo de Moura
f0cc17af87 fix(frontends/lean/elaborator): missing type information when ! operator (aka consume_args) is used 2014-10-20 08:31:36 -07:00
Leonardo de Moura
a1006073d4 feat(frontends/lean/notation_cmd): do not allow user to define new tokes containing '(', ')', ',' or change their precedence 2014-10-19 13:39:06 -07:00
Leonardo de Moura
469368f090 refactor(frontends/lean/scanner): move basic UTF8 procedures to separate module 2014-10-19 13:29:15 -07:00
Leonardo de Moura
4d4bc0551f feat(frontends/lean/pp): minimize number of spaces when pretty printing notation 2014-10-19 13:08:15 -07:00
Leonardo de Moura
ed1afe26bd feat(frontends/lean/pp): support scopedexpr notation in the pretty printer 2014-10-19 12:50:40 -07:00
Leonardo de Moura
f63d47fef3 feat(frontends/lean/pp): support foldl/foldr notation in the pretty printer 2014-10-19 11:16:24 -07:00
Leonardo de Moura
100b3abf1d fix(frontends/lean/pp): bug in notation matching procedure 2014-10-19 10:48:41 -07:00
Leonardo de Moura
d7cc7cbd8c refactor(frontends/lean/pp): remove 'reverse' hack 2014-10-19 09:56:18 -07:00
Leonardo de Moura
eef1cc4ac2 fix(frontends/lean/pp): implicit arguments in notation 2014-10-19 09:04:43 -07:00
Leonardo de Moura
555d26aa61 feat(frontends/lean/pp): take notation declarations into account when pretty printing
TODO: support foldl/foldr and binders
2014-10-19 08:41:29 -07:00
Leonardo de Moura
6a31a79265 refactor(frontends/lean/inductive_cmd): move auxiliary method to expr.h 2014-10-18 15:11:26 -07:00
Leonardo de Moura
eb79af98ba feat(frontends/lean/parse_config): add get_notation_entries auxiliary function for returning the list of notation declarations that start with a given head symbol
This API is need to take notation declarations into account when pretty
printing expressions.
2014-10-18 11:49:27 -07:00
Leonardo de Moura
f17e67efcb feat(frontends/lean/parse_table): add get_head_index auxiliary function for indexing notation declarations 2014-10-18 10:55:39 -07:00
Leonardo de Moura
3b6b23c921 refactor(kernel/expr): remove silly overloads 2014-10-16 13:37:55 -07:00
Leonardo de Moura
28128e0330 fix(frontends/lean): EXTRA_TYPE info 2014-10-16 12:25:18 -07:00
Leonardo de Moura
8907dd5b91 refactor(frontends/lean): minimize the use of 'set_tag' 2014-10-15 13:17:09 -07:00
Leonardo de Moura
b94d121580 refactor(library): move flycheck "helper" classes to separate module 2014-10-15 09:08:04 -07:00
Leonardo de Moura
e6606ef2ac feat(library/tactic): add 'rename' hypothesis tactic 2014-10-14 18:19:34 -07:00
Leonardo de Moura
fc01edee4d fix(frontends/lean/elaborator): perform translation using "user-level" names 2014-10-14 17:53:24 -07:00
Leonardo de Moura
58c9421bab refactor(library/tactic): elaborate expressions nested in tactics with respect to current goal, save postponed constraints (e.g., flex-flex constraints) closes #44, fixes #70 2014-10-14 17:18:40 -07:00
Leonardo de Moura
d75a9c840c fix(frontends/lean/parser): segfault when ending scope without opening, fixes #244 2014-10-13 21:08:36 -07:00
Leonardo de Moura
b7c1b348d1 feat(frontends/lean/inductive_cmd): don't force user to repeat argument declarations in every datatype in a mutually recursive datatype declaration 2014-10-13 20:53:09 -07:00
Leonardo de Moura
9edf780a00 feat(frontends/lean): elaborate inductive datatypes and introduction rules as a single elaboration problem 2014-10-13 18:35:11 -07:00
Leonardo de Moura
2431de542f refactor(frontends/lean/parser): add missing 'const' 2014-10-13 13:07:42 -07:00
Leonardo de Moura
bc70e7244d feat(frontends/lean): add option '-X': discard all proofs after theorems are checked
This option is useful for generating compact .olean files for web demos
2014-10-13 10:05:38 -07:00
Leonardo de Moura
698dc0472d fix(frontends/lean/decl_cmds): error messages 2014-10-13 07:17:33 -07:00
Leonardo de Moura
a26618e0f2 feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied 2014-10-12 13:06:00 -07:00
Leonardo de Moura
549f24335e feat(frontends/lean): do not allow coercion definition in sections 2014-10-11 18:41:17 -07:00
Leonardo de Moura
78b8a67015 refactor(library/scoped_ext): sections are just "nameless" namespaces 2014-10-11 17:36:46 -07:00
Leonardo de Moura
158682219f feat(frontends/lean): allow parameters only in contexts 2014-10-11 17:13:56 -07:00
Leonardo de Moura
f984b51291 feat(frontends/lean/notation_cmd): remove the cleanup notation hack 2014-10-11 16:40:26 -07:00
Leonardo de Moura
334a4c84d1 refactor(frontends/lean): do not expose unnecessary functions 2014-10-11 16:40:26 -07:00
Leonardo de Moura
33ad41b93e refactor(frontends/lean): adjust function names to reflect how parameters/variables behave 2014-10-11 15:33:31 -07:00
Leonardo de Moura
ca632cca13 feat(frontends/lean): add 'universe variable' command
We can declare variables anywhere. So, we must also be able do declare
"universe" variables anywhere. Here is a minimal example that requires
this feature

```
-- We want A and B to be in the same universe
universe variable l
variable A : Type.{l}
variable B : Type.{l}
definition tst := A = B
```

The following doesn't work because A and B are in different universes
```
variable A : Type
variable B : Type
definition tst := A = B
```

The following works, but tst is not universe polymorphic, since l is
one *fixed* global universe
```
universe l
variable A : Type.{l}
variable B : Type.{l}
definition tst := A = B
```
2014-10-11 14:22:33 -07:00
Leonardo de Moura
1cc8007b9a refactor(frontends/lean): rename parser methods is_section* to is_local* 2014-10-11 10:25:39 -07:00
Leonardo de Moura
b0f8d86f26 feat(frontends/lean/parser): reject ambiguous parameter declaration, closes #242 2014-10-10 18:08:03 -07:00
Leonardo de Moura
5e6ff3eef3 fix(frontends/lean/elaborator): bug when reporting error position 2014-10-10 17:31:12 -07:00
Leonardo de Moura
f0523a3465 feat(frontends/lean): namespaces also define scope for variables 2014-10-10 16:21:30 -07:00
Leonardo de Moura
0641ee33ce feat(frontends/lean): allow variables anywhere 2014-10-10 16:16:19 -07:00
Leonardo de Moura
4010767c20 feat(shell): add options --cpp and --discard 2014-10-10 15:55:08 -07:00