Commit graph

1103 commits

Author SHA1 Message Date
Leonardo de Moura
6b89080b1a feat(frontends/lean): do not allow user to define notation using tokens ! and @, closes #248 2014-10-21 16:28:36 -07:00
Leonardo de Moura
e24225fabf feat(frontends/lean): validate infixl/infixr/postfix/prefix declarations against reserved notations 2014-10-21 15:39:47 -07:00
Leonardo de Moura
6c7e23ecaa refactor(library): use 'reserve' notation in the standard library 2014-10-21 15:39:47 -07:00
Leonardo de Moura
bb953b80aa feat(frontends/lean): reserve notation, closes #95 2014-10-21 15:39:47 -07:00
Leonardo de Moura
8a44dfc1df fix(frontends/lean/pp): bug in pretty printer notation match procedure 2014-10-20 18:58:27 -07:00
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
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
c09bb3cc6f fix(tests/lean/notation): remove 'sorry' warning from expected outputs 2014-10-20 15:34:44 -07:00
Leonardo de Moura
7d0100a340 feat(library/tactic): add 'intros' tactic 2014-10-20 15:26:16 -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
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
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
10b880ce3b perf(kernel/metavar): improve occurs_expr and occurs performance 2014-10-17 14:05:22 -07:00
Leonardo de Moura
c4f02bd16a refactor(kernel/expr): remove dead code 2014-10-16 13:09:26 -07:00
Leonardo de Moura
28128e0330 fix(frontends/lean): EXTRA_TYPE info 2014-10-16 12:25:18 -07:00
Leonardo de Moura
e6606ef2ac feat(library/tactic): add 'rename' hypothesis tactic 2014-10-14 18:19:34 -07:00
Leonardo de Moura
90dba868e3 feat(library/tactic/proof_state): apply substitutions when pretty printing state 2014-10-14 17:37:20 -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
08c0fb3a64 test(tests/lean/run): expand tree example 2014-10-13 07:08:29 -07:00
Leonardo de Moura
5c1d5133dd fix(library/data/prod): make the notation for tuples and product types consistent 2014-10-13 06:48:37 -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
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
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
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
3d65b1c25c fix(frontends/lean/elaborator): incorrect type information being reports in lean-mode, fixes #241 2014-10-10 15:41:55 -07:00
Leonardo de Moura
235b8975d2 feat(kernel/inductive): K-like reduction in the kernel
Given (H_1 : a = a), we have that
      eq.rec H_2 H_1
reduces to H_2

This is not exclusive to equality.
It applies to any inductive datatype in Prop, containing only one
constructor with zero "arguments" (we say they are nullary).

BTW, the restriction to only one constructor is not needed, but it is
does not buy much to support multiple nullary constructors since Prop is
proof irrelevant.
2014-10-10 14:37:45 -07:00
Leonardo de Moura
402a351937 feat(frontends/lean): add 'universes' command 2014-10-10 08:45:59 -07:00
Leonardo de Moura
9ba59c6b25 feat(library/universe): improve support for universe level constraints in the unifier 2014-10-09 20:28:39 -07:00
Leonardo de Moura
8f1b6178a7 chore(*): minimize the use of parameters 2014-10-09 07:13:06 -07:00
Leonardo de Moura
8c5d3392c7 fix(library/algebra/category): minor fixes to reflect recent changes, and fix tests 2014-10-08 23:44:09 -07:00
Leonardo de Moura
8947bf4347 feat(frontends/lean): display type of binders, closes #238 2014-10-08 22:54:10 -07:00
Leonardo de Moura
25fd370c51 fix(frontends/lean): bug when using nested sections and parameters
see tests/lean/run/section4.lean
2014-10-08 22:23:20 -07:00
Leonardo de Moura
57c85221fe fix(frontends/lean): collect used universe levels after elaboration in the check command 2014-10-08 22:23:19 -07:00
Leonardo de Moura
eab9321a3b fix(frontends/lean): make all variables/parameters visible for 'variables' command 2014-10-08 22:23:19 -07:00
Leonardo de Moura
757cb46579 test(tests/lean/run): add no_confusion test 2014-10-08 22:23:19 -07:00
Leonardo de Moura
3b23bec25b feat(frontends/lean): variables/parameters and check commands have access to all section variables/parameters, closes #231 2014-10-08 08:40:55 -07:00
Leonardo de Moura
744cee8dd8 feat(frontends/lean): force 'classes' to be declared before instances are declared, closes #228 2014-10-07 18:02:15 -07:00