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
6a40f80612
fix(emacs/lean-syntax): glitch on syntax highlight
2014-10-11 10:56:28 -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
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
d61e6fdd89
refactor(frontends/lean/util): add auxiliary function
2014-10-10 15:21:08 -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
5a71542aeb
feat(kernel/inductive): track when K-like reduction can be used
2014-10-10 08:50:24 -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
052bc6ff20
fix(frontends/lean/elaborator): better specific universe detection
2014-10-09 14:43:07 -07:00
Floris van Doorn
1612070350
feat(lean-input.el): add some new notation
2014-10-08 23:14:44 -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
f7bbe09db2
feat(frontends/lean): add helper function mk_section_local_ref
2014-10-08 22:23:20 -07:00
Leonardo de Moura
d445857f56
fix(frontends/lean): change how "as-is" expressions are handled
...
Implicit arguments are consumed.
2014-10-08 22:23:20 -07:00
Leonardo de Moura
86410d392b
feat(util/list_fn): generalize map_filter template
2014-10-08 22:23:20 -07:00
Leonardo de Moura
0651496bf6
refactor(frontends/lean/notation_cmd): remove unnecessary uses of add_local_expr
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
93e0599a0f
feat(kernel/level): add missing normalization rule
2014-10-08 22:23:19 -07:00
Soonho Kong
24227f0e51
feat(emacs/lean-settings): enable linja '--keep-going' option
...
Fix #234
2014-10-08 13:12:16 -07:00
Soonho Kong
b6d475c3ac
fix(emacs/lean-project): use better prompt message for lean-project-create
2014-10-08 13:04:31 -07:00
Soonho Kong
d542771ba1
doc(emacs/README.md): add 'Unicode' subsection in 'Known Issues' section
2014-10-08 10:43:58 -07:00
Soonho Kong
8c0f01ac34
doc(emacs/README.md): do package-refresh-contents only once
...
Close #233
2014-10-08 10:41:52 -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
5b9bd279af
chore(frontends/lean/parser): minor cleanup
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
c31c026f46
feat(frontends/lean/class): accept only inductive datatypes (and records) as classes
2014-10-07 17:30:57 -07:00
Leonardo de Moura
8fa171cb92
refactor(library/unifier): allow general 'unify' procedure to take an initial substitution as argument
2014-10-07 17:30:57 -07:00
Soonho Kong
826166c257
feat(CMakeLists.txt): use bin/package_version if needed
...
1) When git sha1 is available:
Lean (version 0.2.0, commit 4a119a0424
, Release)
2) When git sha1 is not available, but there is bin/package_version file
Lean (version 0.2.0, package 0.2.0~ubuntu1~12.04, Release)
3) Git sha1 is not available, bin/package_version does not exist.
Lean (version 0.2.0, Release)
Close #229
2014-10-07 16:58:44 -07:00
Leonardo de Moura
92c424936a
refactor(kernel/macro_definition_cell): improve macro get_type API
2014-10-07 16:38:31 -07:00
Leonardo de Moura
16041e4948
fix(frontends/lean/elaborator): 'as-is' expressions
...
The elaborator should not introduce implicit arguments on terms marked
as 'as-is'.
2014-10-07 16:38:31 -07:00
Soonho Kong
78e9854bae
fix(emacs): support tabs in a file
...
Fix #226
2014-10-07 14:42:35 -07:00
Soonho Kong
e40ef9f6c5
feat(util/lean_path.cpp): add "exe_path/../lib/lean" to LEAN_PATH
...
Related issue: #223
2014-10-07 13:38:23 -07:00
Soonho Kong
d5abaf6446
feat(CMakeLists.txt): install lean library to LIBRARY_DIR (default: lib/lean)
2014-10-07 12:30:39 -07:00
Soonho Kong
013cd5640e
fix(CMakeLists.txt): rename EMACS_LIB to EMACS_LISP_DIR (default: share/eamcs/site-lisp/lean)
2014-10-07 12:30:39 -07:00
Soonho Kong
103cf57a46
chore(CMakeLists.txt): standard_lib target generates TAGS for library
2014-10-07 12:30:39 -07:00
Soonho Kong
2cf6cf19c0
feat(src): add LEAN_VERSION_PATCH
2014-10-07 12:30:38 -07:00
Soonho Kong
900c7c41a1
fix(shell/lean.cpp): print git commit in version string only when it's available
2014-10-07 12:30:38 -07:00
Leonardo de Moura
531de7990d
refactor(frontends/lean/tactic_hint): simplify tactic_hints
2014-10-07 11:34:58 -07:00