Commit graph

2831 commits

Author SHA1 Message Date
Leonardo de Moura
e9f8f9e5d7 refactor(library/nat): rename nat.le to nat.less_than
Motivation: avoid overload when we use `open nat`.

Unfortunately, we currently do not allow users to mark inductive datatype
declarations as protected.
2016-11-25 18:53:03 -08:00
Leonardo de Moura
97dd2f34d5 feat(library,frontends/lean): add basic doc string support 2016-11-25 18:52:56 -08:00
Leonardo de Moura
a009541b6e test(tests/lean/run): add test for issue #1089
See #1089
2016-11-24 14:51:45 -08:00
Leonardo de Moura
0554fd5997 fix(frontends/lean): name resolution at tactic execution time
This commit also adds a new tactic: tactic.resolve_name

closes #1201
2016-11-24 10:55:39 -08:00
Leonardo de Moura
b3c725c142 perf(library/equations_compiler/util): lemma generation performance when ite is used to compile equations 2016-11-23 15:48:12 -08:00
Leonardo de Moura
b75e8b99f5 fix(library/equations_compiler/structural_rec): missing case: reflexive inductive type eliminating into Prop
see #1199
2016-11-23 13:56:01 -08:00
Leonardo de Moura
21bad7cb97 feat(library/init/meta/comp_value_tactics): add support for char/string/fin at comp_val tactic 2016-11-23 13:19:54 -08:00
Leonardo de Moura
01bc4dfcd2 feat(library/init/meta/tactic): add dec_trivial notation 2016-11-23 11:42:57 -08:00
Leonardo de Moura
242ad1bd65 feat(library/init/meta/comp_value_tactics): add comp_val tactic for testing 2016-11-22 17:03:21 -08:00
Leonardo de Moura
ac4cd3d733 feat(library/tactic/rewrite_tactic): disable pp.beta at rewrite error msg 2016-11-21 15:58:11 -08:00
Daniel Selsam
19596eae77 fix(library/init/logic.lean): if_true and if_false take instance as implicit instead of inst_implicit 2016-11-21 12:27:40 -08:00
Leonardo de Moura
1c484e8926 chore(tests/lean/run): adjust tests 2016-11-21 12:23:36 -08:00
Leonardo de Moura
e17b3df16a fix(frontends/lean/elaborator): bad error message 2016-11-21 12:18:31 -08:00
Leonardo de Moura
f02de7e380 feat(frontends/lean/builtin_exprs): curly braces after show/have enter interactive mode 2016-11-18 17:00:08 -08:00
Leonardo de Moura
88d2f07567 feat(frontends/lean/tactic_notation): switch to proof-term mode when calc/suppose/assume/have/show occurs in a tactic block 2016-11-18 16:57:31 -08:00
Leonardo de Moura
6b466114a4 fix(library/init/meta/interactive): resolve name at interactive unfold tactics 2016-11-18 16:14:03 -08:00
Leonardo de Moura
c816b80855 chore(*): don't use upper case letter for type variables, and camelCase for declarations 2016-11-17 14:54:08 -08:00
Leonardo de Moura
d59bf05f20 feat(frontends/lean/scanner): allow ' in the beginning of identifiers 2016-11-17 11:53:21 -08:00
Leonardo de Moura
dfd2a23cd4 feat(frontends/lean): use #"c" instead of 'c' for character literals
The new notation is the same one used in Standard ML.
It will also allow us to use ' in the beginning of identifiers like Standard ML.
2016-11-17 11:35:54 -08:00
Leonardo de Moura
e16e9880f7 chore(library/system): enforce Lean naming conventions IO ==> io 2016-11-17 11:27:37 -08:00
Leonardo de Moura
d5aa92eaeb feat(library/tactic/tactic_state): add vm_obj introspection 2016-11-14 21:58:34 -08:00
Leonardo de Moura
82aade5185 feat(library/tactic/vm_monitor): add vm_decl introspection 2016-11-14 18:04:53 -08:00
Leonardo de Moura
277ff818a1 feat(library/tactic/vm_monitor): add VM introspection API 2016-11-14 17:25:25 -08:00
Leonardo de Moura
fffe69fdf9 feat(library/vm,library/tactic/vm_monitor): use optionT to define vm monad 2016-11-14 16:13:56 -08:00
Leonardo de Moura
7232e3a076 feat(library/vm/vm): invoke debugger (aka vm_monitor) 2016-11-14 14:45:49 -08:00
Leonardo de Moura
99b30d9c91 fix(tests/lean): remove config.lean 2016-11-13 09:38:40 -08:00
Leonardo de Moura
922d48524b fix(frontends/lean): fixes #1188
This commit also adds support for recording the type of local variables
in the info_manager
2016-11-10 15:08:25 -08:00
Leonardo de Moura
d6000416f8 feat(library/compiler,frontends/lean/elaborator): (try to) preserve position information
We will use this information in the debugger.
2016-11-09 16:51:48 -08:00
Leonardo de Moura
6ce00a9b45 fix(library/compiler): move inliner to the beginning
Reason: the inliner may introduce recursors, non eta-expanded terms,
etc. Before this commit, it was "undoing" previous compilation steps.
2016-11-08 16:14:01 -08:00
Sebastian Ullrich
ef633abec7 chore(*): fix test and style 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
1f9554a014 refactor(frontends/lean/info_manager): always pass column in requests 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
ba1b6165e3 feat(frontends, shell): implement basic server 'info' command 2016-11-08 08:37:41 -08:00
Leonardo de Moura
abd96e748f fix(frontends/lean/parser): crash on Win 10 2016-11-07 21:30:19 -08:00
Leonardo de Moura
c9da2f2542 chore(tests/lean): fix tests 2016-11-05 11:51:29 -07:00
Leonardo de Moura
b9afbf0aa8 test(tests/lean/run): add test for additive fragment 2016-11-05 11:47:43 -07:00
Daniel Selsam
f3dc41b631 fix(library/tactic/simplify): only use auto_eq_congr if number of args match 2016-11-04 10:13:02 -07:00
Gabriel Ebner
41643d6400 fix(library/compiler/vm_compiler): prevent segfault 2016-11-04 09:47:17 -07:00
Leonardo de Moura
6173d95d18 feat(library/module,frontends/lean): store line/column number information 2016-11-02 16:55:21 -07:00
Leonardo de Moura
3212d9c83a fix(library/module): store .olean file where inductive datatype was defined 2016-11-02 16:07:36 -07:00
Leonardo de Moura
cea572a167 feat(library/module): store .olean file name for imported declarations 2016-11-02 15:37:33 -07:00
Leonardo de Moura
9d3aa5b627 fix(library/compiler/elim_recursors): bug in elim_recursors
We may fail to type check auxiliary definitions that use rec_fn_macro.
The problem is that this macro cannot be unfolded.
So, we fix the problem by not type checking them. We add them as
constants, and store the definition in an auxiliary vector.
2016-11-02 14:19:28 -07:00
Leonardo de Moura
e62810c9b8 fix(library/compiler/lambda_lifting): make sure constructors are eta-expanded
closes #1133
2016-11-02 13:26:15 -07:00
Leonardo de Moura
30ae8a29b6 fix(library/compiler/elim_recursors): some recursor applications were not being eliminated 2016-11-02 13:05:52 -07:00
Leonardo de Moura
b22192eee1 fix(library/equations_compiler/elim_match): fixes #1171
We should not use value-transition (based on if-then-else) when there
are dependencies.
2016-10-31 17:42:39 +08:00
Leonardo de Moura
a77e4b5abf fix(library/compiler/erase_irrelevant): bug at is_comp_irrelevant 2016-10-27 11:51:37 +08:00
Leonardo de Moura
ea3adf4a7c feat(library/init/meta/tactic): universe polymorphic tactics 2016-10-25 03:42:55 +08:00
Leonardo de Moura
fa3475fa66 fix(library/type_context): allow assigned regular meta-variables to be "read" in tmp-mode
This commit also removes a "hack" that tried to fix this problem for
universe meta-variables only. Moreover, the hack was incomplete, since
it would not consider nested metavars.
2016-10-21 13:33:07 -07:00
Leonardo de Moura
99299d1915 feat(library/tactic/simplify): use propext in rewriting rules when simplify_config.use_axioms is tt 2016-10-19 17:59:01 -07:00
Leonardo de Moura
6edec4c4e9 feat(library/init/meta/converter): implement conversionals using ext_simplify_core 2016-10-19 17:23:32 -07:00
Leonardo de Moura
a4ef8f385d feat(library/tactic/simplify): add basic support for lambda-expressions 2016-10-19 14:15:56 -07:00