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
Leonardo de Moura
d8572e249d
feat(frontends/lean/builtin_cmds): add 'print classes' command
2014-10-07 17:30:57 -07:00
Leonardo de Moura
90ece4dd1b
feat(frontends/lean): remove tactic hints for specific classes
...
The idea is to separate class-instance resolution and tactic framework
as two independent engines.
2014-10-07 09:44:01 -07:00
Soonho Kong
e41573afc4
chore(tests/*/test.sh): change working dir; avoid using ls in for-loop
2014-10-06 11:20:13 -07:00
Leonardo de Moura
f7e1b67f6c
test(tests/lean/run/print): add tests for 'print' cmd
2014-10-05 19:06:29 -07:00
Leonardo de Moura
a0d4d82f3f
refactor(data/nat/order): use new policy for marking implicit arguments and '!' operator
2014-10-05 11:36:39 -07:00
Leonardo de Moura
73aa024c31
refactor(library/logic): remove 'core' subdirectory
2014-10-05 10:50:13 -07:00
Leonardo de Moura
317e910054
refactor(library/data/bool): use new style
2014-10-05 09:50:55 -07:00
Leonardo de Moura
60d8369688
fix(library/unifier): missing justification when updating choice constraints
...
The bug was not producing incorrect results, but really bad error
messages.
See: empty.lean.expected.out
2014-10-04 10:40:53 -07:00
Leonardo de Moura
64f6601fe3
fix(frontends/lean/proof_qed_elaborator): information about synthesized variables in a proof-qed block was being lost
2014-10-04 09:15:42 -07:00
Leonardo de Moura
7073f036d8
test(tests/lean/run): add additional tests for section parameter/variable and strict implicit argument
2014-10-04 08:15:43 -07:00
Leonardo de Moura
bf01cfeec5
fix(frontends/lean): avoid superfluous local references of the form @-1 (@ f)
,
...
This kind of term also confuses the elaborator
2014-10-04 07:55:32 -07:00
Leonardo de Moura
e71d4548de
fix(frontends/lean): universe levels associated with section variables should not be fixed in the section
2014-10-04 07:13:19 -07:00
Leonardo de Moura
938e12baa1
feat(frontends/lean/notation_cmd): allow local numeric notation
2014-10-03 13:55:57 -07:00
Leonardo de Moura
fd013e8d07
chore(tests/lean/run/group3): cleanup test
2014-10-03 13:55:57 -07:00
Leonardo de Moura
c0725d1934
refactor(frontends/lean): remove 'including' expressions
2014-10-03 09:09:27 -07:00
Leonardo de Moura
01d4644026
fix(frontends/lean): bug in include/omit commands: in the end of section/context, the configuration must be restored
2014-10-03 08:52:35 -07:00
Leonardo de Moura
284f300440
feat(frontends/lean): add 'include' and 'omit' commands, closes #184
2014-10-03 07:23:24 -07:00
Leonardo de Moura
6950b4aa9b
fix(frontends/lean/decl_cmds): do not allow section parameters/variables to shadow existing parameters/variables
2014-10-02 18:29:41 -07:00
Leonardo de Moura
f006d93794
feat(frontends/lean): section variables occur after section parameters
2014-10-02 17:55:34 -07:00
Leonardo de Moura
0a13e7863a
feat(frontends/lean): enforce rule section parameters cannot depend on section variables
2014-10-02 17:55:34 -07:00
Leonardo de Moura
bf081ed431
refactor(kernel): rename var_decl to constant_assumption
...
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
4946f55290
refactor(frontends/lean): constant/axiom are top-level commands, parameter/variable/hypothesis/conjecture are section/context-level commands
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-10-02 17:55:34 -07:00
Leonardo de Moura
f78d831de3
refactor(frontends/lean): remove hardcoded Type', and define it using notation
2014-10-02 14:29:51 -07:00
Leonardo de Moura
4cb54ac825
feat(frontends/lean/elaborator): more strict test for bad universe solution
2014-10-02 14:29:51 -07:00
Leonardo de Moura
98e66586e9
feat(frontends/lean/elaborator): elaborator rejects 'Type' if the universe is explicit
2014-10-02 14:29:51 -07:00
Leonardo de Moura
153e3927ac
feat(frontends/lean/elaborator): modify '!' semantics: it stops consuming arguments as soon it finds an argument that does not occur in the rest of the type.
2014-10-01 18:50:17 -07:00
Leonardo de Moura
e64d5c4a4a
refactor(library/data/nat): use new operator '!'
2014-10-01 18:39:47 -07:00
Leonardo de Moura
716cd4d651
refactor(library): rename namespace eq_ops to eq.ops
2014-10-01 17:51:17 -07:00