Commit graph

4611 commits

Author SHA1 Message Date
Floris van Doorn
ee4cba4e0b style(hott): a bit of cleanup 2015-04-22 13:06:11 -07:00
Leonardo de Moura
cdf929d178 fix(frontends/lean/local_decls): missing '{}' around macro 2015-04-22 12:54:42 -07:00
Leonardo de Moura
a526cd92ac fix(frontends/lean): bug in pretty printer
this is related to issue #530
2015-04-22 12:44:08 -07:00
Leonardo de Moura
dc93603b4a feat(frontends/lean): parameter and variable binder type update
see issue #532
2015-04-22 12:28:11 -07:00
Leonardo de Moura
91f21c007a feat(frontends/lean): remove 'context' command 2015-04-22 11:32:02 -07:00
Leonardo de Moura
53653c3526 fix(frontends/lean): pretty printing in sections with parameters
fix #530
2015-04-21 22:44:09 -07:00
Leonardo de Moura
caf28f4053 fix(frontends/lean/decl_cmds): missing condition 2015-04-21 21:08:57 -07:00
Leonardo de Moura
22f6a95cc4 feat(frontends/lean): local notation override global one 2015-04-21 19:55:59 -07:00
Leonardo de Moura
fe9f4dd95f fix(frontends/lean): another bug in sections with parameters 2015-04-21 19:50:21 -07:00
Leonardo de Moura
3df99e514b fix(frontends/lean): problems with sections 2015-04-21 19:46:57 -07:00
Leonardo de Moura
52e9ad1a98 feat(frontends/lean): allow persistent notation declaration in sections (when they do not contain parameters)
see issue #554
2015-04-21 19:04:06 -07:00
Leonardo de Moura
bf8a7eb9b4 fix(library/scoped_ext): bug in local metadata in sections
The problem is described in issue #554
2015-04-21 18:56:28 -07:00
Leonardo de Moura
697a536d9e fix(library/tactic/inversion_tactic): type incorrect term being built by 'cases' tactic
fixes #545
2015-04-20 19:24:52 -07:00
Leonardo de Moura
68d4978953 feat(shell/lean): trap 'std::bad_alloc' and print nicer error message
See #489
2015-04-20 17:55:00 -07:00
Leonardo de Moura
47e37a3353 feat(kernel/metavar): add additional assertions 2015-04-20 17:46:06 -07:00
Leonardo de Moura
eb23a30626 feat(library/unifier): additional memory checks 2015-04-20 17:41:08 -07:00
Leonardo de Moura
28dad944c5 fix(library/unifier): cyclic assignment (?M <- ?M)
This was producing nonterminating behavior on example described at issue #489
2015-04-20 17:35:37 -07:00
Leonardo de Moura
431eade894 fix(library/tactic/inversion_tactic): incorrect use of optimization 2015-04-20 16:21:44 -07:00
Leonardo de Moura
107763a506 fix(frontends/lean): better error message for 'proof ... qed' blocks containing unsolved placeholders 2015-04-20 15:50:37 -07:00
Leonardo de Moura
df05edf333 feat(frontends/lean): generate warning when 'exit' is used
closes #553
2015-04-20 14:45:39 -07:00
Leonardo de Moura
6f6d106a10 feat(library/tactic): add "check_expr" tactic
closes #486
2015-04-19 19:00:05 -07:00
Leonardo de Moura
60e320fd79 feat(frontends/lean): protected constants and axioms
fixes #527
2015-04-19 17:45:58 -07:00
Leonardo de Moura
b7ca2a0ec9 fix(library/tactic/exact_tactic): exact and or_else
fixes #543
2015-04-19 17:23:09 -07:00
Soonho Kong
3d79f89f5e fix(emacs/lean-mode): lean-execute
shell-quote-argument also escapes '~' into '\~' which causes a problem.
This fix first calls 'f-full' to get a absolute path, then call
shell-quote-argument.

close #544
2015-04-16 19:27:42 -04:00
Soonho Kong
20b594e1cd fix(emacs/lean-mode.el): use 'shell-quote-argument' in lean-execute
close #544
2015-04-13 14:19:39 +01:00
Leonardo de Moura
5d95cb0979 feat(library/tactic): add 'refine' tactic
closes #482
2015-04-06 18:36:56 -07:00
Leonardo de Moura
412f03b08b feat(library/tactic/exact_tactic): generate error if 'exact' tactic produces a term containing metavariables 2015-04-06 13:38:53 -07:00
Leonardo de Moura
2bc13f6bfd feat(library/tactic/exact): enforce goal type during elaboration when executing 'exact' tactic
Remark: this was the behavior of the 'sexact' tactic.

This commit also adds the 'rexact' (relaxed exact) tactic which does not
enforce the goal type.

closes #495
2015-04-06 13:23:38 -07:00
Leonardo de Moura
754276a660 feat(frontends/lean): round parenthesis for [tactic1 | tactic2]
This commit also replaces the notation for divides
     `(` a `|` b `)`
with
      a `∣` b

The character `∣` is entered by typing \|

closes #516
2015-04-06 09:24:09 -07:00
Leonardo de Moura
969d17fd12 fix(frontends/lean/elaborator): class inference in tactic mode with trunc
closes #477
2015-04-05 17:47:14 -07:00
Leonardo de Moura
d731a4ab13 feat(library/normalize): add '[unfold-f]' hint
closes #497
2015-04-05 03:00:13 -07:00
Leonardo de Moura
d591c63840 feat(frontends/lean/decl_cmds): allow local coercions in contexts
closes #525
2015-04-04 15:25:07 -07:00
Leonardo de Moura
8c59f17605 feat(frontends/lean): 'using' expression without 'show' or 'have'
closes #536
2015-04-04 15:25:07 -07:00
Leonardo de Moura
4ec0e1b07c feat(frontends/lean): improve calc mode
Now, it automatically supports transitivity of the form
    (R a b) -> (b = c) -> R a c
    (a = b) -> (R b c) -> R a c

closes #507
2015-04-04 08:58:35 -07:00
Leonardo de Moura
1150b19598 perf(frontends/lean/elaborator): do not invoke recursive equation compiler when equations still contain metavariables 2015-04-02 23:37:33 -07:00
Soonho Kong
1f20fb6e9e feat(emacs/lean-input): add not(¬) and iff(↔)
close leanprover/tutorial#81
2015-04-02 22:13:01 -04:00
Leonardo de Moura
ed1acd9fb0 feat(library/init): move propext to init/quot, add Jeremy's funext theorem 2015-04-01 12:36:33 -07:00
Leonardo de Moura
b960e123b1 feat(kernel): add experimental support for quotient types 2015-03-31 22:04:16 -07:00
Leonardo de Moura
4eb270a572 fix(frontends/lean/pp): extra space 2015-03-31 15:07:32 -07:00
Leonardo de Moura
26c914173c feat(frontends/lean): add --profile option 2015-03-31 11:53:55 -07:00
Leonardo de Moura
46777fdd1d fix(frontends/lean/migrate_cmd): bug when using migrate command with option --to_axiom 2015-03-30 16:22:06 -07:00
Leonardo de Moura
8c76419c60 fix(frontends/lean/decl_cmds): error localization problem for recursive equations 2015-03-30 13:30:29 -07:00
Leonardo de Moura
cb2a5eeb3c feat(frontends/lean/inductive_cmd): local notation in inductive decls 2015-03-30 02:14:26 -07:00
Leonardo de Moura
033f3b630d feat(frontends/lean/scanner): allow upper-case greek letters in identifiers but Pi and Sigma 2015-03-30 02:14:26 -07:00
Soonho Kong
3ac29fae43 fix(util/lua.cpp): 'implicit conversion of nullptr constant to bool' warning
clang-3.6.0 generated the following warning:

/Users/soonhok/work/lean/src/util/lua.cpp:49:12: warning: implicit conversion of nullptr constant to 'bool' [-Wnull-conversion]
    return nullptr;
    ~~~~~~ ^~~~~~~
           false
2015-03-29 23:06:22 -04:00
Soonho Kong
8243ed6339 fix(test*.sh): allow spaces in filename
fix #515
2015-03-28 23:29:52 -04:00
Soonho Kong
7c5339d64e fix(CMakeLists.txt): quote CMake variables
close #513
2015-03-28 22:38:11 -04:00
Leonardo de Moura
ea3407d06d fix(library/tactic): valgrind warnings for still reachable memory 2015-03-28 12:32:57 -07:00
Leonardo de Moura
88495f9d59 fix(*): remove unnecessary null pointer checks
closes #514
2015-03-28 12:16:39 -07:00
Leonardo de Moura
1b15036dba feat(library/definitional): automatically add attribute [unfold-c] to cases_on, brec_on and rec_on
see #496
2015-03-27 19:12:17 -07:00
Leonardo de Moura
75621df52b feat(frontends/lean): uniform notation for lists in tactics
closes #504
2015-03-27 17:54:48 -07:00
Leonardo de Moura
242f8ba048 feat(frontends/lean/elaborator): include number of unsolved goals
See #509
2015-03-27 14:54:41 -07:00
Leonardo de Moura
223ef58db9 fix(kernel/equiv_manager): typo 2015-03-27 10:44:09 -07:00
Leonardo de Moura
f33ad9d6f4 feat(kernel): add equivalence manager for speeding up is_def_eq 2015-03-27 10:34:54 -07:00
Soonho Kong
7c9b364957 fix(emacs/lean-info): lean-info-list-parse
close #302
2015-03-27 11:37:47 -04:00
Soonho Kong
5c1d7458b5 fix(emacs/lean-input): fix input-method.js format
[skip ci]
2015-03-26 14:41:45 -04:00
Soonho Kong
c8e1ed9551 feat(emacs/lean-input): add lean-input-export-translations-to-stdout 2015-03-26 12:55:01 -04:00
Leonardo de Moura
a1c1fcb2f0 fix(frontends/lean/pp): bug in pretty printer new feature 2015-03-25 21:16:21 -07:00
Leonardo de Moura
d69f829337 perf(kernel/justification): avoid redundant justification objects 2015-03-25 19:09:01 -07:00
Leonardo de Moura
0c3fd7427e feat(frontends/lean): add syntax-sugar for fold
closes #503
2015-03-25 18:25:48 -07:00
Leonardo de Moura
f2b1752807 fix(frontends/lean/parser): add workaround for #461 2015-03-25 18:09:43 -07:00
Leonardo de Moura
b9e3c474c9 feat(library/tactic): add all_goals tactic
closes #501
2015-03-25 17:42:34 -07:00
Leonardo de Moura
49bc56ec07 feat(frontends/lean/pp): improve pretty printer for prefix and postfix notation
closes #491
2015-03-25 16:45:58 -07:00
Leonardo de Moura
a1f933886f fix(frontends/lean/structure_cmd): explicit universe levels for structures
closes #490
2015-03-25 16:10:30 -07:00
Leonardo de Moura
5f1d827b26 fix(frontends/lean/decl_cmds): assertion violation
closes #506
2015-03-25 13:46:23 -07:00
Soonho Kong
4c434f4c02 fix(emacs/lean-info): extract proofstate info by using pos of ","
fix #302
2015-03-25 12:36:15 -04:00
Soonho Kong
ca81e9bee2 fix(emacs/lean-mode): add 'display-buffer' at the end of lean-exec-at-pos 2015-03-25 08:35:02 -04:00
Leonardo de Moura
9119c3f9fb fix(shell/lean): uninitialized variable 2015-03-24 18:36:14 -07:00
Leonardo de Moura
1e13f383f6 feat(shell/lean): add --line, --col and --goal options for testing Emacs interface 2015-03-24 12:29:31 -07:00
Soonho Kong
69d1cfdd52 feat(emacs/lean-mode): add lean-exec-at-pos and lean-define-key-binding
Example Usage: add the following in your emacs configuration

(add-hook 'lean-mode-hook '(lambda ()
    (lean-define-key-binding "\C-c\C-g"
                             '(lean-exec-at-pos "lean-goal" "*Lean Goal*" "--goal"))))

close #499
2015-03-24 14:57:49 -04:00
Leonardo de Moura
38a63a8a58 fix(library/tactic/exact_tactic): segfault when accessing head of empty list
closes #485
2015-03-23 19:00:01 -07:00
Leonardo de Moura
ac30052a29 fix(library/tactic/rewrite_tactic): apply substitution before trying to rewrite
closes #487
2015-03-23 18:32:52 -07:00
Leonardo de Moura
5bf46d1226 fix(library/tactic/inversion_tactic): improve 'cases' tactic for HoTT mode
closes #481
2015-03-23 18:06:11 -07:00
Leonardo de Moura
98cc325695 refactor(library/tactic/inversion_tactic): cleanup 2015-03-23 17:15:47 -07:00
Leonardo de Moura
76157ba392 fix(frontends/lean/pp): abbreviations with too much arguments
closes #480
2015-03-23 12:16:25 -07:00
Leonardo de Moura
0814e76298 fix(library/tactic/clear_tactic): unexpected failure
This commit also improves the error message produced by the 'clear' tactic.

fixes #488
2015-03-23 12:08:15 -07:00
Leonardo de Moura
b5acbb2228 fix(frontends/lean/pp): missing parenthesis around abbreviations
fixes #476
2015-03-16 17:12:03 -07:00
Leonardo de Moura
9b577a7b3e feat(frontends/lean): add 'migrate' command 2015-03-14 21:48:00 -07:00
Leonardo de Moura
fc3a7bac59 feat(frontends/lean): improve error handling inside match-with expressions 2015-03-13 23:25:46 -07:00
Leonardo de Moura
bed0d6df6b fix(frontends/lean/elaborator): inaccessible over coercion 2015-03-13 23:04:45 -07:00
Leonardo de Moura
f6f2c499ae fix(library/tactic/rewrite_tactic): rewrite macros did not implement operator==
This problem was affecting the cache
2015-03-13 19:24:09 -07:00
Leonardo de Moura
cfeb426cd7 fix(frontends/lean): pretty print numeral notation from algebra 2015-03-13 18:58:34 -07:00
Leonardo de Moura
9438366e37 feat(frontends/lean/builtin_exprs): better error synchronization for 'begin...end' blocks 2015-03-13 15:22:57 -07:00
Leonardo de Moura
aba158dbd4 feat(library/tactic/inversion_tactic): improve error message for unknown hypothesis 2015-03-13 15:19:19 -07:00
Leonardo de Moura
b88b98ac22 feat(frontends/lean): try to add definition/theorem as axiom when it fails to be processed
The idea is to avoid a "tsunami" of error messages when a heavily used
theorem breaks in the beginning of the file
2015-03-13 14:47:21 -07:00
Leonardo de Moura
f5811d6092 feat(frontends/lean): hide subterms that do not contain metavariables
when generating "unresolved metavariables" error message

closes #473
2015-03-13 12:42:57 -07:00
Leonardo de Moura
cda19f5aa6 feat(library/tactic/rewrite_tactic): improve rewrite tactic error messages
closes #471
2015-03-12 20:49:53 -07:00
Leonardo de Moura
7accd0f1e6 feat(library/tactic/rewrite_tactic): allow rewrite with terms that contains binders
see discussion at #470
2015-03-12 18:07:55 -07:00
Leonardo de Moura
7ca882d69a fix(frontends/lean/parse_rewrite_tactic): esimp error message position information 2015-03-12 17:05:41 -07:00
Leonardo de Moura
026622a790 refactor(src/kernel/replace_fn): remove stack-less replace_fn it is slower than the simple one 2015-03-12 16:22:49 -07:00
Leonardo de Moura
9fe2d5c74c refactor(library/unifier): use new assign method in the unifier 2015-03-12 15:01:40 -07:00
Leonardo de Moura
4ea323a2b2 refactor(library/tactic): cleanup common pattern 2015-03-12 14:52:41 -07:00
Leonardo de Moura
8f004671a2 fix(library/unifier): typo 2015-03-12 13:15:23 -07:00
Leonardo de Moura
3e4d849a4a refactor(kernel/metavar.h): simplify API 2015-03-12 12:50:53 -07:00
Leonardo de Moura
6a78ae7b46 fix(library/tactic/class_instance_synth): enforce consistent behavior in type class resolution
Auxiliary procedure mk_class_instance was not discarding partial solutions.
This procedure is used by the apply and inversion (aka cases) tactics
2015-03-12 10:27:05 -07:00
Leonardo de Moura
b38c943086 fix(library/tactic/class_instance_synth): discard partial solutions even when option class.unique_instances = true is used 2015-03-12 10:13:16 -07:00
Leonardo de Moura
47a350d888 fix(library/tactic/inversion_tactic): missing condition for applying optimization 2015-03-12 09:11:36 -07:00
Leonardo de Moura
7de3d5771d feat(library/tactic/rewrite_tactic): add eta-reduction support at esimp
closes #469
2015-03-12 00:32:31 -07:00
Leonardo de Moura
a9fa0fead9 feat(library/match): match modulo eta 2015-03-12 00:30:44 -07:00
Leonardo de Moura
a7af8e7c71 feat(library/tactic/inversion_tactic): remove dummy hypotheses of the form (H : a = a)
closes #468
2015-03-11 20:50:06 -07:00
Leonardo de Moura
b5fb7c734e feat(library/tactic/inversion_tactic): remove hypothesis being destructed
addresses second issue in #468
2015-03-11 20:42:50 -07:00
Leonardo de Moura
0a5340aa22 feat(library/tactic/goal): add auxiliary method 2015-03-11 20:39:41 -07:00
Leonardo de Moura
ebdda67812 fix(library/tactic/inversion_tactic.cpp): remove unnecessary hypothesis in HoTT mode
partial solution for #468
2015-03-11 19:30:34 -07:00
Leonardo de Moura
737faecc65 feat(library/tactic/inversion_tactic): fail if is_hset type class synthesis produced term containing meta-variables, improve error messages
fixes #467
2015-03-11 15:54:50 -07:00
Leonardo de Moura
71ce207080 fix(frontends/lean/elaborator): potential memory access violation
Before this commit, the modified method would crash if caching in the
whnf procedure was disabled.
2015-03-11 15:54:50 -07:00
Leonardo de Moura
1c55e2f389 fix(util/memory): memory allocation problem when using clang++ 3.5 on Ubuntu 14.04 2015-03-11 10:06:13 -07:00
Leonardo de Moura
4c6b0dc0e5 fix(library/tactic/expr_to_tactic): tactic_expr_to_id did not take as_atomic annotation into account
fixes #466
2015-03-11 08:49:59 -07:00
Leonardo de Moura
1244f01518 chore(library/unifier): remove dead code 2015-03-09 14:07:14 -07:00
Leonardo de Moura
9a6c675908 feat(library/unifier): add option to disable nonchronological backtracking 2015-03-09 12:08:58 -07:00
Leonardo de Moura
f966634910 feat(frontends/lean): nested dependent pattern matching 2015-03-06 19:18:08 -08:00
Leonardo de Moura
1490bdad49 feat(frontends/lean): add version of 'exact' tactic (sexact) that enforces goal type during term elaboration 2015-03-06 17:34:45 -08:00
Leonardo de Moura
bd8c4315f1 feat(frontends/lean): allow 'match-with' to be used in tactics without prefixing it with 'exact' 2015-03-06 15:49:31 -08:00
Leonardo de Moura
4edd7b9099 fix(library/definitional/equations): allow a function to be the result of a match-with term or recursive definition 2015-03-06 15:08:52 -08:00
Leonardo de Moura
f24d9e84fe feat(frontends/lean): add option 'max_memory'
Default value is 512Mb
2015-03-06 13:56:20 -08:00
Leonardo de Moura
3b721fe675 feat(frontends/lean): add missing 'help' command 2015-03-06 13:56:20 -08:00
Leonardo de Moura
daf36803c4 fix(frontends/lean/builtin_exprs): bug in 'using' construct 2015-03-06 13:56:20 -08:00
Leonardo de Moura
368f9d347e refactor(frontends/lean): approach used to parse tactics
The previous approach was too fragile

TODO: we should add separate parsing tables for tactics
2015-03-05 18:11:21 -08:00
Leonardo de Moura
28487ede3b feat(frontends/lean/decl_cmds): allow 'empty' set of pattern matching equations 2015-03-05 14:37:29 -08:00
Leonardo de Moura
8e9ccf8b6f chore(frontends/lean): remove 'dead' tokens 2015-03-05 14:37:29 -08:00
Leonardo de Moura
b73a931c70 fix(frontends/lean/elaborator): missing case 'no-equation' annotation 2015-03-05 14:37:29 -08:00
Leonardo de Moura
e4060a5614 feat(frontends/lean): do not force user to type the function name in the left-hand-side of recursive equations 2015-03-05 12:08:36 -08:00
Soonho Kong
87c236613a feat(emacs/lean-mode.el): add configuration menu-item for flycheck
close #451
2015-03-05 14:42:59 -05:00
Soonho Kong
b7c852a5c8 feat(src/lean-mode.el): add 'configuration' menu and add toggle option for 'Show type at point'
close #456
2015-03-05 14:37:44 -05:00
Leonardo de Moura
039afb4578 feat(frontends/lean): treat "proof t qed" as alias for "by exact t" 2015-03-05 11:12:39 -08:00
Leonardo de Moura
bd0f209659 feat(library/tactic/exact_tactic): do not force 'exact' tactic expression to be fully elaborated (i.e., metavariable free) 2015-03-05 11:12:39 -08:00
Leonardo de Moura
8295ef4e57 fix(library/tactic/class_instance_synth): constraint execution order at type class resolution
We could not fix this problem before because we did not have the
[quasireducible] annotation.

Without this annotation, the fixed TC would loop in some HoTT files.
2015-03-04 22:20:20 -08:00
Leonardo de Moura
abd238aef0 feat(*): add [quasireducible] attribute 2015-03-04 22:12:49 -08:00
Soonho Kong
8265729a82 fix(emacs/README.md): wrong quotation mark
[skip ci]
2015-03-04 17:04:39 -05:00
Floris van Doorn
3d7656078d feat(hott/types): prove that 'is_equiv f' is an hprop 2015-03-04 00:22:51 -05:00
Floris van Doorn
704f2b2697 feat(hott/algebra/category): prove that set is a univalent category assuming is_equiv is an hprop 2015-03-04 00:22:41 -05:00
Leonardo de Moura
51504a1872 feat(library/tactic/class_instance_synth): restrict higher-order unification even more during type class resolution 2015-03-03 20:26:49 -08:00
Leonardo de Moura
7db6ed7c14 refactor(library/unifier): move m_pattern configuration option to unifier_config 2015-03-03 20:24:18 -08:00
Leonardo de Moura
341a9a2010 refactor(library/unifier): remove dead code 2015-03-03 20:14:17 -08:00
Leonardo de Moura
fa79b214b8 fix(frontends/lean): allow 'attribute <id> [priority ...]' 2015-03-03 16:17:32 -08:00
Leonardo de Moura
11aad4449b feat(frontends/lean): add '[semireducible]' attribute
This commit also renames the elements of reducible_status.
The idea is to use in the C++ implementation the same names used in the
Lean front-end.
2015-03-03 10:48:36 -08:00
Leonardo de Moura
8240d7adcd perf(frontends/lean/util): improve univ_metavars_to_params_fn
We moved to replace_visitor because it uses a more precise cache.
2015-03-02 18:25:00 -08:00
Leonardo de Moura
7e2f0f9a36 fix(library/unifier): in the context_check, we should not consider local constants that occur in the type of other constants
This was a performance bug.
We were missing higher-order pattern constraints due to this bug.
2015-03-02 17:28:56 -08:00
Leonardo de Moura
1042bbc06f fix(kernel/metavar): improve error messages by propagating the tag when we execute instantiate_all
This is the real fix for commit ededf4fc6c
2015-03-02 13:01:50 -08:00
Leonardo de Moura
c81762970e fix(frontends/lean/elaborator): revert commit ededf4fc6c
The instantiate_all are needed. See issue #457
2015-03-02 13:00:54 -08:00
Leonardo de Moura
fdb169b8f3 feat(library/tactic): improve error localization when compiling tactics 2015-03-02 12:21:02 -08:00
Leonardo de Moura
ededf4fc6c feat(frontends/lean): remove unnecessary instantiate_all's that were messing with error localization 2015-03-01 14:51:44 -08:00
Leonardo de Moura
ca57b43698 feat(library/tactic): add 'change' tactic 2015-03-01 14:15:39 -08:00
Leonardo de Moura
c8ad5e9406 feat(frontends/lean/builtin_exprs): focus on have-tactic goal 2015-03-01 13:43:33 -08:00
Leonardo de Moura
e07c6675b3 feat(library/tactic/elaborate): better error message for tactics using elaborate_with_respect_to 2015-03-01 13:42:53 -08:00
Leonardo de Moura
c772d7bf84 fix(frontends/lean/elaborator): unassigned metavariable when using nested begin-end blocks
Closes #454
2015-02-28 09:03:56 -08:00
Floris van Doorn
23a248ab28 style(hott): let inverse notation have higher binding power than application 2015-02-28 01:16:23 -05:00
Soonho Kong
05cfb21c4c fix(emacs/lean-server.el): split findp info only up-to 1
close #446
2015-02-27 20:04:13 -05:00
Leonardo de Moura
cf56935b01 feat(frontends/lean): improve support for user defined tactics 2015-02-27 16:58:25 -08:00
Soonho Kong
c9ffc2fec8 fix(emacs/lean-util): add hlean support in lean-path-list
close #450
2015-02-27 15:27:18 -05:00
Leonardo de Moura
7d827a14c9 feat(library/module): expand 'failed to import' error message
see issue #448
2015-02-27 08:00:30 -08:00
Leonardo de Moura
2b65f02f6f feat(shell/lean): do not terminate if an error is detected when loading the cache
see issue #448
2015-02-27 07:54:59 -08:00
Leonardo de Moura
5b736a2268 feat(frontends/lean): add support for empty match-with expressions 2015-02-26 16:36:15 -08:00
Leonardo de Moura
d00c013ad8 fix(shell/lean): display HoTT library path for lean --hlean --path
See #450
2015-02-26 15:09:03 -08:00
Leonardo de Moura
72eed42ac8 feat(library/unifier): ignore irrelevant branches when solving flex-rigid constraints 2015-02-26 13:43:54 -08:00
Floris van Doorn
c091acc55b feat(hott): remove funext as type class, add theorems to prove equalities between functors and natural transformations 2015-02-26 12:52:33 -05:00
Soonho Kong
88e287df5a doc(emacs/README.md): add instructions for unicode-fonts package
related issue: #446
2015-02-26 05:09:40 -05:00
Leonardo de Moura
68110faa4d feat(frontends/lean/inductive_cmd): allow '|' in inductive datatype declarations 2015-02-25 17:00:10 -08:00
Leonardo de Moura
5ca52d81ec feat(frontends/lean): ML-like notation for match and recursive equations 2015-02-25 16:20:44 -08:00
Leonardo de Moura
c04c610b7b feat(frontends/lean): add 'assert H : A, ...' as notation for 'have H [visible] : A, ...' 2015-02-25 14:30:42 -08:00
Leonardo de Moura
96b54a8007 feat(frontends/lean/builtin_exprs): add 'have' notation in 'begin-end' blocks
It is notation for the assert tactic.
2015-02-25 14:04:17 -08:00
Leonardo de Moura
425aba9aa9 feat(library/pp_options): reduce default limits in the pretty printer
The goal is to avoid problems like the one described in issue #428
2015-02-25 14:04:17 -08:00
Soonho Kong
db1fba3ddc fix(emacs/lean-server.el): lean-server-trace-buffer-name was changed to a function 2015-02-25 14:21:23 -05:00
Leonardo de Moura
909ebfc5f1 feat(frontends/lean/elaborator): try coercions after each overload
We try only the easy cases since the more general case is too expensive.

closes #444
2015-02-24 17:41:20 -08:00
Leonardo de Moura
34c36648bb fix(frontends/lean/decl_cmds): constants command
closes #445
2015-02-24 16:27:13 -08:00
Leonardo de Moura
42289d4334 feat(library/tactic/class_instance_synth): create class instance synthesis subproblems only for arguments marked with the [] binder annotation 2015-02-24 16:12:39 -08:00
Leonardo de Moura
1cd44e894b feat(library/tactic/class_instance_synth): conservative class-instance resolution: expand only definitions marked as reducible
closes #442
2015-02-24 16:12:35 -08:00
Leonardo de Moura
4364b7f926 feat(frontends/lean): pp.beta is true by default
Remark: there is one exception (command: print definition). For this
command pp.beta is still false.
2015-02-24 12:27:53 -08:00
Leonardo de Moura
1ff6446a63 feat(frontends/lean): nested begin-end blocks 2015-02-24 11:59:27 -08:00
Leonardo de Moura
21e972e34a fix(emacs/lean-syntax): syntax-highlight problem in tactics 2015-02-24 11:57:34 -08:00
Leonardo de Moura
dc2ac92846 fix(library/definitional/equations): use whnf on recursive definition arguments
The idea is to expose "hidden" datatypes.
2015-02-23 22:27:30 -08:00
Leonardo de Moura
3197e6d403 feat(frontends/lean/parse_rewrite_tactic): improve rewrite tactic parser 2015-02-23 19:40:03 -08:00
Leonardo de Moura
787fed95aa fix(library/tactic/inversion_tactic): bug in simpler case (hypotheses were being lost) 2015-02-23 16:10:49 -08:00
Leonardo de Moura
7adecaf494 fix(frontends/lean/structure_cmd): include context/section parameteres/variables that are used in explicit structure parameters 2015-02-23 15:28:43 -08:00
Leonardo de Moura
923fed8612 fix(frontends/lean/structure_cmd): bug in alias generation in the structure command
This commit (and 75acb3bc66) closes #443
2015-02-23 15:17:05 -08:00
Leonardo de Moura
75acb3bc66 fix(frontends/lean/structure_cmd): internal name of parameter/variable was being erased 2015-02-23 15:01:27 -08:00
Leonardo de Moura
7d35d18cad fix(library/tactic/rewrite_tactic): bug when matching terms that expanded into projections 2015-02-22 18:23:10 -08:00
Leonardo de Moura
a8554b6ed9 fix(kernel/default_converter): avoid assertion violation when normalizing type incorrect expressions 2015-02-22 16:17:43 -08:00
Leonardo de Moura
af787d9b7f fix(library/constants): regenerate constants.cpp and fix affected files 2015-02-22 09:22:51 -08:00
Floris van Doorn
61901cff81 feat(hott): rename definition and cleanup in HoTT library
also add more definitions in types.pi, types.path, algebra.precategory

the (pre)category library still needs cleanup
authors of this commit: @avigad, @javra, @fpvandoorn
2015-02-20 21:40:42 -05:00
Leonardo de Moura
33e562a7ce fix(frontends/lean/structure_cmd): effect of "include" command in the structure command
closes #438
2015-02-19 22:44:51 -08:00
Leonardo de Moura
7fc216183e feat(library/tactic): produce better error message when a tactic fails
closes #348
2015-02-16 18:42:15 -08:00
Leonardo de Moura
3a67ddb7c5 feat(library/locals): use optional<expr> instead of bool at depends_on (for arrays) 2015-02-16 18:42:05 -08:00
Leonardo de Moura
4248ad644d fix(frontends/lean): priority expressions parser 2015-02-14 12:26:06 -08:00
Soonho Kong
8b8267c7ce feat(emacs/lean-company.el): show meta and annotation for auto-complete options
close #435
2015-02-13 19:41:42 -05:00
Soonho Kong
382bf860fd fix(emacs/lean-company): import auto-completion for .hlean files
fix #434
2015-02-13 19:41:42 -05:00
Soonho Kong
a791953705 chore(emacs/lean-server): make lean-server-restart-all-processes interactive 2015-02-13 19:41:41 -05:00
Soonho Kong
6bcd1a9980 feat(emacs/lean-server): add support for hlean/standard minor-mode
Related issue: #389, #398, #400, #428
2015-02-13 19:41:41 -05:00
Soonho Kong
46d99c8077 chore(emacs): move lean-choose-minor-mode-based-on-extension to lean-util.el 2015-02-13 19:41:41 -05:00
Soonho Kong
dcee8ddb1f feat(emacs/lean-mode): add Standard/HoTT minor modes for lean-mode 2015-02-13 19:41:41 -05:00
Leonardo de Moura
c532a4a4b8 feat(frontends/lean/server): add option 'auto_completion.max_results'
Default value is 100
2015-02-13 12:58:11 -08:00
Leonardo de Moura
5cbdd77ad0 feat(library/tactic/rewrite_tactic): improve matcher in rewrite_tactic
closes #433
2015-02-13 12:40:55 -08:00
Leonardo de Moura
db71a29c81 feat(frontends/lean/parse_rewrite_tactic): improve esimp tactic 2015-02-13 12:22:17 -08:00
Leonardo de Moura
98960cbeda fix(library/tactic/rewrite_tactic): bug in HoTT mode 2015-02-13 10:09:18 -08:00
Jeremy Avigad
7d60213d9a fix(src/emacs/lean-syntax.el): add syntax highlighting for [abbreviations] 2015-02-11 22:09:25 -05:00
Leonardo de Moura
8ffadce4ab feat(frontends/lean): add "premise" and "premises" command
It is just an alternative notation for "variable" and "variables"

closes #429
2015-02-11 18:46:03 -08:00
Leonardo de Moura
30d20e8029 chore(frontends/lean/parser): remove dead code 2015-02-11 16:29:58 -08:00
Leonardo de Moura
04e92e1e96 feat(frontends/lean/parser): reject explicit universe levels in variables and parameters
This modification was motivated by issue #427
2015-02-11 16:25:06 -08:00
Leonardo de Moura
a35cce38b3 feat(frontends/lean): new semantics for "protected" declarations
closes #426
2015-02-11 14:09:25 -08:00
Leonardo de Moura
eceed03044 feat(frontends/lean): add "except" notation for "open" command, allow multiple metaclasses to be opened in a single "open" command 2015-02-11 11:02:59 -08:00
Leonardo de Moura
93f04f3034 feat(emacs): update syntax highlight 2015-02-11 10:35:38 -08:00
Leonardo de Moura
1832fb6f54 feat(*): uniform metaclass names, metaclass validation at 'open' command 2015-02-11 10:35:04 -08:00
Leonardo de Moura
9d1cd073c5 feat(frontends/lean): add 'print metaclasses' command 2015-02-11 10:13:20 -08:00
Leonardo de Moura
2cbaf1bbe3 feat(library/scoped_ext): add get_metaclasses API 2015-02-11 10:12:28 -08:00
Leonardo de Moura
60fca7575c fix(frontends/lean/pp): bugs when pretty printing abbreviations 2015-02-10 19:06:09 -08:00
Leonardo de Moura
9398b887cc fix(library/abbreviation): missing condition 2015-02-10 18:34:45 -08:00
Leonardo de Moura
bd304e1911 chore(*): style 2015-02-10 18:31:17 -08:00
Leonardo de Moura
43f849bf95 feat(frontends/lean/pp): add support for abbreviations in the pretty printer
closes #365
2015-02-10 18:27:02 -08:00
Leonardo de Moura
13748b9347 feat(library/abbreviation): simplify expand_abbreviations 2015-02-10 18:26:39 -08:00
Leonardo de Moura
373d4ca4c6 feat(emacs/lean-syntax): highlight 'abbreviation' command 2015-02-10 18:22:03 -08:00
Leonardo de Moura
f47e1bed01 feat(library/abbreviation): store inverse map ignoring universe level parameters 2015-02-10 18:21:32 -08:00
Leonardo de Moura
0d96b6b4cb feat(library/expr_lt): add expression comparison operator that ignores treat level parameters as wildcards 2015-02-10 18:20:10 -08:00
Leonardo de Moura
565cd835af feat(frontends/lean): add 'abbreviation' command 2015-02-10 17:31:40 -08:00
Leonardo de Moura
64ac3fa4ee feat(library): add 'abbreviation' management module 2015-02-10 17:25:11 -08:00
Leonardo de Moura
014271da8b feat(frontends/lean): better error messages for ill-terminated declarations 2015-02-10 14:38:00 -08:00
Leonardo de Moura
058377c8c6 feat(library/tactic/rewrite_tactic): treat iff.refl as trivial step in the rewrite tactic 2015-02-08 17:27:59 -08:00
Leonardo de Moura
666f697d24 fix(frontends/lean/builtin_exprs): 'using' expression should make local constant available for tactics 2015-02-08 17:27:22 -08:00
Leonardo de Moura
fcd67649ed refactor(kernel): expose may_reduce_later method 2015-02-07 20:36:26 -08:00
Leonardo de Moura
b57f93bad5 refactor(kernel): remove unnecessary procedures 2015-02-07 20:14:19 -08:00
Leonardo de Moura
1bdf7ae55a feat(kernel/default_converter): make norm_ext virtual 2015-02-07 19:25:56 -08:00
Leonardo de Moura
4c2277fccf feat(kernel/converter): more cleanup 2015-02-07 19:19:01 -08:00
Leonardo de Moura
73acaca21e refactor(kernel/default_converter): remove extra_opaque_pred 2015-02-07 19:05:46 -08:00
Leonardo de Moura
a11d1efb42 refactor(kernel/converter): remove mk_default_converter procedures 2015-02-07 19:03:58 -08:00
Leonardo de Moura
a47615009f refactor(kernel/type_checker): replace mk_default_converter with default_converter 2015-02-07 19:01:59 -08:00
Leonardo de Moura
f018fdabb9 refactor(library/kernel_bindings): remove unnecessary procedure 2015-02-07 18:57:46 -08:00
Leonardo de Moura
1640568f6a refactor(library/reducible): use default_converter in reducible, and converters based on reducible hints 2015-02-07 17:31:53 -08:00
Leonardo de Moura
7823905fc1 fix(kernel/default_converter): use is_opaque at is_delta 2015-02-07 17:30:36 -08:00
Leonardo de Moura
b4f1029318 refactor(library/reducible): define opaque_type_checker using default_converter 2015-02-07 17:05:29 -08:00
Leonardo de Moura
e04250f0d8 refactor(library/tactic/rewrite_tactic): use default_converter 2015-02-07 16:44:51 -08:00
Leonardo de Moura
c04c0e8381 refactor(*): remove transparent_scope hack, replace [strict] with [all-transparent] annotation 2015-02-07 15:19:41 -08:00
Leonardo de Moura
7945b8adab refactor(kernel/type_checker): remove useless procedures 2015-02-07 14:55:36 -08:00
Leonardo de Moura
12d320fa19 refactor(kernel/default_converter): avoid carrying type_checker and delayed_justification around in the default_converter 2015-02-07 14:10:56 -08:00
Leonardo de Moura
71b9215a70 refactor(kernel/default_converter): cleanup 2015-02-07 13:49:42 -08:00
Leonardo de Moura
3f06f7b6fd refactor(kernel): move default_converter to its own module 2015-02-07 11:33:37 -08:00
Leonardo de Moura
c2a296b1de feat(library/tactic/apply_tactic): add flag for disabling class instance resolution in the apply tactic 2015-02-06 17:27:24 -08:00
Leonardo de Moura
1557a579ed feat(library/tactic/proof_state): add report_failure flag to proof state
tactic can use the flag to produce nice error messages
2015-02-06 16:29:04 -08:00
Leonardo de Moura
2126b8ec9a feat(library/tactic/apply_tactic): perform class-instance resolution in the apply tactic
closes #360
2015-02-06 16:14:03 -08:00
Leonardo de Moura
18808d133e refactor(library/tactic/goal): move goal => local_context conversion to goal class 2015-02-06 16:09:59 -08:00
Leonardo de Moura
f10424d729 fix(library/tactic/rewrite_tactic): memory leak 2015-02-06 15:24:09 -08:00
Leonardo de Moura
1e8a975daa feat(frontends/lean): extend parser: rewrite "fold" step 2015-02-06 15:22:34 -08:00
Leonardo de Moura
aa70334f8d feat(library/tactic/rewrite_tactic): add "fold" step 2015-02-06 15:21:49 -08:00
Leonardo de Moura
47bd5e53e2 fix(library/tactic/rewrite_tactic): memory leak 2015-02-06 14:24:10 -08:00
Leonardo de Moura
5b25da8c43 feat(frontends/lean): add esimp tactic based on rewrite tactic
closes #358
2015-02-06 14:13:32 -08:00
Leonardo de Moura
7aac9f1fdb feat(library/tactic/rewrite_tactic): use expensive convertability checker at reduce_to steps and trivial goal 2015-02-06 13:53:03 -08:00
Leonardo de Moura
5b2a9dacc2 fix(library/tactic/rewrite_tactic): matcher should unfold only reducible constants 2015-02-06 13:44:04 -08:00
Leonardo de Moura
b4139627e5 feat(library/tactic/rewrite_tactic): add option to prevent any kind of constant unfolding when perfoming pattern matching in the rewrite tactic 2015-02-06 13:27:33 -08:00
Leonardo de Moura
62daf73dd0 chore(library/normalize): fix style 2015-02-06 13:27:10 -08:00
Leonardo de Moura
ba9557bb94 fix(library/tactic/rewrite_tactic): incorrect assertion 2015-02-06 13:02:50 -08:00
Leonardo de Moura
979d6494e9 feat(emacs/lean-syntax): add syntax-highlight for unfold-c hint attribute 2015-02-06 12:57:11 -08:00
Leonardo de Moura
bc95f09828 feat(frontends/lean/decl_cmds): allow user to specify unfold-c hint 2015-02-06 12:56:52 -08:00
Leonardo de Moura
ba641d7c58 feat(library/normalize): validate unfold-c hints 2015-02-06 12:42:53 -08:00